FileDocCategorySizeDatePackage
CommonInfoModel.javaAPI DocGlassfish v2 API34114Tue Aug 28 14:41:58 BST 2007com.sun.enterprise.tools.upgrade.common

CommonInfoModel

public class CommonInfoModel extends Object
author : Gautam Borah

Fields Summary
private String
AS_ADMIN_USER
private String
AS_ADMIN_ADMINPASSWORD
private String
AS_ADMIN_MASTERPASSWORD
private String
SOURCE_INSTALL_DIR
private String
TARGET_INSTALL_DIR
private String
adminUserName
private String
adminPassword
private File
passwordFile
private String
masterPassword
private String
passwordFilePath
private Map
domainCredentials
private List
passwordFileList
private String
osName
private String[]
CERT_ALIASES
private String
sourceDomainRoot
private String
targetDomainRoot
private boolean
sourceInputAsDomainRoot
private boolean
certificateConversionFlag
private boolean
enlistDomain
private List
domainList
private List
domainOptionList
private String
InstallConfig70
private String
sourceApplicationRoot
private String
currentDomain
private String
currentSourceServerInstance
private String
currentCluster
private Hashtable
domainMapping
private Map
domainNameMapping
private String
sourceVersionEdition
private String
targetVersionEdition
private String
sourceVersion
private String
targetVersion
private String
sourceEdition
private String
targetDefaultProfile
private boolean
isInPlace
private Map
domainNSSPwdMapping
private Map
domainTargetNSSPwdMapping
private Map
domainJKSPwdMapping
private Map
domainJKSCAPwdMapping
private Map
domainssPwdFileMapping
private Map
domainTargetnssPwdFileMapping
private com.sun.enterprise.util.i18n.StringManager
stringManager
private static Logger
logger
private static final String
CERT_FILE_NAME
private static final String
TRUSTED_KEY_STORE
private static final String
LICENSE_FILE
private static final String
NUMBERSTRING
public static final String
DOMAINS
public static final String
CONFIG
private static final String
SERVER_POLICY_FILE
private static final String
DEFAULT_WEB_XML_FILE
private static final String
SUN_ACC_XML_FILE
private static final String
DOMAIN_XML_FILE
private static final String
SOURCE_WSS_SERVER_CONFIG_XML
private static final String
TARGET_WSS_SERVER_CONFIG_XML
private static final String
HADB_DIR
private static final String
HADBM_JAR_FILE
private boolean
cliMode
private boolean
nopromptMode
Constructors Summary
public CommonInfoModel()
CommonInfoModel constructor

    
           
     
        targetVersion = UpgradeConstants.VERSION_91;
        domainList = new ArrayList();
        domainOptionList = new ArrayList();
        passwordFileList = new ArrayList();
        domainNSSPwdMapping = new HashMap();
        domainTargetNSSPwdMapping = new HashMap();
        domainJKSPwdMapping = new HashMap();
        domainJKSCAPwdMapping = new HashMap();
        domainssPwdFileMapping= new HashMap();
        domainTargetnssPwdFileMapping= new HashMap();
        domainNameMapping= new HashMap();
        domainCredentials = new HashMap();
    
Methods Summary
public voidaddDomainName(java.lang.String domainName)

        domainList.add(domainName);
    
public voidaddDomainOptionName(java.lang.String domainName)

        domainOptionList.add(domainName);
    
public voidaddPasswordFile(java.lang.String passwordFile)

        passwordFileList.add(passwordFile);
    
public booleancheckUpgrade8xto9x()

        boolean checkUpgrade8xto9x = false;
        checkUpgrade8xto9x = checkUpgradefrom8xpeto9x() ||
                             checkUpgradefrom8xeeto9x();
        return checkUpgrade8xto9x;
    
public booleancheckUpgrade9xto9x()

        boolean checkUpgrade9xto9x = false;
        checkUpgrade9xto9x = checkUpgradefrom9xpeto9x();
        return checkUpgrade9xto9x;
    
public booleancheckUpgradefrom8xeeto9x()

        boolean checkUpgradefrom8xeeto9x = false;
        String sourceVersionAndEdition = getSourceVersionAndEdition();
        String targetVersion = getTargetVersion();
        checkUpgradefrom8xeeto9x = (UpgradeConstants.VERSION_AS81_EE.equals(sourceVersionAndEdition) ||
                                    UpgradeConstants.VERSION_AS82_EE.equals(sourceVersionAndEdition)) &&
                                    UpgradeConstants.VERSION_91.equals(targetVersion);
        return checkUpgradefrom8xeeto9x;
    
