Clover coverage report - Code Coverage for hivemind release 1.1.1
Coverage timestamp: Sat Jan 28 2006 10:19:31 PST
file stats: LOC: 67   Methods: 0
NCLOC: 11   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
ConfigurationPoint.java - - - -
coverage
 1    // Copyright 2004, 2005 The Apache Software Foundation
 2    //
 3    // Licensed under the Apache License, Version 2.0 (the "License");
 4    // you may not use this file except in compliance with the License.
 5    // You may obtain a copy of the License at
 6    //
 7    // http://www.apache.org/licenses/LICENSE-2.0
 8    //
 9    // Unless required by applicable law or agreed to in writing, software
 10    // distributed under the License is distributed on an "AS IS" BASIS,
 11    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 12    // See the License for the specific language governing permissions and
 13    // limitations under the License.
 14   
 15    package org.apache.hivemind.internal;
 16   
 17    import java.util.List;
 18    import java.util.Map;
 19   
 20    import org.apache.hivemind.ApplicationRuntimeException;
 21    import org.apache.hivemind.schema.Schema;
 22   
 23    /**
 24    * An extension point that provides configuration data in the form of a list of elements.
 25    *
 26    * @author Howard Lewis Ship
 27    */
 28    public interface ConfigurationPoint extends ExtensionPoint
 29    {
 30    /**
 31    * Returns the constructed extensions as a list of elements assembled from the various
 32    * contributions. The List is unmodifiable. May return an empty list, but won't return null. May
 33    * return a proxy to the actual data (which is constructed only as needed), but user code
 34    * shouldn't care about that.
 35    */
 36    public List getElements();
 37   
 38    /**
 39    * Returns true if the elements contributed to this configuration point can be
 40    * {@link #getElementsAsMap() retrieved as a Map}. The contributions in the map are keyed on
 41    * an attribute as specified by the contributions schema. Thus, as a requirement, this
 42    * configuration point must have a defined schema, which in turn must support
 43    * {@link Schema#canInstancesBeKeyed() keying} of all valid instances.
 44    *
 45    * @since 1.1
 46    */
 47    public boolean areElementsMappable();
 48   
 49    /**
 50    * Returns the constructed extensions as a Map of elements assembled from the various
 51    * contributions. The returned Map is unmodifiable and is keyed on the contribution elements'
 52    * {@link org.apache.hivemind.schema.ElementModel#getKeyAttribute() key attribute}. Just as
 53    * {@link #getElements()} this method may also return a proxy.
 54    * <p>
 55    * If there is no key attribute defined for this configuration's contribution elements an
 56    * {@link org.apache.hivemind.ApplicationRuntimeException} is thrown.
 57    *
 58    * @since 1.1
 59    */
 60    public Map getElementsAsMap() throws ApplicationRuntimeException;
 61   
 62    /**
 63    * Returns the Schema for contributions to the configuration point (which may be null if the
 64    * point does not define a schema for contributions).
 65    */
 66    public Schema getContributionsSchema();
 67    }