Class ConfluenceRpc

  • All Implemented Interfaces:
    AutoCloseable

    @Deprecated
    public class ConfluenceRpc
    extends Object
    implements AutoCloseable
    Deprecated.
    Please use confluence-test-utils module instead. See {com.atlassian.confluence.test.rest.api.ConfluenceRestClient} and {com.atlassian.confluence.test.rpc.api.ConfluenceRpcClient} alternatives

    The new rpc and rest clients may not have all the APIs yet - feel free to copy and refactor them over from here as they are needed.

    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.

    • Method Detail

      • getFriendlyRelativeDate

        public String getFriendlyRelativeDate​(Date now,
                                              Date date,
                                              TimeZone timeZone)
        Deprecated.
        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)
        Deprecated.
        Flush the entire index queue, and explicitly assert that the given content entities had their most recent index queue journal entries processed.
      • flushIndexQueueAndVerify

        public void flushIndexQueueAndVerify​(Iterable<? extends ContentEntity> contentEntities)
        Deprecated.
      • newInstance

        public static ConfluenceRpc newInstance​(String baseUrl,
                                                ConfluenceRpc.Version version)
        Deprecated.
        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)
        Deprecated.
        Create a new RPC stub pointed at a specific version of the server-side API.
        Parameters:
        baseUrlSelector - 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​(String baseUrl,
                                                        ConfluenceRpc.Version version)
        Deprecated.
        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​(String baseUrl)
        Deprecated.
        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)
        Deprecated.
        Create a new RPC stub pointed at the default version of the server-side API.
        Parameters:
        baseUrlSelector - the base URL of the server to connect to
        Returns:
        an RPC stub object
      • newInstance

        @Deprecated
        public static ConfluenceRpc newInstance​(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)
        Deprecated.
      • close

        public void close()
        Deprecated.
        Specified by:
        close in interface AutoCloseable
      • execute

        @Deprecated
        public Object execute​(String method,
                              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​(String method,
                                          Object... args)
        Deprecated.
      • executeWithToken

        public Object executeWithToken​(String method,
                                       @Nullable String token,
                                       Object... args)
                                throws RpcRuntimeException
        Deprecated.
        Execute method with the specified token. Avoid using this method in favour of logging in as another user and using execute(String, Object...) as them instead. There only time when you should use this is when testing something related to the tokens themselves (e.g. authentication tests)
        Parameters:
        method - the method to execute
        token - the token
        args - arguments to pass to the XML RPC method
        Returns:
        the object returned by the server
        Throws:
        RpcRuntimeException - If the server throws an exception
      • executePluginXmlRpc

        public Object executePluginXmlRpc​(String servicePath,
                                          String method,
                                          Object... args)
                                   throws RpcRuntimeException
        Deprecated.
        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 Object executeAuthPluginXmlRpc​(String servicePath,
                                              String method,
                                              Object... args)
                                       throws RpcRuntimeException
        Deprecated.
        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​(String servicePath,
                                                          String method,
                                                          Object... args)
        Deprecated.
      • executeFuncTest

        @Deprecated
        public Object executeFuncTest​(String method,
                                      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​(String method,
                                                  Object... args)
        Deprecated.
        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
      • logIn

        public void logIn​(User user)
        Deprecated.
        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()
        Deprecated.
        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()
        Deprecated.
      • getPageId

        public long getPageId​(Page page)
        Deprecated.
      • getPageId

        public long getPageId​(String spaceKey,
                              String title)
        Deprecated.
      • getPageIdsInSpace

        public List<Long> getPageIdsInSpace​(Space space)
        Deprecated.
      • getPagesInSpace

        public List<Page> getPagesInSpace​(Space space)
        Deprecated.
      • getPageContent

        public String getPageContent​(long pageId)
        Deprecated.
      • convertWikiMarkupToXhtml

        public String convertWikiMarkupToXhtml​(String wikiMarkup,
                                               long pageId)
        Deprecated.
      • convertXhtmlToWikiMarkup

        public String convertXhtmlToWikiMarkup​(String xhtml,
                                               long pageId)
        Deprecated.
      • createPage

        public long createPage​(Page page)
        Deprecated.
        Parameters:
        page - an uncreated page
        Returns:
        the id of the newly created page
      • createContent

        public ContentId createContent​(Content newContent)
        Deprecated.
      • 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 List<Page> createPagesFromPrototype​(Page pageTemplate,
                                                   int count)
        Deprecated.
      • createTemplate

        public long createTemplate​(String templateName,
                                   String content,
                                   Space space)
        Deprecated.
      • createTemplateWithStorageFormat

        public long createTemplateWithStorageFormat​(String templateName,
                                                    String storageFormat,
                                                    Space space)
        Deprecated.
      • editPage

        public void editPage​(Space space,
                             String pageTitle,
                             String newTitle,
                             String newContent)
        Deprecated.
        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)
        Deprecated.
      • removePage

        public boolean removePage​(long pageId)
        Deprecated.
      • removePageVersion

        public boolean removePageVersion​(long historicalPageId)
        Deprecated.
      • removePageVersion

        public boolean removePageVersion​(long pageId,
                                         int version)
        Deprecated.
      • restoreAbstractPage

        public void restoreAbstractPage​(long id)
        Deprecated.
      • changePageCreatedDate

        public void changePageCreatedDate​(long id,
                                          Date newDate)
        Deprecated.
      • getExistingPage

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

        public Page getExistingPage​(long pageId)
        Deprecated.
        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)
        Deprecated.
        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)
        Deprecated.
        Returns the blog post with the specified page ID. Looks up the space which the blog post belongs to, so this method will execute two RPC calls.
      • getSpace

        public Space getSpace​(String spaceKey)
        Deprecated.
        Returns the space with the specified key.
      • getChildren

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

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

        public List<Page> getTopLevelPages​(String spaceKey)
        Deprecated.
      • savePage

        public long savePage​(Page page)
        Deprecated.
      • updatePage

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

        public long createDraft​(Draft draft)
        Deprecated.
      • updateDraft

        public long updateDraft​(Draft draft)
        Deprecated.
      • setContentRestriction

        public void setContentRestriction​(ContentPermission contentPermission,
                                          AbstractPageEntity abstractPage)
        Deprecated.
        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)
        Deprecated.
        Restrict page to single given user or group. This will wipe any other restrictions.
      • getContentPermissionId

        public long getContentPermissionId​(ContentPermission contentPermission,
                                           long pageId)
        Deprecated.
      • getContentPermissionId

        public long getContentPermissionId​(long pageId,
                                           String permissionType,
                                           String username)
        Deprecated.
      • createBlogPost

        public long createBlogPost​(BlogPost blogPost)
        Deprecated.
      • saveBlogPost

        public long saveBlogPost​(BlogPost blogPost)
        Deprecated.
      • createComment

        public long createComment​(Comment comment)
        Deprecated.
      • saveComment

        public long saveComment​(Comment comment)
        Deprecated.
      • removeComment

        public void removeComment​(long commentId)
        Deprecated.
        Remove a comment, identified by its id.
        Parameters:
        commentId - the id of the comment to remove
      • removeComment

        public void removeComment​(Comment comment)
        Deprecated.
      • changeCommentCreatedDate

        public void changeCommentCreatedDate​(Comment comment,
                                             Date newCreationDate)
        Deprecated.
      • createAttachment

        public long createAttachment​(long contentId,
                                     Attachment attachment)
        Deprecated.
      • createAttachment

        public long createAttachment​(Attachment attachment)
        Deprecated.
      • createAttachmentOnDraft

        public long createAttachmentOnDraft​(Attachment attachment)
        Deprecated.
      • removeAttachment

        public void removeAttachment​(long pageId,
                                     String fileName)
        Deprecated.
      • removeAttachmentUncleanly

        public void removeAttachmentUncleanly​(long pageId,
                                              String fileName)
        Deprecated.
      • addProfilePicture

        public boolean addProfilePicture​(String username,
                                         String filename,
                                         String mimeType,
                                         byte[] pictureData)
        Deprecated.
        Attempts to add a profile picture to a user's profile
        Parameters:
        username - the user name of the profile
        filename - file name of the picture
        mimeType - image mime type (must be from image/*)
        pictureData - the image data
        Returns:
        true if the picture is successfully added
      • addExistingProfilePicture

        public boolean addExistingProfilePicture​(String username,
                                                 String filename)
        Deprecated.
        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)
        Deprecated.
      • editAttachment

        public void editAttachment​(Attachment updatedAttachment)
        Deprecated.
        Edit either the owning page or the filename of the attachment.
      • getAttachment

        public Attachment getAttachment​(long contentId,
                                        String fileName)
        Deprecated.
      • getAttachmentId

        public long getAttachmentId​(long contentId,
                                    String fileName)
        Deprecated.
      • getAttachmentData

        public byte[] getAttachmentData​(long contentId,
                                        String fileName,
                                        String version)
        Deprecated.
      • getAttachmentData

        public byte[] getAttachmentData​(Attachment attachment,
                                        String version)
        Deprecated.
      • movePage

        public void movePage​(long sourcePageId,
                             long targetPageId,
                             String position)
        Deprecated.
      • movePage

        public void movePage​(Page page,
                             Page target,
                             String position)
        Deprecated.
        Move a page "to" another page.
        Parameters:
        position - see com.atlassian.confluence.content.service.page.MovePageCommand
      • movePageToTopLevel

        public void movePageToTopLevel​(Page page,
                                       Space targetSpace)
        Deprecated.
        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)
        Deprecated.
      • addLabel

        public boolean addLabel​(long labelId,
                                long contentId)
        Deprecated.
        Adds a label to the content specified by the supplied contentId
        Parameters:
        labelId - id of the label to add
        contentId - id of a page or blogpost to add the label to
        Returns:
        true if the label is successfully added
      • addLabelByObject

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

        public boolean removeLabel​(String label,
                                   Page page)
        Deprecated.
        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)
        Deprecated.
        Removes a label from the specified content
        Parameters:
        labelId - id of the label to remove
        contentId - id of the page or blog to remove the label from
        Returns:
        true if the label is successfully removed
      • removeLabelByObject

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

        public boolean addLabelToSpace​(String label,
                                       Space space)
        Deprecated.
        Adds a label to the specified space
        Parameters:
        label - the label to add
        space - the space to add the label to
        Returns:
        true if the label is successfully added
      • removeLabelFromSpace

        public boolean removeLabelFromSpace​(String label,
                                            Space space)
        Deprecated.
        Removes a label from the specified space
        Parameters:
        label - the label to remove
        space - the space to remove the label from
        Returns:
        true if the label is successfully removed
      • getSpacesWithLabel

        public List<Space> getSpacesWithLabel​(String labelName)
        Deprecated.
      • getSpacesContainingContentWithLabel

        public List<Space> getSpacesContainingContentWithLabel​(String labelName)
        Deprecated.
      • getLabelContent

        public List<SearchResult> getLabelContent​(long labelId)
        Deprecated.
      • getLabelContentByObject

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

        public List<Label> getLabels​(long pageId)
        Deprecated.
        Retrieves the labels for the page matching the specified pageId
        Returns:
        labels for the page
      • getLabels

        public List<Label> getLabels​(String labelName,
                                     String namespace,
                                     String spaceKey,
                                     String owner)
        Deprecated.
        Retrieves the labels matching the given labelName, namespace or owner. This method can be used to retrieve labels of a specific type, such as personal labels, by setting the namespace. Parameters with empty strings are ignored.
        Parameters:
        labelName - the name of the label to search for (not parsed for prefixes)
        namespace - the namespace to restrict by
        spaceKey - the key of the space to restrict by
        owner - the owner of the labels
        Returns:
        labels matching the specified details
      • getMostPopularLabels

        public List<Label> getMostPopularLabels​(int maxCount)
        Deprecated.
        Returns the most popular labels
        Parameters:
        maxCount - the maximum number of labels to return, or no limit if this is 0
        Returns:
        labels sorted by descending popularity
      • getMostPopularLabelsInSpace

        public List<Label> getMostPopularLabelsInSpace​(String spaceKey,
                                                       int maxCount)
        Deprecated.
        Returns the most popular labels in the space with the specified key
        Parameters:
        spaceKey - key for the space
        maxCount - the maximum number of labels to return, or no limit if this is 0
        Returns:
        labels sorted by descending popularity
      • getRecentlyUsedLabels

        public List<Label> getRecentlyUsedLabels​(int maxCount)
        Deprecated.
        Returns the recently used labels for the Confluence instance, with a specified maximum number of results.
        Parameters:
        maxCount - the maximum number of labels to return, or the default if this is 0
        Returns:
        labels sorted by most recent use
      • getRecentlyUsedLabelsInSpace

        public List<Label> getRecentlyUsedLabelsInSpace​(String spaceKey,
                                                        int maxCount)
        Deprecated.
        Returns the recently used labels in the space with the specified key
        Parameters:
        spaceKey - key for the space
        maxCount - the maximum number of labels to return, or the default if this is 0
        Returns:
        labels sorted by most recent use
      • getRelatedLabels

        public List<Label> getRelatedLabels​(String labelName,
                                            int maxCount)
        Deprecated.
        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 List<Label> getRelatedLabelsInSpace​(String labelName,
                                                   String spaceKey,
                                                   int maxCount)
        Deprecated.
        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)
        Deprecated.
      • createPersonalSpace

        public Space createPersonalSpace​(User user)
        Deprecated.
      • removeSpace

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

        public List<Space> getSpaces()
        Deprecated.
        Retrieves spaces visible to the currently logged in rpc user
        Returns:
        spaces visible spaces
      • createUser

        public boolean createUser​(User user)
        Deprecated.
        Adds the given user
        Returns:
        true if the user was successfully created
      • createUser

        public boolean createUser​(User user,
                                  boolean notifyUser)
        Deprecated.
        Adds the given user
        Returns:
        true if the user was successfully created
      • createTestUsers

        public int createTestUsers​(int count)
        Deprecated.
      • getUser

        public UserWithKey getUser​(String username)
        Deprecated.
        Retrieves a user with the given username
        Returns:
        the user matching the given username, without a password
      • setUserInformation

        public boolean setUserInformation​(UserInformation userInfo)
        Deprecated.
        Updates a user's information
        Returns:
        true if the user's information is successfully updated
      • setUserDetailProperty

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

        public boolean setUserPreference​(User user,
                                         String key,
                                         String value)
        Deprecated.
      • setUserPreference

        public boolean setUserPreference​(User user,
                                         String key,
                                         boolean value)
        Deprecated.
      • getUsernames

        public List<String> getUsernames​(boolean viewAll)
        Deprecated.
        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​(String username,
                                          String newPassword)
        Deprecated.
        Attempts to set the specified password for the specified user
        Returns:
        true if the user's password is successfully changed
      • changeMyPassword

        public boolean changeMyPassword​(String oldPassword,
                                        String newPassword)
        Deprecated.
        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)
        Deprecated.
        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)
        Deprecated.
      • removeUser

        public boolean removeUser​(String username)
        Deprecated.
        Removes the user if it exists, otherwise does nothing.
        Returns:
        true if the user was removed
      • hasUser

        public boolean hasUser​(String username)
        Deprecated.
        Checks whether a user with the specified username exists
        Returns:
        true if the user exists
      • deactivateUser

        public boolean deactivateUser​(String username)
        Deprecated.
        Deactivates the user matching the specified username
        Returns:
        true if the user is deactivated
      • reactivateUser

        public boolean reactivateUser​(String username)
        Deprecated.
        Reactivates the user matching the specified username
        Returns:
        true if the user is reactivated
      • isActiveUser

        public boolean isActiveUser​(String username)
        Deprecated.
        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​(String oldUsername,
                                  String newUsername)
        Deprecated.
      • createGroup

        public void createGroup​(String groupname)
        Deprecated.
      • createGroup

        public void createGroup​(Group group)
        Deprecated.
      • removeGroup

        public boolean removeGroup​(Group group)
        Deprecated.
        Removes the group if it exists, otherwise does nothing
        Returns:
        true if the group was removed
      • removeGroup

        public boolean removeGroup​(String groupname,
                                   String defaultGroupName)
        Deprecated.
        Removes the group if it exists, otherwise does nothing
        Parameters:
        groupname - the group to remove
        defaultGroupName - another group to put existing members of the group in. Can be an empty string if users should not be added to any other group.
        Returns:
        true if the group was removed
      • hasGroup

        public boolean hasGroup​(String groupname)
        Deprecated.
        Checks whether or not a group matching the specified name exists
        Returns:
        true if the group exists
      • getGroups

        public List<Group> getGroups()
        Deprecated.
        Retrieves existing groups
        Returns:
        existing groups
      • getUserGroups

        public List<Group> getUserGroups​(String username)
        Deprecated.
        Retrieves the groups that a user matching the specified username belongs to
        Returns:
        groups that the user belongs to
      • addUserToGroup

        public boolean addUserToGroup​(String username,
                                      String groupname)
        Deprecated.
      • addUserToGroup

        public boolean addUserToGroup​(User user,
                                      Group group)
        Deprecated.
      • removeUserFromGroup

        public boolean removeUserFromGroup​(User user,
                                           Group group)
        Deprecated.
      • removeUserFromGroup

        public boolean removeUserFromGroup​(String username,
                                           String groupname)
        Deprecated.
      • exportSpace

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

        public String exportSite​(boolean exportAttachments)
        Deprecated.
        Returns the URL of the downloadable export.
      • performBackup

        public String performBackup​(boolean exportAttachments)
        Deprecated.
      • setContentPropertiesString

        public void setContentPropertiesString​(long contentId,
                                               String key,
                                               String value)
        Deprecated.
      • flushIndexQueue

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

        public boolean flushIndexQueue​(long time,
                                       TimeUnit unit)
        Deprecated.
      • assertThatMostRecentIndexEntriesHaveBeenProcessed

        public void assertThatMostRecentIndexEntriesHaveBeenProcessed​(ContentEntity... entities)
        Deprecated.
      • assertThatMostRecentIndexEntriesHaveBeenProcessed

        public void assertThatMostRecentIndexEntriesHaveBeenProcessed​(Iterable<? extends ContentEntity> entities)
        Deprecated.
      • clearIndex

        public void clearIndex()
        Deprecated.
      • clearIndexQueue

        public boolean clearIndexQueue()
        Deprecated.
      • recoverMainIndex

        public boolean recoverMainIndex()
        Deprecated.
      • runJob

        public void runJob​(ScheduledJobKey job)
        Deprecated.
        Triggers a job on the server. Waits for the job to complete before returning.
      • countJobRunDetails

        public long countJobRunDetails​(ScheduledJobKey jobKey,
                                       com.atlassian.scheduler.status.RunOutcome runOutcome)
        Deprecated.
        Count job run details
        Since:
        6.4.3
      • addJobs

        public void addJobs​(ScheduledJobKey job,
                            com.atlassian.scheduler.status.RunOutcome runOutcome,
                            Integer days,
                            Integer total)
        Deprecated.
        Add job run details that has been stored for more than the time threshold in days.
        Parameters:
        job -
        days -
        Since:
        6.4.3
      • getMailQueueSize

        public int getMailQueueSize()
        Deprecated.
      • clearMailQueue

        public void clearMailQueue()
        Deprecated.
      • clearQueue

        public void clearQueue​(String queueName)
        Deprecated.
      • getNumberOfIndexTasksInQueue

        public int getNumberOfIndexTasksInQueue()
        Deprecated.
      • flushEdgeIndexQueue

        public void flushEdgeIndexQueue()
        Deprecated.
      • getUserLocale

        public Locale getUserLocale​(User user)
        Deprecated.
      • setUserLocale

        public void setUserLocale​(User user,
                                  Locale language)
        Deprecated.
      • setGlobalLanguage

        public void setGlobalLanguage​(String locale)
                               throws org.apache.xmlrpc.XmlRpcException,
                                      IOException
        Deprecated.
        Throws:
        org.apache.xmlrpc.XmlRpcException
        IOException
      • setKeyboardShortcutPref

        public void setKeyboardShortcutPref​(User user,
                                            boolean enabled)
        Deprecated.
      • setWatchOwnContent

        public void setWatchOwnContent​(User user,
                                       boolean enabled)
        Deprecated.
      • removeDrafts

        public void removeDrafts​(User user)
        Deprecated.
      • removeTestData

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

        public void removeTestDataAfterExternalUserManagement()
        Deprecated.
        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()
        Deprecated.
      • changeBlogPostModificationDate

        public void changeBlogPostModificationDate​(long blogId,
                                                   Date modificationDate)
        Deprecated.
      • changePageModificationDate

        public void changePageModificationDate​(long pageId,
                                               Date modificationDate)
        Deprecated.
      • changeAttachmentCreatedDate

        public void changeAttachmentCreatedDate​(Attachment attachment,
                                                Date createdDate)
        Deprecated.
      • pauseAllJobs

        public void pauseAllJobs()
        Deprecated.
      • pauseJobGroup

        public void pauseJobGroup​(String jobGroupName)
        Deprecated.
      • getGlobalConfiguredTheme

        public String getGlobalConfiguredTheme()
        Deprecated.
      • getConfiguredThemeForSpace

        public String getConfiguredThemeForSpace​(String spaceKey)
        Deprecated.
      • setGlobalTheme

        public void setGlobalTheme​(BundledTheme theme)
        Deprecated.
      • setThemeForSpace

        public void setThemeForSpace​(Space space,
                                     BundledTheme theme)
        Deprecated.
      • clearCustomHtml

        public void clearCustomHtml()
        Deprecated.
      • createJohnsonEvent

        public void createJohnsonEvent​(String message)
        Deprecated.
      • removeAllJohnsonEvents

        public void removeAllJohnsonEvents()
        Deprecated.
      • enableCaptcha

        public void enableCaptcha​(boolean enable)
        Deprecated.
      • enableCaptchaDebugMode

        public void enableCaptchaDebugMode​(boolean enable)
        Deprecated.
      • setDraftSaveInterval

        public void setDraftSaveInterval​(int seconds)
        Deprecated.
      • doesDraftExist

        public boolean doesDraftExist​(String contentId,
                                      String draftCreator,
                                      String draftType,
                                      String spaceKey)
        Deprecated.
      • countDrafts

        public int countDrafts​(User user)
        Deprecated.
      • search

        public List<Hashtable<String,​String>> search​(String queryString,
                                                           int maxMatches)
        Deprecated.
        Search for the supplied query String.
        Parameters:
        queryString - the query
        maxMatches - the maximum number of matches to be returned
        Returns:
        a List of Hashtables representing SearchResults or the empty list if there are no matches.
      • importSpace

        public void importSpace​(byte[] zippedXmlBackup)
                         throws IOException
        Deprecated.
        Throws:
        IOException
      • getSystemProperty

        public String getSystemProperty​(String name)
        Deprecated.
        Retrieve the value of the specified System property on the Confluence server.
        Parameters:
        name - the property to retrieve
        Returns:
        the value of the system property on the server, or null if it is not set
      • setSystemProperty

        public void setSystemProperty​(String name,
                                      String value)
        Deprecated.
        Set the specified System property on the Confluence server. If the value is null, the system property will be removed instead.
        Parameters:
        name - the property to set
        value - the value to set
      • clearSystemProperty

        public void clearSystemProperty​(String name)
        Deprecated.
        Clear the specified System property on the Confluence server.
        Parameters:
        name - the property to set
      • getPluginHelper

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

        public String getBaseUrl()
        Deprecated.
      • createUserMacro

        public void createUserMacro​(String name,
                                    boolean hasBody,
                                    String bodyType,
                                    String outputType,
                                    String template)
        Deprecated.
      • removeUserMacro

        public void removeUserMacro​(String name)
        Deprecated.
      • getPersonalInformationId

        public long getPersonalInformationId​(String username)
        Deprecated.
      • removePersonalInformation

        public void removePersonalInformation​(User user)
        Deprecated.
        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 org.apache.log4j.Level setLogLevel​(String logger,
                                                  org.apache.log4j.Level level)
        Deprecated.
        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. LoggingAndProfiling.LogLevel.ERROR
        Returns:
        the previous level the logger was set to.
      • logMessage

        public boolean logMessage​(RpcLogDestination destination,
                                  String message)
        Deprecated.
        Logs a message on the server at a specified log level or to sout or syserr.
        Returns:
        always true.
      • setEnableAnonymousRpc

        public void setEnableAnonymousRpc​(boolean enable)
        Deprecated.
      • getStackDump

        public String getStackDump​(String threadNameRegex)
        Deprecated.
      • flushAllCaches

        public void flushAllCaches()
        Deprecated.
      • getClusterInformation

        public Map<String,​Object> getClusterInformation()
        Deprecated.
      • getAnonymoizedCurrentClusterNodeIdentifier

        public String getAnonymoizedCurrentClusterNodeIdentifier()
        Deprecated.
      • isClusteredInstance

        public boolean isClusteredInstance()
        Deprecated.
      • getCusterNodeStatuses

        public Vector<Hashtable> getCusterNodeStatuses()
        Deprecated.
      • createPageHierarchy

        public List<Page> createPageHierarchy​(Space space,
                                              int depth,
                                              String pageTitlePrefix)
        Deprecated.
        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.
      • addSmtpServer

        public void addSmtpServer​(String serverName,
                                  String from,
                                  String subjectPrefix,
                                  String hostname,
                                  int port)
        Deprecated.
      • addSmtpServer

        public void addSmtpServer​(String serverName,
                                  String from,
                                  String subjectPrefix,
                                  String hostname,
                                  int port,
                                  String fromName)
        Deprecated.
      • setSmtpServer

        public void setSmtpServer​(String serverName,
                                  String from,
                                  String subjectPrefix,
                                  String hostname,
                                  int port)
        Deprecated.
      • setSmtpServer

        public void setSmtpServer​(String serverName,
                                  String from,
                                  String subjectPrefix,
                                  String hostname,
                                  int port,
                                  String fromName)
        Deprecated.
      • removeMailServer

        public void removeMailServer​(String serverName)
        Deprecated.
      • flushMailQueue

        public void flushMailQueue()
        Deprecated.
        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
      • registerEventListener

        public void registerEventListener​(String eventClassName)
        Deprecated.
      • unregisterEventListener

        public void unregisterEventListener​(String eventClassName)
        Deprecated.
      • waitForEvent

        public void waitForEvent​(String eventClassName,
                                 String timeoutInSeconds)
        Deprecated.
      • waitForEventQueue

        public void waitForEventQueue()
        Deprecated.
      • setApplicationConfigProperty

        public void setApplicationConfigProperty​(String propertyKey,
                                                 String propertyValue)
        Deprecated.
      • getApplicationConfigProperty

        public Object getApplicationConfigProperty​(String propertyKey)
        Deprecated.
      • tryGetApplicationConfigProperty

        public com.atlassian.fugue.Option<Object> tryGetApplicationConfigProperty​(String propertyKey)
        Deprecated.
      • followUsers

        public void followUsers​(User follower,
                                Iterable<User> followees)
        Deprecated.
        Since:
        5.7
      • setUserStatus

        public long setUserStatus​(String wikiStatus)
        Deprecated.
        Sets the current user's status.
        Parameters:
        wikiStatus - the new status of the user as wiki markup.
      • getConfiguredBaseUrl

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

        public String convertWikiToStorageFormat​(String wiki)
        Deprecated.
      • enableWebSudo

        public void enableWebSudo​(boolean enabled)
        Deprecated.
      • setWebSudoTimeout

        public void setWebSudoTimeout​(int timeout)
        Deprecated.
      • enableElevatedSecurityCheck

        public void enableElevatedSecurityCheck​(boolean enabled)
        Deprecated.
      • enablePublicSignUp

        public void enablePublicSignUp​(boolean enabled)
        Deprecated.
      • synchroniseUserDirectories

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

        public void setDirectoryPasswordEncoder​(String directoryName,
                                                String encoder)
        Deprecated.
      • removeUserDirectory

        public boolean removeUserDirectory​(long directoryId)
        Deprecated.
      • getComments

        public List<Comment> getComments​(Page page)
        Deprecated.
      • isSpringComponentPresent

        public boolean isSpringComponentPresent​(String componentName)
        Deprecated.
      • removeBandanaKey

        public void removeBandanaKey​(String context,
                                     String key)
        Deprecated.
      • setBandanaKey

        public void setBandanaKey​(String context,
                                  String key,
                                  Set<String> value)
        Deprecated.
      • setBandanaKey

        public void setBandanaKey​(String context,
                                  String key,
                                  String value)
        Deprecated.
      • setBandanaKey

        public void setBandanaKey​(String context,
                                  String key,
                                  boolean value)
        Deprecated.
      • setBandanaKey

        public void setBandanaKey​(String context,
                                  String key,
                                  int value)
        Deprecated.
      • getBandanaValue

        public Object getBandanaValue​(String context,
                                      String key)
        Deprecated.
      • updateGlobalSetting

        public boolean updateGlobalSetting​(String name,
                                           boolean value)
        Deprecated.
      • updateGlobalSetting

        public String updateGlobalSetting​(String name,
                                          String value)
        Deprecated.
      • saveDateFormat

        public void saveDateFormat​(String pattern)
        Deprecated.
      • getAncestors

        public List<Page> getAncestors​(Page homePage)
        Deprecated.
      • getDescendents

        public List<Page> getDescendents​(Page homePage)
        Deprecated.
      • getLoggedInUser

        public String getLoggedInUser()
        Deprecated.
      • createSpaces

        public Iterable<String> createSpaces​(int i)
        Deprecated.
        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)
        Deprecated.
      • unarchiveSpace

        public void unarchiveSpace​(Space space)
        Deprecated.
      • isDarkFeatureEnabled

        public boolean isDarkFeatureEnabled​(String key)
        Deprecated.
      • getNumberOfActiveUsers

        public int getNumberOfActiveUsers()
        Deprecated.
      • isUnlimitedUserLicense

        public boolean isUnlimitedUserLicense()
        Deprecated.
      • getAliveThreads

        public List<Map> getAliveThreads()
        Deprecated.
      • setWelcomeMessage

        public boolean setWelcomeMessage​(String welcomeMessage)
        Deprecated.
      • resetWelcomeMessage

        public boolean resetWelcomeMessage()
        Deprecated.
      • getExportBuildNumber

        public String getExportBuildNumber()
        Deprecated.
      • getOldestSpaceImportAllowed

        public String getOldestSpaceImportAllowed()
        Deprecated.
      • getPluginExportCompatibility

        public String getPluginExportCompatibility​(String pluginKey)
        Deprecated.
      • isPluginUpgradeTasksComplete

        public boolean isPluginUpgradeTasksComplete()
        Deprecated.
      • resetDatabaseStatistics

        public void resetDatabaseStatistics()
        Deprecated.
      • getDatabaseStatistics

        public String getDatabaseStatistics()
        Deprecated.
      • runGarbageCollection

        public void runGarbageCollection()
        Deprecated.
      • enableNewUserEmailNotifications

        public void enableNewUserEmailNotifications()
        Deprecated.
      • isImportTaskRunning

        public boolean isImportTaskRunning()
        Deprecated.
      • increaseHighValue

        public void increaseHighValue()
        Deprecated.
      • setHibernateConnectionProviderLastExceptionTime

        public void setHibernateConnectionProviderLastExceptionTime​(Instant time)
        Deprecated.
      • clearHibernateConnectionProviderLastExceptionTime

        public void clearHibernateConnectionProviderLastExceptionTime()
        Deprecated.