org.enhydra.shark.corba.poa
Class WfResourceHelper

java.lang.Object
  extended by org.enhydra.shark.corba.poa.WfResourceHelper
All Implemented Interfaces:
java.io.Serializable, BaseBusinessObject, WfResource

public class WfResourceHelper
extends java.lang.Object
implements WfResource

WfResourceHelper - Helper class to be able to implement method WfAssignment.set_assignee(). Only required method to be implemented is resource_key().

Author:
David Forslund
See Also:
Serialized Form

Constructor Summary
protected WfResourceHelper(java.lang.String username)
          Creates a new WfResource
 
Method Summary
 boolean equals(java.lang.Object obj)
          It is assumed that there can't be two or more resources having the same resource key.
 WfAssignmentIterator get_iterator_work_item()
          Gets an iterator of work items.
 WfAssignment[] get_sequence_work_item(int max_number)
          Gets the work items.
 int how_many_work_item()
          Gets the number of work items currently assigned to this resource.
 boolean is_member_of_work_items(WfAssignment member)
          Checks if an assignment object is associated with this resource
 void release(WfAssignment from_assigment, java.lang.String release_info)
          Release the resouce from the assignment.
 java.lang.String resource_key()
          Gets the resource username.
 java.lang.String resource_name()
          Gets the resource name.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WfResourceHelper

protected WfResourceHelper(java.lang.String username)
Creates a new WfResource

Parameters:
username - - Uniquely identifies the resource
Method Detail

how_many_work_item

public int how_many_work_item()
                       throws BaseException
Gets the number of work items currently assigned to this resource.

Specified by:
how_many_work_item in interface WfResource
Throws:
BaseException

get_iterator_work_item

public WfAssignmentIterator get_iterator_work_item()
                                            throws BaseException
Gets an iterator of work items.

Specified by:
get_iterator_work_item in interface WfResource
Throws:
BaseException

get_sequence_work_item

public WfAssignment[] get_sequence_work_item(int max_number)
                                      throws BaseException
Gets the work items.

Specified by:
get_sequence_work_item in interface WfResource
Returns:
List of WfAssignment objects.
Throws:
BaseException

is_member_of_work_items

public boolean is_member_of_work_items(WfAssignment member)
                                throws BaseException
Checks if an assignment object is associated with this resource

Specified by:
is_member_of_work_items in interface WfResource
Returns:
true if assignment is part of the work list for this resource.
Throws:
BaseException

resource_key

public java.lang.String resource_key()
                              throws BaseException
Gets the resource username.

Specified by:
resource_key in interface WfResource
Throws:
BaseException

resource_name

public java.lang.String resource_name()
                               throws BaseException
Gets the resource name.

Specified by:
resource_name in interface WfResource
Throws:
BaseException

release

public void release(WfAssignment from_assigment,
                    java.lang.String release_info)
             throws BaseException,
                    NotAssigned
Release the resouce from the assignment.

Specified by:
release in interface WfResource
Throws:
BaseException
NotAssigned

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
It is assumed that there can't be two or more resources having the same resource key.

Overrides:
equals in class java.lang.Object