Methods Summary |
---|
public void | addPersistenceStoreProperty(java.lang.String domainName, java.lang.String name, java.lang.String value)
if(this.persistenceStoreMapping == null){
persistenceStoreMapping = new Hashtable();
}
Properties propsList = (Properties)this.persistenceStoreMapping.get(domainName);
if(propsList == null)
propsList = new Properties();
propsList.setProperty(name,value);
this.persistenceStoreMapping.put(domainName,propsList);
|
public void | gatherClusterInfo(com.sun.enterprise.tools.upgrade.common.CommonInfoModel commonInfo)Gathers cluster information when source domain is 8.x
if(clusterInfoList == null)
clusterInfoList = new ArrayList();
clusterInfoList.clear();
for(java.util.Iterator dItr =
commonInfo.getDomainMapping().keySet().iterator(); dItr.hasNext();){
DomainInfo dInfo = (DomainInfo)commonInfo.getDomainMapping().get(dItr.next());
String domainName = dInfo.getDomainName();
String domainXmlFile = dInfo.getDomainPath() + File.separator +
UpgradeConstants.AS_CONFIG_DIRECTORY + File.separator +
"domain.xml";
//Build the clusterInfoList
UpgradeUtils.getUpgradeUtils(commonInfo).updateClusterList(
domainXmlFile, domainName, clusterInfoList);
}
|
public java.util.List | getClusterInfoList()
return this.clusterInfoList;
|
public static com.sun.enterprise.tools.upgrade.cluster.ClustersInfoManager | getClusterInfoManager()
if(clusterManager == null)
clusterManager = new ClustersInfoManager();
return clusterManager;
|
public IIOPCluster | getIIOPCluster(java.lang.String domainName, java.lang.String clusterName)
// If IIOPCluster for the domain not created, create one.
// Domain name is the target domain name
if(this.iiopClustersMapping == null)
this.iiopClustersMapping = new Hashtable();
List clList = (List)this.iiopClustersMapping.get(domainName);
IIOPCluster iiopCluster = null;
if((clList != null) && (!clList.isEmpty())){
for(Iterator iIt = clList.iterator(); iIt.hasNext();){
java.lang.Object iiopClusterObject = iIt.next();
IIOPCluster iCluster = (IIOPCluster)iiopClusterObject;
if(iCluster.getClusterName().equals(clusterName)){
iiopCluster = iCluster;
break;
}
}
}else{
clList = new ArrayList();
}
if(iiopCluster == null){
iiopCluster = new IIOPCluster(clusterName);
clList.add(iiopCluster);
this.iiopClustersMapping.put(domainName,clList);
}
return iiopCluster;
|
public java.util.Hashtable | getIIOPClustersMapping()
return this.iiopClustersMapping;
|
public LBInfo | getLoadBalancerInfo()
return this.loadBalancerInfo;
|
public java.util.Hashtable | getPersistenceStorePropertiesMapping()
return this.persistenceStoreMapping;
|
public boolean | isIIOPClusterExists(java.lang.String domainName, java.lang.String clusterName)
if(this.iiopClustersMapping == null)
return false;
List clList = (List)this.iiopClustersMapping.get(domainName);
if((clList == null) || (clList.isEmpty())){
return false;
}
for(Iterator iIt = clList.iterator(); iIt.hasNext();){
if(((IIOPCluster)iIt.next()).getClusterName().equals(clusterName)){
return true;
}
}
return false;
|
public static void | main(java.lang.String[] args)
List aList = new ArrayList();
aList.add("c:\\temp\\clinstance.conf");
aList.add("c:\\temp\\clinstance.conf");
ClustersInfoManager cIM = ClustersInfoManager.getClusterInfoManager();
cIM.processClinstanceConfFiles(aList);
cIM.print();
|
public ClusterInfo | parseClinstanceConfFile(java.lang.String fileName)
return this.parseClinstanceConfFile(new File(fileName));
|
public ClusterInfo | parseClinstanceConfFile(java.io.File file)
if(!file.exists())
throw new FileNotFoundException();
ClusterInfo clInfo = new ClusterInfo();
clInfo.parseClinstanceConfFile(file);
return clInfo;
|
public void | print()
if(clusterInfoList != null){
for(Iterator it = clusterInfoList.iterator(); it.hasNext();){
ClusterInfo clInfo = (ClusterInfo)it.next();
com.sun.enterprise.tools.upgrade.common.CommonInfoModel.getDefaultLogger().info("\n\n\n *****************");
clInfo.print();
}
}
|
public boolean | processClinstanceConfFiles(java.util.List clinstanceConfFiles)
if(clusterInfoList == null)
clusterInfoList = new ArrayList();
clusterInfoList.clear();
for(Iterator it = clinstanceConfFiles.iterator(); it.hasNext();){
try{
clusterInfoList.add(this.parseClinstanceConfFile((String)it.next()));
}catch(FileNotFoundException fne){
logger.severe(stringManager.getString("enterprise.tools.upgrade.clinstanceConfFileMissing"));
System.exit(1);
// if file is not found, that cluster is not added to the list. Continue processing other cluster files
}catch(Exception ex){
logger.severe(stringManager.getString("enterprise.tools.upgrade.clinstanceConfFileProcessingException"));
return false;
}
}
return true;
|
public boolean | processLoadBalancerFile(java.lang.String fileName)
if(this.loadBalancerInfo == null)
this.loadBalancerInfo = new LBInfo();
if(! new File(fileName).exists())
return false;
return this.loadBalancerInfo.processLoadBalancerFile(fileName);
|