...
Creating a namespace has two advantages: First of all, they directly communicate to the end user that this is a tag that was set by the target itself. Secondly, if we reserve a namespace, we can also more easily delete tags that are no longer used. Assuming that every time there is a change, the target sends the full set of tags, our server side logic can simply set all those tags and remove any other tags still in the same namespace.
Usage
To set or update properties, you can simply send a feedback event using the API of the management agent:
Code Block |
---|
AgentControl ac;
Map m = new HashMap();
m.put("mykey", "myvalue");
ac.getFeedbackHandler().getChannel("auditlog").write(AuditEvent.TARGETPROPERTIES_SET, p);
|
Make sure you always write the full set of properties, as any old ones will be erased. The keys of the properties you set will end up as tags, prefixed with "target." to distinguish them from other tags that might be set manually.
Note that tags will show up as soon as you do a checkout in the ACE client, at which point you will see the repository is in a modified state. Committing such changes will make them take effect. This was done because you don't want to have such changes take effect at any time. Like any other change in the deployment, it must be a deliberate and controllable change.