|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.alarmpoint.servicemanager.ServiceManagerIncident
public class ServiceManagerIncident
Represents all the information about a Service Manager incident record and keeps track of changes you want to make to that incident.
Constructor Summary | |
---|---|
ServiceManagerIncident()
Create a new empty ServiceManagerIncident object |
|
ServiceManagerIncident(org.dom4j.Node root)
Create a new ServiceManagerIncident object and initialize it with the values in root |
Method Summary | |
---|---|
void |
addDynamicList(java.lang.String field,
java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> values)
Add a dynamic list for the specified field. |
void |
addFields(java.util.Map<java.lang.String,java.lang.Object> fields)
Add all the specified fields to this incident if they do not already exist |
void |
addList(java.lang.String field,
java.util.Collection<java.lang.String> list)
Add a list of possible values for the field |
void |
addList(java.lang.String field,
java.util.Map<java.lang.String,java.lang.String> list)
Add a list of possible values and the associated display value for the field |
void |
addUpdate(java.lang.String field,
java.lang.String value)
Add a update value for the specified field |
void |
constructMap(org.dom4j.Node instance)
Remove all existing fields and values from this incident then repopulate it with the values in instance |
java.util.Map<java.lang.String,java.lang.Object> |
constructUpdateInstance()
Construct a list of fields that have been updated and their new values |
java.util.Collection<java.lang.String> |
getList(java.lang.String field)
Return the list of possible values for the field |
java.util.List<java.lang.String> |
getListValue(java.lang.String field)
Retrieve the current list of values for a list field |
java.util.List<java.lang.String> |
getListValue(java.lang.String field,
boolean escape)
Retrieve the current list of values for a list field |
java.util.Map<java.lang.String,java.lang.Object> |
getOriginalMap()
Returns the a map of the original values for this incident |
java.util.Collection<java.lang.String> |
getPossibleValues(java.lang.String field)
If the field specified has a list of values specified return it |
java.lang.String |
getTextValue(java.lang.String field)
Retrieve the current value for a text field |
java.lang.String |
getTextValue(java.lang.String field,
boolean escape)
Retrieve the current value for a text field |
java.util.Map<java.lang.String,java.lang.String> |
getUpdateMap()
Returns the a map of the updated values for this incident |
boolean |
isListField(java.lang.String field)
Check if the specified field contains a list of values |
boolean |
isTextField(java.lang.String field)
Check if the specified field contains a single of value |
void |
updateDynamicList(java.lang.String field,
java.lang.String dependsOn)
Update the list of possible values for the field depending on the specified value |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServiceManagerIncident()
ServiceManagerIncident
object
public ServiceManagerIncident(org.dom4j.Node root)
ServiceManagerIncident
object and initialize it with the values in root
root
- A instance element containing the fields of a Service Manager incidentMethod Detail |
---|
public void addFields(java.util.Map<java.lang.String,java.lang.Object> fields)
fields
- The fields to add to this incident if they do not already existpublic void constructMap(org.dom4j.Node instance)
instance
- A instance element containing the fields of a Service Manager incidentpublic java.util.Map<java.lang.String,java.lang.Object> constructUpdateInstance()
ServiceManagerScriptObject
objects methods containing all the updates for this instancepublic boolean isListField(java.lang.String field)
field
- The field name
public java.util.List<java.lang.String> getListValue(java.lang.String field)
field
- The field name
public java.util.List<java.lang.String> getListValue(java.lang.String field, boolean escape)
field
- The field nameescape
- If the value returned should be escaped for xml/html
public boolean isTextField(java.lang.String field)
field
- The field name
public java.lang.String getTextValue(java.lang.String field)
field
- The field name
public java.lang.String getTextValue(java.lang.String field, boolean escape)
field
- The field nameescape
- If the value returned should be escaped for xml/html
public java.util.Collection<java.lang.String> getPossibleValues(java.lang.String field)
field
- The field name
public void addUpdate(java.lang.String field, java.lang.String value)
field
- The field namevalue
- The updated value for the fieldpublic void addList(java.lang.String field, java.util.Map<java.lang.String,java.lang.String> list)
field
- The field namelist
- A Map of real values to display valuespublic void addList(java.lang.String field, java.util.Collection<java.lang.String> list)
field
- The field namelist
- A Collection of possible valuespublic java.util.Collection<java.lang.String> getList(java.lang.String field)
field
- The field name
public void addDynamicList(java.lang.String field, java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> values)
field
- The field namevalues
- A Map of dependant values to possible valuespublic void updateDynamicList(java.lang.String field, java.lang.String dependsOn)
field
- The field namedependsOn
- The value of the field this field depends onpublic java.util.Map<java.lang.String,java.lang.Object> getOriginalMap()
public java.util.Map<java.lang.String,java.lang.String> getUpdateMap()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |