Class 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 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<CmsBrokenLinkBeanrenderBrokenLink​(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
      • 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​(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 resource
        type - the resource type
        title - the title
        path - the path
        icon - the icon CSS classes
        extraTitle - an optional additional page title
        extraPath - an optional additional page path
        Returns:
        the created broken link bean