Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.rse.util.evfparser
Class EventsFileParser

java.lang.Object
  extended by WorkspaceModifyOperation
      extended by com.ibm.etools.iseries.rse.util.evfparser.EventsFileParser
All Implemented Interfaces:
IMarkerCreator

public class EventsFileParser
extends WorkspaceModifyOperation
implements IMarkerCreator

This is an operation that parses an event file, and opens it in the Error List view


Field Summary
static String Copyright
           
 
Constructor Summary
EventsFileParser(IFile newFile, IFile oldFile, IHost host, String srcType)
           
EventsFileParser(IFile newFile, IFile oldFile, IHost host, String srcType, String projectName)
           
EventsFileParser(IFile newFile, IFile oldFile, IHost host, String srcType, String projectName, boolean useDefaultEncoding)
           
 
Method Summary
 void createMarker(QSYSEventsFileErrorInformationRecord record, String fileLocation, String isReadOnly)
           
 void execute(IProgressMonitor monitor)
           
 LinkedList getEventFileErrors()
          This method is used by the JUnit test for event file processing.
 SystemMessage getException()
          Used to retrieve any errors found when parsing.
protected static SystemMessageException getSystemMessageException(String l1, String l2, Exception e)
           
 void setUseDefaultEncoding(boolean flag)
           
 void updateConnectionName(String location, int indexEndBracket)
          If we encounter a connection name on the FILE Keeps track of whether this check has already been done in the field #bDoneServerAliasCheck
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Copyright

public static final String Copyright
See Also:
Constant Field Values
Constructor Detail

EventsFileParser

public EventsFileParser(IFile newFile,
                        IFile oldFile,
                        IHost host,
                        String srcType)

EventsFileParser

public EventsFileParser(IFile newFile,
                        IFile oldFile,
                        IHost host,
                        String srcType,
                        String projectName)

EventsFileParser

public EventsFileParser(IFile newFile,
                        IFile oldFile,
                        IHost host,
                        String srcType,
                        String projectName,
                        boolean useDefaultEncoding)
Method Detail

execute

public void execute(IProgressMonitor monitor)

getException

public SystemMessage getException()
Used to retrieve any errors found when parsing. EVFC6009E is retrieved. Caller must provide substitution variables:

%1 Events file name

%2 location

Returns:
null if there was no exception, otherwise a SystemMessage
Since:
6.0

getEventFileErrors

public LinkedList getEventFileErrors()
This method is used by the JUnit test for event file processing. After all records in the Events File are processed (i.e. after the execute() method finishes running), this method is called to print all the errors from the Events File to a StringBuffer.

Returns:
null if the processor is null or is not a QSYSEventsFileExpansionProcessor, otherwise a StringBuffer containing all processed errors from the event file, each on a new line.

getSystemMessageException

protected static SystemMessageException getSystemMessageException(String l1,
                                                                  String l2,
                                                                  Exception e)

createMarker

public void createMarker(QSYSEventsFileErrorInformationRecord record,
                         String fileLocation,
                         String isReadOnly)
                  throws Exception
Specified by:
createMarker in interface IMarkerCreator
Throws:
Exception

updateConnectionName

public void updateConnectionName(String location,
                                 int indexEndBracket)
Description copied from interface: IMarkerCreator
If we encounter a connection name on the FILE Keeps track of whether this check has already been done in the field #bDoneServerAliasCheck

Specified by:
updateConnectionName in interface IMarkerCreator

setUseDefaultEncoding

public void setUseDefaultEncoding(boolean flag)

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.