Package org.opencms.relations
Class CmsLinkUpdateUtil
java.lang.Object
org.opencms.relations.CmsLinkUpdateUtil
An utility class for updating the link xml node.
- Since:
- 6.0.0
-
Method Summary
Modifier and TypeMethodDescriptionprotected static String
decodeEntities
(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
Updates the link node in the underlying XML page document.static void
updateXmlForHtmlValue
(CmsLink link, 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 Details
-
updateType
Updates the type for a link xml element node.- Parameters:
element
- the link element node to updatetype
- the relation type to set
-
updateXml
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
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
Updates the given xml element with this link information.- Parameters:
link
- the link to get the information fromelement
- the <link> element to update
-
decodeEntities
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
-