"WEBNMS_5 API Docs"

com.adventnet.management.policydb
Class PeriodicPolicyObject

java.lang.Object
  extended by com.adventnet.management.policydb.PolicyObject
      extended by com.adventnet.management.policydb.PeriodicPolicyObject
All Implemented Interfaces:
DBExtendedInterface, DBInterface, java.io.Serializable, java.lang.Cloneable

public abstract class PeriodicPolicyObject
extends PolicyObject

Policies which need to be called on a fixed time interval can extend this class. One of the important variables is the period ( in seconds ) between 2 schedules of the policy. The NmsPolicyMgr takes care of scheduling these polices. Please note that when the executeAction is invoked on the Policies of this types the the "target"//No Internationalisation field in PolicyEvent would be null. In other words the Polices of this type will have the intelligence within them to get the targets on which they would be executed.

See Also:
Serialized Form

Field Summary
protected  int period
          The Periodicity of the occurence.
 
Fields inherited from class com.adventnet.management.policydb.PolicyObject
actions, conditions, groupName, helpURL, isAlreadyInExecution, name, policyObjectCustomizer, runnableInst, status, userProperties
 
Constructor Summary
PeriodicPolicyObject()
           
 
Method Summary
abstract  void executeAction(PolicyEvent policyEvt)
          executes action of this policy object.
protected  java.util.Properties getBaseProperties()
          Returns all the base properties(namely name,groupName,status and period) of the policy object
abstract  java.lang.String getHelpURL()
          Returns the help URL of this PolicyObject.
 int getPeriod()
          gets the time intervals ( in second) between the 2 schedules of this policy.
abstract  java.lang.String getPolicyObjectCustomizer()
          Returns the customizer class of this policy object
abstract  java.util.Properties getProperties()
          Returns the properties of this policy object
protected  void setBaseProperties(java.util.Properties p)
          sets all the base properties(namely name,groupName,status and period) of the policy object
 void setPeriod(int i)
          sets the time intervals ( in second) between the 2 schedules of this policy.
abstract  void setProperties(java.util.Properties p)
          Sets the properties for this policy object
 
Methods inherited from class com.adventnet.management.policydb.PolicyObject
addAction, addCondition, addPolicyActionAndCondition, checkConditions, clone, executePolicy, getActionKeys, getActions, getConditionKeys, getConditions, getGroupName, getKey, getKeyName, getName, getPolicyAction, getPolicyCondition, getRunnableInstance, getStatus, getTimeVector, getUserProperties, getUserProperty, performRequiredActions, removeUserProperty, setGroupName, setHelpURL, setName, setPolicyObjectCustomizer, setRunnableInstance, setStatus, setTimeVector, setUserProperty
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

period

protected int period
The Periodicity of the occurence.

Constructor Detail

PeriodicPolicyObject

public PeriodicPolicyObject()
Method Detail

getPeriod

public int getPeriod()
gets the time intervals ( in second) between the 2 schedules of this policy.

Returns:
time in seconds

setPeriod

public void setPeriod(int i)
sets the time intervals ( in second) between the 2 schedules of this policy.

Parameters:
i - time in seconds

getProperties

public abstract java.util.Properties getProperties()
Returns the properties of this policy object

Specified by:
getProperties in interface DBInterface
Specified by:
getProperties in class PolicyObject
Returns:
Properties

setProperties

public abstract void setProperties(java.util.Properties p)
Sets the properties for this policy object

Specified by:
setProperties in interface DBInterface
Specified by:
setProperties in class PolicyObject
Parameters:
p - the property to be set.

getPolicyObjectCustomizer

public abstract java.lang.String getPolicyObjectCustomizer()
Returns the customizer class of this policy object

Overrides:
getPolicyObjectCustomizer in class PolicyObject
Returns:
"Customizer"//No Internationalisation

NOTE

Returns null if there is no customizer class.


getHelpURL

public abstract java.lang.String getHelpURL()
Returns the help URL of this PolicyObject. The URL must be relative to the help directory.

Overrides:
getHelpURL in class PolicyObject
Returns:
string representing the url

NOTE

Returns null if there is no help associated with the policy object.


setBaseProperties

protected void setBaseProperties(java.util.Properties p)
sets all the base properties(namely name,groupName,status and period) of the policy object

All instances of this class are expected to call this method in their setProperties method (Abstract method in this class) to set their base properties.

Overrides:
setBaseProperties in class PolicyObject
Parameters:
Properties - to be set

getBaseProperties

protected java.util.Properties getBaseProperties()
Returns all the base properties(namely name,groupName,status and period) of the policy object

All instances of this class are expected to call this method in their getProperties method (Abstract method in this class) to get their base properties.

Overrides:
getBaseProperties in class PolicyObject
Returns:
Properties

executeAction

public abstract void executeAction(PolicyEvent policyEvt)
executes action of this policy object.

Specified by:
executeAction in class PolicyObject
Parameters:
policyEvt - PolicyEvent

"WEBNMS_5 API Docs"

Copyright © 2011 ZOHO Corp., All Rights Reserved.