com.atlassian.confluence.test.rpc
Interface FuncTestRpcHandler

All Known Implementing Classes:
FuncTestRpcDelegator, FuncTestRpcHandlerImpl

public interface FuncTestRpcHandler


Method Summary
 boolean addGroupAnyCase(java.lang.String token, java.lang.String groupname)
          Allows addition of a group without enforcing that the name be all lower case.
 boolean addMailServer(java.lang.String token, java.lang.String name, java.lang.String from, java.lang.String subjectPrefix, java.lang.String hostname, int port)
           
 boolean addUserAnyCase(java.lang.String token, java.lang.String username, java.lang.String email, java.lang.String fullname, java.lang.String password)
          Allows addition of a user without enforcing that the username be all lower case.
 boolean changeAttachmentCreatedDate(java.lang.String token, java.lang.String contentId, java.lang.String attachmentFileName, java.util.Date createdDate)
          Change the created date of an attachment
 boolean changeBlogPostModifiedDate(java.lang.String token, java.lang.String blogId, java.util.Date modifiedDate)
          Change the modified date of a blog post
 boolean changeCommentCreatedDate(java.lang.String token, java.lang.String commentId, java.util.Date createdDate)
          Change the created date of a comment
 java.lang.String changeLoggerLevel(java.lang.String token, java.lang.String loggerName, java.lang.String level)
           Change the level of the specified logger.
 boolean changePageCreatedDate(java.lang.String token, java.lang.String pageId, java.util.Date createdDate)
          Change the created date of a page
 boolean changePageModificationDate(java.lang.String token, java.lang.String pageId, java.util.Date modificationDate)
          Change the modification date of a page
 boolean changeSpaceCreatedDate(java.lang.String token, java.lang.String spaceKey, java.util.Date createdDate)
          Change the created date of a space
 boolean clearCustomHtml(java.lang.String token)
          Clears the global custom html.
 boolean clearEventListeners(java.lang.String token)
          Removes all temporary event listeners, regardless of their state.
 boolean clearIndex(java.lang.String token)
          Blows away the main Confluence search index.
 boolean clearQueue(java.lang.String token, java.lang.String queueName)
          Removes all items from the specified queue
 java.lang.String convertMarkupToXhtml(java.lang.String token, java.lang.String wikiMarkup, java.lang.String pageId)
          Render a page as XHTML.
 java.lang.String convertXhtmlToMarkup(java.lang.String token, java.lang.String xhtml, java.lang.String pageId)
          Convert XHTML to WikiMarkup.
 java.util.Hashtable createDraft(java.lang.String token, java.util.Hashtable draft)
          Creates a draft for the draft owner and draft type with the specified title and content.
 boolean createJohnsonEvent(java.lang.String token, java.lang.String message)
          Creates a Johnson event inside Confluence.
 boolean createUserMacro(java.lang.String token, java.lang.String name, boolean hasBody, java.lang.String bodyType, java.lang.String outputType, java.lang.String template)
          Create a User Macro
 boolean disablePlugin(java.lang.String token, java.lang.String pluginKey)
          Disable a plugin.
 boolean disablePluginModule(java.lang.String tokdis, java.lang.String pluginKey, java.lang.String moduleKey)
          Disable plugin module
 boolean disconnectGroup(java.lang.String token, java.lang.String groupName)
          Disconnect a group from Confluence.
 boolean disconnectUser(java.lang.String token, java.lang.String username)
          Disconnect a user from Confluence.
 boolean doesDraftExist(java.lang.String token, java.lang.String contentId, java.lang.String owner, java.lang.String draftType)
          Determines if a draft of the specified type and belonging to the specified owner exists.
 boolean enablePlugin(java.lang.String token, java.lang.String pluginKey)
          Enable a plugin.
 boolean enablePluginModule(java.lang.String token, java.lang.String pluginKey, java.lang.String moduleKey)
          Enable plugin module
 boolean enableWebSudo(java.lang.String token, boolean enabled)
          Sets the web sudo enabled status
 boolean flushAllCaches(java.lang.String token)
          Flushes all the caches.
 boolean followUser(java.lang.String token, java.lang.String userName, boolean followUser)
          Follows or stops following a user.
 java.lang.String getConfiguredThemeForSpace(java.lang.String token, java.lang.String spaceKey)
          Get the key of the configured theme for a space, whether or not that theme exists.
 java.util.Vector getContentPropertyKeys(java.lang.String token, java.lang.String entityId)
          Get the content property keys for a content entity given its id
 java.lang.String getGlobalConfiguredTheme(java.lang.String token)
          Get the key of the configured global theme, whether or not that theme exists.
 java.lang.String getIdOfPagePermission(java.lang.String token, java.lang.String contentId, java.lang.String permissionType, java.lang.String username)
           
 java.lang.String getLeastRecentTestAppenderLogMessage(java.lang.String token, java.lang.String className)
           
 java.lang.String getLocaleForUser(java.lang.String token, java.lang.String username)
          Gets the locale preference for the user.
 java.lang.String getLocalisedText(java.lang.String token, java.lang.String messageKey)
          Get the localised string for given the message key in the logged-in user's locale.
 java.lang.String getPersonalInformationId(java.lang.String token, java.lang.String username)
          Gets the personal information id for a given username
 int getQueueSize(java.lang.String token, java.lang.String queueName)
          Returns the size of the task queue with the specified name.
 java.util.Vector getUsersForActivity(java.lang.String key)
          Call getUsersForActivity on the heartbeatManager bean
 int getVersionForPage(java.lang.String token, java.lang.String pageId)
          Get the version number for the page with pageId
 boolean isCurrentApplicationSet(java.lang.String token)
          Check whether or not the trustedApplicationManager has its currentApplication set.
 boolean isPluginInstalled(java.lang.String token, java.lang.String pluginKey)
          Check whether a plugin is installed or not.
 boolean isSpringComponentPresent(java.lang.String token, java.lang.String name)
          Returns true if a Spring component with the given name exists in the application context.
 boolean logMessage(java.lang.String token, java.lang.String destination, java.lang.String message)
          Log a message to the server's console.
 boolean logTestMessageForClass(java.lang.String token, java.lang.String className, java.lang.String message, java.lang.String level)
           
 boolean massCreateAttachments(java.lang.String token, java.lang.String pageId, java.lang.String prefix, java.lang.String numAttachments)
          Create a whole series of attachments on a single page.
 boolean nukeSpacesAndFlushEverything(java.lang.String token)
          Kill all the spaces and flush all the queues and caches.
 boolean nukeUserAndGroupDependentObjects(java.lang.String token)
          Remove the dependencies of all users and groups, except the default dependencies of the default groups and the current user.
 boolean pauseJob(java.lang.String token, java.lang.String jobName)
          Pauses a named job in the quartz scheduler
 boolean putStringMappingInCache(java.lang.String token, java.lang.String cacheName, java.lang.String key, java.lang.String value)
          Map a key to a value for a given cache.
 boolean registerEventListener(java.lang.String token, java.lang.String eventClassName)
          Registers a temporary event listener on the server to listen for the specified event.
 boolean registerTestAppenderForClass(java.lang.String token, java.lang.String className)
           
 boolean removeAllGroupsExceptDefaults(java.lang.String token)
          Remove all groups aside from the default Confluence groups
 boolean removeAllJohnsonEvents(java.lang.String token)
          Removes all Johnson events from Confluence
 boolean removeAllOtherUsers(java.lang.String token)
          Remove all users except the current user.
 boolean removeBandanaKey(java.lang.String token, java.lang.String space, java.lang.String key)
          Remove a key from Bandana
 boolean removeDrafts(java.lang.String token, java.lang.String username)
          Removes all drafts owned by the specified User.
 boolean removeMailServer(java.lang.String token, java.lang.String serverName)
          Remove the named mail server.
 boolean removePersonalInformation(java.lang.String token, java.lang.String username)
          PersonalInformation gets created automatically by the standard create user methods.
 boolean removeUserMacro(java.lang.String token, java.lang.String name)
          Remove a User Macro with the given name if it exists.
 boolean removeUserUncleanly(java.lang.String token, java.lang.String username)
          Remove a User without removing the things that refer to that user.
 boolean resetTheme(java.lang.String token)
          Reset the global theme to the default theme.
 boolean restoreAbstractPage(java.lang.String token, java.lang.String abstractPageId)
          Restores an abstract page from the trash.
 boolean resumeJob(java.lang.String token, java.lang.String jobName)
          Resumes a named job in the quartz scheduler
 boolean saveDateFormat(java.lang.String token, java.lang.String dateFormat)
           
 boolean saveDateTimeFormat(java.lang.String token, java.lang.String dateTimeFormat)
           
 boolean setApplicationConfigProperty(java.lang.String token, java.lang.String propertyKey, java.lang.String propertyValue)
          Sets a property on the global ApplicationConfiguration instance.
 boolean setCaptchaDebugMode(java.lang.String token, boolean enable)
          Sets the captcha mode into debug mode.
 boolean setCaptchaMode(java.lang.String token, boolean enable)
          Sets the captcha mode
 boolean setContentTextProperty(java.lang.String token, java.lang.String entityId, java.lang.String key, java.lang.String value)
          Sets a text content property for a content entity given its id
 boolean setEnableJavascriptTop(java.lang.String token, boolean set)
          Set the config for serving javascripts in the header.
 boolean setGlobalTheme(java.lang.String token, java.lang.String themeKey)
          Sets the global theme
 boolean setLocaleForUser(java.lang.String token, java.lang.String username, java.lang.String locale)
          Sets the locale preference for the user to the given named locale.
 boolean setSharedMode(java.lang.String token, boolean set)
           
 java.lang.Boolean setSystemProperty(java.lang.String token, java.lang.String name, java.lang.String value)
          Set a system property on the server to the supplied value.
 boolean setThemeForSpace(java.lang.String token, java.lang.String spaceKey, java.lang.String themeKey)
          Sets the theme for the specifiec space
 boolean setUserDetails(java.lang.String token, java.lang.String username, java.lang.String fullName, java.lang.String email)
          Sets the fullname and email address of a user with a given username.
 boolean setUserStatus(java.lang.String token, java.lang.String wikiStatus)
          Set the current user's status.
 boolean setWebSudoTimeout(java.lang.String token, int timeout)
          Sets the web sudo timeout in minutes
 boolean shutdownQuartz(java.lang.String token)
          Shutdown the quartz scheduler to ensure single threadedness for testing
 boolean startActivity(java.lang.String key, java.lang.String user)
          Call startActivity on the heartbeatManager bean
 boolean triggerJob(java.lang.String token, java.lang.String jobName)
          Triggers a named job in the quartz scheduler synchronously.
 boolean uninstallPlugin(java.lang.String token, java.lang.String pluginKey)
          Uninstall a plugin.
 boolean unregisterEventListener(java.lang.String token, java.lang.String eventClassName)
          Unregisters the temporary listener registered for the specified event.
 boolean unregisterTestAppenderForClass(java.lang.String token, java.lang.String className)
           
 java.util.Hashtable updateDraft(java.lang.String token, java.util.Hashtable draft)
          Updates a draft located using the draft owner and draft type.
 boolean waitForEvent(java.lang.String token, java.lang.String eventClassName, int timeout)
          Waits for an event to occur and returns when it has finished.
 

