WebLogic Process Integrator Version 1.1

com.bea.wlpi.client.worklist
Class WorklistPane

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JRootPane
                          |
                          +--com.bea.wlpi.client.worklist.WorklistPane

public class WorklistPane
extends javax.swing.JRootPane
implements java.awt.event.ActionListener, javax.swing.event.ChangeListener, javax.jms.MessageListener

A WebLogic Process Integrator Worklist. This component is designed to be embedded in third-party applications or applets.

See Also:
WorklistAddIn, WorklistApplet, WorklistFrame, loadProperties(), storeProperties(), Serialized Form

Inner classes inherited from class javax.swing.JRootPane
javax.swing.JRootPane.AccessibleJRootPane, javax.swing.JRootPane.RootLayout
 
Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Field Summary
protected static java.lang.String AUDIO_NOTIFICATION
           
protected static java.lang.String CMD_ABOUT
           
protected static java.lang.String CMD_ATTACHMENTS
           
protected static java.lang.String CMD_DONE
           
protected static java.lang.String CMD_EXECUTE
           
protected static java.lang.String CMD_EXIT
           
protected static java.lang.String CMD_INACTIVE
           
protected static java.lang.String CMD_LOGOFF
           
protected static java.lang.String CMD_LOGON
           
protected static java.lang.String CMD_LOGONMSG
           
protected static java.lang.String CMD_MARK_DONE
           
protected static java.lang.String CMD_OPTIONS
           
protected static java.lang.String CMD_ORG
           
protected static java.lang.String CMD_PASSWORD
           
protected static java.lang.String CMD_PENDING
           
protected static java.lang.String CMD_PROPERTIES
           
protected static java.lang.String CMD_REASSIGN
           
protected static java.lang.String CMD_REFRESH
           
protected static java.lang.String CMD_START
           
protected static java.lang.String CMD_STATUS
           
protected static java.lang.String CMD_TAKE
           
protected static java.lang.String CMD_UNMARK_DONE
           
static boolean debug
           
protected static java.lang.String DONE
           
protected static java.lang.String ERROR_MESSAGE
           
protected static java.lang.String H
           
protected static java.lang.String IMAGE_PATH
           
protected static java.lang.String INACTIVE
           
protected static java.lang.String JMS_FACTORY
           
protected static java.lang.String JNDI_FACTORY
           
protected static java.lang.String LOGON_MESSAGE
           
protected static java.lang.String LOOK_AND_FEEL
           
protected static java.lang.String MAX_LIST_ITEMS_PER_CALL
           
protected static java.lang.String MESSAGE_BUNDLE
           
protected static java.lang.String NEWLINE
           
protected static java.lang.String NOTIFICATION_THRESHOLD
           
protected static java.lang.String NOTIFY_TOPIC
           
protected static java.lang.String PENDING
           
protected  WLPIPrincipal principal
           
protected  java.util.Properties prop
           
protected static java.lang.String PROPERTIES_FILENAME
           
protected static java.lang.String PROPERTY_PREFIX
           
protected static java.lang.String RESOURCE_BUNDLE
           
protected static java.lang.String TASK_NOTIFICATION
           
protected static java.lang.String URL
           
protected static java.lang.String USERID
           
protected static java.lang.String W
           
protected static java.lang.String WARNING_MESSAGE
           
protected  WLPI wlpi
           
protected  Worklist worklist
           
protected static java.lang.String X
           
protected static java.lang.String Y
           
 
Fields inherited from class javax.swing.JRootPane
contentPane, defaultButton, defaultPressAction, defaultReleaseAction, glassPane, layeredPane, menuBar
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
WorklistPane()
          Create a new worklist.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
          Internal use only.
 void addActionListener(java.awt.event.ActionListener listener)
          Add an ActionListener to the worklist.
 void destroy()
          Destroy the worklist.
protected static char getChar(java.lang.String key)
          Get a localized character from the worklist's resource bundle.
 java.awt.Point getPreferredLocation()
          Return the preferred location of the worklist's container.
 java.awt.Dimension getPreferredSize()
          Internal use only.
protected  java.lang.String getSelectedOrg()
          Return the ID of the current organization.
protected  TaskInfo getSelectedTask()
          Return the currently selected task.
protected  InstanceInfo getSelectedWorkflow()
          Return the workflow instance for the currently selected task.
protected static java.lang.String getString(java.lang.String key)
          Get a localized string from the worklist's resource bundle.
protected static java.lang.String getString(java.lang.String key, java.lang.Object[] args)
          Get a localized message from the worklist's resource bundle, formatted with the supplied arguments.
 void init()
          Initialize the worklist.
