Class Text
java.lang.Object
com.priint.pubserver.plugin.entitydata.Text
- All Implemented Interfaces:
GetContext,GetIdentifier,GetSequence,EntityData,PersistentData,Serializable
@Entity
public class Text
extends Object
implements Serializable, GetIdentifier, GetSequence, GetContext, EntityData, PersistentData
Data object of entity type Text
Text elements are used to represent textual content of content systems.
- Since:
- 4.0.0, 4.0.5 origin attribute supported, added JPA annotations, getLanguage() and getCountry() 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 text.intGet sequence number for the text as given in the content system.getText()Get timestamp from the content system.Version string from the content systemvoidvoidsetBucketId(String bucketId) voidsetConnectorEntity(ConnectorEntity connectorEntity) voidsetContentMetaData(List<ContentMetaData> contentMetaData) voidsetContext(Context context) set the context of entity data objectvoidsetCreatedBy(String createdBy) voidsetCreatedOn(Date createdOn) voidsetEntity(EntityText entityText) Set entityText and entityTextId.voidsetEntityIdentifier(String entityIdentifier) Identifier of an entity in the entity model where the current object refers to.voidsetEntityTextId(String entityTextId) Set entity identifier and remove entity object of not matching this identifier.voidsetGroupIdentifier(String groupIdentifier) voidsetIdentifier(String identifier) voidsetMediaAsset(MediaAsset mediaAsset) 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
-
Text
public Text()Default constructor. -
Text
Create a Text with basic properties set.- Parameters:
identifier-getIdentifier()entityTextId-getEntityTextId()text-getText()context-getContext()bucket-getBucket()
-
Text
public Text(String identifier, String entityTextId, Context context, String bucketId, String text, String createdBy, Date createdOn, String updatedBy, Date updatedOn) Create a Text with extended properties set.- Parameters:
identifier-getIdentifier()entityTextId-getEntityTextId()context-getContext()bucketId-getBucketId()text-getText()createdBy-getCreatedBy()createdOn-getCreatedOn()updatedBy-getUpdatedBy()updatedOn-getUpdatedOn()
-
-
Method Details
-
getIdentifier
Get the string identifier of the text.- 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()
-
getGroupIdentifier
String key for grouping texts of the same type.- Returns:
- group identifier string or
nullif not set
-
setGroupIdentifier
- Parameters:
groupIdentifier- seegetGroupIdentifier()
-
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()
-
getTemplate
- Returns:
- String identifier of the template to render this content.
-
setTemplate
- Parameters:
template-getTemplate()
-
getEntity
- Returns:
- Text entity object associated with the current text or
nullif not set. - See Also:
-
setEntity
Set entityText and entityTextId.- Parameters:
entityText- seegetEntity()
-
getText
- Returns:
- Text content of this element.
-
setText
- Parameters:
text-getText()
-
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()
-
getBucket
- Returns:
- Parent bucket that this text is related to.
-
setBucket
- Parameters:
bucket-getBucket()
-
getSequence
public int getSequence()Get sequence number for the text as given in the content system.This should reflect the position of the current text in the sorting of texts of its sourceBucket.
- Specified by:
getSequencein interfaceGetSequence- Returns:
- ordered position within a list sequenceable objects
-
setSequence
public void setSequence(int sequence) - Parameters:
sequence- seegetSequence()
-
getConnectorEntity
- Returns:
- connector entity object or
nullif not set
-
setConnectorEntity
- Parameters:
connectorEntity- seegetConnectorEntity()
-
getMetaData
- Returns:
- List of meta data related to the bucket or empty list.
List is LAZY loaded.
-
setMetaData
- Parameters:
metaData- seegetMetaData()
-
getEntityTextId
- Returns:
- Identifier of related entity in entity model or
nullif not set.
-
setEntityTextId
Set entity identifier and remove entity object of not matching this identifier.- Parameters:
entityTextId-getEntityTextId()
-
getBucketId
- Returns:
- Identifier of parent bucket that this content element is related to. Is null for following methods:
EntityManagerRemote.getEntityTextsByIdentifier(String, String, String, String, Context, String)EntityManagerRemote.getEntityTextsOfBucket(String, String, String, String, String, Context, String)EntityManagerRemote.getEntityTextsOfPlanning(String, String, String, String, String, Context, String, String)EntityManagerRemote.getEntityTextsOfPlannedBucket(String, String, String, String, Context, String)
-
setBucketId
- 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()
-
getMediaAsset
- Returns:
- MediaAsset. Is null for following methods:
*EntityManagerRemote.getEntityTextsByIdentifier(String, String, String, String, Context, String)*EntityManagerRemote.getEntityTextsOfBucket(String, String, String, String, String, Context, String)*EntityManagerRemote.getEntityTextsOfPlanning(String, String, String, String, String, Context, String, String)*EntityManagerRemote.getEntityTextsOfPlannedBucket(String, String, String, String, Context, String)
-
setMediaAsset
-
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 Text.
List is not loaded by Entity Manager in its standard methods. Use specific Entity Manager methods for loading.
-
setContentMetaData
- Parameters:
contentMetaData-getContentMetaData()
-