Search in sources :

Example 1 with Component

use of org.apache.maven.plugins.changes.model.Component in project maven-plugins by apache.

the class ChangesReportGenerator method constructRelease.

/**
     * Constructs document section for specified release.
     *
     * @param sink Sink
     * @param bundle Resource bundle
     * @param release Release to create document section for
     */
private void constructRelease(Sink sink, ResourceBundle bundle, Release release) {
    sink.section2();
    final String date = (release.getDateRelease() == null) ? "" : " – " + release.getDateRelease();
    SinkEventAttributes attrs = new SinkEventAttributeSet();
    attrs.addAttribute(SinkEventAttributes.ID, HtmlTools.encodeId(release.getVersion()));
    sink.sectionTitle(Sink.SECTION_LEVEL_2, attrs);
    sink.text(bundle.getString("report.changes.label.release") + " " + release.getVersion() + date);
    sink.sectionTitle_(Sink.SECTION_LEVEL_2);
    if (isReleaseEmpty(release)) {
        sink.paragraph();
        sink.text(bundle.getString("report.changes.text.no.changes"));
        sink.paragraph_();
    } else {
        sink.table();
        sink.tableRow();
        sinkHeader(sink, bundle.getString("report.issues.label.type"));
        sinkHeader(sink, bundle.getString("report.issues.label.summary"));
        sinkHeader(sink, bundle.getString("report.issues.label.assignee"));
        if (this.isAddActionDate()) {
            sinkHeader(sink, bundle.getString("report.issues.label.updated"));
        }
        sink.tableRow_();
        for (Action action : release.getActions()) {
            constructAction(sink, bundle, action);
        }
        for (Object o : release.getComponents()) {
            Component component = (Component) o;
            constructComponent(sink, bundle, component);
        }
        sink.table_();
    }
    sink.section2_();
}
Also used : SinkEventAttributes(org.apache.maven.doxia.sink.SinkEventAttributes) SinkEventAttributeSet(org.apache.maven.doxia.sink.SinkEventAttributeSet) Action(org.apache.maven.plugins.changes.model.Action) Component(org.apache.maven.plugins.changes.model.Component)

Aggregations

SinkEventAttributeSet (org.apache.maven.doxia.sink.SinkEventAttributeSet)1 SinkEventAttributes (org.apache.maven.doxia.sink.SinkEventAttributes)1 Action (org.apache.maven.plugins.changes.model.Action)1 Component (org.apache.maven.plugins.changes.model.Component)1