Class OutletConfiguration
java.lang.Object
org.apache.torque.generator.configuration.outlet.OutletConfiguration
Administers the available Outlets.
-
Constructor Summary
ConstructorsConstructorDescriptionOutletConfiguration(Collection<Outlet> outlets, Collection<MergepointMapping> mergepointMappings, UnitDescriptor unitDescriptor) Creates a OutletConfiguration containing a list of Outlets. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddOutlet(Outlet outlet, UnitDescriptor unitDescriptor) Adds a outlet.getOutlet(QualifiedName name) Returns the outlet with the namename.Returns a map containing all the configured outlets, keyed by their name.booleanoutletExists(QualifiedName qualifiedName) Returns whether a outlet for the given name exists.voidResolves the isolated merge point mappings and adds them to the relevant outlets.toString()Creates a String view of this object for debuggung purposes.
-
Constructor Details
-
OutletConfiguration
public OutletConfiguration(Collection<Outlet> outlets, Collection<MergepointMapping> mergepointMappings, UnitDescriptor unitDescriptor) throws ConfigurationException Creates a OutletConfiguration containing a list of Outlets.- Parameters:
outlets- the map of outlets, keyed by their name, not null.mergepointMappings- all isolated mergepoint mappings, not null.unitDescriptor- the descriptor of the unit of generation, not null.- Throws:
ConfigurationException- if outlets contains two outlets with the same name.NullPointerException- if a parameter is null.
-
-
Method Details
-
resolveMergepointMappings
Resolves the isolated merge point mappings and adds them to the relevant outlets.- Throws:
ConfigurationException- if configuration not found
-
getOutlets
Returns a map containing all the configured outlets, keyed by their name.- Returns:
- all outlets, not null.
- Throws:
IllegalStateException- if the mergepoint mappings have not yet been resolved.
-
getOutlet
Returns the outlet with the namename.- Parameters:
name- the name of the outlet to be returned.- Returns:
- The outlet with the given name, or null if it does not exist.
- Throws:
IllegalStateException- if the mergepoint mappings have not yet been resolved.
-
addOutlet
Adds a outlet.- Parameters:
outlet- the outlet to be added, not null.unitDescriptor- the descriptor of the generation unit, not null.- Throws:
ConfigurationException- if a outlet with the outlet's name already exists in the configuration.NullPointerException- if outlet is null.
-
toString
Creates a String view of this object for debuggung purposes. -
outletExists
Returns whether a outlet for the given name exists. Name and namespace must match exactly.- Parameters:
qualifiedName- the name of the outlet.- Returns:
- true if a outlet with the name exists, false otherwise.
-