Method Detail

logMessage

boolean logMessage(java.lang.String token,
                   java.lang.String destination,
                   java.lang.String message)
                   throws RemoteException
Log a message to the server's console.

Only administrators can log messages.

The destination of the message has the following valid values:

Parameters:
token - The token idenfitying the user.
destination - The destination of the message to be logged
message - The text message to be logged to the console
Returns:
boolean True if the message is logged (ie destination is a valid level)
Throws:
RemoteException

changeLoggerLevel

java.lang.String changeLoggerLevel(java.lang.String token,
                                   java.lang.String loggerName,
                                   java.lang.String level)
                                   throws RemoteException

Change the level of the specified logger.

The level parameter can be one of -


nukeSpacesAndFlushEverything

boolean nukeSpacesAndFlushEverything(java.lang.String token)
                                     throws RemoteException
Kill all the spaces and flush all the queues and caches.

Throws:
RemoteException

nukeUserAndGroupDependentObjects

boolean nukeUserAndGroupDependentObjects(java.lang.String token)
                                         throws RemoteException
Remove the dependencies of all users and groups, except the default dependencies of the default groups and the current user. This also deletes all mail servers , as it is significantly faster to batch up RPC invocations.

Throws:
RemoteException

removeAllOtherUsers

boolean removeAllOtherUsers(java.lang.String token)
                            throws RemoteException
