|
AdventNet Web NMS 4 API Specification | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.adventnet.management.policydb.PolicyObject
The PolicyObject class is the abstract root class from which all other Policies can be derived.
| Field Summary | |
protected java.util.Hashtable |
actions
HashTable which stores all the valid Actions of this PolicyObject |
protected java.util.Hashtable |
conditions
HashTable which stores all the conditions of this PolicyObject |
protected java.lang.String |
groupName
The group name of the PolicyObject |
protected java.lang.String |
helpURL
Variable that stores helpURL for the Policy |
protected boolean |
isAlreadyInExecution
boolean to specify the current execution status of the PolicyObject |
protected java.lang.String |
name
The identifier the PolicyObject. |
protected java.lang.String |
policyObjectCustomizer
Variable that stores fully qualified classname of PolicyObjecCustomizer |
protected java.lang.Runnable |
runnableInst
runnable instance which is responsible for scheduling the policy |
protected int |
status
The status of the PolicyObject. |
protected java.util.Properties |
userProperties
For storing user defined properties |
| Constructor Summary | |
PolicyObject()
|
|
| Method Summary | |
boolean |
addAction(PolicyAction pa)
Adds the PolicyAction to the PolicyObject. |
boolean |
addCondition(PolicyCondition pc)
Deprecated. Instead use addPolicyActionAndCondition(PolicyAction , PolicyCondtion) |
boolean |
addPolicyActionAndCondition(PolicyAction pa,
PolicyCondition pc)
|
protected boolean |
checkConditions(java.lang.String key,
PolicyEvent policyEvt)
Checks whether the PolicyCondition with key key
is satisfied or not. |
java.lang.Object |
clone()
A method to return a new object which is a clone of this object. |
protected abstract void |
executeAction(PolicyEvent policyEvt)
executes action of this PolicyObject. |
protected void |
executePolicy(PolicyEvent policyEvt)
Method to execute the Policy. |
java.util.Vector |
getActionKeys()
Method to get a list of keys (Strings) of the actions |
java.util.Vector |
getActions(java.lang.String key)
Deprecated. Instead use getPolicyAction |
protected java.util.Properties |
getBaseProperties()
Returns all the base properties(namely name,groupName and status) of the policy object |
java.util.Vector |
getConditionKeys()
Method to get a list of keys (Strings) of the conditions |
java.util.Vector |
getConditions(java.lang.String key)
Deprecated. Use getPolicyCondition instead |
java.lang.String |
getGroupName()
Returns the group name of the PolicyObject. |
java.lang.String |
getHelpURL()
Returns the help URL of this PolicyObject. |
java.lang.String |
getKey()
This is the primary key value of the persistent object. |
java.lang.String |
getKeyName()
The field which is used as key for the object. |
java.lang.String |
getName()
Returns the name of the PolicyObject. |
PolicyAction |
getPolicyAction(java.lang.String key)
Returns PolicyAction associated with the key |
PolicyCondition |
getPolicyCondition(java.lang.String key)
Returns PolicyCondition for the corresponding key |
java.lang.String |
getPolicyObjectCustomizer()
Returns the fully qualified name of the customizer class for this PolicyObject. |
abstract java.util.Properties |
getProperties()
Returns the properties of this PolicyObject |
protected java.lang.Runnable |
getRunnableInstance()
returns the runnable instance which is responsible for scheduling the policy. |
int |
getStatus()
Returns the status of the PolicyObject. |
java.util.Vector |
getTimeVector()
Gets the vetcor containing information about when to schedule. |
java.util.Properties |
getUserProperties()
This should return a Properties object . |
java.lang.String |
getUserProperty(java.lang.String nam)
|
protected void |
performRequiredActions(java.lang.String key,
PolicyEvent policyEvt)
Perfroms the PolicyAction with key represented by key |
java.lang.String |
removeUserProperty(java.lang.String nam)
|
protected void |
setBaseProperties(java.util.Properties p)
sets all the base properties(groupName and status) of the policy object |
void |
setGroupName(java.lang.String str)
Sets the group name of the PolicyObject. |
void |
setHelpURL(java.lang.String url)
Method for setting helpURL for a PolicyObject |
void |
setName(java.lang.String s)
Sets the name of the PolicyObject. |
void |
setPolicyObjectCustomizer(java.lang.String customizerClassName)
Method to set PolicyObjectCuatomizer class name |
abstract void |
setProperties(java.util.Properties prop)
Sets the properties for this PolicyObject |
protected void |
setRunnableInstance(java.lang.Runnable r)
sets the runnable instance which is responsible for scheduling the policy. |
void |
setStatus(int i)
Sets the status of the PolicyObject. |
void |
setTimeVector(java.util.Vector timeVector)
Set's the timeVector |
void |
setUserProperty(java.lang.String nam,
java.lang.String val)
To set any additional user property during runtime . |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.lang.String name
protected java.lang.String groupName
protected int status
NOTE only PolicyObjects with status enabled can be executed.
VALID VALUES Valid values - NmsPolicyAPI.POLICY_ENABLED,NmsPolicyAPI.POLICY_DISABLED
NmsPolicyAPI.POLICY_ENABLED,
NmsPolicyAPI.POLICY_DISABLEDprotected java.util.Hashtable conditions
protected java.util.Hashtable actions
protected java.lang.String policyObjectCustomizer
protected java.lang.String helpURL
protected transient java.lang.Runnable runnableInst
protected boolean isAlreadyInExecution
protected java.util.Properties userProperties
| Constructor Detail |
public PolicyObject()
| Method Detail |
public java.lang.String getName()
public void setName(java.lang.String s)
s - the name to be setpublic java.lang.String getGroupName()
public void setGroupName(java.lang.String str)
str - the group name to be setpublic int getStatus()
public void setStatus(int i)
i - the status to be set
NOTE
Valid values are NmsPolicyAPI.POLICY_ENABLED and NmsPolicyAPI.POLICY_DISABLED
NmsPolicyAPI.POLICY_ENABLED,
NmsPolicyAPI.POLICY_DISABLEDpublic boolean addCondition(PolicyCondition pc)
pc - the PolicyCondition to be addedpublic java.util.Vector getConditions(java.lang.String key)
key - the key of the PolicyConditionNOTE
Returns null if PolicyCondition with specified key is not found
public PolicyCondition getPolicyCondition(java.lang.String key)
key - Key of the PolicyConditionpublic boolean addAction(PolicyAction pa)
pa - the PolicyAction to be addedpublic java.util.Vector getActions(java.lang.String key)
key - the key of the PolicyActionNOTE
Returns null if PolicyAction with specified key is not found
public PolicyAction getPolicyAction(java.lang.String key)
key - The key of the PolicyActionpublic java.util.Vector getActionKeys()
public java.util.Vector getConditionKeys()
public boolean addPolicyActionAndCondition(PolicyAction pa,
PolicyCondition pc)
protected void executePolicy(PolicyEvent policyEvt)
polcicyEvt - the PolicyEventprotected abstract void executeAction(PolicyEvent policyEvt)
policyEvt - PolicyEvent
protected boolean checkConditions(java.lang.String key,
PolicyEvent policyEvt)
key
is satisfied or not.key - key of the PolicyCondition to be checked.policyEvt - PolicyEvent
protected void performRequiredActions(java.lang.String key,
PolicyEvent policyEvt)
keykey - key of the PolicyAction to executedpolicyEvt - PolicyEventprotected void setBaseProperties(java.util.Properties p)
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.
p - Properties to be setprotected java.util.Properties getBaseProperties()
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.
public abstract java.util.Properties getProperties()
getProperties in interface DBInterfacepublic abstract void setProperties(java.util.Properties prop)
setProperties in interface DBInterfaceprop - the property to be set.public java.lang.String getPolicyObjectCustomizer()
NOTE
Returns null if there is no customizer class.
public void setPolicyObjectCustomizer(java.lang.String customizerClassName)
customizerClassName - PolicyObjectCustomizer Class Name as a Stringpublic java.lang.String getHelpURL()
NOTE
Returns null if there is no help associated with the policy object.
public void setHelpURL(java.lang.String url)
url - HelpURl for the PolicyObjectprotected void setRunnableInstance(java.lang.Runnable r)
r - Runnable instanceprotected java.lang.Runnable getRunnableInstance()
public java.util.Vector getTimeVector()
public void setTimeVector(java.util.Vector timeVector)
timeVector - Vector containing information about schedulingpublic java.lang.Object clone()
DBInterfaceclone in interface DBInterfaceclone in class java.lang.Objectpublic java.lang.String getKey()
DBInterfacegetKey in interface DBInterfacepublic java.lang.String getKeyName()
DBInterfacegetKeyName in interface DBInterfacepublic java.util.Properties getUserProperties()
DBExtendedInterfacegetUserProperties in interface DBExtendedInterfacepublic java.lang.String getUserProperty(java.lang.String nam)
getUserProperty in interface DBExtendedInterfacepublic java.lang.String removeUserProperty(java.lang.String nam)
removeUserProperty in interface DBExtendedInterface
public void setUserProperty(java.lang.String nam,
java.lang.String val)
DBExtendedInterfacesetUserProperty in interface DBExtendedInterface
|
AdventNet Web NMS 4 API Specification | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||