Class 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.String getDescription()
      A description of then connector entity.
      java.lang.String getIdentifier()
      Get the connector entity identifier
      java.lang.String getInstance()
      Instance of the connector to be used for this item.
      java.lang.String getLabel()
      Label of the ConnectorEntity to be used in display, e.g.
      java.lang.String getParentIdentifier()
      Connector identifier of the parent entity.
      static ConnectorEntity newInstance​(java.lang.String instance, java.lang.String identifier, java.lang.String parentIdentifier)
      Create a connector entity with instance, identifier and parentIdentifier.
      void setDescription​(java.lang.String description)  
      void setIdentifier​(java.lang.String identifier)  
      void setInstance​(java.lang.String instance)
      Instance of the connector to be used for this item.
      void setLabel​(java.lang.String label)  
      void setParentIdentifier​(java.lang.String parentIdentifier)
      Connector identifier of the parent entity.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ConnectorEntity

        public ConnectorEntity()
        Default constructor.
      • ConnectorEntity

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

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