Class ImportProfile

All Implemented Interfaces:
Serializable, IBaseEntity, ICollectionManaged, ICoreEntity, IEntity, IRightManaged, ISortableEntity, IChannelMapHolder<ImportProfileMap>, ISchedulable

@Entity public class ImportProfile extends ProfileBase implements IRightManaged, ICollectionManaged, IChannelMapHolder<ImportProfileMap>
Entity to define a type of import that can be run repeatedly, each run being represented by entity Import. ImportProfile is always associated with an ImportProfileType that holds the configuration for this ImportProfile. rightsForNewEntities: optional, if entities are created by this import define the permissions that should be granted on these entities for the principals given by principalsForNewEntities. Importing user will get the maximum rights.
locale: locale in which this import is performed, is stored with all locale dependent data
See Also:
  • Constructor Details

    • ImportProfile

      public ImportProfile()
    • ImportProfile

      public ImportProfile(ImportProfile source)
  • Method Details

    • getImportProfileType

      public ImportProfileType getImportProfileType()
    • setImportProfileType

      public void setImportProfileType(ImportProfileType importProfileType)
    • setType

      public void setType(ComplexTypeEntity type)
      Description copied from class: ComplexEntity
      override in derived classes if ComplexEntity-subclass is type managed, else do nothing.
      be used by entity mapper
      Overrides:
      setType in class ComplexEntity
    • getPrincipalsForNewEntities

      public List<Principal> getPrincipalsForNewEntities()
    • setPrincipalsForNewEntities

      public void setPrincipalsForNewEntities(List<Principal> principalsForNewEntities)
    • getRightsForNewEntities

      public List<Right> getRightsForNewEntities()
    • setRightsForNewEntities

      public void setRightsForNewEntities(List<Right> rightsForNewEntities)
    • getPricelists

      public List<Pricelist> getPricelists()
      Overrides:
      getPricelists in class ProfileBase
    • getLocale

      public Locale getLocale()
    • setLocale

      public void setLocale(Locale locale)
    • getImportProfileMaps

      public List<ImportProfileMap> getImportProfileMaps()
    • setImportProfileMaps

      public void setImportProfileMaps(List<ImportProfileMap> importMaps)
    • addImportMap

      public void addImportMap(ImportProfileMap importMap)
    • getImports

      public List<Import> getImports()
    • setImports

      public void setImports(List<Import> imports)
    • getAllowedRightTypes

      public RightType[] getAllowedRightTypes()
      Description copied from interface: IRightManaged
      give the maximum list of RightTypes that apply for this class.
      Specified by:
      getAllowedRightTypes in interface IRightManaged
      Returns:
      array of enum RightType
    • getType

      public ComplexTypeEntity getType()
      Description copied from class: ComplexEntity
      override in derived classes, return null if ComplexEntity-subclass is not type managed.
      Specified by:
      getType in interface ICollectionManaged
      Specified by:
      getType in class ComplexEntity
    • getProfileType

      public ProfileTypeBase getProfileType()
      Specified by:
      getProfileType in class ProfileBase
    • isRootPerType

      public boolean isRootPerType()
      Description copied from interface: ICollectionManaged
      Flag that indicates if the entities have a root collection per type or if there is only one global root collection. if rootPerType true it can only apply to entities that have a type, i.e. ComplexEntities.
      Specified by:
      isRootPerType in interface ICollectionManaged
    • getImportMap

      public ImportMap getImportMap()
      ImportProfile for flatFile only has one map.
      CAUTION: fallback to map of ImportProfileType. do not use returned map for editing!
      Returns:
      first ImportProfileMap if any, else first ImportProfileTypeMap if any
    • getChannelMap

      public ImportMap getChannelMap(boolean useType)
      ProfileBase contract
      Specified by:
      getChannelMap in class ProfileBase
    • getChannelMaps

      public List<ImportProfileMap> getChannelMaps()
      IChannelMapHolder contract
      Specified by:
      getChannelMaps in interface IChannelMapHolder<ImportProfileMap>
      Returns:
      list of channel maps if any or empty list. no fallback from profile to type
    • getChannelMapInstance

      public ImportProfileMap getChannelMapInstance()
      IChannelMapHolder contract
      Specified by:
      getChannelMapInstance in interface IChannelMapHolder<ImportProfileMap>
      Returns:
      a new instance of the appropriate subclass of ChannelMapBase and set this as channelMapHolder