org.apache.avalon.merlin.impl
Class DefaultCriteria

java.lang.Object
  extended byjava.util.AbstractMap
      extended byjava.util.HashMap
          extended byorg.apache.avalon.util.criteria.Criteria
              extended byorg.apache.avalon.merlin.impl.DefaultCriteria
All Implemented Interfaces:
Cloneable, KernelCriteria, Map, Serializable

public class DefaultCriteria
extends Criteria
implements KernelCriteria

A Criteria is a class holding the values supplied by a user for application to a factory.

Version:
$Revision: 1.12 $
Author:
Stephen McConnell
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.util.Map
Map.Entry
 
Field Summary
 
Fields inherited from interface org.apache.avalon.merlin.KernelCriteria
MERLIN_ANCHOR, MERLIN_AUTOSTART, MERLIN_CONFIG, MERLIN_CONTEXT, MERLIN_DEBUG, MERLIN_DEPLOYMENT, MERLIN_DIR, MERLIN_HOME, MERLIN_INFO, MERLIN_INSTALL, MERLIN_KERNEL, MERLIN_LANG, MERLIN_OVERRIDE, MERLIN_REPOSITORY, MERLIN_SERVER, MERLIN_SYSTEM, MERLIN_TEMP
 
Constructor Summary
DefaultCriteria(InitialContext context)
          Creation of a new default kernel criteria.
 
Method Summary
 File getAnchorDirectory()
          Return the anchor directory to be used when resolving library declarations in classload specifications.
 File getConfigDirectory()
          Return the root directory to the merlin configurations
 File getContextDirectory()
          Return the context directory from which relative runtime home directories will be established for components referencing urn:avalon:home
 URL[] getDeploymentURLs()
          Return the sequence of deployment urls
 File getHomeDirectory()
          Return the root directory to the merlin installation
 URL getKernelURL()
          Return the url to the kernel configuration
 String getLanguageCode()
          Return the lang code.
 String getOverridePath()
          Return the url to the configuration override targets.
 File getRepositoryDirectory()
          Return the root directory to the shared repository.
 File getSystemDirectory()
          Return the root directory to the merlin system repository
 File getTempDirectory()
          Return the temporary directory.
 File getWorkingDirectory()
          Return the working client directory.
 boolean isAutostartEnabled()
          Return the autostart policy.
 boolean isDebugEnabled()
          Return debug policy.
 boolean isInfoEnabled()
          Return info generation policy.
 boolean isServerEnabled()
          Return server execution policy.
 String toString()
          Return a string representation of the kernel criteria.
 
Methods inherited from class org.apache.avalon.util.criteria.Criteria
get, getParameter, getParameters, getValue, put
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, isEmpty, keySet, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Constructor Detail

DefaultCriteria

public DefaultCriteria(InitialContext context)
Creation of a new default kernel criteria.

Method Detail

toString

public String toString()
Return a string representation of the kernel criteria.

Returns:
the criteria as a string

getRepositoryDirectory

public File getRepositoryDirectory()
Return the root directory to the shared repository.

Specified by:
getRepositoryDirectory in interface KernelCriteria
Returns:
the avalon home root repository directory

getLanguageCode

public String getLanguageCode()
Return the lang code. A null value indicates that the default language applies.

Specified by:
getLanguageCode in interface KernelCriteria
Returns:
the language code

getHomeDirectory

public File getHomeDirectory()
Return the root directory to the merlin installation

Specified by:
getHomeDirectory in interface KernelCriteria
Returns:
the merlin home directory

getSystemDirectory

public File getSystemDirectory()
Return the root directory to the merlin system repository

Specified by:
getSystemDirectory in interface KernelCriteria
Returns:
the merlin system repository directory

getDeploymentURLs

public URL[] getDeploymentURLs()
Return the sequence of deployment urls

Specified by:
getDeploymentURLs in interface KernelCriteria
Returns:
the block urls

getConfigDirectory

public File getConfigDirectory()
Return the root directory to the merlin configurations

Specified by:
getConfigDirectory in interface KernelCriteria
Returns:
the merlin configuration directory

getKernelURL

public URL getKernelURL()
Return the url to the kernel configuration

Specified by:
getKernelURL in interface KernelCriteria
Returns:
the kernel configuration url

getOverridePath

public String getOverridePath()
Return the url to the configuration override targets.

Specified by:
getOverridePath in interface KernelCriteria
Returns:
the override url

getWorkingDirectory

public File getWorkingDirectory()
Return the working client directory.

Specified by:
getWorkingDirectory in interface KernelCriteria
Returns:
the working directory

getTempDirectory

public File getTempDirectory()
Return the temporary directory.

Specified by:
getTempDirectory in interface KernelCriteria
Returns:
the temp directory

getContextDirectory

public File getContextDirectory()
Return the context directory from which relative runtime home directories will be established for components referencing urn:avalon:home

Specified by:
getContextDirectory in interface KernelCriteria
Returns:
the context directory

getAnchorDirectory

public File getAnchorDirectory()
Return the anchor directory to be used when resolving library declarations in classload specifications.

Specified by:
getAnchorDirectory in interface KernelCriteria
Returns:
the anchor directory

isInfoEnabled

public boolean isInfoEnabled()
Return info generation policy. If TRUE the parameters related to deployment will be listed on startup.

Specified by:
isInfoEnabled in interface KernelCriteria
Returns:
the info policy

isDebugEnabled

public boolean isDebugEnabled()
Return debug policy. If TRUE all logging channels will be set to debug level (useful for debugging).

Specified by:
isDebugEnabled in interface KernelCriteria
Returns:
the debug policy

isAutostartEnabled

public boolean isAutostartEnabled()
Return the autostart policy. If TRUE (the default) the deployment of the application container will be initiated following kernel initialization.

Specified by:
isAutostartEnabled in interface KernelCriteria
Returns:
the autostart policy

isServerEnabled

public boolean isServerEnabled()
Return server execution policy. If TRUE the kernel will continue until explicitly terminated. If FALSE the kernel will initiate decommissioning on completion of deployment.

Specified by:
isServerEnabled in interface KernelCriteria
Returns:
the server execution mode


Copyright © Apache Software Foundation. All Rights Reserved.