java.lang .Object org.opencms.workplace.tools.content.check .CmsContentCheckResource CmsContentCheckResource public class CmsContentCheckResource (Code) This object encapuslates a CmsResource, its content and unmarshalled xml content
for processing in the content check plugins.
author: Michael Emmerichversion: $Revision: 1.5 $ since: 6.1.2
CmsContentCheckResource public CmsContentCheckResource(CmsResource res)(Code) Constructor, creates an CmsContentCheckResource object.
Parameters: res - the CmsResource to encapsulate in the CmsContentCheckResource.
addError public void addError(String error)(Code) Adds a new error to the list of errors for this resource.
Parameters: error - the error message to be added
addErrors public void addErrors(List errors)(Code) Adds a list of errors to the list of errors for this resource.
Parameters: errors - the error messages to be added
addWarning public void addWarning(String warning)(Code) Adds a new warning to the list of warnings for this resource.
Parameters: warning - the warning message to be added
addWarnings public void addWarnings(List warnings)(Code) Adds a list of warnings to the list of warnings for this resource.
Parameters: warnings - the error messages to be added
getContent public byte[] getContent()(Code) Gets the encapuslated file content.
the byte array holding the file content
getErrors public List getErrors()(Code) Gets the list of all errors found during the content checks for this resource.
List of erros, delivered as strings
getResource public CmsResource getResource()(Code) Gets the encapsulated CmsResource.
the CmsResource
getResourceName public String getResourceName()(Code) Gets the root path of the encapsulated CmsResource.
root path of the encapsulated CmsResource
getWarnings public List getWarnings()(Code) Gets the list of all warnings found during the content checks for this resource.
List of warnings, delivered as strings
getXmlContent public CmsXmlContent getXmlContent()(Code) Gets the encapuslated and unmarshalled xml content.
the unmarshalled xml content
upgradeContent public void upgradeContent(CmsObject cms) throws CmsException (Code) 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 CmsObjectthrows: CmsException - if loading of the content fails
upgradeXmlContent public void upgradeXmlContent(CmsObject cms) throws CmsException (Code) 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 CmsObjectthrows: CmsException - if loading of the content fails