Class Cord
java.lang.Object
com.priint.pubserver.plugin.entitydata.Cord
- All Implemented Interfaces:
GetContext,GetIdentifier,GetSequence,EntityData,PersistentData,Serializable
@Entity
public class Cord
extends Object
implements Serializable, GetContext, GetIdentifier, GetSequence, EntityData, PersistentData
Object of entity type Cord represent n:m relationship between buckets.
A cord can contain its own content. For this cases the cord is related to a third bucket representing the connection content.
- Since:
- 4.0.0, 4.0.5 origin attribute supported, source and destination buckets by reference not by inclusion, added JPA annotations
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionCord()Default constructor.Cord(String identifier, String label, Context context, String entityCordId, Bucket sourceBucket, Bucket destinationBucket) Creates a cord between a source and a destination bucket.Cord(String identifier, String label, Context context, String entityCordId, Bucket sourceBucket, Bucket destinationBucket, String createdBy, Date createdOn, String updatedBy, Date updatedOn) Creates a cord between a source and a destination bucket. -
Method Summary
Modifier and TypeMethodDescriptionGet ContentBucket collecting MediaAssets, Texts, KeyValues, etc.Get the context for this element ornullif not set.Get the destination bucket of a cord.final StringIdentifier of an entity in the entity model where the current object refers to.String key for grouping cords of the same type.Get the string identifier of the cord.getLabel()Display label for the cord.intGet sequence number for the cord as given in the content system.Get the source bucket of a cord.final StringGet String identifier of the priint:comet template.Get timestamp from the content system.Version string from the content systemvoidsetConnectorEntity(ConnectorEntity connectorEntity) voidsetContentBucket(Bucket contentBucket) voidsetContentMetaData(List<ContentMetaData> contentMetaData) voidsetContext(Context context) set the context of entity data objectvoidsetCreatedBy(String createdBy) voidsetCreatedOn(Date createdOn) voidsetDestinationBucket(Bucket destinationBucket) final voidsetDestinationBucketId(String destinationBucketId) Sets destinationBucketId and eventually removes current destinationBucket if it does not match the idvoidsetDestinationLabel(String destinationLabel) voidsetEntity(EntityCord entityCord) Sets entityCord and entityCordId.voidsetEntityCordId(String entityCordId) Sets entityCordId and eventually removes current entityCord if it does not match the idvoidsetEntityIdentifier(String entityIdentifier) Identifier of an entity in the entity model where the current object refers to.voidsetGroupIdentifier(String groupIdentifier) voidsetIdentifier(String identifier) voidvoidsetMetaData(List<KeyValue> metaData) voidvoidsetSequence(int sequence) voidsetSourceBucket(Bucket sourceBucket) final voidsetSourceBucketId(String sourceBucketId) Sets sourceBucketId and eventually removes current sourceBucket if it does not match the idvoidsetSourceLabel(String sourceLabel) voidsetTemplate(String template) voidsetTimestamp(String timestamp) voidsetUpdatedBy(String updatedBy) voidsetUpdatedOn(Date updatedOn) voidsetVersion(String version) toString()
-
Constructor Details
-
Cord
public Cord()Default constructor. -
Cord
public Cord(String identifier, String label, Context context, String entityCordId, Bucket sourceBucket, Bucket destinationBucket) Creates a cord between a source and a destination bucket.- Parameters:
sourceBucket- seegetSourceBucket()destinationBucket- seegetDestinationBucket()identifier- seegetIdentifier()label- seegetLabel()entityCordId- seegetEntityCordId()context- seegetContext()- Since:
- 4.0.0
-
Cord
public Cord(String identifier, String label, Context context, String entityCordId, Bucket sourceBucket, Bucket destinationBucket, String createdBy, Date createdOn, String updatedBy, Date updatedOn) Creates a cord between a source and a destination bucket.- Parameters:
sourceBucket- seegetSourceBucket()destinationBucket- seegetDestinationBucket()identifier- seegetIdentifier()label- seegetLabel()entityCordId- seegetEntityCordId()context- seegetContext()createdBy- seegetCreatedBy()createdOn- seegetCreatedOn()updatedBy- seegetUpdatedBy()updatedOn- seegetUpdatedOn()
-
-
Method Details
-
getEntity
- Returns:
- the cord entity object associated with the current cord or null if not set
- Since:
- 4.0.0
- See Also:
-
setEntity
Sets entityCord and entityCordId.- Parameters:
entityCord- seegetEntity()
-
getSourceBucket
Get the source bucket of a cord.- Returns:
- Source bucket or null
-
setSourceBucket
- Parameters:
sourceBucket- seegetSourceBucket()
-
getSourceLabel
- Returns:
- Display name for the "from Bucket" relationship
-
setSourceLabel
- Parameters:
sourceLabel- seegetSourceLabel()
-
getDestinationBucket
Get the destination bucket of a cord.- Returns:
- Destination bucket or null
-
setDestinationBucket
- Parameters:
destinationBucket- seegetDestinationBucket()
-
getDestinationLabel
- Returns:
- Display name for the "to Bucket" relationship
-
setDestinationLabel
- Parameters:
destinationLabel- seegetDestinationLabel()
-
getContentBucket
Get ContentBucket collecting MediaAssets, Texts, KeyValues, etc. related to the cord.- Returns:
- bucket or null
-
setContentBucket
- Parameters:
contentBucket- seegetContentBucket()
-
getEntityCordId
- Returns:
- identifier of the cord entity or
nullif not set
-
setEntityCordId
Sets entityCordId and eventually removes current entityCord if it does not match the id- Parameters:
entityCordId- seegetEntityCordId()- Since:
- 4.0.0
-
getConnectorEntity
- Returns:
- connector entity object or
nullif not set
-
setConnectorEntity
- Parameters:
connectorEntity- seegetConnectorEntity()
-
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()
-
getCreatedBy
- Returns:
- creation user or
nullif not set
-
setCreatedBy
- Parameters:
createdBy- seegetCreatedBy()
-
getCreatedOn
- Returns:
- creation date or
nullif not set
-
setCreatedOn
- Parameters:
createdOn- seegetCreatedOn()
-
getGroupIdentifier
String key for grouping cords of the same type.- Returns:
- group identifier string or
nullif not set
-
setGroupIdentifier
- Parameters:
groupIdentifier- seegetGroupIdentifier()
-
getIdentifier
Get the string identifier of the cord.Will be used as RecordID in priint:comet.
- 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()
-
getLabel
Display label for the cord.- Returns:
- label or
nullif not set
-
setLabel
- Parameters:
label- seegetLabel()
-
getMetaData
- Returns:
- List of meta data related to the cord or empty list.
List is LAZY loaded.
-
setMetaData
- Parameters:
metaData- seegetMetaData()
-
getSequence
public int getSequence()Get sequence number for the cord as given in the content system.This should reflect the position of the current cord in the sorting of cords of its sourceBucket.
- Specified by:
getSequencein interfaceGetSequence- Returns:
- ordered position within a list sequenceable objects
-
setSequence
public void setSequence(int sequence) - Parameters:
sequence- seegetSequence()
-
getTemplate
Get String identifier of the priint:comet template.- Returns:
- template id or null if not set
-
setTemplate
- Parameters:
template- seegetTemplate()
-
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()
-
getVersion
Version string from the content system- Returns:
- version string or
nullif not set
-
setVersion
- Parameters:
version- seegetVersion()
-
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()
-
getSourceBucketId
- Returns:
- Identifier of related source bucket.
-
setSourceBucketId
Sets sourceBucketId and eventually removes current sourceBucket if it does not match the id- Parameters:
sourceBucketId-getSourceBucketId()
-
getDestinationBucketId
- Returns:
- Identifier of related destination bucket.
-
setDestinationBucketId
Sets destinationBucketId and eventually removes current destinationBucket if it does not match the id- Parameters:
destinationBucketId-getDestinationBucketId()
-
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 Cord.
List is not loaded by Entity Manager in its standard methods. Use specific Entity Manager methods for loading.
-
setContentMetaData
- Parameters:
contentMetaData-getContentMetaData()
-
toString
-