public class

WikiSoapService

extends Object
implements ConfluenceSoapService
java.lang.Object
   ↳ com.atlassian.confluence.rpc.soap.WikiSoapService

Class Overview

SOAP API for wikimarkup formatted input and output.

All methods that retrieve remote objects (for example RemotePage) that contain wiki markup throw exceptions. As of 4.0, all wiki content is migrated to xhtml storage format and as such, there will be no wiki formatted content to return. Throwing an exception is preferable because we don't want scripts to continue to operate on content that it assumes to be wiki markup but is not. This can lead to corrupted content being saved.

Summary

[Expand]
Inherited Constants
From interface com.atlassian.confluence.rpc.soap.ConfluenceSoapService
Public Constructors
WikiSoapService()
Public Methods
boolean addAnonymousPermissionToSpace(String token, String permission, String spaceKey)
Add a Space Permission for anonymous users
boolean addAnonymousPermissionsToSpace(String token, String[] permissions, String spaceKey)
Add Space Permissions for anonymous users
boolean addAnonymousUsePermission(String token)
boolean addAnonymousViewUserProfilePermission(String token)
This permission can only be set if the anonymous user already has 'use' permission.
RemoteAttachment addAttachment(String token, RemoteAttachment attachment, byte[] attachmentData)
This method is deprecated. available for backward compatibility.
RemoteAttachment addAttachment(String token, long contentId, RemoteAttachment attachment, byte[] attachmentData)
Add a new attachment to a ContentEntityObject.
RemoteComment addComment(String token, RemoteComment comment)
Adds a comment to a page or blog post
boolean addGlobalPermission(String token, String permission, String remoteEntityName)
Add global permissions for a user or group
boolean addGlobalPermissions(String token, String[] permissions, String remoteEntityName)
Add a global permission for a user or group
boolean addGroup(String token, String groupname)
Adds a new group
boolean addLabelById(String token, long labelId, long objectId)
Adds a label with the given ID to the object with the given ContentEntityObject ID.
boolean addLabelByName(String token, String labelName, long objectId)
Adds a label to the object with the given ContentEntityObject ID.
boolean addLabelByNameToSpace(String token, String labelName, String spaceKey)
Adds a label to the object with the given ContentEntityObject ID.
boolean addLabelByObject(String token, RemoteLabel labelObject, long objectId)
Adds the given label object to the object with the given ContentEntityObject ID.
boolean addPermissionToSpace(String token, String permission, String remoteEntityName, String spaceKey)
Add a Space Permission for a user or group
boolean addPermissionsToSpace(String token, String[] permissions, String remoteEntityName, String spaceKey)
Add Space Permissions for a user or group
RemoteSpace addPersonalSpace(String token, RemoteSpace space, String username)
boolean addProfilePicture(String token, String userName, String fileName, String mimeType, byte[] pictureData)
Add a profile picture to a user's profile
RemoteSpace addSpace(String token, RemoteSpace space)
RemoteSpaceGroup addSpaceGroup(String token, RemoteSpaceGroup spaceGroup)
Add a space Group to Confluence@return
void addUser(String token, RemoteUser remoteUser, String password)
Adds a user with the given RemoteUser object and password
boolean addUserToGroup(String token, String username, String groupname)
boolean changeMyPassword(String token, String oldPass, String newPass)
Change the current user's password
boolean changeUserPassword(String token, String username, String newPass)
Change a user's password
boolean clearIndexQueue(String token)
String convertWikiToStorageFormat(String token, String markup)
Converts a string from wiki markup to the XHTML based storage format.
boolean deactivateUser(String token, String username)
Deactivates the given user
RemoteComment editComment(String token, RemoteComment comment)
Updates a comment
boolean editUser(String token, RemoteUser remoteUser)
Edits a user with the values in the given RemoteUser object

Currently this will only update the user's full name and email
Boolean emptyTrash(String token, String spaceKey)
String exportSite(String token, boolean exportAttachments)
String exportSpace(String token, String spaceKey, String exportType)
String exportSpace(String token, String spaceKey, String exportType, boolean exportAll)
boolean flushIndexQueue(String token)
String[] getActiveUsers(String token, boolean viewAll)
Returns a list of the current system users
RemotePageSummary[] getAncestors(String token, long pageId)
Returns all direct ancestor pages of the page with the given pageId the user authenticated by token is allowed to view.
RemoteAttachment getAttachment(String token, long entityId, String fileName, int version)
Retrieve information about an attachment.
byte[] getAttachmentData(String token, long entityId, String fileName, int version)
Retrieve the contents of an attachment.
RemoteAttachment[] getAttachments(String token, long pageId)
RemoteBlogEntrySummary[] getBlogEntries(String token, String spaceKey)
RemoteBlogEntry getBlogEntry(String token, long entryId)
RemoteBlogEntry getBlogEntryByDateAndTitle(String token, String spaceKey, int year, int month, int dayOfMonth, String postTitle)
Retrieves a blog post in the given space, with the title and date as specified.
RemoteBlogEntry getBlogEntryByDayAndTitle(String token, String spaceKey, int dayOfMonth, String postTitle)
Retrieves a blog post in the Space with the given spaceKey, with the title 'postTitle' and posted on the day 'dayOfMonth'
RemotePageSummary[] getChildren(String token, long pageId)
Returns all child pages of the page with the given pageId the user authenticated by token is allowed to view.
RemoteClusterInformation getClusterInformation(String token)
RemoteNodeStatus[] getClusterNodeStatuses(String token)
RemoteComment getComment(String token, long commentId)
Retrieves a comment with the given ID
RemoteComment[] getComments(String token, long pageId)
Retrieves the comments for a given abstract page
RemoteContentPermissionSet getContentPermissionSet(String token, long contentId, String permissionType)
Get the content permission set of a certain type for a particular piece of content
RemoteContentPermissionSet[] getContentPermissionSets(String token, long contentId)
Get the content permission sets for a particular piece of content
RemotePageSummary[] getDescendents(String token, long pageId)
Returns all descendent pages of the page with the given pageId the user authenticated by token is allowed to view.
String[] getGroups(String token)
Retrieves a list of user groups
RemoteSearchResult[] getLabelContentById(String token, long labelId)
Returns the content for a given label ID
RemoteSearchResult[] getLabelContentByName(String token, String labelName)
Returns the content for a given label name
RemoteSearchResult[] getLabelContentByObject(String token, RemoteLabel labelObject)
Returns the content for a given label object
RemoteLabel[] getLabelsByDetail(String token, String labelName, String namespace, String spaceKey, String owner)
Retrieves the labels matching the given labelName, namespace or owner.
RemoteLabel[] getLabelsById(String token, long objectId)
Returns all labels for the given ContentEntityObject ID.
RemoteLabel[] getMostPopularLabels(String token, int maxCount)
Returns the most popular labels for the Confluence instance, with a specified maximum number of results.
RemoteLabel[] getMostPopularLabelsInSpace(String token, String spaceKey, int maxCount)
Returns the most popular labels for the given spaceKey, with a specified maximum number of results.
RemotePage getPage(String token, long pageId)
RemotePage getPage(String token, String spaceKey, String pageTitle)
RemotePageHistory[] getPageHistory(String token, long pageId)
RemotePermission[] getPagePermissions(String token, long pageId)
RemotePageSummary getPageSummary(String token, String spaceKey, String pageTitle)
RemotePageSummary getPageSummary(String token, long pageId)
RemotePageSummary[] getPages(String token, String spaceKey)
Returns all pages of the space with the given spaceKey the user authenticated by token is allowed to view.
String[] getPermissions(String token, String spaceKey)
String[] getPermissionsForUser(String token, String spaceKey, String userName)
RemoteLabel[] getRecentlyUsedLabels(String token, int maxResults)
Returns the recently used labels for the Confluence instance, with a specified maximum number of results.
RemoteLabel[] getRecentlyUsedLabelsInSpace(String token, String spaceKey, int maxResults)
Returns the recently used labels for the given spaceKey, with a specified maximum number of results.
RemoteLabel[] getRelatedLabels(String token, String labelName, int maxResults)
Returns the labels related to the given label name, with a specified maximum number of results.
RemoteLabel[] getRelatedLabelsInSpace(String token, String labelName, String spaceKey, int maxResults)
Returns the labels related to the given label name for the given spaceKey, with a specified maximum number of results.
RemoteServerInfo getServerInfo(String token)
RemoteSpace getSpace(String token, String spaceKey)
RemoteSpaceGroup getSpaceGroup(String token, String spaceGroup)
RemoteSpaceGroup[] getSpaceGroups(String token)
String[] getSpaceLevelPermissions(String token)
RemoteSpaceSummary[] getSpaces(String token)
RemoteSpace[] getSpacesContainingContentWithLabel(String token, String labelName)
Returns all Spaces that have content labelled with labelName
RemoteSpaceSummary[] getSpacesInGroup(String token, String spaceGroupKey)
RemoteSpace[] getSpacesWithLabel(String token, String labelName)
Returns an array of Spaces that have been labelled with labelName
RemotePageSummary[] getTopLevelPages(String token, String spaceKey)
Returns all top level pages of the space with the given spaceKey the user authenticated by token is allowed to view.
RemoteContentSummaries getTrashContents(String token, String spaceKey, int offset, int count)
RemoteUser getUser(String token, String username)
Retrieves a user with the given username
String[] getUserGroups(String token, String username)
Retrieves the groups that a given user belongs to
RemoteUserInformation getUserInformation(String token, String username)
Retrieves a user's information
boolean getUserPreferenceBoolean(String token, String username, String key)
Get a user preference as a boolean value.
long getUserPreferenceLong(String token, String username, String key)
Get a user preference as a long integer value.
String getUserPreferenceString(String token, String username, String key)
Get a user preference as a String value.
RemoteUser[] getWatchersForPage(String token, long pageId)
Returns the list of users watching the page or blog post with the given ID.
RemoteUser[] getWatchersForSpace(String token, String spaceKey)
Returns the list of users watching the space with the given key.
boolean hasGroup(String token, String groupname)
Determines whether a group exists
boolean hasUser(String token, String username)
Determines whether a user exists
boolean importSpace(String token, byte[] importData)
Import a space in a compressed XML format
boolean installPlugin(String token, String pluginFileName, byte[] pluginData)
Installs a plugin.
boolean isActiveUser(String token, String username)
Checks if a given user is active.
boolean isPluginEnabled(String token, String pluginKey)
Returns true if the specified plugin is enabled.
boolean isPluginInstalled(String token, String pluginKey)
Returns true if the specified plugin is installed.
boolean isWatchingPage(String token, long pageId, String username)
Returns true if the specified user is watching the page or blog post with the given ID, otherwise false.
boolean isWatchingSpace(String token, String spaceKey, String username)
Returns true if the specified user is watching the space with the given key, otherwise false.
boolean isWatchingSpaceForType(String token, String spaceKey, String contentType, String username)
Returns true if the specified user is watching the specified type of content in space with the given key, otherwise false.
String login(String username, String password)
boolean logout(String token)
boolean moveAttachment(String token, long originalContentId, String originalFileName, long newContentId, String newFileName)
Move or rename an attachment
Boolean movePage(String token, long sourcePageId, long targetPageId, String position)
Boolean movePageToTopLevel(String token, long pageId, String targetSpaceKey)
Boolean purgeFromTrash(String token, String spaceKey, long pageId)
boolean reactivateUser(String token, String username)
Reactivates the given user
boolean removeAllPermissionsForGroup(String token, String groupname)
Deletes all global and space permissions for the given group
boolean removeAnonymousPermissionFromSpace(String token, String permission, String spaceKey)
Removes a Space Permission for anonymous users
boolean removeAnonymousUsePermission(String token)
Remove anonymous use permission.
boolean removeAnonymousViewUserProfilePermission(String token)
boolean removeAttachment(String token, long contentId, String fileName)
Remove an attachment.
boolean removeComment(String token, long commentId)
Removes a comment with the given ID
boolean removeGlobalPermission(String token, String permission, String remoteEntityName)
Remove a global permission
boolean removeGroup(String token, String groupname, String defaultGroupName)
Removes an existing group