protected  void loadProperties()
          Load previously stored properties.
protected  void logoff()
          Disconnect from WebLogic Process Integrator.
protected  boolean logon(java.lang.String url, java.lang.String userId, java.lang.String password)
          Logon to WebLogic Process Integrator.
 void onMessage(javax.jms.Message msg)
          Process a "task assigned" notification received via a JMS topic.
 void removeActionListener(java.awt.event.ActionListener listener)
          Remove a previously registered ActionListener.
 void setPreferredLocation(java.awt.Point p)
          Inform the worklist of the preferred start-up location for the worklist's container.
 void start()
          Start the worklist.
 void start(java.lang.String url, java.lang.String userId, java.lang.String password)
          Start the worklist.
 void stateChanged(javax.swing.event.ChangeEvent e)
          Called when the user changes the active tasklist by clicking the tab control.
 void stop()
          Stop the worklist.
protected  void storeProperties()
          Store current properties.
 
Methods inherited from class javax.swing.JRootPane
addImpl, addNotify, createContentPane, createGlassPane, createLayeredPane, createRootLayout, findComponentAt, getAccessibleContext, getContentPane, getDefaultButton, getGlassPane, getJMenuBar, getLayeredPane, getMenuBar, isFocusCycleRoot, isValidateRoot, paramString, removeNotify, setContentPane, setDefaultButton, setGlassPane, setJMenuBar, setLayeredPane, setMenuBar
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInsets, getInsets, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getUIClassID, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, isDoubleBuffered, isFocusTraversable, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, processComponentKeyEvent, processFocusEvent, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVisible, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setCursor, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hide, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

JNDI_FACTORY

protected static final java.lang.String JNDI_FACTORY

JMS_FACTORY

protected static final java.lang.String JMS_FACTORY

NOTIFY_TOPIC

protected static final java.lang.String NOTIFY_TOPIC

MESSAGE_BUNDLE

protected static final java.lang.String MESSAGE_BUNDLE

WARNING_MESSAGE

protected static final java.lang.String WARNING_MESSAGE

ERROR_MESSAGE

protected static final java.lang.String ERROR_MESSAGE

RESOURCE_BUNDLE

protected static final java.lang.String RESOURCE_BUNDLE

IMAGE_PATH

protected static final java.lang.String IMAGE_PATH

PROPERTIES_FILENAME

protected static final java.lang.String PROPERTIES_FILENAME

PROPERTY_PREFIX

protected static final java.lang.String PROPERTY_PREFIX

LOOK_AND_FEEL

protected static final java.lang.String LOOK_AND_FEEL

LOGON_MESSAGE

protected static final java.lang.String LOGON_MESSAGE

TASK_NOTIFICATION

protected static final java.lang.String TASK_NOTIFICATION

AUDIO_NOTIFICATION

protected static final java.lang.String AUDIO_NOTIFICATION

NOTIFICATION_THRESHOLD

protected static final java.lang.String NOTIFICATION_THRESHOLD

MAX_LIST_ITEMS_PER_CALL

protected static final java.lang.String MAX_LIST_ITEMS_PER_CALL

URL

protected static final java.lang.String URL

USERID

protected static final java.lang.String USERID

X

protected static final java.lang.String X

Y

protected static final java.lang.String Y

W

protected static final java.lang.String W

H

protected static final java.lang.String H

PENDING

protected static final java.lang.String PENDING

DONE

protected static final java.lang.String DONE

INACTIVE

protected static final java.lang.String INACTIVE

NEWLINE

protected static final java.lang.String NEWLINE

CMD_ORG

protected static final java.lang.String CMD_ORG

CMD_EXECUTE

protected static final java.lang.String CMD_EXECUTE

CMD_MARK_DONE

protected static final java.lang.String CMD_MARK_DONE

CMD_UNMARK_DONE

protected static final java.lang.String CMD_UNMARK_DONE

CMD_TAKE

protected static final java.lang.String CMD_TAKE

CMD_REASSIGN

protected static final java.lang.String CMD_REASSIGN

CMD_ATTACHMENTS

protected static final java.lang.String CMD_ATTACHMENTS

CMD_STATUS

protected static final java.lang.String CMD_STATUS

CMD_PROPERTIES

protected static final java.lang.String CMD_PROPERTIES

CMD_LOGON

protected static final java.lang.String CMD_LOGON

CMD_LOGOFF

protected static final java.lang.String CMD_LOGOFF

CMD_EXIT

protected static final java.lang.String CMD_EXIT

CMD_REFRESH

protected static final java.lang.String CMD_REFRESH

