Package org.opencms.jlan
Class CmsJlanRepository
java.lang.Object
org.opencms.jlan.CmsJlanRepository
- All Implemented Interfaces:
I_CmsConfigurationParameterHandler
,I_CmsRepository
Repository class for configuring repositories for Alfresco JLAN.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Request context attribute to control error handling for write errors.static final String
Parameter for controlling whether byte order marks should be added to plaintext files.static final String
Parameter that controls whether to ignore file write errors.static final String
The parameter for the project in which this repository should operate.static final String
Name of the parameter to configure the root directory.static final String
Name of the parameter to configure resource wrappers.Fields inherited from interface org.opencms.configuration.I_CmsConfigurationParameterHandler
ADD_PARAMETER_METHOD, INIT_CONFIGURATION_METHOD
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addConfigurationParameter
(String paramName, String paramValue) Adds a configuration parameter to this parameter configurable class instance.boolean
allowAccess
(String user) Checks if a user may access this repository.static org.alfresco.jlan.server.filesys.DiskInterface
createLoggingProxy
(org.alfresco.jlan.server.filesys.DiskInterface impl) Creates a dynamic proxy for a disk interface which logs the method calls and their results.getCms
(org.alfresco.jlan.server.SrvSession session, org.alfresco.jlan.server.filesys.TreeConnection connection) Creates a CmsObjectWrapper for the current session.Returns the parameters of this configurable class instance, ornull
if the class does not need any parameters.org.alfresco.jlan.server.filesys.DiskDeviceContext
Gets the device context for this repository.org.alfresco.jlan.server.filesys.DiskInterface
Gets the disk interface for this repository.Gets the repository filter.getName()
Returns the name of the repository.Gets the configured project.getRoot()
Gets the root directory configured for this repository.Gets the repository-specific file translations.Gets the resource wrappers which have been configured for this repository.void
Initializes a configuration after all parameters have been added.void
initializeCms
(CmsObject cms) Initializes this repository with an admin CMS object.boolean
Returns true if file write errors should be ignored.boolean
Returns true if the repository specific file translations are enabled (they may also be set without being enabled).void
setFilter
(CmsRepositoryFilter filter) Sets the repository filter.void
Sets the name for this repository.void
setTranslation
(CmsResourceTranslator translator, boolean enabled) Sets the repository-specific file translations
-
Field Details
-
JLAN_IGNORE_WRITE_ERRORS
Request context attribute to control error handling for write errors.- See Also:
-
PARAM_ADD_BOM
Parameter for controlling whether byte order marks should be added to plaintext files.- See Also:
-
PARAM_IGNORE_WRITE_ERRORS
Parameter that controls whether to ignore file write errors.- See Also:
-
PARAM_PROJECT
The parameter for the project in which this repository should operate.- See Also:
-
PARAM_ROOT
Name of the parameter to configure the root directory.- See Also:
-
PARAM_WRAPPER
Name of the parameter to configure resource wrappers.- See Also:
-
-
Constructor Details
-
CmsJlanRepository
public CmsJlanRepository()Creates a new repository instance.
-
-
Method Details
-
createLoggingProxy
public static org.alfresco.jlan.server.filesys.DiskInterface createLoggingProxy(org.alfresco.jlan.server.filesys.DiskInterface impl) Creates a dynamic proxy for a disk interface which logs the method calls and their results.- Parameters:
impl
- the disk interface for which a logging proxy should be created- Returns:
- the dynamic proxy which logs methods calls
-
addConfigurationParameter
Description copied from interface:I_CmsConfigurationParameterHandler
Adds a configuration parameter to this parameter configurable class instance.- Specified by:
addConfigurationParameter
in interfaceI_CmsConfigurationParameterHandler
- Parameters:
paramName
- the name of the parameterparamValue
- the value for the parameter- See Also:
-
allowAccess
Checks if a user may access this repository.- Parameters:
user
- the name of the user- Returns:
- true if the user may access the repository
-
getCms
public CmsObjectWrapper getCms(org.alfresco.jlan.server.SrvSession session, org.alfresco.jlan.server.filesys.TreeConnection connection) throws CmsException Creates a CmsObjectWrapper for the current session.- Parameters:
session
- the current sessionconnection
- the tree connection- Returns:
- the correctly configured CmsObjectWrapper for this session
- Throws:
CmsException
- if something goes wrong
-
getConfiguration
Description copied from interface:I_CmsConfigurationParameterHandler
Returns the parameters of this configurable class instance, ornull
if the class does not need any parameters.- Specified by:
getConfiguration
in interfaceI_CmsConfigurationParameterHandler
- Returns:
- the parameters of this configurable class instance,
or
null
if the class does not need any parameters - See Also:
-
getDeviceContext
Gets the device context for this repository.- Returns:
- the device context
-
getDiskInterface
Gets the disk interface for this repository.- Returns:
- the disk interface
-
getFilter
Description copied from interface:I_CmsRepository
Gets the repository filter.- Specified by:
getFilter
in interfaceI_CmsRepository
- Returns:
- the repository filter
- See Also:
-
getName
Description copied from interface:I_CmsRepository
Returns the name of the repository.- Specified by:
getName
in interfaceI_CmsRepository
- Returns:
- the name of the repository
- See Also:
-
getProject
Gets the configured project.- Returns:
- the configured project
-
getRoot
Gets the root directory configured for this repository.- Returns:
- the root directory
-
getTranslation
Description copied from interface:I_CmsRepository
Gets the repository-specific file translations.- Specified by:
getTranslation
in interfaceI_CmsRepository
- Returns:
- the repository-specific file translations
- See Also:
-
getWrappers
Gets the resource wrappers which have been configured for this repository.- Returns:
- the resource wrappers which have been configured
-
initConfiguration
Description copied from interface:I_CmsConfigurationParameterHandler
Initializes a configuration after all parameters have been added.- Specified by:
initConfiguration
in interfaceI_CmsConfigurationParameterHandler
- Throws:
CmsConfigurationException
- if something goes wrong- See Also:
-
initializeCms
Description copied from interface:I_CmsRepository
Initializes this repository with an admin CMS object.- Specified by:
initializeCms
in interfaceI_CmsRepository
- Parameters:
cms
- an admin CMS object- Throws:
CmsException
- if something goes wrong- See Also:
-
isIgnoreWriteFileErrors
Returns true if file write errors should be ignored.- Returns:
- true if file write errors should be ignored
-
isTranslationEnabled
Description copied from interface:I_CmsRepository
Returns true if the repository specific file translations are enabled (they may also be set without being enabled).- Specified by:
isTranslationEnabled
in interfaceI_CmsRepository
- Returns:
- true if the file translations are enabled
- See Also:
-
setFilter
Description copied from interface:I_CmsRepository
Sets the repository filter.- Specified by:
setFilter
in interfaceI_CmsRepository
- Parameters:
filter
- the repository filter- See Also:
-
setName
Description copied from interface:I_CmsRepository
Sets the name for this repository.- Specified by:
setName
in interfaceI_CmsRepository
- Parameters:
name
- the name to use for the repository- See Also:
-
setTranslation
Description copied from interface:I_CmsRepository
Sets the repository-specific file translations- Specified by:
setTranslation
in interfaceI_CmsRepository
- Parameters:
translator
- the file translationsenabled
- true if the translations should be enabled- See Also:
-