If a valid defaultGroupName is specified, users will be added to the new group (defaultGroupName).
boolean removeLabelById(String token, long labelId, long objectId)
Removes the label with the given ID from the object with the given ContentEntityObject ID.
boolean removeLabelByName(String token, String labelName, long objectId)
Removes the given label from the object with the given ContentEntityObject ID.
boolean removeLabelByNameFromSpace(String token, String labelName, String spaceKey)
Removes the given label from the given Space
boolean removeLabelByObject(String token, RemoteLabel labelObject, long objectId)
Removes the given label object from the object with the given ContentEntityObject ID.
Boolean removePage(String token, long pageId)
boolean removePermissionFromSpace(String token, String permission, String remoteEntityName, String spaceKey)
Removes a Space Permission for a user or group
Boolean removeSpace(String token, String spaceKey)
boolean removeSpaceGroup(String token, String spaceGroupKey)
Removes a Space Group from Confluence without removeing the space it contains.
boolean removeUser(String token, String username)
Removes a user with the given username
boolean removeUserFromGroup(String token, String username, String groupname)
Removes the given user from a group
String renderContent(String token, String spaceKey, long pageId, String newContent, Map renderParameters)
String renderContent(String token, String spaceKey, long pageId, String newContent)
RemoteSearchResult[] search(String token, String query, int maxResults)

Search Confluence for the supplied query String.

RemoteSearchResult[] search(String token, String query, Map params, int maxResults)

Search Confluence for the supplied query String.

void setContentEntityObjectDao(ContentEntityObjectDao contentEntityObjectDao)
boolean setContentPermissions(String token, long contentId, String permissionType, RemoteContentPermission[] remoteContentPermissions)
Set the content permissions for a particular permission type on some content.
boolean setEnableAnonymousAccess(String token, boolean value)
boolean setEnableWysiwyg(String token, boolean value)
This method is deprecated. since 4.0. You can no longer disable the wysiwyg editor.
void setSettingsManager(SettingsManager settingsManager)
boolean setUserInformation(String token, RemoteUserInformation userInfo)
Updates a user's information

Currently this will only update a user's "description", stored in the 'content' attribute
boolean setUserPreferenceBoolean(String token, String username, String key, boolean value)
Set a user preference to a boolean value.
boolean setUserPreferenceLong(String token, String username, String key, long value)
Set a user preference to an long integer value.
boolean setUserPreferenceString(String token, String username, String key, String value)
Set a user preference to a String value.
void setWikiToXhtmlMigrator(ExceptionTolerantMigrator wikiToXhtmlMigrator)
void setXhtmlSoapService(ConfluenceSoapService soapService)
RemoteBlogEntry storeBlogEntry(String token, RemoteBlogEntry blogEntry)
RemotePage storePage(String token, RemotePage page)
RemoteSpace storeSpace(String token, RemoteSpace remoteSpace)
Allows for modifying space details via the remote API.
RemotePage updatePage(String token, RemotePage page, RemotePageUpdateOptions options)
boolean watchPage(String token, long pageId)
Adds a watch for the current user on the page or blog post with the specified page ID.
boolean watchPageForUser(String token, long pageId, String username)
Adds a watch to a specific page or blog post for a particular user.
boolean watchSpace(String token, String spaceKey)
Adds a watch for the current user on the space with the specified space key.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.confluence.rpc.SecureRpc
From interface com.atlassian.confluence.rpc.soap.ConfluenceSoapService

Public Constructors

public WikiSoapService ()

Public Methods

public boolean addAnonymousPermissionToSpace (String token, String permission, String spaceKey)

Add a Space Permission for anonymous users

Parameters
token the authentication token
permission the Space Permission to add
spaceKey the key of the Space affected by this action
Returns
  • True if successful, false otherwise

public boolean addAnonymousPermissionsToSpace (String token, String[] permissions, String spaceKey)

Add Space Permissions for anonymous users

Parameters
token the authentication token
permissions the Space Permissions to add
spaceKey the key of the Space affected by this action
Returns
  • True if successful, false otherwise

public boolean addAnonymousUsePermission (String token)

public boolean addAnonymousViewUserProfilePermission (String token)

This permission can only be set if the anonymous user already has 'use' permission. If this is not the case then false will be returned.

Parameters
token the login token
Returns
  • true if successfully set; otherwise false.

