Class Entity
- java.lang.Object
-
- com.priint.pubserver.entity.Entity
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
EntityBucket,EntityContentMetaData,EntityCord,EntityKeyValue,EntityMediaAsset,EntityPlanning,EntityPrice,EntityTableData,EntityText
public class Entity extends java.lang.Object implements java.io.SerializableEntity of the Entity Model (base class)
All entity class are derived from this base class.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEntity.AllowedTagsDeprecated.Use arrayallowedTagsinstead.static classEntity.CacheTypeType of cache to be used for this entity.static classEntity.DataClassList of possible entity data class.static classEntity.RetrievalTypeCreation or retrieval type for data entities related to a model entity.
-
Field Summary
Fields Modifier and Type Field Description static PluginConfigTag[]allowedTagsType of Tags to be used for this entities.static java.lang.StringENTITYCLASS_BUCKETThe constant ENTITYCLASS_BUCKET.static java.lang.StringENTITYCLASS_CONTENTMETADATAThe constant ENTITYCLASS_CONTENTMETADATA.static java.lang.StringENTITYCLASS_CORDThe constant ENTITYCLASS_CORD.static java.lang.StringENTITYCLASS_KEYVALUEThe constant ENTITYCLASS_KEYVALUE.static java.lang.StringENTITYCLASS_MEDIAASSETThe constant ENTITYCLASS_MEDIAASSET.static java.lang.StringENTITYCLASS_PLANNINGThe constant ENTITYCLASS_PLANNING.static java.lang.StringENTITYCLASS_PRICEThe constant ENTITYCLASS_PRICE.static java.lang.StringENTITYCLASS_TABLEDATAThe constant ENTITYCLASS_TABLEDATA.static java.lang.StringENTITYCLASS_TEXTThe constant ENTITYCLASS_TEXT.static java.lang.StringENTITYTYPE_ASSEMBLINGThe constant ENTITYTYPE_ASSEMBLING.static java.lang.StringENTITYTYPE_CONNECTORThe constant ENTITYTYPE_CONNECTOR.static java.lang.StringENTITYTYPE_STATICThe constant ENTITYTYPE_STATIC.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Entity.CacheTypegetConCachingStrategy()Get current caching strategy for the entity.java.lang.StringgetConConnector()Get the connector name (mappedName of the connector plug-in).java.lang.StringgetConConnectorEntity()Get the container entity identifier.java.lang.StringgetConConnectorEntityDescription()Get a description for the container entity identifier.java.lang.StringgetConCronjobdate()Controls when cache will be refreshed.java.lang.StringgetConInstance()Get the connector instance name - as defined in the connector plug-in configuration.intgetConLifetime()Get caching lifetime for this entity in seconds.EntityMethodCallgetConMatchingMethod()Get the Entity Matching Method to use.java.util.List<EntityDependency>getContentMetaDataEntities()Gets the dependent content meta data entities for the entity.java.util.List<ContextDefinition>getContextDefinitions()Get the context definitions as a list.java.lang.StringgetDescription()Get the description for the entity.java.lang.StringgetEntityClass()Get the name of the entity data class, e.g.Entity.DataClassgetEntityDataClass()Gets the data class of this entityjava.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.EntityModelgetEntityModel()Get the entity model that contains this entity.java.lang.StringgetEntityType()Get the entity type.java.util.List<Text>getHelpTexts()Get description of the entity for end users.java.awt.ImagegetIcon()Get an icon asImagejava.lang.StringgetIconName()Get the name of the icon that will be used for graphic representation of the entity.java.lang.StringgetIdentifier()Get the identifier of the entity.java.lang.StringgetLabel()Get the name of the entity.protected java.lang.StringgetPluginConfigName()Gets the name of this entity to use in plug-in configuration objects.java.lang.StringgetPluginConfigPath()Gets the path of this entity to use in plug-in configuration objects.protected java.lang.StringgetPluginConfigPath(java.lang.String entityIdentifier)Gets the path of a dependent entity to use in plug-in configuration objects.java.lang.StringgetRevisionNumber()Get revision number.java.lang.StringgetTag()Get the tag of the entity.java.util.List<java.lang.String>getTags()Get tags of the entity as a list.TemplateRulegetTemplateRule()Get the rule by which templates can be found.booleanisConCachingAllowed()True if caching is generally allowed for the caching strategy specified.booleanisConUseMatchingMethod()True if connector will use matching method as defined in entity manager.booleanisPublicEntity()True if the entity is visible for modules outside of entity manager.voidsetConCachingAllowed(boolean conCachingAllowed)Set if caching is generally allowed for the caching strategy specified.voidsetConCachingStrategy(Entity.CacheType conCachingStrategy)Sets the caching strategy for the entityvoidsetConConnector(java.lang.String conConnector)Set the connector name (mappedName of the connector plug-in).voidsetConConnectorEntity(java.lang.String conConnectorEntity)Set the container entity identifier.voidsetConConnectorEntityDescription(java.lang.String conConnectorEntityDescription)Set a description for the container entity identifier.voidsetConCronjobdate(java.lang.String conCronjobdate)Controls when cache will be refreshed.voidsetConInstance(java.lang.String conInstance)Set the connector instance name - as defined in the connector plug-in configuration.voidsetConLifetime(int conLifetime)Set caching lifetime for this entity in seconds.voidsetConMatchingMethod(EntityMethodCall conMatchingMethod)Set the Entity Matching Method to use.voidsetContentMetaDataEntities(java.util.List<EntityDependency> contentMetaDataEntities)Sets the dependent content meta data entities for the entity.voidsetContextDefinitions(java.util.List<ContextDefinition> contextDefinitions)Set the context definitions as a list.voidsetConUseMatchingMethod(boolean conUseMatchingMethod)Sets that connector shall use matching method as defined in entity manager.voidsetDescription(java.lang.String description)Set the description for the entity.voidsetEntityClass(java.lang.String entityClass)Set the class of the entity as a String, e.g.voidsetEntityDataClass(Entity.DataClass dataClass)Sets the dataClass property of this entityvoidsetEntityModel(EntityModel entityModel)Set the entity model of this entity.voidsetEntityType(java.lang.String entityType)Set the entity type.voidsetHelpTexts(java.util.List<Text> helpTexts)Set description of the entity for end users.voidsetIcon(java.awt.Image icon)Set an icon asImagevoidsetIconName(java.lang.String iconName)Set the name of the icon that will be used for graphic representation of the entity.voidsetIdentifier(java.lang.String identifier)Set the identifier of the entity.voidsetLabel(java.lang.String label)Set the name of the entity.voidsetPublicEntity(boolean publicEntity)Set if the entity is visible for modules outside of entity manager.voidsetRevisionNumber(java.lang.String revisionNumber)Set revision number.voidsetTag(java.lang.String tag)Set the tag of the entity.voidsetTemplateRule(TemplateRule templateRule)Set the rule by which templates can be found.PluginConfigtoPluginConfig()Creates a plug-in configuration object for this entity with all dependencies.java.lang.StringtoString()
-
-
-
Field Detail
-
allowedTags
public static final PluginConfigTag[] allowedTags
Type of Tags to be used for this entities. For all tags see:PluginConfigTag
-
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
-
-
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- asEntity.DataClass
-
getEntityDataClass
public Entity.DataClass getEntityDataClass()
Gets the data class of this entity
- Returns:
- 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 asImage- Returns:
- icon as
Image
-
setIcon
public void setIcon(java.awt.Image icon)
Set an icon asImage- 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 ofTextThrows 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
-
setConCachingStrategy
public void setConCachingStrategy(Entity.CacheType conCachingStrategy)
Sets the caching strategy for the entity- Parameters:
conCachingStrategy- the con caching strategy- See Also:
Throws a NullArgumentException if argument is null.
-
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:
toStringin classjava.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-
-
-