Class ResourceSeed

java.lang.Object
com.sodius.oslc.server.trs.model.ResourceSeed

public class ResourceSeed extends Object
Encapsulates the minimal information required to build a tracked resource URL.
Since:
1.10.0
  • Method Details

    • of

      public static ResourceSeed of(String id, int type, Optional<String> projectAreaId)
      Constructs an instance from a resource id and type.
      Parameters:
      id - underlying resource id.
      type - underlying resource type (id).
      projectAreaId - underlying, optional, project area (id).
      Returns:
      corresponding instance.
      Since:
      3.3.0
    • getId

      public String getId()
      Gets the underlying id of the resource this seed represents.
      Returns:
      the underlying id of the resource this seed represents.
    • getType

      public int getType()
      Gets the resource type this seed represents.
      Returns:
      the resource type this seed represents.
    • getProjectAreaId

      public Optional<String> getProjectAreaId()
      Get the underlying id of the project area, if any, to which the resource belongs to.
      Returns:
      the optional project area id.
      Since:
      3.3.0
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object