Class CmsContentCheckResource
java.lang.Object
org.opencms.workplace.tools.content.check.CmsContentCheckResource
This object encapuslates a CmsResource, its content and unmarshalled xml content
for processing in the content check plugins.
- Since:
- 6.1.2
-
Constructor Summary
ConstructorDescriptionCmsContentCheckResource
(org.opencms.file.CmsResource res) Constructor, creates an CmsContentCheckResource object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a new error to the list of errors for this resource.void
Adds a list of errors to the list of errors for this resource.void
addWarning
(String warning) Adds a new warning to the list of warnings for this resource.void
addWarnings
(List warnings) Adds a list of warnings to the list of warnings for this resource.byte[]
Gets the encapuslated file content.Gets the list of all errors found during the content checks for this resource.org.opencms.file.CmsResource
Gets the encapsulated CmsResource.Gets the root path of the encapsulated CmsResource.Gets the list of all warnings found during the content checks for this resource.org.opencms.xml.content.CmsXmlContent
Gets the encapuslated and unmarshalled xml content.void
upgradeContent
(org.opencms.file.CmsObject cms) Loads the content of the encapsulated CmsResource and stores it within the CmsContentCheckResource.void
upgradeXmlContent
(org.opencms.file.CmsObject cms) Unmarshalls the content of the encapsulated CmsResource and stores it within the CmsContentCheckResource.
-
Constructor Details
-
CmsContentCheckResource
Constructor, creates an CmsContentCheckResource object.- Parameters:
res
- the CmsResource to encapsulate in the CmsContentCheckResource.
-
-
Method Details
-
addError
Adds a new error to the list of errors for this resource.- Parameters:
error
- the error message to be added
-
addErrors
Adds a list of errors to the list of errors for this resource.- Parameters:
errors
- the error messages to be added
-
addWarning
Adds a new warning to the list of warnings for this resource.- Parameters:
warning
- the warning message to be added
-
addWarnings
Adds a list of warnings to the list of warnings for this resource.- Parameters:
warnings
- the error messages to be added
-
getContent
Gets the encapuslated file content.- Returns:
- the byte array holding the file content
-
getErrors
Gets the list of all errors found during the content checks for this resource.- Returns:
- List of erros, delivered as strings
-
getResource
Gets the encapsulated CmsResource.- Returns:
- the CmsResource
-
getResourceName
Gets the root path of the encapsulated CmsResource.- Returns:
- root path of the encapsulated CmsResource
-
getWarnings
Gets the list of all warnings found during the content checks for this resource.- Returns:
- List of warnings, delivered as strings
-
getXmlContent
Gets the encapuslated and unmarshalled xml content.- Returns:
- the unmarshalled xml content
-
upgradeContent
Loads the content of the encapsulated CmsResource and stores it within the CmsContentCheckResource. If the content is already existing, it is not loaded again.- Parameters:
cms
- the CmsObject- Throws:
org.opencms.main.CmsException
- if loading of the content fails
-
upgradeXmlContent
Unmarshalls the content of the encapsulated CmsResource and stores it within the CmsContentCheckResource. If the xmlcontent is already existing, it is not unmarshalled again.- Parameters:
cms
- the CmsObject- Throws:
org.opencms.main.CmsException
- if loading of the content fails
-