com.atlassian.confluence.it.rpc
Class ConfluenceRpc

java.lang.Object
  extended by com.atlassian.confluence.it.rpc.ConfluenceRpc

public class ConfluenceRpc
extends Object

A client-side stub of the Confluence remote API.


Nested Class Summary
static class ConfluenceRpc.Version
          Enumeration of all supported versions of the Confluence remote API
 
Field Summary
 LikesRpc likes
           
 NotificationsRpc notifications
           
 UserPreferencesRpc userPreferences
           
 
Method Summary
 boolean addExistingProfilePicture(String username, String filename)
          Attempts to add a existing profile picture to a user's profile.
 boolean addLabel(long labelId, long contentId)
          Adds a label to the content specified by the supplied contentId
 void addLabel(String label, BlogPost blogPost)
           
 boolean addLabel(String label, Page page)
          Adds a label to the specified page
 boolean addLabelByObject(Object remoteLabel, Page page)
          Adds a label to the specified page
 boolean addLabelToSpace(String label, Space space)
          Adds a label to the specified space
 void addMailServer(String serverName, String from, String subjectPrefix, String hostname, int port)
           
 void addMailServer(String serverName, String from, String subjectPrefix, String hostname, int port, String fromName)
           
 boolean addProfilePicture(String username, String filename, String mimeType, byte[] pictureData)
          Attempts to add a profile picture to a user's profile
 boolean addUserToGroup(String username, String groupname)
           
 boolean addUserToGroup(User user, Group group)
           
 void archiveSpace(Space space)
           
protected  Vector<Object> args(Object... params)
           
 void buildDidYouMeanIndex()
          Builds the "Did you mean" index via RPC and waits for an event to show that the index build is complete.
 void changeAttachmentCreatedDate(Attachment attachment, Date createdDate)
           
 void changeBlogPostModificationDate(long blogId, Date modificationDate)
           
 void changeCommentCreatedDate(Comment comment, Date newCreationDate)
           
 boolean changeMyPassword(String oldPassword, String newPassword)
          Attempts to change the current user's old password with the specified new password
 void changePageCreatedDate(long id, Date newDate)
           
 void changePageModificationDate(long pageId, Date modificationDate)
           
 boolean changeUserPassword(String username, String newPassword)
          Attempts to set the specified password for the specified user
 void clearCustomHtml()
           
 void clearIndex()
           
 boolean clearIndexQueue()
           
 void clearMailQueue()
           
 void clearQueue(String queueName)
           
 void clearSystemProperty(String name)
          Clear the specified System property on the Confluence server.
 String convertWikiMarkupToXhtml(String wikiMarkup, long pageId)
           
 String convertWikiToStorageFormat(String wiki)
           
 String convertXhtmlToWikiMarkup(String xhtml, long pageId)
           
 long createAttachment(Attachment attachment)
           
 long createAttachment(ContentEntity page, Attachment attachment)
           
 long createAttachment(long contentId, Attachment attachment)
           
 long createBlogPost(BlogPost blogPost)
           
 long createComment(Comment comment)
           
 long createComment(Comment comment, long parentCommentId)
           
 long createDraft(Draft draft)
           
 void createGroup(Group group)
           
 void createGroup(String groupname)
           
 void createJohnsonEvent(String message)
           
 long createPage(Page page)
           
 Map<String,String> createPage(String spaceKey, String title, String content, long parentPageId)
           
 List<Page> createPageHierarchy(Space space, int depth, String pageTitlePrefix)
          Create a simple hierarchy of pages where each page is the parent of the next.
 List<Page> createPagesFromPrototype(Page pageTemplate, int count)
           
 Space createPersonalSpace(User user)
           
 Space createSpace(Space space)
           
 Space createSpace(String key, String name, String description)
           
 Iterable<String> createSpaces(int i)
          Creates a bunch of spaces.
 boolean createUser(User user)
          Adds the given user
 boolean createUser(User user, boolean notifyUser)
          Adds the given user
 void createUserMacro(String name, boolean hasBody, String bodyType, String outputType, String template)
           
 void createUserMacro(String name, boolean hasBody, String bodyType, String outputType, String template, String title, String description, String category, String iconUrl, String documentationUrl, boolean hidden)
           
 boolean deactivateUser(String username)
          Deactivates the user matching the specified username
 boolean doesDraftExist(String contentId, String draftCreator, String draftType, String spaceKey)
           
 void editAttachment(Attachment oldAttachment, Attachment newAttachment)
          Edit either the owning page or the filename of the attachment.
 void editPage(Space space, String pageTitle, String newTitle, String newContent)
          Modifies the page with the given details
 boolean editUser(User user)
          Attempts to edit the details of the specified user
 void enableCaptcha(boolean enable)
           
 void enableCaptchaDebugMode(boolean enable)
           
 boolean enableDailyReportNotification(User user, boolean dailyReportEnabled)
           
 void enablePublicSignUp(boolean enabled)
           
 void enableWebSudo(boolean enabled)
           
 Object execute(String method, Object... args)
          Execute a Confluence rpc method as the currently logged in user.
 Object executeFuncTest(String method, Object... args)
          Instead of using the execute methods directly, consider adding a wrapper method to ConfluenceRpc.
protected  Object executeFuncTestWithToken(String method, String token, Object... args)
          Execute a functest method with the specified token.
 Object executePluginXmlRpc(String servicePath, String method, Object... args)
           
protected  Object executeRpc(String rpcBase, String methodToken, String method, Object... args)
           
 Object executeWithToken(String method, String token, Object... args)
          Execute method with the specified token.
 String exportSite(boolean exportAttachments)
          Returns the URL of the downloadable export.
 String exportSpace(Space space, String exportType)
          Returns the URL of the downloadable export.
 void flushAllCaches()
           
 boolean flushIndexQueue()
          Triggers an index queue flush and blocks until flush is complete.
 void flushMailQueue()
           
 void follow(User user)
          Follows the given user with the logged in user.
 List<Page> getAncestors(Page homePage)
           
 Object getApplicationConfigProperty(String propertyKey)
           
 Attachment getAttachment(long contentId, String fileName)
           
 Attachment getAttachment(long contentId, String fileName, String version)
           
 byte[] getAttachmentData(Attachment attachment, String version)
           
 byte[] getAttachmentData(long contentId, String fileName, String version)
           
 long getAttachmentId(long contentId, String fileName)
           
 List<Attachment> getAttachments(Page homePage)
           
 BlogPost getBlogPost(long pageId)
          Returns the blog post with the specified page ID.
 CacheStatistics getCacheStatistics(CacheKey key)
           
 List<Page> getChildren(long parentPageId)
           
 Map<String,Object> getClusterInformation()
           
 Comment getComment(AbstractPageEntity pageEntity, long commentId)
           
 List<Comment> getComments(Page page)
           
 String getConfiguredBaseUrl()
          Returns the configured base url on the server.
 String getConfiguredThemeForSpace(String spaceKey)
           
 long getContentPermissionId(ContentPermission contentPermission, long pageId)
           
 long getContentPermissionId(long pageId, String permissionType, String username)
           
 List<Map<String,String>> getContentPermissions(long contentId, ContentPermissionType permissionType)
           
 Map<String,Object> getContentPermissionSet(long contentId, ContentPermissionType permissionType)
           
 List<String> getContentPropertyKeys(long contentId)
           
 Vector<Hashtable> getCusterNodeStatuses()
           
 List<Page> getDescendents(Page homePage)
           
 Page getExistingPage(long pageId)
          Retrieve the Page object for a page, known to exist in confluence.
 Page getExistingPage(Space space, String pageTitle)
          Retrieve the fully populated Page object for a page, known to exist in confluence.
 String getGlobalConfiguredTheme()
           
 List<GlobalPermission> getGlobalPermissions(Group group)
           
 List<Group> getGroups()
          Retrieves existing groups
 List<SearchResult> getLabelContent(long labelId)
           
 List<SearchResult> getLabelContent(String labelName)
           
 List<SearchResult> getLabelContentByObject(Object remoteLabel)
          Returns the content for a given label object
 List<Label> getLabels(long pageId)
          Retrieves the labels for the page matching the specified pageId
 List<Label> getLabels(String labelName, String namespace, String spaceKey, String owner)
          Retrieves the labels matching the given labelName, namespace or owner.
 String getLocalisedText(String messageKey)
          Returns the localised message text for the given key, retrieved from the application via RPC.
 String getLoggedInUser()
           
 int getMailQueueSize()
           
 List<Label> getMostPopularLabels(int maxCount)
          Returns the most popular labels
 List<Label> getMostPopularLabelsInSpace(String spaceKey, int maxCount)
          Returns the most popular labels in the space with the specified key
 int getNumberOfIndexTasksInQueue()
           
 String getPageContent(long pageId)
           
 List<Map<String,String>> getPageHistory(Page homePage)
           
 long getPageId(Page page)
           
 long getPageId(String spaceKey, String title)
           
 List<Long> getPageIdsInSpace(Space space)
           
 Collection<ContentPermissionEntry> getPagePermissions(long pageId)
           
 List<Page> getPagesInSpace(Space space)
           
 List<String> getPermissionsForUser(Space space, User user)
           
 List<String> getPermissionsForUser(String spaceKey, String username)
           
 long getPersonalInformationId(String username)
           
 PluginHelper getPluginHelper()
          Retrieve a PluginHelper that manipulates plugin using this ConfluenceRpc.
 List<Label> getRecentlyUsedLabels(int maxCount)
          Returns the recently used labels for the Confluence instance, with a specified maximum number of results.
 List<Label> getRecentlyUsedLabelsInSpace(String spaceKey, int maxCount)
          Returns the recently used labels in the space with the specified key
 List<Label> getRelatedLabels(String labelName, int maxCount)
          Returns the labels related to the given label name
 List<Label> getRelatedLabelsInSpace(String labelName, String spaceKey, int maxCount)
          Returns the labels related to the given label name in the given space
 Map<String,Object> getServerInfo()
           
 Space getSpace(String spaceKey)
          Returns the space with the specified key.
 List<Space> getSpaces()
          Retrieves spaces visible to the currently logged in rpc user
 List<Space> getSpacesContainingContentWithLabel(String labelName)
           
 List<Space> getSpacesWithLabel(String labelName)
           
 String getSystemProperty(String name)
          Retrieve the value of the specified System property on the Confluence server.
 List<Page> getTopLevelPages(String spaceKey)
           
 User getUser(String username)
          Retrieves a user with the given username
 List<Group> getUserGroups(String username)
          Retrieves the groups that a user matching the specified username belongs to
 UserInformation getUserInformation(String username)
           
 UserInformation getUserInformation(User user)
           
 Locale getUserLocale(User user)
           
 List<String> getUsernames(boolean viewAll)
          Retrieves the usernames of the current system users
 void grantAllPermissionsExceptAdmin(Entity entity, Space space)
           
 void grantAnonymousPermission(SpacePermission permission, Space space)
           
 void grantAnonymousUsePermission()
           
 boolean grantAnonymousViewUserProfilePermission()
           
 void grantContentPermission(ContentEntity contentEntity, Entity entity, ContentPermissionType permissionType)
           
 void grantContentPermission(ContentPermission contentPermission, ContentEntity contentEntity)
           
 void grantContentPermissions(ContentEntity contentEntity, List<? extends Entity> entities, ContentPermissionType permissionType)
           
 void grantPermission(GlobalPermission permission, Entity entity)
           
 void grantPermission(SpacePermission permission, Space space, Entity entity)
           
 void grantPermissions(Space space, Entity entity, SpacePermission... permissions)
           
 boolean hasGroup(String groupname)
          Checks whether or not a group matching the specified name exists
 boolean hasUser(String username)
          Checks whether a user with the specified username exists
 void importSpace(byte[] zippedXmlBackup)
           
 void importSpace(File zippedXmlBackup)
           
 boolean isActiveUser(String username)
          Checks whether the user is active
 boolean isClusteredInstance()
           
 boolean isSpringComponentPresent(String componentName)
           
 void logIn(User user)
          Set the current user logged into this rpc client.
 void logInToEnsureUserExists(User user)
          Performs an RPC login and logout to ensure that a user exists.
 boolean logMessage(RpcLogDestination destination, String message)
          Logs a message on the server at a specified log level or to sout or syserr.
 void logOut()
           
 void movePage(long sourcePageId, long targetPageId, String position)
           
 void movePage(Page page, Page target, String position)
          Move a page "to" another page.
 void movePageToTopLevel(Page page, Space targetSpace)
          Moves a page to the top of the target space
static ConfluenceRpc newInstance(String baseUrl)
          Create a new RPC stub pointed at the default version of the server-side API.
static ConfluenceRpc newInstance(String baseUrl, ConfluenceRpc.Version version)
          Create a new RPC stub pointed at a specific version of the server-side API.
