Class CmsContentCheckResult

java.lang.Object
org.opencms.workplace.tools.content.check.CmsContentCheckResult

public class CmsContentCheckResult extends Object
This class holds the results of the content tests and provides methods to access the collected errors and warnings.

Since:
6.1.2
  • Constructor Details

    • CmsContentCheckResult

      Constructor, creates an empty CmsContentCheckResult.

  • Method Details

    • addResult

      public void addResult(CmsContentCheckResource testResource)
      Adds the testing results of a CmsContentCheckResource to the result lists.

      Parameters:
      testResource - the CmsContentCheckResource to add the results from
    • getAllCheckResources

      Gets a list of all CmsContentCheckResource that colleced an error or a warning during the content check.

      Returns:
      List of CmsContentCheckResource which collected an error or a warning.
    • getAllResources

      Gets a list of all resources that colleced an error or a warning during the content check.

      Returns:
      List of CmsResources which collected an error or a warning.
    • getErrorCheckResources

      Gets a list of all CmsContentCheckResource that colleced an error during the content check.

      Returns:
      List of CmsContentCheckResource which collected an error.
    • getErrorResources

      Gets a list of all resources that colleced an error during the content check.

      Returns:
      List of CmsResources which collected an error.
    • getErrors

      public Map getErrors()
      Gets a map of all error collected during the content check.

      The map contains the complete resource root path as keys and a list of errors as values.

      Returns:
      map of collected warnings
    • getErrors

      public List getErrors(String resourceName)
      Gets a list of errors collected during the content check for a given resource.

      Parameters:
      resourceName - the complete root path of the resource to get the list from
      Returns:
      list of error messages or null if no warnings are found
    • getWarningCheckResources

      Gets a list of all CmsContentCheckResource that colleced a warning during the content check.

      Returns:
      List of CmsContentCheckResource which collected a warning.
    • getWarningResources

      Gets a list of all resources that colleced a warning during the content check.

      Returns:
      List of CmsResources which collected a warning.
    • getWarnings

      public Map getWarnings()
      Gets a map of all warnings collected during the content check.

      The map contains the complete resource root path as keys and a list of warnings as values.

      Returns:
      map of collected warnings
    • getWarnings

      public List getWarnings(String resourceName)
      Gets a list of warnings collected during the content check for a given resource.

      Parameters:
      resourceName - the complete root path of the resource to get the list from
      Returns:
      list of warning messages or null if no warnings are found