/** * 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); } }
while (k.hasNext()) { CmsLink link = (CmsLink)k.next(); if (link.isInternal()) { link.checkConsistency(cms); links.add(link);
while (k.hasNext()) { CmsLink link = k.next(); if (link.isInternal()) { link.checkConsistency(cms); links.add(link);
/** * Creates the String value for this VarLink value element.<p> * * @param cms the current users OpenCms context * * @return the String value for this VarLink value element */ private String createStringValue(CmsObject cms) { Attribute enabled = m_element.attribute(CmsXmlPage.ATTRIBUTE_ENABLED); String content = ""; if ((enabled == null) || Boolean.valueOf(enabled.getText()).booleanValue()) { CmsLink link = getLink(cms); if (link != null) { content = link.getUri(); if (link.isInternal() && (cms != null)) { // remove site root for internal links content = cms.getRequestContext().removeSiteRoot(link.getUri()); } } } return content; } }
if (link.isInternal()) { link.checkConsistency(cms); links.add(link); CmsXmlVarLinkValue refValue = (CmsXmlVarLinkValue)value; CmsLink link = refValue.getLink(cms); if ((link != null) && link.isInternal()) { links.add(link);
/** * Creates the String value for this VarLink value element.<p> * * @param cms the current users OpenCms context * * @return the String value for this VarLink value element */ private String createStringValue(CmsObject cms) { Attribute enabled = m_element.attribute(CmsXmlPage.ATTRIBUTE_ENABLED); String content = ""; if ((enabled == null) || Boolean.valueOf(enabled.getText()).booleanValue()) { CmsLink link = getLink(cms); if (link != null) { content = link.getUri(); if (link.isInternal() && (cms != null)) { // remove site root for internal links content = cms.getRequestContext().removeSiteRoot(link.getUri()); } } } return content; } }
if (link.isInternal()) { link.checkConsistency(cms); links.add(link); CmsXmlVarLinkValue refValue = (CmsXmlVarLinkValue)value; CmsLink link = refValue.getLink(cms); if ((link != null) && link.isInternal()) { links.add(link);
CmsLinkUpdateUtil.updateType(linkElement, getRelationType(getPath())); CmsLink link = new CmsLink(linkElement); if (link.isInternal()) {
this)); CmsLink link = new CmsLink(linkElement); if (link.isInternal()) {
while (itLinks.hasNext()) { CmsLink link = (CmsLink)itLinks.next(); if (link.isInternal()) { // only update internal links if (CmsStringUtil.isEmptyOrWhitespaceOnly(link.getTarget())) {
while (itLinks.hasNext()) { CmsLink link = itLinks.next(); if (link.isInternal()) { // only update internal links if (CmsStringUtil.isEmptyOrWhitespaceOnly(link.getTarget())) {
String target = link.getTarget(); if (link.isInternal()) { target = m_cmsObject.getRequestContext().getFileTranslator().translateResource(target);
link = ((CmsXmlVarLinkValue)value).getLink(cms); if ((link == null) || !link.isInternal()) { return false;
link = ((CmsXmlVarLinkValue)value).getLink(cms); if ((link == null) || !link.isInternal()) { return false;
link = ((CmsXmlVarLinkValue)value).getLink(cms); if ((link == null) || !link.isInternal()) { return false;