Package net.sf.maventaglib.checker

Examples of net.sf.maventaglib.checker.Tld


  public void test() {
   
    Map<String, List<String>> tagNamesByTldName = new HashMap<String, List<String>>();
   
    for(String tldPath : tldsByPath.keySet()) {
      Tld tld = tldsByPath.get(tldPath);
      for(Tag tag : tld.getTags()) {
        List<String> tagNames = tagNamesByTldName.get(tld.getName());
       
        if(tagNames == null) {
          tagNames = new LinkedList<String>();
          tagNamesByTldName.put(tld.getName(), tagNames);
        }
       
        if(tagNames.contains(tag.getName()))
          fail("Tag '" + tag.getName() + "' occurs in tag library '"
              + tld.getName() + "' more than once");
        tagNames.add(tag.getName());
      }
    }
  }
View Full Code Here


   
    DocumentBuilder builder = ParserUtils.getDocumentBuilder();
   
    for(String tldPath : tldPaths){
      String xml = ParserUtils.getXml(tldPath, streamProvider);
      Tld tld;
      Document document;
      try {
        document = builder.parse( new ByteArrayInputStream(xml.getBytes()));
        tld = TldParser.parse(document, tldPath);
      } catch (Exception e) {
View Full Code Here

     
      Class clazz = tagClassesByTag.get(tag);
      Class[] constraints = new Class[] {UIComponentTag.class, UIComponentTagBase.class};
     
      if( ! new ClassUtils().isAssignableFrom(constraints, clazz) ) {
        Tld tld = tldsByTag.get(tag);
        fail(clazz + " configured in TLD '"
            + tld.getName() + "' needs to be a "
            + UIComponentTag.class.getName() + " or a " + UIComponentTagBase.class.getName());     
      }
    }

  }
View Full Code Here

TOP

Related Classes of net.sf.maventaglib.checker.Tld

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.