Methods Summary |
---|
public void | addDomainName(java.lang.String domainName)
domainList.add(domainName);
|
public void | addDomainOptionName(java.lang.String domainName)
domainOptionList.add(domainName);
|
public void | addPasswordFile(java.lang.String passwordFile)
passwordFileList.add(passwordFile);
|
public boolean | checkUpgrade8xto9x()
boolean checkUpgrade8xto9x = false;
checkUpgrade8xto9x = checkUpgradefrom8xpeto9x() ||
checkUpgradefrom8xeeto9x();
return checkUpgrade8xto9x;
|
public boolean | checkUpgrade9xto9x()
boolean checkUpgrade9xto9x = false;
checkUpgrade9xto9x = checkUpgradefrom9xpeto9x();
return checkUpgrade9xto9x;
|
public boolean | checkUpgradefrom8xeeto9x()
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 boolean | checkUpgradefrom8xpeto9x()
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 boolean | checkUpgradefrom9xpeto9x()
boolean checkUpgradefrom9xpeto9x = false;
String sourceVersionAndEdition = getSourceVersionAndEdition();
String targetVersion = getTargetVersion();
checkUpgradefrom9xpeto9x = UpgradeConstants.VERSION_AS90_PE.equals(sourceVersionAndEdition) &&
UpgradeConstants.VERSION_91.equals(targetVersion);
return checkUpgradefrom9xpeto9x;
|
public void | clearSourceAndTargetVersions()
this.sourceVersionEdition = null;
|
public void | deletePasswordFile()
if (passwordFile != null) {
passwordFile.delete();
}
|
public void | enlistDomainsFromSource()
//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.String | findLatestDomainDir(java.lang.String domainRoot)
UpgradeUtils upgrUtils = UpgradeUtils.getUpgradeUtils(this);
return upgrUtils.findLatestDomainDir(domainRoot,currentDomain);
|
public java.lang.String | getAdminPassword()
return this.adminPassword;
|
public java.lang.String | getAdminUserName()
return this.adminUserName;
|
public java.lang.String[] | getCertAliases()
return CERT_ALIASES;
|
public java.lang.String | getCertDbPassword()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.
Map instanceNSSPwdMap = (Map)domainNSSPwdMapping.get(currentDomain);
return (String)instanceNSSPwdMap.get(currentSourceServerInstance);
|
public boolean | getCertificateConversionFlag()
return certificateConversionFlag;
|
public boolean | getCliMode()
return cliMode;
|
public java.lang.String | getCurrentCluster()
return this.currentCluster;
|
public java.lang.String | getCurrentDomain()
return currentDomain;
|
public java.lang.String | getCurrentSourceInstance()
return currentSourceServerInstance;
|
public static java.util.logging.Logger | getDefaultLogger()
if (logger==null) {
logger = LogService.getLogger(LogService.UPGRADE_LOGGER);
}
return logger;
|
public java.lang.String | getDefaultMasterPassword()
return AS_ADMIN_MASTERPASSWORD;
|
public java.lang.String | getDestinationDomainPath()
return getDestinationDomainPath(this.currentDomain);
|
public java.lang.String | getDestinationDomainPath(java.lang.String domainName)
String path = getTargetDomainRoot() + File.separator +
(String)domainNameMapping.get(domainName);
return path;
|
public java.lang.String | getDomValuesFromPasswordFile(java.lang.String domainName)
return (String)domainCredentials.get(domainName);
|
public java.util.List | getDomainList()
return domainList;
|
public java.util.Hashtable | getDomainMapping()
return domainMapping;
|
public java.util.List | getDomainOptionList()
return domainOptionList;
|
public java.lang.String | getInstallConfig70()
return InstallConfig70;
|
public java.lang.String | getJksCAKeystorePassword()
return (String)domainJKSCAPwdMapping.get((String)domainNameMapping.get(currentDomain));
|
public java.lang.String | getJksKeystorePassword()
return (String)domainJKSPwdMapping.get((String)domainNameMapping.get(currentDomain));
|
public java.lang.String | getMasterPassword()
return masterPassword;
|
public java.lang.String | getNSSPwdFile()
return (String)domainssPwdFileMapping.get(currentDomain);
|
public java.lang.String | getOSName()
return osName;
|
public java.lang.String | getPasswordFile()
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.List | getPasswordFileList()
return passwordFileList;
|
public java.lang.String | getSourceApplicationRoot()
return this.sourceApplicationRoot;
|
public java.lang.String | getSourceConfigXMLFile()
return getSourceDomainPath() + File.separator + CONFIG +
File.separator + DOMAIN_XML_FILE ;
|
public java.lang.String | getSourceDefaultWebXMLFileName()
return getSourceDomainPath() + File.separator + CONFIG +
File.separator + DEFAULT_WEB_XML_FILE;
|
public java.lang.String | getSourceDomainPath()
return ((DomainInfo)getDomainMapping().get(currentDomain)).getDomainPath();
|
public java.lang.String | getSourceDomainRoot()
return sourceDomainRoot;
|
public boolean | getSourceDomainRootFlag()
return sourceInputAsDomainRoot;
|
public java.lang.String | getSourceEdition()
if(sourceEdition == null) {
sourceEdition = UpgradeUtils.getUpgradeUtils(this).
editionString(this.getSourceVersionAndEdition());
}
return sourceEdition;
|
public java.lang.String | getSourceInitConfFileName()
//Init Conf File does not exist in versions > 8.x
return null;
|
public java.lang.String | getSourceInstallDir()
return SOURCE_INSTALL_DIR;
|
public java.lang.String | getSourceInstancePath()
String currentDomain = this.getCurrentDomain();
String currentSourceInstance = this.getCurrentSourceInstance();
DomainInfo dInfo = (DomainInfo) this.getDomainMapping().get(currentDomain);
return dInfo.getInstancePath(currentSourceInstance);
|
public java.lang.String | getSourceJKSKeyStorePath()
String path = getSourceDomainPath() + File.separator +
CONFIG + File.separator + CERT_FILE_NAME;
return path;
|
public java.lang.String | getSourceServerPolicyFileName()
return getSourceDomainPath() + File.separator + CONFIG +
File.separator + SERVER_POLICY_FILE ;
|
public java.lang.String | getSourceSunACCFileName()
return getSourceDomainPath() + File.separator + CONFIG +
File.separator + SUN_ACC_XML_FILE ;
|
public java.lang.String | getSourceTrustedJKSKeyStorePath()
String path = getSourceDomainPath() + File.separator +
CONFIG + File.separator + TRUSTED_KEY_STORE;
return path;
|
public java.lang.String | getSourceVersion()
if(sourceVersion == null) {
sourceVersion = UpgradeUtils.getUpgradeUtils(this).
versionString(this.getSourceVersionAndEdition());
}
return sourceVersion;
|
public java.lang.String | getSourceVersionAndEdition()
if(this.sourceVersionEdition == null){
String sourceInstallDir = this.getSourceInstallDir();
if(sourceInstallDir != null) {
this.sourceVersionEdition = new VersionExtracter(
sourceInstallDir,this).getVersion();
}
}
return this.sourceVersionEdition;
|
public java.lang.String | getSourceWssServerConfigXML()
return getSourceDomainPath() + File.separator + CONFIG
+ File.separator + SOURCE_WSS_SERVER_CONFIG_XML;
|
public java.lang.String | getTargetCertDbPassword()
return (String)domainTargetNSSPwdMapping.get(currentDomain);
|
public java.lang.String | getTargetConfig()
String config = getTargetDomainRoot() + File.separator +
(String)domainNameMapping.get(currentDomain) +
File.separator + CONFIG;
return config;
|
public java.lang.String | getTargetConfigXMLFile()
return getDestinationDomainPath() + File.separator + CONFIG +
File.separator + DOMAIN_XML_FILE ;
|
public java.lang.String | getTargetDefaultProfile()
if(targetDefaultProfile == null) {
targetDefaultProfile = new VersionExtracter(
this.getTargetInstallDir(), this).getTargetDefaultProfile();
}
return targetDefaultProfile;
|
public java.lang.String | getTargetDefaultWebXMLFileName()
return getDestinationDomainPath() + File.separator + CONFIG +
File.separator + DEFAULT_WEB_XML_FILE;
|
public java.util.Map | getTargetDomainNameMapping()
return domainNameMapping;
|
public java.lang.String | getTargetDomainRoot()
return targetDomainRoot;
|
public java.lang.String | getTargetInstallDir()
return System.getProperty("com.sun.aas.installRoot");
|
public java.lang.String | getTargetJKSKeyStorePath()
String path = getTargetDomainRoot() + File.separator +
(String)domainNameMapping.get(currentDomain) +
File.separator + CONFIG + File.separator + CERT_FILE_NAME;
return path;
|
public java.lang.String | getTargetNSSPwdFile()
return (String)domainTargetnssPwdFileMapping.get(currentDomain);
|
public java.lang.String | getTargetServerPolicyFileName()
return getDestinationDomainPath() + File.separator + CONFIG +
File.separator + SERVER_POLICY_FILE;
|
public java.lang.String | getTargetSunACCFileName()
return getDestinationDomainPath() + File.separator + CONFIG +
File.separator + SUN_ACC_XML_FILE ;
|
public java.lang.String | getTargetTrustedJKSKeyStorePath()
String path = getTargetDomainRoot() + File.separator +
(String)domainNameMapping.get(currentDomain) +
File.separator + CONFIG + File.separator + TRUSTED_KEY_STORE;
return path;
|
public java.lang.String | getTargetVersion()
return targetVersion;
|
public java.lang.String | getTargetWssServerConfigXML()
return getDestinationDomainPath() + File.separator + CONFIG
+ File.separator + TARGET_WSS_SERVER_CONFIG_XML;
|
public boolean | isInPlace()
return isInPlace;
|
public boolean | isNoprompt()
return nopromptMode;
|
public boolean | isNssHadbFound()
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 boolean | isUpgradeJKStoJKS()
//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 boolean | isUpgradeJKStoNSS()
//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 boolean | isUpgradeNSStoJKS()
//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 boolean | isUpgradeNSStoNSS()
//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 boolean | isUpgradeSupported()
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 boolean | isValid70Domain(java.lang.String domainPath)
return UpgradeUtils.getUpgradeUtils(this).isValid70Domain(domainPath);
|
public void | printInfo()
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 boolean | processClinstnceConfFiles(java.util.Vector files)
return ClustersInfoManager.getClusterInfoManager().processClinstanceConfFiles(files);
|
public void | processDomainXmlForClusters()Method to build the ClusterInfo object required for processing clusters.
ClustersInfoManager.getClusterInfoManager().gatherClusterInfo(this);
|
public void | recover()
UpgradeUtils.getUpgradeUtils(this).recover();
|
public void | setAdminPassword(java.lang.String adminPassword)
this.adminPassword = adminPassword;
|
public void | setAdminUserName(java.lang.String adminUserName)
this.adminUserName=adminUserName ;
|
public void | setCertDbPassword(java.lang.String pwd)
setCertDbPassword(currentDomain, currentSourceServerInstance, pwd);
|
public void | setCertDbPassword(java.lang.String domain, java.lang.String pwd)
setCertDbPassword(domain, currentSourceServerInstance, pwd);
|
public void | setCertDbPassword(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 void | setCertificateConversionFlag(boolean flag)
certificateConversionFlag=flag;
|
public void | setCliMode(boolean b)
cliMode = b;
|
public void | setCurrentCluster(java.lang.String clu)
this.currentCluster = clu;
|
public void | setCurrentDomain(java.lang.String domainName)
currentDomain=domainName;
|
public void | setCurrentSourceInstance(java.lang.String server)
currentSourceServerInstance = server;
|
public void | setDomainCredentials(java.lang.String dName, java.lang.String dValues)
domainCredentials.put(dName, dValues);
|
public void | setDomainMapping(java.util.Hashtable domainMapping)
this.domainMapping = domainMapping;
|
public void | setInstallConfig70(java.lang.String config)
InstallConfig70 = config;
|
public void | setIsInPlace(boolean isInPlace)
this.isInPlace = isInPlace;
|
public void | setJksCAKeystorePassword(java.lang.String pwd)
domainJKSCAPwdMapping.put((String)domainNameMapping.get(currentDomain),pwd);
|
public void | setJksCAKeystorePassword(java.lang.String domain, java.lang.String pwd)
domainJKSCAPwdMapping.put((String)domainNameMapping.get(currentDomain),pwd);
|
public void | setJksKeystorePassword(java.lang.String pwd)
domainJKSPwdMapping.put((String)domainNameMapping.get(currentDomain),pwd);
|
public void | setJksKeystorePassword(java.lang.String domain, java.lang.String pwd)
domainJKSPwdMapping.put((String)domainNameMapping.get(currentDomain),pwd);
|
public void | setMasterPassword(java.lang.String pw)
masterPassword = pw;
|
public void | setNSSPwdFile(java.lang.String pwdFile)
domainTargetnssPwdFileMapping.put(currentDomain,pwdFile);
|
public void | setNoprompt(boolean flag)
nopromptMode = flag;
|
public void | setOSName(java.lang.String osName)
this.osName = osName;
|
public void | setPasswordsFromFile(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 void | setSourceApplicationRoot(java.lang.String applRoot)
this.sourceApplicationRoot = applRoot;
|
public void | setSourceDomainRoot(java.lang.String sourceDomainRoot)
this.sourceDomainRoot=sourceDomainRoot;
|
public void | setSourceDomainRootFlag(boolean fl)
this.sourceInputAsDomainRoot = fl;
|
public void | setSourceInstallDir(java.lang.String src)
SOURCE_INSTALL_DIR = src;
|
public void | setTargetCertDbPassword(java.lang.String pwd)
domainTargetNSSPwdMapping.put(currentDomain,pwd);
|
public void | setTargetCertDbPassword(java.lang.String domain, java.lang.String pwd)
domainTargetNSSPwdMapping.put(domain,pwd);
|
public void | setTargetDomainRoot(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 void | setTargetInstallDir(java.lang.String tgt)
TARGET_INSTALL_DIR = tgt;
|
public void | setTargetNSSPwdFile(java.lang.String pwdFile)
domainTargetnssPwdFileMapping.put(currentDomain,pwdFile);
|
private boolean | sourceIsDomain()
return UpgradeUtils.getUpgradeUtils(this).checkSourceInputAsDomain();
|