コード例 #1
0
ファイル: LibraryManagerImpl.java プロジェクト: novr/mayaa
  // condition: already loaded "META-INF/taglib.tld"
  private void assignTaglibLocation(SourceDescriptor source) {
    String realPath = source.getParameter(WebXMLTaglibSourceScanner.REAL_PATH);
    if (StringUtil.isEmpty(realPath) || realPath.endsWith(".jar") == false) {
      return;
    }

    for (int j = 0; j < _libraries.size(); j++) {
      LibraryDefinition library = (LibraryDefinition) _libraries.get(j);
      for (Iterator it = library.iterateAssignedURI(); it.hasNext(); ) {
        URI uri = (URI) it.next();
        if (realPath.equals(String.valueOf(uri))) {
          URI assignedURI = SpecificationUtil.createURI(source.getParameter(SourceAlias.ALIAS));
          library.addAssignedURI(assignedURI);
          if (LOG.isInfoEnabled()) {
            LOG.info(
                StringUtil.getMessage(
                    LibraryManagerImpl.class,
                    4,
                    library.getNamespaceURI() + " (alias)",
                    String.valueOf(assignedURI)));
          }
          return;
        }
      }
    }
  }
コード例 #2
0
ファイル: LibraryManagerImpl.java プロジェクト: novr/mayaa
 protected boolean filter(Object test) {
   if (test == null || (test instanceof LibraryDefinition == false)) {
     return false;
   }
   LibraryDefinition library = (LibraryDefinition) test;
   if (_namespaceURI.equals(library.getNamespaceURI())) {
     return true;
   }
   for (Iterator it = library.iterateAssignedURI(); it.hasNext(); ) {
     if (_namespaceURI.equals(it.next())) {
       return true;
     }
   }
   return false;
 }