Package org.opencms.relations
Class CmsLinkUpdateUtil
- java.lang.Object
-
- org.opencms.relations.CmsLinkUpdateUtil
-
public final class CmsLinkUpdateUtil extends java.lang.Object
An utility class for updating the link xml node.- Since:
- 6.0.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static java.lang.String
decodeEntities(java.lang.String value)
Decodes entities in a string if it isn't null.static void
updateType(org.dom4j.Element element, CmsRelationType type)
Updates the type for a link xml element node.static void
updateXml(CmsLink link, org.dom4j.Element element, boolean updateOnly)
Updates the link node in the underlying XML page document.static void
updateXmlForHtmlValue(CmsLink link, java.lang.String name, org.dom4j.Element element)
Updates the given xml element with this link information.static void
updateXmlForVfsFile(CmsLink link, org.dom4j.Element element)
Updates the given xml element with this link information.
-
-
-
Method Detail
-
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 updatetype
- 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 updateelement
- the <link> element to updateupdateOnly
- if set and the element has noCmsLink.NODE_TARGET
subelement, so no action if executed at all
-
updateXmlForHtmlValue
public static void updateXmlForHtmlValue(CmsLink link, java.lang.String name, org.dom4j.Element element)
Updates the given xml element with this link information.- Parameters:
link
- the link to get the information fromname
- the (optional) name of the linkelement
- 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 fromelement
- the <link> element to update
-
decodeEntities
protected static java.lang.String decodeEntities(java.lang.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
-
-