|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.relations.CmsRelationSystemValidator
public class CmsRelationSystemValidator
Validates relations of resources in the OpenCms VFS.
Relations are, for instance, href attribs in anchor tags and src attribs in image tags, as well as OpenCmsVfsFile values in Xml Content.
External links to targets outside the OpenCms VFS don't get validated.
Objects using this class are responsible to handle detected broken links.
Field Summary | |
---|---|
protected CmsDriverManager |
m_driverManager
The driver manager. |
Constructor Summary | |
---|---|
CmsRelationSystemValidator(CmsDriverManager driverManager)
Default constructor. |
Method Summary | |
---|---|
protected java.util.List |
validateLinks(CmsDbContext dbc,
CmsResource resource,
java.util.Map fileLookup,
CmsProject project,
I_CmsReport report)
Validates the links for the specified resource. |
java.util.Map |
validateResources(CmsDbContext dbc,
java.util.List resources,
I_CmsReport report)
Validates the relations. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected CmsDriverManager m_driverManager
Constructor Detail |
---|
public CmsRelationSystemValidator(CmsDriverManager driverManager)
driverManager
- The Cms driver managerMethod Detail |
---|
public java.util.Map validateResources(CmsDbContext dbc, java.util.List resources, I_CmsReport report)
The result is printed to the given report.
If the resources list is null
or empty, the whole current project will be validated.
If the resources list is not empty, Validating references 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.
dbc
- the database contextresources
- a list of offline resources, or null
report
- a report to print messages
CmsRelation
}
objects)
keyed by resource namesprotected java.util.List validateLinks(CmsDbContext dbc, CmsResource resource, java.util.Map fileLookup, CmsProject project, I_CmsReport report)
dbc
- the database contextresource
- the resource that will be validatedfileLookup
- a map for faster lookup with all resources keyed by their rootpathproject
- the project to validatereport
- the report to write to
CmsRelation
objects for the specified resource,
or an empty list if no broken links were found
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |