Class FuncTestRpcHandlerImpl
- java.lang.Object
-
- com.atlassian.confluence.test.rpc.FuncTestRpcHandlerImpl
-
- All Implemented Interfaces:
FuncTestRpcHandler
public class FuncTestRpcHandlerImpl extends Object implements FuncTestRpcHandler
-
-
Constructor Summary
Constructors Constructor Description FuncTestRpcHandlerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
addExistingProfilePicture(String token, String userName, String fileName)
Attempts to add a existing profile picture to a user's profile.boolean
addGroupAnyCase(String token, String groupname)
Allows addition of a group without enforcing that the name be all lower case.int
addLabelToLabelable(String token, String labelName, String labelableId, String labelableType)
Adds a label to a labelable, because the public RPC API doesn't let you do it.boolean
addMailServer(String token, String serverName, String protocol, String hostname, int port, String username, String password, String toAddress)
Add a POP server to poll for emails in a particular account.boolean
addSmtpServer(String token, String name, String from, String subjectPrefix, String hostname, int port)
Add an SMTP mail server.boolean
addSmtpServer(String token, String name, String from, String subjectPrefix, String hostname, int port, String fromName)
boolean
addUserAnyCase(String token, String username, String email, String fullname, String password)
Allows addition of a user without enforcing that the username be all lower case.boolean
assertThatIndexQueueEntryHasBeenProcessed(String unusedToken, String searchableClassname, String searchableId)
boolean
changeAttachmentCreatedDate(String token, String contentId, String attachmentFileName, Date createdDate)
Change the created date of an attachmentboolean
changeBlogPostModificationDate(String token, String blogId, Date modificationDate)
Change the modification date of a blog postboolean
changeCommentCreatedDate(String token, String commentId, Date createdDate)
Change the created date of a commentString
changeLoggerLevel(String token, String loggerName, String level)
Deprecated.since 5.6.boolean
changePageCreatedDate(String token, String pageId, Date createdDate)
Change the created date of a pageboolean
changePageModificationDate(String token, String pageId, Date modificationDate)
Change the modification date of a pageboolean
changeSpaceCreatedDate(String token, String spaceKey, Date createdDate)
Change the created date of a spaceboolean
clearCustomHtml(String token)
Clears the global custom html.boolean
clearEventListeners(String token)
Removes all temporary event listeners, regardless of their state.boolean
clearHibernateConnectionProviderLastExceptionTime(String token)
boolean
clearIndex(String token)
Blows away the main Confluence search index.boolean
clearQueue(String token, String queueName)
Removes all items from the specified queueboolean
clearRecordedLogMessages(String token)
Boolean
clearSystemProperty(String token, String name)
Unset a system property.String
convertMarkupToXhtml(String token, String wikiMarkup, String pageId)
Render a page as XHTML.String
convertXhtmlToMarkup(String token, String xhtml, String pageId)
Convert XHTML to WikiMarkup.int
countDrafts(String token, String owner)
Hashtable
createDraft(String token, Hashtable draftStruct)
Creates a draft for the draft owner and draft type with the specified title and content.boolean
createJohnsonEvent(String token, String message)
Creates a Johnson event inside Confluence.Vector<Hashtable>
createPagesFromPrototype(String token, Hashtable pageStruct, int count)
Creates a series of pages based on a prototype.Vector<String>
createSpaces(String token, int count)
Creates a bunch of spaces.String
createTemplate(String token, String templateName, String content, String spaceKey)
Create a new template.String
createTemplateWithStorageFormat(String token, String templateName, String storageFormat, String spaceKey)
Create a new template from storage format code.int
createTestUsers(String token, int count)
Create test users with usernames "testuser0", "testuser1", etc.boolean
createUserMacro(String token, String name, boolean hasBody, String bodyType, String outputType, String template, String title, String description, String category, String iconUrl, String documentationUrl, boolean hidden)
Create a User Macroboolean
disablePlugin(String token, String pluginKey)
Deprecated.since 5.6.boolean
disablePluginModule(String token, String pluginKey, String moduleKey)
Deprecated.since 5.6.boolean
disablePluginWithoutPersisting(String token, String pluginKey)
Deprecated.since 5.6.boolean
disableSiteFeature(String token, String featureKey)
Deprecated.since 5.6.boolean
disableUserFeature(String token, String featureKey)
Deprecated.since 5.6.boolean
disconnectGroup(String token, String groupName)
Disconnect a group from Confluence.boolean
disconnectUser(String token, String userName)
Disconnect a user from Confluence.boolean
doesDraftExist(String token, String contentId, String owner, String draftType, String spaceKey)
Determines if a draft of the specified type and belonging to the specified owner exists.boolean
enableCaptcha(String token, boolean enable)
Sets the captcha modeboolean
enableCaptchaDebugMode(String token, boolean enable)
Sets the captcha mode into debug mode.boolean
enableDailyReportNotification(String token, String userName, boolean dailyReportEnabled)
Sets the Daily Report email for a user to enabled or disabled.boolean
enableElevatedSecurityCheck(String token, boolean enabled)
boolean
enablePlugin(String token, String pluginKey)
Deprecated.since 5.6.boolean
enablePluginModule(String token, String pluginKey, String moduleKey)
Deprecated.since 5.6.boolean
enablePublicSignUp(String token, boolean enabled)
Sets the public sign up enabled statusboolean
enableSiteFeature(String token, String featureKey)
Deprecated.since 5.6.boolean
enableUserFeature(String token, String featureKey)
Deprecated.since 5.6.boolean
enableWebSudo(String token, boolean enabled)
Sets the web sudo enabled statusVector<String>
finishLoggingRequests(String token)
Finish logging http request and return any requests made.boolean
flushAllCaches(String token)
Deprecated.since 5.6.boolean
followUser(String token, String userName, boolean follow)
Follows or stops following a user.Vector<Hashtable>
getAliveThreads(String token)
Hashtable<String,Object>
getAllContentForAllLabels(String token, int offset, int maxResults, String labelsString)
Returns current and trashed CEOs having all of the labels supplied in the string.String
getAnonyimizedClusterNodeIdentifier(String unusedToken)
Object
getApplicationConfigProperty(String token, String propertyKey)
Returns a property of the globalApplicationConfiguration
instance.Object
getBandanaValue(String token, String space, String key)
Deprecated.since 5.6.Integer
getCacheMaximumNumberOfElements(String token, String cacheName)
Deprecated.since 5.6.Hashtable
getCacheStatistics(String token, String cacheName)
Deprecated.since 5.6.Vector<String>
getCacheStatisticsCapabilities(String token)
Deprecated.since 5.6.String
getConfiguredThemeForSpace(String token, String spaceKey)
Deprecated.since 5.6.Hashtable<String,Object>
getContentForAllLabels(String token, int offset, int maxResults, String labelsString)
Returns CEOs having all of the labels supplied in the string.Hashtable<String,Object>
getContentInSpacesForAllLabels(String token, int offset, int maxResults, String spaceKeysString, String labelsString)
Returns CEOs in the given spaces having all of the labels supplied in the string.String
getContentPropertiesString(String token, String entityId, String key)
Get the string value of aContentProperty
associated with a content entity given its id and the property nameString
getContentPropertiesStringForSpace(String token, String spaceKey, String key)
Get the string value of aContentProperty
associated with theSpaceDescription
of the spaceString
getContentProperty(String token, String entityId, String key)
Get the content property value for a content entity given its id and the property keyVector
getContentPropertyKeys(String token, String entityId)
Get the content property keys for a content entity given its idString
getContentStringProperty(String token, String entityId, String key)
Get the content property string value (in OS_PROPERTYENTRY) for a content entity given its id and property keyString
getContentTextProperty(String token, String entityId, String key)
Get the content property text value (in OS_PROPERTYENTRY) for a content entity given its id and property keyString
getDatabaseStatistics(String token)
Return database statistics.String
getDateTimeFormat(String token)
Get current DateTime formatString
getExportBuildNumber(String token)
Returns the backward-compatibility of an exportHashtable<String,Object>
getForLabels(String token, String labelableType, int offset, int maxResults, String labelsString)
Returns any kind of Labelable entities having all of the labels supplied in the string.String
getGlobalConfiguredTheme(String token)
Deprecated.since 5.6.String[]
getGlobalPermissionsForGroup(String token, String groupName)
Gets the global permissions that the given group has.String
getIdOfPagePermission(String token, String contentId, String permissionType, String username)
boolean
getIgnoreBaseURLWarning(String token)
Whether the warning message for an un-advisable value for the Base URL is ignored or not.String
getLeastRecentTestAppenderLogMessage(String token, String className)
String
getLocaleForUser(String token, String username)
Gets the locale preference for the user.String
getLocalisedText(String token, String messageKey)
Get the localised string for given the message key in the logged-in user's locale.Iterable<String>
getNames(Iterable<? extends com.atlassian.user.User> iterable)
int
getNumberOfActiveUsers(String token)
Returns the number of active users, i.e.int
getNumberOfIndexTasksInQueue(String token)
Returns the size of the index queue.String
getOldestSpaceImportAllowed(String token)
Returns the backwards-compatibility of a space importString
getPersonalInformationId(String token, String username)
Gets the personal information id for a given usernameString
getPluginExportCompatibility(String token, String pluginKey)
Returns the plugin compatibility matrix for exportsint
getQueueSize(String token, String queueName)
Returns the size of the task queue with the specified name.Vector<String>
getRecordedErrorLogMessages(String token)
String
getStackDump(String token, String threadNameRegex)
Hashtable<String,String>
getSystemProperty(String token, String name)
Retrieve the value of a system property.Vector
getUsersForActivity(String key)
Call getUsersForActivity on the heartbeatManager beanint
getVersionForPage(String token, String pageId)
Get the version number for the page with pageIdboolean
increaseHighValue(String token)
Put a number bigger than 65535 in Hibernate_unique_key table to force generated ids to be greater than max integer.boolean
isCurrentApplicationSet(String token)
Check whether or not the trustedApplicationManager has its currentApplication set.boolean
isImportTaskRunning(String token)
boolean
isPluginModuleEnabled(String token, String pluginKey, String moduleKey)
Deprecated.since 5.6.boolean
isPluginUpgradeTasksComplete(String token)
Returns true if the plugin dependent upgrade tasksboolean
isSpringComponentPresent(String token, String name)
Returns true if a Spring component with the given name exists in the application context.boolean
isUnlimitedUserLicense(String token)
boolean
logMessage(String token, String destination, String message)
Deprecated.since 5.6.boolean
logTestMessageForClass(String token, String className, String message, String level)
boolean
massCreateAttachments(String token, String pageId, String prefix, String numAttachments)
Create a whole series of attachments on a single page.boolean
moveBlogPost(String token, String blogPostId, String targetSpaceKey)
boolean
putStringMappingInCache(String token, String cacheName, String key, String value)
Deprecated.since 5.6.boolean
registerEventListener(String token, String eventClassName)
Registers a temporary event listener on the server to listen for the specified event.boolean
registerTestAppenderForClass(String token, String className)
boolean
removeAllJohnsonEvents(String token)
Removes all Johnson events from Confluenceboolean
removeAllSpaces(String token)
Kill all the spaces and flush all the queues and caches.boolean
removeAllTrustedApplications(String token)
Removes all trusted applications from the database.boolean
removeAttachmentUncleanly(String token, String contentId, String attachmentFileName)
Removes an attachment without cleaning up associated attachment infoboolean
removeBandanaKey(String token, String space, String key)
Deprecated.since 5.6.boolean
removeDrafts(String token, String username)
Removes all drafts owned by the specified User.boolean
removeGroupUncleanly(String token, String groupname)
Remove a Group without removing the things that refer to that group.boolean
removeMailServer(String token, String serverName)
Remove the named mail server.boolean
removePersonalInformation(String token, String username)
PersonalInformation gets created automatically by the standard create user methods.boolean
removeTestData(String token, Vector<String> usersToKeep, Vector<String> groupsToKeep, Hashtable<String,Vector<String>> userGroupMembershipsToKeep)
Big Kahuna remove method.boolean
removeTestDataAfterExternalUserManagement(String token)
Remove the dependencies of all users and groups, except the default dependencies of the default groups, the listed extra groups, the current user, and the listed extra users.int
removeTestUsers(String token, int count)
Removes test users with usernames "testuser0", "testuser1", etc.boolean
removeUserDirectory(String token, String directoryId)
Removes user directoryboolean
removeUserMacro(String token, String name)
Remove a User Macro with the given name if it exists.boolean
removeUserUncleanly(String token, String username)
Remove a User without removing the things that refer to that user.boolean
resetDatabaseStatistics(String token)
Reset database statistics.boolean
resetWelcomeMessage(String token)
boolean
restoreAbstractPage(String token, String abstractPageId)
Restores an abstract page from the trash.boolean
runGarbageCollection(String token)
boolean
saveDateFormat(String token, String dateFormat)
boolean
saveDateTimeFormat(String token, String dateTimeFormat)
void
setAnonymousUserPermissionsService(AnonymousUserPermissionsService anonymousUserPermissionsService)
void
setAnyTypeDao(EntityRemover entityRemover)
void
setApplicationConfig(com.atlassian.config.ApplicationConfiguration applicationConfiguration)
boolean
setApplicationConfigProperty(String token, String propertyKey, String propertyValue)
Sets a property on the globalApplicationConfiguration
instance.void
setAttachmentManager(AttachmentManager attachmentManager)
boolean
setBandanaKey(String token, String space, String key, String value)
Deprecated.since 5.6.boolean
setBandanaKeyBoolean(String token, String space, String key, boolean value)
Deprecated.since 5.6.boolean
setBandanaKeyInteger(String token, String space, String key, int value)
Deprecated.since 5.6.void
setBandanaManager(com.atlassian.bandana.BandanaManager bandanaManager)
boolean
setBandanaStringList(String token, String space, String key, Vector<String> value)
Deprecated.since 5.6.boolean
setBandanaStringSet(String token, String space, String key, Vector<String> value)
Deprecated.since 5.6.boolean
setBooleanUserPreference(String token, String userName, String preferenceKey, String value)
Sets a boolean user preference.void
setCacheConfigManager(CacheConfigManager cacheConfigManager)
void
setCacheManager(com.atlassian.cache.CacheManager cacheManager)
boolean
setCacheMaximumNumberOfElements(String token, String cacheName, int maxNumElements)
Deprecated.since 5.6.void
setCacheStatisticsManager(CacheStatisticsManager cacheStatisticsManager)
void
setCaptchaManager(CaptchaManager captchaManager)
void
setChangeSearchIndexAccessor(SearchIndexAccessor changeSearchIndexAccessor)
void
setClusterManager(ClusterManager clusterManager)
void
setCommentManager(CommentManager commentManager)
void
setConfluenceUserDao(ConfluenceUserDao confluenceUserDao)
void
setConfluenceWysiwygConverter(ConfluenceWysiwygConverter wysiwygConverter)
void
setConnectionProviderMonitor(ExceptionMonitor connectionProviderMonitor)
void
setContentEntityManager(ContentEntityManager contentEntityManager)
void
setContentPermissionManager(ContentPermissionManager contentPermissionManager)
boolean
setContentPropertiesString(String token, String entityId, String key, String value)
Sets the string value of aContentProperty
associated with a content entity given its id and the property nameboolean
setContentPropertiesStringForSpace(String token, String spaceKey, String key, String value)
Sets the string value of aContentProperty
associated with theSpaceDescription
of the spacevoid
setContentPropertyManager(ContentPropertyManager contentPropertyManager)
void
setContentSearchIndexAccessor(SearchIndexAccessor contentSearchIndexAccessor)
boolean
setContentStringProperty(String token, String entityId, String key, String value)
Set the content property string value (in OS_PROPERTYENTRY) for a content entity given its id, property key and valueboolean
setContentTextProperty(String token, String entityId, String key, String value)
Sets a text content property for a content entity given its idvoid
setCrowdDirectoryService(com.atlassian.crowd.embedded.api.CrowdDirectoryService crowdDirectoryService)
void
setCustomContentManager(CustomContentManager customContentManager)
void
setDarkFeaturesManager(DarkFeaturesManager darkFeaturesManager)
void
setDbStatCollector(DbStatCollector dbStatCollector)
boolean
setDirectoryPasswordEncoder(String token, String directoryName, String encoder)
Changes the password encoder for the given directoryvoid
setDraftManager(DraftManager draftManager)
boolean
setDraftSaveInterval(String token, int seconds)
Sets the given draft save interval.boolean
setEnableAnonymousRpc(String token, String value)
Toggle the setting to allow/deny anonymous RPC calls.void
setEntityRemover(EntityRemover entityRemover)
void
setEventLatchManager(EventLatchManager eventLatchManager)
void
setEventManager(com.atlassian.event.EventManager eventManager)
void
setEventPublisher(com.atlassian.event.api.EventPublisher eventPublisher)
void
setEventQueueFettlerBean(EventQueueFettler eventQueueFettler)
void
setFollowManager(FollowManager followManager)
void
setFormatConverter(FormatConverter formatConverter)
void
setFullReindexManager(FullReindexManager fullReindexManager)
boolean
setGlobalLanguage(String token, String language)
Changes to the default site languageboolean
setGlobalTheme(String token, String themeKey)
Deprecated.since 5.6.void
setGroupManager(com.atlassian.user.GroupManager groupManager)
void
setHeartbeatManager(HeartbeatManager heartbeatManager)
void
setHibernateConfig(com.atlassian.config.db.HibernateConfig hibernateConfig)
boolean
setHibernateConnectionProviderLastExceptionTime(String token, String timeStr)
boolean
setIgnoreBaseURLWarning(String token, boolean ignored)
Affects whether the warning message for an un-advisable value for the Base URL is ignored or not.boolean
setIndexingLanguage(String token, String language)
Changes the indexing languagevoid
setIndexManager(IndexManager indexManager)
void
setJournalDao(JournalDao journalDao)
void
setJournalManager(JournalManagerBackdoor journalManagerBackdoor)
void
setJournalStateStore(JournalStateStore journalStateStore)
boolean
setKeyboardShortcutPref(String token, String username, String enabled)
Enables/Disables keyboard shortcuts for the given uesrvoid
setLabelManager(LabelManager labelManager)
boolean
setLocaleForUser(String token, String username, String locale)
Sets the locale preference for the user to the given named locale.void
setLogMessageRecordingAppender(LogMessageRecordingAppender logMessageRecordingAppender)
void
setMailServerManager(com.atlassian.mail.server.MailServerManager mailServerManager)
boolean
setNetworkNotificationForUser(String token, String userName, boolean watchNetwork)
Sets Network watch emails for a user to enabled or disabled.void
setNotificationManager(NotificationManager notificationManager)
void
setPageManager(PageManager pageManager)
void
setPageTemplateManager(PageTemplateManager pageTemplateManager)
void
setPermissionManager(PermissionManager permissionManager)
void
setPersonalInformationManager(PersonalInformationManager personalInformationManager)
void
setPluginAccessor(com.atlassian.plugin.PluginAccessor pluginAccessor)
void
setPluginController(com.atlassian.plugin.PluginController pluginController)
void
setRequestLogger(RequestLogger requestLogger)
void
setSchedulerService(com.atlassian.scheduler.core.LifecycleAwareSchedulerService schedulerService)
void
setSessionFactory5(org.hibernate.SessionFactory sessionFactory5)
void
setSettingsManager(SettingsManager settingsManager)
boolean
setSiteBlogNotificationForUser(String token, String userName, boolean globalBlogWatchForUser)
Sets Site Blog watch emails for a user to enabled or disabled.boolean
setSmtpServer(String token, String name, String from, String subjectPrefix, String hostname, int port)
Remove all existing SMTP servers and add the given server.boolean
setSmtpServer(String token, String name, String from, String subjectPrefix, String hostname, int port, String fromName)
Remove all existing SMTP servers and add the given server.void
setSpaceManager(SpaceManager spaceManager)
void
setSpacePermissionDefaultsStoreFactory(SpacePermissionDefaultsStoreFactory spacePermissionDefaultsStoreFactory)
void
setSpacePermissionManager(SpacePermissionManager spacePermissionManager)
boolean
setStringUserPreference(String token, String userName, String preferenceKey, String value)
Sets a string user preference.Boolean
setSystemProperty(String token, String name, String value)
Set a system property on the server to the supplied value.void
setTaskManager(com.atlassian.core.task.MultiQueueTaskManager taskManager)
boolean
setThemeForSpace(String token, String spaceKey, String themeKey)
Deprecated.since 5.6.void
setThemeManager(ThemeManager themeManager)
void
setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
void
setTrustedApplicationsManager(TrustedApplicationsManager trustedApplicationsManager)
void
setUpgradeGate(UpgradeGate upgradeGate)
void
setUpgradeManager(UpgradeManager upgradeManager)
void
setUserAccessor(UserAccessor userAccessor)
void
setUserChecker(UserChecker userChecker)
boolean
setUserDetailProperty(String token, String username, String propertyKey, String propertyValue)
Sets a single UserDetails property through the UserDetailsManager.boolean
setUserDetails(String token, String username, String fullName, String email)
Sets the fullname and email address of a user with a given username.void
setUserDetailsManager(UserDetailsManager userDetailsManager)
boolean
setUserFollows(String token, String followingUsername, Hashtable followUsers)
Change the follow or unfollow state between a follower user and s a set of folowees usersvoid
setUserIndexingManager(UserIndexingManagerInternal userIndexingManager)
void
setUserMacroLibrary(UserMacroLibrary userMacroLibrary)
void
setUserManager(com.atlassian.user.UserManager userManager)
boolean
setWatchOwnContentPref(String token, String username, String enabled)
Enables/Disables autowatching for the given uesrboolean
setWatchSpace(String token, String username, String spaceKey, String contentTypeStr, String enabled)
Enables/Disables watching a space for the given user and content type.boolean
setWatchSpaces(String token, String username, String contentTypeStr, Hashtable spaces)
Enables/Disables watching spaces for the given user and content type.boolean
setWebSudoTimeout(String token, int timeoutMinutes)
Sets the web sudo timeout in minutesboolean
setWelcomeMessage(String token, String welcomeMessage)
void
setWelcomeMessageService(WelcomeMessageService welcomeMessageService)
void
setXhtmlRpcHandler(ConfluenceXmlRpcHandler confluenceXmlRpcHandler)
boolean
shutdownScheduler(String token)
Deprecated.since 5.6.boolean
startActivity(String token, String key, String user)
Call startActivity on the heartbeat manager beanboolean
startLoggingRequests(String token)
Start logging http request urls.boolean
stopActivity(String token, String key, String user)
Call stopActivity on the heartbeatManager beanHashtable
storeXhtmlPage(String token, Hashtable pageStruct)
The Confluence remote API store page performs wiki to XHTML conversion on the page content.boolean
synchroniseUserDirectories(String token)
Synchronizes all remote user directories with the local database cacheboolean
uninstallPlugin(String token, String pluginKey)
Deprecated.since 5.6.boolean
unregisterEventListener(String token, String eventClassName)
Unregisters the temporary listener registered for the specified event.boolean
unregisterTestAppenderForClass(String token, String className)
Hashtable
updateDraft(String token, Hashtable draftStruct)
Updates a draft located using the draft owner and draft type.boolean
updateGlobalSettingBoolean(String token, String name, boolean value)
Update aSettings
boolean field.String
updateGlobalSettingString(String token, String name, String value)
Update aSettings
String field.boolean
waitForEvent(String token, String eventClassName, String timeoutStr, String timeUnitStr)
Waits for an event to occur and returns when it has finished.boolean
waitForEventQueue(String token, String timeoutStr, String timeUnitStr)
Waits for all events in queue to be processed.
-
-
-
Method Detail
-
logMessage
@Deprecated public boolean logMessage(String token, String destination, String message)
Deprecated.since 5.6. Use a FuncTestAdminLoggingResource REST call.Description copied from interface:FuncTestRpcHandler
Log a message to the server's console.Only administrators can log messages.
The destination of the message has the following valid values:
- info - message will be logged at INFO level
- debug - message will be logged at DEBUG level
- warn - message will be logged at WARN level
- error - message will be logged at ERROR level
- sout - message will be written via System.out.println
- serr - message will be written via System.err.println
- Specified by:
logMessage
in interfaceFuncTestRpcHandler
- Parameters:
token
- The token idenfitying the user.destination
- The destination of the message to be loggedmessage
- The text message to be logged to the console- Returns:
- boolean True if the message is logged (ie destination is a valid level)
-
changeLoggerLevel
@Deprecated public String changeLoggerLevel(String token, String loggerName, String level) throws RemoteException
Deprecated.since 5.6. Use a FuncTestAdminLoggingResource REST call.Description copied from interface:FuncTestRpcHandler
Change the level of the specified logger.The level parameter can be one of:
- DEBUG
- INFO
- WARN
- ERROR
- FATAL
- Specified by:
changeLoggerLevel
in interfaceFuncTestRpcHandler
- Parameters:
token
- the token identifying the user.loggerName
- the full name of the logger e.g. com.atlassian.confluence.test.rpc.FuncTestRpcHandlerlevel
- the level to change the logger to- Returns:
- the original level of the logger before changing.
- Throws:
RemoteException
-
createTemplate
public String createTemplate(String token, String templateName, String content, String spaceKey) throws RemoteException, XhtmlException
Description copied from interface:FuncTestRpcHandler
Create a new template. If spaceKey is not defined, a global template will be created.- Specified by:
createTemplate
in interfaceFuncTestRpcHandler
- Returns:
- template id
- Throws:
RemoteException
XhtmlException
-
createTemplateWithStorageFormat
public String createTemplateWithStorageFormat(String token, String templateName, String storageFormat, String spaceKey) throws RemoteException, XhtmlException
Description copied from interface:FuncTestRpcHandler
Create a new template from storage format code. If spaceKey is not defined, a global template will be created.- Specified by:
createTemplateWithStorageFormat
in interfaceFuncTestRpcHandler
- Returns:
- template id
- Throws:
RemoteException
XhtmlException
-
removeAllSpaces
public boolean removeAllSpaces(String token) throws RemoteException
Description copied from interface:FuncTestRpcHandler
Kill all the spaces and flush all the queues and caches.- Specified by:
removeAllSpaces
in interfaceFuncTestRpcHandler
- Throws:
RemoteException
-
removeTestData
public boolean removeTestData(String token, Vector<String> usersToKeep, Vector<String> groupsToKeep, Hashtable<String,Vector<String>> userGroupMembershipsToKeep) throws RemoteException
Description copied from interface:FuncTestRpcHandler
Big Kahuna remove method. Removes EVERYTHING that is meant to be removed on test setup, keeping only the users, groups and memberships specified. This includes removing global templates.- Specified by:
removeTestData
in interfaceFuncTestRpcHandler
- Parameters:
token
- the token identifying the user.usersToKeep
- users like admin and sysadmin that should not be removedgroupsToKeep
- groups like admins and users that should not be removeduserGroupMembershipsToKeep
- a map where the keys are group names and the values are lists of usernames in the group- Throws:
NotPermittedException
RemoteException
-
removeTestDataAfterExternalUserManagement
public boolean removeTestDataAfterExternalUserManagement(String token) throws Exception
Remove the dependencies of all users and groups, except the default dependencies of the default groups, the listed extra groups, the current user, and the listed extra users. This also deletes all mail servers, as it is significantly faster to batch up RPC invocations. Note that all memberships of kept users in kept groups will also be kept.- Specified by:
removeTestDataAfterExternalUserManagement
in interfaceFuncTestRpcHandler
- Throws:
Exception
-
setFullReindexManager
public void setFullReindexManager(FullReindexManager fullReindexManager)
-
disconnectUser
public boolean disconnectUser(String token, String userName) throws NotPermittedException
Description copied from interface:FuncTestRpcHandler
Disconnect a user from Confluence. Removes all their permissions, group memberships, their profile information and their personal space.- Specified by:
disconnectUser
in interfaceFuncTestRpcHandler
- Throws:
NotPermittedException
-
disconnectGroup
public boolean disconnectGroup(String token, String groupName) throws NotPermittedException
Description copied from interface:FuncTestRpcHandler
Disconnect a group from Confluence. Removes all its permissions.- Specified by:
disconnectGroup
in interfaceFuncTestRpcHandler
- Throws:
NotPermittedException
-
getGlobalPermissionsForGroup
public String[] getGlobalPermissionsForGroup(String token, String groupName) throws RemoteException
Description copied from interface:FuncTestRpcHandler
Gets the global permissions that the given group has.- Specified by:
getGlobalPermissionsForGroup
in interfaceFuncTestRpcHandler
- Throws:
RemoteException
-
isCurrentApplicationSet
public boolean isCurrentApplicationSet(String token) throws NotPermittedException
Description copied from interface:FuncTestRpcHandler
Check whether or not the trustedApplicationManager has its currentApplication set.- Specified by:
isCurrentApplicationSet
in interfaceFuncTestRpcHandler
- Throws:
NotPermittedException
-
removeAllTrustedApplications
public boolean removeAllTrustedApplications(String token)
Description copied from interface:FuncTestRpcHandler
Removes all trusted applications from the database.- Specified by:
removeAllTrustedApplications
in interfaceFuncTestRpcHandler
-
massCreateAttachments
public boolean massCreateAttachments(String token, String pageId, String prefix, String numAttachments) throws Exception
Description copied from interface:FuncTestRpcHandler
Create a whole series of attachments on a single page.- Specified by:
massCreateAttachments
in interfaceFuncTestRpcHandler
- Throws:
Exception
-
getGlobalConfiguredTheme
@Deprecated public String getGlobalConfiguredTheme(String token) throws Exception
Deprecated.since 5.6. Use FuncTestAdminThemeResource.Description copied from interface:FuncTestRpcHandler
Get the key of the configured global theme, whether or not that theme exists.- Specified by:
getGlobalConfiguredTheme
in interfaceFuncTestRpcHandler
- Throws:
Exception
-
getConfiguredThemeForSpace
@Deprecated public String getConfiguredThemeForSpace(String token, String spaceKey) throws Exception
Deprecated.since 5.6. Use FuncTestAdminThemeResource.Description copied from interface:FuncTestRpcHandler
Get the key of the configured theme for a space, whether or not that theme exists.- Specified by:
getConfiguredThemeForSpace
in interfaceFuncTestRpcHandler
- Throws:
Exception
-
setGlobalTheme
@Deprecated public boolean setGlobalTheme(String token, String themeKey) throws Exception
Deprecated.since 5.6. Use FuncTestAdminThemeResource.Description copied from interface:FuncTestRpcHandler
Sets the global theme- Specified by:
setGlobalTheme
in interfaceFuncTestRpcHandler
themeKey
- - the complete theme key- Throws:
Exception
-
setThemeForSpace
@Deprecated public boolean setThemeForSpace(String token, String spaceKey, String themeKey) throws Exception
Deprecated.since 5.6. Use FuncTestAdminThemeResource.Description copied from interface:FuncTestRpcHandler
Sets the theme for the specified space- Specified by:
setThemeForSpace
in interfaceFuncTestRpcHandler
spaceKey
- - the key of the space to changethemeKey
- - the complete theme key- Throws:
Exception
-
clearCustomHtml
public boolean clearCustomHtml(String token) throws Exception
Description copied from interface:FuncTestRpcHandler
Clears the global custom html.- Specified by:
clearCustomHtml
in interfaceFuncTestRpcHandler
- Returns:
- true always.
- Throws:
Exception
-
uninstallPlugin
@Deprecated public boolean uninstallPlugin(String token, String pluginKey) throws NotPermittedException
Deprecated.since 5.6. Use PluginsRpc in test client code.Description copied from interface:FuncTestRpcHandler
Uninstall a plugin. (There's an install method in the standard rpc plugin)- Specified by:
uninstallPlugin
in interfaceFuncTestRpcHandler
- Returns:
- true because a return type is required by XMLRPC
- Throws:
NotPermittedException
-
disablePlugin
@Deprecated public boolean disablePlugin(String token, String pluginKey) throws NotPermittedException
Deprecated.since 5.6. Use PluginsRpc in test client code.Description copied from interface:FuncTestRpcHandler
Disable a plugin.- Specified by:
disablePlugin
in interfaceFuncTestRpcHandler
- Returns:
- true because a return type is required by XMLRPC
- Throws:
NotPermittedException
-
disablePluginWithoutPersisting
@Deprecated public boolean disablePluginWithoutPersisting(String token, String pluginKey) throws NotPermittedException
Deprecated.since 5.6. Use PluginsRpc in test client code.Description copied from interface:FuncTestRpcHandler
Disable a plugin without persisting.- Specified by:
disablePluginWithoutPersisting
in interfaceFuncTestRpcHandler
- Returns:
- true because a return type is required by XMLRPC
- Throws:
NotPermittedException
-
enablePlugin
@Deprecated public boolean enablePlugin(String token, String pluginKey) throws NotPermittedException
Deprecated.since 5.6. Use PluginsRpc in test client code.Description copied from interface:FuncTestRpcHandler
Enable a plugin.- Specified by:
enablePlugin
in interfaceFuncTestRpcHandler
- Returns:
- true because a return type is required by XMLRPC
- Throws:
NotPermittedException
-
enablePluginModule
@Deprecated public boolean enablePluginModule(String token, String pluginKey, String moduleKey) throws NotPermittedException
Deprecated.since 5.6. Use PluginsRpc in test client code.Description copied from interface:FuncTestRpcHandler
Enable plugin module- Specified by:
enablePluginModule
in interfaceFuncTestRpcHandler
pluginKey
- the key of the pluginmoduleKey
- the key of the module- Returns:
- true because a return type is required by XMLRPC
- Throws:
NotPermittedException
-
disablePluginModule
@Deprecated public boolean disablePluginModule(String token, String pluginKey, String moduleKey) throws NotPermittedException
Deprecated.since 5.6. Use PluginsRpc in test client code.Description copied from interface:FuncTestRpcHandler
Disable plugin module- Specified by:
disablePluginModule
in interfaceFuncTestRpcHandler
pluginKey
- the key of the pluginmoduleKey
- the key of the module- Returns:
- true because a return type is required by XMLRPC
- Throws:
NotPermittedException
-
isPluginModuleEnabled
@Deprecated public boolean isPluginModuleEnabled(String token, String pluginKey, String moduleKey) throws NotPermittedException
Deprecated.since 5.6. Use PluginsRpc in test client code.Description copied from interface:FuncTestRpcHandler
Find out if a plugin module is enabled or not. If the plugin exists and is enabled and the module exists and is enabled, then this method should return true, otherwise it should return false.- Specified by:
isPluginModuleEnabled
in interfaceFuncTestRpcHandler
pluginKey
- the key of the pluginmoduleKey
- the key of the module excluding the plugin key- Returns:
- true if the plugin module exists and is enabled, false otherwise
- Throws:
NotPermittedException
-
isSpringComponentPresent
public boolean isSpringComponentPresent(String token, String name)
Description copied from interface:FuncTestRpcHandler
Returns true if a Spring component with the given name exists in the application context.- Specified by:
isSpringComponentPresent
in interfaceFuncTestRpcHandler
-
isPluginUpgradeTasksComplete
public boolean isPluginUpgradeTasksComplete(String token)
Description copied from interface:FuncTestRpcHandler
Returns true if the plugin dependent upgrade tasks- Specified by:
isPluginUpgradeTasksComplete
in interfaceFuncTestRpcHandler
-
registerEventListener
public boolean registerEventListener(String token, String eventClassName) throws Exception
Description copied from interface:FuncTestRpcHandler
Registers a temporary event listener on the server to listen for the specified event. It is recommended that clients also unregister the event listener usingFuncTestRpcHandler.unregisterEventListener(String, String)
in a finally clause to ensure the temporary listener is cleaned up.Once the listener is registered, clients can use
FuncTestRpcHandler.waitForEvent(String, String, String, String)
to block until the event is published.- Specified by:
registerEventListener
in interfaceFuncTestRpcHandler
- Throws:
Exception
-
unregisterEventListener
public boolean unregisterEventListener(String token, String eventClassName) throws Exception
Description copied from interface:FuncTestRpcHandler
Unregisters the temporary listener registered for the specified event.- Specified by:
unregisterEventListener
in interfaceFuncTestRpcHandler
- Throws:
Exception
-
clearEventListeners
public boolean clearEventListeners(String token) throws Exception
Description copied from interface:FuncTestRpcHandler
Removes all temporary event listeners, regardless of their state.- Specified by:
clearEventListeners
in interfaceFuncTestRpcHandler
- Returns:
- true because some result is required.
- Throws:
Exception
-
waitForEvent
public boolean waitForEvent(String token, String eventClassName, String timeoutStr, String timeUnitStr) throws Exception
Description copied from interface:FuncTestRpcHandler
Waits for an event to occur and returns when it has finished.- Specified by:
waitForEvent
in interfaceFuncTestRpcHandler
eventClassName
- the fully qualified classname of the event to wait for.timeoutStr
- number of milliseconds to wait for the event before giving up completely.timeUnitStr
- SeeTimeUnit.name
- Returns:
- true if the event occurs within the timeout.
- Throws:
Exception
-
waitForEventQueue
public boolean waitForEventQueue(String token, String timeoutStr, String timeUnitStr) throws Exception
Description copied from interface:FuncTestRpcHandler
Waits for all events in queue to be processed.- Specified by:
waitForEventQueue
in interfaceFuncTestRpcHandler
- Returns:
- true if queue was exhausted, false on timeout or any error.
- Throws:
Exception
-
shutdownScheduler
@Deprecated public boolean shutdownScheduler(String token) throws com.atlassian.scheduler.SchedulerServiceException
Deprecated.since 5.6. Use FuncTestAdminSchedulerResource.Description copied from interface:FuncTestRpcHandler
Shutdown the scheduler to ensure single threadedness for testing- Specified by:
shutdownScheduler
in interfaceFuncTestRpcHandler
- Throws:
com.atlassian.scheduler.SchedulerServiceException
-
removeBandanaKey
@Deprecated public boolean removeBandanaKey(String token, String space, String key)
Deprecated.since 5.6. Use FuncTestAdminBandanaResource.Description copied from interface:FuncTestRpcHandler
Remove a key from Bandana- Specified by:
removeBandanaKey
in interfaceFuncTestRpcHandler
-
setBandanaStringSet
@Deprecated public boolean setBandanaStringSet(String token, String space, String key, Vector<String> value)
Deprecated.since 5.6. Use FuncTestAdminBandanaResource.Description copied from interface:FuncTestRpcHandler
Sets a key in Bandana with a Set of Strings as value- Specified by:
setBandanaStringSet
in interfaceFuncTestRpcHandler
-
setBandanaStringList
@Deprecated public boolean setBandanaStringList(String token, String space, String key, Vector<String> value)
Deprecated.since 5.6. Use FuncTestAdminBandanaResource.Description copied from interface:FuncTestRpcHandler
Sets a key in Bandana with a List of Strings as value- Specified by:
setBandanaStringList
in interfaceFuncTestRpcHandler
-
setBandanaKey
@Deprecated public boolean setBandanaKey(String token, String space, String key, String value)
Deprecated.since 5.6. Use FuncTestAdminBandanaResource.Description copied from interface:FuncTestRpcHandler
Sets a key in Bandana- Specified by:
setBandanaKey
in interfaceFuncTestRpcHandler
-
setBandanaKeyBoolean
@Deprecated public boolean setBandanaKeyBoolean(String token, String space, String key, boolean value)
Deprecated.since 5.6. Use FuncTestAdminBandanaResource.Description copied from interface:FuncTestRpcHandler
Sets a key in Bandana- Specified by:
setBandanaKeyBoolean
in interfaceFuncTestRpcHandler
-
setBandanaKeyInteger
@Deprecated public boolean setBandanaKeyInteger(String token, String space, String key, int value)
Deprecated.since 5.6. Use FuncTestAdminBandanaResource.Description copied from interface:FuncTestRpcHandler
Sets a key in Bandana- Specified by:
setBandanaKeyInteger
in interfaceFuncTestRpcHandler
-
getBandanaValue
@Deprecated public Object getBandanaValue(String token, String space, String key)
Deprecated.since 5.6. Use FuncTestAdminBandanaResource.Description copied from interface:FuncTestRpcHandler
Gets a value from Bandana- Specified by:
getBandanaValue
in interfaceFuncTestRpcHandler
-
getContentPropertyKeys
public Vector getContentPropertyKeys(String token, String entityId)
Description copied from interface:FuncTestRpcHandler
Get the content property keys for a content entity given its id- Specified by:
getContentPropertyKeys
in interfaceFuncTestRpcHandler
-
getContentProperty
public String getContentProperty(String token, String entityId, String key)
Description copied from interface:FuncTestRpcHandler
Get the content property value for a content entity given its id and the property key- Specified by:
getContentProperty
in interfaceFuncTestRpcHandler
-
getContentTextProperty
public String getContentTextProperty(String token, String entityId, String key)
Description copied from interface:FuncTestRpcHandler
Get the content property text value (in OS_PROPERTYENTRY) for a content entity given its id and property key- Specified by:
getContentTextProperty
in interfaceFuncTestRpcHandler
entityId
- the ID of the content object this property is stored againstkey
- the entity key of the property being stored- Returns:
- The string value of the property (or an empty string if no property was found)
-
getContentStringProperty
public String getContentStringProperty(String token, String entityId, String key)
Description copied from interface:FuncTestRpcHandler
Get the content property string value (in OS_PROPERTYENTRY) for a content entity given its id and property key- Specified by:
getContentStringProperty
in interfaceFuncTestRpcHandler
entityId
- the ID of the content object this property is stored againstkey
- the entity key of the property being stored- Returns:
- The string value of the property (or an empty string if no property was found)
-
getContentPropertiesString
public String getContentPropertiesString(String token, String entityId, String key)
Description copied from interface:FuncTestRpcHandler
Get the string value of aContentProperty
associated with a content entity given its id and the property name- Specified by:
getContentPropertiesString
in interfaceFuncTestRpcHandler
-
getContentPropertiesStringForSpace
public String getContentPropertiesStringForSpace(String token, String spaceKey, String key)
Description copied from interface:FuncTestRpcHandler
Get the string value of aContentProperty
associated with theSpaceDescription
of the space- Specified by:
getContentPropertiesStringForSpace
in interfaceFuncTestRpcHandler
-
setContentTextProperty
public boolean setContentTextProperty(String token, String entityId, String key, String value)
Description copied from interface:FuncTestRpcHandler
Sets a text content property for a content entity given its id- Specified by:
setContentTextProperty
in interfaceFuncTestRpcHandler
-
setContentStringProperty
public boolean setContentStringProperty(String token, String entityId, String key, String value)
Description copied from interface:FuncTestRpcHandler
Set the content property string value (in OS_PROPERTYENTRY) for a content entity given its id, property key and value- Specified by:
setContentStringProperty
in interfaceFuncTestRpcHandler
entityId
- the ID of the content object this property is stored againstkey
- the entity key of the property being storedvalue
- the string value of the property to set
-
setContentPropertiesString
public boolean setContentPropertiesString(String token, String entityId, String key, String value)
Description copied from interface:FuncTestRpcHandler
Sets the string value of aContentProperty
associated with a content entity given its id and the property name- Specified by:
setContentPropertiesString
in interfaceFuncTestRpcHandler
-
setContentPropertiesStringForSpace
public boolean setContentPropertiesStringForSpace(String token, String spaceKey, String key, String value)
Description copied from interface:FuncTestRpcHandler
Sets the string value of aContentProperty
associated with theSpaceDescription
of the space- Specified by:
setContentPropertiesStringForSpace
in interfaceFuncTestRpcHandler
-
getPersonalInformationId
public String getPersonalInformationId(String token, String username)
Description copied from interface:FuncTestRpcHandler
Gets the personal information id for a given username- Specified by:
getPersonalInformationId
in interfaceFuncTestRpcHandler
-
removePersonalInformation
public boolean removePersonalInformation(String token, String username) throws NotPermittedException
Description copied from interface:FuncTestRpcHandler
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).- Specified by:
removePersonalInformation
in interfaceFuncTestRpcHandler
username
- user whose personalInformation will be removed- Returns:
- true because it has to return something
- Throws:
NotPermittedException
-
getLocaleForUser
public String getLocaleForUser(String token, String username)
Description copied from interface:FuncTestRpcHandler
Gets the locale preference for the user.- Specified by:
getLocaleForUser
in interfaceFuncTestRpcHandler
-
setLocaleForUser
public boolean setLocaleForUser(String token, String username, String locale) throws RemoteException
Description copied from interface:FuncTestRpcHandler
Sets the locale preference for the user to the given named locale.- Specified by:
setLocaleForUser
in interfaceFuncTestRpcHandler
- Throws:
RemoteException
-
setGlobalLanguage
public boolean setGlobalLanguage(String token, String language) throws RemoteException
Description copied from interface:FuncTestRpcHandler
Changes to the default site language- Specified by:
setGlobalLanguage
in interfaceFuncTestRpcHandler
- Throws:
RemoteException
-
setIndexingLanguage
public boolean setIndexingLanguage(String token, String language)
Description copied from interface:FuncTestRpcHandler
Changes the indexing language- Specified by:
setIndexingLanguage
in interfaceFuncTestRpcHandler
-
setKeyboardShortcutPref
public boolean setKeyboardShortcutPref(String token, String username, String enabled) throws RemoteException
Description copied from interface:FuncTestRpcHandler
Enables/Disables keyboard shortcuts for the given uesr- Specified by:
setKeyboardShortcutPref
in interfaceFuncTestRpcHandler
- Throws:
RemoteException
-
setWatchOwnContentPref
public boolean setWatchOwnContentPref(String token, String username, String enabled) throws RemoteException
Description copied from interface:FuncTestRpcHandler
Enables/Disables autowatching for the given uesr- Specified by:
setWatchOwnContentPref
in interfaceFuncTestRpcHandler
- Throws:
RemoteException
-
setWatchSpaces
public boolean setWatchSpaces(String token, String username, String contentTypeStr, Hashtable spaces) throws RemoteException
Description copied from interface:FuncTestRpcHandler
Enables/Disables watching spaces for the given user and content type.- Specified by:
setWatchSpaces
in interfaceFuncTestRpcHandler
- Throws:
RemoteException
-
setWatchSpace
public boolean setWatchSpace(String token, String username, String spaceKey, String contentTypeStr, String enabled) throws RemoteException
Description copied from interface:FuncTestRpcHandler
Enables/Disables watching a space for the given user and content type.- Specified by:
setWatchSpace
in interfaceFuncTestRpcHandler
- Throws:
RemoteException
-
setUserDetails
public boolean setUserDetails(String token, String username, String fullName, String email) throws NotPermittedException
Description copied from interface:FuncTestRpcHandler
Sets the fullname and email address of a user with a given username.- Specified by:
setUserDetails
in interfaceFuncTestRpcHandler
- Returns:
- true because XMLRPC methods have to return something
- Throws:
NotPermittedException
-
setUserDetailProperty
public boolean setUserDetailProperty(String token, String username, String propertyKey, String propertyValue)
Description copied from interface:FuncTestRpcHandler
Sets a single UserDetails property through the UserDetailsManager.- Specified by:
setUserDetailProperty
in interfaceFuncTestRpcHandler
- Returns:
- true because XMLRPC methods have to return something
-
putStringMappingInCache
@Deprecated public boolean putStringMappingInCache(String token, String cacheName, String key, String value) throws NotPermittedException
Deprecated.since 5.6. Use FuncTestAdminCacheResource.Description copied from interface:FuncTestRpcHandler
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.- Specified by:
putStringMappingInCache
in interfaceFuncTestRpcHandler
- Returns:
- true because void is not allowed.
- Throws:
NotPermittedException
-
getCacheStatistics
@Deprecated public Hashtable getCacheStatistics(String token, String cacheName) throws NotPermittedException
Deprecated.since 5.6. Use FuncTestAdminCacheResource.Description copied from interface:FuncTestRpcHandler
Returns the cache statistics for a particular named cache.- Specified by:
getCacheStatistics
in interfaceFuncTestRpcHandler
cacheName
- the key of the cache, rather than the "niceName"- Returns:
- A hashtable representing the cache statistics
- Throws:
NotPermittedException
-
getCacheStatisticsCapabilities
@Deprecated public Vector<String> getCacheStatisticsCapabilities(String token) throws NotPermittedException
Deprecated.since 5.6. Use FuncTestAdminCacheResource.Description copied from interface:FuncTestRpcHandler
Returns the capabiltiies exposed by the cache statics service.- Specified by:
getCacheStatisticsCapabilities
in interfaceFuncTestRpcHandler
- Throws:
NotPermittedException
-
getCacheMaximumNumberOfElements
@Deprecated public Integer getCacheMaximumNumberOfElements(String token, String cacheName) throws Exception
Deprecated.since 5.6. Use FuncTestAdminCacheResource.Description copied from interface:FuncTestRpcHandler
Returns the configured maximum number of elements in the given cache- Specified by:
getCacheMaximumNumberOfElements
in interfaceFuncTestRpcHandler
cacheName
- the key of the cache, rather than the "niceName"- Throws:
Exception
-
setCacheMaximumNumberOfElements
@Deprecated public boolean setCacheMaximumNumberOfElements(String token, String cacheName, int maxNumElements) throws Exception
Deprecated.since 5.6. Use FuncTestAdminCacheResource.Description copied from interface:FuncTestRpcHandler
(Re)configures the maximum number of elements in the given cache- Specified by:
setCacheMaximumNumberOfElements
in interfaceFuncTestRpcHandler
cacheName
- the key of the cache, rather than the "niceName"- Throws:
Exception
-
flushAllCaches
@Deprecated public boolean flushAllCaches(String token) throws NotPermittedException
Deprecated.since 5.6. Use FuncTestAdminCacheResource.Description copied from interface:FuncTestRpcHandler
Flushes all the caches.- Specified by:
flushAllCaches
in interfaceFuncTestRpcHandler
- Returns:
- true because void isn't allowed.
- Throws:
NotPermittedException
-
enableWebSudo
public boolean enableWebSudo(String token, boolean enabled) throws Exception
Description copied from interface:FuncTestRpcHandler
Sets the web sudo enabled status- Specified by:
enableWebSudo
in interfaceFuncTestRpcHandler
- Returns:
- true because void isn't allowed.
- Throws:
Exception
-
setWebSudoTimeout
public boolean setWebSudoTimeout(String token, int timeoutMinutes) throws Exception
Description copied from interface:FuncTestRpcHandler
Sets the web sudo timeout in minutes- Specified by:
setWebSudoTimeout
in interfaceFuncTestRpcHandler
- Returns:
- true because void isn't allowed.
- Throws:
Exception
-
enableElevatedSecurityCheck
public boolean enableElevatedSecurityCheck(String token, boolean enabled) throws Exception
- Specified by:
enableElevatedSecurityCheck
in interfaceFuncTestRpcHandler
- Throws:
Exception
-
enablePublicSignUp
public boolean enablePublicSignUp(String token, boolean enabled) throws Exception
Description copied from interface:FuncTestRpcHandler
Sets the public sign up enabled status- Specified by:
enablePublicSignUp
in interfaceFuncTestRpcHandler
- Returns:
- true because void isn't allowed.
- Throws:
Exception
-
startActivity
public boolean startActivity(String token, String key, String user) throws Exception
Description copied from interface:FuncTestRpcHandler
Call startActivity on the heartbeat manager bean- Specified by:
startActivity
in interfaceFuncTestRpcHandler
- Parameters:
token
- rpc authentication tokenkey
- the activity key to startuser
- the username of the user starting the activity- Returns:
- true if executes start activity without error.
- Throws:
Exception
-
stopActivity
public boolean stopActivity(String token, String key, String user) throws Exception
Description copied from interface:FuncTestRpcHandler
Call stopActivity on the heartbeatManager bean- Specified by:
stopActivity
in interfaceFuncTestRpcHandler
- Parameters:
token
- rpc authentication tokenkey
- the activity key to stopuser
- the username of the user stopping the activity- Throws:
Exception
-
getUsersForActivity
public Vector getUsersForActivity(String key) throws Exception
Description copied from interface:FuncTestRpcHandler
Call getUsersForActivity on the heartbeatManager bean- Specified by:
getUsersForActivity
in interfaceFuncTestRpcHandler
- Throws:
Exception
-
removeUserUncleanly
public boolean removeUserUncleanly(String token, String username) throws com.atlassian.user.EntityException
Description copied from interface:FuncTestRpcHandler
Remove a User without removing the things that refer to that user.- Specified by:
removeUserUncleanly
in interfaceFuncTestRpcHandler
- Throws:
com.atlassian.user.EntityException
-
removeGroupUncleanly
public boolean removeGroupUncleanly(String token, String groupname) throws com.atlassian.user.EntityException
Description copied from interface:FuncTestRpcHandler
Remove a Group without removing the things that refer to that group.- Specified by:
removeGroupUncleanly
in interfaceFuncTestRpcHandler
- Throws:
com.atlassian.user.EntityException
-
doesDraftExist
public boolean doesDraftExist(String token, String contentId, String owner, String draftType, String spaceKey)
Description copied from interface:FuncTestRpcHandler
Determines if a draft of the specified type and belonging to the specified owner exists.- Specified by:
doesDraftExist
in interfaceFuncTestRpcHandler
- Parameters:
token
- rpc authentication tokencontentId
- id of the content this draft is for ('0' for new content)owner
- owner/author of the draftdraftType
- type of content this draft is forspaceKey
- space key, to allow new drafts in multiple spaces- Returns:
- true if a draft of the specified type and belonging to the specified owner exists, else false
-
countDrafts
public int countDrafts(String token, String owner)
- Specified by:
countDrafts
in interfaceFuncTestRpcHandler
-
createDraft
public Hashtable createDraft(String token, Hashtable draftStruct)
Description copied from interface:FuncTestRpcHandler
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.- Specified by:
createDraft
in interfaceFuncTestRpcHandler
- Parameters:
token
- rpc authentication tokendraftStruct
- 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()
orPage.getType()
."title"
- title of the draft."content"
- content of the draft as aString
in Confluence XML storage format. 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
public Hashtable updateDraft(String token, Hashtable draftStruct)
Description copied from interface:FuncTestRpcHandler
Updates a draft located using the draft owner and draft type. Draft is then updated with the specified title and content- Specified by:
updateDraft
in interfaceFuncTestRpcHandler
- Parameters:
token
- rpc authentication tokendraftStruct
- 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
public boolean removeDrafts(String token, String username)
Description copied from interface:FuncTestRpcHandler
Removes all drafts owned by the specified User.- Specified by:
removeDrafts
in interfaceFuncTestRpcHandler
- Parameters:
token
- rpc authentication tokenusername
- user to remove drafts for- Returns:
- true if this is successful, false if no user with this name.
-
setDraftSaveInterval
public boolean setDraftSaveInterval(String token, int seconds)
Description copied from interface:FuncTestRpcHandler
Sets the given draft save interval.- Specified by:
setDraftSaveInterval
in interfaceFuncTestRpcHandler
- Parameters:
token
- rpc authentication tokenseconds
- number of seconds for which the draft save interval should be- Returns:
- true if this is successful, false if not set
-
clearQueue
public boolean clearQueue(String token, String queueName)
Description copied from interface:FuncTestRpcHandler
Removes all items from the specified queue- Specified by:
clearQueue
in interfaceFuncTestRpcHandler
- Returns:
- true if this is successful, false if no queue with this name exists
-
getQueueSize
public int getQueueSize(String token, String queueName)
Description copied from interface:FuncTestRpcHandler
Returns the size of the task queue with the specified name.- Specified by:
getQueueSize
in interfaceFuncTestRpcHandler
- Returns:
- the size of the task queue with the specified name.
- Throws:
IllegalArgumentException
- if no queue could be found with the specified queueName.
-
getNumberOfIndexTasksInQueue
public int getNumberOfIndexTasksInQueue(String token)
Description copied from interface:FuncTestRpcHandler
Returns the size of the index queue.- Specified by:
getNumberOfIndexTasksInQueue
in interfaceFuncTestRpcHandler
- Returns:
-
removeMailServer
public boolean removeMailServer(String token, String serverName) throws Exception
Description copied from interface:FuncTestRpcHandler
Remove the named mail server.- Specified by:
removeMailServer
in interfaceFuncTestRpcHandler
- Parameters:
token
- the rpc authentication tokenserverName
- 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:
Exception
-
addUserAnyCase
public boolean addUserAnyCase(String token, String username, String email, String fullname, String password) throws RemoteException
Description copied from interface:FuncTestRpcHandler
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.- Specified by:
addUserAnyCase
in interfaceFuncTestRpcHandler
- Throws:
NotPermittedException
- if you do not have permissions to add the user.RemoteException
-
addGroupAnyCase
public boolean addGroupAnyCase(String token, String groupname) throws RemoteException
Description copied from interface:FuncTestRpcHandler
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.- Specified by:
addGroupAnyCase
in interfaceFuncTestRpcHandler
groupname
- the name of the group to add- Returns:
- true if successfully added, otherwise false
- Throws:
RemoteException
-
changeSpaceCreatedDate
public boolean changeSpaceCreatedDate(String token, String spaceKey, Date createdDate) throws RemoteException
Description copied from interface:FuncTestRpcHandler
Change the created date of a space- Specified by:
changeSpaceCreatedDate
in interfaceFuncTestRpcHandler
spaceKey
- the space key of the space to change the created date- Throws:
RemoteException
-
changeCommentCreatedDate
public boolean changeCommentCreatedDate(String token, String commentId, Date createdDate) throws RemoteException
Description copied from interface:FuncTestRpcHandler
Change the created date of a comment- Specified by:
changeCommentCreatedDate
in interfaceFuncTestRpcHandler
- Throws:
RemoteException
-
changePageCreatedDate
public boolean changePageCreatedDate(String token, String pageId, Date createdDate) throws RemoteException
Description copied from interface:FuncTestRpcHandler
Change the created date of a page- Specified by:
changePageCreatedDate
in interfaceFuncTestRpcHandler
pageId
- the page id of the page to change the created date- Throws:
RemoteException
-
removeAttachmentUncleanly
public boolean removeAttachmentUncleanly(String token, String contentId, String attachmentFileName) throws RemoteException
Description copied from interface:FuncTestRpcHandler
Removes an attachment without cleaning up associated attachment info- Specified by:
removeAttachmentUncleanly
in interfaceFuncTestRpcHandler
- Parameters:
token
- the authenticationcontentId
- the content that the attachment is attached toattachmentFileName
- the attachment- Returns:
- true
- Throws:
RemoteException
-
changeAttachmentCreatedDate
public boolean changeAttachmentCreatedDate(String token, String contentId, String attachmentFileName, Date createdDate) throws RemoteException
Description copied from interface:FuncTestRpcHandler
Change the created date of an attachment- Specified by:
changeAttachmentCreatedDate
in interfaceFuncTestRpcHandler
contentId
- the id of the page or blogpost the attachment is attached toattachmentFileName
- the attachment file name of the attachment to change the created date- Throws:
RemoteException
-
changeBlogPostModificationDate
public boolean changeBlogPostModificationDate(String token, String blogId, Date modificationDate) throws RemoteException
Description copied from interface:FuncTestRpcHandler
Change the modification date of a blog post- Specified by:
changeBlogPostModificationDate
in interfaceFuncTestRpcHandler
blogId
- the id of the blog to modifymodificationDate
- the last modification date to be set.- Returns:
- true if successful, otherwise false.
- Throws:
RemoteException
-
changePageModificationDate
public boolean changePageModificationDate(String token, String pageId, Date modificationDate) throws RemoteException
Description copied from interface:FuncTestRpcHandler
Change the modification date of a page- Specified by:
changePageModificationDate
in interfaceFuncTestRpcHandler
pageId
- the page id of the page to change the modification datemodificationDate
- the last modification date to be set.- Throws:
RemoteException
-
getVersionForPage
public int getVersionForPage(String token, String pageId) throws RemoteException
Description copied from interface:FuncTestRpcHandler
Get the version number for the page with pageId- Specified by:
getVersionForPage
in interfaceFuncTestRpcHandler
- Throws:
RemoteException
-
getLeastRecentTestAppenderLogMessage
public String getLeastRecentTestAppenderLogMessage(String token, String className)
- Specified by:
getLeastRecentTestAppenderLogMessage
in interfaceFuncTestRpcHandler
-
registerTestAppenderForClass
public boolean registerTestAppenderForClass(String token, String className)
- Specified by:
registerTestAppenderForClass
in interfaceFuncTestRpcHandler
-
unregisterTestAppenderForClass
public boolean unregisterTestAppenderForClass(String token, String className)
- Specified by:
unregisterTestAppenderForClass
in interfaceFuncTestRpcHandler
-
logTestMessageForClass
public boolean logTestMessageForClass(String token, String className, String message, String level)
- Specified by:
logTestMessageForClass
in interfaceFuncTestRpcHandler
-
setUserFollows
public boolean setUserFollows(String token, String followingUsername, Hashtable followUsers) throws RemoteException
Description copied from interface:FuncTestRpcHandler
Change the follow or unfollow state between a follower user and s a set of folowees users- Specified by:
setUserFollows
in interfaceFuncTestRpcHandler
followingUsername
- The username of the user that is doing the followingfollowUsers
- A map of usernames to bbe followed/unfollowed, and a boolean indicating the desired follow status- Throws:
RemoteException
-
followUser
public boolean followUser(String token, String userName, boolean follow) throws RemoteException
Description copied from interface:FuncTestRpcHandler
Follows or stops following a user. Can be done by any user, not just admins.- Specified by:
followUser
in interfaceFuncTestRpcHandler
follow
- true to follow a user, false to stop following- Throws:
RemoteException
-
synchroniseUserDirectories
public boolean synchroniseUserDirectories(String token) throws Exception
Description copied from interface:FuncTestRpcHandler
Synchronizes all remote user directories with the local database cache- Specified by:
synchroniseUserDirectories
in interfaceFuncTestRpcHandler
- Returns:
- true
- Throws:
Exception
-
setDirectoryPasswordEncoder
public boolean setDirectoryPasswordEncoder(String token, String directoryName, String encoder) throws Exception
Description copied from interface:FuncTestRpcHandler
Changes the password encoder for the given directory- Specified by:
setDirectoryPasswordEncoder
in interfaceFuncTestRpcHandler
- Returns:
- true
- Throws:
Exception
-
removeUserDirectory
public boolean removeUserDirectory(String token, String directoryId) throws Exception
Description copied from interface:FuncTestRpcHandler
Removes user directory- Specified by:
removeUserDirectory
in interfaceFuncTestRpcHandler
directoryId
- the id of the directory- Returns:
- true if the directory existed and was removed
- Throws:
Exception
-
convertMarkupToXhtml
public String convertMarkupToXhtml(String token, String wikiMarkup, String pageId)
Description copied from interface:FuncTestRpcHandler
Render a page as XHTML.- Specified by:
convertMarkupToXhtml
in interfaceFuncTestRpcHandler
-
convertXhtmlToMarkup
public String convertXhtmlToMarkup(String token, String xhtml, String pageId)
Description copied from interface:FuncTestRpcHandler
Convert XHTML to WikiMarkup.- Specified by:
convertXhtmlToMarkup
in interfaceFuncTestRpcHandler
-
getLocalisedText
public String getLocalisedText(String token, String messageKey)
Description copied from interface:FuncTestRpcHandler
Get the localised string for given the message key in the logged-in user's locale.- Specified by:
getLocalisedText
in interfaceFuncTestRpcHandler
- Parameters:
token
- the rpc authentication tokenmessageKey
- 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.
-
setIndexManager
public void setIndexManager(IndexManager indexManager)
-
setJournalManager
public void setJournalManager(JournalManagerBackdoor journalManagerBackdoor)
-
setJournalDao
public void setJournalDao(JournalDao journalDao)
-
setJournalStateStore
public void setJournalStateStore(JournalStateStore journalStateStore)
-
setSpaceManager
public void setSpaceManager(SpaceManager spaceManager)
-
setPermissionManager
public void setPermissionManager(PermissionManager permissionManager)
-
setUserAccessor
public void setUserAccessor(UserAccessor userAccessor)
-
setConfluenceUserDao
public void setConfluenceUserDao(ConfluenceUserDao confluenceUserDao)
-
setAttachmentManager
public void setAttachmentManager(AttachmentManager attachmentManager)
-
setLogMessageRecordingAppender
public void setLogMessageRecordingAppender(LogMessageRecordingAppender logMessageRecordingAppender)
-
setClusterManager
public void setClusterManager(ClusterManager clusterManager)
-
setPageManager
public void setPageManager(PageManager pageManager)
-
setThemeManager
public void setThemeManager(ThemeManager themeManager)
-
setCaptchaManager
public void setCaptchaManager(CaptchaManager captchaManager)
-
setSchedulerService
public void setSchedulerService(com.atlassian.scheduler.core.LifecycleAwareSchedulerService schedulerService)
-
setBandanaManager
public void setBandanaManager(com.atlassian.bandana.BandanaManager bandanaManager)
-
setContentPropertyManager
public void setContentPropertyManager(ContentPropertyManager contentPropertyManager)
-
setContentEntityManager
public void setContentEntityManager(ContentEntityManager contentEntityManager)
-
setCustomContentManager
public void setCustomContentManager(CustomContentManager customContentManager)
-
setPersonalInformationManager
public void setPersonalInformationManager(PersonalInformationManager personalInformationManager)
-
setUserIndexingManager
public void setUserIndexingManager(UserIndexingManagerInternal userIndexingManager)
-
setCacheManager
public void setCacheManager(com.atlassian.cache.CacheManager cacheManager)
-
setCacheConfigManager
public void setCacheConfigManager(CacheConfigManager cacheConfigManager)
-
setConnectionProviderMonitor
public void setConnectionProviderMonitor(ExceptionMonitor connectionProviderMonitor)
-
setCacheStatisticsManager
public void setCacheStatisticsManager(CacheStatisticsManager cacheStatisticsManager)
-
setHeartbeatManager
public void setHeartbeatManager(HeartbeatManager heartbeatManager)
-
setSettingsManager
public void setSettingsManager(SettingsManager settingsManager)
-
setUserManager
public void setUserManager(com.atlassian.user.UserManager userManager)
-
setGroupManager
public void setGroupManager(com.atlassian.user.GroupManager groupManager)
-
setDraftManager
public void setDraftManager(DraftManager draftManager)
-
setTaskManager
public void setTaskManager(com.atlassian.core.task.MultiQueueTaskManager taskManager)
-
setMailServerManager
public void setMailServerManager(com.atlassian.mail.server.MailServerManager mailServerManager)
-
setEventManager
public void setEventManager(com.atlassian.event.EventManager eventManager)
-
setEventPublisher
public void setEventPublisher(com.atlassian.event.api.EventPublisher eventPublisher)
-
setEventQueueFettlerBean
public void setEventQueueFettlerBean(EventQueueFettler eventQueueFettler)
-
setCrowdDirectoryService
public void setCrowdDirectoryService(com.atlassian.crowd.embedded.api.CrowdDirectoryService crowdDirectoryService)
-
setFollowManager
public void setFollowManager(FollowManager followManager)
-
setNotificationManager
public void setNotificationManager(NotificationManager notificationManager)
-
setSpacePermissionManager
public void setSpacePermissionManager(SpacePermissionManager spacePermissionManager)
-
setSpacePermissionDefaultsStoreFactory
public void setSpacePermissionDefaultsStoreFactory(SpacePermissionDefaultsStoreFactory spacePermissionDefaultsStoreFactory)
-
setUserDetailsManager
public void setUserDetailsManager(UserDetailsManager userDetailsManager)
-
setTrustedApplicationsManager
public void setTrustedApplicationsManager(TrustedApplicationsManager trustedApplicationsManager)
-
setCommentManager
public void setCommentManager(CommentManager commentManager)
-
setConfluenceWysiwygConverter
public void setConfluenceWysiwygConverter(ConfluenceWysiwygConverter wysiwygConverter)
-
setContentPermissionManager
public void setContentPermissionManager(ContentPermissionManager contentPermissionManager)
-
setAnonymousUserPermissionsService
public void setAnonymousUserPermissionsService(AnonymousUserPermissionsService anonymousUserPermissionsService)
-
setUpgradeManager
public void setUpgradeManager(UpgradeManager upgradeManager)
-
setLabelManager
public void setLabelManager(LabelManager labelManager)
-
setRequestLogger
public void setRequestLogger(RequestLogger requestLogger)
-
setDbStatCollector
public void setDbStatCollector(DbStatCollector dbStatCollector)
-
setSessionFactory5
public void setSessionFactory5(org.hibernate.SessionFactory sessionFactory5)
-
saveDateFormat
public boolean saveDateFormat(String token, String dateFormat)
- Specified by:
saveDateFormat
in interfaceFuncTestRpcHandler
-
saveDateTimeFormat
public boolean saveDateTimeFormat(String token, String dateTimeFormat)
- Specified by:
saveDateTimeFormat
in interfaceFuncTestRpcHandler
-
getDateTimeFormat
public String getDateTimeFormat(String token)
Description copied from interface:FuncTestRpcHandler
Get current DateTime format- Specified by:
getDateTimeFormat
in interfaceFuncTestRpcHandler
-
addSmtpServer
public boolean addSmtpServer(String token, String name, String from, String subjectPrefix, String hostname, int port)
Description copied from interface:FuncTestRpcHandler
Add an SMTP mail server.- Specified by:
addSmtpServer
in interfaceFuncTestRpcHandler
-
addSmtpServer
public boolean addSmtpServer(String token, String name, String from, String subjectPrefix, String hostname, int port, String fromName)
- Specified by:
addSmtpServer
in interfaceFuncTestRpcHandler
-
setSmtpServer
public boolean setSmtpServer(String token, String name, String from, String subjectPrefix, String hostname, int port)
Description copied from interface:FuncTestRpcHandler
Remove all existing SMTP servers and add the given server.- Specified by:
setSmtpServer
in interfaceFuncTestRpcHandler
-
setSmtpServer
public boolean setSmtpServer(String token, String name, String from, String subjectPrefix, String hostname, int port, String fromName)
Description copied from interface:FuncTestRpcHandler
Remove all existing SMTP servers and add the given server.- Specified by:
setSmtpServer
in interfaceFuncTestRpcHandler
-
addMailServer
public boolean addMailServer(String token, String serverName, String protocol, String hostname, int port, String username, String password, String toAddress)
Description copied from interface:FuncTestRpcHandler
Add a POP server to poll for emails in a particular account. The account's associated email address must also be passed.- Specified by:
addMailServer
in interfaceFuncTestRpcHandler
-
removeAllJohnsonEvents
public boolean removeAllJohnsonEvents(String token)
Description copied from interface:FuncTestRpcHandler
Removes all Johnson events from Confluence- Specified by:
removeAllJohnsonEvents
in interfaceFuncTestRpcHandler
-
createJohnsonEvent
public boolean createJohnsonEvent(String token, String message)
Description copied from interface:FuncTestRpcHandler
Creates a Johnson event inside Confluence. This method is used to test theConfluenceJohnsonFilter
.- Specified by:
createJohnsonEvent
in interfaceFuncTestRpcHandler
message
- the description of the event to create
-
enableCaptcha
public boolean enableCaptcha(String token, boolean enable)
Description copied from interface:FuncTestRpcHandler
Sets the captcha mode- Specified by:
enableCaptcha
in interfaceFuncTestRpcHandler
-
enableCaptchaDebugMode
public boolean enableCaptchaDebugMode(String token, boolean enable)
Description copied from interface:FuncTestRpcHandler
Sets the captcha mode into debug mode. SeeCaptchaManager.setDebugMode(boolean)
.- Specified by:
enableCaptchaDebugMode
in interfaceFuncTestRpcHandler
-
getSystemProperty
public Hashtable<String,String> getSystemProperty(String token, String name)
Description copied from interface:FuncTestRpcHandler
Retrieve the value of a system property. The property is returned as a map of the property key to its value, as XML-RPC doesn't support nulls and it's reasonably important to be able to tell if the property is set.- Specified by:
getSystemProperty
in interfaceFuncTestRpcHandler
name
- the name of the property- Returns:
- a hash mapping the requested key to its value, if the property is set. Otherwise an empty map.
-
setSystemProperty
public Boolean setSystemProperty(String token, String name, String value)
Description copied from interface:FuncTestRpcHandler
Set a system property on the server to the supplied value.- Specified by:
setSystemProperty
in interfaceFuncTestRpcHandler
name
- the name of the propertyvalue
- the value of the property- Returns:
- always true since XML RPC can't handle void
-
clearSystemProperty
public Boolean clearSystemProperty(String token, String name)
Description copied from interface:FuncTestRpcHandler
Unset a system property.- Specified by:
clearSystemProperty
in interfaceFuncTestRpcHandler
name
- the name of the property- Returns:
- always true since XML RPC can't handle void
-
clearIndex
public boolean clearIndex(String token)
Description copied from interface:FuncTestRpcHandler
Blows away the main Confluence search index.- Specified by:
clearIndex
in interfaceFuncTestRpcHandler
-
restoreAbstractPage
public boolean restoreAbstractPage(String token, String abstractPageId)
Description copied from interface:FuncTestRpcHandler
Restores an abstract page from the trash.- Specified by:
restoreAbstractPage
in interfaceFuncTestRpcHandler
-
setContentSearchIndexAccessor
public void setContentSearchIndexAccessor(SearchIndexAccessor contentSearchIndexAccessor)
-
setChangeSearchIndexAccessor
public void setChangeSearchIndexAccessor(SearchIndexAccessor changeSearchIndexAccessor)
-
getIdOfPagePermission
public String getIdOfPagePermission(String token, String contentId, String permissionType, String username)
- Specified by:
getIdOfPagePermission
in interfaceFuncTestRpcHandler
- Returns:
- the id of the identified content permission or 0 if there is no match found.
-
createTestUsers
public int createTestUsers(String token, int count)
Description copied from interface:FuncTestRpcHandler
Create test users with usernames "testuser0", "testuser1", etc. Each user's password is the same as their username.- Specified by:
createTestUsers
in interfaceFuncTestRpcHandler
- Returns:
- the number of users created
-
removeTestUsers
public int removeTestUsers(String token, int count)
Description copied from interface:FuncTestRpcHandler
Removes test users with usernames "testuser0", "testuser1", etc. Logs a warning if a user cannot be removed.- Specified by:
removeTestUsers
in interfaceFuncTestRpcHandler
- Returns:
- the number of users removed
-
createUserMacro
public boolean createUserMacro(String token, String name, boolean hasBody, String bodyType, String outputType, String template, String title, String description, String category, String iconUrl, String documentationUrl, boolean hidden) throws NotPermittedException
Description copied from interface:FuncTestRpcHandler
Create a User Macro- Specified by:
createUserMacro
in interfaceFuncTestRpcHandler
bodyType
- how the body should be treated."raw"
,"escapehtml"
, or"rendered"
. May be null only ifhasBody
is false.outputType
- whether the macro is expected to return html or wiki markup."html"
or"wiki"
.template
- the velocity rendered by the macrotitle
- the title of the macro that appears in the Macro Browserdescription
- the description of the macro that appears in the Macro Browsercategory
- the category the macro should be listed under in the Macro BrowsericonUrl
- the URL of the macro icon that appears in the Macro BrowserdocumentationUrl
- the URL of the macro documentationhidden
- true if the Macro should not be searchable in the Macro Browser- Returns:
- true all the time because XMLRPC methods need a non-void return type.
- Throws:
NotPermittedException
-
removeUserMacro
public boolean removeUserMacro(String token, String name) throws NotPermittedException
Description copied from interface:FuncTestRpcHandler
Remove a User Macro with the given name if it exists.- Specified by:
removeUserMacro
in interfaceFuncTestRpcHandler
- Returns:
- true all the time because XMLRPC methods need a non-void return type.
- Throws:
NotPermittedException
-
setApplicationConfigProperty
public boolean setApplicationConfigProperty(String token, String propertyKey, String propertyValue)
Description copied from interface:FuncTestRpcHandler
Sets a property on the globalApplicationConfiguration
instance.- Specified by:
setApplicationConfigProperty
in interfaceFuncTestRpcHandler
- Returns:
- the previous value of the property
-
storeXhtmlPage
public Hashtable storeXhtmlPage(String token, Hashtable pageStruct) throws RemoteException
Description copied from interface:FuncTestRpcHandler
The Confluence remote API store page performs wiki to XHTML conversion on the page content. This version will store the supplied content exactly as it is. This is necessary for tests where the automatic conversion is not helpful, such as user macro testing.- Specified by:
storeXhtmlPage
in interfaceFuncTestRpcHandler
- Returns:
- the created page
- Throws:
RemoteException
-
getApplicationConfigProperty
public Object getApplicationConfigProperty(String token, String propertyKey)
Description copied from interface:FuncTestRpcHandler
Returns a property of the globalApplicationConfiguration
instance.- Specified by:
getApplicationConfigProperty
in interfaceFuncTestRpcHandler
- Returns:
- the property mapped to
propertyKey
-
setBooleanUserPreference
public boolean setBooleanUserPreference(String token, String userName, String preferenceKey, String value) throws RemoteException
Description copied from interface:FuncTestRpcHandler
Sets a boolean user preference.- Specified by:
setBooleanUserPreference
in interfaceFuncTestRpcHandler
userName
- the user name to set the preference forpreferenceKey
- the key of the preference to setvalue
- the string "true" or "false" to set as the preference- Throws:
RemoteException
-
setStringUserPreference
public boolean setStringUserPreference(String token, String userName, String preferenceKey, String value) throws RemoteException
Description copied from interface:FuncTestRpcHandler
Sets a string user preference.- Specified by:
setStringUserPreference
in interfaceFuncTestRpcHandler
userName
- the user name to set the preference forpreferenceKey
- the key of the preference to setvalue
- a string to set as the preference- Throws:
RemoteException
-
enableDailyReportNotification
public boolean enableDailyReportNotification(String token, String userName, boolean dailyReportEnabled)
Description copied from interface:FuncTestRpcHandler
Sets the Daily Report email for a user to enabled or disabled.- Specified by:
enableDailyReportNotification
in interfaceFuncTestRpcHandler
userName
- the user name to set the report state fordailyReportEnabled
- true if the daily report should be sent, false if not
-
setNetworkNotificationForUser
public boolean setNetworkNotificationForUser(String token, String userName, boolean watchNetwork)
Description copied from interface:FuncTestRpcHandler
Sets Network watch emails for a user to enabled or disabled.- Specified by:
setNetworkNotificationForUser
in interfaceFuncTestRpcHandler
userName
- the user name to set the watch state forwatchNetwork
- true if the user should watch their network, false if not
-
setSiteBlogNotificationForUser
public boolean setSiteBlogNotificationForUser(String token, String userName, boolean globalBlogWatchForUser)
Description copied from interface:FuncTestRpcHandler
Sets Site Blog watch emails for a user to enabled or disabled.- Specified by:
setSiteBlogNotificationForUser
in interfaceFuncTestRpcHandler
userName
- the user name to set the watch state forglobalBlogWatchForUser
- true if the user should watch all blogs on the site network, false if not
-
getIgnoreBaseURLWarning
public boolean getIgnoreBaseURLWarning(String token)
Description copied from interface:FuncTestRpcHandler
Whether the warning message for an un-advisable value for the Base URL is ignored or not.- Specified by:
getIgnoreBaseURLWarning
in interfaceFuncTestRpcHandler
- Returns:
- true if the warning message is ignored.
-
setIgnoreBaseURLWarning
public boolean setIgnoreBaseURLWarning(String token, boolean ignored) throws RemoteException
Description copied from interface:FuncTestRpcHandler
Affects whether the warning message for an un-advisable value for the Base URL is ignored or not. If ignored, any warning messages about the Base URL will not be displayed.- Specified by:
setIgnoreBaseURLWarning
in interfaceFuncTestRpcHandler
ignored
- set to true to ignore the warning.- Throws:
RemoteException
-
enableUserFeature
@Deprecated public boolean enableUserFeature(String token, String featureKey) throws RemoteException
Deprecated.since 5.6. Use the REST resource.Description copied from interface:FuncTestRpcHandler
Enables a given dark feature for the logged in user.- Specified by:
enableUserFeature
in interfaceFuncTestRpcHandler
featureKey
- - the key of the feature to enable- Throws:
RemoteException
-
disableUserFeature
@Deprecated public boolean disableUserFeature(String token, String featureKey) throws RemoteException
Deprecated.since 5.6. Use the REST resource.Description copied from interface:FuncTestRpcHandler
Disables a given dark feature for the logged in user.- Specified by:
disableUserFeature
in interfaceFuncTestRpcHandler
featureKey
- - the key of the feature to disable- Throws:
RemoteException
-
enableSiteFeature
@Deprecated public boolean enableSiteFeature(String token, String featureKey) throws RemoteException
Deprecated.since 5.6. Use the REST resource.Description copied from interface:FuncTestRpcHandler
Enables a given dark feature for the entire site.- Specified by:
enableSiteFeature
in interfaceFuncTestRpcHandler
featureKey
- - the key of the feature to enable- Throws:
RemoteException
-
disableSiteFeature
@Deprecated public boolean disableSiteFeature(String token, String featureKey) throws RemoteException
Deprecated.since 5.6. Use the REST resource.Description copied from interface:FuncTestRpcHandler
Disables a given dark feature for the entire site.- Specified by:
disableSiteFeature
in interfaceFuncTestRpcHandler
featureKey
- - the key of the feature to disable- Throws:
RemoteException
-
setWelcomeMessage
public boolean setWelcomeMessage(String token, String welcomeMessage)
- Specified by:
setWelcomeMessage
in interfaceFuncTestRpcHandler
-
resetWelcomeMessage
public boolean resetWelcomeMessage(String token)
- Specified by:
resetWelcomeMessage
in interfaceFuncTestRpcHandler
-
getExportBuildNumber
public String getExportBuildNumber(String token)
Description copied from interface:FuncTestRpcHandler
Returns the backward-compatibility of an export- Specified by:
getExportBuildNumber
in interfaceFuncTestRpcHandler
- Parameters:
token
- the authentication- Returns:
- the build number
-
getOldestSpaceImportAllowed
public String getOldestSpaceImportAllowed(String token)
Description copied from interface:FuncTestRpcHandler
Returns the backwards-compatibility of a space import- Specified by:
getOldestSpaceImportAllowed
in interfaceFuncTestRpcHandler
- Parameters:
token
- the authentication- Returns:
- the oldest build number allowed
-
getPluginExportCompatibility
public String getPluginExportCompatibility(String token, String pluginKey)
Description copied from interface:FuncTestRpcHandler
Returns the plugin compatibility matrix for exports- Specified by:
getPluginExportCompatibility
in interfaceFuncTestRpcHandler
- Parameters:
token
- the authenticationpluginKey
- the plugin key- Returns:
- a version range in the form "4.3..5.0", separated by 2 dots, or null
-
createPagesFromPrototype
public Vector<Hashtable> createPagesFromPrototype(String token, Hashtable pageStruct, int count) throws RemoteException
Description copied from interface:FuncTestRpcHandler
Creates a series of pages based on a prototype. Each page will have the same parent and content, and the title will be that of the template plus a space and an index.e.g. if the page title passed is "Hey Ho", the created pages will be "Hey Ho 1", "Hey Ho 2" and so on.
- Specified by:
createPagesFromPrototype
in interfaceFuncTestRpcHandler
pageStruct
- a template page to create multiple pages fromcount
- the number of pages to create - pages created are 1-indexed- Throws:
RemoteException
-
updateGlobalSettingBoolean
public boolean updateGlobalSettingBoolean(String token, String name, boolean value) throws RemoteException
Description copied from interface:FuncTestRpcHandler
Update aSettings
boolean field.- Specified by:
updateGlobalSettingBoolean
in interfaceFuncTestRpcHandler
name
- name of the field used to store the setting (see field names insideSettings
.- Returns:
- the old value
- Throws:
RemoteException
-
updateGlobalSettingString
public String updateGlobalSettingString(String token, String name, String value) throws RemoteException
Description copied from interface:FuncTestRpcHandler
Update aSettings
String field.- Specified by:
updateGlobalSettingString
in interfaceFuncTestRpcHandler
name
- name of the field used to store the setting (see field names insideSettings
.value
- theString
value the field should take- Returns:
- the old value
- Throws:
RemoteException
-
createSpaces
public Vector<String> createSpaces(String token, int count) throws RemoteException
Description copied from interface:FuncTestRpcHandler
Creates a bunch of spaces.- Specified by:
createSpaces
in interfaceFuncTestRpcHandler
count
- the number to create- Returns:
- the keys of the spaces created
- Throws:
RemoteException
- if you are not awesome enough to use this method
-
getNumberOfActiveUsers
public int getNumberOfActiveUsers(String token) throws RemoteException
Description copied from interface:FuncTestRpcHandler
Returns the number of active users, i.e. the number of users used for license purposes.- Specified by:
getNumberOfActiveUsers
in interfaceFuncTestRpcHandler
- Returns:
- the number of active users
- Throws:
RemoteException
-
isUnlimitedUserLicense
public boolean isUnlimitedUserLicense(String token) throws RemoteException
- Specified by:
isUnlimitedUserLicense
in interfaceFuncTestRpcHandler
- Returns:
- true if the current licence has no user limit, false otherwise
- Throws:
RemoteException
-
setPluginController
public void setPluginController(com.atlassian.plugin.PluginController pluginController)
-
setPluginAccessor
public void setPluginAccessor(com.atlassian.plugin.PluginAccessor pluginAccessor)
-
setUserMacroLibrary
public void setUserMacroLibrary(UserMacroLibrary userMacroLibrary)
-
setEventLatchManager
public void setEventLatchManager(EventLatchManager eventLatchManager)
-
setApplicationConfig
public void setApplicationConfig(com.atlassian.config.ApplicationConfiguration applicationConfiguration)
-
setDarkFeaturesManager
public void setDarkFeaturesManager(DarkFeaturesManager darkFeaturesManager)
-
addExistingProfilePicture
public boolean addExistingProfilePicture(String token, String userName, String fileName)
Description copied from interface:FuncTestRpcHandler
Attempts to add a existing profile picture to a user's profile.- Specified by:
addExistingProfilePicture
in interfaceFuncTestRpcHandler
userName
- the user name of the profilefileName
- file name of the picture- Returns:
- true if the picture is successfully added
-
setXhtmlRpcHandler
public void setXhtmlRpcHandler(ConfluenceXmlRpcHandler confluenceXmlRpcHandler)
-
setPageTemplateManager
public void setPageTemplateManager(PageTemplateManager pageTemplateManager)
-
setHibernateConfig
public void setHibernateConfig(com.atlassian.config.db.HibernateConfig hibernateConfig)
-
setEntityRemover
public void setEntityRemover(EntityRemover entityRemover)
-
setAnyTypeDao
public void setAnyTypeDao(EntityRemover entityRemover)
-
setUpgradeGate
public void setUpgradeGate(UpgradeGate upgradeGate)
-
setUserChecker
public void setUserChecker(UserChecker userChecker)
-
setWelcomeMessageService
public void setWelcomeMessageService(WelcomeMessageService welcomeMessageService)
-
setFormatConverter
public void setFormatConverter(FormatConverter formatConverter)
-
getAliveThreads
public Vector<Hashtable> getAliveThreads(String token) throws RemoteException
- Specified by:
getAliveThreads
in interfaceFuncTestRpcHandler
- Throws:
RemoteException
-
getStackDump
public String getStackDump(String token, String threadNameRegex) throws RemoteException
- Specified by:
getStackDump
in interfaceFuncTestRpcHandler
- Throws:
RemoteException
-
setEnableAnonymousRpc
public boolean setEnableAnonymousRpc(String token, String value) throws RemoteException
Description copied from interface:FuncTestRpcHandler
Toggle the setting to allow/deny anonymous RPC calls. You will also need to enable anonymous access at the permissions level using the Admin RPC interface.- Specified by:
setEnableAnonymousRpc
in interfaceFuncTestRpcHandler
- Throws:
RemoteException
-
getContentForAllLabels
public Hashtable<String,Object> getContentForAllLabels(String token, int offset, int maxResults, String labelsString)
Description copied from interface:FuncTestRpcHandler
Returns CEOs having all of the labels supplied in the string. Labels are space-separated.- Specified by:
getContentForAllLabels
in interfaceFuncTestRpcHandler
-
getContentInSpacesForAllLabels
public Hashtable<String,Object> getContentInSpacesForAllLabels(String token, int offset, int maxResults, String spaceKeysString, String labelsString)
Description copied from interface:FuncTestRpcHandler
Returns CEOs in the given spaces having all of the labels supplied in the string. Labels and space keys are space-separated.- Specified by:
getContentInSpacesForAllLabels
in interfaceFuncTestRpcHandler
-
getAllContentForAllLabels
public Hashtable<String,Object> getAllContentForAllLabels(String token, int offset, int maxResults, String labelsString)
Description copied from interface:FuncTestRpcHandler
Returns current and trashed CEOs having all of the labels supplied in the string. Labels are space-separated.- Specified by:
getAllContentForAllLabels
in interfaceFuncTestRpcHandler
-
getForLabels
public Hashtable<String,Object> getForLabels(String token, String labelableType, int offset, int maxResults, String labelsString)
Description copied from interface:FuncTestRpcHandler
Returns any kind of Labelable entities having all of the labels supplied in the string. Labels are space-separated.- Specified by:
getForLabels
in interfaceFuncTestRpcHandler
-
addLabelToLabelable
public int addLabelToLabelable(String token, String labelName, String labelableId, String labelableType)
Description copied from interface:FuncTestRpcHandler
Adds a label to a labelable, because the public RPC API doesn't let you do it. Feel free to turn it all into REST to make the pain go away.- Specified by:
addLabelToLabelable
in interfaceFuncTestRpcHandler
-
startLoggingRequests
public boolean startLoggingRequests(String token)
Description copied from interface:FuncTestRpcHandler
Start logging http request urls.Call
FuncTestRpcHandler.finishLoggingRequests(String)
to stop logging and to retrieve results.- Specified by:
startLoggingRequests
in interfaceFuncTestRpcHandler
- Returns:
- true
-
finishLoggingRequests
public Vector<String> finishLoggingRequests(String token)
Description copied from interface:FuncTestRpcHandler
Finish logging http request and return any requests made.Logging must have been previously started using
FuncTestRpcHandler.startLoggingRequests(String)
.- Specified by:
finishLoggingRequests
in interfaceFuncTestRpcHandler
- Returns:
- url of each request made
-
resetDatabaseStatistics
public boolean resetDatabaseStatistics(String token)
Description copied from interface:FuncTestRpcHandler
Reset database statistics.Call
FuncTestRpcHandler.getDatabaseStatistics(String)
to get results since the last reset.- Specified by:
resetDatabaseStatistics
in interfaceFuncTestRpcHandler
- Returns:
- true
-
getDatabaseStatistics
public String getDatabaseStatistics(String token)
Description copied from interface:FuncTestRpcHandler
Return database statistics.Statistics since the last call to
FuncTestRpcHandler.resetDatabaseStatistics(String)
are returned.- Specified by:
getDatabaseStatistics
in interfaceFuncTestRpcHandler
- Returns:
- stabase statistics
-
runGarbageCollection
public boolean runGarbageCollection(String token)
- Specified by:
runGarbageCollection
in interfaceFuncTestRpcHandler
-
isImportTaskRunning
public boolean isImportTaskRunning(String token)
- Specified by:
isImportTaskRunning
in interfaceFuncTestRpcHandler
-
getAnonyimizedClusterNodeIdentifier
public String getAnonyimizedClusterNodeIdentifier(String unusedToken)
- Specified by:
getAnonyimizedClusterNodeIdentifier
in interfaceFuncTestRpcHandler
-
moveBlogPost
public boolean moveBlogPost(String token, String blogPostId, String targetSpaceKey)
- Specified by:
moveBlogPost
in interfaceFuncTestRpcHandler
-
assertThatIndexQueueEntryHasBeenProcessed
public boolean assertThatIndexQueueEntryHasBeenProcessed(String unusedToken, String searchableClassname, String searchableId) throws RemoteException
- Specified by:
assertThatIndexQueueEntryHasBeenProcessed
in interfaceFuncTestRpcHandler
- Throws:
RemoteException
-
increaseHighValue
public boolean increaseHighValue(String token)
Description copied from interface:FuncTestRpcHandler
Put a number bigger than 65535 in Hibernate_unique_key table to force generated ids to be greater than max integer.- Specified by:
increaseHighValue
in interfaceFuncTestRpcHandler
- Parameters:
token
- the rpc authentication token- Returns:
- true if successful.
-
getRecordedErrorLogMessages
public Vector<String> getRecordedErrorLogMessages(String token)
- Specified by:
getRecordedErrorLogMessages
in interfaceFuncTestRpcHandler
-
clearRecordedLogMessages
public boolean clearRecordedLogMessages(String token)
- Specified by:
clearRecordedLogMessages
in interfaceFuncTestRpcHandler
-
setTransactionManager
public void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
-
setHibernateConnectionProviderLastExceptionTime
public boolean setHibernateConnectionProviderLastExceptionTime(String token, String timeStr)
- Specified by:
setHibernateConnectionProviderLastExceptionTime
in interfaceFuncTestRpcHandler
-
clearHibernateConnectionProviderLastExceptionTime
public boolean clearHibernateConnectionProviderLastExceptionTime(String token)
- Specified by:
clearHibernateConnectionProviderLastExceptionTime
in interfaceFuncTestRpcHandler
-
-