CMD_PENDING

protected static final java.lang.String CMD_PENDING

CMD_DONE

protected static final java.lang.String CMD_DONE

CMD_INACTIVE

protected static final java.lang.String CMD_INACTIVE

CMD_OPTIONS

protected static final java.lang.String CMD_OPTIONS

CMD_LOGONMSG

protected static final java.lang.String CMD_LOGONMSG

CMD_START

protected static final java.lang.String CMD_START

CMD_PASSWORD

protected static final java.lang.String CMD_PASSWORD

CMD_ABOUT

protected static final java.lang.String CMD_ABOUT

debug

public static boolean debug

wlpi

protected WLPI wlpi

principal

protected WLPIPrincipal principal

worklist

protected Worklist worklist

prop

protected java.util.Properties prop
Constructor Detail

WorklistPane

public WorklistPane()
             throws WorkflowException
Create a new worklist.
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
Internal use only.
Specified by:
actionPerformed in interface java.awt.event.ActionListener

addActionListener

public void addActionListener(java.awt.event.ActionListener listener)
Add an ActionListener to the worklist. The listener will be notified of all menu commands executed by the user.
Parameters:
listener - The ActionListener to add.
See Also:
removeActionListener(java.awt.event.ActionListener)

removeActionListener

public void removeActionListener(java.awt.event.ActionListener listener)
Remove a previously registered ActionListener.
Parameters:
listener - The ActionListener to remove.
See Also:
addActionListener(java.awt.event.ActionListener)

init

public void init()
Initialize the worklist. Called by the WorklistApplet.init() method.
See Also:
destroy()

start

public void start(java.lang.String url,
                  java.lang.String userId,
                  java.lang.String password)
Start the worklist. The implementation attempts to connect using the specified URL, user ID and password by calling logon(java.lang.String, java.lang.String, java.lang.String).
Parameters:
url - The WebLogic Process Integrator server URL.
userId - WebLogic Process Integrator user ID.
password - Password for userId.
See Also:
start()

start

public void start()
Start the worklist. Called by the WorklistApplet.start() method. The implementation attempts to connect to the workflow server by calling start(String, String, String). When running in an applet, the method uses the applet codebase to generate the server URL and takes the user ID from the value of the system property user.name. Otherwise, the method passes the previously persisted values for URL and user ID.
See Also:
start(String, String, String), stop(), storeProperties()

stop

public void stop()
Stop the worklist. Called by the WorklistApplet.stop() method. The implementation closes the connection to the workflow server by calling logoff().
See Also:
start(), storeProperties()

destroy

public void destroy()
Destroy the worklist. Called by the WorklistApplet.destroy() method. The implementation stores user preferences in the local file worklist.properties.
See Also:
start()

getPreferredSize

public java.awt.Dimension getPreferredSize()
Internal use only.
Overrides:
getPreferredSize in class javax.swing.JComponent

getPreferredLocation

public java.awt.Point getPreferredLocation()
Return the preferred location of the worklist's container.
Returns:
The preferred location of the worklist's container.
See Also:
setPreferredLocation(java.awt.Point)

onMessage

public void onMessage(javax.jms.Message msg)
Process a "task assigned" notification received via a JMS topic. The server broadcasts a notification whenever a task is assigned to a user. If the user has enabled task notification (via the preferences dialog), the implementation presents a message box to inform the user that a task has been assigned to them. This dialog box will only be displayed if the user-specified interval between successive notifications has elapsed.
Specified by:
onMessage in interface javax.jms.MessageListener

stateChanged

public void stateChanged(javax.swing.event.ChangeEvent e)
Called when the user changes the active tasklist by clicking the tab control.
Specified by:
stateChanged in interface javax.swing.event.ChangeListener
Parameters:
e - Event describing the tab that is now selected.

setPreferredLocation

public void setPreferredLocation(java.awt.Point p)
Inform the worklist of the preferred start-up location for the worklist's container. This location is persisted by storeProperties() and will be returned by subsequent calls to getPreferredLocation().

getChar

protected static char getChar(java.lang.String key)
Get a localized character from the worklist's resource bundle.
Parameters:
key - Resource key.
Returns:
resource character matching the specified key.

getString

protected static java.lang.String getString(java.lang.String key)
Get a localized string from the worklist's resource bundle.
Parameters:
key - Resource key.
Returns:
resource string matching the specified key.

getString

protected static java.lang.String getString(java.lang.String key,
                                            java.lang.Object[] args)
Get a localized message from the worklist's resource bundle, formatted with the supplied arguments.
Parameters:
key - resource key.
args - arguments to be inserted into message text.
Returns:
formatted message string matching the specified key.

