com.softwareag.centrasite.policy.api
Interface Policy

All Superinterfaces:
PolicyRegistryObject

public interface Policy
extends PolicyRegistryObject

Models a policy object


Method Summary
 void addActionInstance(PolicyActionInstance policyActionInstance)
          Add the action instance to this policy
 void addEventType(javax.xml.registry.infomodel.Concept eventTypeConcept)
          Adds the given event type(if not present already) to the collection of event types on which the policy will be fired
 void addObjectType(javax.xml.registry.infomodel.Concept objectTypeConcept)
          Adds the given object type(if not present already) to the collection of object types on which the policy will be fired
 PolicyActionInstance getActionInstance(java.lang.String actionInstanceId)
          Get the policy action instance(if any) with the given Id
 java.util.List<PolicyActionInstance> getActionInstances()
          Get the list of action instances for the policy
 java.util.List<PolicyActionInstance> getActionInstancesByTemplateId(java.lang.String actionTemplateId)
          Get the list of policy action instance for the given policy action template id
 PolicyCondition getApplicableCondition()
          Get the applicable condition(if any) for the policy
 EvaluationMode getEvaluationMode()
          Get the Evaluation Mode for the policy Only Sequential mode of evaluation is supported currently
 java.util.Collection<javax.xml.registry.infomodel.Concept> getEventTypes()
          Get the collection of event types on which the policy will be fired
 java.util.Collection<javax.xml.registry.infomodel.Concept> getObjectTypes()
          Get the collection of object types on which the policy will be fired
 java.util.List<javax.xml.registry.infomodel.Key> getPolicyActionKeys()
          Get the list of policy action keys which are associated to this policy
 PolicyType getPolicyType()
          get the Type of the policy
 int getPriority()
          Get the priority of the policy
 java.util.List<com.centrasite.jaxr.infomodel.CentraSiteRegistryObject> getRegistryObjectsToExport()
          Returns the list of Registry Objects that need to be exported including this policy.
 java.lang.String getUserVersion()
          Get the user version number from the underlying policy jaxr object
 int getVersion()
          Get the version number for this policy
 boolean isActive()
          Return if this policy is active Only active policies will be fired
 boolean isGlobal()
          Return if this policy is Global
 boolean isHidden()
          Return if this policy is hidden
 boolean isSystem()
          Return if this policy is System defined
 boolean isUserDefined()
          Return if this policy is user defined
 void removeActionInstance(PolicyActionInstance actionInstance)
          Remove the action instance from the list of action instances for this policy(if present)
 void removeActionInstances(java.util.List<PolicyActionInstance> actionInstances)
          Remove the list of action instances from the list of action instances for this policy
 void setActionInstances(java.util.List<PolicyActionInstance> policyActionInstances)
          Set the action instances of this policy to the given list
 void setApplicableCondition(PolicyCondition condition)
          Set the applicable condition for this policy
 void setEvaluationMode(EvaluationMode evaluationMode)
          Set the Evaluation Mode for the policy
 void setEventTypes(java.util.Collection<javax.xml.registry.infomodel.Concept> eventTypeConcepts)
          Sets the given event types(replacing any event type added/set before) as the collection of event types on which the policy will be fired
 void setGlobal(boolean global)
          Set the Global flag. if Global is set to true, it implies that the policy is applicable to all organizations if Global is set to false, it implies that the policy is applicable only to the organization in which it was created
 void setHidden()
          Classify this policy as Hidden
 void setObjectTypes(java.util.Collection<javax.xml.registry.infomodel.Concept> objectTypeConcepts)
          Sets the given object types(replacing any event type added/set before) as the collection of object types on which the policy will be fired
 void setPolicyType(PolicyType policyType)
          set the Type of the policy
 void setPriority(int priority)
          Sets the priority of the policy.
 void setSystem()
          Classify this policy as System defined
 void setUserDefined()
          Classify this policy as User defined
 void setUserVersion(java.lang.String userVersion)
          Set the user version number for the underlying policy jaxr object
 boolean verify()
          Verify whether all mandatory parameters of this policy are set
 
Methods inherited from interface com.softwareag.centrasite.policy.api.PolicyRegistryObject
addAssociation, addAssociation, getAllClassifiedConcepts, getAllJAXRObjects, getAllObsoleteObjects, getAssociations, getAssociations, getClassifications, getClassifiedConcept, getDescription, getJAXRObject, getJAXRRegistryService, getKey, getLoggedInUserLocale, getName, removeAllAssociations, removeAllClassifications, setDescription, setName, toXMLForRepair
 

Method Detail

addActionInstance

void addActionInstance(PolicyActionInstance policyActionInstance)
                       throws javax.xml.registry.JAXRException,
                              PolicyException
Add the action instance to this policy

Parameters:
policyActionInstance - action instance to be added
Throws:
PolicyException
javax.xml.registry.JAXRException

setActionInstances

void setActionInstances(java.util.List<PolicyActionInstance> policyActionInstances)
                        throws javax.xml.registry.JAXRException,
                               PolicyException
