/** * Updates the type for a link xml element node.<p> * * @param element the link element node to update * @param type the relation type to set */ public static void updateType(Element element, CmsRelationType type) { updateAttribute(element, CmsLink.ATTRIBUTE_TYPE, type.getNameForXml()); }
/** * Updates the type for a link xml element node.<p> * * @param element the link element node to update * @param type the relation type to set */ public static void updateType(Element element, CmsRelationType type) { updateAttribute(element, CmsLink.ATTRIBUTE_TYPE, type.getNameForXml()); }
/** * Updates the given xml element with this link information.<p> * * @param link the link to get the information from * @param name the (optional) name of the link * @param element the <link> element to update */ public static void updateXmlForHtmlValue(CmsLink link, String name, Element element) { // if element is not null if (element != null) { // update the additional attributes if (name != null) { updateAttribute(element, CmsLink.ATTRIBUTE_NAME, link.getName()); } updateAttribute(element, CmsLink.ATTRIBUTE_INTERNAL, Boolean.toString(link.isInternal())); // update the common sub-elements and attributes updateXmlForVfsFile(link, element); } }
/** * Updates the given xml element with this link information.<p> * * @param link the link to get the information from * @param name the (optional) name of the link * @param element the <link> element to update */ public static void updateXmlForHtmlValue(CmsLink link, String name, Element element) { // if element is not null if (element != null) { // update the additional attributes if (name != null) { updateAttribute(element, CmsLink.ATTRIBUTE_NAME, link.getName()); } updateAttribute(element, CmsLink.ATTRIBUTE_INTERNAL, Boolean.toString(link.isInternal())); // update the common sub-elements and attributes updateXmlForVfsFile(link, element); } }
/** * Updates the given xml element with this link information.<p> * * @param link the link to get the information from * @param element the <link> element to update */ public static void updateXmlForVfsFile(CmsLink link, Element element) { // if element is not null if (element != null) { // update the type attribute updateAttribute(element, CmsLink.ATTRIBUTE_TYPE, link.getType().getNameForXml()); // update the sub-elements updateXml(link, element, false); } }
/** * Updates the given xml element with this link information.<p> * * @param link the link to get the information from * @param element the <link> element to update */ public static void updateXmlForVfsFile(CmsLink link, Element element) { // if element is not null if (element != null) { // update the type attribute updateAttribute(element, CmsLink.ATTRIBUTE_TYPE, link.getType().getNameForXml()); // update the sub-elements updateXml(link, element, false); } }