Class PolicyImpl
java.lang.Object
org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifactImpl
org.wso2.carbon.governance.api.policies.dataobjects.PolicyImpl
- All Implemented Interfaces:
GovernanceArtifact,Policy
This represents a policy artifact stored on the Registry. Policy artifacts are created as a
result of importing or uploading a policy.
-
Field Summary
Fields inherited from class org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifactImpl
attributes, properties -
Constructor Summary
ConstructorsConstructorDescriptionPolicyImpl(String id, String url) Constructor accepting resource identifier and the policy URL.PolicyImpl(String id, org.wso2.carbon.registry.core.Registry registry) Constructor accepting resource path, identifier and a registry instance. -
Method Summary
Modifier and TypeMethodDescriptionMethod to obtain the policy element of this policy artifact.getQName()Returns the QName of the artifact.getUrl()Method to obtain the policy URL.voidMethod to load the policy details into this artifact.voidMethod to set the name of the policy.voidsetPolicyContent(String policyContent) Method to set the policy element of this policy artifact.voidMethod to set the qualified name of this service 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, getMediaType, 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, getMediaType, 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
-
PolicyImpl
public PolicyImpl(String id, org.wso2.carbon.registry.core.Registry registry) throws GovernanceException Constructor accepting resource path, identifier and a registry instance. This constructor should be used only when the policy already saved in the registry.- Parameters:
id- the resource identifier.registry- the registry instance.- Throws:
GovernanceException- if the construction fails.
-
PolicyImpl
Constructor accepting resource identifier and the policy URL.- Parameters:
id- the resource identifier.url- the policy URL.
-
-
Method Details
-
getQName
Description copied from interface:GovernanceArtifactReturns the QName of the artifact.- Specified by:
getQNamein interfaceGovernanceArtifact- Returns:
- the QName of the artifact
-
getPolicyContent
Method to obtain the policy element of this policy artifact.- Specified by:
getPolicyContentin interfacePolicy- Returns:
- the policy element.
-
setPolicyContent
Method to set the policy element of this policy artifact.- Specified by:
setPolicyContentin interfacePolicy- Parameters:
policyContent- the policy element.
-
getUrl
Method to obtain the policy URL.- Returns:
- the policy URL.
-
setName
Method to set the name of the policy.- Parameters:
name- the name of the policy.
-
loadPolicyDetails
Method to load the policy details into this artifact.- Throws:
GovernanceException- if the operation failed.
-
setQName
Method to set the qualified name of this service artifact.- Specified by:
setQNamein interfaceGovernanceArtifact- Parameters:
qName- the qualified name.- Throws:
GovernanceException- if the operation failed.
-