org.apache.jackrabbit.core.config
Class WorkspaceConfig

java.lang.Object
  extended by org.apache.jackrabbit.core.config.WorkspaceConfig
All Implemented Interfaces:
FileSystemFactory, QueryHandlerFactory, ISMLockingFactory

public class WorkspaceConfig
extends Object
implements FileSystemFactory, ISMLockingFactory, QueryHandlerFactory

Workspace configuration. This configuration class is used to create configured workspace objects.

The contained configuration information are: the home directory and name of the workspace, the file system, the persistence manager, the search index and the item state manager locking configuration. The search index and the item state manager locking and the security config are optional parts.


Constructor Summary
WorkspaceConfig(String home, String name, boolean clustered, FileSystemFactory fsf, PersistenceManagerConfig pmc, QueryHandlerFactory qhf, ISMLockingFactory ismLockingFactory, WorkspaceSecurityConfig workspaceSecurityConfig)
          Creates a workspace configuration object.
WorkspaceConfig(String home, String name, boolean clustered, FileSystemFactory fsf, PersistenceManagerConfig pmc, QueryHandlerFactory qhf, ISMLockingFactory ismLockingFactory, WorkspaceSecurityConfig workspaceSecurityConfig, ImportConfig importConfig)
          Creates a workspace configuration object.
 
Method Summary
 FileSystem getFileSystem()
          Creates and returns the configured workspace file system.
 String getHomeDir()
          Returns the workspace home directory.
 ImportConfig getImportConfig()
           
 ISMLocking getISMLocking()
          Creates and returns the configured workspace locking strategy.
 String getName()
          Returns the workspace name.
 PersistenceManagerConfig getPersistenceManagerConfig()
          Returns the workspace persistence manager configuration.
 QueryHandler getQueryHandler(QueryHandlerContext context)
          Returns an initialized query handler, or null if one was not configured.
 WorkspaceSecurityConfig getSecurityConfig()
           
 boolean isClustered()
          Returns a flag indicating whether this workspace participates in a cluster.
 boolean isSearchEnabled()
          Checks whether search configuration is present.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkspaceConfig

public WorkspaceConfig(String home,
                       String name,
                       boolean clustered,
                       FileSystemFactory fsf,
                       PersistenceManagerConfig pmc,
                       QueryHandlerFactory qhf,
                       ISMLockingFactory ismLockingFactory,
                       WorkspaceSecurityConfig workspaceSecurityConfig)
Creates a workspace configuration object.

Parameters:
home - home directory
name - workspace name
clustered -
fsf - file system factory
pmc - persistence manager configuration
qhf - query handler factory, or null if not configured
ismLockingFactory - the item state manager locking factory
workspaceSecurityConfig - the workspace specific security configuration.

WorkspaceConfig

public WorkspaceConfig(String home,
                       String name,
                       boolean clustered,
                       FileSystemFactory fsf,
                       PersistenceManagerConfig pmc,
                       QueryHandlerFactory qhf,
                       ISMLockingFactory ismLockingFactory,
                       WorkspaceSecurityConfig workspaceSecurityConfig,
                       ImportConfig importConfig)
Creates a workspace configuration object.

Parameters:
home - home directory
name - workspace name
clustered -
fsf - file system factory
pmc - persistence manager configuration
qhf - query handler factory, or null if not configured
ismLockingFactory - the item state manager locking factory
workspaceSecurityConfig - the workspace specific security configuration.
Method Detail

getHomeDir

public String getHomeDir()
Returns the workspace home directory.

Returns:
workspace home directory

getName

public String getName()
Returns the workspace name.

Returns:
the workspace name

isClustered

public boolean isClustered()
Returns a flag indicating whether this workspace participates in a cluster.

Returns:
true if this workspace participates in a cluster; false otherwise

getISMLocking

public ISMLocking getISMLocking()
                         throws RepositoryException
Creates and returns the configured workspace locking strategy.

Specified by:
getISMLocking in interface ISMLockingFactory
Returns:
the configured ISMLocking
Throws:
RepositoryException - if the locking strategy can not be created

getFileSystem

public FileSystem getFileSystem()
                         throws RepositoryException
Creates and returns the configured workspace file system.

Specified by:
getFileSystem in interface FileSystemFactory
Returns:
the configured FileSystem
Throws:
RepositoryException - if the file system can not be created

getPersistenceManagerConfig

public PersistenceManagerConfig getPersistenceManagerConfig()
Returns the workspace persistence manager configuration.

Returns:
persistence manager configuration

isSearchEnabled

public boolean isSearchEnabled()
Checks whether search configuration is present.

Returns:
true if search is configured, false otherwise

getQueryHandler

public QueryHandler getQueryHandler(QueryHandlerContext context)
                             throws RepositoryException
Returns an initialized query handler, or null if one was not configured.

Specified by:
getQueryHandler in interface QueryHandlerFactory
Returns:
initialized query handler, or null
Throws:
RepositoryException

getSecurityConfig

public WorkspaceSecurityConfig getSecurityConfig()
Returns:
workspace-specific security settings.
See Also:
WorkspaceSecurityConfig

getImportConfig

public ImportConfig getImportConfig()
Returns:
xml import settings


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.