Examples of Constraint


Examples of org.mortbay.jetty.security.Constraint

        assertNotNull(userRealm.authenticate("user", "pass", null));
       
        sh.setUserRealm(userRealm);
       
        Constraint constraint = new Constraint();
        constraint.setName(Constraint.__BASIC_AUTH);;
        constraint.setRoles(new String[]{"role"});
        constraint.setAuthenticate(true);
       
       
        ConstraintMapping cm = new ConstraintMapping();
        cm.setConstraint(constraint);
        cm.setPathSpec("/*");
 
View Full Code Here

Examples of org.nasutekds.server.admin.Constraint

   * @throws Exception
   *           If an unexpected error occurred.
   */
  @Test
  public void testAddConstraintSuccess() throws Exception {
    Constraint constraint = new MockConstraint(true, false, false);
    TestCfg.addConstraint(constraint);

    try {
      CreateEntryMockLDAPConnection c = new CreateEntryMockLDAPConnection(
          "cn=test child new,cn=test children,cn=test parent 1,cn=test parents,cn=config");
View Full Code Here

Examples of org.openiaml.docs.modeldoc.Constraint

      EMFClass identifier = mapOAWIdentifier(root, check.getType());
      if (identifier == null)
        continue// unidentified type (e.g. emf::EObject)

      // make a new Constraint for this check
      Constraint constraint = factory.createConstraint();
      constraint.setConstraint(check.getConstraint().toString());
      constraint.setType( check.isErrorCheck() ? ConstraintType.ERROR : ConstraintType.WARNING );
      constraint.setMessage( check.getMsg().toString() );

      // make a new FileReference
      FileLineReference line = factory.createFileLineReference();
      line.setFile(fr);
      line.setLine(check.getLine());
      constraint.setReference(line);
     
      // add this constraint
      identifier.getConstraints().add(constraint);
    }
   
View Full Code Here

Examples of org.picocontainer.gems.constraints.Constraint

    Constraint c1     = (Constraint) mockC1.proxy();
    Constraint c2     = (Constraint) mockC2.proxy();
    Constraint c3     = (Constraint) mockC3.proxy();

    public void testAndAllChildrenConstraintsTrueGivesTrue() {
        Constraint c = new And(c1, c2, c3);

        mockC1.expects(once()).method("evaluate")
            .with(same(adapter))
            .will(returnValue(Boolean.TRUE)).id("c1");
        mockC2.expects(once()).method("evaluate")
            .with(same(adapter)).after(mockC1, "c1")
            .will(returnValue(Boolean.TRUE)).id("c2");
        mockC3.expects(once()).method("evaluate")
            .with(same(adapter)).after(mockC2, "c2")
            .will(returnValue(Boolean.TRUE));

        assertTrue(c.evaluate(adapter));
    }
View Full Code Here

Examples of org.sbml.jsbml.Constraint

    assertEquals(M.getCompartmentType(0), c);
  }

  @Test
  public void test_Model_createConstraint() {
    Constraint c = M.createConstraint();
    assertTrue(c != null);
    assertTrue(M.getConstraintCount() == 1);
    assertEquals(M.getConstraint(0), c);
  }
View Full Code Here

Examples of org.snmp4j.agent.mo.snmp.smi.Constraint

                       MOAccess access,
                       Variable defaultValue,
                       boolean mutableInService, int minSize, int maxSize) {
    super(columnID, SMIConstants.SYNTAX_OCTET_STRING,
          access, defaultValue, mutableInService);
    sizeConstraints.add(new Constraint(minSize, maxSize));
  }
View Full Code Here

Examples of org.springframework.rules.constraint.Constraint

     * @return The range constraint constraint
     *
     * @since 0.3.0
     */
    public PropertyConstraint inRangeProperties(String propertyName, String minPropertyName, String maxPropertyName, Comparator comparator) {
        Constraint min = gteProperty(propertyName, minPropertyName, comparator);
        Constraint max = lteProperty(propertyName, maxPropertyName, comparator);
        return new CompoundPropertyConstraint(new And(min, max));
    }
View Full Code Here

Examples of org.voltdb.catalog.Constraint

     */
    public static Collection<Constraint> getConstraints(Iterable<ConstraintRef> map) {
        List<Constraint> ret = new ArrayList<Constraint>();
        if (map != null) {
            for (ConstraintRef ref : map) {
                Constraint catalog_item = ref.getConstraint();
                assert(catalog_item != null);
                ret.add(catalog_item);
            }
        }
        return (ret);
View Full Code Here

Examples of org.zkoss.zul.Constraint

   * <p>Default: use  {@link #getConstraint}'s {@link Constraint#validate},
   * if not null.
   * <p>You rarely need to override this method.
   */
  protected void validate(Object value) throws WrongValueException {
    final Constraint constr = getConstraint();
    if (constr != null) { //then _auxinf must be non-null
      //Bug 1698190: contructor might be zscript
      Scopes.beforeInterpret(this);
      try {
        constr.validate(this, value);
        if (!_auxinf.checkOnly && (constr instanceof CustomConstraint)) {
          try {
            ((CustomConstraint)constr).showCustomError(this, null);
            //not call thru showCustomError(Wrong...) for better performance
          } catch (Throwable ex) {
View Full Code Here

Examples of solver.constraints.Constraint

        this.engine = NoPropagationEngine.SINGLETON;
        ZERO = (BoolVar) VF.fixed(0, this);
        ONE = (BoolVar) VF.fixed(1, this);
        ZERO._setNot(ONE);
        ONE._setNot(ZERO);
        TRUE = new Constraint("TRUE cstr", new PropTrue(ONE));
        FALSE = new Constraint("FALSE cstr", new PropFalse(ZERO));
        solutionRecorder = new LastSolutionRecorder(new Solution(), false, this);
        set(ObjectiveManager.SAT());
    }
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.