Class Entity

    • Field Detail

      • ENTITYCLASS_BUCKET

        public static final java.lang.String ENTITYCLASS_BUCKET
        The constant ENTITYCLASS_BUCKET.
        See Also:
        Constant Field Values
      • ENTITYCLASS_TEXT

        public static final java.lang.String ENTITYCLASS_TEXT
        The constant ENTITYCLASS_TEXT.
        See Also:
        Constant Field Values
      • ENTITYCLASS_MEDIAASSET

        public static final java.lang.String ENTITYCLASS_MEDIAASSET
        The constant ENTITYCLASS_MEDIAASSET.
        See Also:
        Constant Field Values
      • ENTITYCLASS_KEYVALUE

        public static final java.lang.String ENTITYCLASS_KEYVALUE
        The constant ENTITYCLASS_KEYVALUE.
        See Also:
        Constant Field Values
      • ENTITYCLASS_CORD

        public static final java.lang.String ENTITYCLASS_CORD
        The constant ENTITYCLASS_CORD.
        See Also:
        Constant Field Values
      • ENTITYCLASS_PRICE

        public static final java.lang.String ENTITYCLASS_PRICE
        The constant ENTITYCLASS_PRICE.
        See Also:
        Constant Field Values
      • ENTITYCLASS_PLANNING

        public static final java.lang.String ENTITYCLASS_PLANNING
        The constant ENTITYCLASS_PLANNING.
        See Also:
        Constant Field Values
      • ENTITYCLASS_CONTENTMETADATA

        public static final java.lang.String ENTITYCLASS_CONTENTMETADATA
        The constant ENTITYCLASS_CONTENTMETADATA.
        See Also:
        Constant Field Values
      • ENTITYCLASS_TABLEDATA

        public static final java.lang.String ENTITYCLASS_TABLEDATA
        The constant ENTITYCLASS_TABLEDATA.
        See Also:
        Constant Field Values
      • ENTITYTYPE_CONNECTOR

        public static final java.lang.String ENTITYTYPE_CONNECTOR
        The constant ENTITYTYPE_CONNECTOR.
        See Also:
        Constant Field Values
      • ENTITYTYPE_ASSEMBLING

        public static final java.lang.String ENTITYTYPE_ASSEMBLING
        The constant ENTITYTYPE_ASSEMBLING.
        See Also:
        Constant Field Values
      • ENTITYTYPE_STATIC

        public static final java.lang.String ENTITYTYPE_STATIC
        The constant ENTITYTYPE_STATIC.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Entity

        public Entity()
        Default constructor.

        Creates an entity and initializes the context definitions.

      • Entity

        public Entity​(java.lang.String label)
        Creates an entity with a name and initializes the context definitions.
        Parameters:
        label -
    • Method Detail

      • getLabel

        public java.lang.String getLabel()
        Get the name of the entity.
        Returns:
        label as String
      • setLabel

        public void setLabel​(java.lang.String label)
        Set the name of the entity.

        Throws a NullArgumentException if label is null.

        Parameters:
        label -
      • getIdentifier

        public java.lang.String getIdentifier()
        Get the identifier of the entity.
        Returns:
        identifier as String
      • setIdentifier

        public void setIdentifier​(java.lang.String identifier)
        Set the identifier of the entity.

        Throws a NullArgumentException if identifier is null.

        Parameters:
        identifier -
      • getEntityClass

        public java.lang.String getEntityClass()
        Get the name of the entity data class, e.g. Bucket, Cord, Text, MediaAsset, Price etc.
        Returns:
        name of entityClass as String
      • setEntityClass

        public void setEntityClass​(java.lang.String entityClass)
        Set the class of the entity as a String, e.g. bucket, cord, text, media_asset, price etc.

        When changing the entityClass property, dataClass is also updated, so that both properties reflect the same value.

        Throws a NullArgumentException if argument is null.

        Parameters:
        entityClass -
      • setEntityDataClass

        public void setEntityDataClass​(Entity.DataClass dataClass)

        Sets the dataClass property of this entity

        When changing dataClass, the entityClass property is also updated, so that both fields reflect the same value.

        Parameters:
        dataClass - as Entity.DataClass
      • getEntityType

        public java.lang.String getEntityType()
        Get the entity type. Entity type describes by which way the entity data instances are retrieved:
        connector, evaluate, static.
        Returns:
        entityType as String
      • setEntityType

        public void setEntityType​(java.lang.String entityType)
        Set the entity type. Entity type describes by which way the entity data instances are created:
        connector, evaluate, static.

        Throws a NullArgumentException if argument is null.

        Parameters:
        entityType -
      • getRevisionNumber

        public java.lang.String getRevisionNumber()
        Get revision number. Revision number is automatically generated at check-in time.
        Returns:
        revisionNumber as String
      • setRevisionNumber

        public void setRevisionNumber​(java.lang.String revisionNumber)
        Set revision number. Revision number is automatically generated at check-in time.

        Throws a NullArgumentException if argument is null.

        Parameters:
        revisionNumber -
      • getIcon

        public java.awt.Image getIcon()
        Get an icon as Image
        Returns:
        icon as Image
      • setIcon

        public void setIcon​(java.awt.Image icon)
        Set an icon as Image
        Parameters:
        icon -

        Throws a NullArgumentException if argument is null.

      • getTag

        public java.lang.String getTag()
        Get the tag of the entity.
        Returns:
        tag as String
      • getTags

        public java.util.List<java.lang.String> getTags()
        Get tags of the entity as a list.
        Returns:
        list of tags as List of Strings
      • setTag

        public void setTag​(java.lang.String tag)
        Set the tag of the entity.

        Throws a NullArgumentException if tag is null.

        Parameters:
        tag -
      • getTemplateRule

        public TemplateRule getTemplateRule()
        Get the rule by which templates can be found.
        Returns:
        template as TemplateRule
      • setTemplateRule

        public void setTemplateRule​(TemplateRule templateRule)
        Set the rule by which templates can be found.

        Throws a NullArgumentException if argument is null.

        Parameters:
        templateRule - TemplateRule
      • getDescription

        public java.lang.String getDescription()
        Get the description for the entity.
        Returns:
        description as String
      • setDescription

        public void setDescription​(java.lang.String description)
        Set the description for the entity.

        Throws a NullArgumentException if argument is null.

        Parameters:
        description -
      • getHelpTexts

        public java.util.List<Text> getHelpTexts()
        Get description of the entity for end users.

        Will for example be used in tool tips of client applications.

        This is localized information - there it uses the Text class.

        Returns:
        helpTexts as List of Text
      • setHelpTexts

        public void setHelpTexts​(java.util.List<Text> helpTexts)
        Set description of the entity for end users.

        Will for example be used in tool tips of client applications.

        This is localized information - there it uses the Text class.

        Parameters:
        helpTexts - as List of Text

        Throws a NullArgumentException if argument is null.

      • getEntityModel

        public EntityModel getEntityModel()
        Get the entity model that contains this entity.

        Entities can only belong to one model.

        Returns:
        entityModel as EntityModel
      • setEntityModel

        public void setEntityModel​(EntityModel entityModel)
        Set the entity model of this entity.

        Throws a NullArgumentException if entityModel argument is null.

        Parameters:
        entityModel -
      • getConConnector

        public java.lang.String getConConnector()
        Get the connector name (mappedName of the connector plug-in).
        Returns:
        conConnector as String
      • setConConnector

        public void setConConnector​(java.lang.String conConnector)
        Set the connector name (mappedName of the connector plug-in).

        Throws a NullArgumentException if argument is null.

        Parameters:
        conConnector -
      • getConInstance

        public java.lang.String getConInstance()
        Get the connector instance name - as defined in the connector plug-in configuration.
        Returns:
        conInstance as String
      • setConInstance

        public void setConInstance​(java.lang.String conInstance)
        Set the connector instance name - as defined in the connector plug-in configuration.

        Throws a NullArgumentException if argument is null.

        Parameters:
        conInstance - the connector instance
      • getConConnectorEntity

        public java.lang.String getConConnectorEntity()
        Get the container entity identifier.
        Returns:
        conConnectorEntity
        See Also:
        ConnectorEntity
      • setConConnectorEntity

        public void setConConnectorEntity​(java.lang.String conConnectorEntity)
        Set the container entity identifier.

        Throws a NullArgumentException if argument is null.

        Parameters:
        conConnectorEntity - the con connector entity
        See Also:
        ConnectorEntity
      • isConUseMatchingMethod

        public boolean isConUseMatchingMethod()
        True if connector will use matching method as defined in entity manager.
        Returns:
        true if conUseMatchingMethod
      • setConUseMatchingMethod

        public void setConUseMatchingMethod​(boolean conUseMatchingMethod)
        Sets that connector shall use matching method as defined in entity manager.
        Parameters:
        conUseMatchingMethod -
      • getConMatchingMethod

        public EntityMethodCall getConMatchingMethod()
        Get the Entity Matching Method to use. Matching method has to be defined in Entity Manager.
        Returns:
        conMatchingMethod
        See Also:
        EntityMethodCall
      • setConMatchingMethod

        public void setConMatchingMethod​(EntityMethodCall conMatchingMethod)
        Set the Entity Matching Method to use. Matching method has to be defined in Entity Manager.

        Throws a NullArgumentException if argument is null.

        Parameters:
        conMatchingMethod - EntityMethodCall
      • isConCachingAllowed

        public boolean isConCachingAllowed()
        True if caching is generally allowed for the caching strategy specified.
        Returns:
        conCachingAllowed boolean
        See Also:
        setConCachingStrategy(CacheType)
      • setConCachingAllowed

        public void setConCachingAllowed​(boolean conCachingAllowed)
        Set if caching is generally allowed for the caching strategy specified.
        Parameters:
        conCachingAllowed -
        See Also:
        setConCachingStrategy(CacheType)
      • getConCachingStrategy

        public Entity.CacheType getConCachingStrategy()
        Get current caching strategy for the entity.

        Either lifetime or cronjobdate.

        Returns:
        conCachingStrategy as Entity.CacheType
      • getConLifetime

        public int getConLifetime()
        Get caching lifetime for this entity in seconds. Cache expires after this time and entity will reloaded from content system if requested again.
        Returns:
        conLifetime as int
      • setConLifetime

        public void setConLifetime​(int conLifetime)
        Set caching lifetime for this entity in seconds.

        Throws a NullArgumentException if argument is null.

        Parameters:
        conLifetime -
      • getConCronjobdate

        public java.lang.String getConCronjobdate()
        Controls when cache will be refreshed.
        Returns:
        conCronjobdate Format of the result: 0 min hour ? * days * where: - min (0 - 59) - hour (0 - 23) - days: days of the week separated by comma (MON,TUE,WED...) example: * 0 10 03 ? * MON,TUE,WED
      • setConCronjobdate

        public void setConCronjobdate​(java.lang.String conCronjobdate)
        Controls when cache will be refreshed.

        Throws a NullArgumentException if argument is null.

        Parameters:
        conCronjobdate -
      • getContextDefinitions

        public java.util.List<ContextDefinition> getContextDefinitions()
        Get the context definitions as a list.
        Returns:
        contextDefinitions as List of ContextDefinition
      • setContextDefinitions

        public void setContextDefinitions​(java.util.List<ContextDefinition> contextDefinitions)
        Set the context definitions as a list.

        Throws a NullArgumentException if argument is null.

        Parameters:
        contextDefinitions -
      • isPublicEntity

        public boolean isPublicEntity()
        True if the entity is visible for modules outside of entity manager.
        Returns:
        publicEntity as boolean
      • setPublicEntity

        public void setPublicEntity​(boolean publicEntity)
        Set if the entity is visible for modules outside of entity manager.
        Parameters:
        publicEntity -
      • getConConnectorEntityDescription

        public java.lang.String getConConnectorEntityDescription()
        Get a description for the container entity identifier.
        Returns:
        description as String
      • setConConnectorEntityDescription

        public void setConConnectorEntityDescription​(java.lang.String conConnectorEntityDescription)
        Set a description for the container entity identifier.

        Throws a NullArgumentException if argument is null.

        Parameters:
        conConnectorEntityDescription -
      • getIconName

        public java.lang.String getIconName()
        Get the name of the icon that will be used for graphic representation of the entity.
        Returns:
        name as String
      • setIconName

        public void setIconName​(java.lang.String iconName)
        Set the name of the icon that will be used for graphic representation of the entity.

        Throws a NullArgumentException if argument is null.

        Parameters:
        iconName -
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getPluginConfigName

        protected java.lang.String getPluginConfigName()
        Gets the name of this entity to use in plug-in configuration objects.
        Returns:
        string containing plug-in configuration name
      • getPluginConfigPath

        protected java.lang.String getPluginConfigPath​(java.lang.String entityIdentifier)
        Gets the path of a dependent entity to use in plug-in configuration objects.
        Parameters:
        entityIdentifier -
        Returns:
        the path of a dependent entity as String
      • getPluginConfigPath

        public java.lang.String getPluginConfigPath()
        Gets the path of this entity to use in plug-in configuration objects.
        Returns:
        path of this entity as String
      • toPluginConfig

        public PluginConfig toPluginConfig()
        Creates a plug-in configuration object for this entity with all dependencies.
        Returns:
        PluginConfig
      • getEntityDependencyNames

        public java.util.Set<java.lang.String> getEntityDependencyNames()
        Collects all dependent entities of an entity including content entities, sub-entities and cord entities and returns a set of identifiers.
        Returns:
        set of dependency names
      • getContentMetaDataEntities

        public java.util.List<EntityDependency> getContentMetaDataEntities()
        Gets the dependent content meta data entities for the entity.

        Defaults to an empty list.

        Returns:
        List of EntityDependency
      • setContentMetaDataEntities

        public void setContentMetaDataEntities​(java.util.List<EntityDependency> contentMetaDataEntities)
        Sets the dependent content meta data entities for the entity.

        Throws a NullArgumentException if argument is null.

        Parameters:
        contentMetaDataEntities -