loadProperties

protected void loadProperties()
Load previously stored properties. The implementation loads from the file 'worklist.properties' in the default directory. Subclasses can override to provide alternative storage for user preferences.
See Also:
storeProperties()

storeProperties

protected void storeProperties()
Store current properties. The implementation persists user preferences to the file worklist.properties, located in the user's home directory (i.e., the directory indicated by the system property user.home. Subclasses can override to provide alternative storage for user preferences. The worklist recognizes the following settings:

Property Default Description
jndi.factory weblogic.jndi.WLInitialContextFactory Fully qualified class name of JNDI initial context factory.
jms.factory javax.jms.TopicConnectionFactory JNDI name of JMS topic factory.
logon.message true Whether to display a summary message at logon.
look.and.feel javax.swing.plaf.metal.MetalLookAndFeel Fully qualified class name of look and feel to use.
notify.topic com.bea.wlpi.NotifyTopic JNDI name of JMS topic for task update notification broadcasts.
tasklist.column.count 8 Number of columns in workflow status list.
tasklist.column.header.n Status, Name, Assignee, DueDate, Started, Completed, Priority, Comment Heading for nth workflow status column.
tasklist.column.identifier.n Status, Name, Assignee, DueDate, Started, Completed, Priority, Comment Identifier of nth workflow status column.
tasklist.column.width.n - Width of nth workflow status column.
tasklist.w 600 Width of workflow status window.
tasklist.h 300 Height of workflow status window.
tasklist.x 40 X-position of workflow status window.
tasklist.y 40 Y-position of workflow status window.
url t3\://localhost\:7001 Server URL of last successful connection.
userid System.getProperty("user.name") User ID for last successful connection.
worklist.column.count 8 Number of columns in worklist.
worklist.column.header.n Status, Name, Workflow, WorkflowId, DueDate, Started, Priority, Comment Heading for nth worklist column.
worklist.column.identifier.n Status, Name, Workflow, WorkflowId, DueDate, Started, Priority, Comment Identifier of nth worklist column.
worklist.column.width.n - Width of nth worklist column.
worklist.done false Whether to display completed tasks.
worklist.inactive false Whether to display inactive tasks.
worklist.pending true Whether to display pending tasks.
worklist.sort.ascending false Whether to sort the worklist in ascending order.
worklist.sort.column -1 Column number on which to sort the worklist.
worklist.w 640 Width of worklist window.
worklist.h 300 Height of worklist window.
worklist.x 0 X-position of worklist window.
worklist.y 0 Y-position of worklist window.

See Also:
loadProperties()

getSelectedOrg

protected java.lang.String getSelectedOrg()
Return the ID of the current organization.
Returns:
The ID of the current organization.

getSelectedTask

protected final TaskInfo getSelectedTask()
Return the currently selected task.
Returns:
The currently selected task (if any).

getSelectedWorkflow

protected final InstanceInfo getSelectedWorkflow()
Return the workflow instance for the currently selected task.
Returns:
The workflow instance to which the currently selected task (if any) belongs.

logon

protected boolean logon(java.lang.String url,
                        java.lang.String userId,
                        java.lang.String password)
                 throws javax.ejb.CreateException,
                        java.rmi.RemoteException,
                        WorkflowException
Logon to WebLogic Process Integrator. The implementation attempts to connect using the supplied parameters, by calling the WLPI.connect() method. If successful, the method builds and displays worklists for the specified userId, and all roles to which that user belongs. It also populates the 'organizations' combo-box with all the organizations to which that user belongs. The method then connects to the JMS notification topic (default JNDI name com.bea.wlpi.NotifyTopic) in order to receive task notification messages.
Parameters:
url - The URL of a WebLogic Process Integrator server.
userId - The User ID with which to connect.
password - Security credentials.
Throws:
javax.ejb.CreateException - If remote EJB references could not be created.
java.rmi.RemoteException - If a communications exception occurred.
WorkflowException - If any other exception occurred.
See Also:
logoff(), onMessage(javax.jms.Message)

logoff

protected void logoff()
Disconnect from WebLogic Process Integrator. This method closes all connections, clears all worklists, and disables most of the menu commands and toolbar buttons.
See Also:
logon(java.lang.String, java.lang.String, java.lang.String)

WebLogic Process Integrator Version 1.1

WebLogic and Process Integrator are trademarks of BEA Systems, Inc.
Copyright (c) 2000 BEA Systems, Inc., 8920 Woodbine Avenue, Suite 400,
Markham, Ontario L3R 9W9 Canada. All rights reserved.