Class GenericArtifactImpl
java.lang.Object
org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifactImpl
org.wso2.carbon.governance.api.generic.dataobjects.GenericArtifactImpl
- All Implemented Interfaces:
GovernanceArtifact,GenericArtifact
- Direct Known Subclasses:
DetachedGenericArtifactImpl
Represents a generic governance artifact.
-
Field Summary
Fields inherited from class org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifactImpl
attributes, properties -
Constructor Summary
ConstructorsModifierConstructorDescriptionGenericArtifactImpl(String id, QName qName, String mediaType) Constructor accepting resource identifier and the qualified name.GenericArtifactImpl(String id, org.apache.axiom.om.OMElement artifactContentElement, String artifactNameAttribute, String artifactNamespaceAttribute, String artifactElementNamespace, String mediaType) Constructor accepting resource identifier and the artifact content.GenericArtifactImpl(String id, org.wso2.carbon.registry.core.Registry registry) Constructor accepting resource identifier and the artifact content.GenericArtifactImpl(QName qName, String mediaType) GenericArtifactImpl(QName qName, String mediaType, List<String> uniqueAttributes) protectedGenericArtifactImpl(GovernanceArtifact artifact, String mediaType) Copy constructor used for cloning.protectedGenericArtifactImpl(GovernanceArtifact artifact, String mediaType, List<String> uniqueAttributes) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Method to obtain the content of this artifact.Returns the media type of the artifact.getQName()Returns the QName of the artifact.voidMethod to load the details into this artifact.voidsetContent(byte[] content) Method to set the content of this artifact.voidMethod to set the qualified name of this artifact.Methods inherited from class org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifactImpl
addAssociation, addAssociation, addAttribute, addBidirectionalAssociation, addTag, addTags, associateRegistry, attach, attach, attachLifecycle, checkLCItem, checkRegistryResourceAssociation, compareTo, create, create, create, create, createVersion, detach, detachLifecycle, equals, getAllCheckListItemNames, getAllLifecycleActions, getAllVotingItems, getAllVotingItems, getArtifactPath, getAssociatedArtifactIds, getAssociatedRegistry, getAssociations, getAttribute, getAttributeKeys, getAttributes, getCurrentStateDuration, getDependencies, getDependents, getId, getLcName, getLcState, getLifecycleName, getLifecycleNames, getLifecycleState, getLifecycleState, getPath, getPropertyKeys, getUniqueAttributes, invokeAction, invokeAction, isLCItemChecked, isRegistryAwareArtifact, isVoted, isVoted, listTags, removeAssociation, removeAssociation, removeAttribute, removeTag, removeTags, setArtifactPath, setAttribute, setAttributes, setId, setLcName, setLcState, setUniqueAttributes, toString, uncheckLCItem, uniqueTo, unvote, unvote, updatePath, updatePath, vote, voteMethods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifact
addAssociation, addAssociation, addAttribute, addBidirectionalAssociation, addTag, addTags, attach, attach, attachLifecycle, checkLCItem, compareTo, detach, getAllCheckListItemNames, getAllLifecycleActions, getAllVotingItems, getAllVotingItems, getAssociatedArtifactIds, getAssociations, getAttribute, getAttributeKeys, getAttributes, getCurrentStateDuration, getDependencies, getDependents, getId, getLifecycleName, getLifecycleNames, getLifecycleState, getLifecycleState, getPath, getPropertyKeys, invokeAction, invokeAction, isLCItemChecked, isRegistryAwareArtifact, isVoted, isVoted, listTags, removeAssociation, removeAssociation, removeAttribute, removeTag, removeTags, setAttribute, setAttributes, setId, uncheckLCItem, uniqueTo, unvote, unvote, vote, vote
-
Constructor Details
-
GenericArtifactImpl
Copy constructor used for cloning.- Parameters:
artifact- the object to be copied.
-
GenericArtifactImpl
protected GenericArtifactImpl(GovernanceArtifact artifact, String mediaType, List<String> uniqueAttributes) -
GenericArtifactImpl
Constructor accepting resource identifier and the qualified name.- Parameters:
id- the resource identifier.qName- the qualified name.
-
GenericArtifactImpl
-
GenericArtifactImpl
-
GenericArtifactImpl
-
GenericArtifactImpl
public GenericArtifactImpl(String id, org.apache.axiom.om.OMElement artifactContentElement, String artifactNameAttribute, String artifactNamespaceAttribute, String artifactElementNamespace, String mediaType) throws GovernanceException Constructor accepting resource identifier and the artifact content.- Parameters:
id- the resource identifier.artifactContentElement- an XML element containing the content.artifactNameAttribute- the attribute that specifies the name of the artifact.artifactNamespaceAttribute- the attribute that specifies the namespace of the artifact.artifactElementNamespace- the attribute that specifies the artifact element's namespace.- Throws:
GovernanceException- if the construction fails.
-
GenericArtifactImpl
public GenericArtifactImpl(String id, org.wso2.carbon.registry.core.Registry registry) throws GovernanceException Constructor accepting resource identifier and the artifact content.- Parameters:
id- the resource identifier.registry- the registry instance to fetch artifact content.- Throws:
GovernanceException- if the construction fails.
-
-
Method Details
-
getContent
public byte[] getContent()Description copied from interface:GenericArtifactMethod to obtain the content of this artifact.- Specified by:
getContentin interfaceGenericArtifact- Returns:
- the content.
-
setContent
public void setContent(byte[] content) Description copied from interface:GenericArtifactMethod to set the content of this artifact.- Specified by:
setContentin interfaceGenericArtifact- Parameters:
content- the element.
-
loadDetails
Method to load the details into this artifact.- Throws:
GovernanceException- if the operation failed.
-
getQName
Description copied from interface:GovernanceArtifactReturns the QName of the artifact.- Specified by:
getQNamein interfaceGovernanceArtifact- Returns:
- the QName of the artifact
-
getMediaType
Description copied from interface:GovernanceArtifactReturns the media type of the artifact.- Specified by:
getMediaTypein interfaceGenericArtifact- Specified by:
getMediaTypein interfaceGovernanceArtifact- Overrides:
getMediaTypein classGovernanceArtifactImpl- Returns:
- the media type of the artifact
-
setQName
Method to set the qualified name of this artifact.- Specified by:
setQNamein interfaceGovernanceArtifact- Parameters:
qName- the qualified name.
-