Examples of implies()


Examples of java.security.Policy.implies()

        principals = new Principal[ principalsSet.size() ];
        principalsSet.toArray( principals );
      }

      ProtectionDomain pd = new ProtectionDomain( ejbCS, null, null, principals );
      if ( !policy.implies( pd, methodPerm ) ) {
        String msg = "Denied: " + methodPerm + ", caller=" + caller;
        SecurityException e = new SecurityException( msg );
        throw e;
      }
    }
View Full Code Here

Examples of java.security.ProtectionDomain.implies()

               return cls.getProtectionDomain();
            }
         });

         MBeanTrustPermission permission = new MBeanTrustPermission("register");
         if (!domain.implies(permission))
         {
            throw new AccessControlException("Access denied " + permission + ": MBean class " + cls.getName() + " is not trusted for registration");
         }
      }
   }
View Full Code Here

Examples of java.security.UnresolvedPermission.implies()

     * UnresolvedPermission never implies any other permission.
     */
    public void testImplies()
    {
        UnresolvedPermission up = new UnresolvedPermission("java.security.SecurityPermission", "a.b.c", null, null);
        assertFalse(up.implies(up));
        assertFalse(up.implies(new AllPermission()));
        assertFalse(up.implies(new SecurityPermission("a.b.c")));
    }
   
    public void testSerialization() throws Exception {
View Full Code Here

Examples of javax.management.MBeanPermission.implies()

   public void testImpiles()
   {
      MBeanPermission p0 = new MBeanPermission("*", "*");
      MBeanPermission p1 = new MBeanPermission("*", "*");
      assertTrue("* implies *", p1.implies(p0));

      p0 = new MBeanPermission("[*:*]", "*");
      p1 = new MBeanPermission("[*:*]", "*");
      assertTrue("[*:*] * implies [*:*] *", p1.implies(p0));

View Full Code Here

Examples of javax.management.MBeanServerPermission.implies()

   public void testMBeanServerPermission()
   {
      MBeanServerPermission p0 = new MBeanServerPermission("newMBeanServer");
      MBeanServerPermission p1 = new MBeanServerPermission("createMBeanServer");
      assertTrue("createMBeanServer implies newMBeanServer", p1.implies(p0));
      assertTrue("createMBeanServer implies newMBeanServer", p0.implies(p1));

      PermissionCollection pc = p0.newPermissionCollection();
      pc.add(p0);
      assertTrue("PC(newMBeanServer) implies createMBeanServer", pc.implies(p1));
View Full Code Here

Examples of javax.security.auth.kerberos.DelegationPermission.implies()

    // testing of the implies method
    public void testImplies() {
        DelegationPermission dp1 = new DelegationPermission("\"AAA\" \"BBB\"");
        DelegationPermission dp2 = new DelegationPermission("\"BBB\" \"AAA\"");
        assertFalse(dp1.implies(dp2));
        assertFalse(dp2.implies(dp1));
        assertTrue(dp1.implies(dp1));
        assertFalse(dp1.implies(new ServicePermission("aaa", "accept")));
        assertFalse(dp1.implies(null));
    }
   
View Full Code Here

Examples of javax.security.auth.kerberos.ServicePermission.implies()

   
    public void testImplies() {
        ServicePermission sp1;
        ServicePermission sp = new ServicePermission("host/AAA.COM@BBB.COM", "accept");
        sp1 = new ServicePermission("*", "initiate, accept");
        assertTrue(sp.implies(sp));
        assertFalse(sp.implies(sp1));
        assertTrue(sp1.implies(sp));
        assertTrue(sp1.implies(sp1));
        sp1 = new ServicePermission("*", "accept");
        assertTrue(sp1.implies(sp));
View Full Code Here

Examples of javax.security.jacc.WebResourcePermission.implies()

      p1 = new WebResourcePermission("/", "POST");
      assertTrue("! p0.implies(p1)", p0.implies(p1) == false);

      p1 = new WebResourcePermission("", "GET");
      assertTrue("! p1.implies(p0)", p1.implies(p0) == false);

      p1 = new WebResourcePermission("/", "GET,POST");
      assertTrue("! p0.implies(p1)", p0.implies(p1) == false);

      p0 = new WebResourcePermission("/any/*", "GET");
View Full Code Here

Examples of kodkod.ast.Formula.implies()

           case ISSEQ_ARROW_LONE:
           case ANY_ARROW_LONE: case SOME_ARROW_LONE: case ONE_ARROW_LONE: case LONE_ARROW_LONE: ans1=ar.lone().and(ans1); break;
           case ANY_ARROW_ONE:  case SOME_ARROW_ONE:  case ONE_ARROW_ONE:  case LONE_ARROW_ONE:  ans1=ar.one().and(ans1)break;
           case ANY_ARROW_SOME: case SOME_ARROW_SOME: case ONE_ARROW_SOME: case LONE_ARROW_SOME: ans1=ar.some().and(ans1); break;
        }
        if (a.arity()>1) { Formula tmp=isIn(atuple, ab.left); if (tmp!=Formula.TRUE) ans1=tmp.implies(ans1); }
        ans1=ans1.forAll(d);
        // "R in A op-> B" means for each tuple b in B, there are "op" tuples in r that end with b.
        Expression btuple=null, rb=r;
        for(int i=b.arity(); i>0; i--) {
           Variable v=Variable.unary("");
View Full Code Here

Examples of kodkod.engine.bool.BooleanFactory.implies()

    final BooleanFactory f = interpreter.factory();

    switch(op) {
    case AND    : ret = f.and(left, right); break;
    case OR      : ret = f.or(left, right); break;
    case IMPLIES  : ret = f.implies(left, right); break;
    case IFF    : ret = f.iff(left, right); break;
    default :
      throw new IllegalArgumentException("Unknown operator: " + op);
    }
    return cache(binFormula, ret);
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.