Class ConnectorEntity
- java.lang.Object
-
- com.priint.pubserver.plugin.entitydata.ConnectorEntity
-
- All Implemented Interfaces:
GetIdentifier,java.io.Serializable
public class ConnectorEntity extends java.lang.Object implements java.io.Serializable, GetIdentifier
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:
ConnectorLocal, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ConnectorEntity()Default constructor.ConnectorEntity(java.lang.String identifier)Create a connector entity with identifier.ConnectorEntity(java.lang.String identifier, java.lang.String label)Create a connector entity with identifier and label.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDescription()A description of then connector entity.java.lang.StringgetIdentifier()Get the connector entity identifierjava.lang.StringgetInstance()Instance of the connector to be used for this item.java.lang.StringgetLabel()Label of the ConnectorEntity to be used in display, e.g.java.lang.StringgetParentIdentifier()Connector identifier of the parent entity.static ConnectorEntitynewInstance(java.lang.String instance, java.lang.String identifier, java.lang.String parentIdentifier)Create a connector entity with instance, identifier and parentIdentifier.voidsetDescription(java.lang.String description)voidsetIdentifier(java.lang.String identifier)voidsetInstance(java.lang.String instance)Instance of the connector to be used for this item.voidsetLabel(java.lang.String label)voidsetParentIdentifier(java.lang.String parentIdentifier)Connector identifier of the parent entity.java.lang.StringtoString()
-
-
-
Constructor Detail
-
ConnectorEntity
public ConnectorEntity()
Default constructor.
-
ConnectorEntity
public ConnectorEntity(java.lang.String identifier)
Create a connector entity with identifier.- Parameters:
identifier- seegetIdentifier()
-
ConnectorEntity
public ConnectorEntity(java.lang.String identifier, java.lang.String label)Create a connector entity with identifier and label.- Parameters:
identifier- seegetIdentifier()label- seegetLabel()
-
-
Method Detail
-
newInstance
public static ConnectorEntity newInstance(java.lang.String instance, java.lang.String identifier, java.lang.String parentIdentifier)
Create a connector entity with instance, identifier and parentIdentifier.- Parameters:
instance-identifier-parentIdentifier-- Returns:
- fabricated ConnectorEntity
-
getIdentifier
public java.lang.String 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
public void setIdentifier(java.lang.String identifier)
- Parameters:
identifier- seegetIdentifier()
-
getLabel
public java.lang.String 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
public void setLabel(java.lang.String label)
- Parameters:
label- seegetLabel()
-
getDescription
public java.lang.String getDescription()
A description of then connector entity.- Returns:
- description or empty string
-
setDescription
public void setDescription(java.lang.String description)
- Parameters:
description- seegetDescription()
-
getInstance
public java.lang.String getInstance()
Instance of the connector to be used for this item.- Returns:
- instance identifier or empty string
-
setInstance
public void setInstance(java.lang.String instance)
Instance of the connector to be used for this item.- Parameters:
instance-
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getParentIdentifier
public java.lang.String 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
public void setParentIdentifier(java.lang.String parentIdentifier)
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
-
-