Package org.opencms.relations
Class CmsInternalLinksValidator
java.lang.Object
org.opencms.relations.CmsInternalLinksValidator
Util class to find broken links in a bundle of resources.
- Since:
- 6.5.3
-
Field Summary
Modifier and TypeFieldDescriptionprotected Map<String,
List<CmsRelation>> The internal computed broken relations map. -
Constructor Summary
ConstructorDescriptionCmsInternalLinksValidator
(CmsObject cms, List<String> resourceNames) Creates a new helper object. -
Method Summary
Modifier and TypeMethodDescriptiongetBrokenLinksForResource
(String resourceName) Returns all broken links for the given resource.int
Returns the number of not visible resources with broken links.Returns all resources with broken links.boolean
isEmpty()
If no relation would be broken deleting the given resources.
-
Field Details
-
m_brokenRelations
The internal computed broken relations map.
-
-
Constructor Details
-
CmsInternalLinksValidator
Creates a new helper object.- Parameters:
cms
- the cms objectresourceNames
- a list of resource names to be deleted
-
-
Method Details
-
getBrokenLinksForResource
Returns all broken links for the given resource.- Parameters:
resourceName
- the resource to get the broken link- Returns:
- a list of
CmsRelation
objects
-
getNotVisibleResourcesCount
Returns the number of not visible resources with broken links.- Returns:
- the number of not visible resources with broken links
-
getResourcesWithBrokenLinks
Returns all resources with broken links.- Returns:
- a list of
CmsResource
objects
-
isEmpty
If no relation would be broken deleting the given resources.- Returns:
true
if no relation would be broken deleting the given resources
-