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:
  • Constructor Details

  • Method Details

    • getEntity

      public EntityCord getEntity()
      Returns:
      the cord entity object associated with the current cord or null if not set
      Since:
      4.0.0
      See Also:
    • setEntity

      public void setEntity(EntityCord entityCord)
      Sets entityCord and entityCordId.
      Parameters:
      entityCord - see getEntity()
    • getSourceBucket

      public Bucket getSourceBucket()
      Get the source bucket of a cord.
      Returns:
      Source bucket or null
    • setSourceBucket

      public void setSourceBucket(Bucket sourceBucket)
      Parameters:
      sourceBucket - see getSourceBucket()
    • getSourceLabel

      public String getSourceLabel()
      Returns:
      Display name for the "from Bucket" relationship
    • setSourceLabel

      public void setSourceLabel(String sourceLabel)
      Parameters:
      sourceLabel - see getSourceLabel()
    • getDestinationBucket

      public Bucket getDestinationBucket()
      Get the destination bucket of a cord.
      Returns:
      Destination bucket or null
    • setDestinationBucket

      public void setDestinationBucket(Bucket destinationBucket)
      Parameters:
      destinationBucket - see getDestinationBucket()
    • getDestinationLabel

      public String getDestinationLabel()
      Returns:
      Display name for the "to Bucket" relationship
    • setDestinationLabel

      public void setDestinationLabel(String destinationLabel)
      Parameters:
      destinationLabel - see getDestinationLabel()
    • getContentBucket

      public Bucket getContentBucket()
      Get ContentBucket collecting MediaAssets, Texts, KeyValues, etc. related to the cord.
      Returns:
      bucket or null
    • setContentBucket

      public void setContentBucket(Bucket contentBucket)
      Parameters:
      contentBucket - see getContentBucket()
    • getEntityCordId

      public String getEntityCordId()
      Returns:
      identifier of the cord entity or null if not set
    • setEntityCordId

      public void setEntityCordId(String entityCordId)
      Sets entityCordId and eventually removes current entityCord if it does not match the id
      Parameters:
      entityCordId - see getEntityCordId()
      Since:
      4.0.0
    • getConnectorEntity

      public ConnectorEntity getConnectorEntity()
      Returns:
      connector entity object or null if not set
    • setConnectorEntity

      public void setConnectorEntity(ConnectorEntity connectorEntity)
      Parameters:
      connectorEntity - see getConnectorEntity()
    • getContext

      public Context getContext()
      Get the context for this element or null if not set.
      Specified by:
      getContext in interface EntityData
      Specified by:
      getContext in interface GetContext
      Returns:
      context
    • setContext

      public void setContext(Context context)
      Description copied from interface: EntityData
      set the context of entity data object
      Specified by:
      setContext in interface EntityData
      Parameters:
      context - getContext()
    • getCreatedBy

      public String getCreatedBy()
      Returns:
      creation user or null if not set
    • setCreatedBy

      public void setCreatedBy(String createdBy)
      Parameters:
      createdBy - see getCreatedBy()
    • getCreatedOn

      public Date getCreatedOn()
      Returns:
      creation date or null if not set
    • setCreatedOn

      public void setCreatedOn(Date createdOn)
      Parameters:
      createdOn - see getCreatedOn()
    • getGroupIdentifier

      public String getGroupIdentifier()
      String key for grouping cords of the same type.
      Returns:
      group identifier string or null if not set
    • setGroupIdentifier

      public void setGroupIdentifier(String groupIdentifier)
      Parameters:
      groupIdentifier - see getGroupIdentifier()
    • getIdentifier

      public String getIdentifier()
      Get the string identifier of the cord.

      Will be used as RecordID in priint:comet.

      Specified by:
      getIdentifier in interface EntityData
      Specified by:
      getIdentifier in interface GetIdentifier
      Specified by:
      getIdentifier in interface PersistentData
      Returns:
      identifier string or null if not set
    • setIdentifier

      public void setIdentifier(String identifier)
      Specified by:
      setIdentifier in interface EntityData
      Parameters:
      identifier - see getIdentifier()
    • getLabel

      public String getLabel()
      Display label for the cord.
      Returns:
      label or null if not set
    • setLabel

      public void setLabel(String label)
      Parameters:
      label - see getLabel()
    • getMetaData

      public List<KeyValue> getMetaData()
      Returns:
      List of meta data related to the cord or empty list.

      List is LAZY loaded.

    • setMetaData

      public void setMetaData(List<KeyValue> metaData)
      Parameters:
      metaData - see getMetaData()
    • 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:
      getSequence in interface GetSequence
      Returns:
      ordered position within a list sequenceable objects
    • setSequence

      public void setSequence(int sequence)
      Parameters:
      sequence - see getSequence()
    • getTemplate

      public String getTemplate()
      Get String identifier of the priint:comet template.
      Returns:
      template id or null if not set
    • setTemplate

      public void setTemplate(String template)
      Parameters:
      template - see getTemplate()
    • getTimestamp

      public String 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

      public void setTimestamp(String timestamp)
      Parameters:
      timestamp - see getTimestamp()
    • getVersion

      public String getVersion()
      Version string from the content system
      Returns:
      version string or null if not set
    • setVersion

      public void setVersion(String version)
      Parameters:
      version - see getVersion()
    • getUpdatedBy

      public String getUpdatedBy()
      Returns:
      last modified user or null if not set
    • setUpdatedBy

      public void setUpdatedBy(String updatedBy)
      Parameters:
      updatedBy - see getUpdatedBy()
    • getUpdatedOn

      public Date getUpdatedOn()
      Returns:
      last modified date or null if not set
    • setUpdatedOn

      public void setUpdatedOn(Date updatedOn)
      Parameters:
      updatedOn - see getUpdatedOn()
    • getSourceBucketId

      public final String getSourceBucketId()
      Returns:
      Identifier of related source bucket.
    • setSourceBucketId

      public final void setSourceBucketId(String sourceBucketId)
      Sets sourceBucketId and eventually removes current sourceBucket if it does not match the id
      Parameters:
      sourceBucketId - getSourceBucketId()
    • getDestinationBucketId

      public final String getDestinationBucketId()
      Returns:
      Identifier of related destination bucket.
    • setDestinationBucketId

      public final void setDestinationBucketId(String destinationBucketId)
      Sets destinationBucketId and eventually removes current destinationBucket if it does not match the id
      Parameters:
      destinationBucketId - getDestinationBucketId()
    • getOrigin

      public String 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

      public void setOrigin(String origin)
      Parameters:
      origin - getOrigin()
    • getEntityIdentifier

      public String getEntityIdentifier()
      Description copied from interface: EntityData
      Identifier of an entity in the entity model where the current object refers to.
      Specified by:
      getEntityIdentifier in interface EntityData
      Returns:
      entity identifier as string
    • setEntityIdentifier

      public void setEntityIdentifier(String entityIdentifier)
      Description copied from interface: EntityData
      Identifier of an entity in the entity model where the current object refers to.
      Specified by:
      setEntityIdentifier in interface EntityData
    • getContentMetaData

      public List<ContentMetaData> 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

      public void setContentMetaData(List<ContentMetaData> contentMetaData)
      Parameters:
      contentMetaData - getContentMetaData()
    • toString

      public String toString()
      Overrides:
      toString in class Object