/** * Adds a new link with a given internal name and internal flag to the link table.<p> * * @param link the <code>CmsLink</code> to add * @return the new link entry */ public CmsLink addLink(CmsLink link) { m_linkTable.put(link.getName(), link); return link; }
/** * Adds a new link with a given internal name and internal flag to the link table.<p> * * @param link the <code>CmsLink</code> to add * @return the new link entry */ public CmsLink addLink(CmsLink link) { m_linkTable.put(link.getName(), link); return link; }
/** * Adds a new link to the link table.<p> * * @param type type of the link * @param targetUri link destination * @param internal flag to indicate if the link is a local link * * @return the new link entry */ public CmsLink addLink(CmsRelationType type, String targetUri, boolean internal) { CmsLink link = new CmsLink(LINK_PREFIX + m_linkTable.size(), type, targetUri, internal); m_linkTable.put(link.getName(), link); return link; }
/** * Adds a new link to the link table.<p> * * @param type type of the link * @param targetUri link destination * @param internal flag to indicate if the link is a local link * * @return the new link entry */ public CmsLink addLink(CmsRelationType type, String targetUri, boolean internal) { CmsLink link = new CmsLink(LINK_PREFIX + m_linkTable.size(), type, targetUri, internal); m_linkTable.put(link.getName(), link); return link; }
/** * 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); } }
tag.setAttribute(attr, CmsMacroResolver.formatMacro(link.getName()));
tag.setAttribute(attr, CmsMacroResolver.formatMacro(link.getName()));
CmsLinkUpdateUtil.updateXmlForHtmlValue( link, link.getName(), links.addElement(CmsXmlPage.NODE_LINK));
CmsLinkUpdateUtil.updateXmlForHtmlValue( link, link.getName(), links.addElement(CmsXmlPage.NODE_LINK));