com.ibm.dse.services.formsprint
Class FormsRecordFormat

java.lang.Object
  |
  +--com.ibm.dse.base.FormatElement
        |
        +--com.ibm.dse.base.KeyedCollectionFormat
              |
              +--com.ibm.dse.base.RecordFormat
                    |
                    +--com.ibm.dse.services.formsprint.FormsRecordFormat

public class FormsRecordFormat
extends RecordFormat

The FormsRecordFormat class implements the formatting of the data which is sent to the printer by a PrintService.

See Also:
Serialized Form

Fields inherited from class com.ibm.dse.base.FormatElement
dataElementName, name
 
Constructor Summary
FormsRecordFormat()
          This constructor creates a FormsRecordFormat object.
FormsRecordFormat(java.lang.String aName)
          This constructor creates a FormsRecordFormat object.
 
Method Summary
 java.lang.String[] extract(java.lang.String aString)
          Extracts a String, calls the extract methods for the subelements, and takes the substring in which they are interested.
 java.lang.String formatContext(Context aContext)
          Formats the elements around a Context, which is passed as a parameter.
 java.lang.String formatKeyedCollection(KeyedCollection aKeyedCollection)
          Formats the elements around a keyedCollection, which is passed as a parameter.
 java.lang.String getFormName()
          Returns the compiled form name.
 java.lang.Object initializeFrom(Tag aTag)
          Initializes a FormsRecordFormat object with the Tag attributes.
 void setFormName(java.lang.String aFormName)
          Sets the compiledFormName attribute
 void setPrinterName(java.lang.String aPrinterName)
          Sets the printer name.
 DataElement unformatContext(java.lang.String aString, Context aContext)
          Unformats the elements around the context, which is passed as a parameter.
 KeyedCollection unformatKeyedCollection(java.lang.String aString, KeyedCollection aKeyedCollection)
          Unformats the elements around a keyedCollection, which is passed as a parameter.
 
Methods inherited from class com.ibm.dse.base.RecordFormat
obtainDataElement, obtainDataElement, toString, toStrings
 
Methods inherited from class com.ibm.dse.base.KeyedCollectionFormat
add, addElementAt, addFirst, at, format, format, getElements, getEnumeration, removeAll, removeAt, setElements, size, unformat, unformat
 
Methods inherited from class com.ibm.dse.base.FormatElement
exceptionInfo, externalizer, format, getDataElementName, getExternalizer, getName, getTagName, isCacheable, isConstant, readExternal, readExternal, readObject, reinitialize, removeExternal, rootDecorated, setDataElementName, setExternalizer, setName, setSize, toTags, unformat, writeExternal, writeExternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FormsRecordFormat

public FormsRecordFormat()
This constructor creates a FormsRecordFormat object.

FormsRecordFormat

public FormsRecordFormat(java.lang.String aName)
                  throws java.io.IOException
This constructor creates a FormsRecordFormat object.
Parameters:
aName - java.lang.String, the value for the name attribute of FormatElement
Throws:
java.io.IOException -  
Method Detail

extract

public java.lang.String[] extract(java.lang.String aString)
                           throws DSEInvalidArgumentException
Extracts a String, calls the extract methods for the subelements, and takes the substring in which they are interested.
Overrides:
extract in class RecordFormat
Parameters:
String - aString, a string which contains formated strings
Returns:
String[] - the first element is the part of the provided string that is able to unformat and the second is the rest of the provided string
Throws:
DSEInvalidArgumentException -  

formatContext

public java.lang.String formatContext(Context aContext)
                               throws DSEInvalidClassException,
                                      DSEInvalidRequestException,
                                      DSEInvalidArgumentException
Formats the elements around a Context, which is passed as a parameter.
Overrides:
formatContext in class RecordFormat
Parameters:
aContext - com.ibm.dse.base.Context, the Context to format
Returns:
java.lang.String - the formated string
Throws:
DSEInvalidClassException, - DSEInvalidRequestException, DSEInvalidArgumentException

formatKeyedCollection

public java.lang.String formatKeyedCollection(KeyedCollection aKeyedCollection)
                                       throws DSEInvalidClassException,
                                              DSEInvalidRequestException,
                                              DSEInvalidArgumentException
Formats the elements around a keyedCollection, which is passed as a parameter.
Overrides:
formatKeyedCollection in class RecordFormat
Parameters:
aKeyedCollection - com.ibm.dse.base.KeyedCollection, the KeyedCollection to format
Returns:
java.lang.String - the formated string
Throws:
DSEInvalidClassException, - DSEInvalidRequestException, DSEInvalidArgumentException

getFormName

public java.lang.String getFormName()
Returns the compiled form name.
Returns:
java.lang.String

initializeFrom

public java.lang.Object initializeFrom(Tag aTag)
                                throws java.io.IOException
Initializes a FormsRecordFormat object with the Tag attributes.
Overrides:
initializeFrom in class RecordFormat
Parameters:
aTag - com.ibm.dse.base.Tag, the Tag
Returns:
java.lang.Object - the initialized format
Throws:
java.io.IOException -  

setFormName

public void setFormName(java.lang.String aFormName)
Sets the compiledFormName attribute
Parameters:
aFormName - java.lang.String

setPrinterName

public void setPrinterName(java.lang.String aPrinterName)
Sets the printer name.
Parameters:
aPrinterName - java.lang.String, the value for the printerName attribute

unformatContext

public DataElement unformatContext(java.lang.String aString,
                                   Context aContext)
                            throws DSEInvalidRequestException,
                                   DSEInvalidArgumentException
Unformats the elements around the context, which is passed as a parameter.
Overrides:
unformatContext in class RecordFormat
Parameters:
aString - java.lang.String, the formated string
aContext - com.ibm.dse.base.Context, the context where the DataElement to update is
Returns:
com.ibm.dse.base.DataElement - the updated DataElement
Throws:
DSEInvalidRequestException, - DSEInvalidArgumentException

unformatKeyedCollection

public KeyedCollection unformatKeyedCollection(java.lang.String aString,
                                               KeyedCollection aKeyedCollection)
                                        throws DSEInvalidRequestException,
                                               DSEInvalidArgumentException
Unformats the elements around a keyedCollection, which is passed as a parameter.
Overrides:
unformatKeyedCollection in class RecordFormat
Parameters:
aString - java.lang.String, the formated string
aKeyedCollection - com.ibm.dse.base.KeyedCollection, the KeyedCollection to update
Returns:
com.ibm.dse.base.KeyedCollection - the updated KeyedCollection
Throws:
DSEInvalidRequestException, - DSEInvalidArgumentException