org.nakedobjects.metamodel.services.ServicesInjector Maven / Gradle / Ivy
package org.nakedobjects.metamodel.services;
import java.util.List;
import org.nakedobjects.applib.DomainObjectContainer;
import org.nakedobjects.metamodel.commons.component.Injectable;
import org.nakedobjects.metamodel.commons.component.SessionScopedComponent;
/**
* The repository of services, also able to inject into any object.
*
*
* The {@link #getContainer() domain object container} is always injected but
* is not a {@link #getRegisteredServices() registered service}.
*/
public interface ServicesInjector extends SessionScopedComponent, Injectable {
// ///////////////////////////////////////////////////////////////////////////
// Container
// ///////////////////////////////////////////////////////////////////////////
DomainObjectContainer getContainer();
/**
* Container to inject.
*
*
* This itself is injected.
*/
public void setContainer(final DomainObjectContainer container);
// ///////////////////////////////////////////////////////////////////////////
// Services
// ///////////////////////////////////////////////////////////////////////////
/**
* Services to be injected.
*
*
* Should automatically inject all services into each other (though calling
* {@link #open()} will also do this).
*
* @param services
*/
void setServices(List