Class PartialCrowdEntityXmlMapper<T,​I extends T>

  • All Implemented Interfaces:
    BambooStAXMappingHelper<T,​I>
    Direct Known Subclasses:
    GroupMapper, MembershipMapper, UserMapper

    public abstract class PartialCrowdEntityXmlMapper<T,​I extends T>
    extends CrowdEntityXmlMapper<T,​I>
    Specialises XmlMapper for mappers that take into account just a subset of the directory types. Subclasses may override getFullBackupDirectoryTypes to specify which directory types participate in the backup, otherwise a default Set is used containing internal and delegating directory types.
    • Constructor Detail

      • PartialCrowdEntityXmlMapper

        public PartialCrowdEntityXmlMapper​(org.hibernate.SessionFactory sessionFactory,
                                           org.springframework.transaction.support.TransactionOperations ops,
                                           com.atlassian.crowd.manager.directory.DirectoryManager directoryManager,
                                           Set<com.atlassian.crowd.embedded.api.DirectoryType> includedDirectoryTypes)
    • Method Detail

      • isImportableDirectory

        protected boolean isImportableDirectory​(com.atlassian.crowd.embedded.api.Directory directory)
        Parameters:
        directory - the directory to be imported
        Returns:
        true if the directory data is importable
      • findAllExportableDirectories

        protected List<com.atlassian.crowd.embedded.api.Directory> findAllExportableDirectories()
        Finds all directories that have user/group/membership data that need to be exported (ie. Internal + Delegating).
        Returns:
        list of directories that require exporting internal data.
      • isExportOfNonLocalGroupsRequired

        protected boolean isExportOfNonLocalGroupsRequired​(com.atlassian.crowd.embedded.api.DirectoryType directoryType)
        Determines whether the backup for a directory type includes all groups (both local and non-local), or just local groups, excluding non-local (remote) groups.
        Parameters:
        directoryType - a directory type
        Returns:
        false if backups must be limited to just local groups for this directory type, or true if backups must include all groups, local and non-local as well.