com.softwareag.centrasite.policy.api
Interface PolicyQueryManager


public interface PolicyQueryManager

Defines Policy specific querying operations.


Method Summary
 void clearPolicyCache()
          Clear the policy cache
 java.util.List<Policy> findActivePoliciesForAssets(java.util.Collection<javax.xml.registry.infomodel.RegistryObject> assets, javax.xml.registry.infomodel.Concept eventType)
          Get the list of Policies applicable for the given ROs and event type
 java.util.List<Policy> findPolicies(javax.xml.registry.infomodel.RegistryObject regObj, javax.xml.registry.infomodel.Concept eventType)
          Get the list of Policies applicable for the given RO and event type
 java.util.List<Policy> findPolicies(javax.xml.registry.infomodel.RegistryObject regObj, javax.xml.registry.infomodel.Concept eventType, javax.xml.registry.infomodel.Concept toState)
          Get the list of Policies applicable for the given RO, event type and a target state to which transition is to be made
 java.util.Collection<PolicyActionCategory> getActionCategories(PolicyType policyType)
          Get the collection of Action Categories applicable for the specified type
 java.util.Collection<PolicyActionCategory> getAllActionCategories()
          get the collection of all Action Categories
 IPolicyStatus getASPolicyStatus(java.lang.String policyStatus)
          The help to generate IPolicyStatus object for a given Policy Status value This method can be used under the JAXR/Policy engine layer.
 IPolicyStatus getFailureStatus()
          Helper method to return the Failure Policy
 IPolicyStatus getInfoStatus()
          Helper method to return the Info Policy
 IPolicyStatus getInProgressStatus()
          Helper method to return the InProgress Policy
 java.util.Collection<Policy> getOrganizationSpecificPolicies(PolicyType policyType, javax.xml.registry.infomodel.Organization organization)
          Get the collection of non-global org-specific policies for the given policy type and organization
 java.util.Collection<Policy> getPolicies(PolicyType policyType)
          Get the collection of Policies for the given type
 java.util.Collection<Policy> getPolicies(PolicyType policyType, java.lang.String keywordSearch)
          Get the collection of Policies for the given type
 Policy getPolicy(com.centrasite.jaxr.infomodel.CentraSiteRegistryEntry registryEntry)
          Get the Policy object for the given registryEntry
 Policy getPolicy(java.lang.String policyId)
          Get the Policy object for the given id
 PolicyActionTemplate getPolicyAction(com.centrasite.jaxr.infomodel.CentraSiteRegistryEntry registryEntry)
          Get the Policy Action object for the given registryEntry
 PolicyActionTemplate getPolicyAction(java.lang.String policyActionId)
          Get the Policy Action object for the given id
 PolicyActionCategory getPolicyActionCategory(com.centrasite.jaxr.infomodel.CentraSiteConcept actionCategoryConcept)
          Get the Action Category for the given Category concept
 PolicyActionCategory getPolicyActionCategory(java.lang.String actionCategoryConceptId)
          Get the Action Category for the given category id
 PolicyActionInstance getPolicyActionInstance(com.centrasite.jaxr.infomodel.CentraSiteAssociation actionInstanceAssociation)
          Get the Policy Action Instance object for the given association object
 PolicyActionInstance getPolicyActionInstance(java.lang.String actionInstanceId)
          Get the Policy Action Instance object for the given actionInstanceId
 PolicyActionParameter getPolicyActionParameter(com.centrasite.jaxr.infomodel.CentraSiteRegistryEntry registryEntry)
          Get the Policy Action Parameter object for the given registryEntry
 PolicyActionParameter getPolicyActionParameter(java.lang.String policyActionParameterId)
          Get the Policy Action Parameter object for the given id
 PolicyCondition getPolicyCondition(com.centrasite.jaxr.infomodel.CentraSiteRegistryEntry registryEntry)
          Get the Policy Condition object for the given registryEntry
 PolicyCondition getPolicyCondition(java.lang.String policyConditionId)
          Get the Policy Condition object for the given policyConditionId
 PolicyParameter getPolicyParameter(com.centrasite.jaxr.infomodel.CentraSiteRegistryEntry registryEntry)
          Get the Policy Parameter object for the given registryEntry
 PolicyParameter getPolicyParameter(java.lang.String policyParameterId)
          Get the Policy Parameter object for the given policyParameterId
 IPolicyStatus getSuccessStatus()
          Helper method to return the Success Policy
 IPolicyStatus getWarningStatus()
          Helper method to return the Warning Policy
 boolean isNewPolicyClient()
          True will be returned when a new policy client is been used in the CLASSPATH.
 boolean isPolicyDefinedForType(javax.xml.registry.infomodel.Concept typeConcept)
          Tells whether any policy is defined for the given asset type
 

