java.lang.Object
java.security.Permission
io.quarkus.security.StringPermission
- All Implemented Interfaces:
Serializable
,Guard
Represents permission based on simple string comparison.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionStringPermission
(String permissionName, String... actions) Constructs a permission with the specified name and actions. -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
hashCode()
boolean
Checks if this StringPermission object "implies" the specified permission.Methods inherited from class java.security.Permission
checkGuard, getName, newPermissionCollection, toString
-
Field Details
-
ACTIONS_SEPARATOR
- See Also:
-
-
Constructor Details
-
StringPermission
Constructs a permission with the specified name and actions.- Parameters:
permissionName
- must not be null or empty and must not contain commaactions
- optional actions; action itself must not be null or empty and must not contain comma
-
-
Method Details
-
implies
Checks if this StringPermission object "implies" the specified permission.More precisely, this method returns true if:
-
p
is an instance of the StringPermission -
p
's name equals this object's name - compared permissions have no actions, or this object's actions contains at least one of the
p
actions
- Specified by:
implies
in classPermission
- Parameters:
p
- the permission to check against- Returns:
- true if the specified permission is implied by this object
-
-
equals
- Specified by:
equals
in classPermission
-
hashCode
public int hashCode()- Specified by:
hashCode
in classPermission
-
getActions
- Specified by:
getActions
in classPermission
- Returns:
- null if no actions were specified, or actions joined together with the
ACTIONS_SEPARATOR
-