Class CmsContentCheckProperty
- java.lang.Object
-
- org.opencms.workplace.tools.content.check.A_CmsContentCheck
-
- org.opencms.workplace.tools.content.check.CmsContentCheckProperty
-
- All Implemented Interfaces:
I_CmsContentCheck
,org.opencms.workplace.tools.I_CmsToolHandler
public class CmsContentCheckProperty extends A_CmsContentCheck
This implementation of the I_CmsContentCheck interface implements a check for resource properties.The following items can be configured and checked:
- Property not set
- Property value contains filename
- Property value is shorter than a minimum size
- Property value contains a given value (with RegEx)
- Property value does not contain a given value (with RegEx)
- Since:
- 6.1.2
-
-
Field Summary
-
Fields inherited from interface org.opencms.workplace.tools.content.check.I_CmsContentCheck
PARAMETER
-
-
Constructor Summary
Constructors Constructor Description CmsContentCheckProperty()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CmsContentCheckResource
executeContentCheck(org.opencms.file.CmsObject cms, CmsContentCheckResource testResource)
Main method of the content check.java.lang.String
getDialogParameterName()
Defines the name of the parameter which is used by the CmsContentCheckDialog to enable or disable the content check.java.lang.String
getHelpText()
java.lang.String
getIconPath()
java.lang.String
getLink()
java.util.List
getMessageBundles()
Gets a list of all required message bundles by this content check.java.lang.String
getName()
Gets the name of this content check.java.lang.String
getPath()
float
getPosition()
java.lang.String
getShortName()
void
init(org.opencms.file.CmsObject cms)
Initializer for the content check.boolean
isActive()
Gets the active flag.void
setActive(boolean value)
Sets the active flag.-
Methods inherited from class org.opencms.workplace.tools.content.check.A_CmsContentCheck
getConfirmationMessage, getDisabledHelpText, getGroup, getParameters, getSmallIconPath, isEnabled, isEnabled, isVisible, isVisible, setup
-
-
-
-
Constructor Detail
-
CmsContentCheckProperty
public CmsContentCheckProperty()
-
-
Method Detail
-
executeContentCheck
public CmsContentCheckResource executeContentCheck(org.opencms.file.CmsObject cms, CmsContentCheckResource testResource) throws org.opencms.main.CmsException
Description copied from interface:I_CmsContentCheck
Main method of the content check. It holds the implementation of the content check.- Specified by:
executeContentCheck
in interfaceI_CmsContentCheck
- Specified by:
executeContentCheck
in classA_CmsContentCheck
- Parameters:
cms
- the CmsObjecttestResource
- a CmsContentTestResource containing the results of previous tests- Returns:
- the updated testResouce containing the results of the content check
- Throws:
org.opencms.main.CmsException
- if an error occurs- See Also:
I_CmsContentCheck.executeContentCheck(org.opencms.file.CmsObject, org.opencms.workplace.tools.content.check.CmsContentCheckResource)
-
getDialogParameterName
public java.lang.String getDialogParameterName()
Description copied from interface:I_CmsContentCheck
Defines the name of the parameter which is used by the CmsContentCheckDialog to enable or disable the content check.- Specified by:
getDialogParameterName
in interfaceI_CmsContentCheck
- Specified by:
getDialogParameterName
in classA_CmsContentCheck
- Returns:
- the name of the dialog parameter.
- See Also:
I_CmsContentCheck.getDialogParameterName()
-
getHelpText
public java.lang.String getHelpText()
- Specified by:
getHelpText
in interfaceorg.opencms.workplace.tools.I_CmsToolHandler
- Specified by:
getHelpText
in classA_CmsContentCheck
- See Also:
I_CmsToolHandler.getHelpText()
-
getIconPath
public java.lang.String getIconPath()
- Specified by:
getIconPath
in interfaceorg.opencms.workplace.tools.I_CmsToolHandler
- Specified by:
getIconPath
in classA_CmsContentCheck
- See Also:
I_CmsToolHandler.getIconPath()
-
getLink
public java.lang.String getLink()
- Specified by:
getLink
in interfaceorg.opencms.workplace.tools.I_CmsToolHandler
- Specified by:
getLink
in classA_CmsContentCheck
- See Also:
I_CmsToolHandler.getLink()
-
getMessageBundles
public java.util.List getMessageBundles()
Description copied from interface:I_CmsContentCheck
Gets a list of all required message bundles by this content check.- Specified by:
getMessageBundles
in interfaceI_CmsContentCheck
- Specified by:
getMessageBundles
in classA_CmsContentCheck
- Returns:
- list of message bundle names
- See Also:
I_CmsContentCheck.getMessageBundles()
-
getName
public java.lang.String getName()
Description copied from interface:I_CmsContentCheck
Gets the name of this content check.- Specified by:
getName
in interfaceI_CmsContentCheck
- Specified by:
getName
in interfaceorg.opencms.workplace.tools.I_CmsToolHandler
- Specified by:
getName
in classA_CmsContentCheck
- Returns:
- name of the content check
- See Also:
I_CmsToolHandler.getName()
-
getPath
public java.lang.String getPath()
- Specified by:
getPath
in interfaceorg.opencms.workplace.tools.I_CmsToolHandler
- Specified by:
getPath
in classA_CmsContentCheck
- See Also:
I_CmsToolHandler.getPath()
-
getPosition
public float getPosition()
- Specified by:
getPosition
in interfaceorg.opencms.workplace.tools.I_CmsToolHandler
- Specified by:
getPosition
in classA_CmsContentCheck
- See Also:
I_CmsToolHandler.getPosition()
-
getShortName
public java.lang.String getShortName()
- Specified by:
getShortName
in interfaceorg.opencms.workplace.tools.I_CmsToolHandler
- Specified by:
getShortName
in classA_CmsContentCheck
- See Also:
I_CmsToolHandler.getShortName()
-
init
public void init(org.opencms.file.CmsObject cms)
Description copied from interface:I_CmsContentCheck
Initializer for the content check.- Specified by:
init
in interfaceI_CmsContentCheck
- Specified by:
init
in classA_CmsContentCheck
- Parameters:
cms
- the current CmsObject- See Also:
I_CmsContentCheck.init(org.opencms.file.CmsObject)
-
isActive
public boolean isActive()
Gets the active flag.- Specified by:
isActive
in interfaceI_CmsContentCheck
- Specified by:
isActive
in classA_CmsContentCheck
- Returns:
- true if this content check is active, false otherwise.
- See Also:
I_CmsContentCheck.isActive()
-
setActive
public void setActive(boolean value)
Sets the active flag.This method is required to build the widget dialog frontend.
- Specified by:
setActive
in interfaceI_CmsContentCheck
- Specified by:
setActive
in classA_CmsContentCheck
- Parameters:
value
- true if this content check is set to be active, false otherwise.- See Also:
I_CmsContentCheck.setActive(boolean)
-
-