Package org.bsc.confluence.xmlrpc
Class XWiki
- java.lang.Object
-
- org.bsc.confluence.xmlrpc.XWiki
-
public class XWiki extends Object
- Version:
- $Revision$ $Date$
-
-
Field Summary
Fields Modifier and Type Field Description protected booleansendRawDataprotected static StringSERVICE_PREFIX_1
-
Constructor Summary
Constructors Constructor Description XWiki(String endpoint, ConfluenceProxy proxyInfo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddAnonymousPermissionsToSpace(List<Object> permissions, String spaceKey)Give anonymous users the permissions {{permissions}} on the space with the key {{spaceKey}}.booleanaddAnonymousPermissionToSpace(String permission, String spaceKey)Give anonymous users the permission {{permission}} on the space with the key {{spaceKey}}.org.bsc.confluence.xmlrpc.AttachmentaddAttachment(long contentId, org.bsc.confluence.xmlrpc.Attachment attachment, byte[] attachmentData)add a new attachment to a content entity object.CommentaddComment(Comment comment)adds a comment to the page.voidaddGroup(String group)add a new groupbooleanaddLabelById(long labelId, long objectId)Adds a label with the given ID to the object with the given ContentEntityObject ID.booleanaddLabelByName(String labelName, long objectId)Adds a label to the object with the given ContentEntityObject ID.booleanaddLabelByNameToSpace(String labelName, String spaceKey)Adds a label to the object with the given ContentEntityObject ID.booleanaddLabelByObject(Label labelObject, long objectId)Adds the given label object to the object with the given ContentEntityObject ID.booleanaddPermissionsToSpace(List<Object> permissions, String remoteEntityName, String spaceKey)Give the entity named {{remoteEntityName}} (either a group or a user) the permissions {{permissions}} on the space with the key {{spaceKey}}.booleanaddPermissionToSpace(String permission, String remoteEntityName, String spaceKey)Give the entity named {{remoteEntityName}} (either a group or a user) the permission {{permission}} on the space with the key {{spaceKey}}.SpaceaddSpace(Space space)create a new space, passing in name, key and description.voidaddUser(User user, String password)add a new user with the given passwordvoidaddUserToGroup(String username, String groupname)add a user to a particular groupbooleanchangeMyPassword(String oldPass, String newPass)changes the current user's passwordbooleanchangeUserPassword(String username, String newPass)changes the specified user's passwordbooleandeactivateUser(String username)deactivates the specified userbooleaneditUser(User remoteUser)edits the details of a userStringexportSite(boolean exportAttachments)exports a Confluence instance and returns a String holding the URL for the download.StringexportSpace(String spaceKey, String exportType)exports a space and returns a String holding the URL for the download.List<Object>getActiveUsers(boolean viewAll)returns all registered users as StringsList<Object>getAncestors(String pageId)returns all the ancestors (asPageSummaryinstances) of this page (parent, parent's parent etc).org.bsc.confluence.xmlrpc.AttachmentgetAttachment(String pageId, String fileName, String versionNumber)get information about an attachment.byte[]getAttachmentData(String pageId, String fileName, String versionNumber)get the contents of an attachment.List<Object>getAttachments(String pageId)returns all theAttachments for this page (useful to point users to download them with the full file download URL returned).List<Object>getBlogEntries(String spaceKey)returns all theBlogEntrySummaryinstances in the space.BlogEntrygetBlogEntry(String pageId)returns a single BlogEntry.BlogEntrygetBlogEntryByDayAndTitle(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'.<T> List<T>getChildren(String pageId)returns all the direct children (asPageSummaryinstances) of this page.CommentgetComment(String commentId)returns an individual comment.List<Object>getComments(String pageId)returns all theComments for this page.<T> List<T>getDescendents(String pageId)returns all the descendents (asPageSummaryinstances) of this page (children, children's children etc).List<Object>getGroups()gets all groups as a list ofStringsList<Object>getLabelContentById(long labelId)Returns the content for a given label IDList<Object>getLabelContentByName(String labelName)Returns the content for a given label name.List<Object>getLabelContentByObject(Label labelObject)Returns the content for a given Label object.List<Object>getLabelsByDetail(String labelName, String namespace, String spaceKey, String owner)Retrieves theLabels matching the given {{labelName}}, {{namespace}}, {{spaceKey}} or {{owner}}.List<Object>getLabelsById(long objectId)Returns allLabels for the given ContentEntityObject IDList<Object>getMostPopularLabels(int maxCount)Returns the most popularLabels for the Confluence instance, with a specified maximum number.List<Object>getMostPopularLabelsInSpace(String spaceKey, int maxCount)Returns the most popularLabels for the given {{spaceKey}}, with a specified maximum number of results.org.bsc.confluence.xmlrpc.PagegetPage(String pageId)org.bsc.confluence.xmlrpc.PagegetPage(String spaceKey, String pageTitle)returns a single Pageorg.bsc.confluence.xmlrpc.PagegetPage(org.bsc.confluence.xmlrpc.PageSummary summary)returns a single PageList<Object>getPageHistory(String pageId)returns all thePageHistorySummaryinstances - useful for looking up the previous versions of a page, and who changed them.List<Object>getPagePermissions(String pageId)Returns a List ofPermissions representing the permissions set on the given page.List<Object>getPages(String spaceKey)returns all thePageSummaryinstances in the space.List<Object>getPermissions(String spaceKey)Returns a List ofPermissions representing the permissions the current user has for this space (a list of "view", "modify", "comment" and / or "admin").List<Object>getPermissionsForUser(String spaceKey, String userName)Returns a List ofPermissions representing the permissions the given user has for this space.List<Object>getRecentlyUsedLabels(int maxResults)Returns the recently usedLabels for the Confluence instance, with a specified maximum number of results.List<Object>getRecentlyUsedLabelsInSpace(String spaceKey, int maxResults)Returns the recently usedLabels for the given {{spaceKey}}, with a specified maximum number of results.List<Object>getRelatedLabels(String labelName, int maxResults)Returns theLabels related to the given label name, with a specified maximum number of results.List<Object>getRelatedLabelsInSpace(String labelName, String spaceKey, int maxResults)Returns theLabels related to the given label name for the given {{spaceKey}}, with a specified maximum number of results.ServerInfogetServerInfo()retrieve some basic information about the server being connected to.protected StringgetServicePrefix()SpacegetSpace(String spaceKey)returns a single Space.List<Object>getSpaceLevelPermissions()returns List of the space levelPermissions which may be granted.List<Object>getSpaces()returns all theSpaceSummaryinstances that the current user can see.List<Object>getSpacesContainingContentWithLabel(String labelName)Returns all Spaces that have content labelled with {{labelName}}.List<Object>getSpacesWithLabel(String labelName)Returns an array ofSpaces that have been labelled with {{labelName}}.UsergetUser(String username)get a single userList<Object>getUserGroups(String username)get a user's current groups as a list ofStringsUserInformationgetUserInformation(String username)Retrieves user informationbooleanhasGroup(String groupname)checks if a group existsbooleanhasUser(String username)checks if a user existsvoidlogin(String username, String password)booleanlogout()remove this token from the list of logged in tokens.booleanmoveAttachment(String originalContentId, String originalName, String newContentEntityId, String newName)move an attachment to a different content entity object and/or give it a new name.booleanreactivateUser(String username)reactivates the specified userbooleanremoveAllPermissionsForGroup(String groupname)Remove all the global and space level permissions for {{groupname}}.booleanremoveAnonymousPermissionFromSpace(String permission, String spaceKey)Remove the permission {{permission} from anonymous users on the space with the key {{spaceKey}}.booleanremoveAttachment(String contentId, String fileName)remove an attachment from a content entity object.booleanremoveComment(String commentId)removes a comment from the page.booleanremoveGroup(String groupname, String defaultGroupName)remove a group.booleanremoveLabelById(long labelId, long objectId)Removes the label with the given ID from the object with the given ContentEntityObject ID.booleanremoveLabelByName(String labelName, long objectId)Removes the given label from the object with the given ContentEntityObject ID.booleanremoveLabelByNameFromSpace(String labelName, String spaceKey)Removes the given label from the given {{spaceKey}}.booleanremoveLabelByObject(Label labelObject, long objectId)Removes the given label object from the object with the given ContentEntityObject ID.voidremovePage(String pageId)remove a pagebooleanremovePermissionFromSpace(String permission, String remoteEntityName, String spaceKey)Remove the permission {{permission} from the entity named {{remoteEntityName}} (either a group or a user) on the space with the key {{spaceKey}}.BooleanremoveSpace(String spaceKey)remove a space completely.booleanremoveUser(String username)delete a user.booleanremoveUserFromGroup(String username, String groupname)remove a user from a group.StringrenderContent(String spaceKey, String pageId)StringrenderContent(String spaceKey, String pageId, String content)returns the HTML rendered content for this page.StringrenderContent(String spaceKey, String pageId, String content, Map<?,?> parameters)Like the above renderContent(), but you can supply an optional hash (map, dictionary, etc) containing additional instructions for the renderer.StringrenderContent(org.bsc.confluence.xmlrpc.PageSummary page)List<Object>search(String query, int maxResults)return a list ofSearchResults which match a given search query (including pages and other content types).List<Object>search(String query, Map<?,?> parameters, int maxResults)Returns a list ofSearchResults like the previous search, but you can optionally limit your search by adding parameters to the parameter map.voidsendRawData(boolean sendRawData)booleansetUserInformation(UserInformation userInfo)updates user informationBlogEntrystoreBlogEntry(BlogEntry entry)add or update a blog entry.org.bsc.confluence.xmlrpc.PagestorePage(org.bsc.confluence.xmlrpc.Page page)add or update a page.booleanwillSendRawData()
-
-
-
Field Detail
-
SERVICE_PREFIX_1
protected static final String SERVICE_PREFIX_1
- See Also:
- Constant Field Values
-
sendRawData
protected boolean sendRawData
-
-
Constructor Detail
-
XWiki
public XWiki(String endpoint, ConfluenceProxy proxyInfo) throws MalformedURLException, URISyntaxException
-
-
Method Detail
-
getServicePrefix
protected String getServicePrefix()
-
willSendRawData
public boolean willSendRawData()
-
sendRawData
public void sendRawData(boolean sendRawData)
-
logout
public boolean logout() throws Exceptionremove this token from the list of logged in tokens. Returns true if the user was logged out, false if they were not logged in in the first place (we don't really need this return, but void seems to kill XML-RPC for me)- Throws:
Exception
-
exportSite
public String exportSite(boolean exportAttachments) throws Exception
exports a Confluence instance and returns a String holding the URL for the download. The boolean argument indicates whether or not attachments ought to be included in the export.- Throws:
Exception
-
getServerInfo
public ServerInfo getServerInfo() throws Exception
retrieve some basic information about the server being connected to. Useful for clients that need to turn certain features on or off depending on the version of the server. (Since 1.0.3)- Throws:
Exception
-
getSpaces
public List<Object> getSpaces() throws Exception
returns all theSpaceSummaryinstances that the current user can see.- Throws:
Exception
-
getSpace
public Space getSpace(String spaceKey) throws Exception
returns a single Space.- Throws:
Exception
-
exportSpace
public String exportSpace(String spaceKey, String exportType) throws Exception
exports a space and returns a String holding the URL for the download. The export type argument indicates whether or not to export in XML, PDF, or HTML format - use "TYPE_XML", "TYPE_PDF", or "TYPE_HTML" respectively. Also, using "all" will select TYPE_XML.- Throws:
Exception
-
addSpace
public Space addSpace(Space space) throws Exception
create a new space, passing in name, key and description.- Throws:
Exception
-
removeSpace
public Boolean removeSpace(String spaceKey) throws Exception
remove a space completely.- Throws:
Exception
-
getPages
public List<Object> getPages(String spaceKey) throws Exception
returns all thePageSummaryinstances in the space. Doesn't include pages which are in the Trash. Equivalent to calling {{Space.getCurrentPages()}}.- Throws:
Exception
-
getPage
public org.bsc.confluence.xmlrpc.Page getPage(org.bsc.confluence.xmlrpc.PageSummary summary) throws Exceptionreturns a single Page- Throws:
Exception
-
getPage
public org.bsc.confluence.xmlrpc.Page getPage(String pageId) throws Exception
- Throws:
Exception
-
getPage
public org.bsc.confluence.xmlrpc.Page getPage(String spaceKey, String pageTitle) throws Exception
returns a single Page- Throws:
Exception
-
getPageHistory
public List<Object> getPageHistory(String pageId) throws Exception
returns all thePageHistorySummaryinstances - useful for looking up the previous versions of a page, and who changed them.- Throws:
Exception
-
getAttachments
public List<Object> getAttachments(String pageId) throws Exception
returns all theAttachments for this page (useful to point users to download them with the full file download URL returned).- Throws:
Exception
-
getAncestors
public List<Object> getAncestors(String pageId) throws Exception
returns all the ancestors (asPageSummaryinstances) of this page (parent, parent's parent etc).- Throws:
Exception
-
getChildren
public <T> List<T> getChildren(String pageId) throws Exception
returns all the direct children (asPageSummaryinstances) of this page.- Throws:
Exception
-
getDescendents
public <T> List<T> getDescendents(String pageId) throws Exception
returns all the descendents (asPageSummaryinstances) of this page (children, children's children etc).- Throws:
Exception
-
getComments
public List<Object> getComments(String pageId) throws Exception
returns all theComments for this page.- Throws:
Exception
-
getComment
public Comment getComment(String commentId) throws Exception
returns an individual comment.- Throws:
Exception
-
addComment
public Comment addComment(Comment comment) throws Exception
adds a comment to the page.- Throws:
Exception
-
removeComment
public boolean removeComment(String commentId) throws Exception
removes a comment from the page.- Throws:
Exception
-
storePage
public org.bsc.confluence.xmlrpc.Page storePage(org.bsc.confluence.xmlrpc.Page page) throws Exceptionadd or update a page. For adding, the Page given as an argument should have space, title and content fields at a minimum. For updating, the Page given should have id, space, title, content and version fields at a minimum. The parentId field is always optional. All other fields will be ignored.- Throws:
Exception
-
renderContent
public String renderContent(String spaceKey, String pageId, String content) throws Exception
returns the HTML rendered content for this page. If 'content' is provided, then that is rendered as if it were the body of the page (useful for a 'preview page' function). If it's not provided, then the existing content of the page is used instead (ie useful for 'view page' function).- Throws:
Exception
-
renderContent
public String renderContent(String spaceKey, String pageId) throws Exception
- Throws:
Exception
-
renderContent
public String renderContent(org.bsc.confluence.xmlrpc.PageSummary page) throws Exception
- Throws:
Exception
-
renderContent
public String renderContent(String spaceKey, String pageId, String content, Map<?,?> parameters) throws Exception
Like the above renderContent(), but you can supply an optional hash (map, dictionary, etc) containing additional instructions for the renderer. Currently, only one such parameter is supported:- Throws:
Exception
-
getAttachment
public org.bsc.confluence.xmlrpc.Attachment getAttachment(String pageId, String fileName, String versionNumber) throws Exception
get information about an attachment.- Throws:
Exception
-
getAttachmentData
public byte[] getAttachmentData(String pageId, String fileName, String versionNumber) throws Exception
get the contents of an attachment.- Throws:
Exception
-
addAttachment
public org.bsc.confluence.xmlrpc.Attachment addAttachment(long contentId, org.bsc.confluence.xmlrpc.Attachment attachment, byte[] attachmentData) throws Exceptionadd a new attachment to a content entity object. *Note that this uses a lot of memory -- about 4 times the size of the attachment.*- Throws:
Exception
-
removeAttachment
public boolean removeAttachment(String contentId, String fileName) throws Exception
remove an attachment from a content entity object.- Throws:
Exception
-
moveAttachment
public boolean moveAttachment(String originalContentId, String originalName, String newContentEntityId, String newName) throws Exception
move an attachment to a different content entity object and/or give it a new name.- Throws:
Exception
-
getBlogEntries
public List<Object> getBlogEntries(String spaceKey) throws Exception
returns all theBlogEntrySummaryinstances in the space.- Throws:
Exception
-
getBlogEntry
public BlogEntry getBlogEntry(String pageId) throws Exception
returns a single BlogEntry.- Throws:
Exception
-
storeBlogEntry
public BlogEntry storeBlogEntry(BlogEntry entry) throws Exception
add or update a blog entry. For adding, the BlogEntry given as an argument should have space, title and content fields at a minimum. For updating, the BlogEntry given should have id, space, title, content and version fields at a minimum. All other fields will be ignored.- Throws:
Exception
-
getBlogEntryByDayAndTitle
public BlogEntry getBlogEntryByDayAndTitle(String spaceKey, int dayOfMonth, String postTitle) throws Exception
Retrieves a blog post in the Space with the given spaceKey, with the title 'postTitle' and posted on the day 'dayOfMonth'.- Throws:
Exception
-
search
public List<Object> search(String query, int maxResults) throws Exception
return a list ofSearchResults which match a given search query (including pages and other content types). This is the same as a performing a parameterised search (see below) with an empty parameter map.- Throws:
Exception
-
search
public List<Object> search(String query, Map<?,?> parameters, int maxResults) throws Exception
Returns a list ofSearchResults like the previous search, but you can optionally limit your search by adding parameters to the parameter map. If you do not include a parameter, the default is used instead.- Throws:
Exception
-
getPermissions
public List<Object> getPermissions(String spaceKey) throws Exception
Returns a List ofPermissions representing the permissions the current user has for this space (a list of "view", "modify", "comment" and / or "admin").- Throws:
Exception
-
getPermissionsForUser
public List<Object> getPermissionsForUser(String spaceKey, String userName) throws Exception
Returns a List ofPermissions representing the permissions the given user has for this space. (since 2.1.4)- Throws:
Exception
-
getPagePermissions
public List<Object> getPagePermissions(String pageId) throws Exception
Returns a List ofPermissions representing the permissions set on the given page.- Throws:
Exception
-
getSpaceLevelPermissions
public List<Object> getSpaceLevelPermissions() throws Exception
returns List of the space levelPermissions which may be granted. This is a list of possible permissions to use with {{addPermissionToSpace}}, below, not a list of current permissions on a Space.- Throws:
Exception
-
addPermissionToSpace
public boolean addPermissionToSpace(String permission, String remoteEntityName, String spaceKey) throws Exception
Give the entity named {{remoteEntityName}} (either a group or a user) the permission {{permission}} on the space with the key {{spaceKey}}.- Throws:
Exception
-
addPermissionsToSpace
public boolean addPermissionsToSpace(List<Object> permissions, String remoteEntityName, String spaceKey) throws Exception
Give the entity named {{remoteEntityName}} (either a group or a user) the permissions {{permissions}} on the space with the key {{spaceKey}}.- Throws:
Exception
-
removePermissionFromSpace
public boolean removePermissionFromSpace(String permission, String remoteEntityName, String spaceKey) throws Exception
Remove the permission {{permission} from the entity named {{remoteEntityName}} (either a group or a user) on the space with the key {{spaceKey}}.- Throws:
Exception
-
addAnonymousPermissionToSpace
public boolean addAnonymousPermissionToSpace(String permission, String spaceKey) throws Exception
Give anonymous users the permission {{permission}} on the space with the key {{spaceKey}}. (since 2.0)- Throws:
Exception
-
addAnonymousPermissionsToSpace
public boolean addAnonymousPermissionsToSpace(List<Object> permissions, String spaceKey) throws Exception
Give anonymous users the permissions {{permissions}} on the space with the key {{spaceKey}}. (since 2.0)- Throws:
Exception
-
removeAnonymousPermissionFromSpace
public boolean removeAnonymousPermissionFromSpace(String permission, String spaceKey) throws Exception
Remove the permission {{permission} from anonymous users on the space with the key {{spaceKey}}. (since 2.0)- Throws:
Exception
-
removeAllPermissionsForGroup
public boolean removeAllPermissionsForGroup(String groupname) throws Exception
Remove all the global and space level permissions for {{groupname}}.- Throws:
Exception
-
addUser
public void addUser(User user, String password) throws Exception
add a new user with the given password- Throws:
Exception
-
getUserGroups
public List<Object> getUserGroups(String username) throws Exception
get a user's current groups as a list ofStrings- Throws:
Exception
-
addUserToGroup
public void addUserToGroup(String username, String groupname) throws Exception
add a user to a particular group- Throws:
Exception
-
removeUserFromGroup
public boolean removeUserFromGroup(String username, String groupname) throws Exception
remove a user from a group.- Throws:
Exception
-
removeUser
public boolean removeUser(String username) throws Exception
delete a user.- Throws:
Exception
-
removeGroup
public boolean removeGroup(String groupname, String defaultGroupName) throws Exception
remove a group. If {{defaultGroupName}} is specified, users belonging to {{groupname}} will be added to {{defaultGroupName}}.- Throws:
Exception
-
getGroups
public List<Object> getGroups() throws Exception
gets all groups as a list ofStrings- Throws:
Exception
-
hasUser
public boolean hasUser(String username) throws Exception
checks if a user exists- Throws:
Exception
-
hasGroup
public boolean hasGroup(String groupname) throws Exception
checks if a group exists- Throws:
Exception
-
editUser
public boolean editUser(User remoteUser) throws Exception
edits the details of a user- Throws:
Exception
-
deactivateUser
public boolean deactivateUser(String username) throws Exception
deactivates the specified user- Throws:
Exception
-
reactivateUser
public boolean reactivateUser(String username) throws Exception
reactivates the specified user- Throws:
Exception
-
getActiveUsers
public List<Object> getActiveUsers(boolean viewAll) throws Exception
returns all registered users as Strings- Throws:
Exception
-
setUserInformation
public boolean setUserInformation(UserInformation userInfo) throws Exception
updates user information- Throws:
Exception
-
getUserInformation
public UserInformation getUserInformation(String username) throws Exception
Retrieves user information- Throws:
Exception
-
changeMyPassword
public boolean changeMyPassword(String oldPass, String newPass) throws Exception
changes the current user's password- Throws:
Exception
-
changeUserPassword
public boolean changeUserPassword(String username, String newPass) throws Exception
changes the specified user's password- Throws:
Exception
-
getLabelsById
public List<Object> getLabelsById(long objectId) throws Exception
Returns allLabels for the given ContentEntityObject ID- Throws:
Exception
-
getMostPopularLabels
public List<Object> getMostPopularLabels(int maxCount) throws Exception
Returns the most popularLabels for the Confluence instance, with a specified maximum number.- Throws:
Exception
-
getMostPopularLabelsInSpace
public List<Object> getMostPopularLabelsInSpace(String spaceKey, int maxCount) throws Exception
Returns the most popularLabels for the given {{spaceKey}}, with a specified maximum number of results.- Throws:
Exception
-
getRecentlyUsedLabels
public List<Object> getRecentlyUsedLabels(int maxResults) throws Exception
Returns the recently usedLabels for the Confluence instance, with a specified maximum number of results.- Throws:
Exception
-
getRecentlyUsedLabelsInSpace
public List<Object> getRecentlyUsedLabelsInSpace(String spaceKey, int maxResults) throws Exception
Returns the recently usedLabels for the given {{spaceKey}}, with a specified maximum number of results.- Throws:
Exception
-
getSpacesWithLabel
public List<Object> getSpacesWithLabel(String labelName) throws Exception
Returns an array ofSpaces that have been labelled with {{labelName}}.- Throws:
Exception
-
getRelatedLabels
public List<Object> getRelatedLabels(String labelName, int maxResults) throws Exception
Returns theLabels related to the given label name, with a specified maximum number of results.- Throws:
Exception
-
getRelatedLabelsInSpace
public List<Object> getRelatedLabelsInSpace(String labelName, String spaceKey, int maxResults) throws Exception
Returns theLabels related to the given label name for the given {{spaceKey}}, with a specified maximum number of results.- Throws:
Exception
-
getLabelsByDetail
public List<Object> getLabelsByDetail(String labelName, String namespace, String spaceKey, String owner) throws Exception
Retrieves theLabels matching the given {{labelName}}, {{namespace}}, {{spaceKey}} or {{owner}}.- Throws:
Exception
-
getLabelContentById
public List<Object> getLabelContentById(long labelId) throws Exception
Returns the content for a given label ID- Throws:
Exception
-
getLabelContentByName
public List<Object> getLabelContentByName(String labelName) throws Exception
Returns the content for a given label name.- Throws:
Exception
-
getLabelContentByObject
public List<Object> getLabelContentByObject(Label labelObject) throws Exception
Returns the content for a given Label object.- Throws:
Exception
-
getSpacesContainingContentWithLabel
public List<Object> getSpacesContainingContentWithLabel(String labelName) throws Exception
Returns all Spaces that have content labelled with {{labelName}}.- Throws:
Exception
-
addLabelByName
public boolean addLabelByName(String labelName, long objectId) throws Exception
Adds a label to the object with the given ContentEntityObject ID.- Throws:
Exception
-
addLabelById
public boolean addLabelById(long labelId, long objectId) throws ExceptionAdds a label with the given ID to the object with the given ContentEntityObject ID.- Throws:
Exception
-
addLabelByObject
public boolean addLabelByObject(Label labelObject, long objectId) throws Exception
Adds the given label object to the object with the given ContentEntityObject ID.- Throws:
Exception
-
addLabelByNameToSpace
public boolean addLabelByNameToSpace(String labelName, String spaceKey) throws Exception
Adds a label to the object with the given ContentEntityObject ID.- Throws:
Exception
-
removeLabelByName
public boolean removeLabelByName(String labelName, long objectId) throws Exception
Removes the given label from the object with the given ContentEntityObject ID.- Throws:
Exception
-
removeLabelById
public boolean removeLabelById(long labelId, long objectId) throws ExceptionRemoves the label with the given ID from the object with the given ContentEntityObject ID.- Throws:
Exception
-
removeLabelByObject
public boolean removeLabelByObject(Label labelObject, long objectId) throws Exception
Removes the given label object from the object with the given ContentEntityObject ID.- Throws:
Exception
-
-