org.apache.hivemind.internal
Interface ConfigurationPoint

All Superinterfaces:
ExtensionPoint, Locatable
All Known Implementing Classes:
ConfigurationPointImpl

public interface ConfigurationPoint
extends ExtensionPoint

An extension point that provides configuration data in the form of a list of elements.

Author:
Howard Lewis Ship

Method Summary
 boolean areElementsMappable()
          Returns true if the elements contributed to this configuration point can be retrieved as a Map.
 Schema getContributionsSchema()
          Returns the Schema for contributions to the configuration point (which may be null if the point does not define a schema for contributions).
 java.util.List getElements()
          Returns the constructed extensions as a list of elements assembled from the various contributions.
 java.util.Map getElementsAsMap()
          Returns the constructed extensions as a Map of elements assembled from the various contributions.
 
Methods inherited from interface org.apache.hivemind.internal.ExtensionPoint
getErrorLog, getExtensionPointId, getLog, getModule, visibleToModule
 
Methods inherited from interface org.apache.hivemind.Locatable
getLocation
 

Method Detail

getElements

java.util.List getElements()
Returns the constructed extensions as a list of elements assembled from the various contributions. The List is unmodifiable. May return an empty list, but won't return null. May return a proxy to the actual data (which is constructed only as needed), but user code shouldn't care about that.


areElementsMappable

boolean areElementsMappable()
Returns true if the elements contributed to this configuration point can be retrieved as a Map. The contributions in the map are keyed on an attribute as specified by the contributions schema. Thus, as a requirement, this configuration point must have a defined schema, which in turn must support keying of all valid instances.

Since:
1.1

getElementsAsMap

java.util.Map getElementsAsMap()
                               throws ApplicationRuntimeException
Returns the constructed extensions as a Map of elements assembled from the various contributions. The returned Map is unmodifiable and is keyed on the contribution elements' key attribute. Just as getElements() this method may also return a proxy.

If there is no key attribute defined for this configuration's contribution elements an ApplicationRuntimeException is thrown.

Throws:
ApplicationRuntimeException
Since:
1.1

getContributionsSchema

Schema getContributionsSchema()
Returns the Schema for contributions to the configuration point (which may be null if the point does not define a schema for contributions).