Package com.jgcomptech.tools.authz
Class SimpleAuthorizationInfo
- java.lang.Object
-
- com.jgcomptech.tools.authz.SimpleAuthorizationInfo
-
- All Implemented Interfaces:
AuthorizationInfo,java.io.Serializable
public class SimpleAuthorizationInfo extends java.lang.Object implements AuthorizationInfo
A simple implementation of the AuthorizationInfo interface that stores roles and permissions as internal attributes.- Since:
- 1.5.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SimpleAuthorizationInfo()Default no-argument constructor.SimpleAuthorizationInfo(java.util.Set<java.lang.String> roles)Creates a new instance with the specified roles and no permissions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.util.Set<java.lang.String>getRoles()Returns all assigned roles.inthashCode()java.lang.StringtoString()
-
-
-
Constructor Detail
-
SimpleAuthorizationInfo
public SimpleAuthorizationInfo()
Default no-argument constructor.
-
SimpleAuthorizationInfo
public SimpleAuthorizationInfo(java.util.Set<java.lang.String> roles)
Creates a new instance with the specified roles and no permissions.- Parameters:
roles- the roles assigned to the realm account
-
-
Method Detail
-
getRoles
public java.util.Set<java.lang.String> getRoles()
Returns all assigned roles.- Specified by:
getRolesin interfaceAuthorizationInfo- Returns:
- all assigned roles
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-