public class ServicesInjectorDefault extends Object implements ServicesInjectorSpi
| Constructor and Description |
|---|
ServicesInjectorDefault() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.isis.applib.DomainObjectContainer |
getContainer() |
List<Object> |
getRegisteredServices()
All registered services, as an immutable
List. |
void |
init()
Indicates to the component that it is to initialise itself.
|
void |
injectInto(Object candidate)
That is, injecting this injector...
|
void |
injectServicesInto(List<Object> objects)
As per
ServicesInjector.injectServicesInto(Object), but for all objects in the
list. |
void |
injectServicesInto(Object object)
Provided by the ServicesInjectorDefault when used by framework.
|
static boolean |
isInjectorMethodFor(Method method,
Class<?> serviceClass) |
<T> T |
lookupService(Class<T> serviceClass)
Returns the first registered domain service implementing the requested type.
|
<T> List<T> |
lookupServices(Class<T> serviceClass)
Returns all domain services implementing the requested type, in the order
that they were registered in isis.properties.
|
void |
setContainer(org.apache.isis.applib.DomainObjectContainer container)
Container to inject.
|
void |
setServices(List<Object> services)
Services to be injected.
|
void |
shutdown()
Indicates to the component that it will no longer be used and should shut
itself down cleanly.
|
public ServicesInjectorDefault()
public void init()
ApplicationScopedComponentinit in interface ApplicationScopedComponentpublic void shutdown()
ApplicationScopedComponentshutdown in interface ApplicationScopedComponentpublic org.apache.isis.applib.DomainObjectContainer getContainer()
getContainer in interface ServicesInjectorSpipublic void setContainer(org.apache.isis.applib.DomainObjectContainer container)
ServicesInjectorSpiThis itself is injected.
setContainer in interface ServicesInjectorSpipublic void setServices(List<Object> services)
ServicesInjectorSpi
Should automatically inject all services into each other (though calling
#open() will also do this).
setServices in interface ServicesInjectorSpipublic List<Object> getRegisteredServices()
ServicesInjectorList.
Does not include the container.
getRegisteredServices in interface ServicesInjectorpublic void injectServicesInto(Object object)
ServicesInjectorCalled in multiple places from metamodel and facets.
injectServicesInto in interface ServicesInjectorpublic void injectServicesInto(List<Object> objects)
ServicesInjectorServicesInjector.injectServicesInto(Object), but for all objects in the
list.injectServicesInto in interface ServicesInjectorpublic void injectInto(Object candidate)
injectInto in interface Injectablepublic static boolean isInjectorMethodFor(Method method, Class<?> serviceClass)
public <T> T lookupService(Class<T> serviceClass)
ServicesInjector
Typically there will only ever be one domain service implementing a given type,
(eg PublishingService), but for some services there can be more than one
(eg ExceptionRecognizer).
lookupService in interface ServicesInjectorServicesInjector.lookupServices(Class)public <T> List<T> lookupServices(Class<T> serviceClass)
ServicesInjector
Typically there will only ever be one domain service implementing a given type,
(eg PublishingService), but for some services there can be more than one
(eg ExceptionRecognizer).
lookupServices in interface ServicesInjectorServicesInjector.lookupService(Class)Copyright © 2010–2014 The Apache Software Foundation. All rights reserved.