Package org.dbwiki.web.ui.printer.data

Examples of org.dbwiki.web.ui.printer.data.DataMenuPrinter


                                // requested
        contentGenerator.put(
            DatabaseWikiContentGenerator.ContentTimemachine,
            new TimemachinePrinter(request));
        contentGenerator.put(DatabaseWikiContentGenerator.ContentMenu,
            new DataMenuPrinter(request, _layouter));
        contentGenerator.put(
            DatabaseWikiContentGenerator.ContentObjectLink,
            new NodePathPrinter(request, _layouter));
        contentGenerator.put(
            DatabaseWikiContentGenerator.ContentAnnotation,
            new ObjectAnnotationPrinter(request));
        // contentGenerator.put(DatabaseWikiContentGenerator.ContentProvenance,
        // new VersionIndexPrinter(request));
        contentGenerator.put(
            DatabaseWikiContentGenerator.ContentProvenance,
            new ObjectProvenancePrinter(request, _layouter));
        contentGenerator.put(
            DatabaseWikiContentGenerator.ContentContent,
            new DataNodePrinter(request, _layouter));
      } else if (isIndexRequest) { // The case for the root of the
                      // DatabaseWiki
        contentGenerator.put(
            DatabaseWikiContentGenerator.ContentTimemachine,
            new TimemachinePrinter(request));
        contentGenerator.put(DatabaseWikiContentGenerator.ContentMenu,
            new DataMenuPrinter(request, _layouter));
        // TODO: This could be simplified by storing the mapping in a
        // Map<String,IndexContentPrinter>
        if (DatabaseLayouter.IndexAZMultiPage.equals(_layouter
            .indexType())) {
          contentGenerator.put(
              DatabaseWikiContentGenerator.ContentContent,
              new AZMultiPageIndexPrinter(request, database()
                  .content()));
        } else if (DatabaseLayouter.IndexAZSinglePage.equals(_layouter
            .indexType())) {
          contentGenerator.put(
              DatabaseWikiContentGenerator.ContentContent,
              new AZSinglePageIndexPrinter(request, database()
                  .content()));
        } else if (DatabaseLayouter.IndexMultiColumn.equals(_layouter
            .indexType())) {
          contentGenerator.put(
              DatabaseWikiContentGenerator.ContentContent,
              new MultiColumnIndexPrinter(request, database()
                  .content()));
        } else if (DatabaseLayouter.IndexPartialList.equals(_layouter
            .indexType())) {
          contentGenerator.put(
              DatabaseWikiContentGenerator.ContentContent,
              new PartialIndexPrinter(request, database()
                  .content()));
        } else {
          contentGenerator
              .put(DatabaseWikiContentGenerator.ContentContent,
                  new FullIndexPrinter(request, database()
                      .content()));
        }
      } else if (request.type().isSearch()) { // The case for a search
                          // request
        DatabaseContent content = null;
        String query = request.parameters()
            .get(RequestParameter.ParameterSearch).value();
        if (query != null) {
          content = database().search(query);
        } else {
          content = database().content();
        }
        contentGenerator.put(
            DatabaseWikiContentGenerator.ContentTimemachine,
            new TimemachinePrinter(request));
        contentGenerator.put(DatabaseWikiContentGenerator.ContentMenu,
            new DataMenuPrinter(request, _layouter));
        contentGenerator.put(
            DatabaseWikiContentGenerator.ContentContent,
            new SearchResultPrinter(request, content));
      } else if ((request.type().isCreate()) || (request.type().isEdit())) { // The
                                          // case
View Full Code Here

TOP

Related Classes of org.dbwiki.web.ui.printer.data.DataMenuPrinter

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.