Class ExpressionValidatorModule
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetMethodListFromConfiguration
(Configuration configuration) Create a list of pointcuts for the MethodListInvocationValidator based on configuration properties.static @NotNull ParsingColumnExpressionValidator
Create aParsingColumnExpressionValidator
based on configuration properties.
-
Constructor Details
-
ExpressionValidatorModule
public ExpressionValidatorModule()
-
-
Method Details
-
provideExpressionValidator
-
getParsingColumnExpressionValidatorFromConfiguration
@NotNull public static @NotNull ParsingColumnExpressionValidator getParsingColumnExpressionValidatorFromConfiguration(Configuration configuration) Create aParsingColumnExpressionValidator
based on configuration properties.There are five types of configuration, each indicated with a property prefix. The portion of a property name after the prefix has no functional effect, but should be something to help document the type or reason for permitting certain functions.
Prefix Description Format ColumnExpressionValidator.instanceTargets. Classes for which all instance methods are permitted A comma separated list of classes. Spaces are ignored. Classes should be specified as input to Class.forName(String)
.ColumnExpressionValidator.staticTargets. Classes for which all static methods are permitted A comma separated list of classes. Spaces are ignored. Classes should be specified as input to Class.forName(String)
.ColumnExpressionValidator.instanceMethods. Permitted instance methods A single instance method formatted as class#method(class1, class2)
. See below.ColumnExpressionValidator.staticMethods. Permitted static methods A single instance method formatted as class#method(class1, class2)
. See below.ColumnExpressionValidator.annotationSets. Names of permitted annotation UserInvocationPermitted.value()
A comma separated list of strings. Spaces are ignored. Individual methods are specified as
class#method(class1, class2)
. The class and parameter types must be valid input toClass.forName(String)
.For instance methods, any overriding class's implementation of the method may be called. For example, if
java.lang.Object#toString()
is permitted then any classes implementation ofObject.toString()
is permitted. An overriding class may have parameters that are super types of the specified method. For example if classA
implementsadd(java.lang.Integer)
is permitted; then ifA
is a superclass ofB
, classB
's methodadd(java.lang.Number)
is also permitted.- Parameters:
configuration
- the configuration instance to read properties from- Returns:
- a validator ready for use
-
getMethodListFromConfiguration
Create a list of pointcuts for the MethodListInvocationValidator based on configuration properties.For instance methods, any overriding class's implementation of the method may be called. For example, if
java.lang.Object#toString()
is permitted then any classes implementation ofObject.toString()
is permitted.- Parameters:
configuration
- the configuration instance to read properties from- Returns:
- a MethodList object
-