01: /*
02: * This file or a portion of this file is licensed under the terms of
03: * the Globus Toolkit Public License, found in file GTPL, or at
04: * http://www.globus.org/toolkit/download/license.html. This notice must
05: * appear in redistributions of this file, with or without modification.
06: *
07: * Redistributions of this Software, with or without modification, must
08: * reproduce the GTPL in: (1) the Software, or (2) the Documentation or
09: * some other similar material which is provided with the Software (if
10: * any).
11: *
12: * Copyright 1999-2004 University of Chicago and The University of
13: * Southern California. All rights reserved.
14: */
15:
16: package org.griphyn.common.catalog;
17:
18: import org.griphyn.common.catalog.work.WorkCatalogException;
19:
20: /**
21: *
22: * The catalog interface to the Work Catalog, the erstwhile Work DB, that is
23: * populated by tailstatd and associates.
24: *
25: * @author Karan Vahi
26: * @version $Revision$
27: */
28: public interface WorkCatalog extends Catalog {
29:
30: /**
31: * Prefix for the property subset to use with this catalog.
32: */
33: public static final String c_prefix = "pegasus.catalog.work";
34:
35: /**
36: * The DB Driver properties prefix.
37: */
38: public static final String DB_PREFIX = "pegasus.catalog.work.db";
39:
40: /**
41: * The version of the API
42: */
43: public static final String VERSION = "1.0";
44:
45: /**
46: * Inserts a new mapping into the work catalog.
47: *
48: * @param basedir the base directory
49: * @param vogroup the vo to which the user belongs to.
50: * @param label the label in the DAX
51: * @param run the run number.
52: * @param creator the user who is running.
53: * @param cTime the creation time of the DAX
54: * @param mTime the modification time.
55: * @param state the state of the workflow
56: *
57: *
58: * @return number of insertions, should always be 1. On failure,
59: * throw an exception, don't use zero.
60: *
61: *
62: * @throws WorkCatalogException in case of unable to delete entry.
63: */
64: public int insert(String basedir, String vogroup, String label,
65: String run, String creator, java.util.Date cTime,
66: java.util.Date mTime, int state)
67: throws WorkCatalogException;
68:
69: /**
70: * Deletes a mapping from the work catalog.
71: *
72: * @param basedir the base directory
73: * @param vogroup the vo to which the user belongs to.
74: * @param label the label in the DAX
75: * @param run the run number.
76: *
77: * @return number of insertions, should always be 1. On failure,
78: * throw an exception, don't use zero.
79: *
80: * @throws WorkCatalogException in case of unable to delete entry.
81: */
82: public int delete(String basedir, String vogroup, String label,
83: String run) throws WorkCatalogException;
84:
85: }
|