Package org.hdiv.config

Examples of org.hdiv.config.HDIVValidations


    HDIVConfig hdivConfig = this.context.getBean(HDIVConfig.class);
    assertNotNull(hdivConfig);
    assertFalse(hdivConfig.isDebugMode());

    HDIVValidations validations = this.context.getBean(HDIVValidations.class);
    assertNotNull(validations);
    System.out.println(validations.toString());

  }
View Full Code Here


      }
      PatternMatcher patternMatcher = patternMatcherFactory.getPatternMatcher(urlPattern);
      validationsData.put(patternMatcher, activeRules);
    }

    HDIVValidations validations = new HDIVValidations();
    validations.setUrls(validationsData);
    return validations;
  }
View Full Code Here

  @Override
  protected HDIVValidations createInstance() throws Exception {
    // create HDIVvalidations instance for XML config

    HDIVValidations validations = new HDIVValidations();

    Map<PatternMatcher, List<IValidation>> urls = new HashMap<PatternMatcher, List<IValidation>>();

    for (String url : this.validationsData.keySet()) {
      List<String> ids = validationsData.get(url);
      PatternMatcher matcher = this.patternMatcherFactory.getPatternMatcher(url);
      urls.put(matcher, this.createValidationList(ids));
    }
    validations.setUrls(urls);

    return validations;
  }
View Full Code Here

    assertNotNull(hdivConfig);
    System.out.println(hdivConfig.toString());
    System.out.println("-----------------------");
    assertTrue(hdivConfig.isShowErrorPageOnEditableValidation());

    HDIVValidations validations = this.context.getBean(HDIVValidations.class);
    assertNotNull(validations);
    System.out.println(validations.toString());

  }
View Full Code Here

  }

  public void testEditableValidations() {

    HDIVValidations validations = this.context.getBean(HDIVValidations.class);
    assertNotNull(validations);

    Map<PatternMatcher, List<IValidation>> urls = validations.getUrls();
    assertEquals(2, urls.size());

    // First url
    List<IValidation> vals = urls.get(new DefaultPatternMatcher("a"));
View Full Code Here

TOP

Related Classes of org.hdiv.config.HDIVValidations

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.