|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifact
public abstract class GovernanceArtifact
Governance Artifact abstract class, This is overwritten by Endpoint, Policy, Schema, Service, WSDL classes. This keeps common methods shared by all the governance artifacts
Field Summary | |
---|---|
protected Map<String,List<String>> |
attributes
Map of attributes associated with this governance artifact. |
Constructor Summary | |
---|---|
GovernanceArtifact()
Construct a governance artifact. |
|
GovernanceArtifact(String path,
String id)
Construct a governance artifact object from the path and the id. |
Method Summary | |
---|---|
void |
addAttribute(String key,
String value)
Adding an attribute to the artifact. |
void |
associateRegistry(org.wso2.carbon.registry.core.Registry registry)
Associate a registry, this is mostly used by the artifact manager when creating the artifact. |
protected void |
attach(GovernanceArtifact attachedToArtifact)
Attach the current artifact to an another artifact. |
protected void |
checkRegistryResourceAssociation()
Validate the resource is associated with a registry |
void |
createVersion()
Create a version of the artifact. |
protected void |
detach(String artifactId)
Detach the current artifact from the provided artifact. |
protected org.wso2.carbon.registry.core.Registry |
getAssociatedRegistry()
Returns the associated registry to the artifact. |
String |
getAttribute(String key)
Returns the attribute of a given key. |
String[] |
getAttributeKeys()
Returns the available attribute keys |
String[] |
getAttributes(String key)
Returns the attribute values for a key. |
GovernanceArtifact[] |
getDependencies()
Get dependencies of an artifacts. |
GovernanceArtifact[] |
getDependents()
Get dependents of an artifact. |
String |
getId()
Returns the id of the artifact |
String |
getPath()
Returns the path. |
abstract QName |
getQName()
Returns the QName of the artifact. |
void |
removeAttribute(String key)
Remove attribute with the given key. |
void |
setAttribute(String key,
String newValue)
Set/Update an attribute with a single value. |
void |
setAttributes(String key,
String[] newValues)
Set/Update an attribute with multiple values. |
void |
setId(String id)
Set the id |
void |
setPath(String path)
Set the paths |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Map<String,List<String>> attributes
Constructor Detail |
---|
public GovernanceArtifact(String path, String id)
path
- the pathid
- the idpublic GovernanceArtifact()
Method Detail |
---|
public abstract QName getQName()
public String getId()
public void setId(String id)
id
- the idpublic String getPath()
public void setPath(String path)
path
- the pathpublic void createVersion() throws GovernanceException
GovernanceException
- throws if the operation failed.public void associateRegistry(org.wso2.carbon.registry.core.Registry registry) throws GovernanceException
registry
- the registry.
GovernanceException
- throws if the operation failed.public void addAttribute(String key, String value) throws GovernanceException
key
- the key.value
- the value.
GovernanceException
- throws if the operation failed.public void setAttributes(String key, String[] newValues) throws GovernanceException
key
- the keynewValues
- the value
GovernanceException
- throws if the operation failed.public void setAttribute(String key, String newValue) throws GovernanceException
key
- the keynewValue
- the value
GovernanceException
- throws if the operation failed.public String getAttribute(String key) throws GovernanceException
key
- the key
GovernanceException
- throws if the operation failed.public String[] getAttributeKeys() throws GovernanceException
GovernanceException
- throws if the operation failed.public String[] getAttributes(String key) throws GovernanceException
key
- the key.
GovernanceException
- throws if the operation failed.public void removeAttribute(String key) throws GovernanceException
key
- the key
GovernanceException
- throws if the operation failed.public GovernanceArtifact[] getDependencies() throws GovernanceException
GovernanceException
- throws if the operation failed.public GovernanceArtifact[] getDependents() throws GovernanceException
GovernanceException
- throws if the operation failed.protected void attach(GovernanceArtifact attachedToArtifact) throws GovernanceException
attachedToArtifact
- the artifact the current artifact is attached to
GovernanceException
- throws if the operation failed.protected void detach(String artifactId) throws GovernanceException
artifactId
- the artifact id of the attached artifact
GovernanceException
- throws if the operation failed.protected void checkRegistryResourceAssociation() throws GovernanceException
GovernanceException
- if the resource is not associated with a registry.protected org.wso2.carbon.registry.core.Registry getAssociatedRegistry()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |