Class 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 Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • 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 by toString().
        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()