Method Detail

getAllActionCategories

java.util.Collection<PolicyActionCategory> getAllActionCategories()
                                                                  throws javax.xml.registry.JAXRException,
                                                                         PolicyException
get the collection of all Action Categories

Returns:
Collection of all Action Categories
Throws:
javax.xml.registry.JAXRException
PolicyException

getActionCategories

java.util.Collection<PolicyActionCategory> getActionCategories(PolicyType policyType)
                                                               throws javax.xml.registry.JAXRException,
                                                                      PolicyException
Get the collection of Action Categories applicable for the specified type

Parameters:
policyType - whether Design/Change Time or Runtime
Returns:
collection of Action Categories for the specified type
Throws:
javax.xml.registry.JAXRException
PolicyException

getPolicyActionCategory

PolicyActionCategory getPolicyActionCategory(java.lang.String actionCategoryConceptId)
                                             throws javax.xml.registry.JAXRException,
                                                    PolicyException
Get the Action Category for the given category id

Parameters:
actionCategoryConceptId - id for which Policy Action Category is to be fetched
Returns:
Action Category for the given category id
Throws:
javax.xml.registry.JAXRException
PolicyException - if the object is not a Action Category

getPolicyActionCategory

PolicyActionCategory getPolicyActionCategory(com.centrasite.jaxr.infomodel.CentraSiteConcept actionCategoryConcept)
                                             throws javax.xml.registry.JAXRException,
                                                    PolicyException
Get the Action Category for the given Category concept

Parameters:
actionCategoryConcept - concept for which Policy Action Category is to be fetched
Returns:
Action Category for the given Category concept
Throws:
javax.xml.registry.JAXRException
PolicyException - if the concept is not a Action Category

getPolicyAction

PolicyActionTemplate getPolicyAction(java.lang.String policyActionId)
                                     throws PolicyException,
                                            javax.xml.registry.JAXRException
Get the Policy Action object for the given id

Parameters:
policyActionId - id for which Policy Action is to be fetched
Returns:
Policy Action object for the given id
Throws:
PolicyException - if the object is not a Policy Action
javax.xml.registry.JAXRException

getPolicyAction

PolicyActionTemplate getPolicyAction(com.centrasite.jaxr.infomodel.CentraSiteRegistryEntry registryEntry)
                                     throws PolicyException,
                                            javax.xml.registry.JAXRException
Get the Policy Action object for the given registryEntry

Parameters:
registryEntry - registryEntry for which Policy Action is to be fetched
Returns:
Policy Action object for the given registryEntry
Throws:
PolicyException - if the object is not a Policy Action
javax.xml.registry.JAXRException

getPolicyActionParameter

PolicyActionParameter getPolicyActionParameter(java.lang.String policyActionParameterId)
                                               throws PolicyException,
                                                      javax.xml.registry.JAXRException
Get the Policy Action Parameter object for the given id

Parameters:
policyActionParameterId - id for which Policy Action Parameter is to be fetched
Returns:
Policy Action Parameter object for the given id
Throws:
PolicyException - if the object is not a Policy Action Parameter
javax.xml.registry.JAXRException

getPolicyActionParameter

PolicyActionParameter getPolicyActionParameter(com.centrasite.jaxr.infomodel.CentraSiteRegistryEntry registryEntry)
                                               throws PolicyException,
                                                      javax.xml.registry.JAXRException
Get the Policy Action Parameter object for the given registryEntry

Parameters:
registryEntry - registryEntry for which Policy Action Parameter is to be fetched
Returns:
Policy Action Parameter object for the given registryEntry
Throws:
PolicyException - if the object is not a Policy Action Parameter
javax.xml.registry.JAXRException