Remove all users except the current user.

Throws:
RemoteException

removeAllGroupsExceptDefaults

boolean removeAllGroupsExceptDefaults(java.lang.String token)
                                      throws RemoteException
Remove all groups aside from the default Confluence groups

Throws:
RemoteException

disconnectUser

boolean disconnectUser(java.lang.String token,
                       java.lang.String username)
                       throws RemoteException
Disconnect a user from Confluence. Removes all their permissions, group memberships, their profile information and their personal space.

Throws:
RemoteException

disconnectGroup

boolean disconnectGroup(java.lang.String token,
                        java.lang.String groupName)
                        throws RemoteException
Disconnect a group from Confluence. Removes all its permissions.

Throws:
RemoteException

isCurrentApplicationSet

boolean isCurrentApplicationSet(java.lang.String token)
                                throws NotPermittedException
Check whether or not the trustedApplicationManager has its currentApplication set.

Throws:
NotPermittedException

massCreateAttachments

boolean massCreateAttachments(java.lang.String token,
                              java.lang.String pageId,
                              java.lang.String prefix,
                              java.lang.String numAttachments)
                              throws java.lang.Exception
Create a whole series of attachments on a single page.

Throws:
java.lang.Exception

resetTheme

boolean resetTheme(java.lang.String token)
                   throws java.lang.Exception
Reset the global theme to the default theme.

Throws:
java.lang.Exception

getGlobalConfiguredTheme

java.lang.String getGlobalConfiguredTheme(java.lang.String token)
                                          throws java.lang.Exception
Get the key of the configured global theme, whether or not that theme exists.

Throws:
java.lang.Exception

getConfiguredThemeForSpace

java.lang.String getConfiguredThemeForSpace(java.lang.String token,
                                            java.lang.String spaceKey)
                                            throws java.lang.Exception
Get the key of the configured theme for a space, whether or not that theme exists.

Throws:
java.lang.Exception

setGlobalTheme

boolean setGlobalTheme(java.lang.String token,
                       java.lang.String themeKey)
                       throws java.lang.Exception
Sets the global theme

Parameters:
themeKey - - the complete theme key
Throws:
java.lang.Exception

setThemeForSpace

boolean setThemeForSpace(java.lang.String token,
                         java.lang.String spaceKey,
                         java.lang.String themeKey)
                         throws java.lang.Exception
Sets the theme for the specifiec space

Parameters:
spaceKey - - the key of the space to change
themeKey - - the complete theme key
Throws:
java.lang.Exception

clearCustomHtml

boolean clearCustomHtml(java.lang.String token)
                        throws java.lang.Exception
Clears the global custom html.

Returns:
true always.
Throws:
java.lang.Exception

uninstallPlugin

boolean uninstallPlugin(java.lang.String token,
                        java.lang.String pluginKey)
                        throws NotPermittedException
