jbpm-form-modeler-common 1.0-SNAPSHOT

org.jbpm.formModeler.service.error
Class ErrorManager

java.lang.Object
  extended by org.jbpm.formModeler.service.bb.commons.config.componentsFactory.BasicFactoryElement
      extended by org.jbpm.formModeler.service.error.ErrorManager
All Implemented Interfaces:
Serializable, FactoryLifecycle

public class ErrorManager
extends BasicFactoryElement

Manages the error handling in the platform.

See Also:
Serialized Form

Field Summary
protected  boolean logErrorReportEnabled
           
 
Constructor Summary
ErrorManager()
           
 
Method Summary
 ApplicationError getApplicationErrorCause(Throwable e)
          Get the error cause (if any) thrown by the application logic.
 ErrorReport getErrorReport()
           
 boolean isLogErrorReportEnabled()
           
 void logError(ErrorReport report)
          Log the specified error report.
static ErrorManager lookup()
          Get an ExceptionManager instance.
 ErrorReport notifyError(Throwable t, boolean doLog)
          Generate an error report and log the error if requested.
 void setErrorReport(ErrorReport errorReport)
           
 void setLogErrorReportEnabled(boolean logErrorReportEnabled)
           
 void throwBusinessError(String title, String message)
          Force the given error to be thrown. the current transaction is aborted and the given message string is displayed as an error.
 void throwBusinessInfo(String title, String message)
          Force the given error to be thrown. the current transaction is aborted and the given message string is displayed as extra information.
 void throwBusinessWarning(String title, String message)
          Force the given error to be thrown. the current transaction is aborted and the given message string is displayed as a warning.
 void throwTechnicalError(String message, Throwable cause)
          Force the given error to be thrown. the current transaction is aborted and the give message string is displayed in a error report.
 
Methods inherited from class org.jbpm.formModeler.service.bb.commons.config.componentsFactory.BasicFactoryElement
addPeriodicTask, addPeriodicTask, factoryLookup, getComponentAlias, getComponentDescription, getComponentName, getComponentScope, init, setComponentAlias, shutdown, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logErrorReportEnabled

protected boolean logErrorReportEnabled
Constructor Detail

ErrorManager

public ErrorManager()
Method Detail

lookup

public static ErrorManager lookup()
Get an ExceptionManager instance.


isLogErrorReportEnabled

public boolean isLogErrorReportEnabled()

setLogErrorReportEnabled

public void setLogErrorReportEnabled(boolean logErrorReportEnabled)

throwTechnicalError

public void throwTechnicalError(String message,
                                Throwable cause)

Force the given error to be thrown. the current transaction is aborted and the give message string is displayed in a error report.

NOTE: This functionality is not implemented yet. Nevertheless, the future error handling subsystem will notify such error to the error handling component. Actually, as a temporal solution, the error manager is overridden by the bpe module in order to notify to the StepExecutionErrorHandler component, so the message specified is displayed as part of the error in the BPM task list .

Parameters:
message - The custom message to display in the error window.
cause - The cause of the error, also displayed in the error window.

throwBusinessError

public void throwBusinessError(String title,
                               String message)

Force the given error to be thrown. the current transaction is aborted and the given message string is displayed as an error.

Parameters:
title - The error window title.
message - The custom message to display in the error window.

throwBusinessWarning

public void throwBusinessWarning(String title,
                                 String message)

Force the given error to be thrown. the current transaction is aborted and the given message string is displayed as a warning.

Parameters:
title - The error window title.
message - The custom message to display in the error window.

throwBusinessInfo

public void throwBusinessInfo(String title,
                              String message)

Force the given error to be thrown. the current transaction is aborted and the given message string is displayed as extra information.

Parameters:
title - The error window title.
message - The custom message to display in the error window.

getApplicationErrorCause

public ApplicationError getApplicationErrorCause(Throwable e)
Get the error cause (if any) thrown by the application logic.


notifyError

public ErrorReport notifyError(Throwable t,
                               boolean doLog)
Generate an error report and log the error if requested.


logError

public void logError(ErrorReport report)
Log the specified error report.


getErrorReport

public ErrorReport getErrorReport()

setErrorReport

public void setErrorReport(ErrorReport errorReport)

jbpm-form-modeler-common 1.0-SNAPSHOT

Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.