Package com.getperka.flatpack.policy.pst

Examples of com.getperka.flatpack.policy.pst.AllowBlock


      return false;
    }

    @Override
    public boolean visit(AllowBlock x) {
      AllowBlock n = new AllowBlock();
      n.setAclRules(clone(x.getAclRules()));
      n.setInheritFrom(clone(x.getInheritFrom()));
      n.setOnly(x.isOnly());
      stack.push(n);
      return false;
    }
View Full Code Here


   * <pre>
   * allow [ inherit somePropertyName ] [ aclRule ];
   * </pre>
   */
  Rule Allow() {
    final Var<AllowBlock> var = new Var<AllowBlock>(new AllowBlock());
    final Var<Boolean> only = new Var<Boolean>(false);
    return Sequence(
        "allow",
        Optional("only", ACTION(only.set(true))),
        MaybeInherit(Property.class, var),
        ZeroOneOrBlock(AclRule(), AllowRule.class),
        new Action<Object>() {
          @Override
          @SuppressWarnings("unchecked")
          public boolean run(Context<Object> ctx) {
            AllowBlock x = var.get();
            x.setAclRules((List<AllowRule>) pop());
            x.setOnly(only.get());
            push(x);
            return true;
          }
        });
  }
View Full Code Here

TOP

Related Classes of com.getperka.flatpack.policy.pst.AllowBlock

Copyright © 2018 www.massapicom. 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.