Portal, Express Beta Version 6.1
Operating systems: i5/OS, Linux,Windows |
You can set metadata on all modifiable instances that implement the ModifiableMetaDataProvider interface.
To set metadata for a resource, proceed by the following steps:
// obtain modifiable instance of a model node final Modifiable modifiable = controller.getModifiableNode(node); // check if the resource implements ModifiableMetaDataProvider interface if (modifiable instanceof ModifiableMetaDataProvider) { // obtain modifiable intance of the resource's meta data final ModifiableMetaData modifiableMetaData = ((ModifiableMetaDataProvider) modifiable).getModifiableMetaData(); // set meta data modifiableMetaData.setValue("MyKey", "MyValue"); }Parent topic: Modifying properties Related information