Interface IObjectId

All Known Implementing Classes:
ObjectId

public interface IObjectId
Object identification (object id). May be converted to and from SubterraURI by IObjectResolver. Sole implementation of this interface is ObjectId.

Object id consists of (optional) context id and local id. Object id with context id is called cross-context id, without it is called context-less id.

Object id can be represented as "normalized" string with exact format: context-less id is normalized local id, cross-context id is normalized context id, dollar sign ('$') and normalized local id. Additionally it can be represented as "prototype-less" normalized string where local id is in prototype-less normalized string form.

Implementations of this class must be immutable.

Author:
Stepan Roh, Polarion Software
  • Field Details

    • CONTEXT_DELIM

      static final String CONTEXT_DELIM
      Delimiter between context id and local id in normalized string representation.
      See Also:
    • CONTEXT_DELIM_CHAR

      static final char CONTEXT_DELIM_CHAR
      Delimiter between context id and local id in normalized string representation.
      See Also:
  • Method Details

    • getContextId

      IContextId getContextId()
      Context id (if any).
      Returns:
      context id or null
    • getLocalId

      ILocalId getLocalId()
      Local id.
      Returns:
      local id
    • removeContextId

      IObjectId removeContextId()
      Remove context id (if any) from this object id and return new object id.
      Returns:
      new context-less object id
    • removeRevision

      @NotNull IObjectId removeRevision()
      Remove revision (if any) from this object id's local id and return new object id.
      Returns:
      new object id with revision removed from its local id
      Since:
      3.10.2
    • setContextId

      IObjectId setContextId(IContextId contextId)
      Set context id of this object id and return new object id.
      Parameters:
      contextId - context id
      Returns:
      new cross-context object id
      Throws:
      IllegalArgumentException - if contextId is null
    • setLocalId

      IObjectId setLocalId(ILocalId localId)
      Set local id of this object id and return new object id
      Parameters:
      localId - local id
      Returns:
      new object id
      Throws:
      IllegalArgumentException - if localId is null
    • toNormalizedString

      String toNormalizedString()
      Return normalized string representation of this object id.
      Returns:
      normalized string
    • toPrototypeLessNormalizedString

      String toPrototypeLessNormalizedString()
      Return prototype-less normalized string representation of this object id.
      Returns:
      normalized string