Sets the url to link to for this item. If this item was a read only
item it automatically becomes linkable.
507841
public void setHref(String url) {
        if (url == null)
            throw new RuntimeException("Cannot set URL to null. Call removeUrl() if you wanted to remove the URL");
        if (anchor == null) {
            if (controlGroupRoot != null) {
                //!!! following code is semi-working, it's not reconstructed item correctly
                remove(controlGroupRoot);
                anchor = Document.get().createAnchorElement();
                anchor.setAttribute("href", url);
                moveThisChildrenToAnchor();
                cleanUpLI();
                prepareAnchorForControlGroup();
                getElement().appendChild(anchor);
                checkAnchorPanel();
            } else {
                // need to make anchor and move children to it
                anchor = Document.get().createAnchorElement();
                moveThisChildrenToAnchor();
                getElement().appendChild(anchor);
            }
            addItemActivationHandlers();
        }
        anchor.setAttribute("href", url);
    }
752693
public TextBuilder link(final String text, final URL url) {
        this.curParagraphBuilder.link(text, url);
        return this;
    }
271783
public void setResponseURL(String responseURL) {
    String newURL = _substitutor.replace(responseURL);
    if (!_urlValidator.isValid(newURL)) {
      error("The RespondTo URL specified is invalid. Continuing with previous value.");
    } else {
      this._responseURL = newURL;
    }
  }
1126827
def put(self, key, value):
    ''''''
    # if value is a link, don't follow links
    if self._link_for_value(value):
      super(SymlinkDatastore, self).put(key, value)
      return

    # if `key` points to a symlink, need to follow it.
    current_value = super(SymlinkDatastore, self).get(key)
    link_key = self._link_for_value(current_value)
    if link_key:
      self.put(link_key, value) # self.put: could be another link.
    else:
      super(SymlinkDatastore, self).put(key, value)
56241
public void setUrl(final String url) {
		String currUrl = getUrl();

		if (!Objects.equals(url, currUrl)) {
			getOrCreateComponentModel().url = url;
		}
	}
527185
@JsonProperty(value = "links")
    public void setLinks(List<PageRequestLinkDto> links) {
        if (links == null) {
            this.links = new ArrayList<>();
        } else {
            this.links = links;
        }
    }
978949
def add_link(name, url)
      set_field(LINKS_META, []) if fields[LINKS_META].nil?
      fields[LINKS_META] << {'name' => name, 'url' => url}
    end
236003
public void createLink(HalRelation rel, String... pathParams) {
    if(pathParams != null && pathParams.length > 0 && pathParams[0] != null) {
      Set<String> linkedResourceIds = linkedResources.get(rel);
      if(linkedResourceIds == null) {
        linkedResourceIds = new HashSet<String>();
        linkedResources.put(rel, linkedResourceIds);
      }

      // Hmm... use the last id in the pathParams as linked resource id
      linkedResourceIds.add(pathParams[pathParams.length - 1]);

      resource.addLink(rel.relName, rel.uriTemplate.build((Object[])pathParams));
    }
  }
189403
def url(item, url)
      data = read_file
      match_name(item)
      data[@@item]["url"] = url
      time(item)
      write_file(data)
    end
605945
def _set_url(self, url):
    
    original_url = self._url
    try:
      self._update_index(url)
    except:
      self._url = original_url
      raise
290975
def click_link(self, link_text, timeout=settings.SMALL_TIMEOUT):
        
        self.click_link_text(link_text, timeout=timeout)
1298654
def prompt_and_select_link(self):
        
        data = self.get_selected_item()
        url_full = data.get('url_full')
        permalink = data.get('permalink')

        if url_full and url_full != permalink:
            # The item is a link-only submission that won't contain text
            link = url_full
        else:
            html = data.get('html')
            if html:
                extracted_links = self.content.extract_links(html)
                if not extracted_links:
                    # Only one selection to choose from, so just pick it
                    link = permalink
                else:
                    # Let the user decide which link to open
                    links = []
                    if permalink:
                        links += [{'text': 'Permalink', 'href': permalink}]
                    links += extracted_links
                    link = self.term.prompt_user_to_select_link(links)
            else:
                # Some items like hidden comments don't have any HTML to parse
                link = permalink

        return link
940871
private static SitelinkFeedItem createSiteLinkFeedItem(String sitelinkText, String sitelinkUrl) {
    SitelinkFeedItem sitelinkFeedItem = new SitelinkFeedItem();
    sitelinkFeedItem.setSitelinkText(sitelinkText);
    sitelinkFeedItem.setSitelinkFinalUrls(new UrlList(new String[] {sitelinkUrl}));
    return sitelinkFeedItem;
  }
1067333
public void ENsetlinkvalue( int index, LinkParameters linkParameter, float value ) throws EpanetException {
        int errcode = epanet.ENsetnodevalue(index, linkParameter.getCode(), value);
        checkError(errcode);
    }
175564
@Override
    protected void changeItemLinkUrl(String itemUrl) {

        try {
            JspWriter out = getJsp().getJspContext().getOut();
            if (getCms().existsResource(itemUrl)) {
                try {
                    writePointerLink(getCms().readResource(itemUrl));
                    out.print(buildJsonItemObject(getCms().readResource(itemUrl)));
                } catch (CmsException e) {
                    // can not happen in theory, because we used existsResource() before...
                }
            } else {
                out.print(RETURNVALUE_NONE);
            }
        } catch (IOException e) {
            if (LOG.isErrorEnabled()) {
                LOG.error(e.getLocalizedMessage(), e);
            }
        }

    }
261659
def link(text, url = nil)
      url = text if url.nil?
      tag(:a, text, href: url)
    end
457138
public void setLink(Link link) {
		setHref(link.getHref());
		setHrefAbsolute(link.getHrefAbsolute());
		HttpParameters linkParams = link.getParams();
		if(linkParams != null) {
			for(Map.Entry<String,List<String>> entry : linkParams.getParameterMap().entrySet()) {
				String paramName = entry.getKey();
				for(String paramValue : entry.getValue()) {
					addParam(paramName, paramValue);
				}
			}
		}
		this.addLastModified = link.getAddLastModified();
		setHreflang(link.getHreflang());
		setRel(link.getRel());
		setType(link.getType());
		setMedia(link.getMedia());
		setTitle(link.getTitle());
	}