Interface I_CmsContentCheck

  • All Known Implementing Classes:
    A_CmsContentCheck, CmsContentCheckProperty

    public interface I_CmsContentCheck
    This interface defines an OpenCms content check. A content check will test the content of the properties of all resources inside of OpenCms if they follow the rules which are defined inside the test implementing this interface.

    Since:
    6.1.2
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String PARAMETER
      Parameter name for widgets.
    • Method Detail

      • executeContentCheck

        CmsContentCheckResource executeContentCheck​(org.opencms.file.CmsObject cms,
                                                    CmsContentCheckResource testResource)
                                             throws org.opencms.main.CmsException
        Main method of the content check. It holds the implementation of the content check.

        Parameters:
        cms - the CmsObject
        testResource - 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
      • getDialogParameterName

        java.lang.String getDialogParameterName()
        Defines the name of the parameter which is used by the CmsContentCheckDialog to enable or disable the content check.

        Returns:
        the name of the dialog parameter.
      • getMessageBundles

        java.util.List getMessageBundles()
        Gets a list of all required message bundles by this content check.

        Returns:
        list of message bundle names
      • getName

        java.lang.String getName()
        Gets the name of this content check.

        Returns:
        name of the content check
      • init

        void init​(org.opencms.file.CmsObject cms)
           throws org.opencms.main.CmsException
        Initializer for the content check.

        Parameters:
        cms - the current CmsObject
        Throws:
        org.opencms.main.CmsException - if an error occurs
      • isActive

        boolean isActive()
        Signals if this content check is active or not.

        Returns:
        true if this content check is active, false otherwise.
      • setActive

        void setActive​(boolean value)
        Sets the active flag for the content check.

        Parameters:
        value - the value for the active flag