com.acsinet_solutions.cetia4.controller.meta
Annotation Type Security


@Documented
@Retention(value=RUNTIME)
@Target(value={METHOD,TYPE})
@Inherited
public @interface Security

Defines security constraints at module or method level. Module constraints apply to all methods, and are considered additional to the security at method level.

Author:
Santiago Arriaga

Optional Element Summary
 java.lang.String[] authorizedRoles
          The list of authorized roles that can execute the current method.
 java.lang.Class<? extends SecurityChecker> checker
          Set a custom security checker class.
 CombinationPolicy[] combination
          Indicates how all the policies set in this annotation may be combined to conform a security policy for the current class / method.
 java.lang.String condition
          An expression that must be evaluated to true in order to enter to the current method / module.
 boolean needsLogin
          Check if the current type or method require login.
 

needsLogin

public abstract boolean needsLogin
Check if the current type or method require login. False by default. If authorizedRoles is required, this property is considered as true.

Default:
true

authorizedRoles

public abstract java.lang.String[] authorizedRoles
The list of authorized roles that can execute the current method. If no authorized roles are set, anyone can execute the current method. If authorized roles are set and required, the class or controller needs log in.

Default:
{}

condition

public abstract java.lang.String condition
An expression that must be evaluated to true in order to enter to the current method / module.

Default:
""

checker

public abstract java.lang.Class<? extends SecurityChecker> checker
Set a custom security checker class.

Default:
com.acsinet_solutions.cetia4.controller.security.NoopSecurityChecker.class

combination

public abstract CombinationPolicy[] combination
Indicates how all the policies set in this annotation may be combined to conform a security policy for the current class / method.

Default:
REQUIRE_ALL