org.springframework.jee.inject
Class DeploymentUnitMetadata

java.lang.Object
  extended by org.springframework.jee.inject.DeploymentUnitMetadata

public class DeploymentUnitMetadata
extends java.lang.Object

Metadata associated with whole deployment unit, such as an EJB JAR file. It is possible to find metadata about all deployed components from this.

Author:
Rod Johnson

Constructor Summary
DeploymentUnitMetadata()
           
 
Method Summary
 void associate(org.springframework.context.ApplicationContext deploymentContext, org.springframework.beans.factory.support.BeanDefinitionRegistry bdr)
          Associate this DeploymentUnitMetadata with the given deployment unit level ApplicationContext and corresponding BeanDefinitionRegistry.
 java.lang.String composeLookupLocation(java.lang.String name)
          Simple method for composing the final location for a name lookup.
 ApplicationExceptionInfo getApplicationExceptionInfo(java.lang.Class<? extends java.lang.Exception> t)
           
 java.util.Map<java.lang.Class<? extends java.lang.Exception>,ApplicationExceptionInfo> getApplicationExceptions()
           
 org.springframework.aop.aspectj.annotation.AspectJAdvisorFactory getAspectJAdvisorFactory()
           
 java.util.List<java.lang.Class<?>> getContainerControlInterfaces()
           
 java.util.List<InterceptorMetadata> getDefaultInterceptorMetadata()
           
 java.util.List<Jsr250Metadata> getDeployedComponentMetadata()
           
 ServiceEnvironment getEnvironment()
           
 Platform getTargetPlatform()
          Return the target platform for this deployment unit.
protected  void initEnvironment()
          Used to add a default ServiceEnvironment if none is provided.
 boolean isLimitToSpec()
           
 java.lang.Object lookup(java.lang.String name)
          Helper JNDI container-aware lookup method.
 void registerApplicationExceptionInfo(java.lang.Class<? extends java.lang.Exception> t, ApplicationExceptionInfo aei)
          Register an applicationExceptionInfo.
 void registerContainerControlInterface(java.lang.Class<?> containerControlInterface)
          Register the given interface as a container control interface, meaning that it will not be intercepted
 void registerDefaultInterceptorMetadata(InterceptorMetadata defaultIm)
          Add default interceptor metadata to the deploymentUnitMetadata.
protected  void registerDeployedComponentMetadata(Jsr250Metadata deployedComponentMetadata)
           
 void setEnvironment(ServiceEnvironment environment)
           
 void setLimitToSpec(boolean limitToSpec)
           
 void setTargetPlatform(Platform targetPlatform)
           
 void startup()
          Start the deploymentUnitMetada: register the default interceptors and refresh the deploymentUnitContext as well as metadata contexts.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeploymentUnitMetadata

public DeploymentUnitMetadata()
Method Detail

getTargetPlatform

public Platform getTargetPlatform()
Return the target platform for this deployment unit. Controls validation rules that will be applied.

Returns:
the target platform for this deployment unit.

setTargetPlatform

public void setTargetPlatform(Platform targetPlatform)

associate

public void associate(org.springframework.context.ApplicationContext deploymentContext,
                      org.springframework.beans.factory.support.BeanDefinitionRegistry bdr)
Associate this DeploymentUnitMetadata with the given deployment unit level ApplicationContext and corresponding BeanDefinitionRegistry. Must be called exactly once.

Parameters:
deploymentContext - deployment unit context
bdr - BeanDefinitionRegistry allowing additions to the context

lookup

public java.lang.Object lookup(java.lang.String name)
                        throws javax.naming.NamingException
Helper JNDI container-aware lookup method.

Parameters:
name -
Returns:
Throws:
javax.naming.NamingException

composeLookupLocation

public java.lang.String composeLookupLocation(java.lang.String name)
Simple method for composing the final location for a name lookup. Subclasses should extend this to add custom behavior (i.e. different JNDI prefixes).

Parameters:
name -
Returns:

getAspectJAdvisorFactory

public org.springframework.aop.aspectj.annotation.AspectJAdvisorFactory getAspectJAdvisorFactory()

getDefaultInterceptorMetadata

public java.util.List<InterceptorMetadata> getDefaultInterceptorMetadata()
Returns:
the default interceptors for the deployment unit. Core spec, 11.6

registerDefaultInterceptorMetadata

public void registerDefaultInterceptorMetadata(InterceptorMetadata defaultIm)
Add default interceptor metadata to the deploymentUnitMetadata. Useful for application servers or managed environments.

Parameters:
defaultIm -

getDeployedComponentMetadata

public java.util.List<Jsr250Metadata> getDeployedComponentMetadata()
Returns:
the deployedComponents

registerDeployedComponentMetadata

protected void registerDeployedComponentMetadata(Jsr250Metadata deployedComponentMetadata)

isLimitToSpec

public boolean isLimitToSpec()
Returns:
whether or not the container should limit to the spec; for example, not allowing mixing of Spring injection idioms with JEE idioms.

setLimitToSpec

public void setLimitToSpec(boolean limitToSpec)
Parameters:
limitToSpec - the limitToSpec to set

registerApplicationExceptionInfo

public void registerApplicationExceptionInfo(java.lang.Class<? extends java.lang.Exception> t,
                                             ApplicationExceptionInfo aei)
Register an applicationExceptionInfo. Useful for application servers or managed environments.

Parameters:
t - applicationException class
aei - applicationExceptionInfo

getApplicationExceptionInfo

public ApplicationExceptionInfo getApplicationExceptionInfo(java.lang.Class<? extends java.lang.Exception> t)

registerContainerControlInterface

public void registerContainerControlInterface(java.lang.Class<?> containerControlInterface)
Register the given interface as a container control interface, meaning that it will not be intercepted

Parameters:
containerControlInterface - container control interface which proxies should implement but whose methods will not be intercepted

getContainerControlInterfaces

public java.util.List<java.lang.Class<?>> getContainerControlInterfaces()

startup

public void startup()
Start the deploymentUnitMetada: register the default interceptors and refresh the deploymentUnitContext as well as metadata contexts.


initEnvironment

protected void initEnvironment()
Used to add a default ServiceEnvironment if none is provided.


getApplicationExceptions

public java.util.Map<java.lang.Class<? extends java.lang.Exception>,ApplicationExceptionInfo> getApplicationExceptions()
Returns:
Returns the applicationExceptions.

getEnvironment

public ServiceEnvironment getEnvironment()
Returns:
Returns the environment.

setEnvironment

public void setEnvironment(ServiceEnvironment environment)
Parameters:
environment - The environment to set.


Copyright 2006 Interface21. All Rights Reserved.