public RemoteAttachment addAttachment (String token, RemoteAttachment attachment, byte[] attachmentData)

This method is deprecated.
available for backward compatibility.

public RemoteAttachment addAttachment (String token, long contentId, RemoteAttachment attachment, byte[] attachmentData)

Add a new attachment to a ContentEntityObject.

Parameters
token the authentication token
contentId the id of the ContentEntityObject to receive the new attachment.
attachment RemoteAttachment object containing attachment information
attachmentData a byte[] continaing the contents of the attachment.
Returns
  • the newly created attachment

public RemoteComment addComment (String token, RemoteComment comment)

Adds a comment to a page or blog post

Parameters
token The token identifying the current user
comment The RemoteComment object containing the comment information
Returns
  • RemoteComment object

public boolean addGlobalPermission (String token, String permission, String remoteEntityName)

Add global permissions for a user or group

Parameters
token the login token
permission the Space Permission to add
remoteEntityName the name of the user or group
Returns
  • True if successful, false otherwise

public boolean addGlobalPermissions (String token, String[] permissions, String remoteEntityName)

Add a global permission for a user or group

Parameters
token the login token
permissions Array of permissions to add
remoteEntityName the name of the user or group
Returns
  • True if successful, false otherwise

public boolean addGroup (String token, String groupname)

Adds a new group

Parameters
token The token identifying the current user
groupname The name of the group to be added
Returns
  • True when the group was successfully added, false if it already exists

public boolean addLabelById (String token, long labelId, long objectId)

Adds a label with the given ID to the object with the given ContentEntityObject ID.

Parameters
token The token identifying the current user
labelId The ID of the label to be added to the ContentEntityObject
objectId The ID of the ContentEntityObject the method will act on
Returns
  • True if successfully added, false otherwise.

public boolean addLabelByName (String token, String labelName, long objectId)

Adds a label to the object with the given ContentEntityObject ID.

Parameters
token The token identifying the current user
labelName The name of the label(s) to be added to the ContentEntityObject, in the form of a space-separated string
objectId The ID of the ContentEntityObject the method will act on
Returns
  • True if successfully added, false otherwise.

public boolean addLabelByNameToSpace (String token, String labelName, String spaceKey)

Adds a label to the object with the given ContentEntityObject ID.

Parameters
token The token identifying the current user
labelName The name of the label(s) to be added to the Space, in the form of a space-separated string
spaceKey The Space to add the label to
Returns
  • True if successfully added, false otherwise.

public boolean addLabelByObject (String token, RemoteLabel labelObject, long objectId)

Adds the given label object to the object with the given ContentEntityObject ID.

Parameters
token The token identifying the current user
labelObject The label to be added to the ContentEntityObject
objectId The ID of the ContentEntityObject the method will act on
Returns
  • True if successfully added, false otherwise.

public boolean addPermissionToSpace (String token, String permission, String remoteEntityName, String spaceKey)

Add a Space Permission for a user or group

Parameters
token the authentication token
permission the Space Permission to add
remoteEntityName the name of the user or group
spaceKey the key of the Space affected by this action
Returns
  • True if successful, false otherwise

public boolean addPermissionsToSpace (String token, String[] permissions, String remoteEntityName, String spaceKey)

Add Space Permissions for a user or group

Parameters
token the authentication token
permissions the Space Permissions to add
remoteEntityName the name of the user or group
spaceKey the key of the Space affected by this action
Returns
  • True if successful, false otherwise

public boolean addProfilePicture (String token, String userName, String fileName, String mimeType, byte[] pictureData)

Add a profile picture to a user's profile