Set the action instances of this policy to the given list

Parameters:
policyActionInstances - list of action instances to be set
Throws:
PolicyException
javax.xml.registry.JAXRException

getActionInstances

java.util.List<PolicyActionInstance> getActionInstances()
                                                        throws javax.xml.registry.JAXRException,
                                                               PolicyException
Get the list of action instances for the policy

Returns:
list of action instances for the policy
Throws:
javax.xml.registry.JAXRException
PolicyException

getActionInstance

PolicyActionInstance getActionInstance(java.lang.String actionInstanceId)
                                       throws javax.xml.registry.JAXRException,
                                              PolicyException
Get the policy action instance(if any) with the given Id

Parameters:
actionInstanceId - id of the action instance
Returns:
policy action instance(if any) with the given Id
Throws:
javax.xml.registry.JAXRException
PolicyException

getActionInstancesByTemplateId

java.util.List<PolicyActionInstance> getActionInstancesByTemplateId(java.lang.String actionTemplateId)
                                                                    throws javax.xml.registry.JAXRException,
                                                                           PolicyException
Get the list of policy action instance for the given policy action template id

Parameters:
actionTemplateId - policy action template id for which the action instances are needed
Returns:
list of policy action instance for the given policy action template id
Throws:
javax.xml.registry.JAXRException
PolicyException

removeActionInstance

void removeActionInstance(PolicyActionInstance actionInstance)
                          throws javax.xml.registry.JAXRException,
                                 PolicyException
Remove the action instance from the list of action instances for this policy(if present)

Parameters:
actionInstance - action instance to be removed
Throws:
PolicyException
javax.xml.registry.JAXRException

removeActionInstances

void removeActionInstances(java.util.List<PolicyActionInstance> actionInstances)
                           throws javax.xml.registry.JAXRException,
                                  PolicyException
Remove the list of action instances from the list of action instances for this policy

Parameters:
actionInstances - list of action instances to be removed
Throws:
PolicyException
javax.xml.registry.JAXRException

setApplicableCondition

void setApplicableCondition(PolicyCondition condition)
                            throws javax.xml.registry.JAXRException
Set the applicable condition for this policy

Parameters:
condition - applicable condition
Throws:
javax.xml.registry.JAXRException

getApplicableCondition

PolicyCondition getApplicableCondition()
                                       throws javax.xml.registry.JAXRException,
                                              PolicyException
Get the applicable condition(if any) for the policy

Returns:
applicable condition(if any) for the policy
Throws:
javax.xml.registry.JAXRException
PolicyException

getPriority

int getPriority()
                throws javax.xml.registry.JAXRException
Get the priority of the policy

Returns:
priority of the policy
Throws:
javax.xml.registry.JAXRException

setPriority

void setPriority(int priority)
                 throws javax.xml.registry.JAXRException,
                        PolicyException
Sets the priority of the policy. Priority defines the sequence in which policies will be fired when there are multiple policies to be fired for a given object,event The policy with the least priority number has the highest priority

Parameters:
priority - priority to be set
Throws:
javax.xml.registry.JAXRException
PolicyException

isGlobal

boolean isGlobal()
                 throws javax.xml.registry.JAXRException
Return if this policy is Global

Returns:
true if this policy is Global, false otherwise
Throws:
javax.xml.registry.JAXRException

setGlobal

void setGlobal(boolean global)
               throws javax.xml.registry.JAXRException
Set the Global flag. if Global is set to true, it implies that the policy is applicable to all organizations if Global is set to false, it implies that the policy is applicable only to the organization in which it was created

Parameters:
global - global flag to be set
Throws:
javax.xml.registry.JAXRException

getEvaluationMode

EvaluationMode getEvaluationMode()
                                 throws javax.xml.registry.JAXRException
Get the Evaluation Mode for the policy Only Sequential mode of evaluation is supported currently

Returns:
Evaluation Mode for the policy
Throws:
javax.xml.registry.JAXRException

setEvaluationMode

void setEvaluationMode(EvaluationMode evaluationMode)
                       throws javax.xml.registry.JAXRException
Set the Evaluation Mode for the policy

Parameters:
evaluationMode - Evaluation Mode to be set
Throws:
javax.xml.registry.JAXRException

getEventTypes

java.util.Collection<javax.xml.registry.infomodel.Concept> getEventTypes()
                                                                         throws javax.xml.registry.JAXRException
Get the collection of event types on which the policy will be fired

Returns:
collection of event types on which the policy will be fired
Throws:
javax.xml.registry.JAXRException

addEventType

void addEventType(javax.xml.registry.infomodel.Concept eventTypeConcept)
                  throws javax.xml.registry.JAXRException,
                         PolicyException
Adds the given event type(if not present already) to the collection of event types on which the policy will be fired

Parameters:
eventTypeConcept - event type to be added
Throws:
javax.xml.registry.JAXRException
PolicyException

setEventTypes

