Interface Administration
- All Known Implementing Classes:
AdministrationImpl
public interface Administration
Provides methods for carrying out administration tasks in JIRA.
- Since:
- v3.13
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceRepresents the administration home link in the JIRA Header.static enumstatic interfaceSub interface that contains... -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.useSubtasks.enable()instead.voidaddGlobalPermission(int permission, String group) Deprecated.voidaddGlobalPermission(GlobalPermissionKey permission, String group) Add a group to a Global permission Ends up on the Global Permissions page.voidaddSubTaskType(String name) Gets an instance of the AdvancedApplicationProperties Page Object.backdoor()Allows you to perform backdoor actionsvoidCopies a file to the JIRA import directory, presumably with the intention of testing imports directly.Allows you to perform custom field actions.voidenable http access loggingexportDataToFile(String fileName) Exports the current running data to the specified absolute pathAllows you to modify field configurations.Allows you to modify field configuration schemes.Allows you to perform generalConfiguration actions.longReturns ths current build number.Obtains the current attachment path configured for JIRA.Returns the current edition name.Returns the JIRA home directory as reported in the System Info sectionGet the system tenant home directory.TGo to issue linking administration section.Allows you to modify issue security schemes.link()Retrieves the administration home link in the JIRA Header.Gets an instance of the Mail Server Administration page.'Notification Schemes' administration sectionDeprecated.plugins()Utility function to allow you some basic plugins controlproject()Allows you to perform project actions.Allows you to perform project imports.voidreIndex()Reindex JIRA, waiting for JIRA to complete the task, in the default index directory.voidremoveGlobalPermission(int permission, String group) Deprecated.voidremoveGlobalPermission(GlobalPermissionKey permission, String group) Remove a group from a given Global Permission.replaceTokensInFile(String originalXmlFileName, Map<String, String> replacements) Reads in an XML file and performs token replacements on it, writes the data to a temp file which is the return valuevoidRestores a JIRA to blank instance with Data Center License.voidRestores a JIRA to a well known blank instance.voidrestoreBlankInstanceWithLicense(License license) Restores a JIRA to a well known blank instance with the supplied licence.voidRestores a JIRA to blank instance with Server License.voidrestoreData(String fileName) Same asrestoreData(String, boolean), but with useDefaultPaths set to false.voidrestoreData(String fileName, boolean useDefaultPaths) Restores the specified fileName as JIRA data.voidrestoreData(String fileName, Administration.OutgoingMailSettings outgoingMailSetting) voidrestoreDataAndLogin(String fileName, String username) same asrestoreDataAndLogin(String, String, boolean)but with userDefaultPaths parameter set to false.voidrestoreDataAndLogin(String fileName, String username, boolean useDefaultPaths) Restore the specified file and login to JIRA using the passed username.voidrestoreDataSlowOldWay(String fileName) Same asrestoreDataSlowOldWay(String, boolean), except with useDefaultPaths set to false.voidrestoreDataSlowOldWay(String fileName, boolean useDefaultPaths) Restores the specified fileName as JIRA data NOT using the clear cache mechanism.voidrestoreDataSlowOldWay(String path, String fileName) Same asrestoreDataSlowOldWay(String, String, boolean), but with useDefaultPath set to false;voidrestoreDataSlowOldWay(String path, String fileName, boolean useDefaultPath) Restores the XML file from the specified directory NOT using the clear cache mechanism.voidrestoreDataSlowOldWayAndLogin(String fileName, String username) Same asrestoreDataSlowOldWayAndLogin(String, String, boolean)but with useDefaultPath set to false.voidrestoreDataSlowOldWayAndLogin(String fileName, String username, boolean useDefaultPath) Restore the specified file data NOT using the clear cache mechanism and login to JIRA using the passed username.voidrestoreDataWithBuildNumber(String fileName, int expectedBuilderNumber) Basically check the passed backup to ensure that it matches the passed build number and then restore the data.voidrestoreDataWithLicense(String fileName, String licenseKey) same asrestoreDataWithLicense(String, String, boolean), except with useDefaultPaths set to false.voidrestoreDataWithLicense(String fileName, String licenseKey, boolean useDefaultPaths) Restores the specified fileName as JIRA data, using the specified License key on import.voidrestoreDataWithPluginsReload(String fileName) Same asrestoreDataWithPluginsReload(String, boolean), except with useDefaultPaths set to false.voidrestoreDataWithPluginsReload(String fileName, boolean useDefaultPaths) Restores the specified fileName as JIRA data NOT using the clear cache mechanism.voidrestoreDataWithReplacedTokens(String originalXmlFileName, Map<String, String> replacements) Same asrestoreDataWithReplacedTokens(String, java.util.Map, boolean), except with useDefaultPaths set to false.voidrestoreDataWithReplacedTokens(String originalXmlFileName, Map<String, String> replacements, boolean useDefaultPaths) Reads in an XML file and performs token replacements on it, writes the data to a temp file, then imports that into JIRA.voidrestoreI18nData(String fileName) Restores the specified fileName as JIRA data.voidRestores a backup file with JIRA in an not setup state.voidrestoreNotSetupInstance(String licenseKey) Restores a backup file with JIRA in an not setup state.voidrestoreNotSetupRenaissanceInstance(String licenseKey) Deprecated.since 7.0.1.roles()Allows you to perform role actionsGets an instance of the Send Bulk Mail Page.services()Returns the ViewServices object which allows you to run operations on the ViewServices page.voidsetProfiling(boolean on) Set JIRA's profiling on or off.Gets an instance of the Shared Filters Administration page.statuses()Gets the instance of the Statuses pagesubtasks()voidswitchToLicense(License license) Changes JIRA's lincense to a given license objectvoidswitchToLicense(String license, String description) Changes JIRA's lincense to a given license and asserts that the description then appears on the view licensevoidSwitches the license to a personal license.voidSwitches the license to a starter license.tabs()Gets an instance of the AdminTabs Page Object.Get time tracking administration section util.Allows you to perform user and group actions.Field screens config.voidWaits for the data import progress to complete.Manage the 'Workflows' administration page
-
Field Details
-
ENTERPRISE
- See Also:
-
PROFESSIONAL
Deprecated.since 7.0.1Legacy edition/license type. Has not been used since JIRA 4. No replacement.- See Also:
-
STANDARD
Deprecated.since 7.0.1Legacy edition/license type. Has not been used since JIRA 4. No replacement.- See Also:
-
-
Method Details
-
reIndex
void reIndex()Reindex JIRA, waiting for JIRA to complete the task, in the default index directory. -
setProfiling
void setProfiling(boolean on) Set JIRA's profiling on or off.- Parameters:
on- or off
-
restoreI18nData
Restores the specified fileName as JIRA data. Does not make english assertions.- Parameters:
fileName- the fiel conatining the JIRA data
-
restoreDataWithBuildNumber
Basically check the passed backup to ensure that it matches the passed build number and then restore the data. An exception will be thrown if the backup does not match the passed build number.- Parameters:
fileName- the path of the backup.expectedBuilderNumber- the build number the data should have.
-
restoreData
Same asrestoreData(String, boolean), but with useDefaultPaths set to false. -
restoreData
Restores the specified fileName as JIRA data.- Parameters:
fileName- the XML file inside the standard backup file directory containing the JIRA datauseDefaultPaths- if set to true, the xml backup's paths (e.g., index, attachment etc) will be ignored, and the default for those used in stead
-
restoreDataAndLogin
same asrestoreDataAndLogin(String, String, boolean)but with userDefaultPaths parameter set to false. -
restoreDataAndLogin
Restore the specified file and login to JIRA using the passed username.- Parameters:
fileName- the name of the xml file to restore.username- the username used to login to JIRA after the restore. The username and the password are assumed to be the same.useDefaultPaths- if set to true, the xml backup's paths (e.g., index, attachment etc) will be ignored, and the default for those used in stead
-
restoreDataSlowOldWayAndLogin
Same asrestoreDataSlowOldWayAndLogin(String, String, boolean)but with useDefaultPath set to false. -
restoreDataSlowOldWayAndLogin
Restore the specified file data NOT using the clear cache mechanism and login to JIRA using the passed username. This is much slower than using the default methods and should only be used if there is a real reason for it. If you find yourself using this method perhaps we should be fixing the cache clearing stuff instead.- Parameters:
fileName- the name of the xml file to restore.username- the username used to login to JIRA after the restore. The username and the password are assumed to be the same.useDefaultPath- if set to true, the paths in the xml backup (e.g., index, and attachment) will be ignored, and their default paths used instead.
-
restoreDataSlowOldWay
Same asrestoreDataSlowOldWay(String, boolean), except with useDefaultPaths set to false. -
restoreDataSlowOldWay
Restores the specified fileName as JIRA data NOT using the clear cache mechanism. This is much slower than using the default methods and should only be used if there is a real reason for it. If you find yourself using this method perhaps we should be fixing the cache clearing stuff instead.- Parameters:
fileName- the XML file inside the standard backup file directory containing the JIRA datauseDefaultPaths- if set to true, the paths in the xml backup (e.g., index, and attachment) will be ignored, and their default paths used instead.
-
restoreDataWithPluginsReload
Same asrestoreDataWithPluginsReload(String, boolean), except with useDefaultPaths set to false. -
restoreDataWithPluginsReload
Restores the specified fileName as JIRA data NOT using the clear cache mechanism. The plugins system is restarted.
This restore uses the full Pico refresh the same as in Production. ie it does not do a "Quick Import".
This is much slower than using the default methods and should only be used if there is a real reason for it.
- Parameters:
fileName- the XML file inside the standard backup file directory containing the JIRA datauseDefaultPaths- if set to true, the paths in the xml backup (e.g., index, and attachment) will be ignored, and their default paths used instead.
-
restoreDataSlowOldWay
Same asrestoreDataSlowOldWay(String, String, boolean), but with useDefaultPath set to false; -
restoreDataSlowOldWay
Restores the XML file from the specified directory NOT using the clear cache mechanism. This is much slower than using the default methods and should only be used if there is a real reason for it. If you find yourself using this method perhaps we should be fixing the cache clearing stuff instead.- Parameters:
path- the directory in which the XML file is locatedfileName- the name of the XML fileuseDefaultPath- if set to true, the paths (e.g., attachment, index) in the xml backup will be ignored, and the default used instead
-
restoreDataWithReplacedTokens
void restoreDataWithReplacedTokens(String originalXmlFileName, Map<String, String> replacements) throws IOExceptionSame asrestoreDataWithReplacedTokens(String, java.util.Map, boolean), except with useDefaultPaths set to false.- Throws:
IOException
-
restoreDataWithReplacedTokens
void restoreDataWithReplacedTokens(String originalXmlFileName, Map<String, String> replacements, boolean useDefaultPaths) throws IOExceptionReads in an XML file and performs token replacements on it, writes the data to a temp file, then imports that into JIRA. Note: this only works when the FuncTest client is running on the same host as the JIRA server. For methods to create date strings to use as your tokens, check out theDateUtilclass- Parameters:
originalXmlFileName- the name of the XML file to read in; must be located in the standard XML file directoryreplacements- a map of token replacementsuseDefaultPaths- if set to true, the paths (e.g., attachment, index) in the xml backup will be ignored, and the default used instead. If the token being replaced is part of the default paths, it is still replaced prior to restore.- Throws:
IOException- if there is a problem reading/writing the files
-
replaceTokensInFile
File replaceTokensInFile(String originalXmlFileName, Map<String, String> replacements) throws IOExceptionReads in an XML file and performs token replacements on it, writes the data to a temp file which is the return value- Parameters:
originalXmlFileName- the name of the XML file to read in; must be located in the standard XML file directoryreplacements- a map of token replacements- Returns:
- a new temporary file that has its tokens replaced
- Throws:
IOException- if there is a problem reading/writing the files
-
restoreDataWithLicense
same asrestoreDataWithLicense(String, String, boolean), except with useDefaultPaths set to false. -
restoreDataWithLicense
Restores the specified fileName as JIRA data, using the specified License key on import.- Parameters:
fileName- the file conatining the JIRA datalicenseKey- the license key to be installeduseDefaultPaths- if set to true, the paths (e.g., attachment, index) in the xml backup will be ignored, and the default used instead
-
exportDataToFile
Exports the current running data to the specified absolute path- Parameters:
fileName- to backup to. This should just be a filename because JIRA always appends ${JIRA.HOME}/export to it before doing the export. Passing a directory may make it fail on windows.- Returns:
- export file. it will be absolute.
-
restoreBlankInstance
void restoreBlankInstance()Restores a JIRA to a well known blank instance. Use this when when your test doesn't rely on specific license. So it may be run successfully with DC or Server license. -
restoreBlankServerInstance
void restoreBlankServerInstance()Restores a JIRA to blank instance with Server License. Use this when your test relies on Server license. -
restoreBlankDataCenterInstance
void restoreBlankDataCenterInstance()Restores a JIRA to blank instance with Data Center License. Use this when your test relies on DC license. -
restoreBlankInstanceWithLicense
Restores a JIRA to a well known blank instance with the supplied licence.- Parameters:
license- the license to be installed
-
restoreNotSetupInstance
void restoreNotSetupInstance()Restores a backup file with JIRA in an not setup state. If you use this method, you will have to then set up JIRA from scratch! -
restoreNotSetupInstance
Restores a backup file with JIRA in an not setup state. If you use this method, you will have to then set up JIRA from scratch!- Parameters:
licenseKey- the license key to be used for restore
-
restoreNotSetupRenaissanceInstance
Deprecated.since 7.0.1. useinsteadinvalid reference
Administration#restoreNotSetupInstance(License)Restores a backup file with JIRA in an not setup state with roles enabled. If you use this method, you will have to then set up JIRA from scratch!- Parameters:
licenseKey- the license key to be used for restore
-
getCurrentAttachmentPath
String getCurrentAttachmentPath()Obtains the current attachment path configured for JIRA. This method does not check whether Attachments are enabled or not. If JIRA is configured to use the "default" attachment path, then this method still returns the ACTUAL path that is used. The implementation navigates to the Admin Attachments Settings page and screenscrapes, so don't expect to remain on the same page as when you called the method.- Returns:
- the current attachment path configured for JIRA.
-
activateSubTasks
Deprecated.useSubtasks.enable()instead. -
addSubTaskType
-
removeGlobalPermission
Deprecated.UseremoveGlobalPermission(com.atlassian.jira.permission.GlobalPermissionKey, String)instead. Since v6.2.5.Remove a group from a given Global Permission. Ends up on the Global Permissions page.- Parameters:
permission- The permission to remove teh group fromgroup- the group to remove
-
removeGlobalPermission
Remove a group from a given Global Permission. Ends up on the Global Permissions page.- Parameters:
permission- The permission to remove the group fromgroup- the group to remove
-
addGlobalPermission
Deprecated.UseaddGlobalPermission(com.atlassian.jira.permission.GlobalPermissionKey, String)instead. Since v6.2.5.Add a group to a Global permission Ends up on the Global Permissions page.- Parameters:
permission- the permission to add the group togroup- The group to add
-
addGlobalPermission
Add a group to a Global permission Ends up on the Global Permissions page.- Parameters:
permission- the permission to add the group togroup- The group to add
-
switchToLicense
Changes JIRA's lincense to a given license object- Parameters:
license- license to switch to
-
switchToLicense
Changes JIRA's lincense to a given license and asserts that the description then appears on the view license- Parameters:
license- license to switch todescription- license description
-
switchToPersonalLicense
void switchToPersonalLicense()Switches the license to a personal license. -
switchToStarterLicense
void switchToStarterLicense()Switches the license to a starter license. -
getJiraHomeDirectory
String getJiraHomeDirectory()Returns the JIRA home directory as reported in the System Info section- Returns:
- the JIRA home directory as reported in the System Info section
-
copyFileToJiraImportDirectory
Copies a file to the JIRA import directory, presumably with the intention of testing imports directly.- Parameters:
file- the file to copy to JIRA_HOME/import
-
getEdition
String getEdition()Returns the current edition name. This may be useful for licensing checks- Returns:
- the current edition name
- See Also:
-
getBuildNumber
long getBuildNumber()Returns ths current build number. ARuntimeExceptionwill be thrown if we can't find the build number.- Returns:
- JIRA's build number.
-
generalConfiguration
GeneralConfiguration generalConfiguration()Allows you to perform generalConfiguration actions.- Returns:
- generalConfiguration
-
backdoor
Backdoor backdoor()Allows you to perform backdoor actions- Returns:
- backdoor
-
project
Project project()Allows you to perform project actions.- Returns:
- project
-
usersAndGroups
UsersAndGroups usersAndGroups()Allows you to perform user and group actions.- Returns:
- usersAndGroups
-
roles
Roles roles()Allows you to perform role actions- Returns:
- roles
-
customFields
CustomFields customFields()Allows you to perform custom field actions.- Returns:
- customFields
-
permissionSchemes
PermissionSchemes permissionSchemes()Deprecated.Allows you to modify permission schemes.- Returns:
- permissionSchemes
-
issueSecuritySchemes
IssueSecuritySchemes issueSecuritySchemes()Allows you to modify issue security schemes.- Returns:
- issue security schemes of this administration
-
fieldConfigurations
FieldConfigurations fieldConfigurations()Allows you to modify field configurations.- Returns:
- fieldConfigurations
-
fieldConfigurationSchemes
FieldConfigurationSchemes fieldConfigurationSchemes()Allows you to modify field configuration schemes.- Returns:
- fieldConfigurationSchemes
-
projectImport
ProjectImport projectImport()Allows you to perform project imports.- Returns:
- projectImport
-
plugins
Plugins plugins()Utility function to allow you some basic plugins control- Returns:
- plugins
-
enableAccessLogging
void enableAccessLogging()enable http access logging -
attachments
Attachments attachments()- Returns:
- attachments
-
utilities
Administration.Utilities utilities()- Returns:
- utilities
-
subtasks
Subtasks subtasks()- Returns:
- grouping to manage administration of subtasks
-
issueLinking
IssueLinking issueLinking()TGo to issue linking administration section.- Returns:
- grouping to manage issue linking
-
timeTracking
TimeTracking timeTracking()Get time tracking administration section util.- Returns:
- time tracking configuration
-
resolutions
Resolutions resolutions()- Returns:
- resolution configuration
-
services
ViewServices services()Returns the ViewServices object which allows you to run operations on the ViewServices page.- Returns:
- the ViewServices object which allows you to run operations on the ViewServices page.
-
viewFieldScreens
ViewFieldScreens viewFieldScreens()Field screens config.- Returns:
- field screens config
-
workflows
ViewWorkflows workflows()Manage the 'Workflows' administration page- Returns:
ViewWorkflowsinstance
-
notificationSchemes
NotificationSchemes notificationSchemes()'Notification Schemes' administration section- Returns:
NotificationSchemesinstance
-
getSystemTenantHomeDirectory
String getSystemTenantHomeDirectory()Get the system tenant home directory. This does the same thing as getJiraHomeDirectory, except it doesn't cache it in a thread local. It assumes that the environment data for this administration object is for the system tenant. It should only be called when a tenant is provisioned, which should only be done on the first test to that tenant.- Returns:
- The system tenant home directory.
-
mailServers
MailServerAdministration mailServers()Gets an instance of the Mail Server Administration page.- Returns:
- an instance of the Mail Server Administration page.
-
sendBulkMail
SendBulkMail sendBulkMail()Gets an instance of the Send Bulk Mail Page.- Returns:
- an instance of the Send Bulk Mail Page.
-
tabs
AdminTabs tabs()Gets an instance of the AdminTabs Page Object.- Returns:
- an instance of the AdminTabs Page Object.
-
advancedApplicationProperties
AdvancedApplicationProperties advancedApplicationProperties()Gets an instance of the AdvancedApplicationProperties Page Object.- Returns:
- an instance of the AdvancedApplicationProperties Page Object.
-
statuses
Statuses statuses()Gets the instance of the Statuses page -
waitForRestore
void waitForRestore()Waits for the data import progress to complete. -
restoreData
-
link
Administration.Link link()Retrieves the administration home link in the JIRA Header.- Returns:
- the administration home link in the JIRA Header.
-