Class ItemPath

java.lang.Object
org.cristalise.kernel.lookup.Path
org.cristalise.kernel.lookup.ItemPath
All Implemented Interfaces:
C2KLocalObject
Direct Known Subclasses:
AgentPath

@Immutable public class ItemPath extends Path
Extends Path to enforce SystemKey structure and support UUID form
  • Constructor Details

  • Method Details

    • setPath

      public void setPath(String[] path)
      Description copied from class: Path
      String array path e.g. { "Product", "Crystal", "Barrel", "2L", "331013013348" }. The root node name (i.e. entity, domain or role) is removed from the beginning.
      Overrides:
      setPath in class Path
    • setPath

      public void setPath(String path)
      Overrides:
      setPath in class Path
    • setPath

      public void setPath(Path path)
      Description copied from class: Path
      clones the path object
      Overrides:
      setPath in class Path
    • getRoot

      public String getRoot()
      The root of ItemPath is /entity
      Specified by:
      getRoot in class Path
      Returns:
      root as it is defined as 'domain', 'entity' or 'role' in subclasses
    • getItemPath

      public ItemPath getItemPath(TransactionKey transactionKey) throws ObjectNotFoundException
      Overrides:
      getItemPath in class Path
      Throws:
      ObjectNotFoundException
    • getOID

      public byte[] getOID()
    • setSysKey

      protected void setSysKey(UUID uuid)
    • getUUID

      public UUID getUUID()
      Overrides:
      getUUID in class Path
    • getName

      public String getName()
      Returns the UUID in String form
      Returns:
      name of the C2KLocalObject
    • getClusterPath

      public String getClusterPath()
      Description copied from interface: C2KLocalObject
      Each C2KLocalObject is stored with a path identifier starting with the ClusterType:
      • DomainPath: /Path/Domain/Name
      • ItemPath: /Path/Item
      • AgentPath: /Path/Agent
      • RolePath: /Path/Role/Name
      • Properties: /Property/Name
      • Workflow: /LifeCycle/workflow
      • Collections: /Collection/Name/Version (default Name='last')
      • Outcomes: /Outcome/SchemaName/SchemaVersion/EventID
      • Viewpoints: /ViewPoint/SchemaName/Name (default Name='last')
      • Events: /AuditTrail/EventID
      • Jobs: /Job/JobID
      Returns:
      The path identifier (i.e. primary key) of the object
    • isUUID

      public static boolean isUUID(String entityKey)
      Check if the given string contains a UUID. Remove the cristal-ise specific '/entity/' prefix if present
      Parameters:
      entityKey - the entity key of an Item, can contain the '/entity/' prefix
      Returns:
      whether the entytyKey is a UUID or not
    • getItemName

      public String getItemName()
    • getItemName

      public String getItemName(TransactionKey transactionKey)
    • getProxy

      public ItemProxy getProxy() throws ObjectNotFoundException
      Throws:
      ObjectNotFoundException
    • getProxy

      public ItemProxy getProxy(TransactionKey transactionKey) throws ObjectNotFoundException
      Throws:
      ObjectNotFoundException