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 TypeMethodDescriptionbooleaninthashCode()booleanChecks 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:
-
pis 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
pactions
- Specified by:
impliesin classPermission- Parameters:
p- the permission to check against- Returns:
- true if the specified permission is implied by this object
-
-
equals
- Specified by:
equalsin classPermission
-
hashCode
public int hashCode()- Specified by:
hashCodein classPermission
-
getActions
- Specified by:
getActionsin classPermission- Returns:
- null if no actions were specified, or actions joined together with the
ACTIONS_SEPARATOR
-