|
||||||||||
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.GovernanceArtifactImpl
public abstract class GovernanceArtifactImpl
Governance Artifact abstract class, This is overwritten by Endpoint, Policy, Schema, Service, WSDL, People classes. This keeps common methods shared by all the governance artifacts
Field Summary | |
---|---|
String |
artifactPath
|
protected Map<String,List<String>> |
attributes
Map of attributes associated with this governance artifact. |
String |
lcName
|
String |
lcState
|
Constructor Summary | |
---|---|
|
GovernanceArtifactImpl()
Construct a governance artifact. |
protected |
GovernanceArtifactImpl(GovernanceArtifactImpl artifact)
Copy constructor used for cloning. |
|
GovernanceArtifactImpl(String id)
Construct a governance artifact object from the path and the id. |
|
GovernanceArtifactImpl(String id,
org.apache.axiom.om.OMElement contentElement)
Constructor accepting resource identifier and the XML content. |
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. |
void |
attachLifecycle(String name)
Associates the named lifecycle with the artifact |
protected void |
checkRegistryResourceAssociation()
Validate the resource is associated with a registry |
static GovernanceArtifactImpl |
create(org.wso2.carbon.registry.core.Registry registry,
String artifactId)
|
static GovernanceArtifactImpl |
create(org.wso2.carbon.registry.core.Registry registry,
String artifactId,
org.apache.axiom.om.OMElement content)
|
void |
createVersion()
Create a version of the artifact. |
protected void |
detach(String artifactId)
Detach the current artifact from the provided artifact. |
String |
getArtifactPath()
|
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 |
getLcName()
|
String |
getLcState()
|
String |
getLifecycleName()
Returns the name of the lifecycle associated with this artifact. |
String |
getLifecycleState()
Returns the state of the lifecycle associated with this artifact. |
String |
getPath()
Returns the path of the artifact, need to save the artifact before getting the path. |
void |
removeAttribute(String key)
Remove attribute with the given key. |
void |
setArtifactPath(String artifactPath)
|
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 |
setLcName(String lcName)
|
void |
setLcState(String lcState)
|
void |
updatePath()
update the path after moving the resource. |
void |
updatePath(String artifactId)
update the path after moving the resource. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifact |
---|
getQName |
Field Detail |
---|
public String lcName
public String lcState
public String artifactPath
protected Map<String,List<String>> attributes
Constructor Detail |
---|
public GovernanceArtifactImpl(String id)
id
- the idpublic GovernanceArtifactImpl()
protected GovernanceArtifactImpl(GovernanceArtifactImpl artifact)
artifact
- the object to be copied.public GovernanceArtifactImpl(String id, org.apache.axiom.om.OMElement contentElement) throws GovernanceException
id
- the resource identifier.contentElement
- an XML element containing the content.
GovernanceException
- if the construction fails.Method Detail |
---|
public String getLcName()
public void setLcName(String lcName)
public String getLcState()
public void setLcState(String lcState)
public String getArtifactPath()
public void setArtifactPath(String artifactPath)
public static GovernanceArtifactImpl create(org.wso2.carbon.registry.core.Registry registry, String artifactId) throws GovernanceException
GovernanceException
public static GovernanceArtifactImpl create(org.wso2.carbon.registry.core.Registry registry, String artifactId, org.apache.axiom.om.OMElement content) throws GovernanceException
GovernanceException
public String getId()
getId
in interface GovernanceArtifact
public void setId(String id)
setId
in interface GovernanceArtifact
id
- the idpublic String getPath() throws GovernanceException
getPath
in interface GovernanceArtifact
GovernanceException
- if an error occurred.public String getLifecycleName() throws GovernanceException
getLifecycleName
in interface GovernanceArtifact
GovernanceException
- if an error occurred.public void attachLifecycle(String name) throws GovernanceException
attachLifecycle
in interface GovernanceArtifact
name
- the name of the lifecycle to be associated with this artifact.
GovernanceException
- if an error occurred.public String getLifecycleState() throws GovernanceException
getLifecycleState
in interface GovernanceArtifact
GovernanceException
- if an error occurred.public void updatePath() throws GovernanceException
GovernanceException
- if an error occurred.public void updatePath(String artifactId) throws GovernanceException
artifactId
-
GovernanceException
- if an error occurred.public 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
addAttribute
in interface GovernanceArtifact
key
- the key.value
- the value.
GovernanceException
- throws if the operation failed.public void setAttributes(String key, String[] newValues) throws GovernanceException
setAttributes
in interface GovernanceArtifact
key
- the keynewValues
- the value
GovernanceException
- throws if the operation failed.public void setAttribute(String key, String newValue) throws GovernanceException
setAttribute
in interface GovernanceArtifact
key
- the keynewValue
- the value
GovernanceException
- throws if the operation failed.public String getAttribute(String key) throws GovernanceException
getAttribute
in interface GovernanceArtifact
key
- the key
GovernanceException
- throws if the operation failed.public String[] getAttributeKeys() throws GovernanceException
getAttributeKeys
in interface GovernanceArtifact
GovernanceException
- throws if the operation failed.public String[] getAttributes(String key) throws GovernanceException
getAttributes
in interface GovernanceArtifact
key
- the key.
GovernanceException
- throws if the operation failed.public void removeAttribute(String key) throws GovernanceException
removeAttribute
in interface GovernanceArtifact
key
- the key
GovernanceException
- throws if the operation failed.public GovernanceArtifact[] getDependencies() throws GovernanceException
getDependencies
in interface GovernanceArtifact
GovernanceException
- throws if the operation failed.public GovernanceArtifact[] getDependents() throws GovernanceException
getDependents
in interface GovernanceArtifact
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 |