Package com.sodius.oslc.server.trs.model
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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String
getId()
Gets the underlying id of the resource this seed represents.Optional<String>
getProjectAreaId()
Get the underlying id of the project area, if any, to which the resource belongs to.int
getType()
Gets the resource type this seed represents.int
hashCode()
static ResourceSeed
of(String id, int type, Optional<String> projectAreaId)
Constructs an instance from a resource id and type.String
toString()
-
-
-
Method Detail
-
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
-
-