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 likeAbstractActionSetPermissioninstead.A helper class for defining permissions which use a finite list of actions. Define custom permissions using anenumof actions, where the string representation (viatoString()) of each enum is one possible action name. Typically theenumshould 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 typeStringwhich uses the canonical representation of the actions.- Author:
- David M. Lloyd
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description 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.
-
-
-
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 actionenumtype- Parameters:
actionType- the actionenumtype 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 givenenumtype must have 32 or fewer constant values.- Type Parameters:
E- the actionenumtype- Parameters:
actionType- the actionenumtype 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 givenenumtype must have 64 or fewer constant values.- Type Parameters:
E- the actionenumtype- Parameters:
actionType- the actionenumtype classactionString- the string to parse- Returns:
- the set of actions from the string
- Throws:
IllegalArgumentException- if the string contained an invalid action
-
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 actionenumtype 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 actionenumtype 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 actionenumtype 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 actionenumtype classset- the action setb- the string builder
-
-