|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.wso2.carbon.governance.api.policies.PolicyManager
public class PolicyManager
This provides the management functionality for policy artifacts stored on the registry.
Constructor Summary | |
---|---|
PolicyManager(org.wso2.carbon.registry.core.Registry registry)
Constructor accepting an instance of the registry to use. |
Method Summary | |
---|---|
void |
addPolicy(Policy policy)
Adds the given policy artifact to the registry. |
Policy[] |
findPolicies(PolicyFilter criteria)
Finds all policy artifacts matching the given filter criteria. |
Policy[] |
getAllPolicies()
Finds all policy artifacts on the registry. |
Policy |
getPolicy(String policyId)
Fetches the given policy artifact on the registry. |
Policy |
newPolicy(byte[] content)
Create a new Schema based on content either embedded or passed to a service. |
Policy |
newPolicy(byte[] content,
String name)
Create a new Schema based on content either embedded or passed to a service. |
Policy |
newPolicy(String url)
Creates a new policy artifact from the given URL. |
void |
removePolicy(String policyId)
Removes the given policy artifact from the registry. |
protected void |
setContent(Policy policy,
org.wso2.carbon.registry.core.Resource policyResource)
Sets content of the given policy artifact to the given resource on the registry. |
void |
updatePolicy(Policy policy)
Updates the given policy artifact on the registry. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PolicyManager(org.wso2.carbon.registry.core.Registry registry)
registry
- the instance of the registry.Method Detail |
---|
public Policy newPolicy(byte[] content) throws org.wso2.carbon.registry.core.exceptions.RegistryException
content
- the schema content
GovernanceException
- if the operation failed.
org.wso2.carbon.registry.core.exceptions.RegistryException
public Policy newPolicy(byte[] content, String name) throws org.wso2.carbon.registry.core.exceptions.RegistryException
content
- the schema contentname
- the schema name
GovernanceException
- if the operation failed.
org.wso2.carbon.registry.core.exceptions.RegistryException
public Policy newPolicy(String url) throws GovernanceException
url
- the given URL.
GovernanceException
- if the operation failed.public void addPolicy(Policy policy) throws GovernanceException
policy
- the policy artifact.
GovernanceException
- if the operation failed.public void updatePolicy(Policy policy) throws GovernanceException
policy
- the policy artifact.
GovernanceException
- if the operation failed.public Policy getPolicy(String policyId) throws GovernanceException
policyId
- the identifier of the policy artifact.
GovernanceException
- if the operation failed.public void removePolicy(String policyId) throws GovernanceException
policyId
- the identifier of the policy artifact.
GovernanceException
- if the operation failed.protected void setContent(Policy policy, org.wso2.carbon.registry.core.Resource policyResource) throws GovernanceException
policy
- the policy artifact.policyResource
- the content resource.
GovernanceException
- if the operation failed.public Policy[] findPolicies(PolicyFilter criteria) throws GovernanceException
criteria
- the filter criteria to be matched.
GovernanceException
- if the operation failed.public Policy[] getAllPolicies() throws GovernanceException
GovernanceException
- if the operation failed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |