Class ConditionalImporter

java.lang.Object
com.atlassian.crowd.importer.importers.ConditionalImporter
All Implemented Interfaces:
Importer
Direct Known Subclasses:
BambooImporter, ConfluenceImporter, JiraImporter

public abstract class ConditionalImporter extends Object
Responsible for identifying the appropriate Importer based on whether the source product is integrated with Embedded Crowd
Since:
4.4.3/5.0.2
  • Field Details

    • jdbcTemplate

      protected org.springframework.jdbc.core.JdbcOperations jdbcTemplate
    • directoryManager

      protected DirectoryManager directoryManager
  • Constructor Details

    • ConditionalImporter

      public ConditionalImporter(DirectoryManager directoryManager)
  • Method Details

    • getCrowdifiedImporter

      protected abstract Importer getCrowdifiedImporter()
    • getFallbackImporter

      protected abstract Importer getFallbackImporter()
    • init

      public void init(Configuration configuration)
      Description copied from interface: Importer
      Initialise anything required for the import process.
      Specified by:
      init in interface Importer
      Parameters:
      configuration - can contain any setup params such as database settings that need init'ing
    • getConfigurationType

      public Class getConfigurationType()
      Description copied from interface: Importer
      The type of configuration being used for this Import.
      Specified by:
      getConfigurationType in interface Importer
      Returns:
      Class that should be a subclass of Configuration
    • setJdbcTemplate

      public void setJdbcTemplate(JdbcConfiguration configuration)
    • importUsersGroupsAndMemberships

      public Result importUsersGroupsAndMemberships(Configuration configuration) throws ImporterException
      This method will handle the importing of Users, Groups and Memberships from Confluence.
      Specified by:
      importUsersGroupsAndMemberships in interface Importer
      Parameters:
      configuration - the configuration required for the import
      Returns:
      success or failure for the import.
      Throws:
      ImporterException - general exception if anything happened during the import
    • supportsMultipleDirectories

      public boolean supportsMultipleDirectories(Configuration configuration) throws ImporterException
      Description copied from interface: Importer
      Some sources might be capable of handling more than one directory.
      Specified by:
      supportsMultipleDirectories in interface Importer
      Parameters:
      configuration - the Importer Configuration
      Returns:
      true if the source can have multiple directories.
      Throws:
      ImporterException - if there is an error figuring out source directories.
    • retrieveRemoteSourceDirectory

      public Set<Directory> retrieveRemoteSourceDirectory(Configuration configuration) throws ImporterException
      Description copied from interface: Importer
      The retrieve the set of remote source directories.
      Specified by:
      retrieveRemoteSourceDirectory in interface Importer
      Parameters:
      configuration - the import configuration.
      Returns:
      the set of source directories.
      Throws:
      ImporterException - will be thrown if an error occurs connecting, or if the provided configuration is invalid.