com.atlassian.crowd.importer.importers
Interface Importer

All Known Implementing Classes:
BambooImporter, BaseImporter, ConfluenceHibernateImporter, ConfluenceImporter, ConfluenceOSUserImporter, CsvImporter, DirectoryImporter, JdbcImporter, 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
 java.util.Collection<GroupMembership> findGroupMemberships(Configuration configuration)
          Will locate and build a collection of GroupMembership objects based on the passed in Configuration
 java.util.Collection<GroupTemplate> findGroups(Configuration configuration)
          Will locate and build a collection of GroupTemplate objects based on the passed in Configuration
 java.util.Collection<UserTemplateWithCredentialAndAttributes> findUsers(Configuration configuration)
          Will locate and build a collection of UserTemplate objects based on the passed in Configuration
 java.lang.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.
 

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

findGroupMemberships

java.util.Collection<GroupMembership> findGroupMemberships(Configuration configuration)
                                                           throws ImporterException
Will locate and build a collection of GroupMembership objects based on the passed in Configuration

Parameters:
configuration - the Importer Configuration
Returns:
a collection of GroupMemberships to be imported or Collections.EMPTY_LIST
Throws:
ImporterException - if there is an error finding group memberships

findGroups

java.util.Collection<GroupTemplate> findGroups(Configuration configuration)
                                               throws ImporterException
Will locate and build a collection of GroupTemplate objects based on the passed in Configuration

Parameters:
configuration - the Importer Configuration
Returns:
a collection of GroupTemplates to be imported or Collections.EMPTY_LIST
Throws:
ImporterException - if there is an error finding the groups

findUsers

java.util.Collection<UserTemplateWithCredentialAndAttributes> findUsers(Configuration configuration)
                                                                        throws ImporterException
Will locate and build a collection of UserTemplate objects based on the passed in Configuration

Parameters:
configuration - the Importer Configuration
Returns:
a collection of UserTemplates to be imported or Collections.EMPTY_LIST
Throws:
ImporterException - if there is an error finding the users

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

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

Returns:
Class that should be a subclass of Configuration


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.