KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > enterprise > deploy > spi > factories > BasicDeploymentFactory


1 /*
2  * EJTools, the Enterprise Java Tools
3  *
4  * Distributable under LGPL license.
5  * See terms of license at www.gnu.org.
6  */

7 package test.enterprise.deploy.spi.factories;
8
9 import javax.enterprise.deploy.spi.DeploymentManager JavaDoc;
10 import javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException JavaDoc;
11 import javax.enterprise.deploy.spi.factories.DeploymentFactory JavaDoc;
12
13 import test.enterprise.deploy.spi.BasicDeploymentManager;
14
15 /**
16  * Description of the Class
17  *
18  * @author Laurent Etiemble
19  * @version $Revision: 1.1 $
20  */

21 public class BasicDeploymentFactory implements DeploymentFactory JavaDoc
22 {
23    /** Description of the Field */
24    public final static String JavaDoc NAME = "BasicDeploymentFactory";
25    /** Description of the Field */
26    public final static String JavaDoc URI = "deployer:basic:";
27    /** Description of the Field */
28    public final static String JavaDoc VERSION = "1.0";
29
30
31    /** Constructor for the BasicDeploymentFactory object */
32    public BasicDeploymentFactory()
33    {
34       super();
35    }
36
37
38    /**
39     * Gets the deploymentManager attribute of the BasicDeploymentFactory object
40     *
41     * @param uri Description of the Parameter
42     * @param username Description of the Parameter
43     * @param password Description of the Parameter
44     * @return The deploymentManager value
45     * @exception DeploymentManagerCreationException Description of the Exception
46     */

47    public DeploymentManager JavaDoc getDeploymentManager(String JavaDoc uri, String JavaDoc username, String JavaDoc password)
48       throws DeploymentManagerCreationException JavaDoc
49    {
50       return new BasicDeploymentManager(uri);
51    }
52
53
54    /**
55     * Gets the disconnectedDeploymentManager attribute of the BasicDeploymentFactory
56     * object
57     *
58     * @param uri Description of the Parameter
59     * @return The disconnectedDeploymentManager
60     * value
61     * @exception DeploymentManagerCreationException Description of the Exception
62     */

63    public DeploymentManager JavaDoc getDisconnectedDeploymentManager(String JavaDoc uri)
64       throws DeploymentManagerCreationException JavaDoc
65    {
66       return new BasicDeploymentManager(uri);
67    }
68
69
70    /**
71     * Gets the displayName attribute of the BasicDeploymentFactory object
72     *
73     * @return The displayName value
74     */

75    public String JavaDoc getDisplayName()
76    {
77       return NAME;
78    }
79
80
81    /**
82     * Gets the productVersion attribute of the BasicDeploymentFactory object
83     *
84     * @return The productVersion value
85     */

86    public String JavaDoc getProductVersion()
87    {
88       return VERSION;
89    }
90
91
92    /**
93     * Description of the Method
94     *
95     * @param uri Description of the Parameter
96     * @return Description of the Return Value
97     */

98    public boolean handlesURI(String JavaDoc uri)
99    {
100       return uri.startsWith(URI);
101    }
102 }
103
Popular Tags