<b>Adds an alias to the link.</b>

@param alias A {@link String} value containing the desired alias name to add.
@throws JSONException The parameter value must be in valid JSON format, or a
{@link JSONException} will be thrown.
979008
public void putAlias(String alias) throws JSONException {
        if (alias != null) {
            this.alias = alias;
            this.put(Defines.LinkParam.Alias.getKey(), alias);
        }
    }
619693
public Aliases add(String alias,String reference){
		if (aliases.get(alias) == null){
			aliases.put(alias,reference);
		} else {
			throw new IllegalArgumentException("Alias '" + alias + "' already exists");
		}

		return this;
	}
121986
public void setResourceAlias(String alias, String uri)
    {
        if (_resourceAliases == null)
            _resourceAliases= new HashMap(5);
        _resourceAliases.put(alias, uri);
    }
1231388
public void addTargettingAlias(DestinationHandler aliasDestinationHandler)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "addTargettingAlias", aliasDestinationHandler);
    
    if (aliasesThatTargetThisDest == null)
    {
      aliasesThatTargetThisDest = new java.util.ArrayList<DestinationHandler>();
    }
   
    synchronized(aliasesThatTargetThisDest)
    { 
      aliasesThatTargetThisDest.add(aliasDestinationHandler);
    }
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "addTargettingAlias");
  }
75799
public void addAttribute(String alias, AttributeKey<?> attrKey) {
        ensureNotStarted();
        builder.addAttribute(alias, attrKey);
    }
11113
protected static void registerAlias(Class<?> parent, String alias, String cname) {
    Entry e = data.get(parent);
    assert (e != null);
    e.addAlias(alias, cname);
  }
744136
def add_alias(self, alias, indices, **kwargs):
        
        indices = self.conn._validate_indices(indices)

        return self.change_aliases(['add', index, alias,
                                    self._get_alias_params(**kwargs)]
                                    for index in indices)
154019
@com.fasterxml.jackson.annotation.JsonProperty("NamespaceId")
    public void setNamespaceId(String namespaceId) {
        this.namespaceId = namespaceId;
    }
306717
def add_alias(self, alias):
        
        aliases = self.list_aliases()
        if alias in aliases:
            logger.debug("Alias %s already exists on %s.", alias, self.anonymize_url(self.index_url))
            return

        # add alias
        alias_data = """
        {
            "actions": [
                {
                    "add": {
                        "index": "%s",
                        "alias": "%s"
                    }
                }
            ]
        }
        """ % (self.index, alias)

        r = self.requests.post(self.url + "/_aliases", headers=HEADER_JSON, verify=False, data=alias_data)
        try:
            r.raise_for_status()
        except requests.exceptions.HTTPError as ex:
            logger.warning("Something went wrong when adding an alias on %s. Alias not set.",
                           self.anonymize_url(self.index_url))
            logger.warning(ex)
            return

        logger.info("Alias %s created on %s.", alias, self.anonymize_url(self.index_url))
109198
public void setAlias(String alias)
	{
		if (alias == null || alias.trim().equals(""))
		{
			m_alias = null;
		}
		else
		{
			m_alias = alias;
		}

		// propagate to SelectionCriteria,not to Criteria
		for (int i = 0; i < m_criteria.size(); i++)
		{
			if (!(m_criteria.elementAt(i) instanceof Criteria))
			{
				((SelectionCriteria) m_criteria.elementAt(i)).setAlias(m_alias);
			}
		}
	}
291638
public JSONObject put(String url) throws JSONException {
		return sendPostRequest(url, METHOD_PUT, new HashMap<String, String>());
	}
1289881
public static void serialize(Value value, Writer writer) throws JSONException {
		Serializer.serialize(value, writer);
	}
201377
public JSONObject actions(String reference, HashMap<String, String> params) throws JSONException {
        return oClient.post("/offers/v1/contractors/offers/" + reference, params);
    }
168039
public function addAlias($index, $alias, $aliasParameters = [])
    {
        return (bool)$this->db->put([$index, '_alias', $alias], [], json_encode((object)$aliasParameters));
    }
982736
protected void addAlias(MonolingualTextValue alias) {
        String lang = alias.getLanguageCode();
        AliasesWithUpdate currentAliasesUpdate = newAliases.get(lang);
        
        NameWithUpdate currentLabel = newLabels.get(lang);
        // If there isn't any label for that language, put the alias there
        if (currentLabel == null) {
            newLabels.put(lang, new NameWithUpdate(alias, true));
        // If the new alias is equal to the current label, skip it
        } else if (!currentLabel.value.equals(alias)) {
        	if (currentAliasesUpdate == null) {
        		currentAliasesUpdate = new AliasesWithUpdate(new ArrayList<MonolingualTextValue>(), true);
        	}
        	List<MonolingualTextValue> currentAliases = currentAliasesUpdate.aliases;
        	if(!currentAliases.contains(alias)) {
        		currentAliases.add(alias);
        		currentAliasesUpdate.added.add(alias);
        		currentAliasesUpdate.write = true;
        	}
        	newAliases.put(lang, currentAliasesUpdate);
        }
    }
686074
void registerAlias(FieldType type, String alias)
   {
      m_aliasMap.put(new Pair<FieldTypeClass, String>(type.getFieldTypeClass(), alias), type);
   }
132516
public Integer addWithAlias(String alias, V value) {
        synchronized (dataList) {
            dataList.add(value);
            return aliasIndexMap.put(alias, dataList.size() - 1);
        }
    }