Examples of logical()


Examples of org.apache.shiro.authz.annotation.RequiresRoles.logical()

    }
    if (Logical.AND.equals(rrAnnotation.logical())) {
      subject.checkRoles(Arrays.asList(roles));
      return;
    }
    if (Logical.OR.equals(rrAnnotation.logical())) {
      // Avoid processing exceptions unnecessarily - "delay" throwing the exception by calling hasRole first
      boolean hasAtLeastOneRole = false;
      for (String role : roles) if (subject.hasRole(role)) hasAtLeastOneRole = true;
      // Cause the exception if none of the role match, note that the exception message will be a bit misleading
      if (!hasAtLeastOneRole) subject.checkRole(roles[0]);
View Full Code Here

Examples of org.apache.shiro.authz.annotation.RequiresRoles.logical()

        if (roles.length == 1) {
            getSubject().checkRole(roles[0]);
            return;
        }
        if (Logical.AND.equals(rrAnnotation.logical())) {
            getSubject().checkRoles(Arrays.asList(roles));
            return;
        }
        if (Logical.OR.equals(rrAnnotation.logical())) {
            // Avoid processing exceptions unnecessarily - "delay" throwing the exception by calling hasRole first
View Full Code Here

Examples of org.apache.shiro.authz.annotation.RequiresRoles.logical()

        }
        if (Logical.AND.equals(rrAnnotation.logical())) {
            getSubject().checkRoles(Arrays.asList(roles));
            return;
        }
        if (Logical.OR.equals(rrAnnotation.logical())) {
            // Avoid processing exceptions unnecessarily - "delay" throwing the exception by calling hasRole first
            boolean hasAtLeastOneRole = false;
            for (String role : roles) if (getSubject().hasRole(role)) hasAtLeastOneRole = true;
            // Cause the exception if none of the role match, note that the exception message will be a bit misleading
            if (!hasAtLeastOneRole) getSubject().checkRole(roles[0]);
View Full Code Here

Examples of org.apache.shiro.authz.annotation.RequiresRoles.logical()

        if (roles.length == 1) {
            getSubject().checkRole(roles[0]);
            return;
        }
        if (Logical.AND.equals(rrAnnotation.logical())) {
            getSubject().checkRoles(Arrays.asList(roles));
            return;
        }
        if (Logical.OR.equals(rrAnnotation.logical())) {
            // Avoid processing exceptions unnecessarily - "delay" throwing the exception by calling hasRole first
View Full Code Here

Examples of org.apache.shiro.authz.annotation.RequiresRoles.logical()

        }
        if (Logical.AND.equals(rrAnnotation.logical())) {
            getSubject().checkRoles(Arrays.asList(roles));
            return;
        }
        if (Logical.OR.equals(rrAnnotation.logical())) {
            // Avoid processing exceptions unnecessarily - "delay" throwing the exception by calling hasRole first
            boolean hasAtLeastOneRole = false;
            for (String role : roles) if (getSubject().hasRole(role)) hasAtLeastOneRole = true;
            // Cause the exception if none of the role match, note that the exception message will be a bit misleading
            if (!hasAtLeastOneRole) getSubject().checkRole(roles[0]);
View Full Code Here

Examples of org.apache.shiro.authz.annotation.RequiresRoles.logical()

    if (roles.length == 1) {
      subject.checkRole(roles[0]);
      return;
    }
    if (Logical.AND.equals(rrAnnotation.logical())) {
      subject.checkRoles(Arrays.asList(roles));
      return;
    }
    if (Logical.OR.equals(rrAnnotation.logical())) {
      // Avoid processing exceptions unnecessarily - "delay" throwing the exception by calling hasRole first
View Full Code Here

Examples of org.apache.shiro.authz.annotation.RequiresRoles.logical()

    }
    if (Logical.AND.equals(rrAnnotation.logical())) {
      subject.checkRoles(Arrays.asList(roles));
      return;
    }
    if (Logical.OR.equals(rrAnnotation.logical())) {
      // Avoid processing exceptions unnecessarily - "delay" throwing the exception by calling hasRole first
      boolean hasAtLeastOneRole = false;
      for (String role : roles) if (subject.hasRole(role)) hasAtLeastOneRole = true;
      // Cause the exception if none of the role match, note that the exception message will be a bit misleading
      if (!hasAtLeastOneRole) subject.checkRole(roles[0]);
View Full Code Here

Examples of org.drools.core.factmodel.traits.Traitable.logical()

        defineShadowProxyData( clazz );
        this.supportsPropertyListeners = checkPropertyListenerSupport( clazz );

        Traitable ttbl = cls.getAnnotation( Traitable.class );
        this.traitTmsEnabled = ttbl != null && ttbl.logical();
    }

    public void readExternal(ObjectInput stream) throws IOException,
                                                ClassNotFoundException {
        ruleBase = (InternalRuleBase) stream.readObject();
View Full Code Here

Examples of org.drools.core.factmodel.traits.Traitable.logical()

        }

        this.supportsPropertyListeners = checkPropertyListenerSupport( clazz );

        Traitable ttbl = cls.getAnnotation( Traitable.class );
        this.traitTmsEnabled = ttbl != null && ttbl.logical();
    }

    public void readExternal(ObjectInput stream) throws IOException,
                                                ClassNotFoundException {
        kBase = (InternalKnowledgeBase) stream.readObject();
View Full Code Here

Examples of org.drools.core.factmodel.traits.Traitable.logical()

            case CLASS:
            default:
                def = new ClassDefinition( fullName,
                                           fullSuperTypes[0],
                                           interfaces );
                def.setTraitable( traitable, traitableAnn != null && traitableAnn.logical() );
        }

        return def;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.