Uninstall a plugin. (There's an install method in the standard rpc plugin)

Returns:
true because a return type is required by XMLRPC
Throws:
NotPermittedException

isPluginInstalled

boolean isPluginInstalled(java.lang.String token,
                          java.lang.String pluginKey)
                          throws NotPermittedException
Check whether a plugin is installed or not.

Returns:
true if the plugin is installed, false otherwise.
Throws:
NotPermittedException

disablePlugin

boolean disablePlugin(java.lang.String token,
                      java.lang.String pluginKey)
                      throws NotPermittedException
Disable a plugin.

Returns:
true because a return type is required by XMLRPC
Throws:
NotPermittedException

enablePlugin

boolean enablePlugin(java.lang.String token,
                     java.lang.String pluginKey)
                     throws NotPermittedException
Enable a plugin.

Returns:
true because a return type is required by XMLRPC
Throws:
NotPermittedException

enablePluginModule

boolean enablePluginModule(java.lang.String token,
                           java.lang.String pluginKey,
                           java.lang.String moduleKey)
                           throws NotPermittedException
Enable plugin module

Parameters:
pluginKey - the key of the plugin
moduleKey - the key of the module
Returns:
true because a return type is required by XMLRPC
Throws:
NotPermittedException

disablePluginModule

boolean disablePluginModule(java.lang.String tokdis,
                            java.lang.String pluginKey,
                            java.lang.String moduleKey)
                            throws NotPermittedException
Disable plugin module

Parameters:
pluginKey - the key of the plugin
moduleKey - the key of the module
Returns:
true because a return type is required by XMLRPC
Throws:
NotPermittedException

isSpringComponentPresent

boolean isSpringComponentPresent(java.lang.String token,
                                 java.lang.String name)
Returns true if a Spring component with the given name exists in the application context.


pauseJob

boolean pauseJob(java.lang.String token,
                 java.lang.String jobName)
                 throws java.lang.Exception
Pauses a named job in the quartz scheduler

Throws:
java.lang.Exception

resumeJob

boolean resumeJob(java.lang.String token,
                  java.lang.String jobName)
                  throws java.lang.Exception
Resumes a named job in the quartz scheduler

Throws:
java.lang.Exception

triggerJob

boolean triggerJob(java.lang.String token,
                   java.lang.String jobName)
                   throws java.lang.Exception
Triggers a named job in the quartz scheduler synchronously. Note that Quartz's triggerJob function is asynchronous, but we use a listener internally to provide synchronicity.

Throws:
java.lang.Exception

waitForEvent

boolean waitForEvent(java.lang.String token,
                     java.lang.String eventClassName,
                     int timeout)
                     throws java.lang.Exception
Waits for an event to occur and returns when it has finished.

Parameters:
eventClassName - the fully qualified classname of the event to wait for.
timeout - number of milliseconds to wait for the event before giving up completely.
Returns:
true if the event occurs within the timeout.
Throws:
java.lang.Exception

shutdownQuartz

boolean shutdownQuartz(java.lang.String token)
                       throws java.lang.Exception
Shutdown the quartz scheduler to ensure single threadedness for testing

Throws:
java.lang.Exception

removeBandanaKey

boolean removeBandanaKey(java.lang.String token,
                         java.lang.String space,
                         java.lang.String key)
Remove a key from Bandana


getContentPropertyKeys

java.util.Vector getContentPropertyKeys(java.lang.String token,
                                        java.lang.String entityId)
Get the content property keys for a content entity given its id


setContentTextProperty

boolean setContentTextProperty(java.lang.String token,
                               java.lang.String entityId,
                               java.lang.String key,
                               java.lang.String value)
Sets a text content property for a content entity given its id


getPersonalInformationId

java.lang.String getPersonalInformationId(java.lang.String token,
                                          java.lang.String username)
Gets the personal information id for a given username


removePersonalInformation

boolean removePersonalInformation(java.lang.String token,
                                  java.lang.String username)
                                  throws NotPermittedException
PersonalInformation gets created automatically by the standard create user methods. This method exists to allow testing that the PersonalInformation will get created appropriately when it doesn't exist (eg for LDAP users logging in).

Parameters:
username - user whose personalInformation will be removed
Returns:
true because it has to return something
Throws:
NotPermittedException

getLocaleForUser

java.lang.String getLocaleForUser(java.lang.String token,
                                  java.lang.String username)
Gets the locale preference for the user.


setLocaleForUser

boolean setLocaleForUser(java.lang.String token,
                         java.lang.String username,
                         java.lang.String locale)
                         throws RemoteException
Sets the locale preference for the user to the given named locale.

Throws:
RemoteException

setUserDetails

boolean setUserDetails(java.lang.String token,
                       java.lang.String username,
                       java.lang.String fullName,
                       java.lang.String email)
                       throws RemoteException
Sets the fullname and email address of a user with a given username.

Returns:
true because XMLRPC methods have to return something
Throws:
RemoteException - if the user was not found.

putStringMappingInCache

boolean putStringMappingInCache(java.lang.String token,
                                java.lang.String cacheName,
                                java.lang.String key,
                                java.lang.String value)
                                throws java.lang.Exception
Map a key to a value for a given cache. Only accepts strings. This allows us to manipulate the number of entries in the cache. This method will create the named cache if it doesn't exist.

Returns:
true because void is not allowed.
Throws:
java.lang.Exception

flushAllCaches

boolean flushAllCaches(java.lang.String token)
                       throws java.lang.Exception
Flushes all the caches.

Returns:
true because void isn't allowed.
Throws:
java.lang.Exception

enableWebSudo

boolean enableWebSudo(java.lang.String token,
                      boolean enabled)
                      throws java.lang.Exception
Sets the web sudo enabled status

Returns:
true because void isn't allowed.
Throws:
java.lang.Exception

setWebSudoTimeout

boolean setWebSudoTimeout(java.lang.String token,
                          int timeout)
                          throws java.lang.Exception
Sets the web sudo timeout in minutes

Returns:
true because void isn't allowed.
Throws:
java.lang.Exception

startActivity

boolean startActivity(java.lang.String key,
                      java.lang.String user)
                      throws java.lang.Exception
Call startActivity on the heartbeatManager bean

Throws:
java.lang.Exception

getUsersForActivity

java.util.Vector getUsersForActivity(java.lang.String key)
                                     throws java.lang.Exception
Call getUsersForActivity on the heartbeatManager bean

Throws:
java.lang.Exception

setSharedMode

boolean setSharedMode(java.lang.String token,
                      boolean set)
                      throws java.lang.Exception
Throws:
java.lang.Exception

removeUserUncleanly

boolean removeUserUncleanly(java.lang.String token,
                            java.lang.String username)
                            throws java.lang.Exception
Remove a User without removing the things that refer to that user.

Throws:
java.lang.Exception

doesDraftExist

boolean doesDraftExist(java.lang.String token,
                       java.lang.String contentId,
                       java.lang.String owner,
                       java.lang.String draftType)
Determines if a draft of the specified type and belonging to the specified owner exists.

Parameters:
token - rpc authentication token
contentId - id of the content this draft is for ('0' for new content)
owner - owner/author of the draft
draftType - type of content this draft is for
Returns:
true if a draft of the specified type and belonging to the specified owner exists, else false

createDraft

java.util.Hashtable createDraft(java.lang.String token,
                                java.util.Hashtable draft)
Creates a draft for the draft owner and draft type with the specified title and content. If the draft already exists the current draft is updated.

Parameters:
token - rpc authentication token
draft - the draft object to create Required: "owner" - the username of owner/author of the draft. Set to null for anonymous users. "draftType" - type of content the draft is for i.e. BlogPost.getType() or Page.getType(). "title" - title of the draft. "content" - content of the draft as a String. Optional: "pageId" - page that the draft is associated with. "spaceKey" - if no there is no page, the space that the draft is written in.
Returns:
the draft created returned in the same format as above, with the additional field id.

updateDraft

java.util.Hashtable updateDraft(java.lang.String token,
                                java.util.Hashtable draft)
Updates a draft located using the draft owner and draft type. Draft is then updated with the specified title and content

Parameters:
token - rpc authentication token
draft - the draft object to create see #createDraft(java.lang.String, java.util.Hashtable)
Returns:
the draft updated returns null if the draft does not exist

removeDrafts

boolean removeDrafts(java.lang.String token,
                     java.lang.String username)
Removes all drafts owned by the specified User.

Parameters:
token - rpc authentication token
username - user to remove drafts for
Returns:
true if this is successful, false if no user with this name.

clearQueue

boolean clearQueue(java.lang.String token,
                   java.lang.String queueName)
Removes all items from the specified queue

Returns:
true if this is successful, false if no queue with this name exists

getQueueSize

int getQueueSize(java.lang.String token,
                 java.lang.String queueName)
Returns the size of the task queue with the specified name.

Returns:
the size of the task queue with the specified name.

removeMailServer

boolean removeMailServer(java.lang.String token,
                         java.lang.String serverName)
                         throws java.lang.Exception
Remove the named mail server.

Parameters:
token - the rpc authentication token
serverName - the name of the server to be removed.
Returns:
true if the named server was removed (or there was no server by that name), otherwise false.
Throws:
java.lang.Exception

getLeastRecentTestAppenderLogMessage

java.lang.String getLeastRecentTestAppenderLogMessage(java.lang.String token,
                                                      java.lang.String className)

registerTestAppenderForClass

boolean registerTestAppenderForClass(java.lang.String token,
                                     java.lang.String className)

unregisterTestAppenderForClass

boolean unregisterTestAppenderForClass(java.lang.String token,
                                       java.lang.String className)

logTestMessageForClass

boolean logTestMessageForClass(java.lang.String token,
                               java.lang.String className,
                               java.lang.String message,
                               java.lang.String level)

getLocalisedText

java.lang.String getLocalisedText(java.lang.String token,
                                  java.lang.String messageKey)
Get the localised string for given the message key in the logged-in user's locale.

Parameters:
token - the rpc authentication token
messageKey - the i18n message key
Returns:
the localised version of the message key in the logged-in user's locale, or the message key itself if it does not have a corresponding value.

addUserAnyCase

boolean addUserAnyCase(java.lang.String token,
                       java.lang.String username,
                       java.lang.String email,
                       java.lang.String fullname,
                       java.lang.String password)
                       throws RemoteException
Allows addition of a user without enforcing that the username be all lower case. This is for use in tests where you need mixed case user - useful for emulating an external provider such as LDAP.

Throws:
NotPermittedException - if you do not have permissions to add the user.
RemoteException

addGroupAnyCase

boolean addGroupAnyCase(java.lang.String token,
                        java.lang.String groupname)
                        throws RemoteException
Allows addition of a group without enforcing that the name be all lower case. This is for use in tests where you need mixed case user - useful for emulating an external provider such as LDAP.

Parameters:
groupname - the name of the group to add
Returns:
true if successfully added, otherwise false
Throws:
RemoteException

changeSpaceCreatedDate

boolean changeSpaceCreatedDate(java.lang.String token,
                               java.lang.String spaceKey,
                               java.util.Date createdDate)
                               throws RemoteException
Change the created date of a space

Parameters:
spaceKey - the space key of the space to change the created date
Throws:
RemoteException

changeCommentCreatedDate

boolean changeCommentCreatedDate(java.lang.String token,
                                 java.lang.String commentId,
                                 java.util.Date createdDate)
                                 throws RemoteException
Change the created date of a comment

Throws:
RemoteException

changePageCreatedDate

boolean changePageCreatedDate(java.lang.String token,
                              java.lang.String pageId,
                              java.util.Date createdDate)
                              throws RemoteException
Change the created date of a page

Parameters:
pageId - the page id of the page to change the created date
Throws:
RemoteException

changeAttachmentCreatedDate

boolean changeAttachmentCreatedDate(java.lang.String token,
                                    java.lang.String contentId,
                                    java.lang.String attachmentFileName,
                                    java.util.Date createdDate)
                                    throws RemoteException
Change the created date of an attachment

Parameters:
contentId - the id of the page or blogpost the attachment is attached to
attachmentFileName - the attachment file name of the attachment to change the created date
Throws:
RemoteException

changeBlogPostModifiedDate

boolean changeBlogPostModifiedDate(java.lang.String token,
                                   java.lang.String blogId,
                                   java.util.Date modifiedDate)
                                   throws RemoteException
Change the modified date of a blog post

Parameters:
blogId - the id of the blog to modify
modifiedDate - the last modification date to be set.
Returns:
true if successful, otherwise false.
Throws:
RemoteException

changePageModificationDate

boolean changePageModificationDate(java.lang.String token,
                                   java.lang.String pageId,
                                   java.util.Date modificationDate)
                                   throws RemoteException
Change the modification date of a page

Parameters:
pageId - the page id of the page to change the modification date
modificationDate - the last modification date to be set.
Throws:
RemoteException

getVersionForPage

int getVersionForPage(java.lang.String token,
                      java.lang.String pageId)
                      throws RemoteException
Get the version number for the page with pageId

Throws:
RemoteException

saveDateFormat

boolean saveDateFormat(java.lang.String token,
                       java.lang.String dateFormat)

saveDateTimeFormat

boolean saveDateTimeFormat(java.lang.String token,
                           java.lang.String dateTimeFormat)

addMailServer

boolean addMailServer(java.lang.String token,
                      java.lang.String name,
                      java.lang.String from,
                      java.lang.String subjectPrefix,
                      java.lang.String hostname,
                      int port)

convertMarkupToXhtml

java.lang.String convertMarkupToXhtml(java.lang.String token,
                                      java.lang.String wikiMarkup,
                                      java.lang.String pageId)
Render a page as XHTML.


convertXhtmlToMarkup

java.lang.String convertXhtmlToMarkup(java.lang.String token,
                                      java.lang.String xhtml,
                                      java.lang.String pageId)
Convert XHTML to WikiMarkup.


createJohnsonEvent

boolean createJohnsonEvent(java.lang.String token,
                           java.lang.String message)
Creates a Johnson event inside Confluence. This method is used to test the ConfluenceJohnsonFilter.

Parameters:
message - the description of the event to create

removeAllJohnsonEvents

boolean removeAllJohnsonEvents(java.lang.String token)
Removes all Johnson events from Confluence


setCaptchaMode

boolean setCaptchaMode(java.lang.String token,
                       boolean enable)
Sets the captcha mode


setCaptchaDebugMode

boolean setCaptchaDebugMode(java.lang.String token,
                            boolean enable)
Sets the captcha mode into debug mode. See CaptchaManager.setDebugMode(boolean).


setSystemProperty

java.lang.Boolean setSystemProperty(java.lang.String token,
                                    java.lang.String name,
                                    java.lang.String value)
Set a system property on the server to the supplied value.

Parameters:
name - the name of the property
value - the value of the property
Returns:
always true since XML RPC can't handle void

clearIndex

boolean clearIndex(java.lang.String token)
Blows away the main Confluence search index.


restoreAbstractPage

boolean restoreAbstractPage(java.lang.String token,
                            java.lang.String abstractPageId)
Restores an abstract page from the trash.


getIdOfPagePermission

java.lang.String getIdOfPagePermission(java.lang.String token,
                                       java.lang.String contentId,
                                       java.lang.String permissionType,
                                       java.lang.String username)
Returns:
the id of the identified content permission or 0 if there is no match found.

createUserMacro

boolean createUserMacro(java.lang.String token,
                        java.lang.String name,
                        boolean hasBody,
                        java.lang.String bodyType,
                        java.lang.String outputType,
                        java.lang.String template)
                        throws NotPermittedException
Create a User Macro

Parameters:
bodyType - how the body should be treated. "raw", "escapehtml", or "rendered". May be null only if hasBody is false.
outputType - whether the macro is expected to return html or wiki markup. "html" or "wiki".
template - the velocity rendered by the macro
Returns:
true all the time because XMLRPC methods need a non-void return type.
Throws:
java.lang.RuntimeException - if the macro already exists
NotPermittedException

removeUserMacro

boolean removeUserMacro(java.lang.String token,
                        java.lang.String name)
                        throws NotPermittedException
Remove a User Macro with the given name if it exists.

Returns:
true all the time because XMLRPC methods need a non-void return type.
Throws:
NotPermittedException

setEnableJavascriptTop

boolean setEnableJavascriptTop(java.lang.String token,
                               boolean set)
Set the config for serving javascripts in the header.


registerEventListener

boolean registerEventListener(java.lang.String token,
                              java.lang.String eventClassName)
                              throws java.lang.Exception
Registers a temporary event listener on the server to listen for the specified event. It is recommended that clients also unregister the event listener using unregisterEventListener(String, String) in a finally clause to ensure the temporary listener is cleaned up.

Once the listener is registered, clients can use waitForEvent(String, String, int) to block until the event is published.

Throws:
java.lang.Exception

unregisterEventListener

boolean unregisterEventListener(java.lang.String token,
                                java.lang.String eventClassName)
                                throws java.lang.Exception
Unregisters the temporary listener registered for the specified event.

Throws:
java.lang.Exception

clearEventListeners

boolean clearEventListeners(java.lang.String token)
                            throws java.lang.Exception
Removes all temporary event listeners, regardless of their state.

Returns:
true because some result is required.
Throws:
java.lang.Exception

setApplicationConfigProperty

boolean setApplicationConfigProperty(java.lang.String token,
                                     java.lang.String propertyKey,
                                     java.lang.String propertyValue)
Sets a property on the global ApplicationConfiguration instance.

Returns:
the previous value of the property

followUser

boolean followUser(java.lang.String token,
                   java.lang.String userName,
                   boolean followUser)
                   throws RemoteException
Follows or stops following a user. Can be done by any user, not just admins.

Parameters:
followUser - true to follow a user, false to stop following
Throws:
RemoteException

setUserStatus

boolean setUserStatus(java.lang.String token,
                      java.lang.String wikiStatus)
                      throws java.lang.Exception
Set the current user's status. Can be done by any user, not just admins.

Parameters:
wikiStatus - the status string in wiki markup.
Returns:
true
Throws:
java.lang.Exception


Copyright © 2003-2010 Atlassian. All Rights Reserved.