...
Code Block |
---|
import org.wso2.carbon.governance.api.generic.GenericArtifactManager; import org.wso2.carbon.governance.api.generic.dataobjects.GenericArtifact; GovernanceUtils.loadGovernanceArtifacts((UserRegistry) registry); GenericArtifactManager artifactManager = new GenericArtifactManager(registry, projectKey); GenericArtifact artifact = artifactManager.newGovernanceArtifact(new QName("http://www.example.com","event")); artifactManager.addGenericArtifact(artifact); |
Info | ||
---|---|---|
| ||
Please note that you need to invoke the GovernanceUtils.loadGovernanceArtifacts((UserRegistry) registry); method before using the Governance API for generic artifacts. |
Update an Artifact
To make further changes to a Artifact which already in the Registry you can use the updateGenericArtifact()
method.
...