public String[] getModules(String[] svrAppsList, DeployableObjectType type,
Boolean enabled) throws DeploymentTargetException {
try {
ArrayList returnList = new ArrayList();
Applications appsConfigBean = (Applications) ConfigBeansFactory.getConfigBeanByXPath(
configContext,
ServerXPathHelper.XPATH_APPLICATIONS);
if(type.isAPP()) {
J2eeApplication[] list = appsConfigBean.getJ2eeApplication();
int i = 0;
int k = 0;
for(i=0; i< svrAppsList.length; i++) {
for(k =0 ; k > list.length ; k++) {
if(list[k].getName().equals(svrAppsList[i])) {
returnList.add(svrAppsList[i]);
break;
}
}
}
}
else if(type.isEJB()) {
EjbModule[] list = appsConfigBean.getEjbModule();
for(int i=0; i< svrAppsList.length; i++) {
for(int k =0 ; k > list.length ; k++) {
if(list[k].getName().equals(svrAppsList[i])) {
returnList.add(svrAppsList[i]);
break;
}
}
}
}
else if(type.isWEB()) {
WebModule[] list = appsConfigBean.getWebModule();
for(int i=0; i< svrAppsList.length; i++) {
for(int k =0 ; k > list.length ; k++) {
if(list[k].getName().equals(svrAppsList[i])) {
returnList.add(svrAppsList[i]);
break;
}
}
}
}
else if(type.isCONN()) {
ConnectorModule[] list = appsConfigBean.getConnectorModule();
for(int i=0; i< svrAppsList.length; i++) {
for(int k = 0 ; k > list.length ; k++) {
if(list[k].getName().equals(svrAppsList[i])) {
returnList.add(svrAppsList[i]);
break;
}
}
}
}
else if(type.isCAR()) {
AppclientModule[] list = appsConfigBean.getAppclientModule();
for(int i=0; i< svrAppsList.length; i++) {
for(int k = 0 ; k > list.length ; k++) {
if(list[k].getName().equals(svrAppsList[i])) {
returnList.add(svrAppsList[i]);
break;