Clover coverage report - Code Coverage for hivemind release 1.0-beta-1
Coverage timestamp: Sat Jul 3 2004 09:41:37 EDT
file stats: LOC: 121   Methods: 0
NCLOC: 23   Classes: 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
 
 Source file Conditionals Statements Methods TOTAL
Module.java - - - -
coverage
 1   
 //  Copyright 2004 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   
 
 18   
 import java.util.List;
 19   
 import java.util.Locale;
 20   
 
 21   
 import org.apache.hivemind.ClassResolver;
 22   
 import org.apache.hivemind.ErrorHandler;
 23   
 import org.apache.hivemind.Locatable;
 24   
 import org.apache.hivemind.Location;
 25   
 import org.apache.hivemind.Messages;
 26   
 import org.apache.hivemind.schema.Translator;
 27   
 
 28   
 /**
 29   
  * The definition of a HiveMind Module.  A Module is
 30   
  * a container of service extension points and
 31   
  * configuration extension points.  It also acts as a "gateway" so that services
 32   
  * and configurations in other modules may be accessed.
 33   
  *
 34   
  * @author Howard Lewis Ship
 35   
  */
 36   
 public interface Module extends Locatable
 37   
 {
 38   
     /**
 39   
      * Returns the unique identifier for this module.
 40   
      */
 41   
     public String getModuleId();
 42   
 
 43   
     /**
 44   
      * Looks up
 45   
      * the {@link ServicePoint} (throwing an exception if not found)
 46   
      * and invokes {@link ServicePoint#getService(Class)}.
 47   
      * 
 48   
      * @param serviceId an unqualified id for a service within this module, or a fully qualified id for a service in this or any other module
 49   
      * @param serviceInterface type the result will be cast to
 50   
      */
 51   
     public Object getService(String serviceId, Class serviceInterface);
 52   
 
 53   
     /**
 54   
      * Returns the identified service extension point.
 55   
      * 
 56   
      * @param serviceId an unqualified id for a service within this module, or a fully qualified id for a service in this or any other module
 57   
      * @throws org.apache.hivemind.ApplicationRuntimeException if no such service extension point exists
 58   
      */
 59   
 
 60   
     public ServicePoint getServicePoint(String serviceId);
 61   
 
 62   
     /**
 63   
      * Returns the {@link java.util.List} of elements for the
 64   
      * specified configuration point.  The returned List
 65   
      * is unmodifiable.  It may be empty, but won't be null.
 66   
      * 
 67   
      * <p>It is expressly the <em>caller's</em> job to sort the elements
 68   
      * into an appropriate order (a copy will have to be made since
 69   
      * the returned List is unmodifiable).
 70   
      * 
 71   
      * @param configurationId an unqualified id for a configuration within this module, or a fully qualified id for a configuration in this or any other module
 72   
      * @throws ApplicationRuntimeException if this module does not
 73   
      * contain the specified configuration extension point.
 74   
      * 
 75   
      */
 76   
     public List getConfiguration(String configurationId);
 77   
 
 78   
     /**
 79   
      * Returns the resource resolver for this module.  The resource resolver
 80   
      * is used to locate classes by name (using the correct classloader).
 81   
      */
 82   
 
 83   
     public ClassResolver getClassResolver();
 84   
 
 85   
     /**
 86   
      * Returns an object that can provide and format localized messages for this
 87   
      * module.  The messages come from a properties file,
 88   
      * <code>hivemodule.properties</code> (localized)
 89   
      * stored with the HiveMind deployment descriptor in the META-INF folder.
 90   
      */
 91   
 
 92   
     public Messages getMessages();
 93   
     
 94   
     /**
 95   
      * @see RegistryInfrastructure#getTranslator(String)
 96   
      */
 97   
     public Translator getTranslator(String translator);
 98   
 
 99   
     /**
 100   
      * @see RegistryInfrastructure#getServiceModelFactory(String)
 101   
      */    
 102   
     public ServiceModelFactory getServiceModelFactory(String name);
 103   
     
 104   
     /**
 105   
      * @see org.apache.hivemind.Registry#getLocale()
 106   
      */
 107   
     public Locale getLocale();
 108   
     
 109   
     /**
 110   
      *  @see org.apache.hivemind.internal.RegistryInfrastructure#expandSymbols(String, Location)
 111   
      * 
 112   
      */
 113   
     public String expandSymbols(String input, Location location);
 114   
     
 115   
     /**
 116   
      * Returns the {@link org.apache.hivemind.ErrorHandler} for this Registry.
 117   
      */
 118   
     
 119   
     public ErrorHandler getErrorHandler();
 120   
 }
 121