T
- The base report type for reports of this container.java.util.Collection<T>
, Configurable<ReportContainer<T>>
, DomainObjectCollection<T>
, DomainObjectSet<T>
, java.lang.Iterable<T>
, NamedDomainObjectCollection<T>
, NamedDomainObjectSet<T>
, java.util.Set<T>
BuildDashboardReports
, CheckstyleReports
, CodeNarcReports
, ConfigurationReports
, DependencyReportContainer
, JacocoReportsContainer
, PmdReports
, TestTaskReports
public interface ReportContainer<T extends Report> extends NamedDomainObjectSet<T>, Configurable<ReportContainer<T>>
Report
objects, that represent potential reports.
Things that produce reports (typically tasks) expose a report container that contains Report
objects for each
possible report that they can produce. Each report object can be configured individually, including whether or not it should
be produced by way of its Report.getRequired()
required} property.
ReportContainer
implementations are immutable in that standard collection methods such as add()
, remove()
and clear()
will throw an ReportContainer.ImmutableViolationException
. However, implementations may provide new methods that allow
the addition of new report object and/or the removal of existing report objects.
Modifier and Type | Interface | Description |
---|---|---|
static class |
ReportContainer.ImmutableViolationException |
The exception thrown when any of this container's mutation methods are called.
|
Modifier and Type | Method | Description |
---|---|---|
java.util.SortedMap<java.lang.String,T> |
getAsMap() |
Returns the objects in this collection, as a map from object name to object instance.
|
NamedDomainObjectSet<T> |
getEnabled() |
Returns an immutable collection of all the enabled
Report objects in this container. |
java.util.Map<java.lang.String,T> |
getEnabledReports() |
Returns the enabled reports, keyed by report name.
|
Namer<T> |
getNamer() |
An object that represents the naming strategy used to name objects of this collection.
|
java.util.SortedSet<java.lang.String> |
getNames() |
Returns the names of the objects in this collection as a Set of Strings.
|
java.util.List<Rule> |
getRules() |
Returns the rules used by this collection.
|
boolean |
isEmpty() |
configure
addAllLater, addLater, all, all, configureEach, whenObjectAdded, whenObjectAdded, whenObjectRemoved, whenObjectRemoved, withType, withType
add, addAll, addRule, addRule, addRule, findByName, getAt, getByName, getByName, getByName, getCollectionSchema, named, named, named, named
findAll, matching, matching, withType
@Internal NamedDomainObjectSet<T> getEnabled()
Report
objects in this container.
The returned collection is live. That is, as reports are enabled/disabled the returned collection always reflects the current set of enabled reports.
@Internal Namer<T> getNamer()
NamedDomainObjectCollection
getNamer
in interface NamedDomainObjectCollection<T extends Report>
@Internal java.util.SortedMap<java.lang.String,T> getAsMap()
NamedDomainObjectCollection
Returns the objects in this collection, as a map from object name to object instance.
The map is ordered by the natural ordering of the object names (i.e. keys).
getAsMap
in interface NamedDomainObjectCollection<T extends Report>
@Internal java.util.SortedSet<java.lang.String> getNames()
NamedDomainObjectCollection
Returns the names of the objects in this collection as a Set of Strings.
The set of names is in natural ordering.
getNames
in interface NamedDomainObjectCollection<T extends Report>
@Internal java.util.List<Rule> getRules()
NamedDomainObjectCollection
getRules
in interface NamedDomainObjectCollection<T extends Report>
@Internal boolean isEmpty()
java.util.Map<java.lang.String,T> getEnabledReports()