Package org.wildfly.security.permission
Class PermissionActions
- java.lang.Object
-
- org.wildfly.security.permission.PermissionActions
-
@Deprecated public final class PermissionActions extends Object
Deprecated.Use one of the abstract permission classes likeAbstractActionSetPermission
instead.A helper class for defining permissions which use a finite list of actions. Define custom permissions using anenum
of actions, where the string representation (viatoString()
) of each enum is one possible action name. Typically theenum
should be non-public, and the constant names should be lowercase. If an action name contains a character which is not a valid Java identifier, then thetoString()
method of such constants should be overridden to report the correct string. The actions may be stored on the permission as anEnumSet
, anint
, or along
. The field should be markedtransient
, and the actions represented by a (possibly synthetic) field of typeString
which uses the canonical representation of the actions.- Author:
- David M. Lloyd
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
PermissionActions.Info<E>
Deprecated.(package private) static class
PermissionActions.IntMatchAction<E extends Enum<E>>
Deprecated.(package private) static class
PermissionActions.LongMatchAction<E extends Enum<E>>
Deprecated.(package private) static interface
PermissionActions.MatchAction<E extends Enum<E>>
Deprecated.(package private) static class
PermissionActions.SetMatchAction<E extends Enum<E>>
Deprecated.(package private) static class
PermissionActions.TrieNode<E>
Deprecated.
-
Field Summary
Fields Modifier and Type Field Description private static ClassValue<PermissionActions.Info<?>>
storedInfo
Deprecated.
-
Constructor Summary
Constructors Modifier Constructor Description private
PermissionActions()
Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description private static <E extends Enum<E>>
voiddoParse(Class<E> actionType, String actionString, PermissionActions.MatchAction<E> matchAction)
Deprecated.static <E extends Enum<E>>
StringgetCanonicalActionString(Class<E> type, int set)
Deprecated.Get the canonical action string representation for the given action set.static <E extends Enum<E>>
voidgetCanonicalActionString(Class<E> type, int set, StringBuilder b)
Deprecated.Get the canonical action string representation for the given action set, appending it to the given string builder.static <E extends Enum<E>>
StringgetCanonicalActionString(Class<E> type, long set)
Deprecated.Get the canonical action string representation for the given action set.static <E extends Enum<E>>
voidgetCanonicalActionString(Class<E> type, long set, StringBuilder b)
Deprecated.Get the canonical action string representation for the given action set, appending it to the given string builder.static <E extends Enum<E>>
StringgetCanonicalActionString(EnumSet<E> set)
Deprecated.Get the canonical action string representation for the given action set.static <E extends Enum<E>>
voidgetCanonicalActionString(EnumSet<E> set, StringBuilder b)
Deprecated.Get the canonical action string representation for the given action set, appending it to the given string builder.static <E extends Enum<E>>
intparseActionStringToInt(Class<E> actionType, String actionString)
Deprecated.Parse an action string using the given action type to anint
.static <E extends Enum<E>>
longparseActionStringToLong(Class<E> actionType, String actionString)
Deprecated.Parse an action string using the given action type to along
.static <E extends Enum<E>>
EnumSet<E>parseActionStringToSet(Class<E> actionType, String actionString)
Deprecated.Parse an action string using the given action type to anEnumSet
.
-
-
-
Field Detail
-
storedInfo
private static final ClassValue<PermissionActions.Info<?>> storedInfo
Deprecated.
-
-
Method Detail
-
parseActionStringToSet
public static <E extends Enum<E>> EnumSet<E> parseActionStringToSet(Class<E> actionType, String actionString) throws IllegalArgumentException
Deprecated.Parse an action string using the given action type to anEnumSet
.- Type Parameters:
E
- the actionenum
type- Parameters:
actionType
- the actionenum
type classactionString
- the string to parse- Returns:
- the set of actions from the string
- Throws:
IllegalArgumentException
- if the string contained an invalid action
-
parseActionStringToInt
public static <E extends Enum<E>> int parseActionStringToInt(Class<E> actionType, String actionString) throws IllegalArgumentException
Deprecated.Parse an action string using the given action type to anint
. The givenenum
type must have 32 or fewer constant values.- Type Parameters:
E
- the actionenum
type- Parameters:
actionType
- the actionenum
type classactionString
- the string to parse- Returns:
- the set of actions from the string
- Throws:
IllegalArgumentException
- if the string contained an invalid action
-
parseActionStringToLong
public static <E extends Enum<E>> long parseActionStringToLong(Class<E> actionType, String actionString) throws IllegalArgumentException
Deprecated.Parse an action string using the given action type to along
. The givenenum
type must have 64 or fewer constant values.- Type Parameters:
E
- the actionenum
type- Parameters:
actionType
- the actionenum
type classactionString
- the string to parse- Returns:
- the set of actions from the string
- Throws:
IllegalArgumentException
- if the string contained an invalid action
-
doParse
private static <E extends Enum<E>> void doParse(Class<E> actionType, String actionString, PermissionActions.MatchAction<E> matchAction)
Deprecated.
-
getCanonicalActionString
public static <E extends Enum<E>> String getCanonicalActionString(EnumSet<E> set)
Deprecated.Get the canonical action string representation for the given action set.- Type Parameters:
E
- the action type- Parameters:
set
- the action set- Returns:
- the canonical representation
-
getCanonicalActionString
public static <E extends Enum<E>> void getCanonicalActionString(EnumSet<E> set, StringBuilder b)
Deprecated.Get the canonical action string representation for the given action set, appending it to the given string builder.- Type Parameters:
E
- the action type- Parameters:
set
- the action setb
- the string builder
-
getCanonicalActionString
public static <E extends Enum<E>> String getCanonicalActionString(Class<E> type, int set)
Deprecated.Get the canonical action string representation for the given action set.- Type Parameters:
E
- the action type- Parameters:
type
- the actionenum
type classset
- the action set- Returns:
- the canonical representation
-
getCanonicalActionString
public static <E extends Enum<E>> void getCanonicalActionString(Class<E> type, int set, StringBuilder b)
Deprecated.Get the canonical action string representation for the given action set, appending it to the given string builder.- Type Parameters:
E
- the action type- Parameters:
type
- the actionenum
type classset
- the action setb
- the string builder
-
getCanonicalActionString
public static <E extends Enum<E>> String getCanonicalActionString(Class<E> type, long set)
Deprecated.Get the canonical action string representation for the given action set.- Type Parameters:
E
- the action type- Parameters:
type
- the actionenum
type classset
- the action set- Returns:
- the canonical representation
-
getCanonicalActionString
public static <E extends Enum<E>> void getCanonicalActionString(Class<E> type, long set, StringBuilder b)
Deprecated.Get the canonical action string representation for the given action set, appending it to the given string builder.- Type Parameters:
E
- the action type- Parameters:
type
- the actionenum
type classset
- the action setb
- the string builder
-
-