public class GovernanceArtifactManager extends Object
Constructor and Description |
---|
GovernanceArtifactManager(org.wso2.carbon.registry.core.Registry registry,
String mediaType,
String artifactNameAttribute,
String artifactNamespaceAttribute,
String artifactElementRoot,
String artifactElementNamespace,
String pathExpression,
org.wso2.carbon.registry.core.Association[] relationshipDefinitions)
Constructor accepting an instance of the registry, and also details on the type of manager.
|
GovernanceArtifactManager(org.wso2.carbon.registry.core.Registry registry,
String mediaType,
String artifactNameAttribute,
String artifactNamespaceAttribute,
String artifactElementRoot,
String artifactElementNamespace,
String pathExpression,
String lifecycle,
List<Map> validationAttributes,
org.wso2.carbon.registry.core.Association[] relationshipDefinitions)
Constructor accepting an instance of the registry, and also details on the type of manager.
|
Modifier and Type | Method and Description |
---|---|
void |
addGovernanceArtifact(GovernanceArtifact artifact)
Adds the given artifact to the registry.
|
GovernanceArtifact[] |
findGovernanceArtifacts(GovernanceArtifactFilter criteria)
Finds all artifacts matching the given filter criteria.
|
GovernanceArtifact[] |
findGovernanceArtifacts(Map<String,List<String>> criteria)
Finds all artifacts matching the given filter criteria.
|
GovernanceArtifact[] |
findGovernanceArtifacts(String query)
Finds and returns all GovernanceArtifacts that match the search query.
|
String[] |
getAllGovernanceArtifactIds()
Finds all identifiers of the artifacts on the registry.
|
GovernanceArtifact[] |
getAllGovernanceArtifacts()
Finds all artifacts of a given type on the registry.
|
GovernanceArtifact[] |
getAllGovernanceArtifactsByLifecycle(String lcName)
Retrieve all the governance artifacts which associated with the given lifecycle
|
GovernanceArtifact[] |
getAllGovernanceArtifactsByLIfecycleStatus(String lcName,
String lcState)
Retrieve all the governance artifacts which associated with the given lifecycle in the given lifecycle state
|
GovernanceArtifact |
getGovernanceArtifact(String artifactId)
Fetches the given artifact on the registry.
|
List<String> |
getPaginatedGovernanceArtifacts() |
org.wso2.carbon.registry.common.TermData[] |
getTermData(Map<String,List<String>> criteria,
String facetField,
boolean authRequired)
Find all possible terms and its count for the given facet field and query criteria
|
boolean |
isExists(GovernanceArtifact artifact)
Check whether GovernanceArtifact is exists in the Registry without loading whole artifact into memory.
|
GovernanceArtifact |
newGovernanceArtifact()
Creates a new artifact from the given qualified name.
|
GovernanceArtifact |
newGovernanceArtifact(org.apache.axiom.om.OMElement content)
Creates a new artifact from the given content.
|
void |
removeGenericArtifact(GenericArtifact artifact) |
void |
removeGovernanceArtifact(String artifactId)
Removes the given artifact from the registry.
|
protected void |
setContent(GovernanceArtifact artifact,
org.wso2.carbon.registry.core.Resource resource)
Sets content of the given artifact to the given resource on the registry.
|
void |
setContent(org.wso2.carbon.registry.core.Resource resource,
GovernanceArtifact artifact)
Sets content of the given artifact to the given resource on the registry.
|
void |
updateGovernanceArtifact(GovernanceArtifact artifact)
Updates the given artifact on the registry.
|
public GovernanceArtifactManager(org.wso2.carbon.registry.core.Registry registry, String mediaType, String artifactNameAttribute, String artifactNamespaceAttribute, String artifactElementRoot, String artifactElementNamespace, String pathExpression, org.wso2.carbon.registry.core.Association[] relationshipDefinitions)
registry
- the instance of the registry.mediaType
- the media type of resources being saved or fetched.artifactNameAttribute
- the attribute that specifies the name of the artifact.artifactNamespaceAttribute
- the attribute that specifies the namespace of the artifact.artifactElementRoot
- the attribute that specifies the root artifact element.artifactElementNamespace
- the attribute that specifies the artifact element's
namespace.pathExpression
- the expression that can be used to compute where to store
the artifact.relationshipDefinitions
- the relationship definitions for the types of associations
that will be created when the artifact gets updated.public GovernanceArtifactManager(org.wso2.carbon.registry.core.Registry registry, String mediaType, String artifactNameAttribute, String artifactNamespaceAttribute, String artifactElementRoot, String artifactElementNamespace, String pathExpression, String lifecycle, List<Map> validationAttributes, org.wso2.carbon.registry.core.Association[] relationshipDefinitions)
registry
- the instance of the registry.mediaType
- the media type of resources being saved or fetched.artifactNameAttribute
- the attribute that specifies the name of the artifact.artifactNamespaceAttribute
- the attribute that specifies the namespace of the artifact.artifactElementRoot
- the attribute that specifies the root artifact element.artifactElementNamespace
- the attribute that specifies the artifact element's
namespace.pathExpression
- the expression that can be used to compute where to store
the artifact.lifecycle
- the lifecycle name which associated with the artifactsvalidationAttributes
- the validations for artifact attributesrelationshipDefinitions
- the relationship definitions for the types of associations
that will be created when the artifact gets updated.public GovernanceArtifact newGovernanceArtifact() throws GovernanceException
GovernanceException
- if the operation failed.public GovernanceArtifact newGovernanceArtifact(org.apache.axiom.om.OMElement content) throws GovernanceException
content
- the artifact content.GovernanceException
- if the operation failed.public void addGovernanceArtifact(GovernanceArtifact artifact) throws GovernanceException
artifact
- the artifact.GovernanceException
- if the operation failed.public void updateGovernanceArtifact(GovernanceArtifact artifact) throws GovernanceException
artifact
- the artifact.GovernanceException
- if the operation failed.public GovernanceArtifact getGovernanceArtifact(String artifactId) throws GovernanceException
artifactId
- the identifier of the artifact.GovernanceException
- if the operation failed.public void removeGovernanceArtifact(String artifactId) throws GovernanceException
artifactId
- the identifier of the artifact.GovernanceException
- if the operation failed.public void setContent(org.wso2.carbon.registry.core.Resource resource, GovernanceArtifact artifact) throws GovernanceException
artifact
- the artifact.resource
- the content resource.GovernanceException
- if the operation failed.protected void setContent(GovernanceArtifact artifact, org.wso2.carbon.registry.core.Resource resource) throws GovernanceException
artifact
- the artifact.resource
- the content resource.GovernanceException
- if the operation failed.public GovernanceArtifact[] findGovernanceArtifacts(Map<String,List<String>> criteria) throws GovernanceException
criteria
- the filter criteria to be matched.GovernanceException
- if the operation failed.public org.wso2.carbon.registry.common.TermData[] getTermData(Map<String,List<String>> criteria, String facetField, boolean authRequired) throws GovernanceException
criteria
- the filter criteria to be matchedfacetField
- field used for facetingauthRequired
- authorization required flagGovernanceException
public GovernanceArtifact[] findGovernanceArtifacts(String query) throws GovernanceException
query
- The query to search artifactsGovernanceException
- if the operation failedpublic GovernanceArtifact[] findGovernanceArtifacts(GovernanceArtifactFilter criteria) throws GovernanceException
criteria
- the filter criteria to be matched.GovernanceException
- if the operation failed.public GovernanceArtifact[] getAllGovernanceArtifacts() throws GovernanceException
GovernanceException
- if the operation failed.public List<String> getPaginatedGovernanceArtifacts() throws GovernanceException
GovernanceException
public String[] getAllGovernanceArtifactIds() throws GovernanceException
GovernanceException
- if the operation failed.public GovernanceArtifact[] getAllGovernanceArtifactsByLifecycle(String lcName) throws GovernanceException
lcName
- Name of the lifecycleGovernanceException
public GovernanceArtifact[] getAllGovernanceArtifactsByLIfecycleStatus(String lcName, String lcState) throws GovernanceException
lcName
- Name of the lifecyclelcState
- Name of the current lifecycle stateGovernanceException
public boolean isExists(GovernanceArtifact artifact) throws GovernanceException
artifact
- GovernanceArtifact to check it's existence.GovernanceException
- if the operation failed.public void removeGenericArtifact(GenericArtifact artifact) throws GovernanceException
GovernanceException
Copyright © 2019 WSO2. All Rights Reserved.