Business Process Choreographer 탐색기 JSF 구성요소 제공 유틸리티

JSF(JavaServer Faces) 구성요소는 사용자 특정 시간대 정보와 오류 핸들링을 위한 유틸리티를 제공합니다.

사용자 특정 시간대 정보

BPCListHandler 클래스는 com.ibm.bpc.clientcore.util.User 인터페이스를 사용하여 각 사용자의 시간대와 로케일 정보를 가져옵니다. 목록 구성요소는 JSF(JavaServer Faces) 구성 파일에서 관리 Bean 이름 user로 구성된 인터페이스의 구현을 기대합니다. 이 항목이 구성 파일에서 누락된 경우, WebSphere Process Server가 실행되는 시간대가 리턴됩니다.

com.ibm.bpc.clientcore.util.User 인터페이스가 다음과 같이 정의됩니다.
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 인터페이스

JSF 구성요소는 오류 핸들링을 위해 미리 정의된 관리 bean인 BPCError를 사용합니다. 이 Bean은 com.ibm.bpc.clientcore.util.ErrorBean 인터페이스를 구현합니다. 오류 페이지를 트리거하는 오류 상황에서 예외는 오류 Bean에 설정됩니다. 오류 페이지는 다음 상황에서 표시됩니다.
  • 목록 핸들러에 대해 정의된 조회를 실행하는 중에 오류가 생성되고, 이 오류가 명령의 execute 메소드에 의한 ClientException 오류인 경우
  • 명령의 execute 메소드에 의해 ClientException 오류가 생성되고 이 오류가 ErrorsInCommandException 오류가 아니거나 CommandBarMessage 인터페이스를 구현하는 오류가 아닌 경우
  • 오류 메시지가 구성요소에 표시되고 메시지의 하이퍼링크를 따라가는 경우

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();
}

ⓒ Copyright IBM Corporation 2005, 2006.
이 Information Center는 Eclipse 기술을 기반으로 합니다. (http://www.eclipse.org)