Class ConnectorEntity
- All Implemented Interfaces:
GetIdentifier,Serializable
Representation of a connector entity
Used to map between entity model and data structure in the content system. Connector entities are specific for different content systems and possibly for different instances of the same content system.
The identifier of a connector entity represents something like a "location" or "access rule" for data in the content system.
- Since:
- 4.0.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.ConnectorEntity(String identifier) Create a connector entity with identifier.ConnectorEntity(String identifier, String label) Create a connector entity with identifier and label. -
Method Summary
Modifier and TypeMethodDescriptionA description of then connector entity.Get the connector entity identifierInstance of the connector to be used for this item.getLabel()Label of the ConnectorEntity to be used in display, e.g.Connector identifier of the parent entity.static ConnectorEntitynewInstance(String instance, String identifier, String parentIdentifier) Create a connector entity with instance, identifier and parentIdentifier.voidsetDescription(String description) voidsetIdentifier(String identifier) voidsetInstance(String instance) Instance of the connector to be used for this item.voidvoidsetParentIdentifier(String parentIdentifier) Connector identifier of the parent entity.toString()
-
Constructor Details
-
ConnectorEntity
public ConnectorEntity()Default constructor. -
ConnectorEntity
Create a connector entity with identifier.- Parameters:
identifier- seegetIdentifier()
-
ConnectorEntity
Create a connector entity with identifier and label.- Parameters:
identifier- seegetIdentifier()label- seegetLabel()
-
-
Method Details
-
newInstance
public static ConnectorEntity newInstance(String instance, String identifier, String parentIdentifier) Create a connector entity with instance, identifier and parentIdentifier.- Parameters:
instance-identifier-parentIdentifier-- Returns:
- fabricated ConnectorEntity
-
getIdentifier
Get the connector entity identifierThis is a string identifier as used in the connector for content system.
Example
A connector to a simple content system implemented via a relational database may have one database table "items" for " products" and "articles", where the string field "item_type" differentiates products from articles. The connector entity identifier for an article may by constructed as 'items#article'. The string will be processed within the connector to generate a SQL statement like
"SELECT field1, field2 FROM items WHERE item_type='article'".The semantics of the string and how the identifier is processed is left to the content system.
- Specified by:
getIdentifierin interfaceGetIdentifier- Returns:
- string identifier
-
setIdentifier
- Parameters:
identifier- seegetIdentifier()
-
getLabel
Label of the ConnectorEntity to be used in display, e.g. in ison.As a convention GUIs may interpret a slash within the label to generate a hierarchical view of the connector entity name.
E.g. in 'items/article'.
- Returns:
- connector entity label
-
setLabel
- Parameters:
label- seegetLabel()
-
getDescription
A description of then connector entity.- Returns:
- description or empty string
-
setDescription
- Parameters:
description- seegetDescription()
-
getInstance
Instance of the connector to be used for this item.- Returns:
- instance identifier or empty string
-
setInstance
Instance of the connector to be used for this item.- Parameters:
instance-
-
toString
-
getParentIdentifier
Connector identifier of the parent entity.Note: The parent may be bound to another connector than the current one.
- Returns:
- parentIdentifier or empty string
- Since:
- 4.1.6
-
setParentIdentifier
Connector identifier of the parent entity.Note: The parent may be bound to another connector than the current one.
- Parameters:
parentIdentifier-- Since:
- 4.1.6
-