((Link) node).setUrl(url); changed = true;
if (!isBlank(s)) link.setShortTitle(s); link.setUrl(getActionParameter(requestContext, "url")); count++;
public void addSpaceToEnvironment(Space space, Environment env) throws SpacesException { try { String path = AdminUtil.concatenatePaths(ENVIRONMENTS_LOCATION, env.getPath()); path = AdminUtil.concatenatePaths(path, space.getName()); Link link = pageManager.newLink(path); link.setUrl(space.getPath()); pageManager.updateLink(link); } catch (Exception e) { throw new SpacesException(e); } }
public Link copyLink(Link source, String path) throws NodeException { // create the new link and copy attributes Link link = newLink(path); link.setTitle(source.getTitle()); link.setShortTitle(source.getShortTitle()); link.setSkin(source.getSkin()); link.setVersion(source.getVersion()); link.setTarget(source.getTarget()); link.setUrl(source.getUrl()); link.setHidden(source.isHidden()); // copy locale specific metadata link.getMetadata().copyFields(source.getMetadata().getFields()); // copy security constraints SecurityConstraints srcSecurity = source.getSecurityConstraints(); if ((srcSecurity != null) && !srcSecurity.isEmpty()) { SecurityConstraints copiedSecurity = copySecurityConstraints(LINK_NODE_TYPE, srcSecurity); link.setSecurityConstraints(copiedSecurity); } return link; }
String url = getActionParameter(requestContext, "url"); if (isFieldModified(url, link.getUrl())) link.setUrl(url); String target = getActionParameter(requestContext, "target"); if (isFieldModified(target, link.getTarget()))