Class ApplicationConfigurationHelper

java.lang.Object
com.atlassian.jira.application.ApplicationConfigurationHelper

@ParametersAreNonnullByDefault public class ApplicationConfigurationHelper extends Object
Used to configure JIRA Applications (for example JIRA Software, JIRA Core, JIRA Service Desk) with default configurations such as default groups, default global permissions, admin access to applications and configuration of instance's default application; used during user creation.
Since:
v7.0
  • Constructor Details

  • Method Details

    • validateApplicationForConfiguration

      public Optional<String> validateApplicationForConfiguration(com.atlassian.application.api.ApplicationKey applicationKey, @Nullable ApplicationUser user)
      Validate whether the specified application can be configured. This will also determine whether default group can be created by the provided user (or anonymously if no user has been provided).
      Parameters:
      applicationKey - key identifying application.
      user - user performing configuration or null if this is not being performed by a user.
      Returns:
      an Optional with an warning message if validation did not pass or Optional.empty() if there are no warning.
    • configureApplicationsForSetup

      public void configureApplicationsForSetup(Collection<com.atlassian.crowd.embedded.api.Group> additionalGroups, boolean publishEvent)
      Performs initial configuration for applications during JIRA Setup.
      • Create the default group(s) for all the application role(s).
      • Add the additionalGroups to all the application role(s).
      • Grant all admin groups the default application global permissions
      Parameters:
      additionalGroups - Groups that will be added to all the licensed applications. They won't be added as defaults.
      publishEvent - If true then ApplicationConfigurationEvent will be published if there were any changes made by this method. This is especially handy during initial setup, where sending events might cause unwanted actions (like User Management sync)
    • configureApplicationsForImport

      public void configureApplicationsForImport(LicenseDetails licenseDetailsForImport)
      Performs initial configuration for applications during JIRA Import. This action is performed anonymously as the user performing the import might no longer exist after import.
    • setupAdminForDefaultApplications

      public void setupAdminForDefaultApplications(ApplicationUser user)
      Configure the passed admin for all the default applications by adding the admin to all the applications default groups. This method is only useful if the applications in JIRA are configured with default groups.
      Parameters:
      user - the user to configure.
    • configureLicense

      public void configureLicense(LicenseChangedEvent event)