com.ibm.dse.tools.workbench.gui
Class TBGEntitiesExternalizer

java.lang.Object
  |
  +--com.ibm.dse.tools.workbench.gui.TBGEntitiesExternalizer

public class TBGEntitiesExternalizer
extends java.lang.Object
implements Externalizer, TableNames

This class implements the Template Based Generator (TBG) Entities Externalizer. It's used to externalize table rows of entities
WARNING: The client, server and client&server DW sites are written in hardcode. To change their values you must check the DW allowed_values table for the site domain


Fields inherited from interface com.ibm.dse.tools.workbench.base.TableNames
ALLOWED_VALUES, ATTRIBUTES, DOMAINS, ENTITIES, ENTITIES_ENTITIES, GROUPS, GROUPS_ENTITIES, GROUPS_GROUPS, GROUPS_INSTANCES, INSTANCE_ERRORS, INSTANCES, PROPERTIES, USERS
 
Constructor Summary
TBGEntitiesExternalizer()
          This method creates an SGMLExternalizer object.
 
Method Summary
 java.lang.String externalize(TableRow row)
          This method externalizes an entity to a String
 void externalize(TableRow[] rows)
          This method externalizes a row vector of entities to one or several files, it depends on the number of different base_groups or groups.
 java.lang.String getFormat()
          This method returns the output format acronym.
 java.lang.String getName()
          This method returns the name of the externalizer.
 java.io.Reader getTemplateFooter()
          This method returns, if exists, the reader of the template footer.
 java.io.Reader getTemplateHeader()
          This method returns, if exists, the reader of the template header.
 java.io.Reader getTemplateReader(java.lang.String location)
          This method returns the template reader if the template location exists and can be read.
 void invokeSetup()
          This method shows, if available, the setup or options view to configure the externalizer.
 void invokeWizard(Repository repository)
          This method invokes the externalizer wizard, if available, to guide the user in the externalization process.
 void loadDefaultFiles()
          This method loads, if exist, the default filenames for each site/basegroupName and site/groupCode from the Workbench settings
 void saveDefaultFiles(java.util.Hashtable result)
          This method inserts the selected filenames into the .ini file to obtain data persistence
 void setProperties(java.util.Properties properties)
          This method sets the properties for the externalizer, instead of using invokeSetup method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TBGEntitiesExternalizer

public TBGEntitiesExternalizer()
This method creates an SGMLExternalizer object.
Method Detail

externalize

public void externalize(TableRow[] rows)
This method externalizes a row vector of entities to one or several files, it depends on the number of different base_groups or groups.
Specified by:
externalize in interface Externalizer
Parameters:
rows - com.ibm.dse.tools.workbench.base.TableRow[] The entities

externalize

public java.lang.String externalize(TableRow row)
                             throws WorkbenchException
This method externalizes an entity to a String
Specified by:
externalize in interface Externalizer
Parameters:
row - com.ibm.dse.tools.workbench.base.TableRow
Returns:
java.lang.String
Throws:
WorkbenchException - An error occurs during externalization

getFormat

public java.lang.String getFormat()
This method returns the output format acronym.
Specified by:
getFormat in interface Externalizer
Returns:
java.lang.String

getName

public java.lang.String getName()
This method returns the name of the externalizer.
Specified by:
getName in interface Externalizer
Returns:
java.lang.String

getTemplateFooter

public java.io.Reader getTemplateFooter()
This method returns, if exists, the reader of the template footer.
Returns:
java.io.Reader

getTemplateHeader

public java.io.Reader getTemplateHeader()
This method returns, if exists, the reader of the template header.
Returns:
java.io.Reader

getTemplateReader

public java.io.Reader getTemplateReader(java.lang.String location)
                                 throws WBInputOutputException
This method returns the template reader if the template location exists and can be read.
Parameters:
location - java.lang.String
Returns:
java.io.Reader
Throws:
WBInputOutputException - An I/O error occurs reading the template

invokeSetup

public void invokeSetup()
This method shows, if available, the setup or options view to configure the externalizer.
Specified by:
invokeSetup in interface Externalizer

invokeWizard

public void invokeWizard(Repository repository)
This method invokes the externalizer wizard, if available, to guide the user in the externalization process.
Specified by:
invokeWizard in interface Externalizer
Parameters:
repository - com.ibm.dse.tools.workbench.base.Repository

loadDefaultFiles

public void loadDefaultFiles()
This method loads, if exist, the default filenames for each site/basegroupName and site/groupCode from the Workbench settings

saveDefaultFiles

public void saveDefaultFiles(java.util.Hashtable result)
                      throws WBInputOutputException
This method inserts the selected filenames into the .ini file to obtain data persistence
Parameters:
result - java.util.Hashtable The pairs (String key,File file)
Throws:
WBInputOutputException - An I/O error occurs

setProperties

public void setProperties(java.util.Properties properties)
This method sets the properties for the externalizer, instead of using invokeSetup method.
Specified by:
setProperties in interface Externalizer
Parameters:
properties - java.util.Properties