|
||||||||||
| 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 | |
|---|---|
protected Map<String,List<String>> |
attributes
Map of attributes associated with this governance artifact. |
| 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 |
void |
checkLCItem(int order,
String aspectName)
Check the checklist item |
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. |
void |
detachLifecycle(String lifecycleName)
De-associate lifecycle associated with the artifact |
String[] |
getAllCheckListItemNames(String aspectName)
Retrieve name set of the checklist items |
String[] |
getAllLifecycleActions(String lifeCycleName)
Get all lifecycle actions for the current state of the lifecycle |
String[] |
getAllVotingItems()
Retrieve action set which need votes |
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[] |
getLifecycleNames()
Returns the name of the lifecycle associated with this artifact. |
String |
getLifecycleState()
Returns the state of the lifecycle associated with this artifact. |
String |
getLifecycleState(String lifeCycleName)
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 |
invokeAction(String action,
Map<String,String> parameters,
String aspectName)
Invoke lifecycle action |
void |
invokeAction(String action,
String aspectName)
Invoke lifecycle action |
boolean |
isLCItemChecked(int order,
String aspectName)
Check whether the given ordered lifecycle checklist item is checked or not |
boolean |
isVoted(int order)
Check whether the current user voted for given order event |
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 |
uncheckLCItem(int order,
String aspectName)
Un-check the checklist item |
void |
unvote(int order)
Unvote for an action |
void |
updatePath()
update the path after moving the resource. |
void |
updatePath(String artifactId)
update the path after moving the resource. |
void |
vote(int order)
Vote for an action |
| 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 |
|---|
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
GovernanceExceptionpublic String getId()
getId in interface GovernanceArtifactpublic void setId(String id)
setId in interface GovernanceArtifactid - the id
public String getPath()
throws GovernanceException
getPath in interface GovernanceArtifactGovernanceException - if an error occurred.
public String getLifecycleName()
throws GovernanceException
getLifecycleName in interface GovernanceArtifactGovernanceException - if an error occurred.
public String[] getLifecycleNames()
throws GovernanceException
getLifecycleNames in interface GovernanceArtifactGovernanceException - if an error occurred.
public void attachLifecycle(String name)
throws GovernanceException
attachLifecycle in interface GovernanceArtifactname - the name of the lifecycle to be associated with this artifact.
GovernanceException - if an error occurred.
public void detachLifecycle(String lifecycleName)
throws GovernanceException
GovernanceException - if an error occurred.
public String getLifecycleState()
throws GovernanceException
getLifecycleState in interface GovernanceArtifactGovernanceException - if an error occurred.
public String getLifecycleState(String lifeCycleName)
throws GovernanceException
getLifecycleState in interface GovernanceArtifactlifeCycleName - the name of the lifecycle of which the state is required
GovernanceException - if an error occurred.
public void updatePath()
throws GovernanceException
GovernanceException - if an error occurred.
public void updatePath(String artifactId)
throws GovernanceException
artifactId - id of the artifact
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 GovernanceArtifactkey - the key.value - the value.
GovernanceException - throws if the operation failed.
public void setAttributes(String key,
String[] newValues)
throws GovernanceException
setAttributes in interface GovernanceArtifactkey - the keynewValues - the value
GovernanceException - throws if the operation failed.
public void setAttribute(String key,
String newValue)
throws GovernanceException
setAttribute in interface GovernanceArtifactkey - the keynewValue - the value
GovernanceException - throws if the operation failed.
public String getAttribute(String key)
throws GovernanceException
getAttribute in interface GovernanceArtifactkey - the key
GovernanceException - throws if the operation failed.
public String[] getAttributeKeys()
throws GovernanceException
getAttributeKeys in interface GovernanceArtifactGovernanceException - throws if the operation failed.
public String[] getAttributes(String key)
throws GovernanceException
getAttributes in interface GovernanceArtifactkey - the key.
GovernanceException - throws if the operation failed.
public void removeAttribute(String key)
throws GovernanceException
removeAttribute in interface GovernanceArtifactkey - the key
GovernanceException - throws if the operation failed.
public GovernanceArtifact[] getDependencies()
throws GovernanceException
getDependencies in interface GovernanceArtifactGovernanceException - throws if the operation failed.
public GovernanceArtifact[] getDependents()
throws GovernanceException
getDependents in interface GovernanceArtifactGovernanceException - throws if the operation failed.
public String[] getAllLifecycleActions(String lifeCycleName)
throws GovernanceException
getAllLifecycleActions in interface GovernanceArtifactlifeCycleName - lifecycle name of which actions are needed
GovernanceException - throws if the operation failed.
public void invokeAction(String action,
String aspectName)
throws GovernanceException
invokeAction in interface GovernanceArtifactaction - lifecycle action tobe invokedaspectName - aspect name of which the action need to be invoked
GovernanceException - throws if the operation failed.
public void invokeAction(String action,
Map<String,String> parameters,
String aspectName)
throws GovernanceException
invokeAction in interface GovernanceArtifactaction - lifecycle action tobe invokedparameters - extra parameters needed when promotingaspectName - aspect name of which the action need to be invoked
GovernanceException - throws if the operation failed.
public String[] getAllCheckListItemNames(String aspectName)
throws GovernanceException
getAllCheckListItemNames in interface GovernanceArtifactaspectName - lifecycle name of which action to be invoked
GovernanceException - throws if the operation failed.
public void checkLCItem(int order,
String aspectName)
throws GovernanceException
checkLCItem in interface GovernanceArtifactaspectName - lifecycle name of which action to be invokedorder - order of the checklist item need to checked
GovernanceException - throws if the operation failed.
public boolean isLCItemChecked(int order,
String aspectName)
throws GovernanceException
isLCItemChecked in interface GovernanceArtifactorder - order of the checklist item need to uncheckedaspectName - lifecycle name of which action to be invoked
GovernanceException - throws if the operation failed.
public void uncheckLCItem(int order,
String aspectName)
throws GovernanceException
uncheckLCItem in interface GovernanceArtifactorder - order of the checklist item need to uncheckedaspectName - lifecycle name of which action to be invoked
GovernanceException - throws if the operation failed.
public String[] getAllVotingItems()
throws GovernanceException
getAllVotingItems in interface GovernanceArtifactGovernanceException - throws if the operation failed.
public void vote(int order)
throws GovernanceException
vote in interface GovernanceArtifactorder - order of the action which need to be voted
GovernanceException - throws if the operation failed.
public boolean isVoted(int order)
throws GovernanceException
isVoted in interface GovernanceArtifactorder - order of the action which need to be voted
GovernanceException - throws if the operation failed.
public void unvote(int order)
throws GovernanceException
unvote in interface GovernanceArtifactorder - order of the action which need to be unvoted
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 | |||||||||