com.atlassian.crowd.importer.importers
Interface Importer

All Known Implementing Classes:
BambooImporter, ConfluenceImporter, CsvImporter, DirectoryImporter, JiraImporter

public interface Importer

Classes that extend this interface will manage the import of users, groups and their memberships from a given application (or file) into Crowd.


Method Summary
 Class getConfigurationType()
          The type of configuration being used for this Import.
 Result importUsersGroupsAndMemberships(Configuration configuration)
          Responsible for the import of both users and groups into Crowd using the given Configuration
 void init(Configuration configuration)
          Initialise anything required for the import process.
 Set<Directory> retrieveRemoteSourceDirectory(Configuration configuration)
          The retrieve the set of remote source directories.
 boolean supportsMultipleDirectories(Configuration configuration)
          Some sources might be capable of handling more than one directory.
 

Method Detail

importUsersGroupsAndMemberships

Result importUsersGroupsAndMemberships(Configuration configuration)
                                       throws ImporterException
Responsible for the import of both users and groups into Crowd using the given Configuration

Parameters:
configuration - the Configuration, this could be a JDBC configuration or a CSVConfiguration
Returns:
the result of the import
Throws:
ImporterException - general exception if anything happened during the import

init

void init(Configuration configuration)
Initialise anything required for the import process.

Parameters:
configuration - can contain any setup params such as database settings that need init'ing

getConfigurationType

Class getConfigurationType()
The type of configuration being used for this Import.

Returns:
Class that should be a subclass of Configuration

supportsMultipleDirectories

boolean supportsMultipleDirectories(Configuration configuration)
                                    throws ImporterException
Some sources might be capable of handling more than one directory.

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

Set<Directory> retrieveRemoteSourceDirectory(Configuration configuration)
                                             throws ImporterException
The retrieve the set of remote source directories.

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.


Copyright © 2013 Atlassian. All Rights Reserved.