Class GenericLegacyImporter
java.lang.Object
com.atlassian.crowd.migration.GenericMapper
com.atlassian.crowd.migration.legacy.GenericLegacyImporter
- Direct Known Subclasses:
ApplicationMapper
,DirectoryMapper
,GroupMapper
,PropertyMapper
,RoleMapper
,SALPropertyMapper
,UserMapper
A generic mapper that contains helper methods and attributes to
map domain objects to database objects and vice-versa.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.atlassian.crowd.migration.GenericMapper
GenericMapper.Exporter<T>, GenericMapper.Importer<T>
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
protected final org.slf4j.Logger
Fields inherited from class com.atlassian.crowd.migration.GenericMapper
DATABASE_DATE_FORMAT, DATE_CONVERTER_FOR_EXPORT, LEGACY_XML_DATE_FORMAT, PLUGIN_KEY_PREFIX
-
Constructor Summary
ConstructorDescriptionGenericLegacyImporter
(org.hibernate.SessionFactory sessionFactory, BatchProcessor batchProcessor) -
Method Summary
Modifier and TypeMethodDescriptionprotected InternalEntityTemplate
getInternalEntityTemplateFromLegacyXml
(org.dom4j.Element element) Constructs an InternalEntityTemplate from a legacy (Crowd 1.x) XML element.getMultiValuedAttributesMapFromXml
(org.dom4j.Element element) Constructs an Map<String, Set<String>> of attributes from a legacy (Crowd 1.x) XML element.protected PasswordCredential
getPasswordCredentialFromXml
(org.dom4j.Element parentElement) getSingleValuedAttributesMapFromXml
(org.dom4j.Element element) Constructs an Map<String, String> of attributes from a legacy (Crowd 1.x) XML element.void
setDirectoryManager
(DirectoryManager directoryManager) Methods inherited from class com.atlassian.crowd.migration.GenericMapper
addEntities, addEntitiesViaMerge, addEntitiesViaReplicate, addEntity, addEntity, addEntityViaMerge, addEntityViaSave, clearSession, exportXml, getAttributeValue, getBoolean, getBoolean, getDateConverterForXml, getDateFromTimestamp, getDirectoryTypeFromLegacyCode, getLong, getNameFromLegacyCode, getOperationTypeFromLegacyPermissionName, getOptionalValue, getSessionFactory, getString, getValue, importXml, setCDATA, setText, setTimestamp
-
Field Details
-
logger
protected final org.slf4j.Logger logger -
DATE_FORMAT
- See Also:
-
GENERIC_XML_ID
- See Also:
-
GENERIC_XML_NAME
- See Also:
-
GENERIC_XML_ACTIVE
- See Also:
-
GENERIC_XML_CONCEPTION
- See Also:
-
GENERIC_XML_LASTMODIFIED
- See Also:
-
GENERIC_XML_ATTRIBUTES_NODE
- See Also:
-
GENERIC_XML_ATTRIBUTE
- See Also:
-
GENERIC_XML_ATTRIBUTE_ID
- See Also:
-
GENERIC_XML_ATTRIBUTE_VALUES
- See Also:
-
GENERIC_XML_ATTRIBUTE_VALUE
- See Also:
-
GENERIC_XML_ATTRIBUTE_KEY
- See Also:
-
-
Constructor Details
-
GenericLegacyImporter
public GenericLegacyImporter(org.hibernate.SessionFactory sessionFactory, BatchProcessor batchProcessor)
-
-
Method Details
-
getInternalEntityTemplateFromLegacyXml
Constructs an InternalEntityTemplate from a legacy (Crowd 1.x) XML element.This imports: id, name, createdDate, updatedDate and active.
- Parameters:
element
- XML element to import from.- Returns:
- InternalEntityTemplate holding the values.
-
getMultiValuedAttributesMapFromXml
Constructs an Map<String, Set<String>> of attributes from a legacy (Crowd 1.x) XML element.This imports attributes with multiple values.
- Parameters:
element
- XML element to import from.- Returns:
- Map<String, Set<String>> holding the attributes.
-
getSingleValuedAttributesMapFromXml
Constructs an Map<String, String> of attributes from a legacy (Crowd 1.x) XML element.This imports attributes with multiple values and picks the first attribute value if more than one exists.
- Parameters:
element
- XML element to import from.- Returns:
- Map<String, String> holding the attributes.
-
getDirectoryManager
-
setDirectoryManager
-
getPasswordCredentialFromXml
-