Package org.glassfish.admingui.connector

Examples of org.glassfish.admingui.connector.TOC


  // The parent UIComponent
  UIComponent parent = getParentUIComponent();

  // Get the TOC
        TOC toc = (TOC) desc.getEvaluatedOption(ctx, "toc", parent);

  // The following method should set the "key" to the node containing all
  // the children... the children will also have keys which must be
  // retrievable by the next method (getChildTreeNodeObjects)... these
  // "keys" will be used by the rest of the methods in this file for
View Full Code Here


     */
    public synchronized TOC getHelpTOC(String locale) {
  if (locale == null) {
      locale = "en"; // Use this as the default...
  }
  TOC mergedTOC = helpSetMap.get(locale);
  if (mergedTOC != null) {
      // Already calculated...
      return mergedTOC;
  }

  // TOC
  Map<String, List<URL>> mapUrls = getResources(locale + "/help/toc.xml");

  // Get our parser...
  ConfigParser parser = new ConfigParser(habitat);

  // Setup a new "merged" TOC...
  mergedTOC = new TOC();
  mergedTOC.setTOCItems(new ArrayList<TOCItem>());
  mergedTOC.setVersion("2.0");

  // Loop through the urls and add them all
  String id = null; // module id
  String prefix = "/" + locale + "/help/"// prefix (minus module id)
  List<URL> urls = null; // URLs to TOC files w/i each plugin module
  for (Map.Entry<String, List<URL>> entry : mapUrls.entrySet()) {
      id = entry.getKey();
      urls = entry.getValue();
      for (URL url : urls) {
    DomDocument doc = parser.parse(url);

    // Merge all the TOC's...
    TOC toc = (TOC) doc.getRoot().get();
    for (TOCItem item : toc.getTOCItems()) {
        insertTOCItem(mergedTOC.getTOCItems(), item, id + prefix);
    }
      }
  }

View Full Code Here

TOP

Related Classes of org.glassfish.admingui.connector.TOC

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.