|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opencms.validation.CmsXmlDocumentLinkValidator
public class 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 List |
validateLinks(List links,
Map offlineFileLookup)
Validates the URIs in the specified link list. |
Map |
validateResources(CmsObject cms,
List offlineResources)
Validates HTML links (hrefs and img tags) in the (body) content of the specified list of Cms resources. |
Map |
validateResources(CmsObject cms,
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 manager| Method Detail |
|---|
public Map validateResources(CmsObject cms,
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 Map validateResources(CmsObject cms,
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 Throwable
finalize in class ObjectThrowableObject.finalize()
protected List validateLinks(List links,
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 | |||||||||