com.atlassian.confluence.it.rpc
Class ConfluenceRpc

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

public class ConfluenceRpc
extends java.lang.Object

A client-side stub of the Confluence remote API.

DO NOT add methods to this class! Per the manifesto in AdminRpc, we should be trying to split this class into smaller RPC clients that are accessed directly from tests. Deprecate and replace uses of methods in this class whenever possible.


Nested Class Summary
static class ConfluenceRpc.Version
          Enumeration of all supported versions of the Confluence remote API
 
Field Summary
 AdminRpc admin
           
 AttachmentRpc attachments
           
 AuthenticatedWebResourceProvider baseResourceProvider
           
 ContentRpc content
           
 DarkFeaturesHelper darkFeatures
           
 LabelsRpc labels
           
 LikesRpc likes
           
 MailRpc mail
           
 NotificationsRpc notifications
           
 SpaceRpc spaces
           
 UserPreferencesRpc userPreferences
           
 
Method Summary
 boolean addExistingProfilePicture(java.lang.String username, java.lang.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
 boolean addLabel(java.lang.String label, AbstractContentEntity target)
           
 boolean addLabelByObject(java.lang.Object remoteLabel, Page page)
          Adds a label to the specified page
 boolean addLabelToSpace(java.lang.String label, Space space)
          Adds a label to the specified space
 void addMailServer(java.lang.String serverName, java.lang.String from, java.lang.String subjectPrefix, java.lang.String hostname, int port)
          Deprecated. since 5.0. Use addSmtpServer(String, String, String, String, int) instead.
 void addMailServer(java.lang.String serverName, java.lang.String from, java.lang.String subjectPrefix, java.lang.String hostname, int port, java.lang.String fromName)
          Deprecated. since 5.0. Use addSmtpServer(String, String, String, String, int, String) instead.
 boolean addProfilePicture(java.lang.String username, java.lang.String filename, java.lang.String mimeType, byte[] pictureData)
          Attempts to add a profile picture to a user's profile
 boolean addSidebarQuickLink(java.lang.String spaceKey, long pageId, java.lang.String title, java.lang.String customClass)
          Deprecated. since 5.2 use executeAuthPluginXmlRpc(String, String, Object...)
 void addSmtpServer(java.lang.String serverName, java.lang.String from, java.lang.String subjectPrefix, java.lang.String hostname, int port)
           
 void addSmtpServer(java.lang.String serverName, java.lang.String from, java.lang.String subjectPrefix, java.lang.String hostname, int port, java.lang.String fromName)
           
 boolean addUserToGroup(java.lang.String username, java.lang.String groupname)
           
 boolean addUserToGroup(User user, Group group)
           
 void archiveSpace(Space space)
           
protected  java.util.Vector<java.lang.Object> args(java.lang.Object... params)
           
 void assertThatMostRecentIndexEntriesHaveBeenProcessed(ContentEntity... entities)
           
 void changeAttachmentCreatedDate(Attachment attachment, java.util.Date createdDate)
           
 void changeBlogPostModificationDate(long blogId, java.util.Date modificationDate)
           
 void changeCommentCreatedDate(Comment comment, java.util.Date newCreationDate)
           
 boolean changeMyPassword(java.lang.String oldPassword, java.lang.String newPassword)
          Attempts to change the current user's old password with the specified new password
 void changePageCreatedDate(long id, java.util.Date newDate)
           
 void changePageModificationDate(long pageId, java.util.Date modificationDate)
           
 boolean changeUserPassword(java.lang.String username, java.lang.String newPassword)
          Attempts to set the specified password for the specified user
 void clearCustomHtml()
           
 void clearIndex()
           
 boolean clearIndexQueue()
           
 void clearMailQueue()
           
 void clearQueue(java.lang.String queueName)
           
 void clearSystemProperty(java.lang.String name)
          Clear the specified System property on the Confluence server.
 java.lang.String convertWikiMarkupToXhtml(java.lang.String wikiMarkup, long pageId)
           
 java.lang.String convertWikiToStorageFormat(java.lang.String wiki)
           
 java.lang.String convertXhtmlToWikiMarkup(java.lang.String xhtml, long pageId)
           
 int countDrafts(User user)
           
 long createAttachment(Attachment attachment)
           
 long createAttachment(ContentEntity page, Attachment attachment)
           
 long createAttachment(long contentId, Attachment attachment)
           
 long createAttachmentOnDraft(Attachment attachment)
           
 long createBlogPost(BlogPost blogPost)
           
 long createComment(Comment comment)
           
 long createComment(Comment comment, long parentCommentId)
          Deprecated. Since 5.5. Just call createComment(Comment) with a Comment that has a parentId set.
 long createDraft(Draft draft)
           
 void createGroup(Group group)
           
 void createGroup(java.lang.String groupname)
           
 void createJohnsonEvent(java.lang.String message)
           
 long createPage(Page page)
           
 java.util.Map<java.lang.String,java.lang.String> createPage(java.lang.String spaceKey, java.lang.String title, java.lang.String content, long parentPageId)
          Deprecated. Since 5.4. Use createPage(Page).
 java.util.List<Page> createPageHierarchy(Space space, int depth, java.lang.String pageTitlePrefix)
          Create a simple hierarchy of pages where each page is the parent of the next.
 java.util.List<Page> createPagesFromPrototype(Page pageTemplate, int count)
           
 Space createPersonalSpace(User user)
           
 Space createSpace(Space space)
           
 Space createSpace(java.lang.String key, java.lang.String name, java.lang.String description)
          Deprecated. Since 5.5. Create a Space and call createSpace(Space).
 java.lang.Iterable<java.lang.String> createSpaces(int i)
          Creates a bunch of spaces.
 long createTemplate(java.lang.String templateName, java.lang.String content, Space space)
           
 long createTemplateWithStorageFormat(java.lang.String templateName, java.lang.String storageFormat, Space space)
           
 int createTestUsers(int count)
           
 boolean createUser(User user)
          Adds the given user
 boolean createUser(User user, boolean notifyUser)
          Adds the given user
 void createUserMacro(java.lang.String name, boolean hasBody, java.lang.String bodyType, java.lang.String outputType, java.lang.String template)
           
 void createUserMacro(java.lang.String name, boolean hasBody, java.lang.String bodyType, java.lang.String outputType, java.lang.String template, java.lang.String title, java.lang.String description, java.lang.String category, java.lang.String iconUrl, java.lang.String documentationUrl, boolean hidden)
           
 long createWikiMarkupPage(Page page)
          Deprecated. Since 5.4. Use XHTML markup in your tests, and call createPage(Page)
 boolean deactivateUser(java.lang.String username)
          Deactivates the user matching the specified username
 void disableAnonymousAccess()
           
 boolean doesDraftExist(java.lang.String contentId, java.lang.String draftCreator, java.lang.String draftType, java.lang.String spaceKey)
           
 void editAttachment(Attachment updatedAttachment)
          Edit either the owning page or the filename of the attachment.
 void editPage(Space space, java.lang.String pageTitle, java.lang.String newTitle, java.lang.String newContent)
          Modifies the page with the given details
 boolean editUser(User user)
          Attempts to edit the details of the specified user
 void enableAnonymousAccess()
           
 void enableCaptcha(boolean enable)
           
 void enableCaptchaDebugMode(boolean enable)
           
 boolean enableDailyReportNotification(User user, boolean dailyReportEnabled)
           
 void enableElevatedSecurityCheck(boolean enabled)
           
 void enableNewUserEmailNotifications()
           
 void enablePublicSignUp(boolean enabled)
           
 void enableWebSudo(boolean enabled)
           
 java.lang.Object execute(java.lang.String method, java.lang.Object... args)
          Deprecated. Since 5.6. Use the less ambiguous executeOnCurrentNode(String, Object...)
 java.lang.Object executeAuthPluginXmlRpc(java.lang.String servicePath, java.lang.String method, java.lang.Object... args)
          Deprecated. Since 5.6. Use the less ambiguous executeAuthPluginXmlRpcOnCurrentNode(String, String, Object...)
<T> T
executeAuthPluginXmlRpcOnCurrentNode(java.lang.String servicePath, java.lang.String method, java.lang.Object... args)
           
 java.lang.Object executeFuncTest(java.lang.String method, java.lang.Object... args)
          Deprecated. Since 5.6. Use the less ambiguous executeFuncTestOnCurrentNode(String, Object...)
<T> T
executeFuncTestOnCurrentNode(java.lang.String method, java.lang.Object... args)
          Instead of using the execute methods directly, consider adding a wrapper method to ConfluenceRpc.
protected  java.lang.Object executeFuncTestWithToken(java.lang.String method, java.lang.String token, java.lang.Object... args)
          Deprecated. 
<T> T
executeOnCurrentNode(java.lang.String method, java.lang.Object... args)
           
 java.lang.Object executePluginXmlRpc(java.lang.String servicePath, java.lang.String method, java.lang.Object... args)
          Execute a Confluence plugin rpc method as anonymous user.
protected  java.lang.Object executeRpc(java.lang.String rpcBase, java.lang.String methodToken, java.lang.String method, java.lang.Object... args)
          Deprecated. 
 java.lang.Object executeWithToken(java.lang.String method, java.lang.String token, java.lang.Object... args)
          Execute method with the specified token.
 java.lang.String exportSite(boolean exportAttachments)
          Returns the URL of the downloadable export.
 java.lang.String exportSpace(Space space, java.lang.String exportType)
          Returns the URL of the downloadable export.
 void flushAllCaches()
           
 void flushEdgeIndexQueue()
           
 boolean flushIndexQueue()
          Triggers an index queue flush and blocks until flush is complete.
 boolean flushIndexQueue(long time, java.util.concurrent.TimeUnit unit)
           
 void flushIndexQueueAndVerify(ContentEntity... contentEntities)
          Flush the entire index queue, and explicitly assert that the given content entities had their most recent index queue journal entries processed.
 void flushMailQueue()
          waits for all async events to be processed and flushes mail queue waiting is needed because otherwise there's a chance that mail won't be in queue at time of flushing
 void follow(User user)
          Follows the given user with the logged in user.
 java.util.List<java.util.Map> getAliveThreads()
           
 java.util.List<Page> getAncestors(Page homePage)
           
 java.lang.String getAnonymoizedCurrentClusterNodeIdentifier()
           
 java.lang.Object getApplicationConfigProperty(java.lang.String propertyKey)
           
 Attachment getAttachment(long contentId, java.lang.String fileName)
           
 byte[] getAttachmentData(Attachment attachment, java.lang.String version)
           
 byte[] getAttachmentData(long contentId, java.lang.String fileName, java.lang.String version)
           
 long getAttachmentId(long contentId, java.lang.String fileName)
           
 java.util.List<Attachment> getAttachments(Page homePage)
           
 java.lang.Object getBandanaValue(java.lang.String context, java.lang.String key)
           
 java.lang.String getBaseUrl()
           
 BlogPost getBlogPost(long pageId)
          Returns the blog post with the specified page ID.
 java.lang.Integer getCacheMaximumNumberOfElements(java.lang.String cacheName)
          Deprecated. since 5.6. Use CacheRpc.getCacheMaxEntries(String) directly.
 CacheStatistics getCacheStatistics(CacheKey key)
           
 java.util.Set<CacheStatistics.Capability> getCacheStatisticsCapabilities()
           
 java.util.List<Page> getChildren(long parentPageId)
           
 java.util.Map<java.lang.String,java.lang.Object> getClusterInformation()
           
 Comment getComment(AbstractPageEntity pageEntity, long commentId)
           
 java.util.List<Comment> getComments(Page page)
           
 java.lang.String getConfiguredBaseUrl()
          Returns the configured base url on the server.
 java.lang.String getConfiguredThemeForSpace(java.lang.String spaceKey)
           
 long getContentPermissionId(ContentPermission contentPermission, long pageId)
           
 long getContentPermissionId(long pageId, java.lang.String permissionType, java.lang.String username)
           
 java.util.List<java.util.Map<java.lang.String,java.lang.String>> getContentPermissions(long contentId, ContentPermissionType permissionType)
           
 java.util.Map<java.lang.String,java.lang.Object> getContentPermissionSet(long contentId, ContentPermissionType permissionType)
           
 java.lang.String getContentPropertiesString(long contentId, java.lang.String key)
          Uses ContentProperties.
 java.lang.String getContentPropertiesStringForSpace(java.lang.String spaceKey, java.lang.String key)
          Uses ContentProperties associated with the SpaceDescription.
 java.lang.String getContentProperty(long contentId, java.lang.String key)
          Uses ContentPropertyManager.
 java.util.List<java.lang.String> getContentPropertyKeys(long contentId)
          Uses ContentPropertyManager.
 java.util.Vector<java.util.Hashtable> getCusterNodeStatuses()
           
 DarkFeaturesHelper getDarkFeaturesHelper()
           
 java.lang.String getDatabaseStatistics()
           
 java.util.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, java.lang.String pageTitle)
          Retrieve the fully populated Page object for a page, known to exist in confluence.
 java.lang.String getExportBuildNumber()
           
 java.lang.String getFriendlyRelativeDate(java.util.Date now, java.util.Date date, TimeZone timeZone)
          Use the FriendlyDateFormatter to format the date relative to the "now" time.
 java.lang.String getGlobalConfiguredTheme()
           
 java.util.List<GlobalPermission> getGlobalPermissions(Group group)
           
 java.util.List<Group> getGroups()
          Retrieves existing groups
 java.util.List<SearchResult> getLabelContent(long labelId)
           
 java.util.List<SearchResult> getLabelContent(java.lang.String labelName)
           
 java.util.List<SearchResult> getLabelContentByObject(java.lang.Object remoteLabel)
          Returns the content for a given label object
 java.util.List<Label> getLabels(long pageId)
          Retrieves the labels for the page matching the specified pageId
 java.util.List<Label> getLabels(java.lang.String labelName, java.lang.String namespace, java.lang.String spaceKey, java.lang.String owner)
          Retrieves the labels matching the given labelName, namespace or owner.
 java.lang.String getLocalisedText(java.lang.String messageKey)
          Returns the localised message text for the given key, retrieved from the application via RPC.
 java.lang.String getLoggedInUser()
           
 int getMailQueueSize()
           
 java.util.List<Label> getMostPopularLabels(int maxCount)
          Returns the most popular labels
 java.util.List<Label> getMostPopularLabelsInSpace(java.lang.String spaceKey, int maxCount)
          Returns the most popular labels in the space with the specified key
 int getNumberOfActiveUsers()
           
 int getNumberOfIndexTasksInQueue()
           
 java.lang.String getOldestSpaceImportAllowed()
           
 java.lang.String getPageContent(long pageId)
           
 java.util.List<java.util.Map<java.lang.String,java.lang.String>> getPageHistory(Page homePage)
           
 long getPageId(Page page)
           
 long getPageId(java.lang.String spaceKey, java.lang.String title)
           
 java.util.List<java.lang.Long> getPageIdsInSpace(Space space)
           
 java.util.Collection<ContentPermissionEntry> getPagePermissions(long pageId)
           
 java.util.List<Page> getPagesInSpace(Space space)
           
 Page getPageWithDetails(long pageId)
          A heavier version of getExistingPage(long), that makes several calls to the server to flesh out the space and the last modifier.
 long getParentId(long pageId)
           
 java.util.List<java.lang.String> getPermissionsForUser(Space space, User user)
           
 java.util.List<java.lang.String> getPermissionsForUser(java.lang.String spaceKey, java.lang.String username)
           
 long getPersonalInformationId(java.lang.String username)
           
 java.lang.String getPluginExportCompatibility(java.lang.String pluginKey)
           
 PluginHelper getPluginHelper()
          Retrieve a PluginHelper that manipulates plugin using this ConfluenceRpc.
 java.util.List<Label> getRecentlyUsedLabels(int maxCount)
          Returns the recently used labels for the Confluence instance, with a specified maximum number of results.
 java.util.List<Label> getRecentlyUsedLabelsInSpace(java.lang.String spaceKey, int maxCount)
          Returns the recently used labels in the space with the specified key
 java.util.List<Label> getRelatedLabels(java.lang.String labelName, int maxCount)
          Returns the labels related to the given label name
 java.util.List<Label> getRelatedLabelsInSpace(java.lang.String labelName, java.lang.String spaceKey, int maxCount)
          Returns the labels related to the given label name in the given space
 java.util.Map<java.lang.String,java.lang.Object> getServerInfo()
           
 Space getSpace(java.lang.String spaceKey)
          Returns the space with the specified key.
 java.util.List<Space> getSpaces()
          Retrieves spaces visible to the currently logged in rpc user
 java.util.List<Space> getSpacesContainingContentWithLabel(java.lang.String labelName)
           
 java.util.List<Space> getSpacesWithLabel(java.lang.String labelName)
           
 java.lang.String getSystemProperty(java.lang.String name)
          Retrieve the value of the specified System property on the Confluence server.
 java.util.List<Page> getTopLevelPages(java.lang.String spaceKey)
           
 UserWithKey getUser(java.lang.String username)
          Retrieves a user with the given username
 UserWithKey getUser(java.lang.String username, java.lang.String password)
           
 UserWithKey getUser(User user)
           
 java.util.List<Group> getUserGroups(java.lang.String username)
          Retrieves the groups that a user matching the specified username belongs to
 UserInformation getUserInformation(java.lang.String username)
           
 UserInformation getUserInformation(User user)
           
 java.util.Locale getUserLocale(User user)
           
 java.util.List<java.lang.String> getUsernames(boolean viewAll)
          Retrieves the usernames of the current system users
 void grantAllPermissions(Entity entity, Space space)
           
 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, java.util.List<? extends Entity> entities, ContentPermissionType permissionType)
           
 void grantPermission(GlobalPermission permission, Entity entity)
           
 void grantPermission(SpacePermission permission, Space space, Entity entity)
           
 void grantPermission(SpacePermission permission, java.lang.String spaceKey, Entity entity)
           
 void grantPermissions(Space space, Entity entity, SpacePermission... permissions)
           
 boolean hasGroup(java.lang.String groupname)
          Checks whether or not a group matching the specified name exists
 boolean hasUser(java.lang.String username)
          Checks whether a user with the specified username exists
 void importSpace(byte[] zippedXmlBackup)
           
 void importSpace(java.io.File zippedXmlBackup)
           
 boolean isActiveUser(java.lang.String username)
          Checks whether the user is active
 boolean isClusteredInstance()
           
 boolean isDarkFeatureEnabled(java.lang.String key)
           
 boolean isImportTaskRunning()
           
 boolean isPluginUpgradeTasksComplete()
           
 boolean isSpringComponentPresent(java.lang.String componentName)
           
 boolean isUnlimitedUserLicense()
           
 void logIn(User user)
          Set the current user logged into this rpc client.
 boolean logMessage(RpcLogDestination destination, java.lang.String message)
          Logs a message on the server at a specified log level or to sout or syserr.
 void logOut()
           
 void moveBlogPost(BlogPost blogPost, Space targetSpace)
           
 void movePage(long sourcePageId, long targetPageId, java.lang.String position)
           
 void movePage(Page page, Page target, java.lang.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(BaseUrlSelector baseUrlSelector)
          Create a new RPC stub pointed at the default version of the server-side API.
static ConfluenceRpc newInstance(BaseUrlSelector baseUrlSelector, com.sun.jersey.api.client.Client restClient)
           
static ConfluenceRpc newInstance(BaseUrlSelector baseUrlSelector, ConfluenceRpc.Version version)
          Create a new RPC stub pointed at a specific version of the server-side API.
static ConfluenceRpc newInstance(java.lang.String baseUrl)
          Create a new RPC stub pointed at the default version of the server-side API.
static ConfluenceRpc newInstance(java.lang.String baseUrl, com.sun.jersey.api.client.Client restClient)
          Deprecated. 
static ConfluenceRpc newInstance(java.lang.String baseUrl, ConfluenceRpc.Version version)
          Create a new RPC stub pointed at a specific version of the server-side API.
static ConfluenceRpc newInstanceForSetup(java.lang.String baseUrl, ConfluenceRpc.Version version)
          Create a new RPC stub pointed at a specific version of the server-side API, for use with Setup acceptance tests.
protected  java.util.Hashtable<java.lang.String,java.lang.String> object(java.lang.String... args)
           
 void pauseAllJobs()
           
 void pauseJob(QuartzJob job)
           
 void pauseJob(java.lang.String jobName)
          Deprecated. Since 5.6. Use SchedulerRpc.pauseJob(QuartzJob)
 void pauseJobGroup(java.lang.String jobGroupName)
           
 java.lang.String performBackup(boolean exportAttachments)
           
 void purgeFromTrash(Space space, long pageId)
           
 void putStringMappingInCache(java.lang.String cacheName, java.lang.String entryKey, java.lang.String value)
           
 boolean reactivateUser(java.lang.String username)
          Reactivates the user matching the specified username
 void removeAllJohnsonEvents()
           
 void removeAllSpaces()
           
 void removeAttachment(long pageId, java.lang.String fileName)
           
 void removeAttachmentUncleanly(long pageId, java.lang.String fileName)
           
 void removeBandanaKey(java.lang.String context, java.lang.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(java.lang.String groupname, java.lang.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(java.lang.String label, Page page)
          Removes a label from the specified page
 boolean removeLabelByObject(java.lang.Object remoteLabel, Page page)
          Removes a label from the specified page
 boolean removeLabelFromSpace(java.lang.String label, Space space)
          Removes a label from the specified space
 void removeMailServer(java.lang.String serverName)
           
 boolean removePage(long pageId)
           
 boolean removePage(Page page)
           
 boolean removePageVersion(long historicalPageId)
           
 boolean removePageVersion(long pageId, int version)
           
 void removePersonalInformation(User user)
          PersonalInformation gets created automatically by the rpc create user method.
 void removeSidebarQuickLink(java.lang.String spaceKey, long pageId)
          Deprecated. since 5.2 use executeAuthPluginXmlRpc(String, String, Object...)
 void removeSidebarQuickLinks(java.lang.String spaceKey)
          Deprecated. since 5.2 use executeAuthPluginXmlRpc(String, String, Object...)
 boolean removeSpace(java.lang.String spaceKey)
          Removes the space if it exists, otherwise does nothing.
 void removeTestData(java.util.Set<User> usersToKeep, java.util.Set<Group> groupsToKeep, java.util.Map<Group,java.util.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(java.lang.String username)
          Removes the user if it exists, otherwise does nothing.
 void removeUser(User user)
           
 boolean removeUserDirectory(long directoryId)
           
 boolean removeUserFromGroup(java.lang.String username, java.lang.String groupname)
           
 boolean removeUserFromGroup(User user, Group group)
           
 void removeUserMacro(java.lang.String name)
           
 boolean renameUser(java.lang.String oldUsername, java.lang.String newUsername)
           
 void resetDatabaseStatistics()
           
 boolean resetWelcomeMessage()
           
 void restoreAbstractPage(long id)
           
 void resumeJob(QuartzJob job)
           
 void resumeJob(java.lang.String jobName)
          Deprecated. Since 5.6. Use SchedulerRpc.resumeJob(QuartzJob)
 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 runGarbageCollection()
           
 void runJob(QuartzJob job)
          Trigger a quartz job on the server.
 void runJob(java.lang.String jobName)
          Deprecated. Since 5.6. Use SchedulerRpc.triggerJob(QuartzJob, boolean).
 long saveBlogPost(BlogPost blogPost)
           
 long saveComment(Comment comment)
           
 void saveDateFormat(java.lang.String pattern)
           
 long savePage(Page page)
           
 java.util.List<java.util.Hashtable<java.lang.String,java.lang.String>> search(java.lang.String queryString, java.util.Hashtable<java.lang.String,java.lang.String> params, int maxMatches)
           
 java.util.List<java.util.Hashtable<java.lang.String,java.lang.String>> search(java.lang.String queryString, int maxMatches)
          Search for the supplied query String.
 void setApplicationConfigProperty(java.lang.String propertyKey, java.lang.String propertyValue)
           
 void setBandanaKey(java.lang.String context, java.lang.String key, boolean value)
           
 void setBandanaKey(java.lang.String context, java.lang.String key, int value)
           
 void setBandanaKey(java.lang.String context, java.lang.String key, java.util.List<java.lang.String> value)
           
 void setBandanaKey(java.lang.String context, java.lang.String key, java.util.Set<java.lang.String> value)
           
 void setBandanaKey(java.lang.String context, java.lang.String key, java.lang.String value)
           
 void setBlogRestriction(ContentPermission contentPermission, BlogPost blogPost)
          Restricts blog post to single given user or group, wiping out any other existing restrictions.
 void setCacheMaximumNumberOfElements(java.lang.String cacheName, int maxNumElements)
          Deprecated. since 5.6. Use CacheRpc.setCacheMaxEntries(String, int) directly.
 void setContentPropertiesString(long contentId, java.lang.String key, java.lang.String value)
          Uses ContentProperties.
 void setContentPropertiesStringForSpace(java.lang.String spaceKey, java.lang.String key, java.lang.String value)
          Uses ContentProperties associated with the SpaceDescription.
 void setContentRestriction(ContentPermission contentPermission, AbstractPageEntity abstractPage)
          Restricts page or blog post to single given user or group, wiping out any other existing restrictions.
 void setContentTextProperty(long contentId, java.lang.String key, java.lang.String value)
          Uses ContentPropertyManager.
 void setDirectoryPasswordEncoder(java.lang.String directoryName, java.lang.String encoder)
           
 void setDraftSaveInterval(int seconds)
           
 void setEnableAnonymousAccess(boolean enable)
           
 void setEnableAnonymousRpc(boolean enable)
           
 void setGlobalLanguage(java.lang.String locale)
           
 void setGlobalTheme(BundledTheme theme)
           
 void setKeyboardShortcutPref(User user, boolean enabled)
           
 org.apache.log4j.Level setLogLevel(java.lang.String logger, org.apache.log4j.Level level)
          Sets the log level of the specified logger, returning the old value.
 java.lang.String setLogLevel(java.lang.String logger, java.lang.String levelStr)
          Deprecated. since 3.3 use setLogLevel(String, Level)
 void setPageRestriction(ContentPermission contentPermission, Page page)
          Restricts page to a single given user or group, wiping out any other existing restrictions.
 void setPageRestriction(Page page, Entity entity, ContentPermissionType contentPermissionType)
          Restrict page to single given user or group.
 void setSmtpServer(java.lang.String serverName, java.lang.String from, java.lang.String subjectPrefix, java.lang.String hostname, int port)
           
 void setSmtpServer(java.lang.String serverName, java.lang.String from, java.lang.String subjectPrefix, java.lang.String hostname, int port, java.lang.String fromName)
           
 void setSystemProperty(java.lang.String name, java.lang.String value)
          Set the specified System property on the Confluence server.
 void setThemeForSpace(Space space, BundledTheme theme)
           
 boolean setUserDetailProperty(User user, java.lang.String key, java.lang.String value)
          Update a UserDetail property via the UserDetailsManager.
 boolean setUserInformation(UserInformation userInfo)
          Updates a user's information
 void setUserLocale(User user, java.util.Locale language)
           
 boolean setUserPreference(User user, java.lang.String key, boolean value)
           
 boolean setUserPreference(User user, java.lang.String key, java.lang.String value)
           
 long setUserStatus(java.lang.String wikiStatus)
          Sets the current user's status.
 UserStatus setUserStatus(UserStatus status)
           
 void setWatchOwnContent(User user, boolean enabled)
           
 void setWebSudoTimeout(int timeout)
           
 boolean setWelcomeMessage(java.lang.String welcomeMessage)
           
 void stopFollowing(User user)
          Stop following the given user.
 void synchroniseUserDirectories()
          Synchronises all the directories which support synchronisation (LDAP, remote Crowd, etc.)
 com.atlassian.fugue.Option<java.lang.Object> tryGetApplicationConfigProperty(java.lang.String propertyKey)
           
 void unarchiveSpace(Space space)
           
 long updateDraft(Draft draft)
           
 boolean updateGlobalSetting(java.lang.String name, boolean value)
           
 java.lang.String updateGlobalSetting(java.lang.String name, java.lang.String value)
           
 long updatePage(Page page, boolean minorEdit, java.lang.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.
 void waitForEventQueue()
           
 
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

mail

public final MailRpc mail

darkFeatures

public final DarkFeaturesHelper darkFeatures

content

public final ContentRpc content

spaces

public final SpaceRpc spaces

attachments

public final AttachmentRpc attachments

labels

public final LabelsRpc labels

admin

public final AdminRpc admin

baseResourceProvider

public final AuthenticatedWebResourceProvider baseResourceProvider
Method Detail

getFriendlyRelativeDate

public java.lang.String getFriendlyRelativeDate(java.util.Date now,
                                                java.util.Date date,
                                                TimeZone timeZone)
Use the FriendlyDateFormatter to format the date relative to the "now" time. Note that the output format varies greatly even from second to second -- see FriendlyDateFormatter.

Parameters:
now - the date which the relative time is calculated in relation to
date - the date of some event which is to be formatted
timeZone - the current time zone
Returns:
a formatted relative date-time
See Also:
FriendlyDateFormatter

flushIndexQueueAndVerify

public void flushIndexQueueAndVerify(ContentEntity... contentEntities)
Flush the entire index queue, and explicitly assert that the given content entities had their most recent index queue journal entries processed.


newInstance

public static ConfluenceRpc newInstance(java.lang.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(BaseUrlSelector baseUrlSelector,
                                        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

newInstanceForSetup

public static ConfluenceRpc newInstanceForSetup(java.lang.String baseUrl,
                                                ConfluenceRpc.Version version)
Create a new RPC stub pointed at a specific version of the server-side API, for use with Setup acceptance tests.

This method should only be called by Setup tests where the ConfluenceRpc instance is created *before* the plugin system is started. Other tests should call newInstance(String).

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(java.lang.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

newInstance

public static ConfluenceRpc newInstance(BaseUrlSelector baseUrlSelector)
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

newInstance

@Deprecated
public static ConfluenceRpc newInstance(java.lang.String baseUrl,
                                                   com.sun.jersey.api.client.Client restClient)
Deprecated. 

Create a new RPC stub pointed at the default version using the preconfigured Jersey client

Parameters:
baseUrl - the base URL of the server to connect to
restClient - the jersey client to use when create WebResources
Returns:
an RPC stub object

newInstance

public static ConfluenceRpc newInstance(BaseUrlSelector baseUrlSelector,
                                        com.sun.jersey.api.client.Client restClient)

execute

@Deprecated
public java.lang.Object execute(java.lang.String method,
                                           java.lang.Object... args)
                         throws RpcRuntimeException
Deprecated. Since 5.6. Use the less ambiguous executeOnCurrentNode(String, Object...)

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()

executeOnCurrentNode

public <T> T executeOnCurrentNode(java.lang.String method,
                                  java.lang.Object... args)

executeWithToken

public java.lang.Object executeWithToken(java.lang.String method,
                                         @Nullable
                                         java.lang.String token,
                                         java.lang.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 java.lang.Object executePluginXmlRpc(java.lang.String servicePath,
                                            java.lang.String method,
                                            java.lang.Object... args)
                                     throws RpcRuntimeException
Execute a Confluence plugin rpc method as anonymous user.

Parameters:
servicePath - service path of the plugin xmlrpc module
method - the name of the rpc method to call
args - the arguments to be passed to the method. 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

executeAuthPluginXmlRpc

@Deprecated
public java.lang.Object executeAuthPluginXmlRpc(java.lang.String servicePath,
                                                           java.lang.String method,
                                                           java.lang.Object... args)
                                         throws RpcRuntimeException
Deprecated. Since 5.6. Use the less ambiguous executeAuthPluginXmlRpcOnCurrentNode(String, String, Object...)

Execute a Confluence plugin rpc method as the currently logged in user.

Parameters:
servicePath - service path of the plugin xmlrpc module
method - the name of the rpc method to call
args - the arguments to be passed to the method. 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

executeAuthPluginXmlRpcOnCurrentNode

public <T> T executeAuthPluginXmlRpcOnCurrentNode(java.lang.String servicePath,
                                                  java.lang.String method,
                                                  java.lang.Object... args)

executeFuncTest

@Deprecated
public java.lang.Object executeFuncTest(java.lang.String method,
                                                   java.lang.Object... args)
                                 throws RpcRuntimeException
Deprecated. Since 5.6. Use the less ambiguous executeFuncTestOnCurrentNode(String, Object...)

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

executeFuncTestOnCurrentNode

public <T> T executeFuncTestOnCurrentNode(java.lang.String method,
                                          java.lang.Object... args)
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

@Deprecated
protected java.lang.Object executeFuncTestWithToken(java.lang.String method,
                                                               java.lang.String token,
                                                               java.lang.Object... args)
                                             throws RpcRuntimeException
Deprecated. 

Execute a functest method with the specified token.

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

executeRpc

@Deprecated
protected java.lang.Object executeRpc(java.lang.String rpcBase,
                                                 java.lang.String methodToken,
                                                 java.lang.String method,
                                                 java.lang.Object... args)
                               throws RpcRuntimeException
Deprecated. 

Throws:
RpcRuntimeException

object

protected java.util.Hashtable<java.lang.String,java.lang.String> object(java.lang.String... args)

args

protected java.util.Vector<java.lang.Object> args(java.lang.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.


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(java.lang.String spaceKey,
                      java.lang.String title)

getPageIdsInSpace

public java.util.List<java.lang.Long> getPageIdsInSpace(Space space)

getPagesInSpace

public java.util.List<Page> getPagesInSpace(Space space)

getPageContent

public java.lang.String getPageContent(long pageId)

convertWikiMarkupToXhtml

public java.lang.String convertWikiMarkupToXhtml(java.lang.String wikiMarkup,
                                                 long pageId)

convertXhtmlToWikiMarkup

public java.lang.String convertXhtmlToWikiMarkup(java.lang.String xhtml,
                                                 long pageId)

createPage

@Deprecated
public java.util.Map<java.lang.String,java.lang.String> createPage(java.lang.String spaceKey,
                                                                              java.lang.String title,
                                                                              java.lang.String content,
                                                                              long parentPageId)
Deprecated. Since 5.4. Use createPage(Page).

TODO make this private, and make all callers use returned Page objects instead


createPage

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

createWikiMarkupPage

@Deprecated
public long createWikiMarkupPage(Page page)
Deprecated. Since 5.4. Use XHTML markup in your tests, and call createPage(Page)

Certain tests may use wiki-markup as the page content for convenience. These tests can be refactored in the future by breakpointing to see their XHTML version and then using that instead.

Parameters:
page - an uncreated page with wiki markup content
Returns:
the id of the newly created page

createPagesFromPrototype

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

createTemplate

public long createTemplate(java.lang.String templateName,
                           java.lang.String content,
                           Space space)

createTemplateWithStorageFormat

public long createTemplateWithStorageFormat(java.lang.String templateName,
                                            java.lang.String storageFormat,
                                            Space space)

editPage

public void editPage(Space space,
                     java.lang.String pageTitle,
                     java.lang.String newTitle,
                     java.lang.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)

removePageVersion

public boolean removePageVersion(long historicalPageId)

removePageVersion

public boolean removePageVersion(long pageId,
                                 int version)

restoreAbstractPage

public void restoreAbstractPage(long id)

changePageCreatedDate

public void changePageCreatedDate(long id,
                                  java.util.Date newDate)

getExistingPage

public Page getExistingPage(Space space,
                            java.lang.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.

getPageWithDetails

public Page getPageWithDetails(long pageId)
A heavier version of getExistingPage(long), that makes several calls to the server to flesh out the space and the last modifier.


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(java.lang.String spaceKey)
Returns the space with the specified key.


getChildren

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

getParentId

public long getParentId(long pageId)
Returns:
the parent id of the specified page or -1 if it doesn't have one.

getTopLevelPages

public java.util.List<Page> getTopLevelPages(java.lang.String spaceKey)

savePage

public long savePage(Page page)

updatePage

public long updatePage(Page page,
                       boolean minorEdit,
                       java.lang.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)
Restricts page to a single given user or group, wiping out any other existing restrictions. setContentRestriction(com.atlassian.confluence.it.content.security.ContentPermission, com.atlassian.confluence.it.AbstractPageEntity) should be used instead.


setBlogRestriction

public void setBlogRestriction(ContentPermission contentPermission,
                               BlogPost blogPost)
Restricts blog post to single given user or group, wiping out any other existing restrictions. setContentRestriction(com.atlassian.confluence.it.content.security.ContentPermission, com.atlassian.confluence.it.AbstractPageEntity) should be used instead.


setContentRestriction

public void setContentRestriction(ContentPermission contentPermission,
                                  AbstractPageEntity abstractPage)
Restricts page or blog post to single given user or group, wiping out any other existing 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,
                                   java.lang.String permissionType,
                                   java.lang.String username)

createBlogPost

public long createBlogPost(BlogPost blogPost)

saveBlogPost

public long saveBlogPost(BlogPost blogPost)

createComment

public long createComment(Comment comment)

createComment

@Deprecated
public long createComment(Comment comment,
                                     long parentCommentId)
Deprecated. Since 5.5. Just call createComment(Comment) with a Comment that has a parentId set.


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,
                                     java.util.Date newCreationDate)

createAttachment

public long createAttachment(long contentId,
                             Attachment attachment)

createAttachment

public long createAttachment(ContentEntity page,
                             Attachment attachment)

createAttachment

public long createAttachment(Attachment attachment)

createAttachmentOnDraft

public long createAttachmentOnDraft(Attachment attachment)

removeAttachment

public void removeAttachment(long pageId,
                             java.lang.String fileName)

removeAttachmentUncleanly

public void removeAttachmentUncleanly(long pageId,
                                      java.lang.String fileName)

addProfilePicture

public boolean addProfilePicture(java.lang.String username,
                                 java.lang.String filename,
                                 java.lang.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(java.lang.String username,
                                         java.lang.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 updatedAttachment)
Edit either the owning page or the filename of the attachment.


getAttachment

public Attachment getAttachment(long contentId,
                                java.lang.String fileName)

getAttachmentId

public long getAttachmentId(long contentId,
                            java.lang.String fileName)

getAttachments

public java.util.List<Attachment> getAttachments(Page homePage)

getAttachmentData

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

getAttachmentData

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

movePage

public void movePage(long sourcePageId,
                     long targetPageId,
                     java.lang.String position)

movePage

public void movePage(Page page,
                     Page target,
                     java.lang.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

moveBlogPost

public void moveBlogPost(BlogPost blogPost,
                         Space targetSpace)

addLabel

public boolean addLabel(java.lang.String label,
                        AbstractContentEntity target)

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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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 java.util.List<Space> getSpacesWithLabel(java.lang.String labelName)

getSpacesContainingContentWithLabel

public java.util.List<Space> getSpacesContainingContentWithLabel(java.lang.String labelName)

getLabelContent

public java.util.List<SearchResult> getLabelContent(long labelId)

getLabelContent

public java.util.List<SearchResult> getLabelContent(java.lang.String labelName)

getLabelContentByObject

public java.util.List<SearchResult> getLabelContentByObject(java.lang.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 java.util.List<Label> getLabels(long pageId)
Retrieves the labels for the page matching the specified pageId

Returns:
labels for the page

getLabels

public java.util.List<Label> getLabels(java.lang.String labelName,
                                       java.lang.String namespace,
                                       java.lang.String spaceKey,
                                       java.lang.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 java.util.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 java.util.List<Label> getMostPopularLabelsInSpace(java.lang.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 java.util.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 java.util.List<Label> getRecentlyUsedLabelsInSpace(java.lang.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 java.util.List<Label> getRelatedLabels(java.lang.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

getRelatedLabelsInSpace

public java.util.List<Label> getRelatedLabelsInSpace(java.lang.String labelName,
                                                     java.lang.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

createSpace

public Space createSpace(Space space)

createSpace

@Deprecated
public Space createSpace(java.lang.String key,
                                    java.lang.String name,
                                    java.lang.String description)
Deprecated. Since 5.5. Create a Space and call createSpace(Space).

This method will be made private in a future version of Confluence.


createPersonalSpace

public Space createPersonalSpace(User user)

removeSpace

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


getSpaces

public java.util.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

createTestUsers

public int createTestUsers(int count)

getUser

public UserWithKey getUser(java.lang.String username)
Retrieves a user with the given username

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

getUser

public UserWithKey getUser(User user)

getUser

public UserWithKey getUser(java.lang.String username,
                           java.lang.String password)

getUserInformation

public UserInformation getUserInformation(User user)

getUserInformation

public UserInformation getUserInformation(java.lang.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,
                                     java.lang.String key,
                                     java.lang.String value)
Update a UserDetail property via the UserDetailsManager.


setUserPreference

public boolean setUserPreference(User user,
                                 java.lang.String key,
                                 java.lang.String value)

setUserPreference

public boolean setUserPreference(User user,
                                 java.lang.String key,
                                 boolean value)

getUsernames

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

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

changeUserPassword

public boolean changeUserPassword(java.lang.String username,
                                  java.lang.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(java.lang.String oldPassword,
                                java.lang.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(java.lang.String username)
Removes the user if it exists, otherwise does nothing.

Returns:
true if the user was removed

hasUser

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

Returns:
true if the user exists

deactivateUser

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

Returns:
true if the user is deactivated

reactivateUser

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

Returns:
true if the user is reactivated

isActiveUser

public boolean isActiveUser(java.lang.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

renameUser

public boolean renameUser(java.lang.String oldUsername,
                          java.lang.String newUsername)

createGroup

public void createGroup(java.lang.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(java.lang.String groupname,
                           java.lang.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(java.lang.String groupname)
Checks whether or not a group matching the specified name exists

Returns:
true if the group exists

getGroups

public java.util.List<Group> getGroups()
Retrieves existing groups

Returns:
existing groups

getUserGroups

public java.util.List<Group> getUserGroups(java.lang.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(java.lang.String username,
                              java.lang.String groupname)

addUserToGroup

public boolean addUserToGroup(User user,
                              Group group)

removeUserFromGroup

public boolean removeUserFromGroup(User user,
                                   Group group)

removeUserFromGroup

public boolean removeUserFromGroup(java.lang.String username,
                                   java.lang.String groupname)

exportSpace

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


exportSite

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


performBackup

public java.lang.String performBackup(boolean exportAttachments)

getContentPermissionSet

public java.util.Map<java.lang.String,java.lang.Object> getContentPermissionSet(long contentId,
                                                                                ContentPermissionType permissionType)

getContentPermissions

public java.util.List<java.util.Map<java.lang.String,java.lang.String>> getContentPermissions(long contentId,
                                                                                              ContentPermissionType permissionType)

getPermissionsForUser

public java.util.List<java.lang.String> getPermissionsForUser(java.lang.String spaceKey,
                                                              java.lang.String username)

getPermissionsForUser

public java.util.List<java.lang.String> getPermissionsForUser(Space space,
                                                              User user)

grantPermission

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

grantPermission

public void grantPermission(SpacePermission permission,
                            java.lang.String spaceKey,
                            Entity entity)

grantPermissions

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

grantAllPermissionsExceptAdmin

public void grantAllPermissionsExceptAdmin(Entity entity,
                                           Space space)

grantAllPermissions

public void grantAllPermissions(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,
                                    java.util.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 java.util.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,
                                   java.lang.String key,
                                   java.lang.String value)
Uses ContentPropertyManager.


setContentPropertiesString

public void setContentPropertiesString(long contentId,
                                       java.lang.String key,
                                       java.lang.String value)
Uses ContentProperties.


setContentPropertiesStringForSpace

public void setContentPropertiesStringForSpace(java.lang.String spaceKey,
                                               java.lang.String key,
                                               java.lang.String value)
Uses ContentProperties associated with the SpaceDescription.


getContentPropertyKeys

public java.util.List<java.lang.String> getContentPropertyKeys(long contentId)
Uses ContentPropertyManager.


getContentProperty

public java.lang.String getContentProperty(long contentId,
                                           java.lang.String key)
Uses ContentPropertyManager.


getContentPropertiesString

public java.lang.String getContentPropertiesString(long contentId,
                                                   java.lang.String key)
Uses ContentProperties.


getContentPropertiesStringForSpace

public java.lang.String getContentPropertiesStringForSpace(java.lang.String spaceKey,
                                                           java.lang.String key)
Uses ContentProperties associated with the SpaceDescription.


flushIndexQueue

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


flushIndexQueue

public boolean flushIndexQueue(long time,
                               java.util.concurrent.TimeUnit unit)

assertThatMostRecentIndexEntriesHaveBeenProcessed

public void assertThatMostRecentIndexEntriesHaveBeenProcessed(ContentEntity... entities)

clearIndex

public void clearIndex()

clearIndexQueue

public boolean clearIndexQueue()

runJob

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


runJob

@Deprecated
public void runJob(java.lang.String jobName)
Deprecated. Since 5.6. Use SchedulerRpc.triggerJob(QuartzJob, boolean).


getLocalisedText

public java.lang.String getLocalisedText(java.lang.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(java.lang.String queueName)

getNumberOfIndexTasksInQueue

public int getNumberOfIndexTasksInQueue()

flushEdgeIndexQueue

public void flushEdgeIndexQueue()

getUserLocale

public java.util.Locale getUserLocale(User user)

setUserLocale

public void setUserLocale(User user,
                          java.util.Locale language)

setGlobalLanguage

public void setGlobalLanguage(java.lang.String locale)
                       throws org.apache.xmlrpc.XmlRpcException,
                              java.io.IOException
Throws:
org.apache.xmlrpc.XmlRpcException
java.io.IOException

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(java.util.Set<User> usersToKeep,
                           java.util.Set<Group> groupsToKeep,
                           java.util.Map<Group,java.util.HashSet<User>> userGroupMembershipsToKeep)
Perform all test-data reset tasks.


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,
                                           java.util.Date modificationDate)

changePageModificationDate

public void changePageModificationDate(long pageId,
                                       java.util.Date modificationDate)

changeAttachmentCreatedDate

public void changeAttachmentCreatedDate(Attachment attachment,
                                        java.util.Date createdDate)

pauseAllJobs

public void pauseAllJobs()

pauseJobGroup

public void pauseJobGroup(java.lang.String jobGroupName)

pauseJob

@Deprecated
public void pauseJob(java.lang.String jobName)
Deprecated. Since 5.6. Use SchedulerRpc.pauseJob(QuartzJob)

Parameters:
jobName -

pauseJob

public void pauseJob(QuartzJob job)

resumeJob

@Deprecated
public void resumeJob(java.lang.String jobName)
Deprecated. Since 5.6. Use SchedulerRpc.resumeJob(QuartzJob)

Parameters:
jobName -

resumeJob

public void resumeJob(QuartzJob job)

getGlobalConfiguredTheme

public java.lang.String getGlobalConfiguredTheme()

getConfiguredThemeForSpace

public java.lang.String getConfiguredThemeForSpace(java.lang.String spaceKey)

setGlobalTheme

public void setGlobalTheme(BundledTheme theme)

setThemeForSpace

public void setThemeForSpace(Space space,
                             BundledTheme theme)

clearCustomHtml

public void clearCustomHtml()

createJohnsonEvent

public void createJohnsonEvent(java.lang.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(java.lang.String contentId,
                              java.lang.String draftCreator,
                              java.lang.String draftType,
                              java.lang.String spaceKey)

countDrafts

public int countDrafts(User user)

search

public java.util.List<java.util.Hashtable<java.lang.String,java.lang.String>> search(java.lang.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.

search

public java.util.List<java.util.Hashtable<java.lang.String,java.lang.String>> search(java.lang.String queryString,
                                                                                     java.util.Hashtable<java.lang.String,java.lang.String> params,
                                                                                     int maxMatches)

importSpace

public void importSpace(java.io.File zippedXmlBackup)
                 throws java.io.IOException
Throws:
java.io.IOException

importSpace

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

getPagePermissions

public java.util.Collection<ContentPermissionEntry> getPagePermissions(long pageId)

getSystemProperty

public java.lang.String getSystemProperty(java.lang.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(java.lang.String name,
                              java.lang.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(java.lang.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.


getDarkFeaturesHelper

public DarkFeaturesHelper getDarkFeaturesHelper()

getBaseUrl

public java.lang.String getBaseUrl()

createUserMacro

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

createUserMacro

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

removeUserMacro

public void removeUserMacro(java.lang.String name)

getPersonalInformationId

public long getPersonalInformationId(java.lang.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 java.lang.String setLogLevel(java.lang.String logger,
                                               java.lang.String levelStr)
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
levelStr - 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(java.lang.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,
                          java.lang.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)

setEnableAnonymousRpc

public void setEnableAnonymousRpc(boolean enable)

flushAllCaches

public void flushAllCaches()

getCacheStatistics

public CacheStatistics getCacheStatistics(CacheKey key)

getCacheStatisticsCapabilities

public java.util.Set<CacheStatistics.Capability> getCacheStatisticsCapabilities()

getCacheMaximumNumberOfElements

@Deprecated
public java.lang.Integer getCacheMaximumNumberOfElements(java.lang.String cacheName)
Deprecated. since 5.6. Use CacheRpc.getCacheMaxEntries(String) directly.


setCacheMaximumNumberOfElements

@Deprecated
public void setCacheMaximumNumberOfElements(java.lang.String cacheName,
                                                       int maxNumElements)
Deprecated. since 5.6. Use CacheRpc.setCacheMaxEntries(String, int) directly.


putStringMappingInCache

public void putStringMappingInCache(java.lang.String cacheName,
                                    java.lang.String entryKey,
                                    java.lang.String value)
                             throws org.apache.xmlrpc.XmlRpcException,
                                    java.io.IOException
Throws:
org.apache.xmlrpc.XmlRpcException
java.io.IOException

getClusterInformation

public java.util.Map<java.lang.String,java.lang.Object> getClusterInformation()

getAnonymoizedCurrentClusterNodeIdentifier

public java.lang.String getAnonymoizedCurrentClusterNodeIdentifier()

isClusteredInstance

public boolean isClusteredInstance()

getCusterNodeStatuses

public java.util.Vector<java.util.Hashtable> getCusterNodeStatuses()

createPageHierarchy

public java.util.List<Page> createPageHierarchy(Space space,
                                                int depth,
                                                java.lang.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

@Deprecated
public void addMailServer(java.lang.String serverName,
                                     java.lang.String from,
                                     java.lang.String subjectPrefix,
                                     java.lang.String hostname,
                                     int port)
Deprecated. since 5.0. Use addSmtpServer(String, String, String, String, int) instead.


addMailServer

@Deprecated
public void addMailServer(java.lang.String serverName,
                                     java.lang.String from,
                                     java.lang.String subjectPrefix,
                                     java.lang.String hostname,
                                     int port,
                                     java.lang.String fromName)
Deprecated. since 5.0. Use addSmtpServer(String, String, String, String, int, String) instead.


addSmtpServer

public void addSmtpServer(java.lang.String serverName,
                          java.lang.String from,
                          java.lang.String subjectPrefix,
                          java.lang.String hostname,
                          int port)

addSmtpServer

public void addSmtpServer(java.lang.String serverName,
                          java.lang.String from,
                          java.lang.String subjectPrefix,
                          java.lang.String hostname,
                          int port,
                          java.lang.String fromName)

setSmtpServer

public void setSmtpServer(java.lang.String serverName,
                          java.lang.String from,
                          java.lang.String subjectPrefix,
                          java.lang.String hostname,
                          int port)

setSmtpServer

public void setSmtpServer(java.lang.String serverName,
                          java.lang.String from,
                          java.lang.String subjectPrefix,
                          java.lang.String hostname,
                          int port,
                          java.lang.String fromName)

removeMailServer

public void removeMailServer(java.lang.String serverName)

flushMailQueue

public void flushMailQueue()
waits for all async events to be processed and flushes mail queue waiting is needed because otherwise there's a chance that mail won't be in queue at time of flushing


waitForEventQueue

public void waitForEventQueue()

setApplicationConfigProperty

public void setApplicationConfigProperty(java.lang.String propertyKey,
                                         java.lang.String propertyValue)

getApplicationConfigProperty

public java.lang.Object getApplicationConfigProperty(java.lang.String propertyKey)

tryGetApplicationConfigProperty

public com.atlassian.fugue.Option<java.lang.Object> tryGetApplicationConfigProperty(java.lang.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(java.lang.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 java.lang.String getConfiguredBaseUrl()
Returns the configured base url on the server.


getServerInfo

public java.util.Map<java.lang.String,java.lang.Object> getServerInfo()

convertWikiToStorageFormat

public java.lang.String convertWikiToStorageFormat(java.lang.String wiki)

enableWebSudo

public void enableWebSudo(boolean enabled)

setWebSudoTimeout

public void setWebSudoTimeout(int timeout)

enableElevatedSecurityCheck

public void enableElevatedSecurityCheck(boolean enabled)

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(java.lang.String directoryName,
                                        java.lang.String encoder)

removeUserDirectory

public boolean removeUserDirectory(long directoryId)

purgeFromTrash

public void purgeFromTrash(Space space,
                           long pageId)

getComments

public java.util.List<Comment> getComments(Page page)

getComment

public Comment getComment(AbstractPageEntity pageEntity,
                          long commentId)

isSpringComponentPresent

public boolean isSpringComponentPresent(java.lang.String componentName)

removeBandanaKey

public void removeBandanaKey(java.lang.String context,
                             java.lang.String key)

setBandanaKey

public void setBandanaKey(java.lang.String context,
                          java.lang.String key,
                          java.util.Set<java.lang.String> value)

setBandanaKey

public void setBandanaKey(java.lang.String context,
                          java.lang.String key,
                          java.util.List<java.lang.String> value)

setBandanaKey

public void setBandanaKey(java.lang.String context,
                          java.lang.String key,
                          java.lang.String value)

setBandanaKey

public void setBandanaKey(java.lang.String context,
                          java.lang.String key,
                          boolean value)

setBandanaKey

public void setBandanaKey(java.lang.String context,
                          java.lang.String key,
                          int value)

getBandanaValue

public java.lang.Object getBandanaValue(java.lang.String context,
                                        java.lang.String key)

updateGlobalSetting

public boolean updateGlobalSetting(java.lang.String name,
                                   boolean value)

updateGlobalSetting

public java.lang.String updateGlobalSetting(java.lang.String name,
                                            java.lang.String value)

saveDateFormat

public void saveDateFormat(java.lang.String pattern)

getAncestors

public java.util.List<Page> getAncestors(Page homePage)

getDescendents

public java.util.List<Page> getDescendents(Page homePage)

getPageHistory

public java.util.List<java.util.Map<java.lang.String,java.lang.String>> getPageHistory(Page homePage)

getLoggedInUser

public java.lang.String getLoggedInUser()

createSpaces

public java.lang.Iterable<java.lang.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)

isDarkFeatureEnabled

public boolean isDarkFeatureEnabled(java.lang.String key)

getNumberOfActiveUsers

public int getNumberOfActiveUsers()

isUnlimitedUserLicense

public boolean isUnlimitedUserLicense()

getAliveThreads

public java.util.List<java.util.Map> getAliveThreads()

setWelcomeMessage

public boolean setWelcomeMessage(java.lang.String welcomeMessage)

resetWelcomeMessage

public boolean resetWelcomeMessage()

enableAnonymousAccess

public void enableAnonymousAccess()

disableAnonymousAccess

public void disableAnonymousAccess()

addSidebarQuickLink

@Deprecated
public boolean addSidebarQuickLink(java.lang.String spaceKey,
                                              long pageId,
                                              java.lang.String title,
                                              java.lang.String customClass)
Deprecated. since 5.2 use executeAuthPluginXmlRpc(String, String, Object...)


removeSidebarQuickLink

@Deprecated
public void removeSidebarQuickLink(java.lang.String spaceKey,
                                              long pageId)
Deprecated. since 5.2 use executeAuthPluginXmlRpc(String, String, Object...)


removeSidebarQuickLinks

@Deprecated
public void removeSidebarQuickLinks(java.lang.String spaceKey)
Deprecated. since 5.2 use executeAuthPluginXmlRpc(String, String, Object...)


getExportBuildNumber

public java.lang.String getExportBuildNumber()

getOldestSpaceImportAllowed

public java.lang.String getOldestSpaceImportAllowed()

getPluginExportCompatibility

public java.lang.String getPluginExportCompatibility(java.lang.String pluginKey)

isPluginUpgradeTasksComplete

public boolean isPluginUpgradeTasksComplete()

resetDatabaseStatistics

public void resetDatabaseStatistics()

getDatabaseStatistics

public java.lang.String getDatabaseStatistics()

runGarbageCollection

public void runGarbageCollection()

enableNewUserEmailNotifications

public void enableNewUserEmailNotifications()

isImportTaskRunning

public boolean isImportTaskRunning()


Copyright © 2003-2014 Atlassian. All Rights Reserved.