Class CmsInternalLinksValidator

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

public class CmsInternalLinksValidator extends Object
Util class to find broken links in a bundle of resources.

Since:
6.5.3
  • Field Details

  • Constructor Details

    • CmsInternalLinksValidator

      public CmsInternalLinksValidator(CmsObject cms, List<String> resourceNames)
      Creates a new helper object.

      Parameters:
      cms - the cms object
      resourceNames - 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

      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