Class Configurations
- All Implemented Interfaces:
Iterable<Configuration>, Collection<Configuration>, List<Configuration>, SequencedCollection<Configuration>, Dumpable
Configuration instances.
The ordering of Configurations will initially be the order in which they
are added. The sort() method can be used to apply a
TopologicalSort to the ordering as defined by the
Configuration.getDependencies() and
Configuration.getDependents() methods.
Instances that do not have ordering dependencies will maintain
their add order, as will additions/insertions made after the
the sort.
If an added Configuration returns a value for
Configuration.replaces() then the added instance will replace
any existing instance of that type or that has already replaced that
type.
-
Nested Class Summary
Nested classes/interfaces inherited from interface Dumpable
Dumpable.DumpableContainer -
Field Summary
FieldsFields inherited from class AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionConfigurations(String... classes) Configurations(List<String> classes) Configurations(Configurations classlist) -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanadd(Configuration configuration) voidadd(Configuration... configurations) voidclear()booleanconfigure(WebAppContext webapp) dump()voiddump(Appendable out, String indent) Dump this object (and children) into an Appendable using the provided indent after any new lines.get(int index) <T> T<T> List<T> getConfigurations(Class<? extends T> configClass) static List<Configuration> getKnown()static ConfigurationsgetServerDefault(Server server) Get/Create the server default Configuration ClassList.iterator()protected static ConfigurationnewConfiguration(String classname) voidpostConfigure(WebAppContext webapp) voidpreConfigure(WebAppContext webapp) voidremove(Class<? extends Configuration>... configClass) voidvoidremove(Configuration... configurations) voidvoidset(Configuration... configurations) static voidstatic ConfigurationssetServerDefault(Server server) Get/Set/Create the server default Configuration ClassList.intsize()voidsort()static voidsort(List<Configuration> configurations) String[]toArray()toString()Methods inherited from class AbstractList
add, addAll, equals, hashCode, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListMethods inherited from class AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArrayMethods inherited from interface Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface List
addAll, addFirst, addLast, contains, containsAll, getFirst, getLast, isEmpty, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, sort, spliterator, toArray
-
Field Details
-
_configurations
-
-
Constructor Details
-
Configurations
public Configurations() -
Configurations
-
Configurations
-
Configurations
-
-
Method Details
-
getKnown
-
setKnown
-
setServerDefault
Get/Set/Create the server default Configuration ClassList.Get the class list from: a Server bean; or the attribute (which can either be a ClassList instance or an String[] of class names); or a new instance with default configuration classes.
This method also adds the obtained ClassList instance as a dependent bean on the server and clears the attribute
- Parameters:
server- The server the default is for- Returns:
- the server default ClassList instance of the configuration classes for this server. Changes to this list will change the server default instance.
-
getServerDefault
Get/Create the server default Configuration ClassList.Get the class list from: a Server bean; or the attribute (which can either be a ClassList instance or an String[] of class names); or a new instance with default configuration classes.
- Parameters:
server- The server the default is for- Returns:
- A copy of the server default ClassList instance of the configuration classes for this server. Changes to the returned list will not change the server default.
-
newConfiguration
-
add
- Specified by:
addin interfaceCollection<Configuration>- Specified by:
addin interfaceList<Configuration>- Overrides:
addin classAbstractList<Configuration>
-
add
-
add
-
get
-
getConfigurations
-
clear
public void clear()- Specified by:
clearin interfaceCollection<Configuration>- Specified by:
clearin interfaceList<Configuration>- Overrides:
clearin classAbstractList<Configuration>
-
set
-
set
-
remove
-
remove
-
remove
-
size
public int size()- Specified by:
sizein interfaceCollection<Configuration>- Specified by:
sizein interfaceList<Configuration>- Specified by:
sizein classAbstractCollection<Configuration>
-
toArray
- Specified by:
toArrayin interfaceCollection<Configuration>- Specified by:
toArrayin interfaceList<Configuration>- Overrides:
toArrayin classAbstractCollection<Configuration>
-
sort
public void sort() -
sort
-
getConfigurations
-
get
- Specified by:
getin interfaceList<Configuration>- Specified by:
getin classAbstractList<Configuration>
-
iterator
- Specified by:
iteratorin interfaceCollection<Configuration>- Specified by:
iteratorin interfaceIterable<Configuration>- Specified by:
iteratorin interfaceList<Configuration>- Overrides:
iteratorin classAbstractList<Configuration>
-
toString
- Overrides:
toStringin classAbstractCollection<Configuration>
-
preConfigure
- Throws:
Exception
-
configure
- Parameters:
webapp- The webapp to configure- Returns:
- false if a
Configuration.abort(WebAppContext)returns true, true otherwise - Throws:
Exception- Thrown byConfiguration.configure(WebAppContext)
-
postConfigure
- Throws:
Exception
-
dump
-
dump
Description copied from interface:DumpableDump this object (and children) into an Appendable using the provided indent after any new lines. The indent should not be applied to the first object dumped.- Specified by:
dumpin interfaceDumpable- Parameters:
out- The appendable to dump toindent- The indent to apply after any new lines.- Throws:
IOException- if unable to write to Appendable
-