public booleancheckUpgradefrom8xpeto9x()

        boolean checkUpgradefrom8xpeto9x = false;
        String sourceVersionAndEdition = getSourceVersionAndEdition();		
        String targetVersion = getTargetVersion();			
        checkUpgradefrom8xpeto9x = (UpgradeConstants.VERSION_AS80_PE.equals(sourceVersionAndEdition) ||
                                    UpgradeConstants.VERSION_AS81_PE.equals(sourceVersionAndEdition) ||
                                    UpgradeConstants.VERSION_AS82_PE.equals(sourceVersionAndEdition)) && 
                                    UpgradeConstants.VERSION_91.equals(targetVersion);
        return checkUpgradefrom8xpeto9x;
    
public booleancheckUpgradefrom9xpeto9x()

        boolean checkUpgradefrom9xpeto9x = false;
        String sourceVersionAndEdition = getSourceVersionAndEdition();		
        String targetVersion = getTargetVersion();			
        checkUpgradefrom9xpeto9x = UpgradeConstants.VERSION_AS90_PE.equals(sourceVersionAndEdition) &&
                                   UpgradeConstants.VERSION_91.equals(targetVersion);
        return checkUpgradefrom9xpeto9x;
    
public voidclearSourceAndTargetVersions()

        this.sourceVersionEdition = null;
    
public voiddeletePasswordFile()

        if (passwordFile != null) {
            passwordFile.delete();
        }
    
public voidenlistDomainsFromSource()

        //Return if this method has been invoked already
        if(enlistDomain)
            return;
        
        String source = getSourceInstallDir();
        //Return if source directory input is null
        if( source == null) {
            return;
        }
        
        //Remove any trailing File separators
        if(source.endsWith(File.separator)) {
            source = source.substring(0,
                    source.length() - File.separator.length());
        }
        
        //Set source domain name, domain root and mapping from the input
        String domainName = source.substring(source.lastIndexOf(File.separator) + 
                File.separator.length(), source.length());
        String domainRoot = source.substring(0,
                source.lastIndexOf(domainName) - File.separator.length());
        setSourceDomainRoot(domainRoot);
        setSourceDomainRootFlag(true);
        setDomainMapping(UpgradeUtils.getUpgradeUtils(this).enlistDomains( 
                domainName, domainRoot));
        enlistDomain=true;
    
public java.lang.StringfindLatestDomainDir(java.lang.String domainRoot)

        UpgradeUtils upgrUtils = UpgradeUtils.getUpgradeUtils(this);
        return upgrUtils.findLatestDomainDir(domainRoot,currentDomain);
    
public java.lang.StringgetAdminPassword()

        return this.adminPassword;
    
public java.lang.StringgetAdminUserName()

        return this.adminUserName;
    
public java.lang.String[]getCertAliases()

        return CERT_ALIASES;
    
public java.lang.StringgetCertDbPassword()
Get the password for the NSS certificate database. If this is an NSS to NSS or NSS to JKS migration, the String returned will be the source server password getTargetCertDbPassword() will return the target db password. If JKS to NSS, returns the target certificate db password.

return
String certpassword - the certificate password for current domain and instance null if the current instance does not have a password, and should not be included in the cert migration.

        Map instanceNSSPwdMap = (Map)domainNSSPwdMapping.get(currentDomain);
        return (String)instanceNSSPwdMap.get(currentSourceServerInstance);
    
public booleangetCertificateConversionFlag()

        return certificateConversionFlag;
    
public booleangetCliMode()

        return cliMode;
    
public java.lang.StringgetCurrentCluster()

        return this.currentCluster;
    
public java.lang.StringgetCurrentDomain()

        return currentDomain;
    
public java.lang.StringgetCurrentSourceInstance()

        return currentSourceServerInstance;
    
public static java.util.logging.LoggergetDefaultLogger()

return
a logger to use in the Module implementation classes

        if (logger==null) {
            logger = LogService.getLogger(LogService.UPGRADE_LOGGER);
        }
        return logger;
    
