KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > profileservice > spi > Profile


1 /*
2  * JBoss, Home of Professional Open Source
3  * Copyright 2005, JBoss Inc., and individual contributors as indicated
4  * by the @authors tag. See the copyright.txt in the distribution for a
5  * full listing of individual contributors.
6  *
7  * This is free software; you can redistribute it and/or modify it
8  * under the terms of the GNU Lesser General Public License as
9  * published by the Free Software Foundation; either version 2.1 of
10  * the License, or (at your option) any later version.
11  *
12  * This software is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this software; if not, write to the Free
19  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21  */

22 package org.jboss.profileservice.spi;
23
24 import java.util.Collection JavaDoc;
25 import java.util.Map JavaDoc;
26
27 import org.jboss.deployers.spi.structure.DeploymentContext;
28
29 /**
30  * A profile represents a named collection of deployments on a server
31  *
32  * @author Scott.Stark@jboss.org
33  * @version $Revision$
34  */

35 public interface Profile
36 {
37    /**
38     * The x.y.z version of the profile
39     *
40     * @return the version
41     */

42    String JavaDoc getVersion();
43
44    /**
45     * Get a deployment template.
46     *
47     * @param name - the deployment name to identify the template to retrieve
48     * @return the named DeploymentTemplate
49     * @throws NoSuchDeploymentException - if there is no such deployment
50     */

51    DeploymentTemplate getTemplate(String JavaDoc name) throws NoSuchDeploymentException;
52
53    /**
54     * Add a bootstrap
55     *
56     * @param d the bootstrap
57     */

58    void addBootstrap(DeploymentContext d);
59
60    /**
61     * Remove a bootstrap
62     *
63     * @param name the name
64     */

65    void removeBootstrap(String JavaDoc name);
66
67    /**
68     * Get a named bootstrap.
69     *
70     * @param name - the bootstrap name
71     * @return the named bootstrap
72     * @throws NoSuchDeploymentException - if there is no such bootstrap
73     */

74    DeploymentContext getBootstrap(String JavaDoc name) throws NoSuchDeploymentException;
75
76    /**
77     * Get all bootstraps defined in this profile
78     *
79     * @return the bootstrap instances in this profile.
80     */

81    Collection JavaDoc<DeploymentContext> getBootstraps();
82
83    /**
84     * Add a deployer
85     *
86     * @param d the deployer
87     */

88    void addDeployer(DeploymentContext d);
89
90    /**
91     * Remove a deployer
92     *
93     * @param name the name
94     */

95    void removeDeployer(String JavaDoc name);
96
97    /**
98     * Get a named deployer.
99     *
100     * @param name - the deployer name
101     * @return the named Deployer
102     * @throws NoSuchDeploymentException - if there is no such deployer
103     */

104    DeploymentContext getDeployer(String JavaDoc name) throws NoSuchDeploymentException;
105
106    /**
107     * Get all deployer defined in this profile
108     *
109     * @return the deployer instances in this profile.
110     */

111    Collection JavaDoc<DeploymentContext> getDeployers();
112
113    /**
114     * Add a deployment
115     *
116     * @param d the deployment
117     */

118    void addDeployment(DeploymentContext d);
119
120    /**
121     * Remove a deployment
122     *
123     * @param name the name
124     */

125    void removeDeployment(String JavaDoc name);
126
127    /**
128     * Get a named deployment.
129     *
130     * @param name - the deployment name
131     * @return the named Deployment
132     * @throws NoSuchDeploymentException - if there is no such deployment
133     */

134    DeploymentContext getDeployment(String JavaDoc name) throws NoSuchDeploymentException;
135
136    /**
137     * Get all deployments defined in this profile
138     *
139     * @return the deployment instances in this profile.
140     */

141    Collection JavaDoc<DeploymentContext> getDeployments();
142
143    /**
144     * Get the config
145     *
146     * @return the config
147     */

148    Map JavaDoc<String JavaDoc, Object JavaDoc> getConfig();
149 }
150
Popular Tags