com.atlassian.confluence.user.migration
Class CrowdRepositoryConfigurationMigrator

java.lang.Object
  extended by com.atlassian.confluence.user.migration.CrowdRepositoryConfigurationMigrator
All Implemented Interfaces:
RepositoryConfigurationMigrator

public class CrowdRepositoryConfigurationMigrator
extends Object
implements RepositoryConfigurationMigrator


Field Summary
static String CROWD_DIRECTORY_DESC_I18N_KEY
           
 
Constructor Summary
CrowdRepositoryConfigurationMigrator(com.atlassian.crowd.embedded.api.CrowdDirectoryService crowdDirectoryService, I18NBeanFactory i18NBeanFactory)
          Standard constructor
 
Method Summary
 boolean matches(com.atlassian.user.configuration.RepositoryConfiguration repositoryConfiguration)
          Return true if this migrator is able to migrate the configuration supplied by the passed in configuration.
 void migrate(com.atlassian.user.configuration.RepositoryConfiguration repositoryConfiguration)
          Migrate the passed in configuration.
 List<String> validate(com.atlassian.user.configuration.RepositoryConfiguration repositoryConfiguration)
          Validates that the passed in configuration can be migrated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CROWD_DIRECTORY_DESC_I18N_KEY

public static final String CROWD_DIRECTORY_DESC_I18N_KEY
See Also:
Constant Field Values
Constructor Detail

CrowdRepositoryConfigurationMigrator

public CrowdRepositoryConfigurationMigrator(com.atlassian.crowd.embedded.api.CrowdDirectoryService crowdDirectoryService,
                                            I18NBeanFactory i18NBeanFactory)
Standard constructor

Parameters:
crowdDirectoryService - the service to add new crowd directories to
Method Detail

validate

public List<String> validate(com.atlassian.user.configuration.RepositoryConfiguration repositoryConfiguration)
                      throws AtlassianUserMigrationException
Description copied from interface: RepositoryConfigurationMigrator
Validates that the passed in configuration can be migrated.

Specified by:
validate in interface RepositoryConfigurationMigrator
Parameters:
repositoryConfiguration - the configuration to validate
Returns:
A list of all the validation errors detected in the given repository configuration
Throws:
AtlassianUserMigrationException - if the repository configuration is unable to be upgraded due to being incomplete or malformed

migrate

public void migrate(com.atlassian.user.configuration.RepositoryConfiguration repositoryConfiguration)
             throws AtlassianUserMigrationException
Description copied from interface: RepositoryConfigurationMigrator
Migrate the passed in configuration. In most cases this will result in a new directory being created by calling CrowdDirectoryService.addDirectory(com.atlassian.crowd.embedded.api.Directory).

Specified by:
migrate in interface RepositoryConfigurationMigrator
Parameters:
repositoryConfiguration - the configuration to migrate
Throws:
AtlassianUserMigrationException - if the repository configuration is unable to be upgraded due to being incomplete or malformed

matches

public boolean matches(com.atlassian.user.configuration.RepositoryConfiguration repositoryConfiguration)
Description copied from interface: RepositoryConfigurationMigrator
Return true if this migrator is able to migrate the configuration supplied by the passed in configuration.

Specified by:
matches in interface RepositoryConfigurationMigrator
Parameters:
repositoryConfiguration - the configuration to migrate
Returns:
true if this migrator can migrate the configuration


Copyright © 2003-2012 Atlassian. All Rights Reserved.