Class Asset

All Implemented Interfaces:
Serializable, IAsset, IBaseEntity, ICollectionListManaged, ICollectionManaged, ICoreEntity, IEntity, IRightManaged, ISortableEntity, IStateManaged, ITypeManaged, IVersionManaged

See Also:
  • Field Details

    • RESOURCE_FILE_PREFIX

      public static final String RESOURCE_FILE_PREFIX
      Prefix of Mac OS metadata files.
      See Also:
  • Constructor Details

    • Asset

      public Asset()
    • Asset

      public Asset(Asset source)
  • Method Details

    • getAssetType

      public AssetType getAssetType()
    • setAssetType

      public void setAssetType(AssetType assetType)
    • 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
    • getDerivates

      public List<AssetDerivate> getDerivates()
    • setDerivates

      public void setDerivates(List<AssetDerivate> derivates)
      IMPORTANT: make sure that Asset is set in AssetDerivate!
      Parameters:
      derivates - of this asset.
    • addDerivate

      public void addDerivate(AssetDerivate derivate)
    • getMacResfileId

      public String getMacResfileId()
      Returns:
      Identifier of Mac OS resource file or NULL if no such metadata file is stored.
      See Also:
    • setMacResfileId

      public void setMacResfileId(String macResfileId)
    • getAssetHotfolder

      public AssetHotfolder getAssetHotfolder()
      if this asset is imported from hotfolder, this property holds the source hotfolder entity until the asset is processed or rejected.
    • setAssetHotfolder

      public void setAssetHotfolder(AssetHotfolder assetHotfolder)
    • getAssetFileSource

      public Asset.AssetFileSource getAssetFileSource()
    • setAssetFileSource

      public void setAssetFileSource(Asset.AssetFileSource assetFileSource)
    • getGroupId

      public String getGroupId()
    • setGroupId

      public void setGroupId(String groupId)
    • getGroupRole

      public Asset.AssetGroupRole getGroupRole()
    • setGroupRole

      public void setGroupRole(Asset.AssetGroupRole groupRole)
    • getVersionNumber

      public int getVersionNumber()
    • setVersionNumber

      public void setVersionNumber(int versionNumber)
    • 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 interface ITypeManaged
      Specified by:
      getType in class ComplexEntity
    • setFilename

      public void setFilename(String filename)
      set original filename of asset as external key
      Overrides:
      setFilename in class ComplexEntity
      Parameters:
      filename -
    • getFilename

      public String getFilename()
      Specified by:
      getFilename in interface IAsset
      Overrides:
      getFilename in class ComplexEntity
      Returns:
      the filename of a file, referenced by fileId and stored in the file content store.
    • getPreview

      public AssetDerivate getPreview(String previewType)
      only call when asset is attached to persistent context!
    • 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
    • getGroupName

      public String getGroupName()
      Specified by:
      getGroupName in interface IAsset
      Returns:
      Asset: null, Derivate: derivateType.groupName
    • getTypeName

      public String getTypeName()
      Specified by:
      getTypeName in interface IAsset
      Returns:
      Asset: null, Derivate: derivateType.typeName
    • isOriginal

      public boolean isOriginal()
      Specified by:
      isOriginal in interface IAsset
      Returns:
      Asset: true, Derivate: false
    • isMultiple

      public boolean isMultiple()
      Specified by:
      isMultiple in interface IAsset
      Returns:
      Asset: false, Derivate: derivateType.isMultiple
    • getAsset

      public Asset getAsset()
      Specified by:
      getAsset in interface IAsset
      Returns:
      Asset: itself, Derivate: derivate.asset