org.qi4j.bootstrap
Interface LayerAssembly


public interface LayerAssembly

Fluid API for declaring a layer in an application. This is obtained by calling ApplicationAssembly.layer(String).


Method Summary
 ApplicationAssembly application()
           
 EntityDeclaration entities(Specification<? super EntityAssembly> specification)
          Given a Specification for EntityAssembly's, returns a EntityDeclaration that can be used to work with all of the assemblies in this Layer matched by the specification.
 ImportedServiceDeclaration importedServices(Specification<? super ImportedServiceAssembly> specification)
          Given a Specification for ImportedServiceAssembly's, returns a ImportedServiceDeclaration that can be used to work with all of the assemblies in this Layer matched by the specification.
 ModuleAssembly module(java.lang.String name)
          Get an assembly for a particular Module.
 java.lang.String name()
           
 ObjectDeclaration objects(Specification<? super ObjectAssembly> specification)
          Given a Specification for ObjectAssembly's, returns a ObjectDeclaration that can be used to work with all of the assemblies in this Layer matched by the specification.
 ServiceDeclaration services(Specification<? super ServiceAssembly> specification)
          Given a Specification for ServiceAssembly's, returns a ServiceDeclaration that can be used to work with all of the assemblies in this Layer matched by the specification.
 LayerAssembly setMetaInfo(java.lang.Object info)
           
 LayerAssembly setName(java.lang.String name)
           
 TransientDeclaration transients(Specification<? super TransientAssembly> specification)
          Given a Specification for TransientAssembly's, returns a TransientDeclaration that can be used to work with all of the assemblies in this Layer matched by the specification.
 LayerAssembly uses(LayerAssembly... layerAssembly)
           
 ValueDeclaration values(Specification<? super ValueAssembly> specification)
          Given a Specification for ValueAssembly's, returns a ValueDeclaration that can be used to work with all of the assemblies in this Layer matched by the specification.
<ThrowableType extends java.lang.Throwable>
void
visit(AssemblyVisitor<ThrowableType> visitor)
           
 LayerAssembly withActivators(java.lang.Class<? extends Activator<Layer>>... activators)
          Set the layer activators.
 

Method Detail

module

ModuleAssembly module(java.lang.String name)
Get an assembly for a particular Module. If this is called many times with the same name, then the same module is affected.

Parameters:
name - The name of the Module to retrieve or create.
Returns:
The ModuleAssembly for the Module.

application

ApplicationAssembly application()

name

java.lang.String name()

setName

LayerAssembly setName(java.lang.String name)

setMetaInfo

LayerAssembly setMetaInfo(java.lang.Object info)

uses

LayerAssembly uses(LayerAssembly... layerAssembly)

withActivators

LayerAssembly withActivators(java.lang.Class<? extends Activator<Layer>>... activators)
Set the layer activators. Activators are executed in order around the Layer activation and passivation.

Parameters:
activators - the layer activators
Returns:
the assembly

visit

<ThrowableType extends java.lang.Throwable> void visit(AssemblyVisitor<ThrowableType> visitor)
           throws ThrowableType extends java.lang.Throwable
Throws:
ThrowableType extends java.lang.Throwable

entities

EntityDeclaration entities(Specification<? super EntityAssembly> specification)
Given a Specification for EntityAssembly's, returns a EntityDeclaration that can be used to work with all of the assemblies in this Layer matched by the specification.

Parameters:
specification - The Specification that specifies the EntityComposite types of interest.
Returns:
An EntityDeclaration for the specified EntityComposite types.

services

ServiceDeclaration services(Specification<? super ServiceAssembly> specification)
Given a Specification for ServiceAssembly's, returns a ServiceDeclaration that can be used to work with all of the assemblies in this Layer matched by the specification.

Parameters:
specification - The Specification that specifies the ServiceComposite types of interest.
Returns:
An ServiceDeclaration for the specified ServiceComposite types.

transients

TransientDeclaration transients(Specification<? super TransientAssembly> specification)
Given a Specification for TransientAssembly's, returns a TransientDeclaration that can be used to work with all of the assemblies in this Layer matched by the specification.

Parameters:
specification - The Specification that specifies the TransientComposite types of interest.
Returns:
An TransientDeclaration for the specified TransientComposite types.

values

ValueDeclaration values(Specification<? super ValueAssembly> specification)
Given a Specification for ValueAssembly's, returns a ValueDeclaration that can be used to work with all of the assemblies in this Layer matched by the specification.

Parameters:
specification - The Specification that specifies the ValueComposite types of interest.
Returns:
An ValueDeclaration for the specified ValueComposite types.

objects

ObjectDeclaration objects(Specification<? super ObjectAssembly> specification)
Given a Specification for ObjectAssembly's, returns a ObjectDeclaration that can be used to work with all of the assemblies in this Layer matched by the specification.

Parameters:
specification - The Specification that specifies the Object types of interest.
Returns:
An ObjectDeclaration for the specified Object types.

importedServices

ImportedServiceDeclaration importedServices(Specification<? super ImportedServiceAssembly> specification)
Given a Specification for ImportedServiceAssembly's, returns a ImportedServiceDeclaration that can be used to work with all of the assemblies in this Layer matched by the specification.

Parameters:
specification - The Specification that specifies the Imported Service types of interest.
Returns:
An ImportedServiceDeclaration for the specified Imported Service types.