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
FieldsModifier and TypeFieldDescriptionstatic final StringRequest context attribute to control error handling for write errors.static final StringParameter for controlling whether byte order marks should be added to plaintext files.static final StringParameter that controls whether to ignore file write errors.static final StringThe parameter for the project in which this repository should operate.static final StringName of the parameter to configure the root directory.static final StringName of the parameter to configure resource wrappers.Fields inherited from interface org.opencms.configuration.I_CmsConfigurationParameterHandler
ADD_PARAMETER_METHOD, INIT_CONFIGURATION_METHOD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddConfigurationParameter(String paramName, String paramValue) Adds a configuration parameter to this parameter configurable class instance.booleanallowAccess(String user) Checks if a user may access this repository.static org.alfresco.jlan.server.filesys.DiskInterfacecreateLoggingProxy(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, ornullif the class does not need any parameters.org.alfresco.jlan.server.filesys.DiskDeviceContextGets the device context for this repository.org.alfresco.jlan.server.filesys.DiskInterfaceGets 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.voidInitializes a configuration after all parameters have been added.voidinitializeCms(CmsObject cms) Initializes this repository with an admin CMS object.booleanReturns true if file write errors should be ignored.booleanReturns true if the repository specific file translations are enabled (they may also be set without being enabled).voidsetFilter(CmsRepositoryFilter filter) Sets the repository filter.voidSets the name for this repository.voidsetTranslation(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_CmsConfigurationParameterHandlerAdds a configuration parameter to this parameter configurable class instance.- Specified by:
addConfigurationParameterin 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_CmsConfigurationParameterHandlerReturns the parameters of this configurable class instance, ornullif the class does not need any parameters.- Specified by:
getConfigurationin interfaceI_CmsConfigurationParameterHandler- Returns:
- the parameters of this configurable class instance,
or
nullif 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_CmsRepositoryGets the repository filter.- Specified by:
getFilterin interfaceI_CmsRepository- Returns:
- the repository filter
- See Also:
-
getName
Description copied from interface:I_CmsRepositoryReturns the name of the repository.- Specified by:
getNamein 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_CmsRepositoryGets the repository-specific file translations.- Specified by:
getTranslationin 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_CmsConfigurationParameterHandlerInitializes a configuration after all parameters have been added.- Specified by:
initConfigurationin interfaceI_CmsConfigurationParameterHandler- Throws:
CmsConfigurationException- if something goes wrong- See Also:
-
initializeCms
Description copied from interface:I_CmsRepositoryInitializes this repository with an admin CMS object.- Specified by:
initializeCmsin 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_CmsRepositoryReturns true if the repository specific file translations are enabled (they may also be set without being enabled).- Specified by:
isTranslationEnabledin interfaceI_CmsRepository- Returns:
- true if the file translations are enabled
- See Also:
-
setFilter
Description copied from interface:I_CmsRepositorySets the repository filter.- Specified by:
setFilterin interfaceI_CmsRepository- Parameters:
filter- the repository filter- See Also:
-
setName
Description copied from interface:I_CmsRepositorySets the name for this repository.- Specified by:
setNamein interfaceI_CmsRepository- Parameters:
name- the name to use for the repository- See Also:
-
setTranslation
Description copied from interface:I_CmsRepositorySets the repository-specific file translations- Specified by:
setTranslationin interfaceI_CmsRepository- Parameters:
translator- the file translationsenabled- true if the translations should be enabled- See Also:
-