Package org.azd.wiki.pages
Class PagesRequestBuilder
java.lang.Object
org.azd.abstractions.BaseRequestBuilder
org.azd.wiki.pages.PagesRequestBuilder
Provides functionality to work with Wiki pages Api.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Represents the query parameters.static class
Request configuration object for the query parameters.static class
Represents the query parameters.static class
Request configuration object for the query parameters.static class
Represents the query parameters.static class
Request configuration object for the query parameters.static class
Represents the query parameters.static class
Request configuration object for the query parameters.Nested classes/interfaces inherited from class org.azd.abstractions.BaseRequestBuilder
BaseRequestBuilder.ProjectExcludeParameter
-
Field Summary
Fields inherited from class org.azd.abstractions.BaseRequestBuilder
accessTokenCredential, apiVersion, area, locationId, organizationUrl, serializer
-
Constructor Summary
ConstructorDescriptionPagesRequestBuilder
(String organizationUrl, AccessTokenCredential accessTokenCredential) Instantiates a new RequestBuilder instance and sets the default values. -
Method Summary
Modifier and TypeMethodDescriptioncreateOrUpdate
(WikiCreateOrUpdateParameters wikiCreateOrUpdateParameters, Consumer<PagesRequestBuilder.RequestConfiguration> requestConfiguration) Creates or edits a wiki page.createOrUpdateAsync
(WikiCreateOrUpdateParameters wikiCreateOrUpdateParameters, Consumer<PagesRequestBuilder.RequestConfiguration> requestConfiguration) Creates or edits a wiki page.delete
(String wikiIdentifier, Consumer<PagesRequestBuilder.RequestConfiguration> requestConfiguration) Deletes a wiki page.deleteAsync
(String wikiIdentifier, Consumer<PagesRequestBuilder.RequestConfiguration> requestConfiguration) Deletes a wiki page.deleteById
(String wikiIdentifier, int id, Consumer<PagesRequestBuilder.DeleteRequestConfiguration> requestConfiguration) Deletes a wiki page.deleteByIdAsync
(String wikiIdentifier, int id, Consumer<PagesRequestBuilder.DeleteRequestConfiguration> requestConfiguration) Deletes a wiki page.Gets metadata of the wiki page for the provided path.get
(String wikiIdentifier, Consumer<PagesRequestBuilder.GetRequestConfiguration> requestConfiguration) Gets metadata of the wiki page for the provided path.getAsText
(String wikiIdentifier, Consumer<PagesRequestBuilder.GetRequestConfiguration> requestConfiguration) Gets metadata of the wiki page for the provided path.getAsTextAsync
(String wikiIdentifier, Consumer<PagesRequestBuilder.GetRequestConfiguration> requestConfiguration) Gets metadata of the wiki page for the provided path.Gets metadata of the wiki page for the provided path.getAsync
(String wikiIdentifier, Consumer<PagesRequestBuilder.GetRequestConfiguration> requestConfiguration) Gets metadata of the wiki page for the provided path.getAsZip
(String wikiIdentifier, Consumer<PagesRequestBuilder.GetRequestConfiguration> requestConfiguration) Gets metadata of the wiki page for the provided path.getAsZipAsync
(String wikiIdentifier, Consumer<PagesRequestBuilder.GetRequestConfiguration> requestConfiguration) Gets metadata of the wiki page for the provided path.Gets metadata or content of the wiki page for the provided page id.getById
(String wikiIdentifier, int id, Consumer<PagesRequestBuilder.GetByIdRequestConfiguration> requestConfiguration) Gets metadata or content of the wiki page for the provided page id.getByIdAsText
(String wikiIdentifier, int id, Consumer<PagesRequestBuilder.GetByIdRequestConfiguration> requestConfiguration) Gets metadata or content of the wiki page for the provided page id.getByIdAsTextAsync
(String wikiIdentifier, int id, Consumer<PagesRequestBuilder.GetByIdRequestConfiguration> requestConfiguration) Gets metadata or content of the wiki page for the provided page id.getByIdAsync
(String wikiIdentifier, int id) Gets metadata or content of the wiki page for the provided page id.getByIdAsync
(String wikiIdentifier, int id, Consumer<PagesRequestBuilder.GetByIdRequestConfiguration> requestConfiguration) Gets metadata or content of the wiki page for the provided page id.getByIdAsZip
(String wikiIdentifier, int id, Consumer<PagesRequestBuilder.GetByIdRequestConfiguration> requestConfiguration) Gets metadata or content of the wiki page for the provided page id.getByIdAsZipAsync
(String wikiIdentifier, int id, Consumer<PagesRequestBuilder.GetByIdRequestConfiguration> requestConfiguration) Gets metadata or content of the wiki page for the provided page id.update
(WikiUpdateParameters wikiUpdateParameters) Edits a wiki page.updateAsync
(WikiUpdateParameters wikiUpdateParameters) Edits a wiki page.Methods inherited from class org.azd.abstractions.BaseRequestBuilder
builder
-
Constructor Details
-
PagesRequestBuilder
Instantiates a new RequestBuilder instance and sets the default values.- Parameters:
organizationUrl
- Represents organization location request url.accessTokenCredential
- Access token credential object.
-
-
Method Details
-
createOrUpdateAsync
public CompletableFuture<WikiPage> createOrUpdateAsync(WikiCreateOrUpdateParameters wikiCreateOrUpdateParameters, Consumer<PagesRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException Creates or edits a wiki page.- Parameters:
wikiCreateOrUpdateParameters
- Create or update parameters. eTag is mandatory for Edit scenario.requestConfiguration
- Represents the query parameters. Parameter path is mandatory.- Returns:
- WikiPage Object
WikiPage
- Throws:
AzDException
- Default Api Exception handler.
-
deleteAsync
public CompletableFuture<WikiPage> deleteAsync(String wikiIdentifier, Consumer<PagesRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException Deletes a wiki page.- Parameters:
wikiIdentifier
- Wiki ID or wiki name.requestConfiguration
- Represents the query parameters. Parameter path is mandatory.- Returns:
- WikiPage Object
WikiPage
- Throws:
AzDException
- Default Api Exception handler.
-
deleteByIdAsync
public CompletableFuture<WikiPage> deleteByIdAsync(String wikiIdentifier, int id, Consumer<PagesRequestBuilder.DeleteRequestConfiguration> requestConfiguration) throws AzDException Deletes a wiki page.- Parameters:
wikiIdentifier
- Wiki ID or wiki name.id
- Wiki page ID.requestConfiguration
- Represents the query parameters.- Returns:
- WikiPage Object
WikiPage
- Throws:
AzDException
- Default Api Exception handler.
-
getAsync
Gets metadata of the wiki page for the provided path.- Parameters:
wikiIdentifier
- Wiki ID or wiki name.- Returns:
- WikiPage Object
WikiPage
- Throws:
AzDException
- Default Api Exception handler.
-
getAsync
public CompletableFuture<WikiPage> getAsync(String wikiIdentifier, Consumer<PagesRequestBuilder.GetRequestConfiguration> requestConfiguration) throws AzDException Gets metadata of the wiki page for the provided path.- Parameters:
wikiIdentifier
- Wiki ID or wiki name.requestConfiguration
- Represents the query parameters.- Returns:
- WikiPage Object
WikiPage
- Throws:
AzDException
- Default Api Exception handler.
-
getAsTextAsync
public CompletableFuture<String> getAsTextAsync(String wikiIdentifier, Consumer<PagesRequestBuilder.GetRequestConfiguration> requestConfiguration) throws AzDException Gets metadata of the wiki page for the provided path.- Parameters:
wikiIdentifier
- Wiki ID or wiki name.requestConfiguration
- Represents the query parameters.- Returns:
- The wiki page content.
- Throws:
AzDException
- Default Api Exception handler.
-
getAsZipAsync
public CompletableFuture<InputStream> getAsZipAsync(String wikiIdentifier, Consumer<PagesRequestBuilder.GetRequestConfiguration> requestConfiguration) throws AzDException Gets metadata of the wiki page for the provided path.- Parameters:
wikiIdentifier
- Wiki ID or wiki name.requestConfiguration
- Represents the query parameters.- Returns:
- The wiki page contents as input stream. Use
StreamHelper
to download the contents as zip. - Throws:
AzDException
- Default Api Exception handler.
-
getByIdAsync
Gets metadata or content of the wiki page for the provided page id.- Parameters:
wikiIdentifier
- Wiki ID or wiki name.id
- Wiki page ID.- Returns:
- WikiPage Object
WikiPage
- Throws:
AzDException
- Default Api Exception handler.
-
getByIdAsync
public CompletableFuture<WikiPage> getByIdAsync(String wikiIdentifier, int id, Consumer<PagesRequestBuilder.GetByIdRequestConfiguration> requestConfiguration) throws AzDException Gets metadata or content of the wiki page for the provided page id.- Parameters:
wikiIdentifier
- Wiki ID or wiki name.id
- Wiki page ID.requestConfiguration
- Represents the query parameters.- Returns:
- WikiPage Object
WikiPage
- Throws:
AzDException
- Default Api Exception handler.
-
getByIdAsTextAsync
public CompletableFuture<String> getByIdAsTextAsync(String wikiIdentifier, int id, Consumer<PagesRequestBuilder.GetByIdRequestConfiguration> requestConfiguration) throws AzDException Gets metadata or content of the wiki page for the provided page id.- Parameters:
wikiIdentifier
- Wiki ID or wiki name.id
- Wiki page ID.requestConfiguration
- Represents the query parameters.- Returns:
- Wiki page context.
- Throws:
AzDException
- Default Api Exception handler.
-
getByIdAsZipAsync
public CompletableFuture<InputStream> getByIdAsZipAsync(String wikiIdentifier, int id, Consumer<PagesRequestBuilder.GetByIdRequestConfiguration> requestConfiguration) throws AzDException Gets metadata or content of the wiki page for the provided page id.- Parameters:
wikiIdentifier
- Wiki ID or wiki name.id
- Wiki page ID.requestConfiguration
- Represents the query parameters.- Returns:
- Wiki page(s) as zip content. Use
StreamHelper
to download the contents as zip. - Throws:
AzDException
- Default Api Exception handler.
-
updateAsync
public CompletableFuture<WikiPage> updateAsync(WikiUpdateParameters wikiUpdateParameters) throws AzDException Edits a wiki page.- Parameters:
wikiUpdateParameters
- Wiki update parameters to edit the page.- Returns:
- Wiki page object
WikiPage
- Throws:
AzDException
- Default Api Exception handler.
-
createOrUpdate
public WikiPage createOrUpdate(WikiCreateOrUpdateParameters wikiCreateOrUpdateParameters, Consumer<PagesRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException Creates or edits a wiki page.- Parameters:
wikiCreateOrUpdateParameters
- Create or update parameters. eTag is mandatory for Edit scenario.requestConfiguration
- Represents the query parameters. Parameter path is mandatory.- Returns:
- WikiPage Object
WikiPage
- Throws:
AzDException
- Default Api Exception handler.
-
delete
public WikiPage delete(String wikiIdentifier, Consumer<PagesRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException Deletes a wiki page.- Parameters:
wikiIdentifier
- Wiki ID or wiki name.requestConfiguration
- Represents the query parameters. Parameter path is mandatory.- Returns:
- WikiPage Object
WikiPage
- Throws:
AzDException
- Default Api Exception handler.
-
deleteById
public WikiPage deleteById(String wikiIdentifier, int id, Consumer<PagesRequestBuilder.DeleteRequestConfiguration> requestConfiguration) throws AzDException Deletes a wiki page.- Parameters:
wikiIdentifier
- Wiki ID or wiki name.id
- Wiki page ID.requestConfiguration
- Represents the query parameters.- Returns:
- WikiPage Object
WikiPage
- Throws:
AzDException
- Default Api Exception handler.
-
get
Gets metadata of the wiki page for the provided path.- Parameters:
wikiIdentifier
- Wiki ID or wiki name.- Returns:
- WikiPage Object
WikiPage
- Throws:
AzDException
- Default Api Exception handler.
-
get
public WikiPage get(String wikiIdentifier, Consumer<PagesRequestBuilder.GetRequestConfiguration> requestConfiguration) throws AzDException Gets metadata of the wiki page for the provided path.- Parameters:
wikiIdentifier
- Wiki ID or wiki name.requestConfiguration
- Represents the query parameters.- Returns:
- WikiPage Object
WikiPage
- Throws:
AzDException
- Default Api Exception handler.
-
getAsText
public String getAsText(String wikiIdentifier, Consumer<PagesRequestBuilder.GetRequestConfiguration> requestConfiguration) throws AzDException Gets metadata of the wiki page for the provided path.- Parameters:
wikiIdentifier
- Wiki ID or wiki name.requestConfiguration
- Represents the query parameters.- Returns:
- The wiki page content.
- Throws:
AzDException
- Default Api Exception handler.
-
getAsZip
public InputStream getAsZip(String wikiIdentifier, Consumer<PagesRequestBuilder.GetRequestConfiguration> requestConfiguration) throws AzDException Gets metadata of the wiki page for the provided path.- Parameters:
wikiIdentifier
- Wiki ID or wiki name.requestConfiguration
- Represents the query parameters.- Returns:
- The wiki page contents as input stream. Use
StreamHelper
to download the contents as zip. - Throws:
AzDException
- Default Api Exception handler.
-
getById
Gets metadata or content of the wiki page for the provided page id.- Parameters:
wikiIdentifier
- Wiki ID or wiki name.id
- Wiki page ID.- Returns:
- WikiPage Object
WikiPage
- Throws:
AzDException
- Default Api Exception handler.
-
getById
public WikiPage getById(String wikiIdentifier, int id, Consumer<PagesRequestBuilder.GetByIdRequestConfiguration> requestConfiguration) throws AzDException Gets metadata or content of the wiki page for the provided page id.- Parameters:
wikiIdentifier
- Wiki ID or wiki name.id
- Wiki page ID.requestConfiguration
- Represents the query parameters.- Returns:
- WikiPage Object
WikiPage
- Throws:
AzDException
- Default Api Exception handler.
-
getByIdAsText
public String getByIdAsText(String wikiIdentifier, int id, Consumer<PagesRequestBuilder.GetByIdRequestConfiguration> requestConfiguration) throws AzDException Gets metadata or content of the wiki page for the provided page id.- Parameters:
wikiIdentifier
- Wiki ID or wiki name.id
- Wiki page ID.requestConfiguration
- Represents the query parameters.- Returns:
- Wiki page context.
- Throws:
AzDException
- Default Api Exception handler.
-
getByIdAsZip
public InputStream getByIdAsZip(String wikiIdentifier, int id, Consumer<PagesRequestBuilder.GetByIdRequestConfiguration> requestConfiguration) throws AzDException Gets metadata or content of the wiki page for the provided page id.- Parameters:
wikiIdentifier
- Wiki ID or wiki name.id
- Wiki page ID.requestConfiguration
- Represents the query parameters.- Returns:
- Wiki page(s) as zip content. Use
StreamHelper
to download the contents as zip. - Throws:
AzDException
- Default Api Exception handler.
-
update
Edits a wiki page.- Parameters:
wikiUpdateParameters
- Wiki update parameters to edit the page.- Returns:
- Wiki page object
WikiPage
- Throws:
AzDException
- Default Api Exception handler.
-