JavaServer Faces(JSF)组件提供了实用程序来处理特定于用户的时区信息以及错误。
BPCListHandler 类使用 com.ibm.bpc.clientcore.util.User 接口来获取每个用户的时区信息和语言环境信息。“列表”组件期望将此接口的实现中的 user 配置成 JavaServer Faces(JSF)配置文件中的受管 Bean 名称。如果配置文件未包含此条目,则将返回 WebSphere Process Server 使用的时区。
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(); }
com.ibm.bpc.clientcore.util.ErrorBeanImpl 接口提供了缺省实现。
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(); }