Package org.bedework.util.struts
Class ErrorEmitSvlt
- java.lang.Object
-
- org.bedework.util.struts.ErrorEmitSvlt
-
- All Implemented Interfaces:
Serializable,org.bedework.util.logging.Logged,MessageEmit
- Direct Known Subclasses:
MessageEmitSvlt
public class ErrorEmitSvlt extends Object implements MessageEmit
This class allows error message generation in the servlet world.- Version:
- 1.0
- Author:
- Mike Douglass douglm@rpi.edu
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classErrorEmitSvlt.MsgWe save the message property and the parameters in the following class which we can return as an alternative to the struts message generation.
-
Constructor Summary
Constructors Constructor Description ErrorEmitSvlt()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringclassName()voidclear()Indicate no messages emitted.protected voiddebugMsg(String pname, String ptype, String pval)voidemit(String pname)voidemit(String pname, int num)voidemit(String pname, Object o)voidemit(String pname, Object o1, Object o2)voidemit(String pname, Object o1, Object o2, Object o3)voidemit(Throwable t)org.apache.struts.action.ActionErrorsgetErrors()org.bedework.util.logging.BwLoggergetLogger()ArrayList<ErrorEmitSvlt.Msg>getMsgList()protected booleanhaveOutputObject()booleanmessagesEmitted()voidreinit(String id, Object caller, org.apache.struts.util.MessageResources messages, org.apache.struts.action.ActionErrors errors, String exceptionPname, boolean clear)Generation of errors in the servlet world means adding them to the errors object.voidsetExceptionPname(String pname)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.bedework.util.logging.Logged
audit, debug, debug, enableAuditLogger, enableErrorLogger, enableMetricsLogger, error, error, error, info, isAuditLoggerEnabled, isErrorLoggerEnabled, isMetricsDebugEnabled, isMetricsLoggerEnabled, metrics, setLoggerClass, setLoggerClass, trace, trace, warn
-
-
-
-
Field Detail
-
id
protected transient String id
-
caller
protected transient Object caller
-
messages
protected transient org.apache.struts.util.MessageResources messages
-
errors
protected transient org.apache.struts.action.ActionErrors errors
-
exceptionPname
protected transient String exceptionPname
-
msgList
protected ArrayList<ErrorEmitSvlt.Msg> msgList
-
-
Method Detail
-
reinit
public void reinit(String id, Object caller, org.apache.struts.util.MessageResources messages, org.apache.struts.action.ActionErrors errors, String exceptionPname, boolean clear)
Generation of errors in the servlet world means adding them to the errors object. We need to call this routine on every entry to the application- Parameters:
id- An identifying namecaller- Used for log identificationmessages- Resourceserrors- Error message will be appended on failure.exceptionPname- Property name for exceptionsclear- true to clear list
-
getMsgList
public ArrayList<ErrorEmitSvlt.Msg> getMsgList()
- Returns:
- msg list
-
emit
public void emit(String pname)
- Specified by:
emitin interfaceMessageEmit
-
emit
public void emit(String pname, int num)
- Specified by:
emitin interfaceMessageEmit
-
setExceptionPname
public void setExceptionPname(String pname)
- Specified by:
setExceptionPnamein interfaceMessageEmit
-
emit
public void emit(Throwable t)
- Specified by:
emitin interfaceMessageEmit
-
emit
public void emit(String pname, Object o)
- Specified by:
emitin interfaceMessageEmit
-
emit
public void emit(String pname, Object o1, Object o2)
- Specified by:
emitin interfaceMessageEmit
-
emit
public void emit(String pname, Object o1, Object o2, Object o3)
- Specified by:
emitin interfaceMessageEmit
-
clear
public void clear()
Indicate no messages emitted. Null in this implementation.- Specified by:
clearin interfaceMessageEmit
-
messagesEmitted
public boolean messagesEmitted()
- Specified by:
messagesEmittedin interfaceMessageEmit- Returns:
- true if any messages emitted
-
getErrors
public org.apache.struts.action.ActionErrors getErrors()
- Returns:
- errors
-
haveOutputObject
protected boolean haveOutputObject()
-
className
protected String className()
-
getLogger
public org.bedework.util.logging.BwLogger getLogger()
- Specified by:
getLoggerin interfaceorg.bedework.util.logging.Logged
-
-