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.artifact;
16  
17  import org.figure8.join.core.DuplicateEntityException;
18  import org.figure8.join.businessobjects.commons.Release;
19  import org.figure8.join.businessobjects.artifact.Build;
20  import org.figure8.join.businessobjects.artifact.Assembly;
21  
22  import java.util.Map;
23  import java.util.List;
24  /**
25   * This is a business facade interface for managing composite {@see Artifact}s.
26   * @author  <a href="mailto:laurent.broudoux@free.fr">Laurent Broudoux</a>
27   * @version $Revision: 1.2 $
28   */
29  public interface AssemblyManager{
30  
31     // Public -------------------------------------------------------------------
32  
33     /**
34      * Save a specified assembly (indeed a save or update method)
35      * @param assembly The assembly to save within datastore
36      * @param deliverables A list of deliverables composing the assembly to create
37      * @throws DuplicateEntityException if another assembly with same deliverables already exists
38      */
39     public abstract void saveAssembly(Assembly assembly, List deliverables) throws DuplicateEntityException;
40     
41     /**
42      * Retrieve all assemblies created for specified release
43      * @param release The release to get assemblies for
44      * @return A list of {@code org.figure8.join.businessobjects.artifact.Assembly} objects
45      */
46     public abstract List getAssemblies(Release release);
47     
48     /**
49      * Retrieve an Assembly using its unique key
50      * @param key The unique key of assembly to retrieve
51      * @return The corresponding assembly or null if no assembly has this key
52      */
53     public abstract Assembly getAssembly(String key);
54  
55     /**
56      * Save a Build for a specified release (indeed a save or update method)
57      * @param build The build to save within datastore
58      * @param components A list of Components composing the build to create
59      * @param extractedComponents A map representing components to extract from an assembly.
60      *    Key of map entry is a component type and value is the assembly to extract this component from.
61      * @throws DuplicateEntityException if another build with same component already exists
62      */
63     public abstract void saveBuild(Build build, List components, Map extractedComponents) throws DuplicateEntityException;
64     
65     /**
66      * Retrieve all builds created for specified release
67      * @param release The release to get builds for
68      * @return A list of {@code org.figure8.join.businessobjects.artifact.Build} objects
69      */
70     public abstract List getBuilds(Release release);
71     
72     /**
73      * Retrieve a Build using its unique key
74      * @param key The unique key of build to retrieve
75      * @return The corresponding build or null if no build has this key
76      */
77     public abstract Build getBuild(String key);
78  }