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: package org.griphyn.vdl.dbschema;
16:
17: import java.sql.*;
18: import org.griphyn.vdl.workflow.*;
19:
20: /**
21: * This common schema interface defines the schemas in which the
22: * abstraction layers access the WF database. This layer is independent
23: * of the implementing database, and does so by going via the database
24: * driver class API.
25: *
26: * @author Jens-S. Vöckler
27: * @author Mike Wilde
28: * @version $Revision: 50 $
29: * @see org.griphyn.vdl.dbschema.DatabaseSchema
30: * @see org.griphyn.vdl.dbdriver
31: */
32: public interface WF extends Catalog {
33: /**
34: * Names the property key prefix employed for schemas dealing with the VDC.
35: */
36: public static final String PROPERTY_PREFIX = "vds.db.wf.schema";
37:
38: /**
39: * Determines the primary key of a workflow from the provided tuple
40: * of secondary keys, and instantiates the corresponding workflow.
41: *
42: * @param basedir is the base directory
43: * @param vogroup is the VO group identifier
44: * @param label is the workflow label
45: * @param run is the workflow run directory
46: * @return the workflow identifier, or -1 if not found.
47: */
48: public abstract WorkEntry getWorkflow(String basedir,
49: String vogroup, String label, String run)
50: throws SQLException;
51:
52: /**
53: * Returns a set of all workflows that are younger than a cut-off time.
54: * The result may be empty, if no matching workflows exist yet.
55: *
56: * @param mtime is the oldest permissable last modification time
57: * @return a map of workflows, indexed by their primary key
58: */
59: public abstract java.util.Map getWorkflows(java.util.Date mtime)
60: throws SQLException;
61: }
|