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.33 $
Author:
Avalon Development Team
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_AUDIT, MERLIN_AUTOSTART, MERLIN_CODE_SECURITY_ENABLED, MERLIN_CONFIG, MERLIN_CONTEXT, MERLIN_DEBUG, MERLIN_DEPLOYMENT, MERLIN_DEPLOYMENT_TIMEOUT, MERLIN_DIR, MERLIN_HOME, MERLIN_INFO, MERLIN_INSTALL, MERLIN_KERNEL, MERLIN_LANG, MERLIN_LOGGING_CONFIG, MERLIN_LOGGING_IMPLEMENTATION, MERLIN_OVERRIDE, MERLIN_REPOSITORY, MERLIN_RUNTIME, MERLIN_RUNTIME_IMPLEMENTATION, 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
 long getDeploymentTimeout()
          Return the default deployment timeout value.
 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.
 URL getLoggingConfiguration()
          Return an external logging system configuration source
 Artifact getLoggingImplementation()
          Return the artifact reference to the logging implementation factory .
 String getOverridePath()
          Return the url to the configuration override targets.
 File getRepositoryDirectory()
          Return the root directory to the shared repository.
 Artifact getRuntimeImplementation()
          Return the artifact reference to the runtime implementation factory .
 Artifact getStandardRuntimeImplementation()
          Return the artifact reference to the runtime implementation factory .
 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 isAuditEnabled()
          Return audit policy.
 boolean isAutostartEnabled()
          Return the autostart policy.
 boolean isDebugEnabled()
          Return debug policy.
 boolean isInfoEnabled()
          Return info generation policy.
 boolean isSecurityEnabled()
          Return the code security enabled status.
 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, getKeys, 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.

Parameters:
context - the initial repository context
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

getLoggingConfiguration

public URL getLoggingConfiguration()
Return an external logging system configuration source

Specified by:
getLoggingConfiguration in interface KernelCriteria
Returns:
the configuration url (possibly null)

getLoggingImplementation

public Artifact getLoggingImplementation()
Return the artifact reference to the logging implementation factory .

Specified by:
getLoggingImplementation in interface KernelCriteria
Returns:
the logging implementation factory artifact

getRuntimeImplementation

public Artifact getRuntimeImplementation()
Return the artifact reference to the runtime implementation factory .

Specified by:
getRuntimeImplementation in interface KernelCriteria
Returns:
the runtime implementation factory artifact

getStandardRuntimeImplementation

public Artifact getStandardRuntimeImplementation()
Return the artifact reference to the runtime implementation factory .

Returns:
the runtime implementation factory artifact

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

isAuditEnabled

public boolean isAuditEnabled()
Return audit policy. If TRUE a model listing will be generated.

Specified by:
isAuditEnabled in interface KernelCriteria
Returns:
the audit 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

getDeploymentTimeout

public long getDeploymentTimeout()
Return the default deployment timeout value.

Specified by:
getDeploymentTimeout in interface KernelCriteria
Returns:
the default timeout for the component deployment sequence

isSecurityEnabled

public boolean isSecurityEnabled()
Return the code security enabled status.

Specified by:
isSecurityEnabled in interface KernelCriteria
Returns:
TRUE if code security is enabled - default is false


Copyright © The Apache Software Foundation. All Rights Reserved.