|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcz.cmc.tcgui.datamanip.AbstractExporter
AbstractExporter is abstract superclass implementing Exporter interface. Subclasses should implement method export(...), in which they append specific Strings to appropriate StringBuffers 'tcCmd' and 'tcCmt'. As a result, it exports given tcgui.TCObject into OutputStream in format suitable for standart shell script executable under "tc aware" Linux OS.
| Field Summary | |
protected AttributeEntryInstance |
aei
common AttributeEntryInstance for indexing tc attribute maps |
protected TCObject |
ddTCO
datadef.TCObject of given 'tco' tcgui.TCObject |
protected OutputStream |
os
OutputStream into which to export all output (usually tcCmt and tcCmd). |
protected Object |
parentAtrEntry
AttributeEntry of parent's datadef object. |
protected Map |
parentAtrGroupMap
Map corresponding to parent's root AttributeGroup. |
protected TCObject |
parentDdTCO
datadef.TCObject of given 'tco' tcgui.TCObject's parent |
protected Map |
parentTcAtrMap
Map with tc attributes of given 'tco' tcgui.TCObject's parent |
protected TCObject |
parentTCO
Parent tcgui.TCObject of given 'tco' tcgui.TCObject |
protected Map |
tcAtrMap
Map with tc attributes of given 'tco' tcgui.TCObject |
protected StringBuffer |
tcCmd
StringBuffer in which the tc command to export (ie. |
protected StringBuffer |
tcCmt
StringBuffer in which the comment to insert before tc command (ie. '# some info...') is created. |
| Constructor Summary | |
AbstractExporter()
|
|
| Method Summary | |
protected abstract void |
export(TCExport tce,
TCObject tco)
Subclasses should implement this to add their specialized export functionality and append Strings for export to 'tcCmd' and 'tcCmt' StringBuffers. |
protected void |
exportAttributeEntry(Map m,
AttributeEntry ae,
TCObject tco)
Exports given AttributeEntry into 'tcCmd' and 'tcCmt' StringBuffers. |
protected void |
exportAttributeGroup(Map m,
AttributeGroup ag,
TCObject tco)
Exports AttributeEntries within given AttributeGroup into 'tcCmd' and 'tcCmt' StringBuffers. |
protected boolean |
exportHandle(Map aMap,
TCObject dTCO,
String hType,
TCObject tco)
Searches root AttributeGroup for handle specified by given String (usually "classid" or "handle") and exports its value into 'tcCmd' StringBuffer. |
protected boolean |
exportParentHandle(String hType,
TCObject tco)
Searches parent's root AttributeGroup for handle specified by given String (usually "classid" or "handle") and exports its value into 'tcCmd' StringBuffer. |
void |
exportTCObject(OutputStream os,
TCExport tce,
TCObject tco)
Exports the TCObject into given OutputStream |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected transient StringBuffer tcCmt
protected transient StringBuffer tcCmd
protected transient OutputStream os
protected transient AttributeEntryInstance aei
protected transient Map tcAtrMap
protected transient TCObject ddTCO
protected transient TCObject parentTCO
protected transient Map parentTcAtrMap
protected transient TCObject parentDdTCO
protected transient Object parentAtrEntry
protected transient Map parentAtrGroupMap
| Constructor Detail |
public AbstractExporter()
| Method Detail |
public void exportTCObject(OutputStream os,
TCExport tce,
TCObject tco)
throws ExportException
Exporter
exportTCObject in interface Exporteros - OutputStream to export the TCObject totce - TCExport instance for accessing the schematco - TCObject to export
ExportException - if any unrecoverable error occurs during export
protected abstract void export(TCExport tce,
TCObject tco)
throws ExportException
tce - TCExport instance for accessing the schematco - TCObject to export
ExportException - if any unrecoverable error occurs during export
protected void exportAttributeEntry(Map m,
AttributeEntry ae,
TCObject tco)
throws ExportException
m - Map containing value to export for key (AttributeEntry,index)ae - AttributeEntry which value should be exportedtco - tcgui.TCObject which is beeing exported
(used for exception description)
ExportException - if any unrecoverable error occurs during export
protected void exportAttributeGroup(Map m,
AttributeGroup ag,
TCObject tco)
throws ExportException
m - Map containing values for all AttributeEntries within the groupag - AttributeGroup which AttributeEntries to exporttco - tcgui.TCObject which is beeing exported
(used for exception description)
ExportException - if any unrecoverable error occurs during export
protected boolean exportParentHandle(String hType,
TCObject tco)
throws ExportException
hType - type of handle to search for (usually "classid" or "handle")tco - tcgui.TCObject which is beeing exported
(used for exception description)
ExportException - if any unrecoverable error occurs during export
protected boolean exportHandle(Map aMap,
TCObject dTCO,
String hType,
TCObject tco)
throws ExportException
aMap - attribute map inside which to search for AttributeEntry with
given handlehType - type of handle to search for (usually "classid" or "handle")tco - tcgui.TCObject which is beeing exported
(used for exception description)
ExportException - if any unrecoverable error occurs during export
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||