Methods Summary |
---|
public void | createDomain(java.lang.String domainName, java.util.Map domainConfig)
// validate(domainConfig);
// construct the ServerConfig obj, since validation succeeded
ServerConfig sc = createServerConfig(domainConfig);
// create the actual domain directory, under the domain root
File domainDir = new File(sc.domainRoot);
domainDir.mkdirs();
// Assuming that the native libraries have been loaded by the installer
installConfig instconf = new installConfig();
// invoke the createDomain on installConfig
instconf.createServerInstance(sc);
|
private com.iplanet.ias.installer.core.ServerConfig | createServerConfig(java.util.Map domainConfig)
ServerConfig sc = new ServerConfig();
sc.defaultLocale = (String) domainConfig.get(DomainConfig.K_DEFAULTLOCALE);
sc.icuLib = (String) domainConfig.get(DomainConfig.K_ICULIB);
sc.webServicesLib = (String) domainConfig.get(DomainConfig.K_WEBSVCSLIB);
sc.perlRoot = (String) domainConfig.get(DomainConfig.K_PERLROOT);
sc.serverID = PEWebCoreDomainsManager.SERVER_ID;
sc.serverPort = ((Integer) domainConfig.get(DomainConfig.K_INSTANCE_PORT)).intValue();
sc.adminPort = ((Integer) domainConfig.get(DomainConfig.K_ADMIN_PORT)).intValue();
sc.serverRoot = (String) domainConfig.get(DomainConfig.K_INSTALL_ROOT);
sc.domainRoot = (String) domainConfig.get(DomainConfig.K_DOMAIN_ROOT);
sc.serverUser = (String) domainConfig.get(DomainConfig.K_SVRUSER);
sc.serverUserFlag = ((Boolean) domainConfig.get(DomainConfig.K_SVRUSERFLAG)).booleanValue();
sc.serverName = (String) domainConfig.get(DomainConfig.K_SVRNAME);
sc.domainName = (String) domainConfig.get(DomainConfig.K_DOMAIN_NAME);
sc.mailHost = (String) domainConfig.get(DomainConfig.K_MAIL_HOST);
sc.docRoot = sc.domainRoot + File.separator + "docroot";
sc.jmsPort = ((Integer) domainConfig.get(DomainConfig.K_JMS_PORT)).intValue();
sc.jmsUser = (String) domainConfig.get(DomainConfig.K_JMS_USER);
sc.jmsPasswd = (String) domainConfig.get(DomainConfig.K_JMS_PASSWORD);
sc.imqBin = (String) domainConfig.get(DomainConfig.K_IMQ_BIN);
sc.imqLib = (String) domainConfig.get(DomainConfig.K_IMQ_LIB);
sc.javaHome = (String) domainConfig.get(DomainConfig.K_JAVA_HOME);
sc.orbListenerPort = ((Integer) domainConfig.get(DomainConfig.K_ORB_LISTENER_PORT)).intValue();
sc.configRoot = (String) domainConfig.get(DomainConfig.K_CFG_ROOT);
sc.adminName = (String) domainConfig.get(DomainConfig.K_USER);
sc.adminPasswd = (String) domainConfig.get(DomainConfig.K_PASSWORD);
sc.ldapUser = (String) domainConfig.get(DomainConfig.K_LDAP_USER);
sc.ldapURL = (String) domainConfig.get(DomainConfig.K_LDAP_URL);
sc.ldapPasswd = (String) domainConfig.get(DomainConfig.K_LDAP_PASSWD);
sc.ldapDN = (String) domainConfig.get(DomainConfig.K_LDAP_DN);
return sc;
|
public void | deleteDomain(java.lang.String domainName, java.util.Map domainConfig)
String domainRoot = (String) domainConfig.get(DomainConfig.K_DOMAIN_ROOT);
try {
installConfig instconf = new installConfig();
instconf.deleteDomain(domainName, domainRoot);
} catch(java.io.IOException ioe) {
throw new DomainException("Error deleting domain: "+domainName);
}
|
public com.sun.enterprise.admin.servermgmt.InstancesManager | getInstancesManager(java.lang.String domainName)
throw new UnsupportedOperationException("Not Supported for PE");
|
public boolean | isDomainExists(java.lang.String domainName, java.lang.String domainRoot)
return new File(domainRoot, domainName).exists();
|
public java.lang.String[] | listDomains()Lists all the domains.
String[] domains = new String[0];
return domains;
|
public void | startDomain(java.lang.String domainName, java.util.Map domainConfig)
|
public void | stopDomain(java.lang.String domainName, java.util.Map domainConfig)
|
private void | validate(java.util.Map domainConfig)
final String domainRoot =
(String)domainConfig.get(DomainConfig.K_DOMAIN_ROOT);
if ((domainRoot == null) || (domainRoot.length() == 0))
{
throw new DomainException("Invalid domain root");
}
/* Do we need this?
if (!(new File(domainRoot).exists()))
{
throw new DomainException("Domain root doesnot exist");
}
**/
|