01: /*
02: * This file is part of the WfMOpen project.
03: * Copyright (C) 2001-2006 Danet GmbH (www.danet.de), BU BTS.
04: * All rights reserved.
05: *
06: * This program is free software; you can redistribute it and/or modify
07: * it under the terms of the GNU General Public License as published by
08: * the Free Software Foundation; either version 2 of the License, or
09: * (at your option) any later version.
10: *
11: * This program is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14: * GNU General Public License for more details.
15: *
16: * You should have received a copy of the GNU General Public License
17: * along with this program; if not, write to the Free Software
18: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19: *
20: * $Id: ResourceAssignmentContext.java,v 1.3 2007/02/27 14:34:08 drmlipp Exp $
21: *
22: * $Log: ResourceAssignmentContext.java,v $
23: * Revision 1.3 2007/02/27 14:34:08 drmlipp
24: * Some refactoring to reduce cyclic dependencies.
25: *
26: * Revision 1.2 2006/10/15 19:29:51 mlipp
27: * Merged changes from 1.4.x up to 1.4ea3pre1.
28: *
29: * Revision 1.1.2.1 2006/10/14 21:34:05 mlipp
30: * Simplified resource assignment service implementation.
31: *
32: */
33: package de.danet.an.workflow.spis.rms;
34:
35: import java.io.Serializable;
36: import java.rmi.RemoteException;
37: import java.util.Collection;
38:
39: import de.danet.an.workflow.api.NoSuchResourceException;
40: import de.danet.an.workflow.omgcore.WfAssignment;
41: import de.danet.an.workflow.omgcore.WfResource;
42:
43: /**
44: * This interface defines the callbacks that are needed by
45: * <code>DefaultResource</code> to obtain information from the server.
46: *
47: * @author Michael Lipp
48: *
49: */
50: public interface ResourceAssignmentContext extends Serializable {
51:
52: /**
53: * Return the assignments of a given resource.
54: *
55: * @param resource the resource.
56: * @return the collection of assigned work items (instances of
57: * {@link de.danet.an.workflow.omgcore.WfAssignment
58: * <code>WfAssignment</code>}).
59: * @throws RemoteException if a system-level error occurs.
60: * @throws NoSuchResourceException if the resource is invalid.
61: * As the environment is a concurrent multi user environment,
62: * <code>WfResource</code> objects may become invalid.
63: */
64: Collection workItems(WfResource resource) throws RemoteException,
65: NoSuchResourceException;
66:
67: /**
68: * Find out if a given assignment belongs to the work items assigned to
69: * a particular resource.
70: *
71: * @param resource the resource.
72: * @param assignment the assignment in question.
73: * @return <code>true</code> if the <code>assignment</code> belongs to
74: * the work items of the <code>resource</code>.
75: * @throws RemoteException if a system-level error occurs.
76: * @throws NoSuchResourceException if the resource is invalid.
77: * As the environment is a concurrent multi user environment,
78: * <code>WfResource</code> objects may become invalid.
79: */
80: boolean isMemberOfWorkItems(WfResource resource,
81: WfAssignment assignment) throws RemoteException,
82: NoSuchResourceException;
83: }
|