Class ConsistencyChecker

    • Method Detail

      • checkConsistency

        public ConsistencyChecker.CHECK checkConsistency​(String referenceType,
                                                         String referenceValue,
                                                         String contentId,
                                                         String dataPath,
                                                         boolean shortTest)
        Check the consistency of a reference
        Parameters:
        referenceType - The type of the reference to test (can be 'attachment', 'explorer', 'metadata', '__external', etc...)
        referenceValue - The value of the reference to test
        contentId - The id of the content containing the reference
        dataPath - The path of the data containing the reference
        shortTest - true to make a short test, that means that long tests will return UNKNOWN immediately. If false, you will always have a SUCCESS or a FAILURE.
        Returns:
        CHECK enum value
      • getLabel

        public I18nizableText getLabel​(String referenceType,
                                       String referenceValue,
                                       String contentId,
                                       String dataPath)
        Get the label of a reference.
        Parameters:
        referenceType - The type of the reference to test (can be 'attachment', 'explorer', 'metadata', '__external', etc...)
        referenceValue - The value of the reference to test
        contentId - The id of the content containing the reference
        dataPath - The path of the data containing the reference
        Returns:
        the element label.
      • _checkHTTPLink

        protected ConsistencyChecker.CHECK _checkHTTPLink​(String linkValue,
                                                          boolean shortTest)
        Test an http link
        Parameters:
        linkValue - The http url to test
        shortTest - true to make a short test (with short timeout)
        Returns:
        The state. UNKNOWN if test cannot be done fully