javax.annotation.security

Interface RolesAllowed

public interface RolesAllowed

Sets the user name to run as.

Method Summary

String[]
value()

Method Details

value

public String[] value()
Usages and Demos :

View More Examples of value()
   1: 
   2: import javax.annotation.security.RolesAllowed;
   3: 
   4:         ...
   5:             EJBContainer container = (EJBContainer)it.next();
   6:             RolesAllowed anRolesAllowed = (RolesAllowed)container.resolveAnnotation(RolesAllowed.class);
   7:             if (anRolesAllowed != null)
   8:         ...
   9:             {
  10:                for (String role : anRolesAllowed.value())
  11:                {

View Full Code Here
   1: 
   2: import javax.annotation.security.RolesAllowed;
   3: import javax.management.MBeanServer;
   4:         ...
   5: 
   6:             RolesAllowed anRolesAllowed = (RolesAllowed)container.resolveAnnotation(RolesAllowed.class);
   7:             if (anRolesAllowed != null)
   8:         ...
   9:             {
  10:                for (String role : anRolesAllowed.value())
  11:                {

View Full Code Here
   1: import javax.annotation.security.PermitAll;
   2: import javax.annotation.security.RolesAllowed;
   3: 
   4:         ...
   5:     public Class<? extends Annotation> getAnnotationType() {
   6:         return RolesAllowed.class;
   7:     }    
   8:         ...
   9:                 "enterprise.deployment.annotation.handlers.inconsistentsecannotation",
  10:                 "This annotation is not consistent with other annotations.  One cannot have more than one of @RolesAllowed, @PermitAll, @DenyAll in the same AnnotatedElement."));
  11:             return getDefaultFailedResult();
  12:         ...
  13:             EjbDescriptor ejbDesc, MethodDescriptor md) {
  14:         for (String roleName : rolesAllowedAn.value()) {

View Full Code Here