inserted others log to job util

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/speciesdiscovery@97459 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2014-06-16 12:30:45 +00:00
parent 5d3ab84357
commit ee8bffb3dd
2 changed files with 16 additions and 6 deletions

View File

@ -8,6 +8,7 @@ import com.extjs.gxt.ui.client.data.ModelData;
import com.extjs.gxt.ui.client.store.GroupingStore;
import com.extjs.gxt.ui.client.widget.Window;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
import com.google.gwt.core.shared.GWT;
public class TaxonomyWindowInfoJobsSpecies extends Window{
@ -34,6 +35,9 @@ public class TaxonomyWindowInfoJobsSpecies extends Window{
// System.out.println("jobModel.getId " + jobModel.getIdentifier() + " children num: " +jobModel.getListChildStatus().size());
// GWT.log("taxonomy job: "+jobModel);
for (JobTaxonomyModel childJob : jobModel.getListChildStatus()) {
BaseModelData data = new BaseModelData();
data.set(TaxonomyJobInfoFields.NAME.getId(), childJob.getName());

View File

@ -43,28 +43,34 @@ public class TaxonomyJobUtil {
logger.trace("download state: " + downloadState);
if(downloadState==null) //Case with exception
if(downloadState==null){ //Case with exception
logger.warn("download state is null, returning");
return null;
}
boolean onSaving = true;
//GET CHILDREN
ArrayList<JobTaxonomyModel> listChildJob = new ArrayList<JobTaxonomyModel>();
if(statusResponse.getSubNodes()!=null){
logger.trace("status response subnodes is != null? " + (statusResponse.getSubNodes()!=null));
if(statusResponse.getSubNodes()!=null){
logger.trace("subNodes size is: " + statusResponse.getSubNodes().size());
for (NodeStatus nodeStatus : statusResponse.getSubNodes()){
logger.trace("node status " + nodeStatus);
DownloadState downloadStateChildren = getDownloadState(nodeStatus.getStatus());
if(!downloadStateChildren.equals(DownloadState.COMPLETED))
onSaving=false;
listChildJob.add(new JobTaxonomyModel(UUID.randomUUID().toString(), nodeStatus.getScientificName(),downloadStateChildren));
}
}else
}else{
logger.trace("status response subnodes is null");
onSaving=false;
}
boolean changeStatus = false;
//If status of children is completed and job status is not completed (the file is generated) or failed, set download state on saving