Parameters
userName The user name of the profile
fileName File name of the picture
mimeType Image mime type (must be from image/*)
pictureData The image data
Returns
  • true if successful

public RemoteSpaceGroup addSpaceGroup (String token, RemoteSpaceGroup spaceGroup)

Add a space Group to Confluence@return

Parameters
token the authentication token
spaceGroup the spacegroup to add

public void addUser (String token, RemoteUser remoteUser, String password)

Adds a user with the given RemoteUser object and password

Parameters
token The token identifying the current user
remoteUser The object containing the user information
password The password of the user

public boolean addUserToGroup (String token, String username, String groupname)

public boolean changeMyPassword (String token, String oldPass, String newPass)

Change the current user's password

Parameters
token The token identifying the current user
oldPass The old password of the user, required for security purposes
newPass The new password for the user

public boolean changeUserPassword (String token, String username, String newPass)

Change a user's password

Parameters
token The token identifying the current user
username The username of the user we are changing the password for
newPass The new password for the user

public boolean clearIndexQueue (String token)

public String convertWikiToStorageFormat (String token, String markup)

Converts a string from wiki markup to the XHTML based storage format.

Returns
  • a string converted to the storage format

public boolean deactivateUser (String token, String username)

Deactivates the given user

Parameters
token The token identifying the current user
username The username of the user to deactivate
Returns
  • True if the user was successfully deactivated, false otherwise

public RemoteComment editComment (String token, RemoteComment comment)

Updates a comment

Parameters
token The token identifying the current user
comment The RemoteComment object containing the comment information
Returns
  • RemoteComment object

public boolean editUser (String token, RemoteUser remoteUser)

Edits a user with the values in the given RemoteUser object

Currently this will only update the user's full name and email
Parameters
token The token identifying the current user
remoteUser The object containing the user information

public Boolean emptyTrash (String token, String spaceKey)

public String exportSite (String token, boolean exportAttachments)

public String exportSpace (String token, String spaceKey, String exportType)

public String exportSpace (String token, String spaceKey, String exportType, boolean exportAll)

public boolean flushIndexQueue (String token)

public String[] getActiveUsers (String token, boolean viewAll)

Returns a list of the current system users

Parameters
token The token identifying the current user
viewAll Whether all users should be shown. When it is false, all users in the confluence-users group will be returned. Otherwise, every registered user is returned.
Returns
  • An array of usernames as Strings

public RemotePageSummary[] getAncestors (String token, long pageId)

Returns all direct ancestor pages of the page with the given pageId the user authenticated by token is allowed to view. The result is not ordered.

Parameters
token the authentication token
pageId the id of the page which child pages are to be returned

public RemoteAttachment getAttachment (String token, long entityId, String fileName, int version)

Retrieve information about an attachment.

Parameters
token the authentication token.
entityId the id of the ContentEntityObject the attachemt belongs to.
fileName the name of the attachment.
version the version number of the attachment.
Returns
  • the attachment

public byte[] getAttachmentData (String token, long entityId, String fileName, int version)

Retrieve the contents of an attachment.

Parameters
token the authentication token.
entityId the id of the ContentEntityObject the attachemt belongs to.
fileName the name of the attachment.
version the version number of the attachment.
Returns
  • the attachment's data

public RemoteAttachment[] getAttachments (String token, long pageId)

public RemoteBlogEntrySummary[] getBlogEntries (String token, String spaceKey)

public RemoteBlogEntry getBlogEntry (String token, long entryId)

public RemoteBlogEntry getBlogEntryByDateAndTitle (String token, String spaceKey, int year, int month, int dayOfMonth, String postTitle)

Retrieves a blog post in the given space, with the title and date as specified.

Returns
  • a blog post matching the criteria

public RemoteBlogEntry getBlogEntryByDayAndTitle (String token, String spaceKey, int dayOfMonth, String postTitle)

Retrieves a blog post in the Space with the given spaceKey, with the title 'postTitle' and posted on the day 'dayOfMonth'

Parameters
token the authentication token
spaceKey the key of the Space the blog post belongs to
dayOfMonth the day of the month the blog post was made
postTitle the title of the blog post
Returns
  • A RemoteBlogEntry object

public RemotePageSummary[] getChildren (String token, long pageId)

Returns all child pages of the page with the given pageId the user authenticated by token is allowed to view. The result is ordered by child page order.

Parameters
token the authentication token
pageId the id of the page which child pages are to be returned

public RemoteClusterInformation getClusterInformation (String token)

public RemoteNodeStatus[] getClusterNodeStatuses (String token)

public RemoteComment getComment (String token, long commentId)

Retrieves a comment with the given ID

Parameters
token The token identifying the current user
commentId The ID of the comment to be retrieved
Returns
  • A RemoteComment object containing the comment information

public RemoteComment[] getComments (String token, long pageId)

Retrieves the comments for a given abstract page

Parameters
token the authentication token
pageId the content ID of the abstract page
Returns
  • RemoteComment object with the comment details

public RemoteContentPermissionSet getContentPermissionSet (String token, long contentId, String permissionType)

Get the content permission set of a certain type for a particular piece of content

Parameters
token the login token for the current user
contentId the content ID of the content to be looked up
permissionType type of content permission
Returns
  • a content permission set of the specified type on the content object to be looked up

public RemoteContentPermissionSet[] getContentPermissionSets (String token, long contentId)

Get the content permission sets for a particular piece of content

Parameters
token the login token for the current user
contentId the content ID of the content to be looked up
Returns
  • an array of the permission sets applied to that content

public RemotePageSummary[] getDescendents (String token, long pageId)

Returns all descendent pages of the page with the given pageId the user authenticated by token is allowed to view. The result is not ordered.

Parameters
token the authentication token
pageId the id of the page which child pages are to be returned

public String[] getGroups (String token)

Retrieves a list of user groups

Parameters
token The token identifying the current user
Returns
  • An array of group names

public RemoteSearchResult[] getLabelContentById (String token, long labelId)

Returns the content for a given label ID

Parameters
token The token identifying the current user
labelId The ID of the label
Returns
  • An array of RemoteSearchResult objects

public RemoteSearchResult[] getLabelContentByName (String token, String labelName)

Returns the content for a given label name

Parameters
token The token identifying the current user
labelName The name of a label (namespace prefixes permitted)
Returns
  • An array of RemoteSearchResult objects

public RemoteSearchResult[] getLabelContentByObject (String token, RemoteLabel labelObject)

Returns the content for a given label object

Parameters
token The token identifying the current user
labelObject The RemoteLabel object
Returns
  • An array of RemoteSearchResult objects

public RemoteLabel[] getLabelsByDetail (String token, String labelName, String namespace, String spaceKey, String owner)

Retrieves the labels matching the given labelName, namespace or owner.

This method can be used to retrieve labels of a specfic type, such as personal labels, by setting the namespace.

Parameters with empty strings are ignored.
Parameters
token the authentication token for the user
labelName the name of the label to search for (not parsed for prefixes)
namespace the namespace to restrict by
spaceKey the key of the space to restrict by
owner the owner of the labels
Returns
  • an array of matching RemoteLabel objects

public RemoteLabel[] getLabelsById (String token, long objectId)

Returns all labels for the given ContentEntityObject ID.

Parameters
token The token identifying the current user
objectId The ID of the ContentEntityObject the method will retrieve the labels for
Returns
  • An array of RemoteLabel objects

public RemoteLabel[] getMostPopularLabels (String token, int maxCount)

Returns the most popular labels for the Confluence instance, with a specified maximum number of results.

Parameters
token The token identifying the current user
maxCount The maximum number of labels to return. A maxCount of 0 means there is no limit.
Returns
  • An array of RemoteLabel objects, sorted by descending popularity

public RemoteLabel[] getMostPopularLabelsInSpace (String token, String spaceKey, int maxCount)

Returns the most popular labels for the given spaceKey, with a specified maximum number of results.

Parameters
token The token identifying the current user
spaceKey The key of the space to limit the labels to
maxCount The maximum number of labels to return. A maxCount of 0 means there is no limit.
Returns
  • An array of RemoteLabel objects, sorted by descending popularity

public RemotePage getPage (String token, long pageId)

public RemotePage getPage (String token, String spaceKey, String pageTitle)

public RemotePageHistory[] getPageHistory (String token, long pageId)

public RemotePermission[] getPagePermissions (String token, long pageId)

public RemotePageSummary getPageSummary (String token, String spaceKey, String pageTitle)

public RemotePageSummary getPageSummary (String token, long pageId)

public RemotePageSummary[] getPages (String token, String spaceKey)

Returns all pages of the space with the given spaceKey the user authenticated by token is allowed to view. The result is not ordered.

Parameters
token the authentication token
spaceKey the key of the space which pages are to be returned

public String[] getPermissions (String token, String spaceKey)

public String[] getPermissionsForUser (String token, String spaceKey, String userName)

public RemoteLabel[] getRecentlyUsedLabels (String token, int maxResults)

Returns the recently used labels for the Confluence instance, with a specified maximum number of results.

Parameters
token The token identifying the current user
maxResults The maximum number of labels to return. A value of 0 means the default is used.
Returns
  • An array of RemoteLabel objects, sorted by most recent use

public RemoteLabel[] getRecentlyUsedLabelsInSpace (String token, String spaceKey, int maxResults)

Returns the recently used labels for the given spaceKey, with a specified maximum number of results.

Parameters
token The token identifying the current user
spaceKey The key of the space to limit the labels to
maxResults The maximum number of labels to return. A value of 0 means the default is used.
Returns
  • An array of RemoteLabel objects, sorted by most recent use

public RemoteLabel[] getRelatedLabels (String token, String labelName, int maxResults)

Returns the labels related to the given label name, with a specified maximum number of results.

Parameters
token The token identifying the current user
labelName The name of the label (namespace prefixes permitted)
maxResults The maximum number of labels to return. A value of 0 means the default is used.
Returns
  • An array of RemoteLabel objects (sorted by frequency of use)

public RemoteLabel[] getRelatedLabelsInSpace (String token, String labelName, String spaceKey, int maxResults)

Returns the labels related to the given label name for the given spaceKey, with a specified maximum number of results.

Parameters
token The token identifying the current user
labelName The name of the label (namespace prefixes permitted)
spaceKey The key of the space to limit the labels to
maxResults The maximum number of labels to return. A maxCount of 0 means the default is used.
Returns
  • An array of RemoteLabel objects (sorted by frequency of use)

public RemoteServerInfo getServerInfo (String token)

public RemoteSpace getSpace (String token, String spaceKey)

public RemoteSpaceGroup[] getSpaceGroups (String token)

public String[] getSpaceLevelPermissions (String token)

public RemoteSpace[] getSpacesContainingContentWithLabel (String token, String labelName)

Returns all Spaces that have content labelled with labelName

Parameters
token The token identifying the current user
labelName The label to retrieve the content for (namespace prefixes permitted)
Returns
  • An array of RemoteSpace instances (order undefined)

public RemoteSpaceSummary[] getSpacesInGroup (String token, String spaceGroupKey)

public RemoteSpace[] getSpacesWithLabel (String token, String labelName)

Returns an array of Spaces that have been labelled with labelName

Parameters
token The token identifying the current user
labelName The name of the label (namespace prefixes permitted)
Returns
  • An array of RemoteSpace instances

public RemotePageSummary[] getTopLevelPages (String token, String spaceKey)

Returns all top level pages of the space with the given spaceKey the user authenticated by token is allowed to view. The result is ordered by child page order.

Parameters
token the authentication token
spaceKey the key of the space which pages are to be returned

public RemoteContentSummaries getTrashContents (String token, String spaceKey, int offset, int count)

public RemoteUser getUser (String token, String username)

Retrieves a user with the given username

Parameters
token The token identifying the current user
username The username of the user to be retrieved
Returns
  • A RemoteUser object, containing the username, full name, email and URL

public String[] getUserGroups (String token, String username)

Retrieves the groups that a given user belongs to

Parameters
token The token identifying the current user
username The username to retrieve groups for
Returns
  • An array of group names as Strings

public RemoteUserInformation getUserInformation (String token, String username)

Retrieves a user's information

Parameters
token The token identifying the current user
username The name of the user to get information on

public boolean getUserPreferenceBoolean (String token, String username, String key)

Get a user preference as a boolean value.

Parameters
token the token identifying the current user
key The user preference key

public long getUserPreferenceLong (String token, String username, String key)

Get a user preference as a long integer value.

Parameters
token the token identifying the current user
key The user preference key

public String getUserPreferenceString (String token, String username, String key)

Get a user preference as a String value.

Parameters
token the token identifying the current user
key The user preference key

public RemoteUser[] getWatchersForPage (String token, long pageId)

Returns the list of users watching the page or blog post with the given ID. This information is only available to administrators of the space containing the page or blog post.

Returns
  • the list of users watching the page

public RemoteUser[] getWatchersForSpace (String token, String spaceKey)

Returns the list of users watching the space with the given key. This information is only available to administrators of the space.

Returns
  • the list of users watching the space

public boolean hasGroup (String token, String groupname)

Determines whether a group exists

Parameters
token the token identifying the current user
groupname the group to look up
Returns
  • True if the user exists, false otherwise

public boolean hasUser (String token, String username)

Determines whether a user exists

Parameters
token the token identifying the current user
username the username to look up
Returns
  • True if the user exists, false otherwise

public boolean importSpace (String token, byte[] importData)

Import a space in a compressed XML format

Parameters
token The authentication token
importData The contents of the Space export file
Returns
  • True if successful, otherwise false

public boolean installPlugin (String token, String pluginFileName, byte[] pluginData)

Installs a plugin.

Parameters
pluginFileName the original filename of the plugin. It should end with the correct file extension .xml or .jar.
pluginData a byte[] containing the contents of the plugin xml or jar file.

public boolean isActiveUser (String token, String username)

Checks if a given user is active.

Parameters
username The username to check
Returns
  • True if the user is active or does not exist, false otherwise.

public boolean isPluginEnabled (String token, String pluginKey)

Returns true if the specified plugin is enabled.

public boolean isPluginInstalled (String token, String pluginKey)

Returns true if the specified plugin is installed.

public boolean isWatchingPage (String token, long pageId, String username)

Returns true if the specified user is watching the page or blog post with the given ID, otherwise false. This information is only available to administrators of the space containing the page or blog post, if the username is not the same as the current user's.

Returns
  • true if the user is watching the page, otherwise false

public boolean isWatchingSpace (String token, String spaceKey, String username)

Returns true if the specified user is watching the space with the given key, otherwise false. This information is only available to administrators of the space if the username is not the same as the current user's.

Returns
  • true if the user is watching the space, otherwise false

public boolean isWatchingSpaceForType (String token, String spaceKey, String contentType, String username)

Returns true if the specified user is watching the specified type of content in space with the given key, otherwise false. This information is only available to administrators of the space if the username is not the same as the current user's.

Note that this method will return false if the user is watching the entire space and not just the given type.
Returns
  • true if the user is watching the space for the type, otherwise false

public String login (String username, String password)

public boolean logout (String token)

public boolean moveAttachment (String token, long originalContentId, String originalFileName, long newContentId, String newFileName)

Move or rename an attachment

Parameters
token the authentication token.
originalContentId the id of the ContentEntityObject the attachment belongs to.
originalFileName the name of the attachment.
newContentId the id of the ContentEntityObject the attachment is to be moved to.
newFileName the name the attachment is to be renamed to.
Returns
  • true

public Boolean movePage (String token, long sourcePageId, long targetPageId, String position)

public Boolean movePageToTopLevel (String token, long pageId, String targetSpaceKey)

public Boolean purgeFromTrash (String token, String spaceKey, long pageId)

public boolean reactivateUser (String token, String username)

Reactivates the given user

Parameters
token The token identifying the current user
username The username of the user to reactivate
Returns
  • True if the user was successfully reactivated, false otherwise

public boolean removeAllPermissionsForGroup (String token, String groupname)

Deletes all global and space permissions for the given group

Parameters
token The token identifying the current user
groupname The group to delete permissions for
Returns
  • True if successful, false otherwise.

public boolean removeAnonymousPermissionFromSpace (String token, String permission, String spaceKey)

Removes a Space Permission for anonymous users

Parameters
token the authentication token
permission the Space Permission to remove
spaceKey the key of the Space affected by this action
Returns
  • True if successful, false otherwise

public boolean removeAnonymousUsePermission (String token)

Remove anonymous use permission. If the anonymous user also has 'view user profile' permission then this will also be removed.

Parameters
token the login token
Returns
  • true if successful, false otherwise.

public boolean removeAnonymousViewUserProfilePermission (String token)

public boolean removeAttachment (String token, long contentId, String fileName)

Remove an attachment.

Parameters
token the authentication token.
contentId the id of the ContentEntityObject the attachment belongs to.
fileName the name of the attachment.
Returns
  • true if the attachment was deleted.

public boolean removeComment (String token, long commentId)

Removes a comment with the given ID

Parameters
token The token identifying the current user
commentId The ID of the comment to remove
Returns
  • True if successful, false otherwise

public boolean removeGlobalPermission (String token, String permission, String remoteEntityName)

Remove a global permission

Parameters
token the login token
permission the Space Permission to add
remoteEntityName the name of the user or group
Returns
  • True if successful, false otherwise

public boolean removeGroup (String token, String groupname, String defaultGroupName)

Removes an existing group

If a valid defaultGroupName is specified, users will be added to the new group (defaultGroupName).
Parameters
token The token identifying the current user
groupname The name of the group to be removed
defaultGroupName The name of the group that users will be moved to
Returns
  • True if successful, false otherwise.

public boolean removeLabelById (String token, long labelId, long objectId)

Removes the label with the given ID from the object with the given ContentEntityObject ID.

Parameters
token The token identifying the current user
labelId The ID of the label to be removed from the ContentEntityObject
objectId The ID of the ContentEntityObject the method will act on
Returns
  • True if successfully removed, false otherwise.

public boolean removeLabelByName (String token, String labelName, long objectId)

Removes the given label from the object with the given ContentEntityObject ID.

Parameters
token The token identifying the current user
labelName The name of the label(s) to be removed from the ContentEntityObject, in the form of a space-separated String
objectId The ID of the ContentEntityObject the method will act on
Returns
  • True if successfully removed, false otherwise.

public boolean removeLabelByNameFromSpace (String token, String labelName, String spaceKey)

Removes the given label from the given Space

Parameters
token The token identifying the current user
labelName The name of the label(s) to be removed from the Space, in the form of a space-separated String
spaceKey The Space the method will act on
Returns
  • True if successfully removed, false otherwise.

public boolean removeLabelByObject (String token, RemoteLabel labelObject, long objectId)

Removes the given label object from the object with the given ContentEntityObject ID.

Parameters
token The token identifying the current user
labelObject The label to be removed from the ContentEntityObject
objectId The ID of the ContentEntityObject the method will act on
Returns
  • True if successfully removed, false otherwise.

public Boolean removePage (String token, long pageId)

public boolean removePermissionFromSpace (String token, String permission, String remoteEntityName, String spaceKey)

Removes a Space Permission for a user or group

Parameters
token the authentication token
permission the Space Permission to remove
remoteEntityName the name of the user or group
spaceKey the key of the Space affected by this action
Returns
  • True if successful, false otherwise

public boolean removeSpaceGroup (String token, String spaceGroupKey)

Removes a Space Group from Confluence without removeing the space it contains. Currently requires global administration rights@return

Parameters
token the authentication token
spaceGroupKey the id of the spacegroup to be removed

public boolean removeUser (String token, String username)

Removes a user with the given username

Parameters
token The token identifying the current user
username The username of the user to be removed
Returns
  • True if successful, false otherwise

public boolean removeUserFromGroup (String token, String username, String groupname)

Removes the given user from a group

Parameters
token The token identifying the current user
username The username to remove from a group
groupname The name of the group the user is to be removed from
Returns
  • True if successful, false otherwise

public String renderContent (String token, String spaceKey, long pageId, String newContent, Map renderParameters)

public String renderContent (String token, String spaceKey, long pageId, String newContent)

public RemoteSearchResult[] search (String token, String query, int maxResults)

Search Confluence for the supplied query String. Please be sensible in your use of the maxResults parameter. Too large a value will result in this call taking a long time.

Parameters
token the authentication token
query the query term for the search
maxResults the maximum number of results to be returned.
Returns
  • an array of RemoteSearchResults. If there are no results then an empty array will be returned.

public RemoteSearchResult[] search (String token, String query, Map params, int maxResults)

Search Confluence for the supplied query String. Please be sensible in your use of the maxResults parameter.

A Map of search criteria can be specified. The following keys are understood -

  • spaceKey - a key representing a single space to limit the search to.
  • type - the type of content to limit the search to.
  • modified - a String representation of a time range. See the Bonnie documentation for com.atlassian.bonnie.search.SinceDateQueryFactory for a list of understood representations.
Parameters
token the authentication token
query the query term for the search
params a Map providing criteria to the search.
maxResults the maximum number of results to be returned.
Returns
  • an array of RemoteSearchResults. If there are no results then an empty array will be returned.

public void setContentEntityObjectDao (ContentEntityObjectDao contentEntityObjectDao)

public boolean setContentPermissions (String token, long contentId, String permissionType, RemoteContentPermission[] remoteContentPermissions)

Set the content permissions for a particular permission type on some content. These permissions will replace any permissions that already exist for that permission type.

Parameters
token the login token
contentId the id of the content to have permissions set on it
permissionType the type of the permissions (one of the constants from ContentPermission)
remoteContentPermissions the permissions to set
Returns
  • true (because RPC methods can't be void)

public boolean setEnableAnonymousAccess (String token, boolean value)

public boolean setEnableWysiwyg (String token, boolean value)

This method is deprecated.
since 4.0. You can no longer disable the wysiwyg editor.

public void setSettingsManager (SettingsManager settingsManager)

public boolean setUserInformation (String token, RemoteUserInformation userInfo)

Updates a user's information

Currently this will only update a user's "description", stored in the 'content' attribute
Parameters
token The token identifying the current user
userInfo A RemoteUserInformation object, containing the username, email, fullname, url and information

public boolean setUserPreferenceBoolean (String token, String username, String key, boolean value)

Set a user preference to a boolean value.

Parameters
token the token identifying the current user
key The user preference key
value The value

public boolean setUserPreferenceLong (String token, String username, String key, long value)

Set a user preference to an long integer value.

Parameters
token the token identifying the current user
key The user preference key
value The value

public boolean setUserPreferenceString (String token, String username, String key, String value)

Set a user preference to a String value.

Parameters
token the token identifying the current user
key The user preference key
value The value

public void setWikiToXhtmlMigrator (ExceptionTolerantMigrator wikiToXhtmlMigrator)

public void setXhtmlSoapService (ConfluenceSoapService soapService)

public RemoteSpace storeSpace (String token, RemoteSpace remoteSpace)

Allows for modifying space details via the remote API. Currently you can update the following space properties:

  • Name
  • Homepage
  • SpaceGroup
    • @return

public boolean watchPage (String token, long pageId)

Adds a watch for the current user on the page or blog post with the specified page ID.

Returns
  • true if the watch was added, or false if it already exists

public boolean watchPageForUser (String token, long pageId, String username)

Adds a watch to a specific page or blog post for a particular user. This is only permitted for administrators of the space containing the page or blog post.

Returns
  • true if the watch was added, or false if it already exists

public boolean watchSpace (String token, String spaceKey)

Adds a watch for the current user on the space with the specified space key.

Returns
  • true if the watch was added, or false if it already exists