Class AbstractAssetDO<S extends ComplexEntity,T extends IAsset>

All Implemented Interfaces:
IBaseDO<S>
Direct Known Subclasses:
AssetDerivateDO, AssetDO

public abstract class AbstractAssetDO<S extends ComplexEntity,T extends IAsset> extends AbstractComplexEntityDO<S>
  • Constructor Details

    • AbstractAssetDO

      public AbstractAssetDO()
  • Method Details

    • getContent

      public InputStream getContent(T entity) throws ApplicationException
      Throws:
      ApplicationException
    • getContentFile

      public File getContentFile(T entity) throws ApplicationException
      Throws:
      ApplicationException
    • getFilename

      public String getFilename(T entity)
    • getFilename

      public String getFilename(T entity, AssetFilename<T> strategy)
      base class calls given strategy for entity, or entity.getFilename() if strategy is null
      Parameters:
      entity - mandatory
      scope - optional
      Returns:
      the filename
    • getMetadataValue

      public String getMetadataValue(T entity, IMetadataType metadataType)
    • getMetadataValues

      public mc.core.system.util.misc.StringMap getMetadataValues(T entity, List<IMetadataType> metadataTypes)
      Parameters:
      entity - mandatory
      metadataTypes - if null or empty returns empty StringMap
      Returns:
      StringMap with IMetadataType-name as key and value of the metadata-attribute as value.
    • getMetadataValues

      public mc.core.system.util.misc.StringMap getMetadataValues(T entity)
    • getMetadataValues

      public Map<T,mc.core.system.util.misc.StringMap> getMetadataValues(List<? extends T> entities, List<IMetadataType> metadataTypes)
    • setMetadataValues

      public void setMetadataValues(T entity, DataMap metadata, mc.core.system.util.misc.StringMap metaCategoryMap) throws ApplicationException
      Sets values stored in DataMap metadata as asset metadata which is stored as json-value in asset table. Usually the system metadata-attributes are held in enum AssetMetadataType. For all of these system metadata labels exist for display.

      If a given key from metadata does not correspond to an AssetMetadataType you must take care that labels for this key are present in the resource bundle in the format AssetMetadataType.name.[key] .

      Parameters:
      entity - mandatory
      metadata - mandatory
      metaCategoryMap - optional, no longer relevant
      Throws:
      ApplicationException