fop 1.0

org.apache.fop.events.model
Class EventMethodModel

java.lang.Object
  extended by org.apache.fop.events.model.EventMethodModel
All Implemented Interfaces:
java.io.Serializable, org.apache.xmlgraphics.util.XMLizable

public class EventMethodModel
extends java.lang.Object
implements java.io.Serializable, org.apache.xmlgraphics.util.XMLizable

Represents an event method. Each method in an event producer interface will result in one instance of EventMethodModel.

See Also:
Serialized Form

Nested Class Summary
static class EventMethodModel.Parameter
          Represents an event parameter.
 
Constructor Summary
EventMethodModel(java.lang.String methodName, EventSeverity severity)
          Creates an new instance.
 
Method Summary
 EventMethodModel.Parameter addParameter(java.lang.Class type, java.lang.String name)
          Adds a method parameter.
 void addParameter(EventMethodModel.Parameter param)
          Adds a method parameter.
 java.lang.String getExceptionClass()
          Returns the primary exception class for this event method.
 java.lang.String getMethodName()
          Returns the event method name
 java.util.List getParameters()
          Returns an unmodifiable list of parameters for this event method.
 EventSeverity getSeverity()
          Returns the event's severity level.
 void setExceptionClass(java.lang.String exceptionClass)
          Sets the primary exception class for this event method.
 void setMethodName(java.lang.String name)
          Sets the event method name.
 void setSeverity(EventSeverity severity)
          Sets the event's severity level.
 void toSAX(org.xml.sax.ContentHandler handler)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventMethodModel

public EventMethodModel(java.lang.String methodName,
                        EventSeverity severity)
Creates an new instance.

Parameters:
methodName - the event method's name
severity - the event severity
Method Detail

addParameter

public void addParameter(EventMethodModel.Parameter param)
Adds a method parameter.

Parameters:
param - the method parameter

addParameter

public EventMethodModel.Parameter addParameter(java.lang.Class type,
                                               java.lang.String name)
Adds a method parameter.

Parameters:
type - the type of the parameter
name - the name of the parameter
Returns:
the resulting Parameter instance

setMethodName

public void setMethodName(java.lang.String name)
Sets the event method name.

Parameters:
name - the event name

getMethodName

public java.lang.String getMethodName()
Returns the event method name

Returns:
the event name

setSeverity

public void setSeverity(EventSeverity severity)
Sets the event's severity level.

Parameters:
severity - the severity

getSeverity

public EventSeverity getSeverity()
Returns the event's severity level.

Returns:
the severity

getParameters

public java.util.List getParameters()
Returns an unmodifiable list of parameters for this event method.

Returns:
the list of parameters

setExceptionClass

public void setExceptionClass(java.lang.String exceptionClass)
Sets the primary exception class for this event method. Note: Not all event methods throw exceptions!

Parameters:
exceptionClass - the exception class

getExceptionClass

public java.lang.String getExceptionClass()
Returns the primary exception class for this event method. This method returns null if the event is only informational or just a warning.

Returns:
the primary exception class or null

toSAX

public void toSAX(org.xml.sax.ContentHandler handler)
           throws org.xml.sax.SAXException

Specified by:
toSAX in interface org.apache.xmlgraphics.util.XMLizable
Throws:
org.xml.sax.SAXException

fop 1.0

Copyright 1999-2010 The Apache Software Foundation. All Rights Reserved.