[
https://issues.jboss.org/browse/AS7-2918?page=com.atlassian.jira.plugin.s...
]
Brian Stansberry commented on AS7-2918:
---------------------------------------
There are some dev list threads about this that we should find when doing it, to make sure
we incorporate the knowledge in those discussions.
Basic idea is two ops: add-item-to-<attribute_name>-list and
remove-item-from-<attribute-name>-list.
The "item-" bit is verbose and IMHO can be removed.
The add op should take two params:
1) index -- zero based indexed for where to place the item. Negative numbers supported,
for adding from the end. UNDEFINED means at the end.
2) value -- the item.
The remove op should take two params:
1) index -- zero based indexed for where to place the item. Negative numbers supported,
for adding from the end. Required if "value" is undefined. Otherwise, UNDEFINED
means the first item where ModelNode.equals() matches the value of "value".
2) value -- the value to remove. Only required if "index" is undefined. If
provided, only remove the item if it matches.
So:
index + value == remove item at index if it equals value
index == remove item at index
value == remove first item that equals value
neither == OFE
This is not a generic operation in the way "read-resource" is. It's like
"add" and "remove" -- a conventional name for an operation that users
can learn and use across the management model. The scope of this task is not to create and
register handlers with this conventional name for every list attribute in the model. (It
could be the scope of subsystem specific subtasks.)
The scope of this task is to create appropriate support classes for those who want to
write the handlers. The support classes can't do the runtime update part -- that
requires subsystem-specific knowledge. But it can do:
1) all the model manipulation part
2) generation of metadata description for the operations
The support classes can also completely handle common cases, such as a
"ReloadRequired" variant for when immediate runtime updates aren't
supported, help with checking whether restart-resource-services is configured, etc.
Create general add-attribute-list-value and
remove-attribute-list-value operations
----------------------------------------------------------------------------------
Key: AS7-2918
URL:
https://issues.jboss.org/browse/AS7-2918
Project: Application Server 7
Issue Type: Feature Request
Components: Domain Management
Reporter: David Lloyd
Assignee: Tomaz Cerar
Priority: Minor
Fix For: Open To Community
We have generic add, change, and remove attribute operations; we should also have generic
add/remove list value operations as well. We have several attributes which are simple
lists which this could apply to usefully.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira