Class Util


  • public class Util
    extends Object

    Utility class used by the ACL implementation.

    Author:
    Stefan Guilhen
    • Constructor Detail

      • Util

        public Util()
    • Method Detail

      • getResourceAsString

        public static String getResourceAsString​(Resource resource)

        Returns a String representation of the specified resource. The format of this representation is as follows: resource_fqn:resource_id, where resource_fqn is the fully-qualified name of the resource class, and resource_id is the unique identifier of the resource.

        Parameters:
        resource - the Resource to be converted.
        Returns:
        a String representation of the resource.
      • getIdentityAsString

        public static String getIdentityAsString​(Identity identity)

        Returns a String representation of the specified identity. The format of this representation is as follows: identity_fqn:identity_name, where identity_fqn is the fully-qualified name of the identity class, and identity_name is a String representing the name of the identity.

        Parameters:
        identity - the Identity to be converted.
        Returns:
        a String representation of the identity.
      • getIdentityFromString

        public static Identity getIdentityFromString​(String identityString)

        Builds and returns an identity from the specified String representation. It parses the identityString argument, and passes the parsed identity class, and identity name to the IdentityFactory to retrieve an instance of Identity.

        Parameters:
        identityString - a String representation of the identity to be created.
        Returns:
        the constructed Identity instance.