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.businessobjects.environment.persistence;
16
17 import org.figure8.join.core.persistence.ObjectDao;
18 import org.figure8.join.businessobjects.environment.Deployment;
19 import org.figure8.join.businessobjects.environment.LogicalEnvironment;
20 import org.figure8.join.businessobjects.environment.PhysicalEnvironment;
21 import org.figure8.join.businessobjects.environment.EnvironmentMapping;
22
23 import java.util.List;
24 /**
25 * Data Access interface for Deployment business objects.
26 * @author <a href="mailto:laurent.broudoux@free.fr">Laurent Broudoux</a>
27 * @version $Revision: 1.2 $
28 */
29 public interface DeploymentDao extends ObjectDao{
30
31
32
33 /**
34 * Retrieve a deployment specified by its identifier
35 * @param id The unique identifier of deployment to retrieve
36 * @return The deployment corresponding to id or null if no deployment has this is
37 */
38 public abstract Deployment getDeployment(long id);
39
40 /**
41 * Retrieve the currently active deployment done using an EnvironmentMapping
42 * @param mapping The mapping to get last active deployment for
43 * @return The active deployment corresponding to mapping, or null if none.
44 */
45 public abstract Deployment getActiveDeploymentForMapping(EnvironmentMapping mapping);
46
47 /**
48 * Get all the deployments being realized at time of invocation
49 * @return A list of {@link Deployment}s
50 */
51 public abstract List getRealizingDeployments();
52
53 /**
54 * Get all the deployments being prepared at time of invocation
55 * @return A list of {@link Deployment}s
56 */
57 public abstract List getPreparingDeployments();
58
59 /**
60 * Get all the deployments having one of the specified status
61 * @param status A list of specified status
62 * @param includeNull Flag telling if deployment with no status should be included
63 * @return A list of {@link Deployment}s
64 */
65 public abstract List getDeploymentsHavingStatus(List status, boolean includeNull);
66
67 /**
68 * Retrieve all the deployments done for a specified logical environment
69 * @param logicalEnv The logical environment to get deployments for
70 * @return A list of {@link Deployment}s done for logical environment
71 */
72 public abstract List getDeploymentsByLogicalEnvironment(LogicalEnvironment logicalEnv);
73
74 /**
75 * Retrieve all the deployments done onto a specified physical environment
76 * @param physicalEnv The physical environment to get deployments for
77 * @return A list of {@link Deployment}s done onto this physical environemnt
78 */
79 public abstract List getDeploymentsByPhysicalEnvironment(PhysicalEnvironment physicalEnv);
80 }