void setEventTypes(java.util.Collection<javax.xml.registry.infomodel.Concept> eventTypeConcepts)
                   throws javax.xml.registry.JAXRException,
                          PolicyException
Sets the given event types(replacing any event type added/set before) as the collection of event types on which the policy will be fired

Parameters:
eventTypeConcepts - eventTypeConcepts to be set
Throws:
javax.xml.registry.JAXRException
PolicyException

getObjectTypes

java.util.Collection<javax.xml.registry.infomodel.Concept> getObjectTypes()
                                                                          throws javax.xml.registry.JAXRException
Get the collection of object types on which the policy will be fired

Returns:
collection of object types on which the policy will be fired
Throws:
javax.xml.registry.JAXRException

addObjectType

void addObjectType(javax.xml.registry.infomodel.Concept objectTypeConcept)
                   throws javax.xml.registry.JAXRException,
                          PolicyException
Adds the given object type(if not present already) to the collection of object types on which the policy will be fired

Parameters:
objectTypeConcept - object type to be added
Throws:
javax.xml.registry.JAXRException
PolicyException

setObjectTypes

void setObjectTypes(java.util.Collection<javax.xml.registry.infomodel.Concept> objectTypeConcepts)
                    throws javax.xml.registry.JAXRException,
                           PolicyException
Sets the given object types(replacing any event type added/set before) as the collection of object types on which the policy will be fired

Parameters:
objectTypeConcepts - objectTypeConcepts to be set
Throws:
javax.xml.registry.JAXRException
PolicyException

isSystem

boolean isSystem()
                 throws javax.xml.registry.JAXRException
Return if this policy is System defined

Returns:
true if this policy is system defined, false otherwise
Throws:
javax.xml.registry.JAXRException

isHidden

boolean isHidden()
                 throws javax.xml.registry.JAXRException
Return if this policy is hidden

Returns:
true if this policy is hidden, false otherwise
Throws:
javax.xml.registry.JAXRException

isUserDefined

boolean isUserDefined()
                      throws javax.xml.registry.JAXRException
Return if this policy is user defined

Returns:
true if this policy is user defined, false otherwise
Throws:
javax.xml.registry.JAXRException

isActive

boolean isActive()
                 throws javax.xml.registry.JAXRException
Return if this policy is active Only active policies will be fired

Returns:
true if this policy is active, false otherwise
Throws:
javax.xml.registry.JAXRException

getVersion

int getVersion()
               throws javax.xml.registry.JAXRException
Get the version number for this policy

Returns:
version number of this policy
Throws:
javax.xml.registry.JAXRException

setSystem

void setSystem()
               throws javax.xml.registry.JAXRException
Classify this policy as System defined

Throws:
javax.xml.registry.JAXRException

setHidden

void setHidden()
               throws javax.xml.registry.JAXRException
Classify this policy as Hidden

Throws:
javax.xml.registry.JAXRException

setUserDefined

void setUserDefined()
                    throws javax.xml.registry.JAXRException
Classify this policy as User defined

Throws:
javax.xml.registry.JAXRException

verify

boolean verify()
               throws javax.xml.registry.JAXRException,
                      PolicyException
Verify whether all mandatory parameters of this policy are set

Returns:
true if all parameters are set
Throws:
javax.xml.registry.JAXRException
PolicyException - If there are mandatory parameters that are not set

getPolicyType

PolicyType getPolicyType()
                         throws javax.xml.registry.JAXRException
get the Type of the policy

Returns:
Type of the policy
Throws:
javax.xml.registry.JAXRException

setPolicyType

void setPolicyType(PolicyType policyType)
                   throws javax.xml.registry.JAXRException
set the Type of the policy

Throws:
javax.xml.registry.JAXRException

getRegistryObjectsToExport

java.util.List<com.centrasite.jaxr.infomodel.CentraSiteRegistryObject> getRegistryObjectsToExport()
                                                                                                  throws javax.xml.registry.JAXRException,
                                                                                                         PolicyException
Returns the list of Registry Objects that need to be exported including this policy.

Returns:
list of Registry Objects that need to be exported including this policy.
Throws:
javax.xml.registry.JAXRException
PolicyException

setUserVersion

void setUserVersion(java.lang.String userVersion)
                    throws javax.xml.registry.JAXRException
Set the user version number for the underlying policy jaxr object

Parameters:
userVersion -
Throws:
javax.xml.registry.JAXRException

getUserVersion

java.lang.String getUserVersion()
                                throws javax.xml.registry.JAXRException
Get the user version number from the underlying policy jaxr object

Returns:
returns the version number of the policy
Throws:
javax.xml.registry.JAXRException

getPolicyActionKeys

java.util.List<javax.xml.registry.infomodel.Key> getPolicyActionKeys()
                                                                     throws javax.xml.registry.JAXRException,
                                                                            PolicyException
Get the list of policy action keys which are associated to this policy

Returns:
list of policy action keys associated to this policy
Throws:
javax.xml.registry.JAXRException
PolicyException