Package org.bsc.confluence.xmlrpc
Class XMLRPCConfluenceService
- java.lang.Object
-
- org.bsc.confluence.xmlrpc.XMLRPCConfluenceService
-
- All Implemented Interfaces:
Closeable,AutoCloseable,ConfluenceService
public class XMLRPCConfluenceService extends Object implements ConfluenceService
- Author:
- bsorrentino
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.bsc.confluence.ConfluenceService
ConfluenceService.Credentials, ConfluenceService.Model, ConfluenceService.Protocol, ConfluenceService.Storage
-
-
Field Summary
Fields Modifier and Type Field Description org.bsc.confluence.xmlrpc.ConfluenceconnectionConfluenceService.Credentialscredentials
-
Constructor Summary
Constructors Modifier Constructor Description protectedXMLRPCConfluenceService(org.bsc.confluence.xmlrpc.Confluence confluence, ConfluenceService.Credentials credentials)
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.bsc.confluence.ConfluenceService
addLabelsByName, getOrCreatePage, retry
-
-
-
-
Field Detail
-
connection
public final org.bsc.confluence.xmlrpc.Confluence connection
-
credentials
public final ConfluenceService.Credentials credentials
-
-
Constructor Detail
-
XMLRPCConfluenceService
protected XMLRPCConfluenceService(org.bsc.confluence.xmlrpc.Confluence confluence, ConfluenceService.Credentials credentials)- Parameters:
confluence-
-
-
Method Detail
-
createInstanceDetectingVersion
public static XMLRPCConfluenceService createInstanceDetectingVersion(String url, ConfluenceService.Credentials credentials, ConfluenceProxy proxyInfo, SSLCertificateInfo sslInfo) throws Exception
- Parameters:
url-credentials-proxyInfo-sslInfo-- Returns:
- Throws:
Exception
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
getCredentials
public ConfluenceService.Credentials getCredentials()
- Specified by:
getCredentialsin interfaceConfluenceService
-
getPageByTitle
public CompletableFuture<Optional<? extends ConfluenceService.Model.PageSummary>> getPageByTitle(ConfluenceService.Model.ID parentPageId, String title)
- Specified by:
getPageByTitlein interfaceConfluenceService- Parameters:
parentPageId-title-- Returns:
- Throws:
Exception
-
createPage
public CompletableFuture<ConfluenceService.Model.Page> createPage(ConfluenceService.Model.Page parentPage, String title, ConfluenceService.Storage content)
- Specified by:
createPagein interfaceConfluenceService
-
storePage
public CompletableFuture<ConfluenceService.Model.Page> storePage(ConfluenceService.Model.Page page)
- Specified by:
storePagein interfaceConfluenceService
-
storePage
public CompletableFuture<ConfluenceService.Model.Page> storePage(ConfluenceService.Model.Page page, ConfluenceService.Storage content)
- Specified by:
storePagein interfaceConfluenceService
-
getPage
public CompletableFuture<Optional<ConfluenceService.Model.Page>> getPage(String spaceKey, String pageTitle)
- Specified by:
getPagein interfaceConfluenceService
-
getPage
public CompletableFuture<Optional<ConfluenceService.Model.Page>> getPage(ConfluenceService.Model.ID pageId)
- Specified by:
getPagein interfaceConfluenceService
-
getDescendents
public CompletableFuture<List<ConfluenceService.Model.PageSummary>> getDescendents(ConfluenceService.Model.ID pageId)
- Specified by:
getDescendentsin interfaceConfluenceService
-
removePage
public CompletableFuture<Boolean> removePage(ConfluenceService.Model.Page parentPage, String title)
- Specified by:
removePagein interfaceConfluenceService
-
removePage
public CompletableFuture<Boolean> removePage(ConfluenceService.Model.ID pageId)
- Specified by:
removePagein interfaceConfluenceService
-
addLabelsByName
public CompletableFuture<Void> addLabelsByName(ConfluenceService.Model.ID id, String[] labels)
- Specified by:
addLabelsByNamein interfaceConfluenceService- Parameters:
id-labels-- Returns:
-
createAttachment
public ConfluenceService.Model.Attachment createAttachment()
Description copied from interface:ConfluenceServicefactory method- Specified by:
createAttachmentin interfaceConfluenceService- Returns:
-
getAttachment
public CompletableFuture<Optional<ConfluenceService.Model.Attachment>> getAttachment(ConfluenceService.Model.ID pageId, String name, String version)
- Specified by:
getAttachmentin interfaceConfluenceService- Returns:
-
addAttachment
public CompletableFuture<ConfluenceService.Model.Attachment> addAttachment(ConfluenceService.Model.Page page, ConfluenceService.Model.Attachment attachment, InputStream source)
- Specified by:
addAttachmentin interfaceConfluenceService- Returns:
-
createBlogpost
public ConfluenceService.Model.Blogpost createBlogpost(String space, String title, ConfluenceService.Storage content, int version)
Description copied from interface:ConfluenceServicefactory method- Specified by:
createBlogpostin interfaceConfluenceService- Parameters:
space- space idtitle- post's titlecontent- post's content- Returns:
-
addBlogpost
public CompletableFuture<ConfluenceService.Model.Blogpost> addBlogpost(ConfluenceService.Model.Blogpost blogpost)
- Specified by:
addBlogpostin interfaceConfluenceService- Returns:
-
logout
public boolean logout()
- Returns:
-
exportPage
public void exportPage(String url, String spaceKey, String pageTitle, ExportFormat exfmt, File outputFile) throws Exception
- Specified by:
exportPagein interfaceConfluenceService- Throws:
Exception
-
-