Class Util
- java.lang.Object
-
- org.jboss.security.acl.Util
-
public class Util extends Object
Utility class used by the
ACL
implementation.- Author:
- Stefan Guilhen
-
-
Constructor Summary
Constructors Constructor Description Util()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getIdentityAsString(Identity identity)
Returns aString
representation of the specified identity.static Identity
getIdentityFromString(String identityString)
Builds and returns an identity from the specifiedString
representation.static String
getResourceAsString(Resource resource)
Returns aString
representation of the specified resource.
-
-
-
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
, whereresource_fqn
is the fully-qualified name of the resource class, andresource_id
is the unique identifier of the resource.- Parameters:
resource
- theResource
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
, whereidentity_fqn
is the fully-qualified name of the identity class, andidentity_name
is aString
representing the name of the identity.- Parameters:
identity
- theIdentity
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 theidentityString
argument, and passes the parsed identity class, and identity name to theIdentityFactory
to retrieve an instance ofIdentity
.- Parameters:
identityString
- aString
representation of the identity to be created.- Returns:
- the constructed
Identity
instance.
-
-