Examples of addConstraint()


Examples of org.apache.catalina.Context.addConstraint()

            SecurityConstraint sc = new SecurityConstraint();
            sc.addAuthRole("*");
            sc.addCollection(collection);
            sc.setAuthConstraint(true);
            sc.setUserConstraint(transportGuarantee);
            context.addConstraint(sc);
            context.addSecurityRole("default");

            //Set the proper authenticator
            if ("BASIC".equals(authMethod)) {
                context.addValve(new BasicAuthenticator());
View Full Code Here

Examples of org.apache.catalina.Context.addConstraint()

        SecurityCollection collection = new SecurityCollection();
        collection.addPattern("/protected");
        SecurityConstraint sc = new SecurityConstraint();
        sc.addAuthRole("testrole");
        sc.addCollection(collection);
        ctx.addConstraint(sc);

        // Configure the Realm
        MapRealm realm = new MapRealm();
        realm.addUser("CN=user1, C=US", "not used");
        realm.addUserRole("CN=user1, C=US", "testrole");
View Full Code Here

Examples of org.apache.catalina.core.StandardContext.addConstraint()

            SecurityConstraint sc = new SecurityConstraint();
            sc.addAuthRole("*");
            sc.addCollection(collection);
            sc.setAuthConstraint(true);
            sc.setUserConstraint(transportGuarantee);
            context.addConstraint(sc);
            context.addSecurityRole("default");

            //Set the proper authenticator
            if ("BASIC".equals(authMethod)) {
                context.addValve(new BasicAuthenticator());
View Full Code Here

Examples of org.apache.catalina.core.StandardContext.addConstraint()

            SecurityConstraint sc = new SecurityConstraint();
            sc.addAuthRole("*");
            sc.addCollection(collection);
            sc.setAuthConstraint(true);
            sc.setUserConstraint(transportGuarantee);
            context.addConstraint(sc);
            context.addSecurityRole("default");

            //Set the proper authenticator
            if ("BASIC".equals(authMethod)) {
                context.addValve(new BasicAuthenticator());
View Full Code Here

Examples of org.apache.catalina.core.TesterContext.addConstraint()

        List<String> userRoles99 = new ArrayList<String>();
        GenericPrincipal gp99 = new GenericPrincipal(USER99, PWD, userRoles99);

        // Add the constraints to the context
        for (SecurityConstraint constraint : constraints) {
            context.addConstraint(constraint);
        }
        context.addConstraint(deleteConstraint);

        // All users should be able to perform a GET
        request.setMethod("GET");
View Full Code Here

Examples of org.apache.clerezza.rdf.core.sparql.query.impl.SimpleGroupGraphPattern.addConstraint()

    SimpleBasicGraphPattern bgp = new SimpleBasicGraphPattern(triplePatterns);
    SimpleGroupGraphPattern queryPattern = new SimpleGroupGraphPattern();
    queryPattern.addGraphPattern(bgp);
    BinaryOperation constraint = new BinaryOperation("<",
        price, new LiteralExpression(LiteralFactory.getInstance().createTypedLiteral(30.5)));
    queryPattern.addConstraint(constraint);
    selectQuery.setQueryPattern(queryPattern);

    Assert.assertTrue(selectQuery.toString()
        .replaceAll("( |\n)+", " ").trim().equals(queryString));
  }
View Full Code Here

Examples of org.apache.tomee.catalina.IgnoredStandardContext.addConstraint()

                    sc.addAuthRole("*");
                    sc.addCollection(collection);
                    sc.setAuthConstraint(true);
                    sc.setUserConstraint(transportGuarantee);

                    context.addConstraint(sc);
                    context.addSecurityRole(role);
                }
            }

            //Set the proper authenticator
View Full Code Here

Examples of org.apache.ws.jaxme.sqls.CombinedConstraint.addConstraint()

                                        source.getType());
      }
      for (Iterator iter = source.getParts();  iter.hasNext()) {
        Object o = iter.next();
        if (o instanceof CombinedConstraint) {
          target.addConstraint(pMap, (CombinedConstraint) o);
        } else if (o instanceof BooleanConstraint) {
          target.addConstraint(pMap, (BooleanConstraint) o);
        } else {
          throw new IllegalArgumentException("Invalid part: " + o.getClass().getName());
        }
View Full Code Here

Examples of org.araneaframework.uilib.form.constraint.AndConstraint.addConstraint()

    //Complex constraint
    //
   
    //First searching scenario
    AndConstraint clientNameConstraint = new AndConstraint();
    clientNameConstraint.addConstraint(new NotEmptyConstraint(searchForm.getElementByFullName("clientFirstName")));
    clientNameConstraint.addConstraint(new NotEmptyConstraint(searchForm.getElementByFullName("clientLastName")));
   
    //Second searching scenario
    NotEmptyConstraint clientPersonalIdConstraint = new NotEmptyConstraint(searchForm.getElementByFullName("clientPersonalId"));
   
View Full Code Here

Examples of org.araneaframework.uilib.form.constraint.AndConstraint.addConstraint()

    NotEmptyConstraint clientPersonalIdConstraint = new NotEmptyConstraint(searchForm.getElementByFullName("clientPersonalId"));
   
    //Third searching scenario
    AndConstraint clientAddressConstraint = new AndConstraint();
    clientAddressConstraint.addConstraint(new NotEmptyConstraint(searchForm.getElementByFullName("clientAddressTown")));
    clientAddressConstraint.addConstraint(new NotEmptyConstraint(searchForm.getElementByFullName("clientAddressStreet")));
    clientAddressConstraint.addConstraint(new NotEmptyConstraint(searchForm.getElementByFullName("clientAddressHouse")));
   
    //Combining scenarios
    OrConstraint searchConstraint = new OrConstraint();   
    searchConstraint.addConstraint(clientNameConstraint);
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.