public java.lang.StringgetDefaultMasterPassword()

		return AS_ADMIN_MASTERPASSWORD;
	
public java.lang.StringgetDestinationDomainPath()

        return getDestinationDomainPath(this.currentDomain);
    
public java.lang.StringgetDestinationDomainPath(java.lang.String domainName)

        String path = getTargetDomainRoot() + File.separator + 
                (String)domainNameMapping.get(domainName);
        return path;
    
public java.lang.StringgetDomValuesFromPasswordFile(java.lang.String domainName)

        return (String)domainCredentials.get(domainName);
    
public java.util.ListgetDomainList()

        return domainList;
    
public java.util.HashtablegetDomainMapping()

        return domainMapping;
    
public java.util.ListgetDomainOptionList()

        return domainOptionList;
    
public java.lang.StringgetInstallConfig70()

        return InstallConfig70;
    
public java.lang.StringgetJksCAKeystorePassword()

        return (String)domainJKSCAPwdMapping.get((String)domainNameMapping.get(currentDomain));
    
public java.lang.StringgetJksKeystorePassword()

        return (String)domainJKSPwdMapping.get((String)domainNameMapping.get(currentDomain));
    
public java.lang.StringgetMasterPassword()

        return masterPassword;
    
public java.lang.StringgetNSSPwdFile()

        return (String)domainssPwdFileMapping.get(currentDomain);
    
public java.lang.StringgetOSName()

        return osName;
    
public java.lang.StringgetPasswordFile()

        if (passwordFilePath == null) {
            try {
                passwordFile = java.io.File.createTempFile("ugpw", null);
                FileWriter writer = new FileWriter(passwordFile);
                writer.write("AS_ADMIN_PASSWORD=" + getAdminPassword() +"\n");
                writer.write("AS_ADMIN_ADMINPASSWORD=" + getAdminPassword() +"\n");
                writer.write("AS_ADMIN_MASTERPASSWORD=" + getMasterPassword() + "\n");
                writer.close();
                passwordFilePath = passwordFile.getAbsolutePath();
            } catch (IOException ioe) {
                logger.severe(stringManager.getString("upgrade.common.general_exception") + " " + ioe.getMessage());        
            }
        }
        return passwordFilePath;
    
public java.util.ListgetPasswordFileList()

        return passwordFileList;
    
public java.lang.StringgetSourceApplicationRoot()

        return this.sourceApplicationRoot;
    
public java.lang.StringgetSourceConfigXMLFile()

        return getSourceDomainPath() + File.separator + CONFIG + 
                File.separator + DOMAIN_XML_FILE ;
    
public java.lang.StringgetSourceDefaultWebXMLFileName()

        return getSourceDomainPath() + File.separator + CONFIG +
                File.separator + DEFAULT_WEB_XML_FILE;
    
public java.lang.StringgetSourceDomainPath()

        return ((DomainInfo)getDomainMapping().get(currentDomain)).getDomainPath();
    
public java.lang.StringgetSourceDomainRoot()

        return sourceDomainRoot;
    
public booleangetSourceDomainRootFlag()

        return sourceInputAsDomainRoot;
    
public java.lang.StringgetSourceEdition()

        if(sourceEdition == null) {
            sourceEdition = UpgradeUtils.getUpgradeUtils(this).
                    editionString(this.getSourceVersionAndEdition());
        }
        return sourceEdition;
    
public java.lang.StringgetSourceInitConfFileName()

        //Init Conf File does not exist in versions > 8.x	    
        return null;
    
public java.lang.StringgetSourceInstallDir()

        return SOURCE_INSTALL_DIR;
    
public java.lang.StringgetSourceInstancePath()

        String currentDomain = this.getCurrentDomain();
        String currentSourceInstance = this.getCurrentSourceInstance();
        DomainInfo dInfo = (DomainInfo) this.getDomainMapping().get(currentDomain);
        return dInfo.getInstancePath(currentSourceInstance);
    
public java.lang.StringgetSourceJKSKeyStorePath()

        String path = getSourceDomainPath() +  File.separator + 
                CONFIG + File.separator + CERT_FILE_NAME;
        return path;
    
public java.lang.StringgetSourceServerPolicyFileName()

        return getSourceDomainPath() + File.separator + CONFIG + 
                File.separator + SERVER_POLICY_FILE ;
    
