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

public class GenericLegacyImporter extends GenericMapper
A generic mapper that contains helper methods and attributes to map domain objects to database objects and vice-versa.
  • Field Details

  • Constructor Details

    • GenericLegacyImporter

      public GenericLegacyImporter(org.hibernate.SessionFactory sessionFactory, BatchProcessor batchProcessor)
  • Method Details

    • getInternalEntityTemplateFromLegacyXml

      protected InternalEntityTemplate getInternalEntityTemplateFromLegacyXml(org.dom4j.Element element)
      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

      protected Map<String,Set<String>> getMultiValuedAttributesMapFromXml(org.dom4j.Element element)
      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

      protected Map<String,String> getSingleValuedAttributesMapFromXml(org.dom4j.Element element)
      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

      public DirectoryManager getDirectoryManager()
    • setDirectoryManager

      public void setDirectoryManager(DirectoryManager directoryManager)
    • getPasswordCredentialFromXml

      protected PasswordCredential getPasswordCredentialFromXml(org.dom4j.Element parentElement)