protected  Hashtable<String,String> object(String... args)
           
 void pauseAllJobs()
           
 void pauseJob(QuartzJob job)
           
 void pauseJob(String jobName)
           
 void pauseJobGroup(String jobGroupName)
           
 void purgeFromTrash(Space space, long pageId)
           
 void putStringMappingInCache(String cacheKey, String entryKey, String value)
           
 boolean reactivateUser(String username)
          Reactivates the user matching the specified username
 void removeAllJohnsonEvents()
           
 void removeAllSpaces()
           
 void removeAttachment(long pageId, String fileName)
           
 void removeBandanaKey(String context, String key)
           
 void removeComment(Comment comment)
           
 void removeComment(long commentId)
          Remove a comment, identified by its id.
 void removeDrafts(User user)
           
 boolean removeGroup(Group group)
          Removes the group if it exists, otherwise does nothing
 boolean removeGroup(String groupname, String defaultGroupName)
          Removes the group if it exists, otherwise does nothing
 boolean removeLabel(long labelId, long contentId)
          Removes a label from the specified content
 boolean removeLabel(String label, Page page)
          Removes a label from the specified page
 boolean removeLabelByObject(Object remoteLabel, Page page)
          Removes a label from the specified page
 boolean removeLabelFromSpace(String label, Space space)
          Removes a label from the specified space
 void removeMailServer(String serverName)
           
 boolean removePage(long pageId)
           
 boolean removePage(Page page)
           
 void removePersonalInformation(User user)
          PersonalInformation gets created automatically by the rpc create user method.
 boolean removeSpace(String spaceKey)
          Removes the space if it exists, otherwise does nothing.
 void removeTestData(Set<User> usersToKeep, Set<Group> groupsToKeep, Map<Group,HashSet<User>> userGroupMembershipsToKeep)
          Perform all test-data reset tasks.
 void removeTestDataAfterExternalUserManagement()
          Called on an instance that manages User/Group data externally, this will: 1.
 boolean removeUser(String username)
          Removes the user if it exists, otherwise does nothing.
 void removeUser(User user)
           
 boolean removeUserFromGroup(String username, String groupname)
           
 boolean removeUserFromGroup(User user, Group group)
           
 void removeUserMacro(String name)
           
 void restoreAbstractPage(long id)
           
 void resumeJob(QuartzJob job)
           
 void resumeJob(String jobName)
           
 boolean revokeAllPermissions(Group group)
          Removes all permissions for the specified group
 void revokeAnonymousPermission(SpacePermission permission, Space space)
           
 void revokeAnonymousUsePermission()
           
 void revokeAnonymousViewUserProfilePermission()
           
 void revokeContentPermission(ContentPermission contentPermission, ContentEntity contentEntity)
           
 void revokePermission(GlobalPermission permission, Entity entity)
           
 void revokePermission(SpacePermission permission, Space space, Entity entity)
           
 void revokePermissions(Space space, Entity entity, SpacePermission... permissions)
          Unfortunately there is no revokePermissions method on the API, so this just calls the singular method repeatedly.
 void runJob(QuartzJob job)
          Trigger a quartz job on the server.
 void runJob(String jobName)
           
 long saveBlogPost(BlogPost blogPost)
           
 long saveComment(Comment comment)
           
 long savePage(Page page)
           
 List<Hashtable<String,String>> search(String queryString, int maxMatches)
          Search for the supplied query String.
 void setApplicationConfigProperty(String propertyKey, String propertyValue)
           
 void setBandanaKey(String context, String key, boolean value)
           
 void setBandanaKey(String context, String key, int value)
           
 void setBandanaKey(String context, String key, List<String> value)
           
 void setBandanaKey(String context, String key, Set<String> value)
           
 void setBandanaKey(String context, String key, String value)
           
 void setContentTextProperty(long contentId, String key, String value)
           
 void setDirectoryPasswordEncoder(String directoryName, String encoder)
           
 void setDraftSaveInterval(int seconds)
           
 void setEnableAnonymousAccess(boolean enable)
           
 void setEnableJavascriptTop(boolean enable)
           
 void setGlobalTheme(BundledTheme theme)
           
 void setKeyboardShortcutPref(User user, boolean enabled)
           
 org.apache.log4j.Level setLogLevel(String logger, org.apache.log4j.Level level)
          Sets the log level of the specified logger, returning the old value.
 String setLogLevel(String logger, String level)
          Deprecated. since 3.3 use setLogLevel(String, Level)
 void setPageRestriction(ContentPermission contentPermission, Page page)
          Restrict page to single given user or group.
 void setPageRestriction(Page page, Entity entity, ContentPermissionType contentPermissionType)
          Restrict page to single given user or group.
 void setSharedMode(boolean enable)
           
 void setSystemProperty(String name, String value)
          Set the specified System property on the Confluence server.
 void setThemeForSpace(Space space, BundledTheme theme)
           
 boolean setUserDetailProperty(User user, String key, String value)
          Update a UserDetail property via the UserDetailsManager.
 boolean setUserInformation(UserInformation userInfo)
          Updates a user's information
 void setUserLocale(User user, Locale locale)
           
 long setUserStatus(String wikiStatus)
          Sets the current user's status.
 UserStatus setUserStatus(UserStatus status)
           
 void setWatchOwnContent(User user, boolean enabled)
           
 void setWebSudoTimeout(int timeout)
           
 void stopFollowing(User user)
          Stop following the given user.
 void synchroniseUserDirectories()
          Synchronises all the directories which support synchronisation (LDAP, remote Crowd, etc.)
 void unarchiveSpace(Space space)
           
 long updateDraft(Draft draft)
           
 boolean updateGlobalSetting(String name, boolean value)
           
 String updateGlobalSetting(String name, String value)
           
 long updatePage(Page page, boolean minorEdit, String versionComment)
          Saves pages, but not blogs, see saveBlogPost(BlogPost).
 void useAnonymously()
          Indicate that further rpc calls should be made anonymously, rather than as a specific user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

notifications

public final NotificationsRpc notifications

userPreferences

public final UserPreferencesRpc userPreferences

likes

public final LikesRpc likes
Method Detail

newInstance

public static ConfluenceRpc newInstance(String baseUrl,
                                        ConfluenceRpc.Version version)
Create a new RPC stub pointed at a specific version of the server-side API.

Parameters:
baseUrl - the base URL of the server to connect to
version - the version of the API to use
Returns:
an RPC stub object

newInstance

public static ConfluenceRpc newInstance(String baseUrl)
Create a new RPC stub pointed at the default version of the server-side API.

Parameters:
baseUrl - the base URL of the server to connect to
Returns:
an RPC stub object

execute

public Object execute(String method,
                      Object... args)
               throws RpcRuntimeException
Execute a Confluence rpc method as the currently logged in user. Should only be called when token is not null. Instead of using the execute methods directly, consider adding a wrapper method to ConfluenceRpc

Parameters:
method - the name of the rpc method to call
args - the arguments to be passed to the method. Token will automatically be included first. The rest should be strings or HashTables or Vectors. Longs will be automatically converted to strings to save the hassle of manually converting object IDs
Returns:
whatever object is returned from the rpc method.
Throws:
RpcRuntimeException - wrapping the underlying remote exception
See Also:
logIn(User), useAnonymously()

executeWithToken

public Object executeWithToken(String method,
                               @Nullable
                               String token,
                               Object... args)
                        throws RpcRuntimeException
Execute method with the specified token. Avoid using this method in favour of logging in as another user and using execute(String, Object...) as them instead. There only time when you should use this is when testing something related to the tokens themselves (e.g. authentication tests)

Parameters:
method - the method to execute
token - the token
args - arguments to pass to the XML RPC method
Returns:
the object returned by the server
Throws:
RpcRuntimeException - If the server throws an exception

executePluginXmlRpc

public Object executePluginXmlRpc(String servicePath,
                                  String method,
                                  Object... args)
                           throws RpcRuntimeException
Throws:
RpcRuntimeException

executeFuncTest

public Object executeFuncTest(String method,
                              Object... args)
                       throws RpcRuntimeException
Instead of using the execute methods directly, consider adding a wrapper method to ConfluenceRpc.

Parameters:
method - the name of the rpc method to call
args - the arguments to be passed to the method. Token will automatically be included first. The rest should be strings or HashTables or Vectors. Longs will be automatically converted to strings to save the hassle of manually converting object IDs
Throws:
RpcRuntimeException - wrapping the underlying remote exception

executeFuncTestWithToken

protected Object executeFuncTestWithToken(String method,
                                          String token,
                                          Object... args)
                                   throws RpcRuntimeException
Execute a functest method with the specified token.

Parameters:
method - the method to execute
token - the token
args -
Returns:
Throws:
RpcRuntimeException

executeRpc

protected Object executeRpc(String rpcBase,
                            String methodToken,
                            String method,
                            Object... args)
                     throws RpcRuntimeException
Throws:
RpcRuntimeException

object

protected Hashtable<String,String> object(String... args)

args

protected Vector<Object> args(Object... params)

logIn

public void logIn(User user)
Set the current user logged into this rpc client. Creates a user token for the given user by calling the remote login method. All further methods called on the client will be performed using this token until logOut() or useAnonymously() are called.


logInToEnsureUserExists

public void logInToEnsureUserExists(User user)
Performs an RPC login and logout to ensure that a user exists. This causes users in external user management systems to get pulled in. This does not change the user that RPC actions are performed as.

Parameters:
user - The user to login as.

useAnonymously

public void useAnonymously()
Indicate that further rpc calls should be made anonymously, rather than as a specific user. This will last until logIn(com.atlassian.confluence.it.User) or logOut() are called.


logOut

public void logOut()

getPageId

public long getPageId(Page page)

getPageId

public long getPageId(String spaceKey,
                      String title)

getPageIdsInSpace

public List<Long> getPageIdsInSpace(Space space)

getPagesInSpace

public List<Page> getPagesInSpace(Space space)

getPageContent

public String getPageContent(long pageId)

convertWikiMarkupToXhtml

public String convertWikiMarkupToXhtml(String wikiMarkup,
                                       long pageId)

convertXhtmlToWikiMarkup

public String convertXhtmlToWikiMarkup(String xhtml,
                                       long pageId)

createPage

public Map<String,String> createPage(String spaceKey,
                                     String title,
                                     String content,
                                     long parentPageId)

createPage

public long createPage(Page page)
Parameters:
page - an uncreated page
Returns:
the id of the newly created page

createPagesFromPrototype

public List<Page> createPagesFromPrototype(Page pageTemplate,
                                           int count)

editPage

public void editPage(Space space,
                     String pageTitle,
                     String newTitle,
                     String newContent)
Modifies the page with the given details

Parameters:
space - the space that the page belongs to
pageTitle - the current title of the Page
newTitle - the new title of the Page (null if the same)
newContent - the new content of the Page (null if the same)

removePage

public boolean removePage(Page page)

removePage

public boolean removePage(long pageId)

restoreAbstractPage

public void restoreAbstractPage(long id)

changePageCreatedDate

public void changePageCreatedDate(long id,
                                  Date newDate)

getExistingPage

public Page getExistingPage(Space space,
                            String pageTitle)
Retrieve the fully populated Page object for a page, known to exist in confluence.


getExistingPage

public Page getExistingPage(long pageId)
Retrieve the Page object for a page, known to exist in confluence.

Returns:
a Page but with no Space information included.

getBlogPost

public BlogPost getBlogPost(long pageId)
Returns the blog post with the specified page ID. Looks up the space which the blog post belongs to, so this method will execute two RPC calls.


getSpace

public Space getSpace(String spaceKey)
Returns the space with the specified key.


getChildren

public List<Page> getChildren(long parentPageId)
Returns:
the children of the specified parent page, in order.

getTopLevelPages

public List<Page> getTopLevelPages(String spaceKey)

savePage

public long savePage(Page page)

updatePage

public long updatePage(Page page,
                       boolean minorEdit,
                       String versionComment)
Saves pages, but not blogs, see saveBlogPost(BlogPost).


createDraft

public long createDraft(Draft draft)

updateDraft

public long updateDraft(Draft draft)

setPageRestriction

public void setPageRestriction(ContentPermission contentPermission,
                               Page page)
Restrict page to single given user or group. This will wipe any other restrictions.


setPageRestriction

public void setPageRestriction(Page page,
                               Entity entity,
                               ContentPermissionType contentPermissionType)
Restrict page to single given user or group. This will wipe any other restrictions.


getContentPermissionId

public long getContentPermissionId(ContentPermission contentPermission,
                                   long pageId)

getContentPermissionId

public long getContentPermissionId(long pageId,
                                   String permissionType,
                                   String username)

createBlogPost

public long createBlogPost(BlogPost blogPost)

saveBlogPost

public long saveBlogPost(BlogPost blogPost)

createComment

public long createComment(Comment comment)

createComment

public long createComment(Comment comment,
                          long parentCommentId)

saveComment

public long saveComment(Comment comment)

removeComment

public void removeComment(long commentId)
Remove a comment, identified by its id.

Parameters:
commentId - the id of the comment to remove

removeComment

public void removeComment(Comment comment)

changeCommentCreatedDate

public void changeCommentCreatedDate(Comment comment,
                                     Date newCreationDate)

createAttachment

public long createAttachment(long contentId,
                             Attachment attachment)

createAttachment

public long createAttachment(ContentEntity page,
                             Attachment attachment)

createAttachment

public long createAttachment(Attachment attachment)

removeAttachment

public void removeAttachment(long pageId,
                             String fileName)

addProfilePicture

public boolean addProfilePicture(String username,
                                 String filename,
                                 String mimeType,
                                 byte[] pictureData)
Attempts to add a profile picture to a user's profile

Parameters:
username - the user name of the profile
filename - file name of the picture
mimeType - image mime type (must be from image/*)
pictureData - the image data
Returns:
true if the picture is successfully added

addExistingProfilePicture

public boolean addExistingProfilePicture(String username,
                                         String filename)
Attempts to add a existing profile picture to a user's profile.

Parameters:
username - the user name of the profile
filename - file name of the picture
Returns:
true if the picture is successfully added

enableDailyReportNotification

public boolean enableDailyReportNotification(User user,
                                             boolean dailyReportEnabled)

editAttachment

public void editAttachment(Attachment oldAttachment,
                           Attachment newAttachment)
Edit either the owning page or the filename of the attachment.


getAttachment

public Attachment getAttachment(long contentId,
                                String fileName)

getAttachment

public Attachment getAttachment(long contentId,
                                String fileName,
                                String version)

getAttachmentId

public long getAttachmentId(long contentId,
                            String fileName)

getAttachmentData

public byte[] getAttachmentData(long contentId,
                                String fileName,
                                String version)

getAttachmentData

public byte[] getAttachmentData(Attachment attachment,
                                String version)

movePage

public void movePage(long sourcePageId,
                     long targetPageId,
                     String position)

movePage

public void movePage(Page page,
                     Page target,
                     String position)
Move a page "to" another page.

Parameters:
position - see com.atlassian.confluence.content.service.page.MovePageCommand

movePageToTopLevel

public void movePageToTopLevel(Page page,
                               Space targetSpace)
Moves a page to the top of the target space

Parameters:
page - page to move
targetSpace - the target space

addLabel

public boolean addLabel(String label,
                        Page page)
Adds a label to the specified page

Parameters:
label - name of the label to add
page - page to add the label to
Returns:
true if the label was successfully added

addLabel

public void addLabel(String label,
                     BlogPost blogPost)

addLabel

public boolean addLabel(long labelId,
                        long contentId)
Adds a label to the content specified by the supplied contentId

Parameters:
labelId - id of the label to add
contentId - id of a page or blogpost to add the label to
Returns:
true if the label is successfully added

addLabelByObject

public boolean addLabelByObject(Object remoteLabel,
                                Page page)
Adds a label to the specified page

Parameters:
remoteLabel - the object retrieved from a direct call to an rpc method that returns a label, i.e. this parameter should be the return value of execute(String, Object...) and not any of wrapper methods that return a Label object
page - page to add the label to
Returns:
true if the label is successfully added

removeLabel

public boolean removeLabel(String label,
                           Page page)
Removes a label from the specified page

Parameters:
label - the name of the label to remove
page - the page to remove the label from
Returns:
true if the label is successfully removed

removeLabel

public boolean removeLabel(long labelId,
                           long contentId)
Removes a label from the specified content

Parameters:
labelId - id of the label to remove
contentId - id of the page or blog to remove the label from
Returns:
true if the label is successfully removed

removeLabelByObject

public boolean removeLabelByObject(Object remoteLabel,
                                   Page page)
Removes a label from the specified page

Parameters:
remoteLabel - the object retrieved from a direct call to an rpc method that returns a label, i.e. this parameter should be the return value of execute(String, Object...) and not any of wrapper methods that return a Label object
page - page to remove the label from
Returns:
true if the label is successfully removed

addLabelToSpace

public boolean addLabelToSpace(String label,
                               Space space)
Adds a label to the specified space

Parameters:
label - the label to add
space - the space to add the label to
Returns:
true if the label is successfully added

removeLabelFromSpace

public boolean removeLabelFromSpace(String label,
                                    Space space)
Removes a label from the specified space

Parameters:
label - the label to remove
space - the space to remove the label from
Returns:
true if the label is successfully removed

getSpacesWithLabel

public List<Space> getSpacesWithLabel(String labelName)

getSpacesContainingContentWithLabel

public List<Space> getSpacesContainingContentWithLabel(String labelName)

getLabelContent

public List<SearchResult> getLabelContent(long labelId)

getLabelContent

public List<SearchResult> getLabelContent(String labelName)

getLabelContentByObject

public List<SearchResult> getLabelContentByObject(Object remoteLabel)
Returns the content for a given label object

Parameters:
remoteLabel - the object retrieved from a direct call to an rpc method that returns a label, i.e. this parameter should be the return value of execute(String, Object...) and not any of wrapper methods that return a Label object
Returns:
content for the given label object

getLabels

public List<Label> getLabels(long pageId)
Retrieves the labels for the page matching the specified pageId

Returns:
labels for the page

getLabels

public List<Label> getLabels(String labelName,
                             String namespace,
                             String spaceKey,
                             String owner)
Retrieves the labels matching the given labelName, namespace or owner. This method can be used to retrieve labels of a specific type, such as personal labels, by setting the namespace. Parameters with empty strings are ignored.

Parameters:
labelName - the name of the label to search for (not parsed for prefixes)
namespace - the namespace to restrict by
spaceKey - the key of the space to restrict by
owner - the owner of the labels
Returns:
labels matching the specified details

getMostPopularLabels

public List<Label> getMostPopularLabels(int maxCount)
Returns the most popular labels

Parameters:
maxCount - the maximum number of labels to return, or no limit if this is 0
Returns:
labels sorted by descending popularity

getMostPopularLabelsInSpace

public List<Label> getMostPopularLabelsInSpace(String spaceKey,
                                               int maxCount)
Returns the most popular labels in the space with the specified key

Parameters:
spaceKey - key for the space
maxCount - the maximum number of labels to return, or no limit if this is 0
Returns:
labels sorted by descending popularity

getRecentlyUsedLabels

public List<Label> getRecentlyUsedLabels(int maxCount)
Returns the recently used labels for the Confluence instance, with a specified maximum number of results.

Parameters:
maxCount - the maximum number of labels to return, or the default if this is 0
Returns:
labels sorted by most recent use

getRecentlyUsedLabelsInSpace

public List<Label> getRecentlyUsedLabelsInSpace(String spaceKey,
                                                int maxCount)
Returns the recently used labels in the space with the specified key

Parameters:
spaceKey - key for the space
maxCount - the maximum number of labels to return, or the default if this is 0
Returns:
labels sorted by most recent use

getRelatedLabels

public List<Label> getRelatedLabels(String labelName,
                                    int maxCount)
Returns the labels related to the given label name

Parameters:
labelName - name of the label to find related labels with
maxCount - the maximum number of labels to return, or the default if this is 0
Returns:

getRelatedLabelsInSpace

public List<Label> getRelatedLabelsInSpace(String labelName,
                                           String spaceKey,
                                           int maxCount)
Returns the labels related to the given label name in the given space

Parameters:
labelName - name of the label to find related labels with
spaceKey - the key of the space to search in
maxCount - the maximum number of labels to return, or the default if this is 0
Returns:

createSpace

public Space createSpace(Space space)

createSpace

public Space createSpace(String key,
                         String name,
                         String description)

createPersonalSpace

public Space createPersonalSpace(User user)

removeSpace

public boolean removeSpace(String spaceKey)
Removes the space if it exists, otherwise does nothing.


getSpaces

public List<Space> getSpaces()
Retrieves spaces visible to the currently logged in rpc user

Returns:
spaces visible spaces

createUser

public boolean createUser(User user)
Adds the given user

Returns:
true if the user was successfully created

createUser

public boolean createUser(User user,
                          boolean notifyUser)
Adds the given user

Returns:
true if the user was successfully created

getUser

public User getUser(String username)
Retrieves a user with the given username

Returns:
the user matching the given username, without a password

getUserInformation

public UserInformation getUserInformation(User user)

getUserInformation

public UserInformation getUserInformation(String username)

setUserInformation

public boolean setUserInformation(UserInformation userInfo)
Updates a user's information

Returns:
true if the user's information is successfully updated

setUserDetailProperty

public boolean setUserDetailProperty(User user,
                                     String key,
                                     String value)
Update a UserDetail property via the UserDetailsManager.


getUsernames

public List<String> getUsernames(boolean viewAll)
Retrieves the usernames of the current system users

Parameters:
viewAll - If false, all usernames in the confluence-users group will be returned. Otherwise, every registered username is returned.
Returns:
usernames found

changeUserPassword

public boolean changeUserPassword(String username,
                                  String newPassword)
Attempts to set the specified password for the specified user

Returns:
true if the user's password is successfully changed

changeMyPassword

public boolean changeMyPassword(String oldPassword,
                                String newPassword)
Attempts to change the current user's old password with the specified new password

Returns:
true if the current user's password is successfully changed

editUser

public boolean editUser(User user)
Attempts to edit the details of the specified user

Returns:
true if the user's details are successfully edited

removeUser

public void removeUser(User user)

removeUser

public boolean removeUser(String username)
Removes the user if it exists, otherwise does nothing.

Returns:
true if the user was removed

hasUser

public boolean hasUser(String username)
Checks whether a user with the specified username exists

Returns:
true if the user exists

deactivateUser

public boolean deactivateUser(String username)
Deactivates the user matching the specified username

Returns:
true if the user is deactivated

reactivateUser

public boolean reactivateUser(String username)
Reactivates the user matching the specified username

Returns:
true if the user is reactivated

isActiveUser

public boolean isActiveUser(String username)
Checks whether the user is active

Parameters:
username - The username of the user whose status to check
Returns:
True if the user is active, false otherwise

createGroup

public void createGroup(String groupname)

createGroup

public void createGroup(Group group)

removeGroup

public boolean removeGroup(Group group)
Removes the group if it exists, otherwise does nothing

Returns:
true if the group was removed

removeGroup

public boolean removeGroup(String groupname,
                           String defaultGroupName)
Removes the group if it exists, otherwise does nothing

Parameters:
groupname - the group to remove
defaultGroupName - another group to put existing members of the group in. Can be an empty string if users should not be added to any other group.
Returns:
true if the group was removed

hasGroup

public boolean hasGroup(String groupname)
Checks whether or not a group matching the specified name exists

Returns:
true if the group exists

getGroups

public List<Group> getGroups()
Retrieves existing groups

Returns:
existing groups

getUserGroups

public List<Group> getUserGroups(String username)
Retrieves the groups that a user matching the specified username belongs to

Returns:
groups that the user belongs to

addUserToGroup

public boolean addUserToGroup(String username,
                              String groupname)

addUserToGroup

public boolean addUserToGroup(User user,
                              Group group)

removeUserFromGroup

public boolean removeUserFromGroup(User user,
                                   Group group)

removeUserFromGroup

public boolean removeUserFromGroup(String username,
                                   String groupname)

exportSpace

public String exportSpace(Space space,
                          String exportType)
Returns the URL of the downloadable export.


exportSite

public String exportSite(boolean exportAttachments)
Returns the URL of the downloadable export.


getContentPermissionSet

public Map<String,Object> getContentPermissionSet(long contentId,
                                                  ContentPermissionType permissionType)

getContentPermissions

public List<Map<String,String>> getContentPermissions(long contentId,
                                                      ContentPermissionType permissionType)

getPermissionsForUser

public List<String> getPermissionsForUser(String spaceKey,
                                          String username)

getPermissionsForUser

public List<String> getPermissionsForUser(Space space,
                                          User user)

grantPermission

public void grantPermission(SpacePermission permission,
                            Space space,
                            Entity entity)

grantPermissions

public void grantPermissions(Space space,
                             Entity entity,
                             SpacePermission... permissions)

grantAllPermissionsExceptAdmin

public void grantAllPermissionsExceptAdmin(Entity entity,
                                           Space space)

grantContentPermission

public void grantContentPermission(ContentPermission contentPermission,
                                   ContentEntity contentEntity)

grantContentPermission

public void grantContentPermission(ContentEntity contentEntity,
                                   Entity entity,
                                   ContentPermissionType permissionType)

grantContentPermissions

public void grantContentPermissions(ContentEntity contentEntity,
                                    List<? extends Entity> entities,
                                    ContentPermissionType permissionType)

revokeContentPermission

public void revokeContentPermission(ContentPermission contentPermission,
                                    ContentEntity contentEntity)

grantAnonymousPermission

public void grantAnonymousPermission(SpacePermission permission,
                                     Space space)

revokePermission

public void revokePermission(SpacePermission permission,
                             Space space,
                             Entity entity)

revokePermissions

public void revokePermissions(Space space,
                              Entity entity,
                              SpacePermission... permissions)
Unfortunately there is no revokePermissions method on the API, so this just calls the singular method repeatedly.


revokeAnonymousPermission

public void revokeAnonymousPermission(SpacePermission permission,
                                      Space space)

grantPermission

public void grantPermission(GlobalPermission permission,
                            Entity entity)

revokePermission

public void revokePermission(GlobalPermission permission,
                             Entity entity)

getGlobalPermissions

public List<GlobalPermission> getGlobalPermissions(Group group)

revokeAllPermissions

public boolean revokeAllPermissions(Group group)
Removes all permissions for the specified group

Returns:
true if all permissions were removed

grantAnonymousUsePermission

public void grantAnonymousUsePermission()

revokeAnonymousUsePermission

public void revokeAnonymousUsePermission()

grantAnonymousViewUserProfilePermission

public boolean grantAnonymousViewUserProfilePermission()

revokeAnonymousViewUserProfilePermission

public void revokeAnonymousViewUserProfilePermission()

setContentTextProperty

public void setContentTextProperty(long contentId,
                                   String key,
                                   String value)

getContentPropertyKeys

public List<String> getContentPropertyKeys(long contentId)

flushIndexQueue

public boolean flushIndexQueue()
Triggers an index queue flush and blocks until flush is complete.


clearIndex

public void clearIndex()

clearIndexQueue

public boolean clearIndexQueue()

buildDidYouMeanIndex

public void buildDidYouMeanIndex()
Builds the "Did you mean" index via RPC and waits for an event to show that the index build is complete.

Throws:
RuntimeException - if the index times out.

runJob

public void runJob(QuartzJob job)
Trigger a quartz job on the server. Waits for the job to complete before returning.


runJob

public void runJob(String jobName)

getLocalisedText

public String getLocalisedText(String messageKey)
Returns the localised message text for the given key, retrieved from the application via RPC. The message will be localised to the administrator's locale.

If the key is not found, the key itself will be returned, as per ConfluenceActionSupport.getText(String).

Parameters:
messageKey - the message key to internationalise.
Returns:
a localised message in the administrator's locale
See Also:
FuncTestRpcHandler.getLocalisedText(String, String), ConfluenceActionSupport.getText(String)

getMailQueueSize

public int getMailQueueSize()

clearMailQueue

public void clearMailQueue()

clearQueue

public void clearQueue(String queueName)

getNumberOfIndexTasksInQueue

public int getNumberOfIndexTasksInQueue()

getUserLocale

public Locale getUserLocale(User user)

setUserLocale

public void setUserLocale(User user,
                          Locale locale)

setKeyboardShortcutPref

public void setKeyboardShortcutPref(User user,
                                    boolean enabled)

setWatchOwnContent

public void setWatchOwnContent(User user,
                               boolean enabled)

removeDrafts

public void removeDrafts(User user)

removeTestData

public void removeTestData(Set<User> usersToKeep,
                           Set<Group> groupsToKeep,
                           Map<Group,HashSet<User>> userGroupMembershipsToKeep)
Perform all test-data reset tasks.

Parameters:
usersToKeep -
groupsToKeep -
userGroupMembershipsToKeep -

removeTestDataAfterExternalUserManagement

public void removeTestDataAfterExternalUserManagement()
Called on an instance that manages User/Group data externally, this will: 1. Remove any data that should be removed *before* the Users/Groups are reset 2. Synchronize with the remote User/Group directory 3. Remove remaining data


removeAllSpaces

public void removeAllSpaces()

changeBlogPostModificationDate

public void changeBlogPostModificationDate(long blogId,
                                           Date modificationDate)

changePageModificationDate

public void changePageModificationDate(long pageId,
                                       Date modificationDate)

changeAttachmentCreatedDate

public void changeAttachmentCreatedDate(Attachment attachment,
                                        Date createdDate)

pauseAllJobs

public void pauseAllJobs()

pauseJobGroup

public void pauseJobGroup(String jobGroupName)

pauseJob

public void pauseJob(String jobName)

pauseJob

public void pauseJob(QuartzJob job)

resumeJob

public void resumeJob(String jobName)

resumeJob

public void resumeJob(QuartzJob job)

getGlobalConfiguredTheme

public String getGlobalConfiguredTheme()

getConfiguredThemeForSpace

public String getConfiguredThemeForSpace(String spaceKey)

setGlobalTheme

public void setGlobalTheme(BundledTheme theme)

setThemeForSpace

public void setThemeForSpace(Space space,
                             BundledTheme theme)

clearCustomHtml

public void clearCustomHtml()

createJohnsonEvent

public void createJohnsonEvent(String message)

removeAllJohnsonEvents

public void removeAllJohnsonEvents()

enableCaptcha

public void enableCaptcha(boolean enable)

enableCaptchaDebugMode

public void enableCaptchaDebugMode(boolean enable)

setDraftSaveInterval

public void setDraftSaveInterval(int seconds)

doesDraftExist

public boolean doesDraftExist(String contentId,
                              String draftCreator,
                              String draftType,
                              String spaceKey)

search

public List<Hashtable<String,String>> search(String queryString,
                                             int maxMatches)
Search for the supplied query String.

Parameters:
queryString - the query
maxMatches - the maximum number of matches to be returned
Returns:
a List of Hashtables representing SearchResults or the empty list if there are no matches.

importSpace

public void importSpace(File zippedXmlBackup)
                 throws IOException
Throws:
IOException

importSpace

public void importSpace(byte[] zippedXmlBackup)
                 throws IOException
Throws:
IOException

getPagePermissions

public Collection<ContentPermissionEntry> getPagePermissions(long pageId)

getSystemProperty

public String getSystemProperty(String name)
Retrieve the value of the specified System property on the Confluence server.

Parameters:
name - the property to retrieve
Returns:
the value of the system property on the server, or null if it is not set

setSystemProperty

public void setSystemProperty(String name,
                              String value)
Set the specified System property on the Confluence server. If the value is null, the system property will be removed instead.

Parameters:
name - the property to set
value - the value to set

clearSystemProperty

public void clearSystemProperty(String name)
Clear the specified System property on the Confluence server.

Parameters:
name - the property to set

getPluginHelper

public PluginHelper getPluginHelper()
Retrieve a PluginHelper that manipulates plugin using this ConfluenceRpc.


createUserMacro

public void createUserMacro(String name,
                            boolean hasBody,
                            String bodyType,
                            String outputType,
                            String template)

createUserMacro

public void createUserMacro(String name,
                            boolean hasBody,
                            String bodyType,
                            String outputType,
                            String template,
                            String title,
                            String description,
                            String category,
                            String iconUrl,
                            String documentationUrl,
                            boolean hidden)

removeUserMacro

public void removeUserMacro(String name)

getPersonalInformationId

public long getPersonalInformationId(String username)

removePersonalInformation

public void removePersonalInformation(User user)
PersonalInformation gets created automatically by the rpc create user method. This method exists to allow testing that the PersonalInformation will get created appropriately when it doesn't exist (eg for LDAP users).

Parameters:
user - whose personalInformation will be removed

setLogLevel

@Deprecated
public String setLogLevel(String logger,
                                     String level)
Deprecated. since 3.3 use setLogLevel(String, Level)

Sets the log level of the specified logger, returning the old value.

Parameters:
logger - the logger to change the logging for, e.g. com.atlassian.confluence.core.ConfluenceActionSupport
level - the level to set the logger to, e.g. ERROR
Returns:
the previous level the logger was set to.

setLogLevel

public org.apache.log4j.Level setLogLevel(String logger,
                                          org.apache.log4j.Level level)
Sets the log level of the specified logger, returning the old value.

Parameters:
logger - the logger to change the logging for, e.g. com.atlassian.confluence.core.ConfluenceActionSupport
level - the level to set the logger to, e.g. Level.ERROR
Returns:
the previous level the logger was set to.

logMessage

public boolean logMessage(RpcLogDestination destination,
                          String message)
Logs a message on the server at a specified log level or to sout or syserr.

Returns:
always true.

setEnableAnonymousAccess

public void setEnableAnonymousAccess(boolean enable)

setEnableJavascriptTop

public void setEnableJavascriptTop(boolean enable)

flushAllCaches

public void flushAllCaches()

getCacheStatistics

public CacheStatistics getCacheStatistics(CacheKey key)

putStringMappingInCache

public void putStringMappingInCache(String cacheKey,
                                    String entryKey,
                                    String value)
                             throws org.apache.xmlrpc.XmlRpcException,
                                    IOException
Throws:
org.apache.xmlrpc.XmlRpcException
IOException

getClusterInformation

public Map<String,Object> getClusterInformation()

isClusteredInstance

public boolean isClusteredInstance()

getCusterNodeStatuses

public Vector<Hashtable> getCusterNodeStatuses()

createPageHierarchy

public List<Page> createPageHierarchy(Space space,
                                      int depth,
                                      String pageTitlePrefix)
Create a simple hierarchy of pages where each page is the parent of the next. Returns the pages created with the top-most first in the list.


addMailServer

public void addMailServer(String serverName,
                          String from,
                          String subjectPrefix,
                          String hostname,
                          int port)

addMailServer

public void addMailServer(String serverName,
                          String from,
                          String subjectPrefix,
                          String hostname,
                          int port,
                          String fromName)

removeMailServer

public void removeMailServer(String serverName)

flushMailQueue

public void flushMailQueue()

setApplicationConfigProperty

public void setApplicationConfigProperty(String propertyKey,
                                         String propertyValue)

getApplicationConfigProperty

public Object getApplicationConfigProperty(String propertyKey)

follow

public void follow(User user)
Follows the given user with the logged in user.

Parameters:
user - the user to follow.
See Also:
stopFollowing(com.atlassian.confluence.it.User)

stopFollowing

public void stopFollowing(User user)
Stop following the given user.

Parameters:
user - the user to follow.
See Also:
follow(com.atlassian.confluence.it.User)

setUserStatus

public long setUserStatus(String wikiStatus)
Sets the current user's status.

Parameters:
wikiStatus - the new status of the user as wiki markup.

setUserStatus

public UserStatus setUserStatus(UserStatus status)

getConfiguredBaseUrl

public String getConfiguredBaseUrl()
Returns the configured base url on the server.


getServerInfo

public Map<String,Object> getServerInfo()

convertWikiToStorageFormat

public String convertWikiToStorageFormat(String wiki)

enableWebSudo

public void enableWebSudo(boolean enabled)

setWebSudoTimeout

public void setWebSudoTimeout(int timeout)

enablePublicSignUp

public void enablePublicSignUp(boolean enabled)

synchroniseUserDirectories

public void synchroniseUserDirectories()
Synchronises all the directories which support synchronisation (LDAP, remote Crowd, etc.)


setDirectoryPasswordEncoder

public void setDirectoryPasswordEncoder(String directoryName,
                                        String encoder)

purgeFromTrash

public void purgeFromTrash(Space space,
                           long pageId)

getComments

public List<Comment> getComments(Page page)

getComment

public Comment getComment(AbstractPageEntity pageEntity,
                          long commentId)

setSharedMode

public void setSharedMode(boolean enable)

isSpringComponentPresent

public boolean isSpringComponentPresent(String componentName)

removeBandanaKey

public void removeBandanaKey(String context,
                             String key)

setBandanaKey

public void setBandanaKey(String context,
                          String key,
                          Set<String> value)

setBandanaKey

public void setBandanaKey(String context,
                          String key,
                          List<String> value)

setBandanaKey

public void setBandanaKey(String context,
                          String key,
                          String value)

setBandanaKey

public void setBandanaKey(String context,
                          String key,
                          boolean value)

setBandanaKey

public void setBandanaKey(String context,
                          String key,
                          int value)

updateGlobalSetting

public boolean updateGlobalSetting(String name,
                                   boolean value)

updateGlobalSetting

public String updateGlobalSetting(String name,
                                  String value)

getAncestors

public List<Page> getAncestors(Page homePage)

getDescendents

public List<Page> getDescendents(Page homePage)

getAttachments

public List<Attachment> getAttachments(Page homePage)

getPageHistory

public List<Map<String,String>> getPageHistory(Page homePage)

getLoggedInUser

public String getLoggedInUser()

createSpaces

public Iterable<String> createSpaces(int i)
Creates a bunch of spaces.

Parameters:
i - the number of spaces to create
Returns:
an iterable of the keys of the spaces created

archiveSpace

public void archiveSpace(Space space)

unarchiveSpace

public void unarchiveSpace(Space space)


Copyright © 2003-2012 Atlassian. All Rights Reserved.