public class ConfluenceClient
extends java.lang.Object
| Constructor and Description |
|---|
ConfluenceClient(javax.ws.rs.client.WebTarget wikiTarget)
This constructor creates a client that can send requests to the Confluence Cloud server
located at the given target.
|
ConfluenceClient(javax.ws.rs.client.WebTarget wikiTarget,
AuthMethod authMethod)
This constructor creates a client that can send requests to the Confluence Cloud server
located at the given target.
|
| Modifier and Type | Method and Description |
|---|---|
Content |
createContent(CreateContentRequest request)
This method sends a request to the Confluence Cloud server to create the content defined in the
given
CreateContentRequest. |
java.util.List<Content> |
getContent(GetContentRequest request)
This method sends a request to the Confluence Cloud server to retrieve content matching the
conditions set in the given
GetContentRequest. |
Content |
updateContent(UpdateContentRequest request)
This method sends a request to the Confluence Cloud server to update content the content as
defined in the given
UpdateContentRequest. |
public ConfluenceClient(javax.ws.rs.client.WebTarget wikiTarget)
This constructor creates a client that can send requests to the Confluence Cloud server located at the given target.
The requests generated by a client created through this constructor do not include any authorisation, and can therefore only be used to access publicly available content.
wikiTarget - The resource target pointing to the location of the Confluence Cloud server.public ConfluenceClient(javax.ws.rs.client.WebTarget wikiTarget,
AuthMethod authMethod)
This constructor creates a client that can send requests to the Confluence Cloud server located at the given target.
The requests generated by a client created through this constructor will use the
credentials defined by the given AuthMethod, and are therefore subject to the
permissions given to the user that corresponds to these credentials.
wikiTarget - The resource target pointing to the location of the Confluence Cloud server.authMethod - The authorization method to use for all requests generated by this client.public java.util.List<Content> getContent(GetContentRequest request) throws ConfluenceRequestException
GetContentRequest.request - The request defining the conditions for the Content that should be returned.GetContentRequest.ConfluenceRequestException - if an error response is returned from the serverpublic Content updateContent(UpdateContentRequest request) throws ConfluenceRequestException
UpdateContentRequest.request - The request defining what updates to apply, and which content to apply them to.UpdateContentRequest were applied.ConfluenceRequestException - if an error response is returned from the serverpublic Content createContent(CreateContentRequest request) throws ConfluenceRequestException
CreateContentRequest.request - The request defining the content that should be created, and what fields should
be returned in the response.ConfluenceRequestException - If the server responses with an error status code