org.deegree.commons.config
Class DeegreeWorkspace

java.lang.Object
  extended by org.deegree.commons.config.DeegreeWorkspace

public class DeegreeWorkspace
extends java.lang.Object

Encapsulates a directory for deegree configuration files (a deegree workspace) and provides access to the configured deegree resources.

Version:
$Revision: 28115 $, $Date: 2010-11-12 17:41:15 +0100 (Fr, 12. Nov 2010) $
Author:
Andreas Schmitz, Markus Schneider, last edited by: $Author: aschmitz $

Nested Class Summary
static class DeegreeWorkspace.Actions
          Please check back with the TMC when changing these, they're used as keys in i18n files (used for progress bars when initializing applications)!
 
Method Summary
 void destroyAll()
          Unloads all resources associated with this context, as well as ALL STATIC ones.
 CoverageBuilderManager getCoverageBuilderManager()
           
 DeegreeWorkspace.Actions getCurrentAction()
           
static DeegreeWorkspace getInstance()
          Returns the default workspace.
static DeegreeWorkspace getInstance(java.lang.String workspaceName)
          Returns the workspace with the given name.
static DeegreeWorkspace getInstance(java.lang.String workspaceName, java.io.File fallbackDir)
          Returns the workspace with the given name (or the workspace for the given directory if the former does not exist).
 java.io.File getLocation()
           
 java.lang.String getName()
          Returns the name of the workspace.
 void initAll()
          Initializes all managed configurations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static DeegreeWorkspace getInstance()
Returns the default workspace.

Returns:
the default workspace, never null

getInstance

public static DeegreeWorkspace getInstance(java.lang.String workspaceName)
Returns the workspace with the given name.

Parameters:
workspaceName - name of the workspace, can be null (implies default workspace)
Returns:
the workspace instance (directory must not necessarily exist), never null

getInstance

public static DeegreeWorkspace getInstance(java.lang.String workspaceName,
                                           java.io.File fallbackDir)
                                    throws java.io.IOException
Returns the workspace with the given name (or the workspace for the given directory if the former does not exist).

Parameters:
workspaceName - name of the workspace, can be null (implies default workspace)
fallbackDir - directory to use as workspace if the named workspace does not exist
Returns:
the workspace instance (directory must not necessarily exist), never null
Throws:
java.io.IOException

getName

public java.lang.String getName()
Returns the name of the workspace.

Returns:
the name of the workspace, never null

getLocation

public java.io.File getLocation()
Returns:
the root directory of the workspace (must not necessarily exist)), never null

getCoverageBuilderManager

public CoverageBuilderManager getCoverageBuilderManager()
Returns:
the coverage builder manager

initAll

public void initAll()
Initializes all managed configurations.


getCurrentAction

public DeegreeWorkspace.Actions getCurrentAction()
Returns:
one of the actions defined in the enum, depending of the state of the workspace.

destroyAll

public void destroyAll()
Unloads all resources associated with this context, as well as ALL STATIC ones.



Copyright © 2011. All Rights Reserved.