001: /*
002: * InProgressSubmission.java
003: *
004: * Version: $Revision: 1335 $
005: *
006: * Date: $Date: 2005-10-18 14:44:34 -0500 (Tue, 18 Oct 2005) $
007: *
008: * Copyright (c) 2002-2005, Hewlett-Packard Company and Massachusetts
009: * Institute of Technology. All rights reserved.
010: *
011: * Redistribution and use in source and binary forms, with or without
012: * modification, are permitted provided that the following conditions are
013: * met:
014: *
015: * - Redistributions of source code must retain the above copyright
016: * notice, this list of conditions and the following disclaimer.
017: *
018: * - Redistributions in binary form must reproduce the above copyright
019: * notice, this list of conditions and the following disclaimer in the
020: * documentation and/or other materials provided with the distribution.
021: *
022: * - Neither the name of the Hewlett-Packard Company nor the name of the
023: * Massachusetts Institute of Technology nor the names of their
024: * contributors may be used to endorse or promote products derived from
025: * this software without specific prior written permission.
026: *
027: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
028: * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
029: * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
030: * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
031: * HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
032: * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
033: * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
034: * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
035: * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
036: * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
037: * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
038: * DAMAGE.
039: */
040: package org.dspace.content;
041:
042: import java.io.IOException;
043: import java.sql.SQLException;
044:
045: import org.dspace.authorize.AuthorizeException;
046: import org.dspace.eperson.EPerson;
047:
048: /**
049: * Interface for manipulating in-progress submissions, without having to know at
050: * which stage of submission they are (in workspace or workflow system)
051: *
052: * @author Robert Tansley
053: * @version $Revision: 1335 $
054: */
055: public interface InProgressSubmission {
056: /**
057: * Get the internal ID of this submission
058: *
059: * @return the internal identifier
060: */
061: int getID();
062:
063: /**
064: * Deletes submission wrapper, doesn't delete item contents
065: */
066: void deleteWrapper() throws SQLException, IOException,
067: AuthorizeException;
068:
069: /**
070: * Update the submission, including the unarchived item.
071: */
072: void update() throws SQLException, IOException, AuthorizeException;
073:
074: /**
075: * Get the incomplete item object
076: *
077: * @return the item
078: */
079: Item getItem();
080:
081: /**
082: * Get the collection being submitted to
083: *
084: * @return the collection
085: */
086: Collection getCollection();
087:
088: /**
089: * Get the submitter
090: *
091: * @return the submitting e-person
092: */
093: EPerson getSubmitter() throws SQLException;
094:
095: /**
096: * Find out if the submission has (or is intended to have) more than one
097: * associated bitstream.
098: *
099: * @return <code>true</code> if there is to be more than one file.
100: */
101: boolean hasMultipleFiles();
102:
103: /**
104: * Indicate whether the submission is intended to have more than one file.
105: *
106: * @param b
107: * if <code>true</code>, submission may have more than one
108: * file.
109: */
110: void setMultipleFiles(boolean b);
111:
112: /**
113: * Find out if the submission has (or is intended to have) more than one
114: * title.
115: *
116: * @return <code>true</code> if there is to be more than one file.
117: */
118: boolean hasMultipleTitles();
119:
120: /**
121: * Indicate whether the submission is intended to have more than one title.
122: *
123: * @param b
124: * if <code>true</code>, submission may have more than one
125: * title.
126: */
127: void setMultipleTitles(boolean b);
128:
129: /**
130: * Find out if the submission has been published or publicly distributed
131: * before
132: *
133: * @return <code>true</code> if it has been published before
134: */
135: boolean isPublishedBefore();
136:
137: /**
138: * Indicate whether the submission has been published or publicly
139: * distributed before
140: *
141: * @param b
142: * <code>true</code> if it has been published before
143: */
144: void setPublishedBefore(boolean b);
145: }
|