org.nakedobjects.metamodel.services
Interface ServicesInjector

All Superinterfaces:
Component, Injectable, SessionScopedComponent
All Known Implementing Classes:
ServicesInjectorAbstract, ServicesInjectorDefault

public interface ServicesInjector
extends SessionScopedComponent, Injectable

The repository of services, also able to inject into any object.

The domain object container is always injected but is not a registered service.


Method Summary
 DomainObjectContainer getContainer()
           
 java.util.List<java.lang.Object> getRegisteredServices()
          All registered services, as an immutable List.
 void injectDependencies(java.util.List<java.lang.Object> objects)
          As per injectDependencies(Object), but for all objects in the list.
 void injectDependencies(java.lang.Object domainObject)
          Inject all services and the container into the object.
 void setContainer(DomainObjectContainer container)
          Container to inject.
 void setServices(java.util.List<java.lang.Object> services)
          Services to be injected.
 
Methods inherited from interface org.nakedobjects.metamodel.commons.component.SessionScopedComponent
close, open
 
Methods inherited from interface org.nakedobjects.metamodel.commons.component.Injectable
injectInto
 

Method Detail

getContainer

DomainObjectContainer getContainer()

setContainer

void setContainer(DomainObjectContainer container)
Container to inject.

This itself is injected.


setServices

void setServices(java.util.List<java.lang.Object> services)
Services to be injected.

Should automatically inject all services into each other (though calling SessionScopedComponent.open() will also do this).

Parameters:
services -

getRegisteredServices

java.util.List<java.lang.Object> getRegisteredServices()
All registered services, as an immutable List.

Does not include the container.


injectDependencies

void injectDependencies(java.lang.Object domainObject)
Inject all services and the container into the object.


injectDependencies

void injectDependencies(java.util.List<java.lang.Object> objects)
As per injectDependencies(Object), but for all objects in the list.



Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.