Class ConnectorEntity

java.lang.Object
com.priint.pubserver.plugin.entitydata.ConnectorEntity
All Implemented Interfaces:
GetIdentifier, Serializable

public class ConnectorEntity extends Object implements 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:
  • Constructor Details

    • ConnectorEntity

      public ConnectorEntity()
      Default constructor.
    • ConnectorEntity

      public ConnectorEntity(String identifier)
      Create a connector entity with identifier.
      Parameters:
      identifier - see getIdentifier()
    • ConnectorEntity

      public ConnectorEntity(String identifier, String label)
      Create a connector entity with identifier and label.
      Parameters:
      identifier - see getIdentifier()
      label - see getLabel()
  • 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

      public String getIdentifier()
      Get the connector entity identifier

      This 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:
      getIdentifier in interface GetIdentifier
      Returns:
      string identifier
    • setIdentifier

      public void setIdentifier(String identifier)
      Parameters:
      identifier - see getIdentifier()
    • getLabel

      public 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(String label)
      Parameters:
      label - see getLabel()
    • getDescription

      public String getDescription()
      A description of then connector entity.
      Returns:
      description or empty string
    • setDescription

      public void setDescription(String description)
      Parameters:
      description - see getDescription()
    • getInstance

      public String getInstance()
      Instance of the connector to be used for this item.
      Returns:
      instance identifier or empty string
    • setInstance

      public void setInstance(String instance)
      Instance of the connector to be used for this item.
      Parameters:
      instance -
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getParentIdentifier

      public 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(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