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: 124   Methods: 0
NCLOC: 18   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
RegistryInfrastructure.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   
 import java.util.List;
 18   
 import java.util.Locale;
 19   
 
 20   
 import org.apache.hivemind.ErrorHandler;
 21   
 import org.apache.hivemind.Location;
 22   
 import org.apache.hivemind.schema.Translator;
 23   
 
 24   
 /**
 25   
  * Extension of {@link org.apache.hivemind.Registry} provided by some
 26   
  * internals of HiveMind to fasciliate the creation of services and
 27   
  * configurations.
 28   
  *
 29   
  * @author Howard Lewis Ship
 30   
  */
 31   
 public interface RegistryInfrastructure
 32   
 {
 33   
     /**
 34   
      * Obtains a service from the registry. Typically, what's returned is a proxy, 
 35   
      * but that's irrelevant to the caller, which simply will invoke methods
 36   
      * of the service interface.
 37   
      * 
 38   
      * @param serviceId the fully qualified id of the service to obtain
 39   
      * @param serviceInterface the class to which the service will be cast
 40   
      * @return the service
 41   
      * @throws ApplicationRuntimeException if the service does not exist, or if
 42   
      * it can't be cast to the specified service interface
 43   
      */
 44   
 
 45   
     public Object getService(String serviceId, Class serviceInterface);
 46   
 
 47   
     /**
 48   
      * Returns the converted items contributed to the configuration point.
 49   
      * 
 50   
      * @param configurationId the fully qualified id of the configuration
 51   
      * @returns List of converted elements
 52   
      * @throws org.apache.hivemind.ApplicationRuntimeException if no such configuration extension point exists
 53   
      */
 54   
 
 55   
     public List getConfiguration(String configurationId);
 56   
 
 57   
     /**
 58   
      * Returns the configuration point.
 59   
      * 
 60   
      * @param configurationId the fully qualified id of the configuration
 61   
      * @return ConfigurationPoint matching the configuration id
 62   
      * @throws org.apache.hivemind.ApplicationRuntimeException if the configurationId does not exist
 63   
      */
 64   
 
 65   
     public ConfigurationPoint getConfigurationPoint(String configurationId);
 66   
 
 67   
     /**
 68   
      * Returns the identified service extension point.
 69   
      * 
 70   
      * @param serviceId fully qualified id of the service point
 71   
      * @throws org.apache.hivemind.ApplicationRuntimeException if no such service extension point exists
 72   
      */
 73   
 
 74   
     public ServicePoint getServicePoint(String serviceId);
 75   
 
 76   
     /**
 77   
      * Expands any substitution symbols in the input string, replacing
 78   
      * each symbol with the symbols value (if known).  If a symbol
 79   
      * is unknown, then the symbol is passed
 80   
      * through unchanged (complete with the <code>${</code> and <code>}</code>
 81   
      * delimiters) and an error is logged.
 82   
      * 
 83   
      * @param input input string to be converted, which may (or may not) contain
 84   
      * any symbols.
 85   
      * @param location the location from which the string was obtained, used if
 86   
      * an error is logged.
 87   
      */
 88   
 
 89   
     public String expandSymbols(String input, Location location);
 90   
 
 91   
     /**
 92   
      * Returns a named service-model factory
 93   
      */
 94   
 
 95   
     public ServiceModelFactory getServiceModelFactory(String name);
 96   
 
 97   
     /**
 98   
      * Gets a {@link Translator} instance. The Translator may be a shared, cached
 99   
      * instance (Translators should be stateless).  Translators are identified by a constructor, which
 100   
      * may be the name of a translator defined in the <code>hivemind.Translators</code>
 101   
      * extension point (a single builtin translator, <code>class</code>,
 102   
      * is hardcoded).  Alternately, the name may consist of a translator name, a comma, and an 
 103   
      * initializer string for the service (example: <code>int,min=5</code>). 
 104   
      * 
 105   
      * @param constructor the name and optional initialization of a Translator
 106   
      * @return a {@link Translator} instance
 107   
      * @throws ApplicationRuntimeException if the translator can not be constructed (i.e., the name
 108   
      * is not known) 
 109   
      */
 110   
     public Translator getTranslator(String translator);
 111   
 
 112   
     /**
 113   
      * Returns the locale for which the registry was created.
 114   
      */
 115   
 
 116   
     public Locale getLocale();
 117   
 
 118   
     /**
 119   
      * Returns the {@link org.apache.hivemind.ErrorHandler} for this Registry.
 120   
      */
 121   
 
 122   
     public ErrorHandler getErrorHander();
 123   
 }
 124