public class MatchingPermission
extends java.lang.Object
implements org.apache.shiro.authz.Permission, java.io.Serializable
WildcardPermission with the following differences:
| Modifier | Constructor and Description |
|---|---|
|
MatchingPermission(java.lang.String... parts) |
|
MatchingPermission(java.lang.String permission) |
protected |
MatchingPermission(java.lang.String permission,
boolean initializePermission) |
| Modifier and Type | Method and Description |
|---|---|
protected ConstantPart |
createConstantPart(java.lang.String value) |
boolean |
equals(java.lang.Object o) |
static java.lang.String |
escape(java.lang.String raw)
Returns a string escaped so it will be interpreted literally by the matcher.
|
static java.lang.String |
escapeSeparators(java.lang.String raw)
Returns a string with only the separators escaped, unlike
escape(String) which also protects
wildcards. |
protected AnyPart |
getAnyPart() |
protected java.util.List<MatchingPart> |
getParts() |
int |
hashCode() |
boolean |
implies(org.apache.shiro.authz.Permission p) |
protected void |
initializePermission()
Parses and initializes the permission's parts.
|
boolean |
isAssignable()
Some permissions fall into one of the following categories:
The permission is intended for validation purposes only, such as for creating a table.
The permission format is deprecated and no new permissions of the format are allowed.
This method returns true if the permission should be assignable to a user/role, false otherwise.
|
protected MatchingPart |
toPart(java.util.List<MatchingPart> leadingParts,
java.lang.String part)
Converts a String part into the corresponding
MatchingPart. |
java.lang.String |
toString() |
static java.lang.String |
unescapeSeparators(java.lang.String escaped)
Returns a string with the modifications made by
escapeSeparators(String) reversed. |
public MatchingPermission(java.lang.String permission)
protected MatchingPermission(java.lang.String permission,
boolean initializePermission)
public MatchingPermission(java.lang.String... parts)
protected void initializePermission()
protected MatchingPart toPart(java.util.List<MatchingPart> leadingParts, java.lang.String part)
MatchingPart.public boolean implies(org.apache.shiro.authz.Permission p)
implies in interface org.apache.shiro.authz.Permissionpublic boolean isAssignable()
public static java.lang.String escape(java.lang.String raw)
public static java.lang.String escapeSeparators(java.lang.String raw)
escape(String) which also protects
wildcards. This is useful for subclasses which have their own formatting that needs to be protected from being split.public static java.lang.String unescapeSeparators(java.lang.String escaped)
escapeSeparators(String) reversed.protected final java.util.List<MatchingPart> getParts()
protected ConstantPart createConstantPart(java.lang.String value)
protected AnyPart getAnyPart()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2018. All Rights Reserved.