KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ofbiz > workflow > WfResource


1 /*
2  * $Id: WfResource.java 5462 2005-08-05 18:35:48Z jonesde $
3  *
4  * Copyright (c) 2001, 2002 The Open For Business Project - www.ofbiz.org
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a
7  * copy of this software and associated documentation files (the "Software"),
8  * to deal in the Software without restriction, including without limitation
9  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  * and/or sell copies of the Software, and to permit persons to whom the
11  * Software is furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included
14  * in all copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
21  * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
22  * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23  *
24  */

25 package org.ofbiz.workflow;
26
27 import java.util.Iterator JavaDoc;
28 import java.util.List JavaDoc;
29
30 /**
31  * WfResource - Workflow Resource Interface
32  *
33  * @author <a HREF="mailto:jaz@ofbiz.org">Andy Zeneski</a>
34  * @version $Rev: 5462 $
35  * @since 2.0
36  */

37 public interface WfResource {
38
39     /**
40      * Gets the number of work items
41      * @throws WfException
42      * @return Count of work items
43      */

44     public int howManyWorkItem() throws WfException;
45
46     /**
47      * Gets an iterator of work items
48      * @throws WfException
49      * @return Iterator of work items
50      */

51     public Iterator JavaDoc getIteratorWorkItem() throws WfException;
52
53     /**
54      * Gets the work items
55      * @param maxNumber
56      * @throws WfException
57      * @return List of WfAssignment objects.
58      */

59     public List JavaDoc getSequenceWorkItem(int maxNumber) throws WfException;
60
61     /**
62      * Checks if an assignment object is associated with this resource
63      * @param member The assignment object to check
64      * @throws WfException
65      * @return true if assignment is part of the work list
66      */

67     public boolean isMemberOfWorkItems(WfAssignment member) throws WfException;
68
69     /**
70      * Gets the resource key.
71      * @throws WfException
72      * @return String of the resouce key.
73      */

74     public String JavaDoc resourceKey() throws WfException;
75
76     /**
77      * Gets the resource name
78      * @throws WfException
79      * @return String of the resource name
80      */

81     public String JavaDoc resourceName() throws WfException;
82
83     /**
84      * Gets the role id of this resource
85      * @throws WfException
86      * @return String role id of this participant or null if none
87      */

88     public String JavaDoc resourceRoleId() throws WfException;
89
90     /**
91      * Gets the party id of this resource
92      * @throws WfException
93      * @return String party id of this participant or null if none
94      */

95     public String JavaDoc resourcePartyId() throws WfException;
96
97     /**
98      * Release the resouce from the assignement
99      * @param fromAssigment
100      * @param releaseInfo
101      * @throws WfException
102      * @throws NotAssigned
103      */

104     public void release(WfAssignment fromAssignment, String JavaDoc releaseInfo) throws WfException, NotAssigned;
105
106 } // interface WfResourceOperations
107
Popular Tags