getPolicies

java.util.Collection<Policy> getPolicies(PolicyType policyType)
                                         throws javax.xml.registry.JAXRException,
                                                PolicyException
Get the collection of Policies for the given type

Parameters:
policyType - whether Design/Change Time or Runtime
Returns:
Collection of Policies for the given type
Throws:
javax.xml.registry.JAXRException
PolicyException

getPolicies

java.util.Collection<Policy> getPolicies(PolicyType policyType,
                                         java.lang.String keywordSearch)
                                         throws javax.xml.registry.JAXRException,
                                                PolicyException
Get the collection of Policies for the given type

Parameters:
policyType - whether Design/Change Time or Runtime
keywordSearch - search based on the text
Returns:
Collection of Policies for the given type
Throws:
javax.xml.registry.JAXRException
PolicyException

findPolicies

java.util.List<Policy> findPolicies(javax.xml.registry.infomodel.RegistryObject regObj,
                                    javax.xml.registry.infomodel.Concept eventType)
                                    throws PolicyException,
                                           javax.xml.registry.JAXRException
Get the list of Policies applicable for the given RO and event type

Parameters:
regObj - RO for which policies are to be fired
eventType - event type on which policies are to be fired
Returns:
List of applicable Policies
Throws:
PolicyException
javax.xml.registry.JAXRException

findPolicies

java.util.List<Policy> findPolicies(javax.xml.registry.infomodel.RegistryObject regObj,
                                    javax.xml.registry.infomodel.Concept eventType,
                                    javax.xml.registry.infomodel.Concept toState)
                                    throws javax.xml.registry.JAXRException,
                                           PolicyException
Get the list of Policies applicable for the given RO, event type and a target state to which transition is to be made

Parameters:
regObj - RO for which policies are to be fired
eventType - event type on which policies are to be fired
toState - target state to which transition is to be made
Returns:
List of Policies applicable for the given RO, event type and a target state
Throws:
javax.xml.registry.JAXRException
PolicyException

getPolicy

Policy getPolicy(java.lang.String policyId)
                 throws PolicyException,
                        javax.xml.registry.JAXRException
Get the Policy object for the given id

Parameters:
policyId - id for which Policy is to be fetched
Returns:
Policy object for the given id
Throws:
PolicyException - if the object is not a Policy
javax.xml.registry.JAXRException

getPolicy

Policy getPolicy(com.centrasite.jaxr.infomodel.CentraSiteRegistryEntry registryEntry)
                 throws PolicyException,
                        javax.xml.registry.JAXRException
Get the Policy object for the given registryEntry

Parameters:
registryEntry - registryEntry for which Policy is to be fetched
Returns:
Policy object for the given registryEntry
Throws:
PolicyException - if the object is not a Policy
javax.xml.registry.JAXRException

getPolicyActionInstance

PolicyActionInstance getPolicyActionInstance(java.lang.String actionInstanceId)
                                             throws javax.xml.registry.JAXRException,
                                                    PolicyException
Get the Policy Action Instance object for the given actionInstanceId

Parameters:
actionInstanceId - id for which Policy Action Instance is to be fetched
Returns:
Policy Action Instance for the given actionInstanceId
Throws:
javax.xml.registry.JAXRException
PolicyException - if the object is not a Policy Action Instance

getPolicyActionInstance

PolicyActionInstance getPolicyActionInstance(com.centrasite.jaxr.infomodel.CentraSiteAssociation actionInstanceAssociation)
                                             throws javax.xml.registry.JAXRException,
                                                    PolicyException
Get the Policy Action Instance object for the given association object

Parameters:
actionInstanceAssociation - association for which Policy Action Instance is to be fetched
Returns:
Policy Action Instance object for the given association object
Throws:
javax.xml.registry.JAXRException
PolicyException - if the association object is not a Policy Action Instance

getPolicyParameter

PolicyParameter getPolicyParameter(java.lang.String policyParameterId)
                                   throws PolicyException,
                                          javax.xml.registry.JAXRException
Get the Policy Parameter object for the given policyParameterId

Parameters:
policyParameterId - id for which Policy Parameter is to be fetched
Returns:
Policy Parameter object for the given policyParameterId
Throws:
PolicyException - if the object is not a Policy Parameter
javax.xml.registry.JAXRException

