Package de.xima.fc.asset.mgmt.impex
Class AssetScope
- java.lang.Object
-
- de.xima.fc.asset.mgmt.impex.AssetScope
-
- All Implemented Interfaces:
Serializable
public class AssetScope extends Object implements Serializable
The scope to which a resource can be assigned, consisting of the kind of scope and its ID within that kind.- Since:
- 8.6.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)longgetId()AssetScopeKindgetKind()inthashCode()Longid()Gets the ID of the scope.AssetScopeKindkind()Gets the kind of the scope, e.g.static AssetScopeofProject(Long projectId)Creates a new scope instance for the project scope.static AssetScopeofTenant(Long tenantId)Creates a new scope instance for the tenant scope.StringtoString()static AssetScopevalueOf(String value)Parses a string representation of a resource scope, as produced bytoString().
-
-
-
Method Detail
-
id
public Long id()
Gets the ID of the scope.- Returns:
- The scope ID.
-
kind
public AssetScopeKind kind()
Gets the kind of the scope, e.g. SYSTEM or TENANT.- Returns:
- The scope kind.
-
ofTenant
public static AssetScope ofTenant(Long tenantId)
Creates a new scope instance for the tenant scope.- Parameters:
tenantId- The ID of the tenant scope.- Returns:
- The resource scope.
-
ofProject
public static AssetScope ofProject(Long projectId)
Creates a new scope instance for the project scope.- Parameters:
projectId- The ID of the project scope.- Returns:
- The resource scope.
-
valueOf
public static AssetScope valueOf(String value)
Parses a string representation of a resource scope, as produced bytoString().- Parameters:
value- The string representation of the resource scope.- Returns:
- The parsed resource scope.
- Throws:
IllegalArgumentException- If the string is not a valid resource scope representation.
-
getId
public long getId()
-
getKind
public AssetScopeKind getKind()
-
-