Class Entity
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
EntityBucket,EntityContentMetaData,EntityCord,EntityKeyValue,EntityMediaAsset,EntityPlanning,EntityPrice,EntityTableData,EntityText
Entity of the Entity Model (base class)
All entity class are derived from this base class.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDeprecated.static enumType of cache to be used for this entity.static enumList of possible entity data class.static enumCreation or retrieval type for data entities related to a model entity. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PluginConfigTag[]Type of Tags to be used for this entities.static final StringThe constant ENTITYCLASS_BUCKET.static final StringThe constant ENTITYCLASS_CONTENTMETADATA.static final StringThe constant ENTITYCLASS_CORD.static final StringThe constant ENTITYCLASS_KEYVALUE.static final StringThe constant ENTITYCLASS_MEDIAASSET.static final StringThe constant ENTITYCLASS_PLANNING.static final StringThe constant ENTITYCLASS_PRICE.static final StringThe constant ENTITYCLASS_TABLEDATA.static final StringThe constant ENTITYCLASS_TEXT.static final StringThe constant ENTITYTYPE_ASSEMBLING.static final StringThe constant ENTITYTYPE_CONNECTOR.static final StringThe constant ENTITYTYPE_STATIC. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet current caching strategy for the entity.Get the connector name (mappedName of the connector plug-in).Get the container entity identifier.Get a description for the container entity identifier.Controls when cache will be refreshed.Get the connector instance name - as defined in the connector plug-in configuration.intGet caching lifetime for this entity in seconds.Get the Entity Matching Method to use.Gets the dependent content meta data entities for the entity.Get the context definitions as a list.Get the description for the entity.Get the name of the entity data class, e.g.Gets the data class of this entityCollects all dependent entities of an entity including content entities, sub-entities and cord entities and returns a set of identifiers.Get the entity model that contains this entity.Get the entity type.Get description of the entity for end users.getIcon()Get an icon asImageGet the name of the icon that will be used for graphic representation of the entity.Get the identifier of the entity.getLabel()Get the name of the entity.protected StringGets the name of this entity to use in plug-in configuration objects.Gets the path of this entity to use in plug-in configuration objects.protected StringgetPluginConfigPath(String entityIdentifier) Gets the path of a dependent entity to use in plug-in configuration objects.Get revision number.getTag()Get the tag of the entity.getTags()Get tags of the entity as a list.Get the rule by which templates can be found.booleanTrue if caching is generally allowed for the caching strategy specified.booleanTrue if connector will use matching method as defined in entity manager.booleanTrue 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(String conConnector) Set the connector name (mappedName of the connector plug-in).voidsetConConnectorEntity(String conConnectorEntity) Set the container entity identifier.voidsetConConnectorEntityDescription(String conConnectorEntityDescription) Set a description for the container entity identifier.voidsetConCronjobdate(String conCronjobdate) Controls when cache will be refreshed.voidsetConInstance(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(List<EntityDependency> contentMetaDataEntities) Sets the dependent content meta data entities for the entity.voidsetContextDefinitions(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(String description) Set the description for the entity.voidsetEntityClass(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(String entityType) Set the entity type.voidsetHelpTexts(List<Text> helpTexts) Set description of the entity for end users.voidSet an icon asImagevoidsetIconName(String iconName) Set the name of the icon that will be used for graphic representation of the entity.voidsetIdentifier(String identifier) Set the identifier of the entity.voidSet the name of the entity.voidsetPublicEntity(boolean publicEntity) Set if the entity is visible for modules outside of entity manager.voidsetRevisionNumber(String revisionNumber) Set revision number.voidSet the tag of the entity.voidsetTemplateRule(TemplateRule templateRule) Set the rule by which templates can be found.Creates a plug-in configuration object for this entity with all dependencies.toString()
-
Field Details
-
allowedTags
Type of Tags to be used for this entities. For all tags see:PluginConfigTag -
ENTITYCLASS_BUCKET
The constant ENTITYCLASS_BUCKET.- See Also:
-
ENTITYCLASS_TEXT
The constant ENTITYCLASS_TEXT.- See Also:
-
ENTITYCLASS_MEDIAASSET
The constant ENTITYCLASS_MEDIAASSET.- See Also:
-
ENTITYCLASS_KEYVALUE
The constant ENTITYCLASS_KEYVALUE.- See Also:
-
ENTITYCLASS_CORD
The constant ENTITYCLASS_CORD.- See Also:
-
ENTITYCLASS_PRICE
The constant ENTITYCLASS_PRICE.- See Also:
-
ENTITYCLASS_PLANNING
The constant ENTITYCLASS_PLANNING.- See Also:
-
ENTITYCLASS_CONTENTMETADATA
The constant ENTITYCLASS_CONTENTMETADATA.- See Also:
-
ENTITYCLASS_TABLEDATA
The constant ENTITYCLASS_TABLEDATA.- See Also:
-
ENTITYTYPE_CONNECTOR
The constant ENTITYTYPE_CONNECTOR.- See Also:
-
ENTITYTYPE_ASSEMBLING
The constant ENTITYTYPE_ASSEMBLING.- See Also:
-
ENTITYTYPE_STATIC
The constant ENTITYTYPE_STATIC.- See Also:
-
-
Constructor Details
-
Entity
public Entity()Default constructor.Creates an entity and initializes the context definitions.
-
Entity
Creates an entity with a name and initializes the context definitions.- Parameters:
label-
-
-
Method Details
-
getLabel
Get the name of the entity.- Returns:
- label as String
-
setLabel
Set the name of the entity.Throws a NullArgumentException if label is
null.- Parameters:
label-
-
getIdentifier
Get the identifier of the entity.- Returns:
- identifier as String
-
setIdentifier
Set the identifier of the entity.Throws a NullArgumentException if identifier is
null.- Parameters:
identifier-
-
getEntityClass
Get the name of the entity data class, e.g. Bucket, Cord, Text, MediaAsset, Price etc.- Returns:
- name of entityClass as String
-
setEntityClass
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
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
Gets the data class of this entity
- Returns:
- dataClass as
Entity.DataClass
-
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
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
Get revision number. Revision number is automatically generated at check-in time.- Returns:
- revisionNumber as String
-
setRevisionNumber
Set revision number. Revision number is automatically generated at check-in time.Throws a NullArgumentException if argument is
null.- Parameters:
revisionNumber-
-
getIcon
Get an icon asImage- Returns:
- icon as
Image
-
setIcon
Set an icon asImage- Parameters:
icon-Throws a NullArgumentException if argument is
null.
-
getTag
Get the tag of the entity.- Returns:
- tag as String
-
getTags
Get tags of the entity as a list.- Returns:
- list of tags as List of Strings
-
setTag
Set the tag of the entity.Throws a NullArgumentException if tag is
null.- Parameters:
tag-
-
getTemplateRule
Get the rule by which templates can be found.- Returns:
- template as
TemplateRule
-
setTemplateRule
Set the rule by which templates can be found.Throws a NullArgumentException if argument is
null.- Parameters:
templateRule-TemplateRule
-
getDescription
Get the description for the entity.- Returns:
- description as String
-
setDescription
Set the description for the entity.Throws a NullArgumentException if argument is
null.- Parameters:
description-
-
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
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
Get the entity model that contains this entity.Entities can only belong to one model.
- Returns:
- entityModel as
EntityModel
-
setEntityModel
Set the entity model of this entity.Throws a NullArgumentException if entityModel argument is
null.- Parameters:
entityModel-
-
getConConnector
Get the connector name (mappedName of the connector plug-in).- Returns:
- conConnector as String
-
setConConnector
Set the connector name (mappedName of the connector plug-in).Throws a NullArgumentException if argument is
null.- Parameters:
conConnector-
-
getConInstance
Get the connector instance name - as defined in the connector plug-in configuration.- Returns:
- conInstance as String
-
setConInstance
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
Get the container entity identifier.- Returns:
- conConnectorEntity
- See Also:
-
setConConnectorEntity
Set the container entity identifier.Throws a NullArgumentException if argument is
null.- Parameters:
conConnectorEntity- the con connector entity- See Also:
-
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
Get the Entity Matching Method to use. Matching method has to be defined in Entity Manager.- Returns:
- conMatchingMethod
- See Also:
-
setConMatchingMethod
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:
-
setConCachingAllowed
public void setConCachingAllowed(boolean conCachingAllowed) Set if caching is generally allowed for the caching strategy specified.- Parameters:
conCachingAllowed-- See Also:
-
getConCachingStrategy
Get current caching strategy for the entity.Either lifetime or cronjobdate.
- Returns:
- conCachingStrategy as
Entity.CacheType
-
setConCachingStrategy
Sets the caching strategy for the entity- Parameters:
conCachingStrategy- the con caching strategy- See Also:
-
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
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
Controls when cache will be refreshed.Throws a NullArgumentException if argument is
null.- Parameters:
conCronjobdate-
-
getContextDefinitions
Get the context definitions as a list.- Returns:
- contextDefinitions as List of
ContextDefinition
-
setContextDefinitions
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
Get a description for the container entity identifier.- Returns:
- description as String
-
setConConnectorEntityDescription
Set a description for the container entity identifier.Throws a NullArgumentException if argument is
null.- Parameters:
conConnectorEntityDescription-
-
getIconName
Get the name of the icon that will be used for graphic representation of the entity.- Returns:
- name as String
-
setIconName
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
-
getPluginConfigName
Gets the name of this entity to use in plug-in configuration objects.- Returns:
- string containing plug-in configuration name
-
getPluginConfigPath
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
Gets the path of this entity to use in plug-in configuration objects.- Returns:
- path of this entity as String
-
toPluginConfig
Creates a plug-in configuration object for this entity with all dependencies.- Returns:
PluginConfig
-
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
Gets the dependent content meta data entities for the entity.Defaults to an empty list.
- Returns:
- List of
EntityDependency
-
setContentMetaDataEntities
Sets the dependent content meta data entities for the entity.Throws a NullArgumentException if argument is
null.- Parameters:
contentMetaDataEntities-
-
allowedTagsinstead.