Package org.opencms.gwt
Class CmsBrokenLinkRenderer
- java.lang.Object
-
- 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
Constructors Constructor Description CmsBrokenLinkRenderer(CmsObject cms)
Creates a new broken link renderer instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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(CmsUUID structureId, java.lang.String type, java.lang.String title, java.lang.String path, java.lang.String icon, 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.
-
-
-
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 targetsource
- 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
- the link targetsource
- the link 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 targetsource
- 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 targetsource
- 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 beanextraTitle
- the optional page titleextraPath
- the optional page path
-
createBrokenLinkBean
protected CmsBrokenLinkBean createBrokenLinkBean(CmsUUID structureId, java.lang.String type, java.lang.String title, java.lang.String path, java.lang.String icon, java.lang.String extraTitle, java.lang.String extraPath)
Creates a broken link bean from the necessary values.- Parameters:
structureId
- the structure id of the resourcetype
- the resource typetitle
- the titlepath
- the pathicon
- the icon CSS classesextraTitle
- an optional additional page titleextraPath
- 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
-
-