Package org.azd.wiki
Class WikiApi
- All Implemented Interfaces:
WikiDetails
Wiki class to manage Wiki API
-
Constructor Summary
ConstructorDescriptionWikiApi
(Connection connection) Pass the connection object to work with Work Api -
Method Summary
Modifier and TypeMethodDescriptioncreateOrUpdateWikiPage
(String wikiIdentifier, String path, String comment, String eTagVersion, String content) Creates or edits a wiki page.createOrUpdateWikiPage
(String wikiIdentifier, String path, String comment, String eTagVersion, String version, GitVersionType versionType, GitVersionOptions versionOptions, String content) Creates or edits a wiki page.createPageMove
(String wikiIdentifier, String comment, String version, GitVersionType versionType, GitVersionOptions versionOptions, WikiPageMoveParameters pageMoveParameters) Creates a page move operation that updates the path and order of the page as provided in the parameters.createPageMove
(String wikiIdentifier, String comment, WikiPageMoveParameters pageMoveParameters) Creates a page move operation that updates the path and order of the page as provided in the parameters.createWiki
(WikiCreateParameters wikiCreateParameters) Creates the wiki resource.createWikiAttachment
(String wikiIdentifier, String name, InputStream content) Creates an attachment in the wiki.createWikiAttachment
(String wikiIdentifier, String name, String version, GitVersionType versionType, GitVersionOptions versionOptions, InputStream content) Creates an attachment in the wiki.deleteWiki
(String wikiIdentifier) Deletes the wiki corresponding to the wiki ID or wiki name provided.deleteWikiPage
(String wikiIdentifier, String path, String comment) Deletes a wiki page.deleteWikiPage
(String wikiIdentifier, String path, String comment, String version, GitVersionType versionType, GitVersionOptions versionOptions) Deletes a wiki page.deleteWikiPageById
(String id, String wikiIdentifier, String path, String comment, String version, GitVersionType versionType, GitVersionOptions versionOptions) Deletes a wiki page.getPageStats
(String wikiIdentifier, int pageId, int pageViewsForDays) Returns page detail corresponding to Page ID.Gets the wiki corresponding to the wiki ID or wiki name provided.getWikiPage
(String wikiIdentifier) Gets metadata of the wiki page for the provided path.getWikiPage
(String wikiIdentifier, boolean includeContent, String path, VersionControlRecursionType recursionLevel) Gets metadata of the wiki page for the provided path.getWikiPage
(String wikiIdentifier, boolean includeContent, String path, VersionControlRecursionType recursionLevel, String comment, String version, GitVersionType versionType, GitVersionOptions versionOptions) Gets metadata of the wiki page for the provided path.getWikiPageAsZip
(String id, String wikiIdentifier) Gets content of the wiki page as zip file for the provided page id.getWikiPageById
(String id, String wikiIdentifier) Gets metadata of the wiki page for the provided page id.getWikiPageById
(String id, String wikiIdentifier, boolean includeContent, VersionControlRecursionType recursionLevel) Gets metadata of the wiki page for the provided page id.getWikiPageContent
(String id, String wikiIdentifier) Gets content of the wiki page for the provided page id.getWikis()
Gets all wikis in a project or collection.updateWikiPage
(String id, String wikiIdentifier, String comment, String eTagVersion, String content) Edits a wiki page.Methods inherited from class org.azd.utils.AzDAsyncApi
createAsync
-
Constructor Details
-
WikiApi
Pass the connection object to work with Work Api- Parameters:
connection
- Connection object
-
-
Method Details
-
createWiki
Creates the wiki resource.- Specified by:
createWiki
in interfaceWikiDetails
- Parameters:
wikiCreateParameters
-WikiCreateParameters
helps to create code wiki and project wiki. Use the constructor parameter to create respective wikis.- Returns:
- WikiV2 object
WikiV2
- Throws:
AzDException
- Default Api Exception handler.
-
deleteWiki
Deletes the wiki corresponding to the wiki ID or wiki name provided.- Specified by:
deleteWiki
in interfaceWikiDetails
- Parameters:
wikiIdentifier
- Wiki ID or wiki name.- Returns:
- WikiV2
WikiV2
- Throws:
AzDException
- Default Api Exception handler.
-
getWiki
Gets the wiki corresponding to the wiki ID or wiki name provided.- Specified by:
getWiki
in interfaceWikiDetails
- Parameters:
wikiIdentifier
- Wiki ID or wiki name.- Returns:
- WikiV2
WikiV2
- Throws:
AzDException
- Default Api Exception handler.
-
getWikis
Gets all wikis in a project or collection.- Specified by:
getWikis
in interfaceWikiDetails
- Returns:
- WikiV2s
WikiV2Pages
- Throws:
AzDException
- Default Api Exception handler.
-
createWikiAttachment
public WikiAttachment createWikiAttachment(String wikiIdentifier, String name, InputStream content) throws AzDException Creates an attachment in the wiki.- Specified by:
createWikiAttachment
in interfaceWikiDetails
- Parameters:
wikiIdentifier
- Wiki ID or wiki name.name
- Wiki attachment name.- Returns:
- WikiAttachment Object
WikiAttachment
- Throws:
AzDException
- Default Api Exception handler.
-
createWikiAttachment
public WikiAttachment createWikiAttachment(String wikiIdentifier, String name, String version, GitVersionType versionType, GitVersionOptions versionOptions, InputStream content) throws AzDException Creates an attachment in the wiki.- Specified by:
createWikiAttachment
in interfaceWikiDetails
- Parameters:
wikiIdentifier
- Wiki ID or wiki name.name
- Wiki attachment name.version
- Version string identifier (name of tag/branch, SHA1 of commit)versionType
- Version type (branch, tag, or commit). Determines how Id is interpretedversionOptions
- Version options - Specify additional modifiers to version (e.g Previous)- Returns:
- WikiAttachment Object
WikiAttachment
- Throws:
AzDException
- Default Api Exception handler.
-
createPageMove
public WikiPageMove createPageMove(String wikiIdentifier, String comment, WikiPageMoveParameters pageMoveParameters) throws AzDException Creates a page move operation that updates the path and order of the page as provided in the parameters.- Specified by:
createPageMove
in interfaceWikiDetails
- Parameters:
wikiIdentifier
- Wiki ID or wiki name.comment
- Comment that is to be associated with this page move.- Returns:
- WikiPageMove Object
WikiPageMove
- Throws:
AzDException
- Default Api Exception handler.
-
createPageMove
public WikiPageMove createPageMove(String wikiIdentifier, String comment, String version, GitVersionType versionType, GitVersionOptions versionOptions, WikiPageMoveParameters pageMoveParameters) throws AzDException Creates a page move operation that updates the path and order of the page as provided in the parameters.- Specified by:
createPageMove
in interfaceWikiDetails
- Parameters:
wikiIdentifier
- Wiki ID or wiki name.comment
- Comment that is to be associated with this page move.version
- Version string identifier (name of tag/branch, SHA1 of commit)versionType
- Version type (branch, tag, or commit). Determines how Id is interpretedversionOptions
- Version options - Specify additional modifiers to version (e.g Previous)- Returns:
- WikiPageMove Object
WikiPageMove
- Throws:
AzDException
- Default Api Exception handler.
-
getPageStats
public WikiPageDetail getPageStats(String wikiIdentifier, int pageId, int pageViewsForDays) throws AzDException Returns page detail corresponding to Page ID.- Specified by:
getPageStats
in interfaceWikiDetails
- Parameters:
wikiIdentifier
- Wiki ID or wiki name.pageId
- Wiki page ID.- Returns:
- WikiPageDetail Object
WikiPageDetail
- Throws:
AzDException
- Default Api Exception handler.
-
createOrUpdateWikiPage
public WikiPage createOrUpdateWikiPage(String wikiIdentifier, String path, String comment, String eTagVersion, String content) throws AzDException Creates or edits a wiki page.- Specified by:
createOrUpdateWikiPage
in interfaceWikiDetails
- Parameters:
wikiIdentifier
- Wiki ID or wiki name.path
- Wiki page path.comment
- Comment to be associated with the page operation.- Returns:
- WikiPage Object
WikiPage
- Throws:
AzDException
- Default Api Exception handler.
-
createOrUpdateWikiPage
public WikiPage createOrUpdateWikiPage(String wikiIdentifier, String path, String comment, String eTagVersion, String version, GitVersionType versionType, GitVersionOptions versionOptions, String content) throws AzDException Creates or edits a wiki page.- Specified by:
createOrUpdateWikiPage
in interfaceWikiDetails
- Parameters:
wikiIdentifier
- Wiki ID or wiki name.path
- Wiki page path.comment
- Comment to be associated with the page operation.version
- Version string identifier (name of tag/branch, SHA1 of commit)versionType
- Version type (branch, tag, or commit). Determines how Id is interpretedversionOptions
- Version options - Specify additional modifiers to version (e.g Previous)- Returns:
- WikiPage Object
WikiPage
- Throws:
AzDException
- Default Api Exception handler.
-
deleteWikiPage
public WikiPage deleteWikiPage(String wikiIdentifier, String path, String comment) throws AzDException Deletes a wiki page.- Specified by:
deleteWikiPage
in interfaceWikiDetails
- Parameters:
wikiIdentifier
- Wiki ID or wiki name.path
- Wiki page path.comment
- Comment to be associated with this page delete.- Returns:
- WikiPage Object
WikiPage
- Throws:
AzDException
- Default Api Exception handler.
-
deleteWikiPage
public WikiPage deleteWikiPage(String wikiIdentifier, String path, String comment, String version, GitVersionType versionType, GitVersionOptions versionOptions) throws AzDException Deletes a wiki page.- Specified by:
deleteWikiPage
in interfaceWikiDetails
- Parameters:
wikiIdentifier
- Wiki ID or wiki name.path
- Wiki page path.comment
- Comment to be associated with this page delete.version
- Version string identifier (name of tag/branch, SHA1 of commit)versionType
- Version type (branch, tag, or commit). Determines how Id is interpretedversionOptions
- Version options - Specify additional modifiers to version (e.g Previous)- Returns:
- WikiPage Object
WikiPage
- Throws:
AzDException
- Default Api Exception handler.
-
deleteWikiPageById
public WikiPage deleteWikiPageById(String id, String wikiIdentifier, String path, String comment, String version, GitVersionType versionType, GitVersionOptions versionOptions) throws AzDException Deletes a wiki page.- Specified by:
deleteWikiPageById
in interfaceWikiDetails
- Parameters:
id
- Wiki page ID.wikiIdentifier
- Wiki ID or wiki name.comment
- Comment to be associated with this page delete.- Returns:
- WikiPage Object
WikiPage
- Throws:
AzDException
- Default Api Exception handler.
-
getWikiPage
Gets metadata of the wiki page for the provided path.- Specified by:
getWikiPage
in interfaceWikiDetails
- Parameters:
wikiIdentifier
- Wiki ID or wiki name.- Returns:
- WikiPage Object
WikiPage
- Throws:
AzDException
- Default Api Exception handler.
-
getWikiPage
public WikiPage getWikiPage(String wikiIdentifier, boolean includeContent, String path, VersionControlRecursionType recursionLevel, String comment, String version, GitVersionType versionType, GitVersionOptions versionOptions) throws AzDException Gets metadata of the wiki page for the provided path.- Specified by:
getWikiPage
in interfaceWikiDetails
- Parameters:
wikiIdentifier
- Wiki ID or wiki name.includeContent
- True to include the content of the page in the response for Json content type. Defaults to false (Optional)path
- Wiki page path.recursionLevel
- Recursion level for subpages retrieval. Defaults to None (Optional).version
- Version string identifier (name of tag/branch, SHA1 of commit)versionType
- Version type (branch, tag, or commit). Determines how Id is interpretedversionOptions
- Version options - Specify additional modifiers to version (e.g Previous)- Returns:
- WikiPage Object
WikiPage
- Throws:
AzDException
- Default Api Exception handler.
-
getWikiPage
public WikiPage getWikiPage(String wikiIdentifier, boolean includeContent, String path, VersionControlRecursionType recursionLevel) throws AzDException Gets metadata of the wiki page for the provided path.- Specified by:
getWikiPage
in interfaceWikiDetails
- Parameters:
wikiIdentifier
- Wiki ID or wiki name.includeContent
- True to include the content of the page in the response for Json content type. Defaults to false (Optional)path
- Wiki page path.recursionLevel
- Recursion level for subpages retrieval. Defaults to None (Optional).- Returns:
- WikiPage Object
WikiPage
- Throws:
AzDException
- Default Api Exception handler.
-
getWikiPageById
Gets metadata of the wiki page for the provided page id.- Specified by:
getWikiPageById
in interfaceWikiDetails
- Parameters:
id
- Wiki page ID.wikiIdentifier
- Wiki ID or wiki name..- Returns:
- WikiPage Object
WikiPage
- Throws:
AzDException
- Default Api Exception handler.
-
getWikiPageById
public WikiPage getWikiPageById(String id, String wikiIdentifier, boolean includeContent, VersionControlRecursionType recursionLevel) throws AzDException Gets metadata of the wiki page for the provided page id.- Specified by:
getWikiPageById
in interfaceWikiDetails
- Parameters:
id
- Wiki page ID.wikiIdentifier
- Wiki ID or wiki name..includeContent
- True to include the content of the page in the response for Json content type. Defaults to false (Optional)recursionLevel
- Recursion level for subpages retrieval. Defaults to None (Optional).- Returns:
- WikiPage Object
WikiPage
- Throws:
AzDException
- Default Api Exception handler.
-
getWikiPageContent
Gets content of the wiki page for the provided page id.- Specified by:
getWikiPageContent
in interfaceWikiDetails
- Parameters:
id
- Wiki page ID.wikiIdentifier
- Wiki ID or wiki name..- Returns:
- WikiPage Object
WikiPage
- Throws:
AzDException
- Default Api Exception handler.
-
getWikiPageAsZip
Gets content of the wiki page as zip file for the provided page id.- Specified by:
getWikiPageAsZip
in interfaceWikiDetails
- Parameters:
id
- Wiki page ID.wikiIdentifier
- Wiki ID or wiki name..- Returns:
- WikiPage Object
WikiPage
- Throws:
AzDException
- Default Api Exception handler.
-
updateWikiPage
public WikiPage updateWikiPage(String id, String wikiIdentifier, String comment, String eTagVersion, String content) throws AzDException Edits a wiki page.- Specified by:
updateWikiPage
in interfaceWikiDetails
- Parameters:
id
- Wiki page ID.wikiIdentifier
- Wiki ID or wiki name.comment
- Comment to be associated with the page operation.- Returns:
- WikiPage Object
WikiPage
- Throws:
AzDException
- Default Api Exception handler.
-