|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ca.commons.datamodel.standard.DataModelBuilderImpl
com.ca.commons.datamodel.standard.DataModelEditorImpl
public final class DataModelEditorImpl
Extends DataModelBuilder to support saving of edited values by
splitting them back out into separate fragments. The style of output
supported is structured in the natural nested manner, rather then a number
of definitions occurring under a namespace and referencing nested
elements using "target" references.
| Field Summary |
|---|
| Fields inherited from class com.ca.commons.datamodel.standard.DataModelBuilderImpl |
|---|
dataModel, debugProp, editor, logger, sources |
| Fields inherited from interface com.ca.commons.datamodel.DataModelBuilder |
|---|
metadataMismatchLogger |
| Constructor Summary | |
|---|---|
DataModelEditorImpl()
|
|
| Method Summary | |
|---|---|
void |
mergeEditableFragment(DataModelSource readSource,
DataModelWritableSource writeSource)
Used to read in a fragment containing values which may be edited, in which case edits to values contained in the fragment will output to the provided writeSource when DataModelEditor.save() is
called. |
DataModelValue |
newEnumValue(String parentEnum,
String[] values,
String defaultValue)
Returns value initialized to entry matching defaultValue in parent enum def containing provided values. |
DataModelValue |
newValue(String dataTypeStr,
String defaultValue)
Factory method that returns a value matching symbolic name like "STR", "FLEXI_STR:DN", "ENUM:DAYS_OF_WEEK", with optional defaultValue. |
protected void |
notifyPropertyValueChange(com.ca.commons.datamodel.standard.DataModelPropertyImpl prop)
Mark all containers above prop as "dirty" for saving. |
void |
save()
Called to save any changes made to one or more fragments read in using DataModelEditor.mergeEditableFragment(com.ca.commons.datamodel.DataModelSource, com.ca.commons.datamodel.DataModelWritableSource), where the changes are split back
into the output fragments specified from the DataModelWritableSource
matching the ones from which they were merged. |
void |
save(DataModelWritableSource writeSource)
Write merged results to provided source, instead of splitting into multiple output fragments. |
| Methods inherited from class com.ca.commons.datamodel.standard.DataModelBuilderImpl |
|---|
convertValueFromXML, getCurrentSource, getDataModel, getSources, isEditor, mergeFragment |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.ca.commons.datamodel.DataModelBuilder |
|---|
getDataModel, mergeFragment |
| Constructor Detail |
|---|
public DataModelEditorImpl()
| Method Detail |
|---|
public void mergeEditableFragment(DataModelSource readSource,
DataModelWritableSource writeSource)
throws IOException,
javax.xml.bind.JAXBException
DataModelEditorwriteSource when DataModelEditor.save() is
called.
mergeEditableFragment in interface DataModelEditorreadSource - Read-only source from which datamodel fragment
should be read.writeSource - Writable source which edits will be saved to
by DataModelEditor.save().
IOException - Problem getting, or processing, fragment.
javax.xml.bind.JAXBException
public void save()
throws IOException,
javax.xml.bind.JAXBException
DataModelEditorDataModelEditor.mergeEditableFragment(com.ca.commons.datamodel.DataModelSource, com.ca.commons.datamodel.DataModelWritableSource), where the changes are split back
into the output fragments specified from the DataModelWritableSource
matching the ones from which they were merged.
save in interface DataModelEditorIOException
javax.xml.bind.JAXBException
public void save(DataModelWritableSource writeSource)
throws IOException,
javax.xml.bind.JAXBException
DataModelEditor
save in interface DataModelEditorIOException
javax.xml.bind.JAXBException
@NotNull
public DataModelValue newValue(String dataTypeStr,
String defaultValue)
throws ParseException
newValue in interface DataModelEditorParseException - When provided args are illegal.
@NotNull
public DataModelValue newEnumValue(String parentEnum,
String[] values,
String defaultValue)
throws ParseException
newEnumValue in interface DataModelEditorParseException
protected void notifyPropertyValueChange(com.ca.commons.datamodel.standard.DataModelPropertyImpl prop)
throws DataModelMismatchException
notifyPropertyValueChange in class DataModelBuilderImplDataModelMismatchException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||