public java.lang.StringgetSourceSunACCFileName()

        return getSourceDomainPath() + File.separator + CONFIG + 
                File.separator + SUN_ACC_XML_FILE ;
    
public java.lang.StringgetSourceTrustedJKSKeyStorePath()

        String path = getSourceDomainPath() +  File.separator + 
                CONFIG + File.separator + TRUSTED_KEY_STORE;
        return path;
    
public java.lang.StringgetSourceVersion()

        if(sourceVersion == null) {
            sourceVersion = UpgradeUtils.getUpgradeUtils(this).
                    versionString(this.getSourceVersionAndEdition());
        }
        return sourceVersion;
    
public java.lang.StringgetSourceVersionAndEdition()

        if(this.sourceVersionEdition == null){
            String sourceInstallDir = this.getSourceInstallDir();			
            if(sourceInstallDir != null) {	
                this.sourceVersionEdition = new VersionExtracter(
                        sourceInstallDir,this).getVersion();
            }				
        }
        return this.sourceVersionEdition;
    
public java.lang.StringgetSourceWssServerConfigXML()

        return getSourceDomainPath() + File.separator + CONFIG
                + File.separator + SOURCE_WSS_SERVER_CONFIG_XML;
    
public java.lang.StringgetTargetCertDbPassword()

        return (String)domainTargetNSSPwdMapping.get(currentDomain);
    
public java.lang.StringgetTargetConfig()

        String config = getTargetDomainRoot() + File.separator + 
                (String)domainNameMapping.get(currentDomain) + 
                File.separator + CONFIG;
        return config;
    
public java.lang.StringgetTargetConfigXMLFile()

        return getDestinationDomainPath() + File.separator + CONFIG +
                File.separator + DOMAIN_XML_FILE ;
    
public java.lang.StringgetTargetDefaultProfile()

        if(targetDefaultProfile == null) {	    
            targetDefaultProfile = new VersionExtracter(
                    this.getTargetInstallDir(), this).getTargetDefaultProfile();
        }
        return targetDefaultProfile;	
    
public java.lang.StringgetTargetDefaultWebXMLFileName()

        return getDestinationDomainPath() + File.separator + CONFIG +
                File.separator + DEFAULT_WEB_XML_FILE;
    
public java.util.MapgetTargetDomainNameMapping()

        return domainNameMapping;
    
public java.lang.StringgetTargetDomainRoot()

        return targetDomainRoot;
    
public java.lang.StringgetTargetInstallDir()

        return System.getProperty("com.sun.aas.installRoot");
    
public java.lang.StringgetTargetJKSKeyStorePath()

        String path = getTargetDomainRoot() + File.separator + 
                (String)domainNameMapping.get(currentDomain) + 
                File.separator + CONFIG + File.separator + CERT_FILE_NAME;
        return path;
    
public java.lang.StringgetTargetNSSPwdFile()

        return (String)domainTargetnssPwdFileMapping.get(currentDomain);
    
public java.lang.StringgetTargetServerPolicyFileName()

        return getDestinationDomainPath() + File.separator + CONFIG +
                File.separator + SERVER_POLICY_FILE;
    
public java.lang.StringgetTargetSunACCFileName()

        return getDestinationDomainPath() + File.separator + CONFIG + 
                File.separator + SUN_ACC_XML_FILE ;
    
public java.lang.StringgetTargetTrustedJKSKeyStorePath()

        String path = getTargetDomainRoot() + File.separator + 
                (String)domainNameMapping.get(currentDomain) + 
                File.separator + CONFIG + File.separator + TRUSTED_KEY_STORE;
        return path;
    
public java.lang.StringgetTargetVersion()

        return targetVersion;	
    
public java.lang.StringgetTargetWssServerConfigXML()

        return getDestinationDomainPath() + File.separator + CONFIG
            + File.separator + TARGET_WSS_SERVER_CONFIG_XML;
    
public booleanisInPlace()

        return isInPlace;
    
public booleanisNoprompt()

		return nopromptMode;
	
public booleanisNssHadbFound()

     
        String strHadbDir = getTargetInstallDir() + File.separator + HADB_DIR;	    
        File hadbDir = new File(strHadbDir);
	if(!hadbDir.exists()) {
	    return false;
        } else {
            String[] hadbList = hadbDir.list();
            if((hadbList == null)||(hadbList.length <= 0)){
                // not a valid directory
                return false;
            }else{
                String strHadbmJarFile = strHadbDir + File.separator + hadbList[0] +
                    File.separator + "lib" + File.separator + HADBM_JAR_FILE;
                File hadbmJarFile = new File(strHadbmJarFile);
                if(!hadbmJarFile.exists()) {
                    return false;
                }
            }
        }
        return true;
    
public booleanisUpgradeJKStoJKS()

        //Case : 8.xPE/9.0PE -> developer profile	    
        String sourceVersionAndEdition = getSourceVersionAndEdition();			
        if (UpgradeConstants.VERSION_AS80_PE.equals(sourceVersionAndEdition) ||
                UpgradeConstants.VERSION_AS81_PE.equals(sourceVersionAndEdition)) {
            return true;
        }
        return false;
    
public booleanisUpgradeJKStoNSS()

        //Case : 8.xPE/9.0PE -> enterprise profile - Domain always created with developer profile.	    
        return false;
        /*if (UpgradeConstants.EDITION_EE.equals(getTargetEdition()) ||
                UpgradeConstants.EDITION_SE.equals(getTargetEdition())) {
            String sourceVersionAndEdition = getSourceVersionAndEdition();			
            if (UpgradeConstants.VERSION_AS80_PE.equals(sourceVersionAndEdition) ||
                    UpgradeConstants.VERSION_AS81_PE.equals(sourceVersionAndEdition) ||
                    UpgradeConstants.VERSION_AS90_PE.equals(sourceVersionAndEdition)) {
                return true;
            }
        }
        return false;*/
    
public booleanisUpgradeNSStoJKS()

        //Case : 8.1EE -> 9.1 domain with developer profile : Upgrade not required.
        return false;
        /*if (UpgradeConstants.EDITION_PE.equals(getTargetEdition())) {            
            String sourceVersionAndEdition = getSourceVersionAndEdition();			
            if (UpgradeConstants.VERSION_AS7X_PE.equals(sourceVersionAndEdition) ||
                    UpgradeConstants.VERSION_AS7X_SE.equals(sourceVersionAndEdition) ||
                    UpgradeConstants.VERSION_AS7X_EE.equals(sourceVersionAndEdition) ||
                    UpgradeConstants.VERSION_AS81_EE.equals(sourceVersionAndEdition)){
                return true;
            }
        }
        return false;*/
    
public booleanisUpgradeNSStoNSS()

        //Case : 8.1EE->9.1 : domain created as enterprise in target. 7.x not supported for now.
        String sourceVersionAndEdition = getSourceVersionAndEdition();
        if(UpgradeConstants.VERSION_AS81_EE.equals(sourceVersionAndEdition)) {
            return true;
        }
        /*if (UpgradeConstants.EDITION_EE.equals(getTargetEdition()) ||
                UpgradeConstants.EDITION_SE.equals(getTargetEdition())) {
            String sourceVersionAndEdition = getSourceVersionAndEdition();			
            if (UpgradeConstants.VERSION_AS7X_PE.equals(sourceVersionAndEdition) ||
                    UpgradeConstants.VERSION_AS7X_SE.equals(sourceVersionAndEdition) ||
                    UpgradeConstants.VERSION_AS7X_EE.equals(sourceVersionAndEdition) ||
                    UpgradeConstants.VERSION_AS81_EE.equals(sourceVersionAndEdition)) {
                return true;
            }
        }*/
        return false;
    
public booleanisUpgradeSupported()

        String sourceVersionAndEdition = this.getSourceVersionAndEdition();
        String sourceVersion = this.getSourceVersion();
        String sourceEdition = this.getSourceEdition();
        String targetVersion = this.getTargetVersion();
        String targetDefaultProfile = this.getTargetDefaultProfile();

        //Same version : No upgrade required.	 
        if(sourceVersion.equals(targetVersion)) {
            logger.log(Level.INFO, stringManager.getString(
                    "upgrade.common.same_version_upgrade_not_required"));
            return false;
        }
   
        //Check if the Source version and edition supports this version upgrade.	
        if(!((java.util.HashSet)UpgradeConstants.supportMap.get(
                sourceVersionAndEdition)).contains(targetVersion)) {
            logger.info(stringManager.getString(
                    "upgrade.common.upgrade_not_supported"));		
            return false;
        }	    

        //Edition Profile checks for upgrade support
        if(UpgradeConstants.EDITION_EE.equals(sourceEdition)) {
            if(UpgradeConstants.DEVELOPER_PROFILE.equals(targetDefaultProfile)) {
                //Case where 9.1PE stand-alone installer is used to install target
                if(!isInPlace()) {
                    if(isNssHadbFound()) {
                        //8.xEE to 9.1 enterprise profile upgrade SBS mode
                        return true;
                    } else {
                        //8.xEE to 9.1 developer profile upgrade SBS mode
                        logger.info(
                            stringManager.getString(
                                "upgrade.common.upgrade_not_supported_EEDeveloperSBS"));
                        return false;
                    }
                } else {
					// An EE to developer (i.e. pe) is not valid. cr6567370
					logger.info(stringManager.getString(
                            "upgrade.common.upgrade_not_supported_EEToDeveloper"));					
                    return false;
                }
            } else {
                //Case where 9.1EE stand-alone installer is used to install target
                //Default profile will always be enterprise
                return true;
            }
        } else if(UpgradeConstants.EDITION_PE.equals(sourceEdition)) {
            logger.log(Level.INFO, stringManager.getString(
                    "upgrade.common.developer_profile_created"));
            return true;
        } else {
            //Any other Source Edition Not supported.
            logger.info(stringManager.getString("upgrade.common.upgrade_not_supported")); 
            return false;
        }	    
    
public booleanisValid70Domain(java.lang.String domainPath)

        return UpgradeUtils.getUpgradeUtils(this).isValid70Domain(domainPath);
    
public voidprintInfo()

        getDefaultLogger().finest("SOURCE_INSTALL_DIR=="+SOURCE_INSTALL_DIR);
        getDefaultLogger().finest("SOURCE_INSTALL_DIR=="+TARGET_INSTALL_DIR);
        int size = domainList.size();
        for(int i=0;i<size;i++) {
            String domainName = (String)domainList.get(i);
            getDefaultLogger().finest("**********" + domainName + "****************");
            getDefaultLogger().finest("NSSPWD=="+ domainNSSPwdMapping.get(domainName));
            getDefaultLogger().finest("JKSPWD=="+ domainJKSPwdMapping.get(domainName));
            getDefaultLogger().finest("********************************************");
        }
        
    
public booleanprocessClinstnceConfFiles(java.util.Vector files)

        return ClustersInfoManager.getClusterInfoManager().processClinstanceConfFiles(files);
    
public voidprocessDomainXmlForClusters()
Method to build the ClusterInfo object required for processing clusters.

        ClustersInfoManager.getClusterInfoManager().gatherClusterInfo(this);
    
public voidrecover()

        UpgradeUtils.getUpgradeUtils(this).recover();
    
public voidsetAdminPassword(java.lang.String adminPassword)

        this.adminPassword = adminPassword;
    
public voidsetAdminUserName(java.lang.String adminUserName)

        this.adminUserName=adminUserName ;
    
public voidsetCertDbPassword(java.lang.String pwd)

        setCertDbPassword(currentDomain, currentSourceServerInstance, pwd);
    
public voidsetCertDbPassword(java.lang.String domain, java.lang.String pwd)

        setCertDbPassword(domain, currentSourceServerInstance, pwd);
    
public voidsetCertDbPassword(java.lang.String domain, java.lang.String instance, java.lang.String pwd)

        Map instanceNssPwdMap = (Map)domainNSSPwdMapping.get(domain);
        if(instanceNssPwdMap == null) {
            instanceNssPwdMap = new HashMap();
        }
        instanceNssPwdMap.put(instance, pwd);
        domainNSSPwdMapping.put(domain,instanceNssPwdMap);
    
public voidsetCertificateConversionFlag(boolean flag)

        certificateConversionFlag=flag;
    
public voidsetCliMode(boolean b)

        cliMode = b;
    
public voidsetCurrentCluster(java.lang.String clu)

        this.currentCluster = clu;
    
public voidsetCurrentDomain(java.lang.String domainName)

        currentDomain=domainName;
    
public voidsetCurrentSourceInstance(java.lang.String server)

        currentSourceServerInstance = server;
    
public voidsetDomainCredentials(java.lang.String dName, java.lang.String dValues)

        domainCredentials.put(dName, dValues);
    
public voidsetDomainMapping(java.util.Hashtable domainMapping)

        this.domainMapping = domainMapping;
    
public voidsetInstallConfig70(java.lang.String config)

        InstallConfig70 = config;
    
public voidsetIsInPlace(boolean isInPlace)

        this.isInPlace = isInPlace;
    
public voidsetJksCAKeystorePassword(java.lang.String pwd)

        domainJKSCAPwdMapping.put((String)domainNameMapping.get(currentDomain),pwd);
    
public voidsetJksCAKeystorePassword(java.lang.String domain, java.lang.String pwd)

        domainJKSCAPwdMapping.put((String)domainNameMapping.get(currentDomain),pwd);
    
public voidsetJksKeystorePassword(java.lang.String pwd)

        domainJKSPwdMapping.put((String)domainNameMapping.get(currentDomain),pwd);
    
public voidsetJksKeystorePassword(java.lang.String domain, java.lang.String pwd)

        domainJKSPwdMapping.put((String)domainNameMapping.get(currentDomain),pwd);
    
public voidsetMasterPassword(java.lang.String pw)

        masterPassword = pw;
    
public voidsetNSSPwdFile(java.lang.String pwdFile)

        domainTargetnssPwdFileMapping.put(currentDomain,pwdFile);
    
public voidsetNoprompt(boolean flag)

		nopromptMode = flag;
	
public voidsetOSName(java.lang.String osName)

        this.osName = osName;
    
public voidsetPasswordsFromFile(java.lang.String path)

        try {
            File userPasswordFile = new File(path);
            BufferedReader reader = new BufferedReader(new FileReader(userPasswordFile));
            while( reader.ready() ) {
                String line = reader.readLine();
                if ( line.startsWith("AS_ADMIN_PASSWORD=") ) {
                    setAdminPassword(line.substring(line.indexOf("=") + 1));
                } else if ( line.startsWith("AS_ADMIN_ADMINPASSWORD=") ) {
                    setAdminPassword(line.substring(line.indexOf("=") + 1));
                } else if ( line.startsWith("AS_ADMIN_MASTERPASSWORD=") ) {
                    setMasterPassword(line.substring(line.indexOf("=") + 1));
                }
            }
            reader.close();
        } catch (Exception e) {
            logger.severe(stringManager.getString("upgrade.common.general_exception") + " " + e.getMessage());
        }
    
public voidsetSourceApplicationRoot(java.lang.String applRoot)

        this.sourceApplicationRoot = applRoot;
    
public voidsetSourceDomainRoot(java.lang.String sourceDomainRoot)

        this.sourceDomainRoot=sourceDomainRoot;
    
public voidsetSourceDomainRootFlag(boolean fl)

        this.sourceInputAsDomainRoot = fl;
    
public voidsetSourceInstallDir(java.lang.String src)

        SOURCE_INSTALL_DIR = src;
    
public voidsetTargetCertDbPassword(java.lang.String pwd)

        domainTargetNSSPwdMapping.put(currentDomain,pwd);
    
public voidsetTargetCertDbPassword(java.lang.String domain, java.lang.String pwd)

        domainTargetNSSPwdMapping.put(domain,pwd);
    
public voidsetTargetDomainRoot(java.lang.String targetDomainsRoot)

        //If target domains root is already set, avoid overwriting.
        if(targetDomainRoot != null && targetDomainRoot.equals(targetDomainsRoot))
            return;
        this.targetDomainRoot=targetDomainsRoot;
        try {
            String logPath = targetDomainRoot + File.separator + 
                    UpgradeConstants.ASUPGRADE_LOG;
            logger.info(stringManager.getString("upgrade.common.log_redirect") + logPath);
            LogService.initialize(logPath);
        } catch(Exception e) {
            logger.warning(e.getLocalizedMessage());
        }
    
public voidsetTargetInstallDir(java.lang.String tgt)

        TARGET_INSTALL_DIR = tgt;
    
public voidsetTargetNSSPwdFile(java.lang.String pwdFile)

        domainTargetnssPwdFileMapping.put(currentDomain,pwdFile);
    
private booleansourceIsDomain()

        return UpgradeUtils.getUpgradeUtils(this).checkSourceInputAsDomain();