Utilities provided by the Business Process Choreographer Explorer JSF components

The JavaServer Faces (JSF) components provide utilities for user-specific time zone information and error handling.

User-specific time zone information

The BPCListHandler class uses the com.ibm.bpc.clientcore.util.User interface to get information about the time zone and locale of each user. The List component expects the implementation of the interface to be configured with user as the managed-bean name in your JavaServer Faces (JSF) configuration file. If this entry is missing from the configuration file, the time zone in which WebSphere Process Server is running is returned.

The com.ibm.bpc.clientcore.util.User interface is defined as follows:
public interface User {

    /**
     * The locale used by the client of the user.
     * @return Locale.
     */
    public Locale getLocale();
   /**
    * The time zone used by the client of the user.    
    * @return TimeZone.
    */
    public TimeZone getTimeZone();

   /**
    * The name of the user.
    * @return name of the user.
    */
    public String getName();
}

ErrorBean interface for error handling

The JSF components exploit a predefined managed bean, BPCError, for error handling. This bean implements the com.ibm.bpc.clientcore.util.ErrorBean interface. In error situations that trigger the error page, the exception is set on the error bean. The error page is displayed in the following situations:
  • If an error occurs during the execution of a query that is defined for a list handler, and the error is generated as a ClientException error by the execute method of a command
  • If a ClientException error is generated by the execute method of a command and this error is not an ErrorsInCommandException error nor does it implement the CommandBarMessage interface
  • If an error message is displayed in the component, and you follow the hyperlink for the message

A default implementation of the com.ibm.bpc.clientcore.util.ErrorBeanImpl interface is available.

The interface is defined as follows:
public interface ErrorBean {

    public void setException(Exception ex);
    
    /*
     * This setter method call allows a locale and 
     * the exception to be passed. This allows the 
     * getExceptionMessage methods to return localized Strings
     *
     */
    public void setException(Exception ex, Locale locale);
    
    public Exception getException();
    public String getStack();
    public String getNestedExceptionMessage();
    public String getNestedExceptionStack();
    public String getRootExceptionMessage();
    public String getRootExceptionStack();
    
    /*
     * This method returns the exception message 
     * concatenated recursively with the messages of all 
     * the nested exceptions.
     */
    public String getAllExceptionMessages();
    
    /*
     * This method is returns the exception stack 
     * concatenated recursively with the stacks of all 
     * the nested exceptions.
     */
    public String getAllExceptionStacks();
}

(c) Copyright IBM Corporation 2005, 2006.
This information center is powered by Eclipse technology (http://www.eclipse.org)