|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.validation.CmsXmlDocumentLinkValidator
Validates HTML links in the (body) content of Cms resources in the OpenCms VFS. HTML links are considered as href attribs in anchor tags and src attribs in image tags.
Validating links means to answer the question, whether we would have broken links in the online project if a file or a list of files would get published. External links to targets outside the OpenCms VFS don't get validated.
Objects using the CmsHtmlLinkValidator are responsible to handle detected broken links.
Field Summary | |
protected CmsDriverManager |
m_driverManager
The driver manager. |
Constructor Summary | |
CmsXmlDocumentLinkValidator(CmsDriverManager driverManager)
Default constructor. |
Method Summary | |
protected void |
finalize()
|
protected java.util.List |
validateLinks(java.util.List links,
java.util.Map offlineFileLookup)
Validates the URIs in the specified link list. |
java.util.Map |
validateResources(CmsObject cms,
java.util.List offlineResources)
Validates HTML links (hrefs and img tags) in the (body) content of the specified list of Cms resources. |
java.util.Map |
validateResources(CmsObject cms,
java.util.List offlineResources,
I_CmsReport report)
Validates HTML links (hrefs and img tags) in the (body) content of the specified list of Cms resources. |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected CmsDriverManager m_driverManager
Constructor Detail |
public CmsXmlDocumentLinkValidator(CmsDriverManager driverManager)
driverManager
- The Cms driver managerMethod Detail |
public java.util.Map validateResources(CmsObject cms, java.util.List offlineResources)
The result is printed to a shell report.
cms
- the current user's Cms object the current request contextofflineResources
- a list of offline Cms resources
public java.util.Map validateResources(CmsObject cms, java.util.List offlineResources, I_CmsReport report)
The result is printed to the given report.
cms
- the current user's Cms objectofflineResources
- a list of offline Cms resourcesreport
- an instance of I_CmsReport to print messages
protected void finalize() throws java.lang.Throwable
java.lang.Throwable
Object.finalize()
protected java.util.List validateLinks(java.util.List links, java.util.Map offlineFileLookup)
links
- a list of URIs inside a CmsResourceofflineFileLookup
- a map for faster lookup with all (offline) resources that get actually published keyed by their resource names (including the site root)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |