Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.util.evfparser
Class QSYSEventsFileProcessorBlockCore

java.lang.Object
  extended by com.ibm.etools.iseries.util.evfparser.QSYSEventsFileProcessorBlockCore
Direct Known Subclasses:
QSYSEventsFileProcessorBlock

public class QSYSEventsFileProcessorBlockCore
extends Object


Field Summary
protected  String _connection
           
protected  QSYSEventsFileProcessorRecord _currentProcessor
           
protected  LinkedList _errors
           
protected  QSYSEventsFileMapTable _mappingTable
           
protected  QSYSEventsFileProcessorBlockCore _previousProcessorBlock
           
protected  String _profile
           
protected  String _project
           
protected  String _type
           
protected  String INPUT_FILE_ID
           
 
Constructor Summary
QSYSEventsFileProcessorBlockCore(QSYSEventsFileProcessorRecord record)
           
 
Method Summary
 void addErrorInformation(QSYSEventsFileErrorInformationRecord record)
           
 void addFile(QSYSEventsFileFileIDRecord file)
           
 void closeFile(QSYSEventsFileFileEndRecord file)
           
 boolean containsExpansionEvents()
           
 LinkedList getAllProcessorErrors()
          This method is used by the JUnit test for event file processing.
 QSYSEventsFileFileIDRecord getInitialInputFile()
          Returns the input file of the first processor block of the current events file.
 QSYSEventsFileFileIDRecord getInputFile()
           
 QSYSEventsFileMapTable getMappingTable()
           
 QSYSEventsFileFileIDRecord getOutputFile()
           
 QSYSEventsFileProcessorBlockCore getPreviousProcessorBlock()
           
 int getTotalNumberOfLinesInInputFiles()
           
 int getTotalNumberOfLinesInOutputFile()
           
protected  boolean isFileReadOnly(QSYSEventsFileFileIDRecord fileIDRecord)
          Determines whether a file in the current processor block is read-only or not.
 boolean isFirstInEventsFile()
          Returns whether the current processor block is the first one in the current "sub" events file (needed for events file that contains multiple events files that have been combined into one)
 boolean isMappingSupported()
           
 boolean isProcessorIDZero()
           
 void modifyErrorInformation(QSYSEventsFileErrorInformationRecord error)
           
 void processorEnded()
           
protected  boolean resolveFileNameAndDetermineIfReadOnly(QSYSEventsFileErrorInformationRecord error)
          Maps the error back to the original input member and resolves the filename of that member.
 void resolveFileNamesForAllErrors()
           
 void setContainsExpansionEvents(boolean containsExpansionEvents)
           
 void setFirstInEventsFile(boolean isFirstInEventsFile)
          Sets whether the current processor block is the first one in the current "sub" events file (needed for events file that contains multiple events files that have been combined into one)
 void setInputFile(QSYSEventsFileFileIDRecord file)
           
 void setMappingSupported(boolean _mappingSupported)
           
 void setOutputFile(QSYSEventsFileFileIDRecord file)
           
 void setPreviousProcessor(QSYSEventsFileProcessorBlockCore previous)
           
 void setTotalNumberOfLinesInOutputFile(int numberOfLines)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INPUT_FILE_ID

protected final String INPUT_FILE_ID
See Also:
Constant Field Values

_errors

protected LinkedList _errors

_currentProcessor

protected QSYSEventsFileProcessorRecord _currentProcessor

_mappingTable

protected QSYSEventsFileMapTable _mappingTable

_previousProcessorBlock

protected QSYSEventsFileProcessorBlockCore _previousProcessorBlock

_connection

protected String _connection

_profile

protected String _profile

_type

protected String _type

_project

protected String _project
Constructor Detail

QSYSEventsFileProcessorBlockCore

public QSYSEventsFileProcessorBlockCore(QSYSEventsFileProcessorRecord record)
Method Detail

getInputFile

public QSYSEventsFileFileIDRecord getInputFile()

getInitialInputFile

public QSYSEventsFileFileIDRecord getInitialInputFile()
Returns the input file of the first processor block of the current events file.

Returns:
the input file of the first processor block of the current events file.

setInputFile

public void setInputFile(QSYSEventsFileFileIDRecord file)

addFile

public void addFile(QSYSEventsFileFileIDRecord file)
             throws SecondLevelHelpException
Throws:
SecondLevelHelpException

closeFile

public void closeFile(QSYSEventsFileFileEndRecord file)
               throws SecondLevelHelpException
Throws:
SecondLevelHelpException

getOutputFile

public QSYSEventsFileFileIDRecord getOutputFile()

setOutputFile

public void setOutputFile(QSYSEventsFileFileIDRecord file)

getMappingTable

public QSYSEventsFileMapTable getMappingTable()

isProcessorIDZero

public boolean isProcessorIDZero()

addErrorInformation

public void addErrorInformation(QSYSEventsFileErrorInformationRecord record)

processorEnded

public void processorEnded()
                    throws SecondLevelHelpException
Throws:
SecondLevelHelpException

setPreviousProcessor

public void setPreviousProcessor(QSYSEventsFileProcessorBlockCore previous)

setContainsExpansionEvents

public void setContainsExpansionEvents(boolean containsExpansionEvents)

containsExpansionEvents

public boolean containsExpansionEvents()

getTotalNumberOfLinesInInputFiles

public int getTotalNumberOfLinesInInputFiles()

setTotalNumberOfLinesInOutputFile

public void setTotalNumberOfLinesInOutputFile(int numberOfLines)

getTotalNumberOfLinesInOutputFile

public int getTotalNumberOfLinesInOutputFile()

getPreviousProcessorBlock

public QSYSEventsFileProcessorBlockCore getPreviousProcessorBlock()

modifyErrorInformation

public void modifyErrorInformation(QSYSEventsFileErrorInformationRecord error)
                            throws SecondLevelHelpException
Throws:
SecondLevelHelpException

setFirstInEventsFile

public void setFirstInEventsFile(boolean isFirstInEventsFile)
Sets whether the current processor block is the first one in the current "sub" events file (needed for events file that contains multiple events files that have been combined into one)

Parameters:
isFirstInEventsFile -

isFirstInEventsFile

public boolean isFirstInEventsFile()
Returns whether the current processor block is the first one in the current "sub" events file (needed for events file that contains multiple events files that have been combined into one)

Returns:
- true if the current processor block is the first one in the current "sub" events file, false otherwise

setMappingSupported

public void setMappingSupported(boolean _mappingSupported)

isMappingSupported

public boolean isMappingSupported()

isFileReadOnly

protected boolean isFileReadOnly(QSYSEventsFileFileIDRecord fileIDRecord)
Determines whether a file in the current processor block is read-only or not. A file is considered read-only if it is a temporary file created by an SQL pre-compiler

Parameters:
fileRecord - - the QSYSEventsFileFileIDRecord of the file to check
Returns:
- true if the file is read-only, false otherwise

getAllProcessorErrors

public LinkedList getAllProcessorErrors()
This method is used by the JUnit test for event file processing. This method returns all errors in this and all previous processor blocks. Since each QSYSEventsFileProcessorBlock contains a LinkedList of errors, the result will be returned as a LinkedList of those linked lists. This method is called by QSYSEventsFileExpansionProcessor.getAllErrors(), which is called by EventsFileParser.printEventFileErrors(), which in turn is called by the JUnit test for event file processing.

Returns:
a list of lists of all parsed errors from the current and all previous processor blocks. (one list for each processor block).

resolveFileNamesForAllErrors

public void resolveFileNamesForAllErrors()
                                  throws SecondLevelHelpException
Throws:
SecondLevelHelpException

resolveFileNameAndDetermineIfReadOnly

protected boolean resolveFileNameAndDetermineIfReadOnly(QSYSEventsFileErrorInformationRecord error)
                                                 throws SecondLevelHelpException
Maps the error back to the original input member and resolves the filename of that member. If mappings are not supported, checks and returns whether that member is read-only.

Parameters:
error - - the QSYSEventsFileErrorInformationRecord to resolve
Returns:
- true if mappings are not supported and the member that the error points to is read-only, false otherwise
Throws:
SecondLevelHelpException

Rational Developer for Power Systems Software
V7.6

Copyright © 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.