getPolicyParameter

PolicyParameter getPolicyParameter(com.centrasite.jaxr.infomodel.CentraSiteRegistryEntry registryEntry)
                                   throws PolicyException,
                                          javax.xml.registry.JAXRException
Get the Policy Parameter object for the given registryEntry

Parameters:
registryEntry - registryEntry for which Policy Parameter is to be fetched
Returns:
Policy Parameter object for the given registryEntry
Throws:
PolicyException - if the object is not a Policy Parameter
javax.xml.registry.JAXRException

getPolicyCondition

PolicyCondition getPolicyCondition(java.lang.String policyConditionId)
                                   throws PolicyException,
                                          javax.xml.registry.JAXRException
Get the Policy Condition object for the given policyConditionId

Parameters:
policyConditionId - id for which Policy Condition is to be fetched
Returns:
Policy Condition object for the given policyConditionId
Throws:
PolicyException - if the object is not a Policy Condition
javax.xml.registry.JAXRException

getPolicyCondition

PolicyCondition getPolicyCondition(com.centrasite.jaxr.infomodel.CentraSiteRegistryEntry registryEntry)
                                   throws PolicyException,
                                          javax.xml.registry.JAXRException
Get the Policy Condition object for the given registryEntry

Parameters:
registryEntry - registryEntry for which Policy Condition is to be fetched
Returns:
Policy Condition object for the given registryEntry
Throws:
PolicyException - if the object is not a Policy Condition
javax.xml.registry.JAXRException

clearPolicyCache

void clearPolicyCache()
Clear the policy cache


getOrganizationSpecificPolicies

java.util.Collection<Policy> getOrganizationSpecificPolicies(PolicyType policyType,
                                                             javax.xml.registry.infomodel.Organization organization)
                                                             throws javax.xml.registry.JAXRException,
                                                                    PolicyException
Get the collection of non-global org-specific policies for the given policy type and organization

Parameters:
policyType - whether Design/Change Time or Runtime
organization - for which org-specific policies are needed
Returns:
collection of non-global org-specific policies for the given policy type and organization
Throws:
javax.xml.registry.JAXRException
PolicyException

isPolicyDefinedForType

boolean isPolicyDefinedForType(javax.xml.registry.infomodel.Concept typeConcept)
                               throws javax.xml.registry.JAXRException
Tells whether any policy is defined for the given asset type

Parameters:
typeConcept -
Returns:
true if any policy is exists already for the type; otherwise false
Throws:
javax.xml.registry.JAXRException

findActivePoliciesForAssets

java.util.List<Policy> findActivePoliciesForAssets(java.util.Collection<javax.xml.registry.infomodel.RegistryObject> assets,
                                                   javax.xml.registry.infomodel.Concept eventType)
                                                   throws PolicyException,
                                                          javax.xml.registry.JAXRException
Get the list of Policies applicable for the given ROs and event type

Parameters:
assets - ROs for which policies are to be fired
eventType - event type on which policies are to be fired
Throws:
javax.xml.registry.JAXRException
PolicyException

getASPolicyStatus

IPolicyStatus getASPolicyStatus(java.lang.String policyStatus)
The help to generate IPolicyStatus object for a given Policy Status value This method can be used under the JAXR/Policy engine layer.

Parameters:
policyStatus -
Returns:
IPolicyStatus

isNewPolicyClient

boolean isNewPolicyClient()
True will be returned when a new policy client is been used in the CLASSPATH. This method can be used to identify the policy version is below CentraSite 8.2.2.x. This can be used to solve the backward compatibility issue.

Returns:
boolean

getInProgressStatus

IPolicyStatus getInProgressStatus()
Helper method to return the InProgress Policy

Returns:

getSuccessStatus

IPolicyStatus getSuccessStatus()
Helper method to return the Success Policy

Returns:

getInfoStatus

IPolicyStatus getInfoStatus()
Helper method to return the Info Policy

Returns:

getWarningStatus

IPolicyStatus getWarningStatus()
Helper method to return the Warning Policy

Returns:

getFailureStatus

IPolicyStatus getFailureStatus()
Helper method to return the Failure Policy

Returns: