oracle.ifs.beans.parsers
Interface ParserCallback


public interface ParserCallback

A ParserCallback allows an application to interact with a Parser.

If a ParserCallback is specified in calling Parser.parse, the Parser will invoke ParserCallback methods as parsing is performed, allowing limited well-defined interaction between the application and the Parser.


Method Summary
 void postOperation(LibraryObject lo)
          Invoked immediately after performing an operation on a LibraryObject.
 LibraryObjectDefinition preOperation(LibraryObject lo, LibraryObjectDefinition def)
          Invoked immediately prior to performing an operation on a LibraryObject.
 void signalException(IfsException e)
          Signals a parsing-related exception.
 

Method Detail


preOperation


public LibraryObjectDefinition preOperation(LibraryObject lo,
                                            LibraryObjectDefinition def)
                                     throws IfsException
Invoked immediately prior to performing an operation on a LibraryObject.
Parameters:
lo - the LibraryObject on which the operation will be performed; null if the operation will create a new LibraryObject
def - the operation proposed by the Parser
Returns:
the operation mandated by the application. To accept the operation proposed by the Parser, simply return def. To specify a different operation, either return an altered def or construct and return a different definition. Return null to cancel the operation altogether.
Throws:
IfsException - if the operation fails; this will abort parsing

postOperation


public void postOperation(LibraryObject lo)
                   throws IfsException
Invoked immediately after performing an operation on a LibraryObject.
Parameters:
lo - the LibraryObject
Throws:
IfsException - if the operation fails; this will abort parsing

signalException


public void signalException(IfsException e)
                     throws IfsException
Signals a parsing-related exception.

The ParserCallback implementation can either throw the exception, or simply return, in which case parsing continues.

Parameters:
e - the potential exception
Throws:
IfsException - this will abort parsing