01: /*
02: * This file is part of PFIXCORE.
03: *
04: * PFIXCORE is free software; you can redistribute it and/or modify
05: * it under the terms of the GNU Lesser General Public License as published by
06: * the Free Software Foundation; either version 2 of the License, or
07: * (at your option) any later version.
08: *
09: * PFIXCORE is distributed in the hope that it will be useful,
10: * but WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12: * GNU Lesser General Public License for more details.
13: *
14: * You should have received a copy of the GNU Lesser General Public License
15: * along with PFIXCORE; if not, write to the Free Software
16: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17: */
18:
19: package de.schlund.pfixcore.editor2.frontend.resources;
20:
21: import de.schlund.pfixcore.editor2.core.dom.Project;
22: import de.schlund.pfixcore.workflow.ContextResource;
23:
24: /**
25: * Context resource providing a list of all projects and methods to select a
26: * specific project.
27: *
28: * @author Sebastian Marsching <sebastian.marsching@1und1.de>
29: */
30: public interface ProjectsResource extends ContextResource {
31: /**
32: * Selects a project using the supplied name
33: *
34: * @param projectName
35: * Name of the project
36: * @return <code>true</code> if specified project was found and selected,
37: * <code>false</code> if an error occured during selection (e.g.
38: * project not found)
39: */
40: boolean selectProject(String projectName);
41:
42: /**
43: * Returns project that is selected
44: *
45: * @return Project object or <code>null</code> if no project is selected
46: */
47: Project getSelectedProject();
48:
49: /**
50: * Selects a project using the name of the corresponding
51: * {@link de.schlund.pfixxml.targets.TargetGenerator}.
52: *
53: * @param targetGenerator
54: * Name of the target generator
55: * @return <code>true</code> if specified project was found and selected,
56: * <code>false</code> if an error occured during selection (e.g.
57: * project not found)
58: */
59: boolean selectProjectByTargetGeneratorName(String targetGenerator);
60:
61: void reset();
62: }
|