View Javadoc

1   /**
2    * Copyright 2005-2006 the original author or authors.
3    *
4    * Licensed under the Gnu General Pubic License, Version 2.0 (the
5    * "License"); you may not use this file except in compliance with
6    * the License. You may obtain a copy of the License at
7    *
8    *      http://www.opensource.org/licenses/gpl-license.php
9    *
10   * This program is distributed in the hope that it will be useful,
11   * but WITHOUT ANY WARRANTY; without even the implied warranty of
12   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13   * See the Gnu General Public License for more details.
14   */
15  package org.figure8.join.businessfacades.commons;
16  
17  import org.figure8.join.core.DuplicateEntityException;
18  import org.figure8.join.businessobjects.commons.Step;
19  import org.figure8.join.businessobjects.commons.Status;
20  import org.figure8.join.businessobjects.commons.Target;
21  import org.figure8.join.businessobjects.commons.Release;
22  
23  import java.util.List;
24  /**
25   * This is a service interface providing methods for managing the process
26   * lifecycle supported by the Join instance running the software project
27   * integration.<br/>
28   * Implementation of this methods should define how process steps, roadmap
29   * releases, deployment targets and so on are created, updated and retrieved.
30   * @author <a href="mailto:laurent.broudoux@free.fr">Laurent Broudoux</a>
31   * @version $Revision: 1.1 $
32   */
33  public interface IntegrationProcessManager{
34  
35     // Public -------------------------------------------------------------------
36  
37     /**
38      * Save a status within datastore.
39      * @param status The status to save (create or update)
40      * @throws DuplicateEntityException if another status with same name already exists
41      */
42     public abstract void saveStatus(Status status) throws DuplicateEntityException;
43     
44     /**
45      * Retrieve the available status defining the integration process.
46      * @return A List of {@code org.figure8.join.businessobjects.commons.Status}
47      */
48     public abstract List getStatus();
49     
50     /**
51      * Retrieve the available status for the specified integration process
52      * @param type The type of process to retrieve status for
53      * @return A List of {@code org.figure8.join.businessobjects.commons.Status}
54      */
55     public abstract List getStatusForType(String type);
56  
57     /**
58      * Retrieve a Status of integration process using its datastore id
59      * @param id The datastore identifier of step to retrieve
60      * @return The corresponding step of null is no step has this id
61      */
62     public abstract Status getStatus(long id);
63  
64     /**
65      * Retrieve a Status of integration process using its key
66      * @param key The key of status to retrieve
67      * @return The corresponding status or null if no step has this key
68      */
69     public abstract Status getStatus(String key);
70     
71     /**
72      * Save a step within datastore.
73      * @param step The step to save (create or update)
74      */
75     public abstract void saveStep(Step step);
76  
77     /**
78      * Retrieve the available steps defining the integration process.
79      * @return A List of {@code org.figure8.join.businessobjects.commons.Step}
80      */
81     public abstract List getSteps();
82  
83     /**
84      * Retrieve a Step of integration process using its datastore id
85      * @param id The datastore identifier of step to retrieve
86      * @return The corresponding step of null is no step has this id
87      */
88     public abstract Step getStep(long id);
89  
90     /**
91      * Retrieve a Step of integration process using its label
92      * @param label The label of step to retrieve
93      * @return The corresponding step or null if no step has this label
94      */
95     public abstract Step getStep(String label);
96  
97     /**
98      * Save a deployment target within datastore.
99      * @param target The target to save (create or update)
100     * @throws DuplicateEntityException if another target with same name already exists
101     */
102    public abstract void saveTarget(Target target) throws DuplicateEntityException;
103 
104    /**
105     * Retrieve the deployment targets defining the deployment options for software.
106     * @return A List of {@code org.figure8.join.businessobjects.commons.Target}
107     */
108    public abstract List getTargets();
109 
110    /**
111     * Retrieve the deployment target having the specified name.
112     * @param name The name of the deployment target to retrieve
113     * @return The corresponding target or null is no target has this name
114     */
115    public abstract Target getTarget(String name);
116 
117    /**
118     * Save a release within datastore. The major and minor numbers pair should be
119     * unique otherwise a DuplicateEntityException is thrown by persistence layer.
120     * @param release The release to save (create or update)
121     * @throws DuplicateEntityException if another release with same major and minor already exists
122     */
123    public abstract void saveRelease(Release release) throws DuplicateEntityException;
124 
125    /**
126     * Retrieve the available releases of software project managed by Join.
127     * @return A List of {@code org.figure8.join.businessobjects.commons.Release}
128     */
129    public abstract List getReleases();
130 
131    /**
132     * Retrieve a Release of software project using its name
133     * @param name The name of release to retrieve
134     * @return The corresponding release or null if no release has this name
135     */
136    public abstract Release getRelease(String name);
137 }