...
Interface with the custom datatype consumer (settings (formerly Global Properties from platform 1.8 downwards), object attribute, complex obs)
- one object per consumer – in attribute context, this means one per property type; in the settings (formerly Global Properties from platform 1.8 downwards) context, this means one for each property that is being displayed
- constructor() – default handler, handler config="", minOccurs=0, maxOccurs=1
- constructor(String handler, String handlerConfig, int minOccurs, int maxOccurs)
- the consumer loads the custom datatype with all its values and receives them back via save
- standard interface
data is exchanged through a List<CustomDataRow>; deleted objects have newValue=null, new objects have oldValue=null
Code Block language java public CustomDataRow { public String key; // optionally set by/returned to consumer public String oldValue; // set by/returned to consumer public String newValue; // returned to consumer public String voidReason; // returned to consumer public Object data; // for internal use by custom data service object }
The list is copied to a local list on load and then to a temporary list before returning from save; changes to the list by the consumer have no effect and the data object is never returnd to the customer
- load(List<CustomDataRow>) (empty indicates no values exist)
- save() : List<CustomDataRow> throws DataError Exception (empty indicates no values exists and none were added; underlying data is saved)
- customerIterator() : ListIterator<Integer>
- alternate interface where maxOccurs=1 (throws UnsupportedOperation Exception if maxOccurs != 1)
- load(String) (null indicates no value exists)
- save() : String throws DataError Exception (null indicates not set or voided; underlying data is saved)
- getVoidReason() : String (returns null if not present)
- both interfaces
- cancel() (any changes not previously saved are abandoned and the custom data service object is cleared)
- isDirty() : Boolean (whether any changed have been made to the list)
- validate() : List<String> (each element is validated and the multiplicity is validated; any errors found are returned as messages; if no errors are found, returns and empty list and dirty is cleared; calling validate before saving guarantees no error will be thrown)
- cancel() (changes are discarded and loaded data is cleared)
- standard interface
- the custom data service object delegates handler calls to the handler
...