001: /*
002: * $Id: WfAssignment.java,v 1.1 2003/08/17 09:29:33 ajzeneski Exp $
003: *
004: * Copyright (c) 2001, 2002 The Open For Business Project - www.ofbiz.org
005: *
006: * Permission is hereby granted, free of charge, to any person obtaining a
007: * copy of this software and associated documentation files (the "Software"),
008: * to deal in the Software without restriction, including without limitation
009: * the rights to use, copy, modify, merge, publish, distribute, sublicense,
010: * and/or sell copies of the Software, and to permit persons to whom the
011: * Software is furnished to do so, subject to the following conditions:
012: *
013: * The above copyright notice and this permission notice shall be included
014: * in all copies or substantial portions of the Software.
015: *
016: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
017: * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
018: * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
019: * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
020: * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
021: * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
022: * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
023: *
024: */
025: package org.ofbiz.workflow;
026:
027: /**
028: * WfAssignment - Workflow Assignment Interface
029: *
030: * @author <a href="mailto:jaz@ofbiz.org">Andy Zeneski</a>
031: * @version $Revision: 1.1 $
032: * @since 2.0
033: */
034: public interface WfAssignment {
035:
036: /**
037: * Gets the activity object of this assignment.
038: * @return WfActivity The activity object of this assignment.
039: * @throws WfException
040: */
041: public WfActivity activity() throws WfException;
042:
043: /**
044: * Gets the assignee (resource) of this assignment.
045: * @return WfResource The assigned resource.
046: * @throws WfException
047: */
048: public WfResource assignee() throws WfException;
049:
050: /**
051: * Sets the assignee of this assignment.
052: * @param newValue The new assigned resource.
053: * @throws WfException
054: * @throws InvalidResource
055: */
056: public void setAssignee(WfResource newValue) throws WfException,
057: InvalidResource;
058:
059: /**
060: * Gets the from date of this assignment.
061: * @return Timestamp when this assignment first began.
062: * @throws WfException
063: */
064: public java.sql.Timestamp fromDate() throws WfException;
065:
066: /**
067: * Mark this assignment as accepted.
068: * @throws WfException
069: */
070: public void accept() throws WfException;
071:
072: /**
073: * Set the results of this assignment.
074: * @param Map The results of the assignement.
075: * @throws WfException
076: */
077: public void setResult(java.util.Map results) throws WfException;
078:
079: /**
080: * Mark this assignment as complete.
081: * @throws WfException
082: */
083: public void complete() throws WfException;
084:
085: /**
086: * Mark this assignment as delegated.
087: * @throws WfException
088: */
089: public void delegate() throws WfException;
090:
091: /**
092: * Change the status of this assignment.
093: * @param status The new status.
094: * @throws WfException
095: */
096: public void changeStatus(String status) throws WfException;
097:
098: /**
099: * Gets the status of this assignment.
100: * @return String status code for this assignment.
101: * @throws WfException
102: */
103: public String status() throws WfException;
104:
105: /**
106: * Removes the stored data for this object.
107: * @throws WfException
108: */
109: public void remove() throws WfException;
110:
111: } // interface WfAssignmentOperations
|