org.apache.avalon.composition.model.impl
Class DefaultContainmentContext

java.lang.Object
  extended byorg.apache.avalon.framework.context.DefaultContext
      extended byorg.apache.avalon.composition.model.impl.DefaultDeploymentContext
          extended byorg.apache.avalon.composition.model.impl.DefaultContainmentContext
All Implemented Interfaces:
ContainmentContext, Context, DeploymentContext

public class DefaultContainmentContext
extends DefaultDeploymentContext
implements ContainmentContext

Implementation of a containment supplied to a containment model.

Version:
$Revision: 1.1.1.2 $ $Date: 2004/05/19 09:33:05 $
Author:
Avalon Development Team

Field Summary
 
Fields inherited from interface org.apache.avalon.composition.provider.DeploymentContext
SEPARATOR
 
Constructor Summary
DefaultContainmentContext(Logger logger, SystemContext system, ClassLoaderModel model, ModelRepository repository, DependencyGraph graph, ContainmentProfile profile)
          Creation of a new root containment context.
DefaultContainmentContext(Logger logger, SystemContext system, ClassLoaderModel model, ModelRepository repository, DependencyGraph graph, File home, File temp, ContainmentModel parent, ContainmentProfile profile, String partition, String name)
          Creation of a new containment context.
 
Method Summary
 ClassLoader getClassLoader()
          Return the containment classloader.
 ClassLoaderModel getClassLoaderModel()
          Return the containment classloader model.
 ContainmentProfile getContainmentProfile()
          Return the containment profile.
 File getHomeDirectory()
          Return the working directory from which containers may establish persistent content.
 ModelRepository getModelRepository()
          Return the model repository.
 ContainmentModel getParentContainmentModel()
          Return the parent containment model.
 File getTempDirectory()
          Return the temporary directory from which a container may use to establish a transient content directory.
 
Methods inherited from class org.apache.avalon.composition.model.impl.DefaultDeploymentContext
getDependencyGraph, getLogger, getMode, getName, getPartitionName, getProfile, getQualifiedName, getSystemContext
 
Methods inherited from class org.apache.avalon.framework.context.DefaultContext
checkWriteable, get, getContextData, getParent, hide, makeReadOnly, put
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.avalon.composition.provider.DeploymentContext
getDependencyGraph, getLogger, getMode, getName, getPartitionName, getProfile, getQualifiedName, getSystemContext
 
Methods inherited from interface org.apache.avalon.framework.context.Context
get
 

Constructor Detail

DefaultContainmentContext

public DefaultContainmentContext(Logger logger,
                                 SystemContext system,
                                 ClassLoaderModel model,
                                 ModelRepository repository,
                                 DependencyGraph graph,
                                 ContainmentProfile profile)
Creation of a new root containment context.

Parameters:
logger - the logging channel to assign
system - the system context
model - the classloader model
repository - the parent model repository
graph - the parent dependency graph
profile - the containment profile

DefaultContainmentContext

public DefaultContainmentContext(Logger logger,
                                 SystemContext system,
                                 ClassLoaderModel model,
                                 ModelRepository repository,
                                 DependencyGraph graph,
                                 File home,
                                 File temp,
                                 ContainmentModel parent,
                                 ContainmentProfile profile,
                                 String partition,
                                 String name)
Creation of a new containment context.

Parameters:
logger - the logging channel to assign
system - the system context
model - the classloader model
repository - the parent model repository
graph - the parent dependency graph
home - the directory for the container
temp - a temporary directory for the container
profile - the containment profile
partition - the partition that this containment context is established within
name - the assigned containment context name
Method Detail

getHomeDirectory

public File getHomeDirectory()
Return the working directory from which containers may establish persistent content.

Specified by:
getHomeDirectory in interface ContainmentContext
Returns:
the working directory

getTempDirectory

public File getTempDirectory()
Return the temporary directory from which a container may use to establish a transient content directory.

Specified by:
getTempDirectory in interface ContainmentContext
Returns:
the temporary directory

getContainmentProfile

public ContainmentProfile getContainmentProfile()
Return the containment profile.

Specified by:
getContainmentProfile in interface ContainmentContext
Returns:
the containment profile

getModelRepository

public ModelRepository getModelRepository()
Return the model repository.

Specified by:
getModelRepository in interface ContainmentContext
Returns:
the model repository

getClassLoaderModel

public ClassLoaderModel getClassLoaderModel()
Return the containment classloader model.

Specified by:
getClassLoaderModel in interface ContainmentContext
Returns:
the classloader model

getClassLoader

public ClassLoader getClassLoader()
Return the containment classloader. This method is a convinience operation equivalent to getClassLoaderModel().getClassLoader();

Specified by:
getClassLoader in interface ContainmentContext
Returns:
the classloader

getParentContainmentModel

public ContainmentModel getParentContainmentModel()
Return the parent containment model.

Specified by:
getParentContainmentModel in interface ContainmentContext
Returns:
the model parent container


Copyright © The Apache Software Foundation. All Rights Reserved.