Package org.opencms.ade.upload
Class CmsDefaultUploadRestriction
java.lang.Object
org.opencms.ade.upload.CmsDefaultUploadRestriction
- All Implemented Interfaces:
I_CmsUploadRestriction,I_CmsConfigurationParameterHandler,I_CmsNeedsAdminCmsObject
Default implementation for upload restrictions uses restriction entries from opencms-workplace.xml.
This class directly takes parameters configured via param elements in opencms-workplace.xml and interprets them as restriction entries. The parameter name is interpreted as the path, and the parameter value
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringSitemap attribute to control the allowed upload extensions.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.Returns the parameters of this configurable class instance, ornullif the class does not need any parameters.Gets the upload restriction information for the given CMS contextvoidInitializes a configuration after all parameters have been added.voidsetAdminCmsObject(CmsObject adminCms) Sets the admin CmsObject.static I_CmsUploadRestrictionUtility method for creating an upload restriction that doesn't restrict anything.
-
Field Details
-
ATTR_UPLOAD_EXTENSIONS
Sitemap attribute to control the allowed upload extensions.- See Also:
-
-
Constructor Details
-
CmsDefaultUploadRestriction
public CmsDefaultUploadRestriction()Creates a new instance.
-
-
Method Details
-
unrestricted
Utility method for creating an upload restriction that doesn't restrict anything.- Returns:
- the unrestricted upload restriction
-
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:
-
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:
-
getUploadRestrictionInfo
Description copied from interface:I_CmsUploadRestrictionGets the upload restriction information for the given CMS context- Specified by:
getUploadRestrictionInfoin interfaceI_CmsUploadRestriction- Parameters:
cms- the CMS context- Returns:
- the upload restriction information
- See Also:
-
initConfiguration
Description copied from interface:I_CmsConfigurationParameterHandlerInitializes a configuration after all parameters have been added.- Specified by:
initConfigurationin interfaceI_CmsConfigurationParameterHandler- See Also:
-
setAdminCmsObject
Description copied from interface:I_CmsNeedsAdminCmsObjectSets the admin CmsObject.- Specified by:
setAdminCmsObjectin interfaceI_CmsNeedsAdminCmsObject- Parameters:
adminCms- a CmsObject with admin privileges- See Also:
-