Interface ConfluenceSoapService
- All Superinterfaces:
SecureRpc
- All Known Implementing Classes:
WikiSoapService
,XhtmlSoapService
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addAnonymousPermissionsToSpace
(String token, String[] permissions, String spaceKey) Add Space Permissions for anonymous usersboolean
addAnonymousPermissionToSpace
(String token, String permission, String spaceKey) Add a Space Permission for anonymous usersboolean
addAnonymousUsePermission
(String token) boolean
This permission can only be set if the anonymous user already has 'use' permission.addAttachment
(String token, long contentId, RemoteAttachment attachment, byte[] attachmentData) Add a new attachment to a ContentEntityObject.addComment
(String token, RemoteComment comment) Adds a comment to a page or blog postboolean
addGlobalPermission
(String token, String permission, String remoteEntityName) Add global permissions for a user or groupboolean
addGlobalPermissions
(String token, String[] permissions, String remoteEntityName) Add a global permission for a user or groupboolean
Adds a new groupboolean
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
addPermissionsToSpace
(String token, String[] permissions, String remoteEntityName, String spaceKey) Add Space Permissions for a user or groupboolean
addPermissionToSpace
(String token, String permission, String remoteEntityName, String spaceKey) Add a Space Permission for a user or groupaddPersonalSpace
(String token, RemoteSpace space, String username) addPersonalSpaceWithDefaultPermissions
(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 profileaddSpace
(String token, RemoteSpace space) addSpaceGroup
(String token, RemoteSpaceGroup spaceGroup) Deprecated.since 5.9.addSpaceWithDefaultPermissions
(String token, RemoteSpace space) void
addUser
(String token, RemoteUser remoteUser, String password) Adds a user with the given RemoteUser object and passwordvoid
addUser
(String token, RemoteUser remoteUser, String password, boolean notifyUser) Adds a user with the given RemoteUser object and passwordboolean
addUserToGroup
(String token, String username, String groupname) boolean
changeMyPassword
(String token, String oldPass, String newPass) Change the current user's passwordboolean
changeUserPassword
(String token, String username, String newPass) Change a user's passwordboolean
clearIndexQueue
(String token) 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 usereditComment
(String token, RemoteComment comment) Updates a commentboolean
editUser
(String token, RemoteUser remoteUser) Edits a user with the values in the given RemoteUser objectemptyTrash
(String token, String spaceKey) exportSite
(String token, boolean exportAttachments) exportSpace
(String token, String spaceKey, String exportType) 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 usersgetAncestors
(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.getAttachment
(String token, long contentId, String fileName, int version) Retrieve information about an attachment.byte[]
getAttachmentData
(String token, long contentId, String fileName, int version) Retrieve the contents of an attachment.getAttachments
(String token, long pageId) getBlogEntries
(String token, String spaceKey) getBlogEntry
(String token, long entryId) 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.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'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.getClusterInformation
(String token) getClusterNodeStatuses
(String token) getComment
(String token, long commentId) Retrieves a comment with the given IDgetComments
(String token, long pageId) Retrieves the comments for a given abstract pagegetContentPermissionSet
(String token, long contentId, String permissionType) Get the content permission set of a certain type for a particular piece of contentgetContentPermissionSets
(String token, long contentId) Get the content permission sets for a particular piece of contentgetDescendents
(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[]
Retrieves a list of user groupsgetLabelContentById
(String token, long labelId) Returns the content for a given label IDgetLabelContentByName
(String token, String labelName) Returns the content for a given label namegetLabelContentByObject
(String token, RemoteLabel labelObject) Returns the content for a given label objectRetrieves the labels matching the given labelName, namespace or owner.getLabelsById
(String token, long objectId) Returns all labels for the given ContentEntityObject ID.getMostPopularLabels
(String token, int maxCount) Returns the most popular labels for the Confluence instance, with a specified maximum number of results.getMostPopularLabelsInSpace
(String token, String spaceKey, int maxCount) Returns the most popular labels for the given spaceKey, with a specified maximum number of results.getPageHistory
(String token, long pageId) getPagePermissions
(String token, long pageId) Returns all pages of the space with the given spaceKey the user authenticated by token is allowed to view.getPageSummary
(String token, long pageId) getPageSummary
(String token, String spaceKey, String pageTitle) String[]
getPermissions
(String token, String spaceKey) String[]
getPermissionsForUser
(String token, String spaceKey, String userName) getRecentlyUsedLabels
(String token, int maxResults) Returns the recently used labels for the Confluence instance, with a specified maximum number of results.getRecentlyUsedLabelsInSpace
(String token, String spaceKey, int maxResults) Returns the recently used labels for the given spaceKey, with a specified maximum number of results.getRelatedLabels
(String token, String labelName, int maxResults) Returns the labels related to the given label name, with a specified maximum number of results.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.getServerInfo
(String token) getSpaceGroup
(String token, String spaceGroup) Deprecated.since 5.9.getSpaceGroups
(String token) Deprecated.since 5.9.String[]
getSpaceLevelPermissions
(String token) getSpacePermissionSet
(String token, String spaceKey, String permissionType) getSpacePermissionSets
(String token, String spaceKey) getSpacesContainingContentWithLabel
(String token, String labelName) Returns all Spaces that have content labelled with labelNamegetSpacesInGroup
(String token, String spaceGroupKey) getSpaceStatus
(String token, String spaceKey) getSpacesWithLabel
(String token, String labelName) Returns an array of Spaces that have been labelled with labelNamegetTopLevelPages
(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.getTrashContents
(String token, String spaceKey, int offset, int count) getUserByKey
(String token, String userKey) Retrieves a user with the given user key.getUserByName
(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 togetUserInformation
(String token, String username) Retrieves a user's informationboolean
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.getUserPreferenceString
(String token, String username, String key) Get a user preference as a String value.getWatchersForPage
(String token, long pageId) Returns the list of users watching the page or blog post with the given ID.getWatchersForSpace
(String token, String spaceKey) Returns the list of users watching the space with the given key.boolean
Determines whether a group existsboolean
Determines whether a user existsboolean
importSpace
(String token, byte[] importData) Import a space in a compressed XML formatboolean
installPlugin
(String token, String pluginFileName, byte[] pluginData) Installs a plugin.boolean
isActiveUser
(String token, String username) Checks if a given user is active.boolean
isDarkFeatureEnabled
(String token, String key) 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.boolean
boolean
moveAttachment
(String token, long originalContentId, String originalFileName, long newContentId, String newFileName) Move or rename an attachmentmovePageToTopLevel
(String token, long pageId, String targetSpaceKey) performBackup
(String token, boolean exportAttachments) purgeFromTrash
(String token, String spaceKey, long pageId) boolean
reactivateUser
(String token, String username) Reactivates the given userboolean
recoverMainIndex
(String token) default boolean
refreshIndex
(String token) Refresh the index immediately, which publishes its most recent changes and makes them available for searching.boolean
removeAllPermissionsForGroup
(String token, String groupname) Deletes all global and space permissions for the given groupboolean
removeAnonymousPermissionFromSpace
(String token, String permission, String spaceKey) Removes a Space Permission for anonymous usersboolean
Remove anonymous use permission.boolean
boolean
removeAttachment
(String token, long contentId, String fileName) Remove an attachment.boolean
removeComment
(String token, long commentId) Removes a comment with the given IDboolean
removeGlobalPermission
(String token, String permission, String remoteEntityName) Remove a global permissionboolean
removeGroup
(String token, String groupname, String defaultGroupName) Removes an existing groupboolean
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 Spaceboolean
removeLabelByObject
(String token, RemoteLabel labelObject, long objectId) Removes the given label object from the object with the given ContentEntityObject ID.removePage
(String token, long pageId) removePageVersionById
(String token, long historicalPageId) Remove a historical version of a page.removePageVersionByVersion
(String token, long pageId, int version) Remove the identified version of a page.boolean
removePageWatch
(String token, long pageId) Remove a watch for the current user on the page or blog post with the specified page ID.boolean
removePageWatchForUser
(String token, long pageId, String username) Removes a watch from a specific page or blog post for a particular user.boolean
removePermissionFromSpace
(String token, String permission, String remoteEntityName, String spaceKey) Removes a Space Permission for a user or groupremoveSpace
(String token, String spaceKey) boolean
removeSpaceGroup
(String token, String spaceGroupKey) Deprecated.since 5.9.boolean
removeSpaceWatch
(String token, String spaceKey) Removes a watch for the current user on the space with the specified space key.boolean
removeUser
(String token, String username) Removes a user with the given usernameboolean
removeUserFromGroup
(String token, String username, String groupname) Removes the given user from a groupboolean
renameUser
(String token, String oldUsername, String newUsername) Change user's usernameString[]
renameUsers
(String token, Map<String, String> oldUsernamesToNewUsernames) Change usernames for a set of usersrenderContent
(String token, String spaceKey, long pageId, String newContent) renderContent
(String token, String spaceKey, long pageId, String newContent, Map renderParameters) Search Confluence for the supplied query String.Search Confluence for the supplied query String.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) setSpaceStatus
(String token, String spaceKey, String status) boolean
setUserInformation
(String token, RemoteUserInformation userInfo) Updates a user's informationboolean
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.boolean
startActivity
(String token, String key, String user) Call startActivity on the heartbeat manager beanboolean
stopActivity
(String token, String key, String user) Call stopActivity on the heartbeat manager beanstoreBlogEntry
(String token, RemoteBlogEntry blogEntry) storePage
(String token, RemotePage page) storeSpace
(String token, RemoteSpace remoteSpace) Allows for modifying space details via the remote API.updatePage
(String token, RemotePage page, RemotePageUpdateOptions options) boolean
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.
-
Field Details
-
VIEW_PERMISSION
- See Also:
-
MODIFY_PERMISSION
- See Also:
-
COMMENT_PERMISSION
- See Also:
-
ADMIN_SPACE_PERMISSION
- See Also:
-
-
Method Details
-
login
- Specified by:
login
in interfaceSecureRpc
- Throws:
RemoteException
-
logout
- Specified by:
logout
in interfaceSecureRpc
- Throws:
RemoteException
-
getSpaces
- Throws:
RemoteException
-
getSpacesInGroup
- Throws:
RemoteException
-
addSpaceWithDefaultPermissions
- Throws:
RemoteException
-
addSpace
- Throws:
RemoteException
-
storeSpace
Allows for modifying space details via the remote API. Currently you can update the following space properties:- Name
- Homepage
- SpaceGroup
- Parameters:
remoteSpace
-- Returns:
- the updated space
- Throws:
RemoteException
-
addSpaceGroup
@Deprecated RemoteSpaceGroup addSpaceGroup(String token, RemoteSpaceGroup spaceGroup) throws RemoteException Deprecated.since 5.9.SpaceGroup
and related classes likeSpaceGroupManager
andSpaceGroupComparator
will be removed. Please do not use them.Add a space Group to Confluence- Parameters:
token
- the authentication tokenspaceGroup
- the spacegroup to add- Returns:
- the space group
- Throws:
NotPermittedException
- if the user lacks permissions to perform the actionInvalidSessionException
AlreadyExistsException
- if a group with the same key already existsRemoteException
-
getSpaceGroup
Deprecated.since 5.9.SpaceGroup
and related classes likeSpaceGroupManager
andSpaceGroupComparator
will be removed. Please do not use them.- Throws:
RemoteException
-
getSpaceGroups
Deprecated.since 5.9.SpaceGroup
and related classes likeSpaceGroupManager
andSpaceGroupComparator
will be removed. Please do not use them.- Throws:
RemoteException
-
removeSpaceGroup
Deprecated.since 5.9.SpaceGroup
and related classes likeSpaceGroupManager
andSpaceGroupComparator
will be removed. Please do not use them.Removes a Space Group from Confluence without removing the space it contains. Currently requires global administration rights- Parameters:
token
- the authentication tokenspaceGroupKey
- the id of the spacegroup to be removed- Returns:
- true, if the space group was removed
- Throws:
RemoteException
-
addPersonalSpace
RemoteSpace addPersonalSpace(String token, RemoteSpace space, String username) throws RemoteException - Throws:
RemoteException
-
addPersonalSpaceWithDefaultPermissions
RemoteSpace addPersonalSpaceWithDefaultPermissions(String token, RemoteSpace space, String username) throws RemoteException - Throws:
RemoteException
-
removeSpace
- Throws:
RemoteException
-
getSpace
- Throws:
RemoteException
-
getSpaceStatus
- Throws:
RemoteException
-
setSpaceStatus
- Throws:
RemoteException
-
getPermissions
- Throws:
RemoteException
-
getPermissionsForUser
String[] getPermissionsForUser(String token, String spaceKey, String userName) throws RemoteException - Throws:
RemoteException
-
getSpacePermissionSets
RemoteSpacePermissionSet[] getSpacePermissionSets(String token, String spaceKey) throws RemoteException - Throws:
RemoteException
-
getSpacePermissionSet
RemoteSpacePermissionSet getSpacePermissionSet(String token, String spaceKey, String permissionType) throws RemoteException - Throws:
RemoteException
-
addPermissionToSpace
boolean addPermissionToSpace(String token, String permission, String remoteEntityName, String spaceKey) throws RemoteException Add a Space Permission for a user or group- Parameters:
token
- the authentication tokenpermission
- the Space Permission to addremoteEntityName
- the name of the user or groupspaceKey
- the key of the Space affected by this action- Returns:
- True if successful, false otherwise
- Throws:
RemoteException
- if the Space Permission is nullRemoteException
- if the Space does not existNotPermittedException
- if the user lacks permissions to perform the actionRemoteException
- if the remoteEntityName is null or does not match a user or group
-
addPermissionsToSpace
boolean addPermissionsToSpace(String token, String[] permissions, String remoteEntityName, String spaceKey) throws RemoteException Add Space Permissions for a user or group- Parameters:
token
- the authentication tokenpermissions
- the Space Permissions to addremoteEntityName
- the name of the user or groupspaceKey
- the key of the Space affected by this action- Returns:
- True if successful, false otherwise
- Throws:
RemoteException
- if the Space Permissions array is nullRemoteException
- if the Space does not existNotPermittedException
- if the user lacks permissions to perform the actionRemoteException
- if the remoteEntityName is null or does not match a user or group- Since:
- 2.0
-
removePermissionFromSpace
boolean removePermissionFromSpace(String token, String permission, String remoteEntityName, String spaceKey) throws RemoteException Removes a Space Permission for a user or group- Parameters:
token
- the authentication tokenpermission
- the Space Permission to removeremoteEntityName
- the name of the user or groupspaceKey
- the key of the Space affected by this action- Returns:
- True if successful, false otherwise
- Throws:
RemoteException
- if the Space does not existNotPermittedException
- if the user lacks permissions to perform the actionRemoteException
- if the remoteEntityName is null or does not match a user or group
-
addAnonymousPermissionToSpace
boolean addAnonymousPermissionToSpace(String token, String permission, String spaceKey) throws RemoteException Add a Space Permission for anonymous users- Parameters:
token
- the authentication tokenpermission
- the Space Permission to addspaceKey
- the key of the Space affected by this action- Returns:
- True if successful, false otherwise
- Throws:
RemoteException
- if the Space Permission is nullRemoteException
- if the Space does not existNotPermittedException
- if the user lacks permissions to perform the actionRemoteException
- if the remoteEntityName is null or does not match a user or group- Since:
- 2.0
-
addAnonymousPermissionsToSpace
boolean addAnonymousPermissionsToSpace(String token, String[] permissions, String spaceKey) throws RemoteException Add Space Permissions for anonymous users- Parameters:
token
- the authentication tokenpermissions
- the Space Permissions to addspaceKey
- the key of the Space affected by this action- Returns:
- True if successful, false otherwise
- Throws:
RemoteException
- if the Space Permissions array is nullRemoteException
- if the Space does not existNotPermittedException
- if the user lacks permissions to perform the actionRemoteException
- if the remoteEntityName is null or does not match a user or group- Since:
- 2.0
-
removeAnonymousPermissionFromSpace
boolean removeAnonymousPermissionFromSpace(String token, String permission, String spaceKey) throws RemoteException Removes a Space Permission for anonymous users- Parameters:
token
- the authentication tokenpermission
- the Space Permission to removespaceKey
- the key of the Space affected by this action- Returns:
- True if successful, false otherwise
- Throws:
RemoteException
- if the Space does not existNotPermittedException
- if the user lacks permissions to perform the actionRemoteException
- if the remoteEntityName is null or does not match a user or group- Since:
- 2.0
-
getPagePermissions
- Throws:
RemoteException
-
getSpaceLevelPermissions
- Throws:
RemoteException
-
getPages
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 tokenspaceKey
- the key of the space which pages are to be returned- Throws:
RemoteException
-
getPage
- Throws:
RemoteException
-
getPageSummary
RemotePageSummary getPageSummary(String token, String spaceKey, String pageTitle) throws RemoteException - Throws:
RemoteException
-
getPage
- Throws:
RemoteException
-
getPageSummary
- Throws:
RemoteException
-
storePage
- Throws:
RemoteException
-
updatePage
RemotePage updatePage(String token, RemotePage page, RemotePageUpdateOptions options) throws RemoteException - Throws:
RemoteException
-
movePageToTopLevel
- Throws:
RemoteException
-
movePage
Boolean movePage(String token, long sourcePageId, long targetPageId, String position) throws RemoteException - Throws:
RemoteException
-
removePage
- Throws:
RemoteException
-
removePageVersionById
Remove a historical version of a page. The id supplied must identify a historical version of a page rather than the latest version of the page. If you want to remove the latest version of a page and its full version history then seeremovePage(String, long)
.- Parameters:
token
-historicalPageId
- the id of a historical version of a page- Returns:
- true if successfully remove, otherwise false.
- Throws:
NotPermittedException
InvalidSessionException
RemoteException
-
removePageVersionByVersion
Remove the identified version of a page. The pageId must identify a current page.- Parameters:
token
-pageId
- the id of the page which you want to remove a version from.version
- the version of the page to be removed (with 1 being the first).- Returns:
- true if successful; otherwise false.
- Throws:
NotPermittedException
InvalidSessionException
RemoteException
-
getTrashContents
RemoteContentSummaries getTrashContents(String token, String spaceKey, int offset, int count) throws RemoteException - Throws:
RemoteException
-
purgeFromTrash
- Throws:
RemoteException
-
emptyTrash
- Throws:
RemoteException
-
getTopLevelPages
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 tokenspaceKey
- the key of the space which pages are to be returned- Throws:
RemoteException
-
getAncestors
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 tokenpageId
- the id of the page which child pages are to be returned- Throws:
RemoteException
-
getChildren
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 tokenpageId
- the id of the page which child pages are to be returned- Throws:
RemoteException
-
getDescendents
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 tokenpageId
- the id of the page which child pages are to be returned- Throws:
RemoteException
-
getAttachments
- Throws:
RemoteException
-
getPageHistory
- Throws:
RemoteException
-
watchPage
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
- Throws:
RemoteException
- if the watch could not be added
-
watchSpace
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
- Throws:
RemoteException
- if the watch could not be added
-
watchPageForUser
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
- Throws:
RemoteException
- if the watch could not be added, or the current user does not have permission to add it
-
removePageWatch
Remove a watch for the current user on the page or blog post with the specified page ID.- Returns:
- true if the watch was removed, or false if it doesn't exist
- Throws:
RemoteException
- if the watch could not be removed
-
removeSpaceWatch
Removes a watch for the current user on the space with the specified space key.- Returns:
- true if the watch was remove, or false if it doesn't exist
- Throws:
RemoteException
- if the watch could not be removed
-
removePageWatchForUser
Removes a watch from 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 removed, or false if it doesn't exist
- Throws:
RemoteException
- if the watch could not be removed, or the current user does not have permission to remove it
-
isWatchingPage
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
- Throws:
RemoteException
- if the current user does not have permission to see the page or administer the space, or if the page or user does not exist
-
isWatchingSpace
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
- Throws:
RemoteException
- if the current user does not have permission to administer the space, or if the user does not exist
-
isWatchingSpaceForType
boolean isWatchingSpaceForType(String token, String spaceKey, String contentType, String username) throws RemoteException 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
- Throws:
RemoteException
- if the current user does not have permission to administer the space, or if the user does not exist
-
getWatchersForPage
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
- Throws:
RemoteException
- if the current user does not have permission to see the page or administer the space, or if the page does not exist
-
getWatchersForSpace
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
- Throws:
RemoteException
- if the current user does not have permission to administer the space, or if the space does not exist
-
renderContent
String renderContent(String token, String spaceKey, long pageId, String newContent) throws RemoteException - Throws:
RemoteException
-
renderContent
String renderContent(String token, String spaceKey, long pageId, String newContent, Map renderParameters) throws RemoteException - Throws:
RemoteException
-
convertWikiToStorageFormat
Converts a string from wiki markup to the XHTML based storage format.- Returns:
- a string converted to the storage format
- Throws:
RemoteException
-
addAttachment
RemoteAttachment addAttachment(String token, long contentId, RemoteAttachment attachment, byte[] attachmentData) throws RemoteException Add a new attachment to a ContentEntityObject.- Parameters:
token
- the authentication tokencontentId
- the id of the ContentEntityObject to receive the new attachment.attachment
- RemoteAttachment object containing attachment informationattachmentData
- a byte[] continaing the contents of the attachment.- Returns:
- the newly created attachment
- Throws:
RemoteException
- Since:
- 2.0
-
getAttachment
RemoteAttachment getAttachment(String token, long contentId, String fileName, int version) throws RemoteException Retrieve information about an attachment.- Parameters:
token
- the authentication token.contentId
- 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
- Throws:
RemoteException
- Since:
- 2.0
-
getAttachmentData
byte[] getAttachmentData(String token, long contentId, String fileName, int version) throws RemoteException Retrieve the contents of an attachment.- Parameters:
token
- the authentication token.contentId
- 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
- Throws:
RemoteException
- Since:
- 2.0
-
removeAttachment
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.
- Throws:
RemoteException
- Since:
- 2.0
-
moveAttachment
boolean moveAttachment(String token, long originalContentId, String originalFileName, long newContentId, String newFileName) throws RemoteException 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
- Throws:
RemoteException
- Since:
- 2.0
-
getComments
Retrieves the comments for a given abstract page- Parameters:
token
- the authentication tokenpageId
- the content ID of the abstract page- Returns:
- RemoteComment object with the comment details
- Throws:
InvalidSessionException
RemoteException
- if the object for the pageId is null, or the user lacks permissions
-
getComment
Retrieves a comment with the given ID- Parameters:
token
- The token identifying the current usercommentId
- The ID of the comment to be retrieved- Returns:
- A RemoteComment object containing the comment information
- Throws:
InvalidSessionException
RemoteException
- if the comment cannot be foundRemoteException
- if the comment cannot be viewed by the userRemoteException
- if the page the comment is on cannot be viewed by the userRemoteException
- if the retrieved object is not a comment- Since:
- 2.0
-
addComment
Adds a comment to a page or blog post- Parameters:
token
- The token identifying the current usercomment
- The RemoteComment object containing the comment information- Returns:
- RemoteComment object
- Throws:
InvalidSessionException
RemoteException
- if the user does not have permission to view the page the comment is being posted to, or it does not existNotPermittedException
- if the user is unable to post the comment- Since:
- 2.0
-
editComment
Updates a comment- Parameters:
token
- The token identifying the current usercomment
- The RemoteComment object containing the comment information- Returns:
- RemoteComment object
- Throws:
InvalidSessionException
RemoteException
- if the user does not have permission to view the page the comment is being posted to, or it does not existNotPermittedException
- if the user is unable to edit the comment- Since:
- 2.4
-
removeComment
Removes a comment with the given ID- Parameters:
token
- The token identifying the current usercommentId
- The ID of the comment to remove- Returns:
- True if successful, false otherwise
- Throws:
InvalidSessionException
RemoteException
- if the user does not have permission to view the page the comment is on, or it does not existRemoteException
- if the comment does not existNotPermittedException
- if the user does not have permission to remove the comment- Since:
- 2.0
-
search
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 tokenquery
- the query term for the searchmaxResults
- the maximum number of results to be returned.- Returns:
- an array of
RemoteSearchResult
s. If there are no results then an empty array will be returned. - Throws:
RemoteException
-
search
RemoteSearchResult[] search(String token, String query, Map params, int maxResults) throws RemoteException 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.
- Parameters:
token
- the authentication tokenparams
- aMap<String,String>
providing criteria to the search.query
- the query term for the searchmaxResults
- the maximum number of results to be returned.- Returns:
- an array of
RemoteSearchResult
s. If there are no results then an empty array will be returned. - Throws:
RemoteException
-
getBlogEntryByDayAndTitle
RemoteBlogEntry getBlogEntryByDayAndTitle(String token, String spaceKey, int dayOfMonth, String postTitle) throws RemoteException 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 tokenspaceKey
- the key of the Space the blog post belongs todayOfMonth
- the day of the month the blog post was madepostTitle
- the title of the blog post- Returns:
- A RemoteBlogEntry object
- Throws:
RemoteException
- if the user does not have permission to view the blog post, or it does not exist- Since:
- 2.0
-
getBlogEntryByDateAndTitle
RemoteBlogEntry getBlogEntryByDateAndTitle(String token, String spaceKey, int year, int month, int dayOfMonth, String postTitle) throws RemoteException Retrieves a blog post in the given space, with the title and date as specified.- Returns:
- a blog post matching the criteria
- Throws:
RemoteException
- if the user does not have permission to view the blog post or it does not exist
-
getBlogEntry
- Throws:
RemoteException
-
getBlogEntries
- Throws:
RemoteException
-
storeBlogEntry
- Throws:
RemoteException
-
getServerInfo
- Throws:
RemoteException
-
exportSpace
- Throws:
RemoteException
-
exportSpace
String exportSpace(String token, String spaceKey, String exportType, boolean exportAll) throws RemoteException - Throws:
RemoteException
-
exportSite
- Throws:
RemoteException
-
performBackup
- Throws:
RemoteException
-
importSpace
Import a space in a compressed XML format- Parameters:
token
- The authentication tokenimportData
- The contents of the Space export file- Returns:
- True if successful, otherwise false
- Throws:
RemoteException
- If the space exists or the export file is invalid- Since:
- 2.4
-
flushIndexQueue
- Throws:
RemoteException
-
clearIndexQueue
- Throws:
RemoteException
-
recoverMainIndex
- Throws:
RemoteException
-
getClusterInformation
- Throws:
RemoteException
-
getClusterNodeStatuses
- Throws:
RemoteException
-
getGroups
Retrieves a list of user groups- Parameters:
token
- The token identifying the current user- Returns:
- An array of group names
- Throws:
NotPermittedException
- if the current user lacks permission to administerRemoteException
-
hasGroup
Determines whether a group exists- Parameters:
token
- the token identifying the current usergroupname
- the group to look up- Returns:
- True if the user exists, false otherwise
- Throws:
InvalidSessionException
RemoteException
- Since:
- 2.0
-
addGroup
Adds a new group- Parameters:
token
- The token identifying the current usergroupname
- The name of the group to be added- Returns:
- True when the group was successfully added, false if it already exists
- Throws:
NotPermittedException
- if the current user lacks permission to administerInvalidSessionException
RemoteException
-
removeGroup
Removes an existing groupIf a valid defaultGroupName is specified, users will be added to the new group (defaultGroupName).
- Parameters:
token
- The token identifying the current usergroupname
- The name of the group to be removeddefaultGroupName
- The name of the group that users will be moved to- Returns:
- True if successful, false otherwise.
- Throws:
NotPermittedException
- if the current user lacks permission to administerInvalidSessionException
RemoteException
- if the given groupname does not existRemoteException
- if the given defaultGroupName does not exist
-
removeAllPermissionsForGroup
Deletes all global and space permissions for the given group- Parameters:
token
- The token identifying the current usergroupname
- The group to delete permissions for- Returns:
- True if successful, false otherwise.
- Throws:
NotPermittedException
- if the current user lacks permission to administerRemoteException
- if the given groupname does not exist
-
getUserGroups
Retrieves the groups that a given user belongs to- Parameters:
token
- The token identifying the current userusername
- The username to retrieve groups for- Returns:
- An array of group names as Strings
- Throws:
NotPermittedException
- if the current user lacks permission to administerInvalidSessionException
RemoteException
- if the given username does not exist
-
addUserToGroup
- Parameters:
token
-username
-groupname
-- Returns:
- True if successful, false otherwise
- Throws:
NotPermittedException
- if the current user lacks permission to administerInvalidSessionException
RemoteException
- if the given username does not existRemoteException
- if the given groupname does not exist
-
removeUserFromGroup
Removes the given user from a group- Parameters:
token
- The token identifying the current userusername
- The username to remove from a groupgroupname
- The name of the group the user is to be removed from- Returns:
- True if successful, false otherwise
- Throws:
NotPermittedException
- if the current user lacks permission to administerInvalidSessionException
RemoteException
- if the given username does not existRemoteException
- if the given groupname does not exist
-
getUserByName
Retrieves a user with the given username.- Parameters:
token
- The token identifying the current userusername
- The username of the user to be retrieved- Returns:
- A RemoteConfluenceUser object, containing the user key, username, full name, email and URL
- Throws:
InvalidSessionException
RemoteException
- if a user with the given username cannot be found- Since:
- 5.2
-
getUserByKey
Retrieves a user with the given user key.- Parameters:
token
- The token identifying the current useruserKey
- The user key of the user to be retrieved- Returns:
- A RemoteUser object, containing the user key, username, full name, email and URL
- Throws:
InvalidSessionException
RemoteException
- if a user with the given user key cannot be found- Since:
- 5.2
-
setUserPreferenceBoolean
boolean setUserPreferenceBoolean(String token, String username, String key, boolean value) throws RemoteException Set a user preference to a boolean value.- Parameters:
token
- the token identifying the current userkey
- The user preference keyvalue
- The value- Throws:
InvalidSessionException
- If the rpc token expiredRemoteException
- If any other exception occurred
-
getUserPreferenceBoolean
Get a user preference as a boolean value.- Parameters:
token
- the token identifying the current userkey
- The user preference key- Throws:
InvalidSessionException
- If the rpc token expiredRemoteException
- If any other exception occurred (including not being able to find the key)
-
setUserPreferenceLong
boolean setUserPreferenceLong(String token, String username, String key, long value) throws RemoteException Set a user preference to an long integer value.- Parameters:
token
- the token identifying the current userkey
- The user preference keyvalue
- The value- Throws:
InvalidSessionException
- If the rpc token expiredRemoteException
- If any other exception occurred
-
getUserPreferenceLong
Get a user preference as a long integer value.- Parameters:
token
- the token identifying the current userkey
- The user preference key- Throws:
InvalidSessionException
- If the rpc token expiredRemoteException
- If any other exception occurred (including not being able to find the key)
-
setUserPreferenceString
boolean setUserPreferenceString(String token, String username, String key, String value) throws RemoteException Set a user preference to a String value.- Parameters:
token
- the token identifying the current userkey
- The user preference keyvalue
- The value- Throws:
InvalidSessionException
- If the rpc token expiredRemoteException
- If any other exception occurred
-
getUserPreferenceString
Get a user preference as a String value.- Parameters:
token
- the token identifying the current userkey
- The user preference key- Throws:
InvalidSessionException
- If the rpc token expiredRemoteException
- If any other exception occurred (including not being able to find the key)
-
hasUser
Determines whether a user exists- Parameters:
token
- the token identifying the current userusername
- the username to look up- Returns:
- True if the user exists, false otherwise
- Throws:
InvalidSessionException
RemoteException
- Since:
- 2.0
-
addUser
Adds a user with the given RemoteUser object and password- Parameters:
token
- The token identifying the current userremoteUser
- The object containing the user informationpassword
- The password of the user- Throws:
NotPermittedException
- if the current user lacks permissions to create new usersInvalidSessionException
RemoteException
- if a user with the given username cannot be found
-
addUser
void addUser(String token, RemoteUser remoteUser, String password, boolean notifyUser) throws RemoteException Adds a user with the given RemoteUser object and password- Parameters:
token
- The token identifying the current userremoteUser
- The object containing the user informationpassword
- The password of the usernotifyUser
- Whether or not you want the new user to be notified of their new account- Throws:
NotPermittedException
- if the current user lacks permissions to create new usersInvalidSessionException
RemoteException
- if a user with the given username cannot be found
-
removeUser
Removes a user with the given username- Parameters:
token
- The token identifying the current userusername
- The username of the user to be removed- Returns:
- True if successful, false otherwise
- Throws:
InvalidSessionException
NotPermittedException
- if the current user lacks the permission to remove usersRemoteException
- if the given username cannot be foundRemoteException
- if the user has authored content
-
editUser
Edits a user with the values in the given RemoteUser objectCurrently this will only update the user's full name and email
- Parameters:
token
- The token identifying the current userremoteUser
- The object containing the user information- Throws:
NotPermittedException
- if the current user cannot administer users or is not the actual userInvalidSessionException
RemoteException
- if a user with the given username cannot be found- Since:
- 2.0
-
deactivateUser
Deactivates the given user- Parameters:
token
- The token identifying the current userusername
- The username of the user to deactivate- Returns:
- True if the user was successfully deactivated, false otherwise
- Throws:
NotPermittedException
- if the current user does not have permissions to perform the actionInvalidSessionException
RemoteException
- if the given username cannot be foundRemoteException
- if the user has already been deactivated- Since:
- 2.0
-
reactivateUser
Reactivates the given user- Parameters:
token
- The token identifying the current userusername
- The username of the user to reactivate- Returns:
- True if the user was successfully reactivated, false otherwise
- Throws:
NotPermittedException
- if the current user does not have permissions to perform the actionInvalidSessionException
RemoteException
- if the given username cannot be foundRemoteException
- if the user is already active- Since:
- 2.0
-
isActiveUser
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.
- Throws:
RemoteException
- If the username does not exist
-
getActiveUsers
Returns a list of the current system users- Parameters:
token
- The token identifying the current userviewAll
- Whether all users should be shown. When it is false, all users in the default users group will be returned. Otherwise, every registered user is returned.- Returns:
- An array of usernames as Strings
- Throws:
NotPermittedException
- if the current user does not have administration permissionsInvalidSessionException
RemoteException
- Since:
- 2.0
-
setUserInformation
Updates a user's informationCurrently this will only update a user's "description", stored in the 'content' attribute
- Parameters:
token
- The token identifying the current useruserInfo
- A RemoteUserInformation object, containing the username, email, fullname, url and information- Throws:
NotPermittedException
- if the current user cannot administer users or is not the actual userInvalidSessionException
RemoteException
- if there was an error saving the personal information- Since:
- 2.0
-
getUserInformation
Retrieves a user's information- Parameters:
token
- The token identifying the current userusername
- The name of the user to get information on- Throws:
InvalidSessionException
RemoteException
- if a user with the given username cannot be found- Since:
- 2.0
-
changeMyPassword
Change the current user's password- Parameters:
token
- The token identifying the current useroldPass
- The old password of the user, required for security purposesnewPass
- The new password for the user- Throws:
NotPermittedException
- if newPass was incorrectInvalidSessionException
RemoteException
- if oldPass does not match the user's passwordRemoteException
- if newPass is null or an empty StringRemoteException
- if there are problems setting the password in the UserAccessor- Since:
- 2.0
-
changeUserPassword
Change a user's password- Parameters:
token
- The token identifying the current userusername
- The username of the user we are changing the password fornewPass
- The new password for the user- Throws:
NotPermittedException
- if the current user does not have permission to administer the userInvalidSessionException
RemoteException
- if the user cannot be foundRemoteException
- if newPass is null or an empty StringRemoteException
- if there are problems setting the password in the UserAccessor- Since:
- 2.0
-
addProfilePicture
boolean addProfilePicture(String token, String userName, String fileName, String mimeType, byte[] pictureData) throws RemoteException Add a profile picture to a user's profile- Parameters:
userName
- The user name of the profilefileName
- File name of the picturemimeType
- Image mime type (must be from image/*)pictureData
- The image data- Returns:
- true if successful
- Throws:
NotPermittedException
- Principal is not permitted to add pictures to the specified profileInvalidSessionException
RemoteException
- if the user can not be foundRemoteException
- if the mimeType is not from image/*RemoteException
- if the image can not be processed- Since:
- 2.2
-
renameUser
Change user's username- Parameters:
token
- The token identifying the current useroldUsername
- current username of the usernewUsername
- new username of the user- Returns:
- true if successful
- Throws:
NotPermittedException
- if the current user does not have permissions to perform the actionInvalidSessionException
RemoteException
- if the new username does not meet username requirementsRemoteException
- if the user could not be renamed- Since:
- 5.2
-
renameUsers
String[] renameUsers(String token, Map<String, String> oldUsernamesToNewUsernames) throws RemoteExceptionChange usernames for a set of users- Parameters:
token
- The token identifying the current useroldUsernamesToNewUsernames
- mapping of current usernames to new usernames of users- Returns:
- empty array if the operation was successful or usernames of users that could not be renamed
- Throws:
NotPermittedException
- if the current user does not have permissions to perform the actionInvalidSessionException
RemoteException
- if a new username does not meet username requirementsRemoteException
- if a user could not be renamed- Since:
- 5.2
-
getLabelsById
Returns all labels for the given ContentEntityObject ID.- Parameters:
token
- The token identifying the current userobjectId
- The ID of the ContentEntityObject the method will retrieve the labels for- Returns:
- An array of RemoteLabel objects
- Throws:
RemoteException
- if the object cannot be retrieved from the ContentEntityManagerRemoteException
- if the given user does not have VIEW permissions for the object- Since:
- 2.0
-
getMostPopularLabels
Returns the most popular labels for the Confluence instance, with a specified maximum number of results.- Parameters:
token
- The token identifying the current usermaxCount
- 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
- Throws:
RemoteException
- Since:
- 2.0
-
getMostPopularLabelsInSpace
RemoteLabel[] getMostPopularLabelsInSpace(String token, String spaceKey, int maxCount) throws RemoteException Returns the most popular labels for the given spaceKey, with a specified maximum number of results.- Parameters:
token
- The token identifying the current userspaceKey
- The key of the space to limit the labels tomaxCount
- 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
- Throws:
RemoteException
- if the space cannot be retrieved from the SpaceManagerNotPermittedException
- if the given user does not have VIEW permissions for the space- Since:
- 2.0
-
getRecentlyUsedLabels
Returns the recently used labels for the Confluence instance, with a specified maximum number of results.- Parameters:
token
- The token identifying the current usermaxResults
- 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
- Throws:
RemoteException
- Since:
- 2.0
-
getRecentlyUsedLabelsInSpace
RemoteLabel[] getRecentlyUsedLabelsInSpace(String token, String spaceKey, int maxResults) throws RemoteException Returns the recently used labels for the given spaceKey, with a specified maximum number of results.- Parameters:
token
- The token identifying the current userspaceKey
- The key of the space to limit the labels tomaxResults
- 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
- Throws:
RemoteException
- if the space does not exist, or the user lacks permission to view itNotPermittedException
- if the given user does not have VIEW permissions for the space- Since:
- 2.0
-
getSpacesWithLabel
Returns an array of Spaces that have been labelled with labelName- Parameters:
token
- The token identifying the current userlabelName
- The name of the label (namespace prefixes permitted)- Returns:
- An array of RemoteSpace instances
- Throws:
InvalidSessionException
RemoteException
- if labelName is an empty string or nullRemoteException
- if labelName contains an invalid namespace prefixRemoteException
- if a label named labelName cannot be found- Since:
- 2.0
-
getRelatedLabels
RemoteLabel[] getRelatedLabels(String token, String labelName, int maxResults) throws RemoteException Returns the labels related to the given label name, with a specified maximum number of results.- Parameters:
token
- The token identifying the current userlabelName
- 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)
- Throws:
RemoteException
- if labelName is an empty string or nullRemoteException
- if labelName contains an invalid namespace prefixRemoteException
- if a label named labelName cannot be found- Since:
- 2.0
-
getRelatedLabelsInSpace
RemoteLabel[] getRelatedLabelsInSpace(String token, String labelName, String spaceKey, int maxResults) throws RemoteException 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 userlabelName
- The name of the label (namespace prefixes permitted)spaceKey
- The key of the space to limit the labels tomaxResults
- 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)
- Throws:
RemoteException
- if labelName is an empty string or nullRemoteException
- if labelName contains an invalid namespace prefixRemoteException
- if a label named labelName cannot be foundRemoteException
- if the Space does not exist, or the user does not have VIEW permissions- Since:
- 2.0
-
getLabelsByDetail
RemoteLabel[] getLabelsByDetail(String token, String labelName, String namespace, String spaceKey, String owner) throws RemoteException 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 userlabelName
- the name of the label to search for (not parsed for prefixes)namespace
- the namespace to restrict byspaceKey
- the key of the space to restrict byowner
- the owner of the labels- Returns:
- an array of matching RemoteLabel objects
- Throws:
InvalidSessionException
RemoteException
- if labelName is an empty string or nullRemoteException
- if labelName contains an invalid namespace prefixRemoteException
- if a label named labelName cannot be foundRemoteException
- if the Space does not exist, or the user does not have VIEW permissionsRemoteException
- if the owner is not a valid user- Since:
- 2.0
- See Also:
-
getLabelContentById
Returns the content for a given label ID- Parameters:
token
- The token identifying the current userlabelId
- The ID of the label- Returns:
- An array of RemoteSearchResult objects
- Throws:
RemoteException
- if a Label could not be retrieved for the given ID- Since:
- 2.0
-
getLabelContentByName
Returns the content for a given label name- Parameters:
token
- The token identifying the current userlabelName
- The name of a label (namespace prefixes permitted)- Returns:
- An array of RemoteSearchResult objects
- Throws:
RemoteException
- if the label name is nullRemoteException
- if the label name is an empty StringRemoteException
- if a Label could not be retrieved for the given ID- Since:
- 2.0
-
getLabelContentByObject
RemoteSearchResult[] getLabelContentByObject(String token, RemoteLabel labelObject) throws RemoteException Returns the content for a given label object- Parameters:
token
- The token identifying the current userlabelObject
- The RemoteLabel object- Returns:
- An array of RemoteSearchResult objects
- Throws:
RemoteException
- if the RemoteLabel object is nullRemoteException
- if a Label could not be retrieved for the given ID- Since:
- 2.0
-
getSpacesContainingContentWithLabel
RemoteSpace[] getSpacesContainingContentWithLabel(String token, String labelName) throws RemoteException Returns all Spaces that have content labelled with labelName- Parameters:
token
- The token identifying the current userlabelName
- The label to retrieve the content for (namespace prefixes permitted)- Returns:
- An array of RemoteSpace instances (order undefined)
- Throws:
InvalidSessionException
RemoteException
- if labelName is an empty string or nullRemoteException
- if labelName contains an invalid namespace prefixRemoteException
- if a label named labelName cannot be found- Since:
- 2.0
-
addLabelByName
Adds a label to the object with the given ContentEntityObject ID.- Parameters:
token
- The token identifying the current userlabelName
- The name of the label(s) to be added to the ContentEntityObject, in the form of a space-separated stringobjectId
- The ID of the ContentEntityObject the method will act on- Returns:
- True if successfully added, false otherwise.
- Throws:
RemoteException
- if the label name is null or an empty StringRemoteException
- if the split label name is invalid (as determined by LabelUtil.split())RemoteException
- if the object was not validRemoteException
- if the user does not have VIEW permissions for the objectRemoteException
- if the label could not be createdNotPermittedException
- if the user lacks EDIT permissions for the object- Since:
- 2.0
-
addLabelById
Adds a label with the given ID to the object with the given ContentEntityObject ID.- Parameters:
token
- The token identifying the current userlabelId
- The ID of the label to be added to the ContentEntityObjectobjectId
- The ID of the ContentEntityObject the method will act on- Returns:
- True if successfully added, false otherwise.
- Throws:
RemoteException
- if a Label could not be retrieved for the given IDRemoteException
- if the object was not validRemoteException
- if the user lacks VIEW permissions for the objectNotPermittedException
- if the user lacks EDIT permissions for the object- Since:
- 2.0
-
addLabelByObject
boolean addLabelByObject(String token, RemoteLabel labelObject, long objectId) throws RemoteException Adds the given label object to the object with the given ContentEntityObject ID.- Parameters:
token
- The token identifying the current userlabelObject
- The label to be added to the ContentEntityObjectobjectId
- The ID of the ContentEntityObject the method will act on- Returns:
- True if successfully added, false otherwise.
- Throws:
RemoteException
- if the given RemoteLabel object is nullRemoteException
- if a Label could not be retrieved for the given IDRemoteException
- if the object was not validRemoteException
- if the user lacks VIEW permissions for the objectNotPermittedException
- if the user lacks EDIT permissions for the object- Since:
- 2.0
-
addLabelByNameToSpace
boolean addLabelByNameToSpace(String token, String labelName, String spaceKey) throws RemoteException Adds a label to the object with the given ContentEntityObject ID.- Parameters:
token
- The token identifying the current userlabelName
- The name of the label(s) to be added to the Space, in the form of a space-separated stringspaceKey
- The Space to add the label to- Returns:
- True if successfully added, false otherwise.
- Throws:
RemoteException
- if the label name is null or an empty StringRemoteException
- if the split label name is invalid (as determined by LabelUtil.split())RemoteException
- if the space does not exist, or the user does not have VIEW permissionsRemoteException
- if the label could not be createdNotPermittedException
- if the user does not have permission to add the label- Since:
- 2.0
-
removeLabelByName
Removes the given label from the object with the given ContentEntityObject ID.- Parameters:
token
- The token identifying the current userlabelName
- The name of the label(s) to be removed from the ContentEntityObject, in the form of a space-separated StringobjectId
- The ID of the ContentEntityObject the method will act on- Returns:
- True if successfully removed, false otherwise.
- Throws:
RemoteException
- if the label name is nullRemoteException
- if the label name is an empty StringRemoteException
- if one of the given label names does not exist (occurs before removing labels)RemoteException
- if the object was not validRemoteException
- if the user lacks VIEW permissions for the objectNotPermittedException
- if the user lacks EDIT permissions for the object- Since:
- 2.0
-
removeLabelById
Removes the label with the given ID from the object with the given ContentEntityObject ID.- Parameters:
token
- The token identifying the current userlabelId
- The ID of the label to be removed from the ContentEntityObjectobjectId
- The ID of the ContentEntityObject the method will act on- Returns:
- True if successfully removed, false otherwise.
- Throws:
RemoteException
- if a Label could not be retrieved for the given IDRemoteException
- if the object was not validRemoteException
- if the user lacks VIEW permissions for the objectNotPermittedException
- if the user lacks EDIT permissions for the object- Since:
- 2.0
-
removeLabelByObject
boolean removeLabelByObject(String token, RemoteLabel labelObject, long objectId) throws RemoteException Removes the given label object from the object with the given ContentEntityObject ID.- Parameters:
token
- The token identifying the current userlabelObject
- The label to be removed from the ContentEntityObjectobjectId
- The ID of the ContentEntityObject the method will act on- Returns:
- True if successfully removed, false otherwise.
- Throws:
RemoteException
- if the RemoteLabel object is nullRemoteException
- if a Label could not be retrieved for the given IDRemoteException
- if the object was not validRemoteException
- if the user lacks VIEW permissions for the objectNotPermittedException
- if the user lacks EDIT permissions for the object- Since:
- 2.0
-
removeLabelByNameFromSpace
boolean removeLabelByNameFromSpace(String token, String labelName, String spaceKey) throws RemoteException Removes the given label from the given Space- Parameters:
token
- The token identifying the current userlabelName
- The name of the label(s) to be removed from the Space, in the form of a space-separated StringspaceKey
- The Space the method will act on- Returns:
- True if successfully removed, false otherwise.
- Throws:
RemoteException
- if the label name is nullRemoteException
- if the label name is an empty StringRemoteException
- if one of the given label names does not exist (occurs before removing labels)RemoteException
- if the space does not exist, or the user lacks VIEW permissionsNotPermittedException
- if the user lacks EDIT permissions for the Space- Since:
- 2.0
-
getContentPermissionSets
RemoteContentPermissionSet[] getContentPermissionSets(String token, long contentId) throws RemoteException Get the content permission sets for a particular piece of content- Parameters:
token
- the login token for the current usercontentId
- the content ID of the content to be looked up- Returns:
- an array of the permission sets applied to that content
- Throws:
NotPermittedException
- if the content can not be found, or can not be accessed by the current userInvalidSessionException
- if no login session can be found for the supplied tokenRemoteException
- if something random goes wrong
-
getContentPermissionSet
RemoteContentPermissionSet getContentPermissionSet(String token, long contentId, String permissionType) throws RemoteException Get the content permission set of a certain type for a particular piece of content- Parameters:
token
- the login token for the current usercontentId
- the content ID of the content to be looked uppermissionType
- type of content permission- Returns:
- a content permission set of the specified type on the content object to be looked up
- Throws:
NotPermittedException
- if the content can not be found, or can not be accessed by the current userInvalidSessionException
- if no login session can be found for the supplied tokenRemoteException
- if something random goes wrong
-
setContentPermissions
boolean setContentPermissions(String token, long contentId, String permissionType, RemoteContentPermission[] remoteContentPermissions) throws RemoteException 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 tokencontentId
- the id of the content to have permissions set on itpermissionType
- the type of the permissions (one of the constants fromContentPermission
)remoteContentPermissions
- the permissions to set- Returns:
- true (because RPC methods can't be void)
- Throws:
NotPermittedException
- if the content can not be found or can not be accessed by the current userInvalidSessionException
- if no login session can be found for the supplied tokenRemoteException
- if something random goes wrong
-
addGlobalPermission
boolean addGlobalPermission(String token, String permission, String remoteEntityName) throws RemoteException Add global permissions for a user or group- Parameters:
token
- the login tokenpermission
- the Space Permission to addremoteEntityName
- the name of the user or group- Returns:
- True if successful, false otherwise
- Throws:
NotPermittedException
- if the user lacks permissions to perform the actionRemoteException
-
addGlobalPermissions
boolean addGlobalPermissions(String token, String[] permissions, String remoteEntityName) throws RemoteException Add a global permission for a user or group- Parameters:
token
- the login tokenpermissions
- Array of permissions to addremoteEntityName
- the name of the user or group- Returns:
- True if successful, false otherwise
- Throws:
NotPermittedException
- if the user lacks permissions to perform the actionRemoteException
-
removeGlobalPermission
boolean removeGlobalPermission(String token, String permission, String remoteEntityName) throws RemoteException Remove a global permission- Parameters:
token
- the login tokenpermission
- the Space Permission to addremoteEntityName
- the name of the user or group- Returns:
- True if successful, false otherwise
- Throws:
NotPermittedException
- if the user lacks permissions to perform the actionRemoteException
-
addAnonymousUsePermission
- Throws:
RemoteException
-
removeAnonymousUsePermission
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.
- Throws:
RemoteException
-
addAnonymousViewUserProfilePermission
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.
- Throws:
RemoteException
-
removeAnonymousViewUserProfilePermission
- Throws:
RemoteException
-
setEnableAnonymousAccess
- Throws:
RemoteException
-
isPluginEnabled
Returns true if the specified plugin is enabled.- Throws:
RemoteException
-
isPluginInstalled
Returns true if the specified plugin is installed.- Throws:
RemoteException
-
installPlugin
boolean installPlugin(String token, String pluginFileName, byte[] pluginData) throws RemoteException 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.- Throws:
RemoteException
-
isDarkFeatureEnabled
- Throws:
RemoteException
-
startActivity
Call startActivity on the heartbeat manager bean- Parameters:
token
- rpc authentication tokenkey
- the activity key to startuser
- the username of the user starting the activity- Returns:
- true if executes startActivity without error.
- Throws:
RemoteException
-
stopActivity
Call stopActivity on the heartbeat manager bean- Parameters:
token
- rpc authentication tokenkey
- the activity key to stopuser
- the username of the user stopping the activity- Returns:
- true if executes stopActivity without error.
- Throws:
RemoteException
-
refreshIndex
Refresh the index immediately, which publishes its most recent changes and makes them available for searching. This method is only applicable to the OpenSearch platform.- Parameters:
token
- rpc authentication token
-