org.nakedobjects.metamodel.services
Class ServicesInjectorAbstract

java.lang.Object
  extended by org.nakedobjects.metamodel.services.ServicesInjectorAbstract
All Implemented Interfaces:
Component, Injectable, SessionScopedComponent, ServicesInjector
Direct Known Subclasses:
ServicesInjectorDefault

public abstract class ServicesInjectorAbstract
extends java.lang.Object
implements ServicesInjector


Constructor Summary
ServicesInjectorAbstract()
           
 
Method Summary
 void close()
          Indicates to the component that no more requests will be made of it and it can safely release any services it has hold of.
 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 ServicesInjector.injectDependencies(Object), but for all objects in the list.
 void injectDependencies(java.lang.Object object)
          Inject all services and the container into the object.
 void injectInto(java.lang.Object candidate)
          That is, injecting this injector...
 void open()
          Ensure that all services are wired into each other.
 void setContainer(DomainObjectContainer container)
          Container to inject.
 void setServices(java.util.List<java.lang.Object> services)
          Services to be injected.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServicesInjectorAbstract

public ServicesInjectorAbstract()
Method Detail

open

public void open()
Ensure that all services are wired into each other.

Specified by:
open in interface SessionScopedComponent

close

public void close()
Description copied from interface: SessionScopedComponent
Indicates to the component that no more requests will be made of it and it can safely release any services it has hold of.

Specified by:
close in interface SessionScopedComponent

getContainer

public DomainObjectContainer getContainer()
Specified by:
getContainer in interface ServicesInjector

setContainer

public void setContainer(DomainObjectContainer container)
Description copied from interface: ServicesInjector
Container to inject.

This itself is injected.

Specified by:
setContainer in interface ServicesInjector

setServices

public void setServices(java.util.List<java.lang.Object> services)
Description copied from interface: ServicesInjector
Services to be injected.

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

Specified by:
setServices in interface ServicesInjector

getRegisteredServices

public java.util.List<java.lang.Object> getRegisteredServices()
Description copied from interface: ServicesInjector
All registered services, as an immutable List.

Does not include the container.

Specified by:
getRegisteredServices in interface ServicesInjector

injectDependencies

public void injectDependencies(java.lang.Object object)
Description copied from interface: ServicesInjector
Inject all services and the container into the object.

Specified by:
injectDependencies in interface ServicesInjector

injectDependencies

public void injectDependencies(java.util.List<java.lang.Object> objects)
Description copied from interface: ServicesInjector
As per ServicesInjector.injectDependencies(Object), but for all objects in the list.

Specified by:
injectDependencies in interface ServicesInjector

injectInto

public void injectInto(java.lang.Object candidate)
That is, injecting this injector...

Specified by:
injectInto in interface Injectable


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