Class MediaAsset
java.lang.Object
com.priint.pubserver.plugin.entitydata.MediaAsset
- All Implemented Interfaces:
GetContext,GetIdentifier,GetSequence,EntityData,PersistentData,Serializable
@Entity
public class MediaAsset
extends Object
implements Serializable, GetIdentifier, GetContext, GetSequence, EntityData, PersistentData
Object of entity type MediaAsset, e.g. images.
An image can have more than one file for different resolutions (HighRes, LowRes) and formats (JPEG, EPS, etc) these are stored in the Media Object List.
- Since:
- 4.0.0, 4.0.5 origin attribute supported, names for mediaObject and text are used in singular, added JPA annotations, getLanguage(), getCountry(), getMediaObjectsCount() and getMetadataCount() are deprecated
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the context for this element ornullif not set.Identifier of an entity in the entity model where the current object refers to.String key for grouping texts of the same type.Get the string identifier of the asset.getLabel()Display label for the asset.intGet sequence number for the asset as given in the content system.getTexts()Get timestamp from the content system.Version string from the content systemvoidSets bucket and bucketId.voidsetBucketId(String bucketId) Sets bucketId and eventually removes current bucket if it does not match the idvoidsetConnectorEntity(ConnectorEntity connectorEntity) voidsetContentMetaData(List<ContentMetaData> contentMetaData) voidsetContext(Context context) set the context of entity data objectvoidsetCreatedBy(String createdBy) voidsetCreatedOn(Date createdOn) voidsetEntity(EntityMediaAsset entityMediaAsset) Sets entityMediaAsset and entityMediaAssetId.voidsetEntityIdentifier(String entityIdentifier) Identifier of an entity in the entity model where the current object refers to.voidsetEntityMediaAssetId(String entityMediaAssetId) Sets entityMediaAssetId and eventually removes current entityMediaAsset if it does not match the idvoidsetGroupIdentifier(String groupIdentifier) voidsetIdentifier(String identifier) voidvoidsetMediaObjects(List<MediaObject> mediaObjects) voidsetMetaData(List<KeyValue> metaData) voidvoidsetSequence(int sequence) voidsetTemplate(String template) voidvoidsetTimestamp(String timestamp) voidsetUpdatedBy(String updatedBy) voidsetUpdatedOn(Date updatedOn) voidsetVersion(String version) toString()
-
Constructor Details
-
MediaAsset
public MediaAsset() -
MediaAsset
public MediaAsset(String identifier, String label, Context context, String entityMediaAssetId, String bucketId, String createdBy, Date createdOn, String updatedBy, Date updatedOn) - Parameters:
identifier-getIdentifier()label-getLabel()context-getContext()entityMediaAssetId-getEntityMediaAssetId()bucketId-getBucketId()createdBy-getCreatedBy()createdOn-getCreatedOn()updatedBy-getUpdatedBy()updatedOn-getUpdatedOn()
-
-
Method Details
-
getIdentifier
Get the string identifier of the asset.- Specified by:
getIdentifierin interfaceEntityData- Specified by:
getIdentifierin interfaceGetIdentifier- Specified by:
getIdentifierin interfacePersistentData- Returns:
- identifier string or
nullif not set
-
setIdentifier
- Specified by:
setIdentifierin interfaceEntityData- Parameters:
identifier- seegetIdentifier()
-
getVersion
Version string from the content system- Returns:
- version string or
nullif not set
-
setVersion
- Parameters:
version- seegetVersion()
-
getTimestamp
Get timestamp from the content system.Timestamp is used as a string to support differing types of timestamp representation as used by different content system. publishing server does not validate any format of this string.
- Returns:
- timestamp string
-
setTimestamp
- Parameters:
timestamp- seegetTimestamp()
-
getLabel
Display label for the asset.- Returns:
- label or
nullif not set
-
setLabel
- Parameters:
label- seegetLabel()
-
getTemplate
- Returns:
- String identifier of the template to render this content.
-
setTemplate
- Parameters:
template-getTemplate()
-
getContext
Get the context for this element ornullif not set.- Specified by:
getContextin interfaceEntityData- Specified by:
getContextin interfaceGetContext- Returns:
- context
-
setContext
Description copied from interface:EntityDataset the context of entity data object- Specified by:
setContextin interfaceEntityData- Parameters:
context-getContext()
-
getEntity
- Returns:
- Entity from Entity Model
- See Also:
-
setEntity
Sets entityMediaAsset and entityMediaAssetId.- Parameters:
entityMediaAsset-getEntity()- See Also:
-
getSequence
public int getSequence()Get sequence number for the asset as given in the content system.This should reflect the position of the current asset in the sorting of assets of its bucket.
- Specified by:
getSequencein interfaceGetSequence- Returns:
- ordered position within a list sequenceable objects
-
setSequence
public void setSequence(int sequence) - Parameters:
sequence- seegetSequence()
-
getBucket
- Returns:
- Parent bucket that this price is related to.
-
setBucket
Sets bucket and bucketId.- Parameters:
bucket-getBucket()- See Also:
-
getTexts
- Returns:
- List of text (e.g. image sub line).
List is LAZY loaded.
-
setTexts
- Parameters:
texts-getTexts()
-
getMediaObjects
- Returns:
- List of media object like image files in different formats and resolutions.
List is LAZY loaded.
-
setMediaObjects
- Parameters:
mediaObjects-getMediaObjects()
-
getMetaData
- Returns:
- List of meta data related to the bucket or empty list.
List is LAZY loaded.
-
setMetaData
- Parameters:
metaData- seegetMetaData()
-
getGroupIdentifier
String key for grouping texts of the same type.- Returns:
- group identifier string or
nullif not set
-
setGroupIdentifier
- Parameters:
groupIdentifier- seegetGroupIdentifier()
-
getConnectorEntity
- Returns:
- connector entity object or
nullif not set
-
setConnectorEntity
- Parameters:
connectorEntity- seegetConnectorEntity()
-
getEntityMediaAssetId
- Returns:
- Identifier of related entity in entity model.
-
setEntityMediaAssetId
Sets entityMediaAssetId and eventually removes current entityMediaAsset if it does not match the id- Parameters:
entityMediaAssetId-getEntityMediaAssetId()
-
getBucketId
- Returns:
- Identifier of parent bucket that this content element is related to. Is null for following methods:
EntityManagerRemote.getEntityMediaAssetsOfBucket(String, String, String, String, String, Context, String)EntityManagerRemote.getEntityMediaAssetsByIdentifier(String, String, String, String, Context, String)EntityManagerRemote.getEntityMediaAssetsOfPlannedBucket(String, String, String, String, Context, String)}EntityManagerRemote.getEntityMediaAssetsOfPlanning(String, String, String, String, String, Context, String, String)}
-
setBucketId
Sets bucketId and eventually removes current bucket if it does not match the id- Parameters:
bucketId-getBucketId()
-
getCreatedBy
- Returns:
- creation user or
nullif not set
-
setCreatedBy
- Parameters:
createdBy- seegetCreatedBy()
-
getCreatedOn
- Returns:
- creation date or
nullif not set
-
setCreatedOn
- Parameters:
createdOn- seegetCreatedOn()
-
getUpdatedBy
- Returns:
- last modified user or
nullif not set
-
setUpdatedBy
- Parameters:
updatedBy- seegetUpdatedBy()
-
getUpdatedOn
- Returns:
- last modified date or
nullif not set
-
setUpdatedOn
- Parameters:
updatedOn- seegetUpdatedOn()
-
toString
-
getOrigin
- Returns:
- Origin of data entity object, e.g. name of the source system. This property is filled by the connector. Might return
null.
-
setOrigin
- Parameters:
origin-getOrigin()
-
getEntityIdentifier
Description copied from interface:EntityDataIdentifier of an entity in the entity model where the current object refers to.- Specified by:
getEntityIdentifierin interfaceEntityData- Returns:
- entity identifier as string
-
setEntityIdentifier
Description copied from interface:EntityDataIdentifier of an entity in the entity model where the current object refers to.- Specified by:
setEntityIdentifierin interfaceEntityData
-
getContentMetaData
- Returns:
- List of ContentMetaData related to MediaAsset.
List is not loaded by Entity Manager in its standard methods. Use specific Entity Manager methods for loading.
-
setContentMetaData
- Parameters:
contentMetaData-getContentMetaData()
-