|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Extension of Registry
provided by some
internals of HiveMind to fasciliate the creation of services and
configurations.
Method Summary | |
java.lang.String |
expandSymbols(java.lang.String input,
Location location)
Expands any substitution symbols in the input string, replacing each symbol with the symbols value (if known). |
java.util.List |
getConfiguration(java.lang.String configurationId)
Returns the converted items contributed to the configuration point. |
ConfigurationPoint |
getConfigurationPoint(java.lang.String configurationId)
Returns the configuration point. |
ErrorHandler |
getErrorHander()
Returns the ErrorHandler for this Registry. |
java.util.Locale |
getLocale()
Returns the locale for which the registry was created. |
java.lang.Object |
getService(java.lang.Class serviceInterface)
Finds a service that implements the provided interface. |
java.lang.Object |
getService(java.lang.String serviceId,
java.lang.Class serviceInterface)
Obtains a service from the registry. |
ServiceModelFactory |
getServiceModelFactory(java.lang.String name)
Returns a named service-model factory |
ServicePoint |
getServicePoint(java.lang.String serviceId)
Returns the identified service extension point. |
Translator |
getTranslator(java.lang.String translator)
Gets a Translator instance. |
Method Detail |
public java.lang.Object getService(java.lang.String serviceId, java.lang.Class serviceInterface)
serviceId
- the fully qualified id of the service to obtainserviceInterface
- the class to which the service will be cast
ApplicationRuntimeException
- if the service does not exist, or if
it can't be cast to the specified service interfacepublic java.lang.Object getService(java.lang.Class serviceInterface)
serviceInterface
- used to locate the servicepublic java.util.List getConfiguration(java.lang.String configurationId)
configurationId
- the fully qualified id of the configuration
ApplicationRuntimeException
- if no such configuration extension point existspublic ConfigurationPoint getConfigurationPoint(java.lang.String configurationId)
configurationId
- the fully qualified id of the configuration
ApplicationRuntimeException
- if the configurationId does not existpublic ServicePoint getServicePoint(java.lang.String serviceId)
serviceId
- fully qualified id of the service point
ApplicationRuntimeException
- if no such service extension point existspublic java.lang.String expandSymbols(java.lang.String input, Location location)
${
and }
delimiters) and an error is logged.
input
- input string to be converted, which may (or may not) contain
any symbols.location
- the location from which the string was obtained, used if
an error is logged.public ServiceModelFactory getServiceModelFactory(java.lang.String name)
public Translator getTranslator(java.lang.String translator)
Translator
instance. The Translator may be a shared, cached
instance (Translators should be stateless). Translators are identified by a constructor, which
may be the name of a translator defined in the hivemind.Translators
extension point (a single builtin translator, class
,
is hardcoded). Alternately, the name may consist of a translator name, a comma, and an
initializer string for the service (example: int,min=5
).
Translator
instance
ApplicationRuntimeException
- if the translator can not be constructed (i.e., the name
is not known)public java.util.Locale getLocale()
public ErrorHandler getErrorHander()
ErrorHandler
for this Registry.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |