|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.kpro.dataobjects.PolicyObject
public class PolicyObject
The PolicyObject class acts to hold all the relevent information for a given policy. This informations is broken into 'cases' (see the 'case' class- different items, indexed by datatype), the context (see the 'context' class- holds information that applies to whole policy), and action (see the 'action' class- holds the action taken).
Field Summary | |
---|---|
private Action |
actionTaken
|
private java.util.ArrayList<Case> |
cases
|
private Context |
context
|
private java.util.HashMap<java.lang.String,java.lang.String> |
entity
|
private static long |
serialVersionUID
added generated serial id from warning on implementing serializable |
Constructor Summary | |
---|---|
PolicyObject()
This is the constructor The constructor initializes the variables within the class when you make a new instance of it |
Method Summary | |
---|---|
void |
addCase(Case c)
Adds a case to the policy |
void |
addEntityData(java.lang.String key,
java.lang.String value)
Adds a data to the entity hashmap of the policy |
boolean |
equalsCases(PolicyObject newpol)
A simple true/false check to see if policies are identical- if all the strings inside them are, then the policies are. |
Action |
getAction()
|
Case |
getCase(int i)
Returns a specific case for the policy |
java.util.ArrayList<Case> |
getCases()
Returns all cases for the policy |
Context |
getContext()
|
java.lang.String |
getContextDomain()
returns domain of policy (URL) as string. |
java.util.HashMap<java.lang.String,java.lang.String> |
getEntities()
Returns the entity for the policy |
java.lang.String |
getEntity(java.lang.String key)
Returns the entity data for a specific key |
java.util.Iterator<Case> |
iterator()
|
PolicyObject |
setAction(Action action)
|
void |
setContext(Context context)
|
java.lang.String |
toString()
This is based on the debug_print |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private java.util.HashMap<java.lang.String,java.lang.String> entity
private java.util.ArrayList<Case> cases
private Action actionTaken
private Context context
Constructor Detail |
---|
public PolicyObject()
Method Detail |
---|
public Context getContext()
public void setContext(Context context)
public Action getAction()
public PolicyObject setAction(Action action)
public void addCase(Case c)
c
- input Casepublic void addEntityData(java.lang.String key, java.lang.String value)
key
- input Stringvalue
- input Stringpublic Case getCase(int i)
i
- input int
public java.util.ArrayList<Case> getCases()
public java.util.HashMap<java.lang.String,java.lang.String> getEntities()
public java.lang.String getEntity(java.lang.String key)
key
- input StringString
- public java.lang.String getContextDomain()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equalsCases(PolicyObject newpol)
newpol
- the policy to compare 'this' to
public java.util.Iterator<Case> iterator()
iterator
in interface java.lang.Iterable<Case>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |