Package org.opencms.gwt
Class CmsBrokenLinkRenderer
java.lang.Object
org.opencms.gwt.CmsBrokenLinkRenderer
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
ConstructorDescriptionCreates a new broken link renderer instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addPageInfo
(CmsBrokenLinkBean bean, String extraTitle, String extraPath) Adds optional page information to the broken link bean.protected CmsBrokenLinkBean
createBrokenLinkBean
(CmsUUID structureId, String type, String title, String path, String icon, String extraTitle, 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.renderBrokenLink
(CmsResource target, CmsResource source) Renders the source of a broken link as a list of CmsBrokenLinkBean instances.renderBrokenLinkDefault
(CmsResource target, CmsResource source) The default method for rendering broken link sources.renderBrokenLinkGroupContainer
(CmsResource target, CmsResource source) Renders the broken links for a group container.renderBrokenLinkInheritanceGroup
(CmsResource target, CmsResource source) Renders broken links from an inheritance group.
-
Constructor Details
-
CmsBrokenLinkRenderer
Creates a new broken link renderer instance.- Parameters:
cms
- the current CMS context
-
-
Method Details
-
renderBrokenLink
public 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 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 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 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
-
createBrokenLinkBean
protected CmsBrokenLinkBean createBrokenLinkBean(CmsUUID structureId, String type, String title, String path, String icon, String extraTitle, 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
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
-