Class Util
- java.lang.Object
-
- org.jboss.security.acl.Util
-
public class Util extends Object
Utility class used by the
ACLimplementation.- Author:
- Stefan Guilhen
-
-
Constructor Summary
Constructors Constructor Description Util()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetIdentityAsString(Identity identity)Returns aStringrepresentation of the specified identity.static IdentitygetIdentityFromString(String identityString)Builds and returns an identity from the specifiedStringrepresentation.static StringgetResourceAsString(Resource resource)Returns aStringrepresentation of the specified resource.
-
-
-
Method Detail
-
getResourceAsString
public static String getResourceAsString(Resource resource)
Returns a
Stringrepresentation of the specified resource. The format of this representation is as follows:resource_fqn:resource_id, whereresource_fqnis the fully-qualified name of the resource class, andresource_idis the unique identifier of the resource.- Parameters:
resource- theResourceto be converted.- Returns:
- a
Stringrepresentation of the resource.
-
getIdentityAsString
public static String getIdentityAsString(Identity identity)
Returns a
Stringrepresentation of the specified identity. The format of this representation is as follows:identity_fqn:identity_name, whereidentity_fqnis the fully-qualified name of the identity class, andidentity_nameis aStringrepresenting the name of the identity.- Parameters:
identity- theIdentityto be converted.- Returns:
- a
Stringrepresentation of the identity.
-
getIdentityFromString
public static Identity getIdentityFromString(String identityString)
Builds and returns an identity from the specified
Stringrepresentation. It parses theidentityStringargument, and passes the parsed identity class, and identity name to theIdentityFactoryto retrieve an instance ofIdentity.- Parameters:
identityString- aStringrepresentation of the identity to be created.- Returns:
- the constructed
Identityinstance.
-
-