001: /*
002: * This file is part of the WfMOpen project.
003: * Copyright (C) 2001-2003 Danet GmbH (www.danet.de), GS-AN.
004: * All rights reserved.
005: *
006: * This program is free software; you can redistribute it and/or modify
007: * it under the terms of the GNU General Public License as published by
008: * the Free Software Foundation; either version 2 of the License, or
009: * (at your option) any later version.
010: *
011: * This program is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
014: * GNU General Public License for more details.
015: *
016: * You should have received a copy of the GNU General Public License
017: * along with this program; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
019: *
020: * $Id: RASInvocationHandler.java,v 1.1 2007/05/03 21:58:18 mlipp Exp $
021: *
022: * $Log: RASInvocationHandler.java,v $
023: * Revision 1.1 2007/05/03 21:58:18 mlipp
024: * Internal refactoring for making better use of local EJBs.
025: *
026: */
027: package de.danet.an.workflow.domain;
028:
029: import java.rmi.RemoteException;
030: import java.security.Principal;
031: import java.util.Collection;
032:
033: import de.danet.an.workflow.api.AlreadyAssignedException;
034: import de.danet.an.workflow.api.Participant;
035: import de.danet.an.workflow.omgcore.InvalidResourceException;
036: import de.danet.an.workflow.omgcore.NotAssignedException;
037: import de.danet.an.workflow.omgcore.WfActivity;
038: import de.danet.an.workflow.omgcore.WfAssignment;
039: import de.danet.an.workflow.omgcore.WfResource;
040: import de.danet.an.workflow.spis.ras.ActivityFinder;
041:
042: /**
043: * Invoking the resource assignment service involves interaction with
044: * the remoting layer that cannot be handled here. It is
045: * therefore delegated to the remoting layer by obtaining an object
046: * that implements this interface.
047: */
048: public interface RASInvocationHandler {
049:
050: /**
051: * @see de.danet.an.workflow.spis.ras.ResourceAssignmentService#autoAssignResources
052: */
053: Collection autoAssignResources(ActivityFinder finder, String actId,
054: WfActivity activity, Principal principal,
055: Participant participant);
056:
057: /**
058: * @see de.danet.an.workflow.spis.ras.ResourceAssignmentService#assignments
059: */
060: Collection assignments(ActivityFinder finder, String actId,
061: WfActivity activity);
062:
063: /**
064: * @see de.danet.an.workflow.spis.ras.ResourceAssignmentService#getResource
065: */
066: WfResource getResource(WfAssignment asnmnt);
067:
068: /**
069: * @see de.danet.an.workflow.spis.ras.ResourceAssignmentService#changeAssignment
070: */
071: void changeAssignment(ActivityFinder finder, String actId,
072: WfActivity activity, WfResource oldResource,
073: WfResource newResource) throws InvalidResourceException,
074: AlreadyAssignedException, NotAssignedException;
075:
076: /**
077: * @see de.danet.an.workflow.spis.ras.ResourceAssignmentService#removeAssignment
078: */
079: void removeAssignment(ActivityFinder finder, String actId,
080: WfActivity activity, WfResource resource)
081: throws InvalidResourceException, NotAssignedException;
082:
083: /**
084: * Retrieve the assignee from the given assignment.
085: *
086: * @param assignment the assignment.
087: * @return the assignee.
088: */
089: WfResource retrieveAssignee(WfAssignment assignment);
090:
091: /**
092: * Retrieve resource key from the given resource.
093: *
094: * @param resource the resource.
095: * @return the key.
096: */
097: String retrieveKey(WfResource resource);
098:
099: /**
100: * Retrieve resource name from the given resource.
101: *
102: * @param resource the resource.
103: * @return the name.
104: */
105: String retrieveName(WfResource resource);
106: }
|