org.opencms.gwt
Class CmsBrokenLinkRenderer

java.lang.Object
  extended by org.opencms.gwt.CmsBrokenLinkRenderer

public class CmsBrokenLinkRenderer
extends java.lang.Object

A helper class used to generate the necessary information for displaying links which will be broken if the user tries to delete a file in the ADE GUI.


Constructor Summary
CmsBrokenLinkRenderer(CmsObject cms)
          Creates a new broken link renderer instance.
 
Method Summary
protected  void addPageInfo(CmsBrokenLinkBean bean, java.lang.String extraTitle, java.lang.String extraPath)
          Adds optional page information to the broken link bean.
protected  CmsBrokenLinkBean createBrokenLinkBean(java.lang.String type, java.lang.String title, java.lang.String path, java.lang.String extraTitle, java.lang.String extraPath)
          Creates a broken link bean from the necessary values.
protected  CmsBrokenLinkBean createSitemapBrokenLinkBean(CmsResource resource)
          Creates a "broken link" bean based on a resource.
 java.util.List<CmsBrokenLinkBean> renderBrokenLink(CmsResource target, CmsResource source)
          Renders the source of a broken link as a list of CmsBrokenLinkBean instances.
 java.util.List<CmsBrokenLinkBean> renderBrokenLinkDefault(CmsResource target, CmsResource source)
          The default method for rendering broken link sources.
 java.util.List<CmsBrokenLinkBean> renderBrokenLinkGroupContainer(CmsResource target, CmsResource source)
          Renders the broken links for a group container.
 java.util.List<CmsBrokenLinkBean> renderBrokenLinkInheritanceGroup(CmsResource target, CmsResource source)
          Renders broken links from an inheritance group.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsBrokenLinkRenderer

public CmsBrokenLinkRenderer(CmsObject cms)
Creates a new broken link renderer instance.

Parameters:
cms - the current CMS context
Method Detail

renderBrokenLink

public java.util.List<CmsBrokenLinkBean> renderBrokenLink(CmsResource target,
                                                          CmsResource source)
                                                   throws CmsException
Renders the source of a broken link as a list of CmsBrokenLinkBean instances.

Parameters:
target - the broken link target
source - the broken link source
Returns:
the list of broken link beans to display to the user
Throws:
CmsException - if something goes wrong

renderBrokenLinkDefault

public java.util.List<CmsBrokenLinkBean> renderBrokenLinkDefault(CmsResource target,
                                                                 CmsResource source)
                                                          throws CmsException
The default method for rendering broken link sources.

Parameters:
target -
source -
Returns:
the list of broken link beans to display to the user
Throws:
CmsException - if something goes wrong

renderBrokenLinkGroupContainer

public java.util.List<CmsBrokenLinkBean> renderBrokenLinkGroupContainer(CmsResource target,
                                                                        CmsResource source)
                                                                 throws CmsException
Renders the broken links for a group container.

Parameters:
target - the broken link target
source - the broken link source
Returns:
the list of broken link beans to display to the user
Throws:
CmsException - if something goes wrong

renderBrokenLinkInheritanceGroup

public java.util.List<CmsBrokenLinkBean> renderBrokenLinkInheritanceGroup(CmsResource target,
                                                                          CmsResource source)
                                                                   throws CmsException
Renders broken links from an inheritance group.

Parameters:
target - the link target
source - the link source
Returns:
the list of broken link beans to display to the user
Throws:
CmsException - if something goes wrong

addPageInfo

protected void addPageInfo(CmsBrokenLinkBean bean,
                           java.lang.String extraTitle,
                           java.lang.String extraPath)
Adds optional page information to the broken link bean.

Parameters:
bean - the broken link bean
extraTitle - the optional page title
extraPath - the optional page path

createBrokenLinkBean

protected CmsBrokenLinkBean createBrokenLinkBean(java.lang.String type,
                                                 java.lang.String title,
                                                 java.lang.String path,
                                                 java.lang.String extraTitle,
                                                 java.lang.String extraPath)
Creates a broken link bean from the necessary values.

Parameters:
type - the resource type
title - the title
path - the path
extraTitle - an optional additional page title
extraPath - an optional additional page path
Returns:
the created broken link bean

createSitemapBrokenLinkBean

protected CmsBrokenLinkBean createSitemapBrokenLinkBean(CmsResource resource)
                                                 throws CmsException
Creates a "broken link" bean based on a resource.

Parameters:
resource - the resource
Returns:
the "broken link" bean with the data from the resource
Throws:
CmsException - if something goes wrong