|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.wso2.carbon.governance.api.util.GovernanceUtils
public class GovernanceUtils
Constructor Summary | |
---|---|
GovernanceUtils()
|
Method Summary | |
---|---|
static void |
addGovernanceArtifactEntry(org.wso2.carbon.registry.core.Registry registry,
String artifactId,
String artifactPath)
Method to register a governance artifact. |
static org.apache.axiom.om.OMElement |
buildOMElement(byte[] content)
Method to build an AXIOM element from a byte stream. |
static String |
derivePathFromQName(QName qName)
Method to obtain a path from a qualified name. |
static String |
getArtifactPath(org.wso2.carbon.registry.core.Registry registry,
String artifactId)
Method to obtain the artifact path of a governance artifact on the registry. |
static org.wso2.carbon.registry.core.Registry |
getGovernanceSystemRegistry(org.wso2.carbon.registry.core.Registry registry)
Returns the system governance registry. |
static String |
getRelativeServicePath(org.wso2.carbon.registry.core.config.RegistryContext registryContext,
QName qName)
Method to derive the relative service path for the given qualified name. |
static String[] |
getResultPaths(org.wso2.carbon.registry.core.Registry registry,
String mediaType)
Method to obtain a list of paths having resources of the given media type. |
static void |
removeArtifact(org.wso2.carbon.registry.core.Registry registry,
String artifactId)
Method to remove a governance artifact from the registry. |
static GovernanceArtifact |
retrieveGovernanceArtifactById(org.wso2.carbon.registry.core.Registry registry,
String artifactId)
Method to obtain a governance artifact on the registry. |
static GovernanceArtifact |
retrieveGovernanceArtifactByPath(org.wso2.carbon.registry.core.Registry registry,
String artifactPath)
Method to obtain a governance artifact on the registry by the artifact path. |
static String |
serializeOMElement(org.apache.axiom.om.OMElement element)
Method to serialize an XML element into a string. |
static void |
setRegistryService(org.wso2.carbon.registry.core.service.RegistryService registryService)
Setting the registry service. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GovernanceUtils()
Method Detail |
---|
public static void setRegistryService(org.wso2.carbon.registry.core.service.RegistryService registryService)
registryService
- the registryService.public static org.wso2.carbon.registry.core.Registry getGovernanceSystemRegistry(org.wso2.carbon.registry.core.Registry registry) throws org.wso2.carbon.registry.core.exceptions.RegistryException
registry
- the user registry.
org.wso2.carbon.registry.core.exceptions.RegistryException
- throws if an error occurspublic static void removeArtifact(org.wso2.carbon.registry.core.Registry registry, String artifactId) throws GovernanceException
registry
- the registry instance.artifactId
- the identifier of the artifact.
GovernanceException
- if the operation failed.public static String getArtifactPath(org.wso2.carbon.registry.core.Registry registry, String artifactId) throws GovernanceException
registry
- the registry instance.artifactId
- the identifier of the artifact.
GovernanceException
- if the operation failed.public static GovernanceArtifact retrieveGovernanceArtifactById(org.wso2.carbon.registry.core.Registry registry, String artifactId) throws GovernanceException
registry
- the registry instance.artifactId
- the identifier of the artifact.
GovernanceException
- if the operation failed.public static GovernanceArtifact retrieveGovernanceArtifactByPath(org.wso2.carbon.registry.core.Registry registry, String artifactPath) throws GovernanceException
registry
- the registry instance.artifactPath
- the path of the artifact.
GovernanceException
- if the operation failed.public static void addGovernanceArtifactEntry(org.wso2.carbon.registry.core.Registry registry, String artifactId, String artifactPath) throws GovernanceException
registry
- the registry instance.artifactId
- the identifier of the artifact.artifactPath
- the path of the artifact.
GovernanceException
- if the operation failed.public static org.apache.axiom.om.OMElement buildOMElement(byte[] content) throws GovernanceException
content
- the stream of bytes.
GovernanceException
- if the operation failed.public static String serializeOMElement(org.apache.axiom.om.OMElement element) throws GovernanceException
element
- the XML element.
GovernanceException
- if the operation failed.public static String derivePathFromQName(QName qName)
qName
- the qualified name.
public static String[] getResultPaths(org.wso2.carbon.registry.core.Registry registry, String mediaType) throws GovernanceException
registry
- the registry instance to run query on.mediaType
- the media type.
GovernanceException
- if the operation failed.public static String getRelativeServicePath(org.wso2.carbon.registry.core.config.RegistryContext registryContext, QName qName)
registryContext
- the registry context to use.qName
- the qualified name.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |