|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.crowd.importer.importers.CsvImporter
public class CsvImporter
This class is responsible for importing users, groups and their memberships from two CSV files.
Field Summary | |
---|---|
protected DirectoryManager |
directoryManager
|
Constructor Summary | |
---|---|
CsvImporter(DirectoryManager directoryManager,
PasswordHelper passwordHelper)
|
Method Summary | |
---|---|
Collection<GroupTemplate> |
findGroups(Configuration configuration)
Will locate and build a collection of GroupTemplate objects based on the passed in Configuration |
Collection<MembershipDTO> |
findGroupToGroupMemberships(Configuration configuration)
Will locate and build a collection of MembershipDTO objects which
represent membership relationships between groups and groups based on the passed in Configuration. |
Collection<UserTemplateWithCredentialAndAttributes> |
findUsers(Configuration configuration)
Will locate and build a collection of UserTemplate objects based on the passed in Configuration |
Collection<MembershipDTO> |
findUserToGroupMemberships(Configuration configuration)
Will locate and build a collection of MembershipDTO objects which
represent membership relationships between users and groups based on the passed in Configuration. |
Class |
getConfigurationType()
The type of configuration being used for this Import. |
protected Result |
importGroupMemberships(Iterable<MembershipDTO> memberships,
Configuration configuration)
|
protected Result |
importGroups(Collection<GroupTemplate> groups,
Configuration configuration)
|
protected Result |
importUserMemberships(Iterable<MembershipDTO> memberships,
Configuration configuration)
|
protected Result |
importUsers(Collection<UserTemplateWithCredentialAndAttributes> users,
Configuration configuration)
|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.atlassian.crowd.importer.importers.Importer |
---|
importUsersGroupsAndMemberships, retrieveRemoteSourceDirectory, supportsMultipleDirectories |
Field Detail |
---|
protected final DirectoryManager directoryManager
Constructor Detail |
---|
public CsvImporter(DirectoryManager directoryManager, PasswordHelper passwordHelper)
Method Detail |
---|
public void init(Configuration configuration)
Importer
init
in interface Importer
configuration
- can contain any setup params such as database settings that need init'ingpublic Class getConfigurationType()
Importer
getConfigurationType
in interface Importer
public Collection<MembershipDTO> findUserToGroupMemberships(Configuration configuration)
MembershipDTO
objects which
represent membership relationships between users and groups based on the passed in Configuration.
configuration
- the Importer Configuration
public Collection<MembershipDTO> findGroupToGroupMemberships(Configuration configuration) throws ImporterException
MembershipDTO
objects which
represent membership relationships between groups and groups based on the passed in Configuration.
configuration
- the Importer Configuration
ImporterException
- if there is an error finding group membershipspublic Collection<GroupTemplate> findGroups(Configuration configuration)
configuration
- the Importer Configuration
public Collection<UserTemplateWithCredentialAndAttributes> findUsers(Configuration configuration)
configuration
- the Importer Configuration
protected Result importGroups(Collection<GroupTemplate> groups, Configuration configuration) throws ImporterException
ImporterException
protected Result importUsers(Collection<UserTemplateWithCredentialAndAttributes> users, Configuration configuration) throws ImporterException
ImporterException
protected Result importUserMemberships(Iterable<MembershipDTO> memberships, Configuration configuration) throws ImporterException
ImporterException
protected Result importGroupMemberships(Iterable<MembershipDTO> memberships, Configuration configuration) throws ImporterException
ImporterException
public Result importUsersGroupsAndMemberships(Configuration configuration) throws ImporterException
Importer
Configuration
importUsersGroupsAndMemberships
in interface Importer
configuration
- the Configuration, this could be a JDBC configuration or a CSVConfiguration
ImporterException
- general exception if anything happened during the importpublic boolean supportsMultipleDirectories(Configuration configuration)
Importer
supportsMultipleDirectories
in interface Importer
configuration
- the Importer Configuration
public Set<Directory> retrieveRemoteSourceDirectory(Configuration configuration)
Importer
retrieveRemoteSourceDirectory
in interface Importer
configuration
- the import configuration.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |