Interface GovernanceArtifact
- All Known Subinterfaces:
DetachedGenericArtifact,Endpoint,GenericArtifact,Policy,Schema,Service,Wsdl
- All Known Implementing Classes:
DetachedGenericArtifactImpl,EndpointImpl,GenericArtifactImpl,GovernanceArtifactImpl,PolicyImpl,SchemaImpl,ServiceImpl,WsdlImpl
public interface GovernanceArtifact
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddAssociation(String associationType, String artifactId) voidaddAssociation(String associationType, GovernanceArtifact attachedToArtifact) voidaddAttribute(String key, String value) Adding an attribute to the artifact.voidaddBidirectionalAssociation(String forwardType, String backwardType, GovernanceArtifact attachedToArtifact) voidvoidvoidvoidattach(GovernanceArtifact attachedToArtifact) Attach the current artifact to an another artifact.voidattachLifecycle(String name) Associates the named lifecycle with the artifactvoidcheckLCItem(int order, String aspectName) Check the checklist itembooleancompareTo(GovernanceArtifact artifact) voidDetach the current artifact from the provided artifact.String[]getAllCheckListItemNames(String aspectName) Retrieve name set of the checklist itemsString[]getAllLifecycleActions(String lifeCycleName) Get all lifecycle actions for the current state of the lifecycleString[]Retrieve action set which need votesString[]getAllVotingItems(String aspectName) Retrieve action set which need votesgetAttribute(String key) Returns the attribute of a given key.String[]Returns the available attribute keysString[]getAttributes(String key) Returns the attribute values for a key.getCurrentStateDuration(String artifactID, String lcName) This method is used to get a lifecycle's current state duration information.Get dependencies of an artifacts.Get dependents of an artifact.getId()Returns the id of the artifactReturns the name of the default lifecycle associated with this artifact.String[]Returns the names of the lifecycle associated with this artifact.Returns the state of the default lifecycle associated with this artifact.getLifecycleState(String lifeCycleName) Returns the state of the lifecycle associated with this artifact.Returns the media type of the artifact.getPath()Returns the path of the artifact, need to save the artifact before getting the path.String[]Returns the available attribute keysgetQName()Returns the QName of the artifact.voidinvokeAction(String action, String aspectName) Promote the artifact to the next state of the lifecyclevoidPromote the artifact to the next state of the lifecyclebooleanisLCItemChecked(int order, String aspectName) Check whether the given ordered lifecycle checklist item is checked or notbooleanbooleanisVoted(int order) Check whether the current user voted for given order eventbooleanCheck whether the current user voted for given order eventlistTags()voidremoveAssociation(String artifactId) voidremoveAssociation(String associationType, String artifactId) voidremoveAttribute(String key) Remove attribute with the given key.voidvoidremoveTags(List<String> tags) voidsetAttribute(String key, String newValue) Set/Update an attribute with a single value.voidsetAttributes(String key, String[] newValues) Set/Update an attribute with multiple values.voidSet the idvoidSet the QName of the artifact.voiduncheckLCItem(int order, String aspectName) Un-check the checklist itembooleanuniqueTo(GovernanceArtifact artifact) voidunvote(int order) Unvote for an actionvoidUnvote for an actionvoidvote(int order) Vote for an actionvoidVote for an action
-
Method Details
-
getQName
QName getQName()Returns the QName of the artifact.- Returns:
- the QName of the artifact
-
setQName
Set the QName of the artifact.- Parameters:
qName- of the artifact- Throws:
GovernanceException
-
getId
String getId()Returns the id of the artifact- Returns:
- the id
-
getMediaType
String getMediaType()Returns the media type of the artifact.- Returns:
- the media type of the artifact
-
setId
Set the id- Parameters:
id- the id
-
getPath
Returns the path of the artifact, need to save the artifact before getting the path.- Returns:
- here we return the path of the artifact.
- Throws:
GovernanceException- if an error occurred.
-
getLifecycleNames
Returns the names of the lifecycle associated with this artifact.- Returns:
- the names of the lifecycle associated with this artifact as an array
- Throws:
GovernanceException- if an error occurred.
-
getLifecycleName
Returns the name of the default lifecycle associated with this artifact.- Returns:
- the names of the lifecycle associated with this artifact.
- Throws:
GovernanceException- if an error occurred.
-
attachLifecycle
Associates the named lifecycle with the artifact- Parameters:
name- the name of the lifecycle to be associated with this artifact.- Throws:
GovernanceException- if an error occurred.
-
getLifecycleState
Returns the state of the default lifecycle associated with this artifact.- Returns:
- the state of the default lifecycle associated with this artifact.
- Throws:
GovernanceException- if an error occurred.
-
getLifecycleState
Returns the state of the lifecycle associated with this artifact.- Parameters:
lifeCycleName- the name of the lifecycle of which the state is required- Returns:
- the state of the lifecycle associated with this artifact.
- Throws:
GovernanceException- if an error occurred.
-
addAttribute
Adding an attribute to the artifact. The artifact should be saved to get effect the change. In the case of a single-valued attribute, this method will set or replace the existing attribute with the provided value. In the case of a multi-valued attribute, this method will append the provided value to the existing list.- Parameters:
key- the key.value- the value.- Throws:
GovernanceException- throws if the operation failed.
-
setAttributes
Set/Update an attribute with multiple values. The artifact should be saved to get effect the change.- Parameters:
key- the keynewValues- the value- Throws:
GovernanceException- throws if the operation failed.
-
setAttribute
Set/Update an attribute with a single value. The artifact should be saved to get effect the change. This method will replace the existing attribute with the provided value. In the case of a multi-valued attribute this will remove all existing values. If you want to append the provided value to a list values of a multi-valued attribute, use the addAttribute method instead.- Parameters:
key- the keynewValue- the value- Throws:
GovernanceException- throws if the operation failed.
-
getAttribute
Returns the attribute of a given key.- Parameters:
key- the key- Returns:
- the value of the attribute, if there are more than one attribute for the key this returns the first value.
- Throws:
GovernanceException- throws if the operation failed.
-
getAttributeKeys
Returns the available attribute keys- Returns:
- an array of attribute keys.
- Throws:
GovernanceException- throws if the operation failed.
-
getAttributes
Returns the attribute values for a key.- Parameters:
key- the key.- Returns:
- attribute values for the key.
- Throws:
GovernanceException- throws if the operation failed.
-
removeAttribute
Remove attribute with the given key. The artifact should be saved to get effect the change.- Parameters:
key- the key- Throws:
GovernanceException- throws if the operation failed.
-
getDependencies
Get dependencies of an artifacts. The artifacts should be saved, before calling this method.- Returns:
- an array of dependencies of this artifact.
- Throws:
GovernanceException- throws if the operation failed.
-
getDependents
Get dependents of an artifact. The artifacts should be saved, before calling this method.- Returns:
- an array of artifacts that is dependent on this artifact.
- Throws:
GovernanceException- throws if the operation failed.
-
getAllLifecycleActions
Get all lifecycle actions for the current state of the lifecycle- Parameters:
lifeCycleName- lifecycle name of which actions are needed- Returns:
- Action set which can be invoked
- Throws:
GovernanceException- throws if the operation failed.
-
invokeAction
Promote the artifact to the next state of the lifecycle- Parameters:
action- lifecycle action tobe invokedaspectName- lifecycle name of which action to be invoked- Throws:
GovernanceException- throws if the operation failed.
-
invokeAction
void invokeAction(String action, Map<String, String> parameters, String aspectName) throws GovernanceExceptionPromote the artifact to the next state of the lifecycle- Parameters:
action- lifecycle action tobe invokedparameters- extra parameters needed when promotingaspectName- lifecycle name of which action to be invoked- Throws:
GovernanceException- throws if the operation failed.
-
getAllCheckListItemNames
Retrieve name set of the checklist items- Parameters:
aspectName- lifecycle name of which action to be invoked- Returns:
- Checklist item name set
- Throws:
GovernanceException- throws if the operation failed.
-
checkLCItem
Check the checklist item- Parameters:
order- order of the checklist item need to checkedaspectName- lifecycle name of which action to be invoked- Throws:
GovernanceException- throws if the operation failed.
-
isLCItemChecked
Check whether the given ordered lifecycle checklist item is checked or not- Parameters:
order- order of the checklist item need to uncheckedaspectName- lifecycle name of which action to be invoked- Returns:
- whether the given ordered lifecycle checklist item is checked or not
- Throws:
GovernanceException- throws if the operation failed.
-
uncheckLCItem
Un-check the checklist item- Parameters:
order- order of the checklist item need to uncheckedaspectName- lifecycle name of which action to be invoked- Throws:
GovernanceException- throws if the operation failed.
-
getAllVotingItems
Retrieve action set which need votes- Parameters:
aspectName- Lifecycle name- Returns:
- Action set which can vote
- Throws:
GovernanceException- throws if the operation failed.
-
getAllVotingItems
Retrieve action set which need votes- Returns:
- Action set which can vote
- Throws:
GovernanceException- throws if the operation failed.
-
vote
Vote for an action- Parameters:
order- order of the action which need to be votedaspectName- Lifecycle name- Throws:
GovernanceException- throws if the operation failed.
-
vote
Vote for an action- Parameters:
order- order of the action which need to be voted- Throws:
GovernanceException- throws if the operation failed.
-
isVoted
Check whether the current user voted for given order event- Parameters:
order- order of the action which need to be votedaspectName- Lifecycle name- Returns:
- whether the current user voted for the given order event
- Throws:
GovernanceException- throws if the operation failed.
-
isVoted
Check whether the current user voted for given order event- Parameters:
order- order of the action which need to be voted- Returns:
- whether the current user voted for the given order event
- Throws:
GovernanceException- throws if the operation failed.
-
unvote
Unvote for an action- Parameters:
order- order of the action which need to be un votedaspectName- Lifecycle name- Throws:
GovernanceException- throws if the operation failed.
-
unvote
Unvote for an action- Parameters:
order- order of the action which need to be un voted- Throws:
GovernanceException- throws if the operation failed.
-
getPropertyKeys
Returns the available attribute keys- Returns:
- an array of attribute keys.
- Throws:
GovernanceException- throws if the operation failed.
-
attach
Attach the current artifact to an another artifact. Both the artifacts should be saved, before calling this method. This method will two generic artifact types. There are specific methods- Parameters:
attachedToArtifact- the artifact the current artifact is attached to- Throws:
GovernanceException- throws if the operation failed.
-
attach
- Throws:
GovernanceException
-
detach
Detach the current artifact from the provided artifact. Both the artifacts should be saved, before calling this method.- Parameters:
artifactId- the artifact id of the attached artifact- Throws:
GovernanceException- throws if the operation failed.
-
addAssociation
void addAssociation(String associationType, GovernanceArtifact attachedToArtifact) throws GovernanceException - Throws:
GovernanceException
-
addAssociation
- Throws:
GovernanceException
-
removeAssociation
- Throws:
GovernanceException
-
removeAssociation
- Throws:
GovernanceException
-
getAssociations
- Throws:
GovernanceException
-
getAssociatedArtifactIds
- Throws:
GovernanceException
-
isRegistryAwareArtifact
boolean isRegistryAwareArtifact() -
addTag
- Throws:
GovernanceException
-
addTags
- Throws:
GovernanceException
-
listTags
- Throws:
GovernanceException
-
removeTag
- Throws:
GovernanceException
-
removeTags
- Throws:
GovernanceException
-
addBidirectionalAssociation
void addBidirectionalAssociation(String forwardType, String backwardType, GovernanceArtifact attachedToArtifact) throws GovernanceException - Throws:
GovernanceException
-
uniqueTo
-
compareTo
-
getCurrentStateDuration
Map<String,String> getCurrentStateDuration(String artifactID, String lcName) throws GovernanceException This method is used to get a lifecycle's current state duration information.- Parameters:
artifactID- lifecycle associated artifacts ID.lcName- lifecycle name.- Returns:
- a map of current lifecycle state duration colour and duration.
- Throws:
GovernanceException
-