KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > admin > servermgmt > DomainsManager


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 package com.sun.enterprise.admin.servermgmt;
25
26 import java.util.BitSet JavaDoc;
27
28 /**
29  */

30 public interface DomainsManager
31 {
32     /**
33      * In SE/EE we need an admin user/password that the DAS can use to authenticate to
34      * Node Agents and servers in the domain. This is not the case in PE; hence
35      * this flag -- DomainConfig.K_FLAG_START_DOMAIN_NEEDS_ADMIN_USER
36      *
37      * In SE/EE we need an extra non secure http port to host the Lockhart components
38      * which is controlled by -- DomainConfig.K_FLAG_CREATE_DOMAIN_NEEDS_ALTERNATE_ADMIN_PORT
39      * @return flags toggling SE/EE specific behavior.
40      */

41     public BitSet JavaDoc getDomainFlags();
42     
43     /**
44      * SE/EE supports NSS as its native SSL database. NSS is capable of supporting multiple
45      * slots (e.g. for different SSL hardware devices, smartcards, etc). Each device
46      * needs a specific password which the CLI must prompt for.
47      */

48      public String JavaDoc[] getExtraPasswordOptions(DomainConfig config)
49         throws DomainException;
50            
51     
52     /**
53      * Creates a domain
54      * @param domainConfig The configuration params that are required to create
55      * the domain. (eg :- domain admin port, http port, default locale,
56      * domain root, install root etc.) The relevant keys are defined in
57      * DomainConfig. The implementors of this class should validate the values
58      * that are supplied.
59      * @throws DomainException This exception is thrown if
60      * - the domain already exists.
61      * - an invalid or insufficient config. is supplied.
62      * - an exception occurred during domain creation.
63      */

64     public void createDomain(DomainConfig domainConfig)
65         throws DomainException;
66
67     /**
68      * Deletes a domain identified by the given name.
69      * (Should we stop the DAS and instances administered by this domain before
70      * deleting the domain?)
71      * @param domainConfig
72      * @throws DomainException This exception is thrown if
73      * <ul>
74      * - the domain doesnot exist.
75      * - an exception occurred while deleting the domain.
76      * </ul>
77      */

78     public void deleteDomain(DomainConfig domainConfig)
79         throws DomainException;
80
81     /**
82      * Starts the Domain Administration Server (DAS) that administers the given
83      * domain.
84      * @param startParams
85      * @throws DomainException
86      */

87     public void startDomain(DomainConfig domainConfig)
88         throws DomainException;
89
90     /**
91      * Stops the Domain Administration Server (DAS) that administers the given
92      * domain.
93      * @param domainConfig
94      * @throws DomainException
95      */

96     public void stopDomain(DomainConfig domainConfig)
97         throws DomainException;
98
99     /**
100      * Lists all the domains.
101      */

102     public String JavaDoc[] listDomains(DomainConfig domainConfig)
103         throws DomainException;
104
105     /**
106      * Lists all the domains and their status
107      */

108     public String JavaDoc[] listDomainsAndStatus(DomainConfig domainConfig)
109         throws DomainException;
110
111     /**
112      * Changes the master password for the domain
113      */

114     public void changeMasterPassword(DomainConfig domainConfig)
115         throws DomainException;
116     
117     public void validateDomain(DomainConfig domainConfig, boolean domainExists)
118         throws DomainException;
119     
120     public void validateMasterPassword(DomainConfig config) throws DomainException;
121     
122     public void validateAdminUserAndPassword(DomainConfig domainConfig) throws DomainException;
123         
124     /**
125      */

126     public InstancesManager getInstancesManager(RepositoryConfig config);
127 }
128
Popular Tags