public class WorkspaceConfig extends Object implements FileSystemFactory, ISMLockingFactory, QueryHandlerFactory
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 and Description |
---|
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.
|
WorkspaceConfig(String home,
String name,
boolean clustered,
FileSystemFactory fsf,
PersistenceManagerConfig pmc,
QueryHandlerFactory qhf,
ISMLockingFactory ismLockingFactory,
WorkspaceSecurityConfig workspaceSecurityConfig,
ImportConfig importConfig,
long defaultLockTimeout)
Creates a workspace configuration object.
|
Modifier and Type | Method and Description |
---|---|
long |
getDefaultLockTimeout()
Returns the default lock timeout in number of seconds or
Long.MAX_VALUE when not specified. |
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.
|
public WorkspaceConfig(String home, String name, boolean clustered, FileSystemFactory fsf, PersistenceManagerConfig pmc, QueryHandlerFactory qhf, ISMLockingFactory ismLockingFactory, WorkspaceSecurityConfig workspaceSecurityConfig)
home
- home directoryname
- workspace nameclustered
- fsf
- file system factorypmc
- persistence manager configurationqhf
- query handler factory, or null
if not configuredismLockingFactory
- the item state manager locking factoryworkspaceSecurityConfig
- the workspace specific security configuration.public WorkspaceConfig(String home, String name, boolean clustered, FileSystemFactory fsf, PersistenceManagerConfig pmc, QueryHandlerFactory qhf, ISMLockingFactory ismLockingFactory, WorkspaceSecurityConfig workspaceSecurityConfig, ImportConfig importConfig)
home
- home directoryname
- workspace nameclustered
- fsf
- file system factorypmc
- persistence manager configurationqhf
- query handler factory, or null
if not configuredismLockingFactory
- the item state manager locking factoryworkspaceSecurityConfig
- the workspace specific security configuration.public WorkspaceConfig(String home, String name, boolean clustered, FileSystemFactory fsf, PersistenceManagerConfig pmc, QueryHandlerFactory qhf, ISMLockingFactory ismLockingFactory, WorkspaceSecurityConfig workspaceSecurityConfig, ImportConfig importConfig, long defaultLockTimeout)
home
- home directoryname
- workspace nameclustered
- fsf
- file system factorypmc
- persistence manager configurationqhf
- query handler factory, or null
if not configuredismLockingFactory
- the item state manager locking factoryworkspaceSecurityConfig
- the workspace specific security configuration.defaultLockTimeout
- default timeout for locks (in seconds)public String getHomeDir()
public String getName()
public boolean isClustered()
true
if this workspace participates in a cluster;
false
otherwisepublic long getDefaultLockTimeout()
Long.MAX_VALUE
when not specified.Long.MAX_VALUE
when not specifiedpublic ISMLocking getISMLocking() throws RepositoryException
getISMLocking
in interface ISMLockingFactory
ISMLocking
RepositoryException
- if the locking strategy can not be createdpublic FileSystem getFileSystem() throws RepositoryException
getFileSystem
in interface FileSystemFactory
FileSystem
RepositoryException
- if the file system can not be createdpublic PersistenceManagerConfig getPersistenceManagerConfig()
public boolean isSearchEnabled()
true
if search is configured,
false
otherwisepublic QueryHandler getQueryHandler(QueryHandlerContext context) throws RepositoryException
null
if one
was not configured.getQueryHandler
in interface QueryHandlerFactory
null
RepositoryException
public WorkspaceSecurityConfig getSecurityConfig()
WorkspaceSecurityConfig
public ImportConfig getImportConfig()
Copyright © 2004–2022 The Apache Software Foundation. All rights reserved.