Sets the specified string attribute to the specified value.

@param name name of the attribute
@param value value of the attribute
@since 1.9.0
359925
public void setStringAttribute(String name, String value) {
		ensureValue();
		Attribute attribute = new StringAttribute(value);
		attribute.setEditable(isEditable(name));
		getValue().getAllAttributes().put(name, attribute);
	}
271535
public void setAttribute(String name, Object value)
  {
    if (_stream != null) {
      _stream.setAttribute(name, value);
    }
  }
1289505
public void addAttribute(String name, String value) {
        checkType(name, String.class);
        attributes.put(name, value);
    }
470126
public Pattern attribute(final String name, final String value) {
        attributes.put(name, value);
        return this;
    }
325265
public void addAttribute(final String _name, final String _value) {
        this.attributes.put(_name, new XmlNode() {
            {
                this.name = _name;
                this.value = _value;
                this.valid = true;
                this.type = XmlNode.ATTRIBUTE_NODE;
            }
        });
    }
877811
public void setExtraAttribute(String name, String value) {
        if (extraAttributes == null) {
            extraAttributes = new HashMap<QName, Object>();
        }
        if (value == null) {
            extraAttributes.remove(new QName(null, name));
        } else {
            extraAttributes.put(new QName(null, name), value);
        }
    }
315085
public void setProperty(String name, String value)
    {
        if ((value == null) || (value.length() == 0))
        {
            _properties.remove(name);
        }
        else
        {
            _properties.setProperty(name, value);
        }
    }
91277
public void setAttribute(final String name, final Attribute attribute) {
        if (name.equals("datasource")) {
            this.allAttributes.putAll(((DataSourceAttribute) attribute).getAttributes());
        } else if (this.copyAttributes.contains(name)) {
            this.allAttributes.put(name, attribute);
        }
    }
71709
public void setAttribute(String name, Object value) {
		this.webSocketSession.getAttributes().put(name, value);
	}
1075622
public void setStrings(String name, String... values) {
		set(name, StringUtils.arrayToString(values));
	}
1053019
public BaseBo setAttribute(String attrName, Object value) {
        return setAttribute(attrName, value, true);
    }
256270
public static Object setAttribute(String name, Object value)
  {
    ClassLoader loader = Thread.currentThread().getContextClassLoader();

    return setAttribute(name, value, loader);
  }
100220
public void setStringAttribute(String name, String value) {
		Attribute attribute = getAttributes().get(name);
		if (!(attribute instanceof StringAttribute)) {
			throw new IllegalStateException("Cannot set boolean value on attribute with different type, " +
					attribute.getClass().getName() + " setting value " + value);
		}
		((StringAttribute) attribute).setValue(value);
	}
159413
public void set(String name, Object value) {
        if (value != null) {
            attributes.put(name, String.valueOf(value));
        } else {
            attributes.remove(name);
        }

    }
329744
public String setAttribute(final String name, final String value) {
        if(null!=value){
            return getAttributes().put(name, value);
        }else{
            getAttributes().remove(name);
            return value;
        }
    }
133566
public function setAttrData(string $name, ?string $value): void
  {
    $this->attributes['data-'.$name] = $value;
  }
641952
public void setLongAttribute(String name, Long value) {
		ensureValue();
		Attribute attribute = new LongAttribute(value);
		attribute.setEditable(isEditable(name));
		getValue().getAllAttributes().put(name, attribute);
	}