org.hardtokenmgmt.ui
Class ErrorController

java.lang.Object
  extended by org.hardtokenmgmt.core.ui.BaseController
      extended by org.hardtokenmgmt.ui.ErrorController
All Implemented Interfaces:
IController

public class ErrorController
extends BaseController

Controller used to diplay and error and the possibility to mail the error the designated administrator

Controller Memory Settings:

See separate CC constants.

Version:
$Id$
Author:
Philip Vendil 2007 feb 16

Field Summary
static java.lang.String CCBACKCONTROLLER
          Property defining the controller (string) that should be switched to when the back button is pressed, if property isn't set is the callingController used.
static java.lang.String CCERROREXCEPTION
          Property defining the exception to report, this is a required setting for the controller to function properly.
static java.lang.String CCERRORMSG
          Property defining the error message that should be used, must be a String, if not defined will the simple name of the exception be used.
 
Fields inherited from class org.hardtokenmgmt.core.ui.BaseController
view
 
Constructor Summary
ErrorController()
           
ErrorController(BaseView alternateErrorView, boolean closeOnBack)
          Alternative constructor.
 
Method Summary
 void getControl(java.lang.String callingController)
          Method called by the Main applet when it's time for this controller to take control
 boolean isAuthorizedToController(java.security.cert.X509Certificate admin)
          Method called by the main applet to check that the administrator is authorized to this controller
 
Methods inherited from class org.hardtokenmgmt.core.ui.BaseController
debug, debug, error, error, getAdministratorSettings, getControllerMemory, getControllerSetting, getControllerSetting, getGlobalSettings, getHTMFAdminInterface, getProcessableToken, getTokenManager, getView, getWSRAInterface, info, info, isAdmin, isNonAdmin, switchControlTo, switchToFreshController
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CCERRORMSG

public static final java.lang.String CCERRORMSG
Property defining the error message that should be used, must be a String, if not defined will the simple name of the exception be used.

See Also:
Constant Field Values

CCERROREXCEPTION

public static final java.lang.String CCERROREXCEPTION
Property defining the exception to report, this is a required setting for the controller to function properly. Must be a Throwable

See Also:
Constant Field Values

CCBACKCONTROLLER

public static final java.lang.String CCBACKCONTROLLER
Property defining the controller (string) that should be switched to when the back button is pressed, if property isn't set is the callingController used.

See Also:
Constant Field Values
Constructor Detail

ErrorController

public ErrorController()

ErrorController

public ErrorController(BaseView alternateErrorView,
                       boolean closeOnBack)
Alternative constructor.

Parameters:
alternateErrorView - must implement the IErrorView interface.
closeOnBack - if the current view should be closed or not
Method Detail

getControl

public void getControl(java.lang.String callingController)
Method called by the Main applet when it's time for this controller to take control

Parameters:
callingController - class path to the controller calling this controller or null if this was the main controller.
See Also:
IController.getControl(String)

isAuthorizedToController

public boolean isAuthorizedToController(java.security.cert.X509Certificate admin)
Method called by the main applet to check that the administrator is authorized to this controller

Parameters:
admin - the certificate of the loggen in administrator.
Returns:
true if the administrator is authorized to this controller
See Also:
IController.isAuthorizedToController(X509Certificate)