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
public class GenericArtifactImpl extends GovernanceArtifactImpl implements GenericArtifact
Represents a generic governance artifact.
-
-
Field Summary
-
Fields inherited from class org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifactImpl
attributes, properties
-
-
Constructor Summary
Constructors Modifier Constructor Description GenericArtifactImpl(String id, QName qName, String mediaType)Constructor accepting resource identifier and the qualified name.GenericArtifactImpl(String id, QName qName, String mediaType, List<String> uniqueAttributes)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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getContent()Method to obtain the content of this artifact.StringgetMediaType()Returns the media type of the artifact.QNamegetQName()Returns the QName of the artifact.voidloadDetails()Method to load the details into this artifact.voidsetContent(byte[] content)Method to set the content of this artifact.voidsetQName(QName qName)Method 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, vote
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods 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 Detail
-
GenericArtifactImpl
protected GenericArtifactImpl(GovernanceArtifact artifact, String mediaType)
Copy constructor used for cloning.- Parameters:
artifact- the object to be copied.
-
GenericArtifactImpl
protected GenericArtifactImpl(GovernanceArtifact artifact, String mediaType, List<String> uniqueAttributes)
-
GenericArtifactImpl
public GenericArtifactImpl(String id, QName qName, String mediaType)
Constructor accepting resource identifier and the qualified name.- Parameters:
id- the resource identifier.qName- the qualified name.
-
GenericArtifactImpl
public GenericArtifactImpl(String id, QName qName, String mediaType, List<String> uniqueAttributes)
-
GenericArtifactImpl
public GenericArtifactImpl(QName qName, String mediaType, List<String> uniqueAttributes)
-
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 Detail
-
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
public void loadDetails() throws GovernanceExceptionMethod to load the details into this artifact.- Throws:
GovernanceException- if the operation failed.
-
getQName
public QName getQName()
Description copied from interface:GovernanceArtifactReturns the QName of the artifact.- Specified by:
getQNamein interfaceGovernanceArtifact- Returns:
- the QName of the artifact
-
getMediaType
public String 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
public void setQName(QName qName)
Method to set the qualified name of this artifact.- Specified by:
setQNamein interfaceGovernanceArtifact- Parameters:
qName- the qualified name.- Throws:
GovernanceException- if the operation failed.
-
-