01: /*
02: * @(#)IProblemManager.java
03: *
04: * Copyright (C) 2002-2003 Matt Albrecht
05: * groboclown@users.sourceforge.net
06: * http://groboutils.sourceforge.net
07: *
08: * Part of the GroboUtils package at:
09: * http://groboutils.sourceforge.net
10: *
11: * Permission is hereby granted, free of charge, to any person obtaining a
12: * copy of this software and associated documentation files (the "Software"),
13: * to deal in the Software without restriction, including without limitation
14: * the rights to use, copy, modify, merge, publish, distribute, sublicense,
15: * and/or sell copies of the Software, and to permit persons to whom the
16: * Software is furnished to do so, subject to the following conditions:
17: *
18: * The above copyright notice and this permission notice shall be included in
19: * all copies or substantial portions of the Software.
20: *
21: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
24: * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26: * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
27: * DEALINGS IN THE SOFTWARE.
28: */
29: package net.sourceforge.groboutils.pmti.v1;
30:
31: /**
32: * The master class (generally a facade) responsible for interfacing the
33: * programmer with the Problem Management Tracker, implementing not only the
34: * query and change elements, but also enforcing the workflow logic associated
35: * with the underlying tracker.
36: *
37: * @author Matt Albrecht <a href="mailto:groboclown@users.sourceforge.net">groboclown@users.sourceforge.net</a>
38: * @version $Date: 2003/02/10 22:51:54 $
39: * @since July 7, 2002
40: */
41: public interface IProblemManager {
42:
43: /**
44: * Returns a list of all issue IDs known by the PMT. This may be an
45: * extremely expensive operation, depending on the size of the underlying
46: * system. This call must never return <tt>null</tt>. This should never
47: * return new issues that have not been comitted yet.
48: */
49: public String[] getIssueIDs() throws ProblemManagerException;
50:
51: /**
52: * Returns all issue IDs that match the given 'template'. A template is
53: * an issue where all <tt>null</tt> values are considered 'wildcards',
54: * so that a <tt>null</tt> state, for instance, would match for any
55: * state object. May change the template in the future to a different
56: * but similar type to allow for regular-expressions.
57: */
58: public String[] getIssueIDsForTemplate(IIssue issue)
59: throws ProblemManagerException;
60:
61: /**
62: * Returns the issue associated with the given unique issue ID. If no such
63: * issue exists, then <tt>null</tt> is returned. Note that the returned
64: * element is a non-editable version of the issue.
65: */
66: public IIssue getIssueByID(String id)
67: throws ProblemManagerException;
68:
69: /**
70: * Given the real issue, returns the editable version of the issue.
71: */
72: public IEditableIssue editIssue(IIssue issue)
73: throws ProblemManagerException;
74:
75: /**
76: * Creates a new issue of the given type. If <tt>type</tt> is
77: * <tt>null</tt>, then a new issue of the default issue type is
78: * created and returned.
79: */
80: public IEditableIssue createIssue(String type)
81: throws ProblemManagerException;
82:
83: /**
84: * Returns all meta-data for this problem management tracker.
85: */
86: public IProblemManagerInfo getProblemManagerInfo();
87: }
|