001/*
002 * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
003 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004 *
005 * This code is free software; you can redistribute it and/or modify it
006 * under the terms of the GNU General Public License version 2 only, as
007 * published by the Free Software Foundation.  Oracle designates this
008 * particular file as subject to the "Classpath" exception as provided
009 * by Oracle in the LICENSE file that accompanied this code.
010 *
011 * This code is distributed in the hope that it will be useful, but WITHOUT
012 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
014 * version 2 for more details (a copy is included in the LICENSE file that
015 * accompanied this code).
016 *
017 * You should have received a copy of the GNU General Public License version
018 * 2 along with this work; if not, write to the Free Software Foundation,
019 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020 *
021 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
022 * or visit www.oracle.com if you need additional information or have any
023 * questions.
024 */
025
026package org.jdrupes.mdoclet.internal.doclets.toolkit;
027
028import org.jdrupes.mdoclet.internal.doclets.toolkit.util.DocFileIOException;
029
030/**
031 * The interface for writing module summary output.
032 */
033public interface ModuleSummaryWriter {
034
035    /**
036     * Get the header for the summary.
037     *
038     * @param heading module name.
039     * @return the header to be added to the content
040     */
041    Content getModuleHeader(String heading);
042
043    /**
044     * Get the header for the module content.
045     *
046     * @return the module content header
047     */
048    Content getContentHeader();
049
050    /**
051     * Get the header for the summary header.
052     *
053     * @return the summary header
054     */
055    Content getSummariesList();
056
057    /**
058     * Wrap the content into summary section.
059     *
060     * @param source the content to wrap into the summary section
061     * @return the summary
062     */
063    Content getSummary(Content source);
064
065    /**
066     * Adds the module description.
067     *
068     * @param moduleContent the content to which the module description
069     *                      will be added
070     */
071    void addModuleDescription(Content moduleContent);
072
073    /**
074     * Adds the module signature.
075     *
076     * @param moduleContent the content to which the module signature
077     *                      will be added
078     */
079    void addModuleSignature(Content moduleContent);
080
081    /**
082     * Adds the summary of modules to the list of summaries.
083     *
084     * @param summariesList the list of summaries
085     */
086    void addModulesSummary(Content summariesList);
087
088    /**
089     * Adds the summary of packages to the list of summaries.
090     *
091     * @param summariesList the list of summaries
092     */
093    void addPackagesSummary(Content summariesList);
094
095    /**
096     * Adds the summary of services to the list of summaries.
097     *
098     * @param summariesList the list of summaries
099     */
100    void addServicesSummary(Content summariesList);
101
102    /**
103     * Adds the module content to the documentation.
104     *
105     * @param source the content that will be added
106     */
107    void addModuleContent(Content source);
108
109    /**
110     * Adds the footer to the documentation.
111     */
112    void addModuleFooter();
113
114    /**
115     * Print the module summary document.
116     *
117     * @param content the content that will be printed
118     * @throws DocFileIOException if there is a problem while writing the document
119     */
120    void printDocument(Content content) throws DocFileIOException;
121}