Class CmsLinkUpdateUtil

java.lang.Object
org.opencms.relations.CmsLinkUpdateUtil

public final class CmsLinkUpdateUtil extends Object
An utility class for updating the link xml node.

Since:
6.0.0
  • Method Details

    • updateType

      public static void updateType(org.dom4j.Element element, CmsRelationType type)
      Updates the type for a link xml element node.

      Parameters:
      element - the link element node to update
      type - the relation type to set
    • updateXml

      public static void updateXml(CmsLink link, org.dom4j.Element element, boolean updateOnly)
      Updates the link node in the underlying XML page document.

      Parameters:
      link - the link to update
      element - the <link> element to update
      updateOnly - if set and the element has no CmsLink.NODE_TARGET subelement, so no action if executed at all
    • updateXmlForHtmlValue

      public static void updateXmlForHtmlValue(CmsLink link, String name, org.dom4j.Element element)
      Updates the given xml element with this link information.

      Parameters:
      link - the link to get the information from
      name - the (optional) name of the link
      element - the <link> element to update
    • updateXmlForVfsFile

      public static void updateXmlForVfsFile(CmsLink link, org.dom4j.Element element)
      Updates the given xml element with this link information.

      Parameters:
      link - the link to get the information from
      element - the <link> element to update
    • decodeEntities

      protected static String decodeEntities(String value)
      Decodes entities in a string if it isn't null.

      Parameters:
      value - the string for which to decode entities
      Returns:
      the string with the decoded entities