Add: Difference between revisions
Jump to navigation
Jump to search
Line 29: | Line 29: | ||
Specify the hierarchical structure as argument to <tt>add(...)</tt>. | Specify the hierarchical structure as argument to <tt>add(...)</tt>. | ||
The | The children management nodes for the node being added with add() are specified as follows: | ||
<pre> | <pre> | ||
...:add(child-node-name-1=node-content-1, child-node-name-2=node-content-2, ...) | |||
</pre> | </pre> | ||
A set of attributes of a child node can be specified as follows: | |||
<pre> | <pre> | ||
/subsystem=logging/file-handler=MYHANDLER:add(file={"path"=>"myfile.log", "relative-to"=>"jboss.server.log.dir"}) | child-node-name={"attribute-name1"=>"attribute-value-1", "attribute-name-2"=>"attribute-value-2", ...} | ||
</pre> | |||
In the particular case the child node has just a single attribute named "value", this is specified as follows: | |||
<pre> | |||
child-node-name="value" | |||
</pre> | |||
Usage example of the syntax described above: | |||
<pre> | |||
/subsystem=logging/file-handler=MYHANDLER:add(file={"path"=>"myfile.log", "relative-to"=>"jboss.server.log.dir"}, suffix=".yyyy-MM-dd") | |||
</pre> | </pre> | ||
Line 52: | Line 64: | ||
<file relative-to="jboss.server.log.dir" path="myfile.log"/> | <file relative-to="jboss.server.log.dir" path="myfile.log"/> | ||
</file-handler> | </file-handler> | ||
<suffix value=".yyyy-MM-dd"/> | |||
... | ... | ||
</subsystem> | </subsystem> |
Revision as of 03:47, 16 November 2016
Internal
Overview
Adds a resource of given type.
Syntax
/path/<resource-type>:<resource-value>:add(...)
Adding a Node without Content
Use add() without any argument:
/path/<resource-type>:<resource-value>:add()
Example:
TODO
Adding Hierarchical Data
Specify the hierarchical structure as argument to add(...).
The children management nodes for the node being added with add() are specified as follows:
...:add(child-node-name-1=node-content-1, child-node-name-2=node-content-2, ...)
A set of attributes of a child node can be specified as follows:
child-node-name={"attribute-name1"=>"attribute-value-1", "attribute-name-2"=>"attribute-value-2", ...}
In the particular case the child node has just a single attribute named "value", this is specified as follows:
child-node-name="value"
Usage example of the syntax described above:
/subsystem=logging/file-handler=MYHANDLER:add(file={"path"=>"myfile.log", "relative-to"=>"jboss.server.log.dir"}, suffix=".yyyy-MM-dd")
This results in:
<server ...> ... <profile> <subsystem xmlns="urn:jboss:domain:logging:1.5"> ... <file-handler name="MYHANDLER"> <file relative-to="jboss.server.log.dir" path="myfile.log"/> </file-handler> <suffix value=".yyyy-MM-dd"/> ... </subsystem> ... </profile> ... </server>