class AssetDelegate extends java.lang.Object
Modifiers | Name | Description |
---|---|---|
protected java.util.Map<?, ?> |
attributeValues |
Constructor and description |
---|
AssetDelegate(java.util.function.Function<java.lang.String, java.util.List<java.lang.String>> getAttributeValues, AssetsImplementation assets, com.riadalabs.jira.plugins.insight.channel.external.api.facade.ObjectTypeAttributeFacade objectTypeAttributeFacade, int objectTypeId) |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
clearAttribute(java.lang.String attributeName) Clears an attribute, using the attribute name |
|
void |
clearAttribute(int attributeId) Clears an attribute, using the attribute ID |
|
void |
setAttribute(java.lang.String attributeName, java.lang.Object[] values) Set an attribute by its name |
|
void |
setAttribute(java.lang.String attributeName, groovy.lang.Closure<?> specification) Set an attribute by its name, using a closure for finer updates, such as adding, removing or replacing values |
|
void |
setAttribute(java.lang.String attributeName, com.riadalabs.jira.plugins.insight.services.model.ObjectBean[] objectBeans) Set an attribute by its name to another object |
|
void |
setAttribute(int attributeId, java.lang.Object[] value) Set an attribute by its ID |
|
void |
setAttribute(int attributeId, com.riadalabs.jira.plugins.insight.services.model.ObjectBean[] objectBeans) Set an attribute by its ID to another object |
|
void |
setAttribute(int attributeId, groovy.lang.Closure<?> specification) Set an attribute by its name, using a closure for finer updates, such as adding, removing or replacing values |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Clears an attribute, using the attribute name
attributeName
- name of the attributeClears an attribute, using the attribute ID
attributeID
- ID of the attributeSet an attribute by its name
attributeName
- name of the attributevalues
- one or more valuesSet an attribute by its name, using a closure for finer updates, such as adding, removing or replacing values For example:
Assets.getByKey('KEY-1').update { setAttribute('CPUs') { add('IAS-1') remove('IAS-2') replace('IAS-3', 'IAS-4') clear() } }
attributeName
- name of the attributespecification
- instructions for how to update the fieldvalues
- one or more valuesSet an attribute by its name to another object
attributeName
- name of the attributeobjectBeans
- one or more objects to referenceSet an attribute by its ID
attributeId
- ID of the attributevalues
- one or more valuesSet an attribute by its ID to another object
attributeID
- ID of the attributeobjectBeans
- one or more objects to referenceSet an attribute by its name, using a closure for finer updates, such as adding, removing or replacing values For example:
Assets.getByKey('KEY-1').update { setAttribute(123) { add('IAS-1') remove('IAS-2') replace('IAS-3', 'IAS-4') clear() } }
attributeID
- ID of the attributespecification
- instructions for how to update the fieldvalues
- one or more values