org.opencms.relations
Class CmsInternalLinksValidator

java.lang.Object
  extended by org.opencms.relations.CmsInternalLinksValidator

public class CmsInternalLinksValidator
extends java.lang.Object

Util class to find broken links in a bundle of resources.

Since:
6.5.3
Version:
$Revision: 1.7 $
Author:
Michael Moossen

Field Summary
protected  java.util.Map m_brokenRelations
          The internal computed broken relations map.
 
Constructor Summary
CmsInternalLinksValidator(CmsObject cms, java.util.List resourceNames)
          Creates a new helper object.
 
Method Summary
 java.util.List getBrokenLinksForResource(java.lang.String resourceName)
          Returns all broken links for the given resource.
 int getNotVisibleResourcesCount()
          Returns the number of not visible resources with broken links.
 java.util.List getResourcesWithBrokenLinks()
          Returns all resources with broken links.
 boolean isEmpty()
          If no relation would be broken deleting the given resources.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_brokenRelations

protected java.util.Map m_brokenRelations
The internal computed broken relations map.

Constructor Detail

CmsInternalLinksValidator

public CmsInternalLinksValidator(CmsObject cms,
                                 java.util.List resourceNames)
Creates a new helper object.

Parameters:
cms - the cms object
resourceNames - a list of resource names to be deleted
Method Detail

getBrokenLinksForResource

public java.util.List getBrokenLinksForResource(java.lang.String resourceName)
Returns all broken links for the given resource.

Parameters:
resourceName - the resource to get the broken link
Returns:
a list of CmsRelation objects

getNotVisibleResourcesCount

public int getNotVisibleResourcesCount()
Returns the number of not visible resources with broken links.

Returns:
the number of not visible resources with broken links

getResourcesWithBrokenLinks

public java.util.List getResourcesWithBrokenLinks()
Returns all resources with broken links.

Returns:
a list of CmsResource objects

isEmpty

public boolean isEmpty()
If no relation would be broken deleting the given resources.

Returns:
true if no relation would be broken deleting the given resources