Package it.eng.spagobi.services.scheduler.service

Examples of it.eng.spagobi.services.scheduler.service.SchedulerServiceSupplier


      SessionContainer sessCont = reqCont.getSessionContainer();
      SessionContainer permSess = sessCont.getPermanentContainer();
      IEngUserProfile profile = (IEngUserProfile)permSess.getAttribute(IEngUserProfile.ENG_USER_PROFILE);

     
        SchedulerServiceSupplier schedulerService=new SchedulerServiceSupplier();
      String jobName = (String)request.getAttribute("jobName");
      String jobGroupName = (String)request.getAttribute("jobGroupName");
      getSchedule(request, response);
      TriggerInfo tInfo = (TriggerInfo)sessCont.getAttribute(SpagoBIConstants.TRIGGER_INFO);
      StringBuffer message = createMessageSaveSchedulation(tInfo, true,profile);
      // call the web service to create the schedule
      String resp = schedulerService.scheduleJob(message.toString());
      SourceBean schedModRespSB = SchedulerUtilities.getSBFromWebServiceResponse(resp);
      if(schedModRespSB!=null) {
        String outcome = (String)schedModRespSB.getAttribute("outcome");
        if(outcome.equalsIgnoreCase("fault"))
          throw new Exception("Immediate Trigger not created by the web service");
View Full Code Here


    String jobGroupName = (String)request.getAttribute("jobGroupName");
    String triggerName = (String) request.getAttribute("triggerName");
    String triggerGroup = (String) request.getAttribute("triggerGroup");
    try {
        DAOFactory.getDistributionListDAO().eraseAllRelatedDistributionListObjects(triggerName);
            SchedulerServiceSupplier schedulerService=new SchedulerServiceSupplier();
      String resp = schedulerService.deleteSchedulation(triggerName, triggerGroup);
      SourceBean schedModRespSB = SchedulerUtilities.getSBFromWebServiceResponse(resp);
      if(schedModRespSB!=null) {
        String outcome = (String)schedModRespSB.getAttribute("outcome");
        if(outcome.equalsIgnoreCase("fault"))
          throw new Exception("Trigger not deleted by the service");
View Full Code Here

    }
  }

  private void getSchedule(SourceBean request, SourceBean response) throws EMFUserError {
    try {
        SchedulerServiceSupplier schedulerService=new SchedulerServiceSupplier();
      String jobName = (String)request.getAttribute("jobName");
      String jobGroupName = (String)request.getAttribute("jobGroupName");
      String triggerName = (String) request.getAttribute("triggerName");
      String triggerGroup = (String) request.getAttribute("triggerGroup");
      String respStr_gt = schedulerService.getJobSchedulationDefinition(triggerName, triggerGroup);
          SourceBean triggerDetailSB = SchedulerUtilities.getSBFromWebServiceResponse(respStr_gt);     
      String respStr_gj = schedulerService.getJobDefinition(jobName, jobGroupName);
            SourceBean jobDetailSB = SchedulerUtilities.getSBFromWebServiceResponse(respStr_gj);           
      if(triggerDetailSB!=null) {
        if(jobDetailSB!=null){
          TriggerInfo tInfo = SchedulerUtilities.getTriggerInfoFromTriggerSourceBean(triggerDetailSB, jobDetailSB);
          sessCont.setAttribute(SpagoBIConstants.TRIGGER_INFO, tInfo);
View Full Code Here

    try{
      RequestContainer reqCont = getRequestContainer();
      SessionContainer sessCont = reqCont.getSessionContainer();
      SessionContainer permSess = sessCont.getPermanentContainer();
      IEngUserProfile profile = (IEngUserProfile)permSess.getAttribute(IEngUserProfile.ENG_USER_PROFILE);
        SchedulerServiceSupplier schedulerService=new SchedulerServiceSupplier();
      TriggerInfo triggerInfo = (TriggerInfo)sessCont.getAttribute(SpagoBIConstants.TRIGGER_INFO);
      JobInfo jobInfo = triggerInfo.getJobInfo();
      String jobName = jobInfo.getJobName();
      String jobGroupName = jobInfo.getJobGroupName();
      String triggername = (String)request.getAttribute("triggername")
      String triggerDescription  = (String)request.getAttribute("triggerdescription")
      String startdate  = (String)request.getAttribute("startdate")
      String starttime = (String)request.getAttribute("starttime")
      String chronstr = (String)request.getAttribute("chronstring");
      String enddate = (String)request.getAttribute("enddate")
      String endtime = (String)request.getAttribute("endtime")
      String repeatinterval = (String)request.getAttribute("repeatInterval");
      triggerInfo.setEndDate(enddate);
      triggerInfo.setEndTime(endtime);
      triggerInfo.setRepeatInterval(repeatinterval);
      triggerInfo.setStartDate(startdate);
      triggerInfo.setStartTime(starttime);
      triggerInfo.setChronString(chronstr);
      triggerInfo.setTriggerDescription(triggerDescription);
      triggerInfo.setTriggerName(triggername);

      Map saveOptions = new HashMap();
      List biobjIds = jobInfo.getBiobjectIds();
      Iterator iterBiobjIds = biobjIds.iterator();
      int index = 0;
      while(iterBiobjIds.hasNext()){
        index ++;
        SaveInfo sInfo = new SaveInfo();
        Integer biobId = (Integer)iterBiobjIds.next();
        String saveassnap = (String)request.getAttribute("saveassnapshot_"+biobId+"__"+index)
        if(saveassnap!=null) {
          sInfo.setSaveAsSnapshot(true);
          String snapname = (String)request.getAttribute("snapshotname_"+biobId+"__"+index)
          sInfo.setSnapshotName(snapname);
          String snapdescr = (String)request.getAttribute("snapshotdescription_"+biobId+"__"+index);
          sInfo.setSnapshotDescription(snapdescr);
          String snaphistlength = (String)request.getAttribute("snapshothistorylength_"+biobId+"__"+index);
          sInfo.setSnapshotHistoryLength(snaphistlength);
       
     
        String sendToJavaClass = (String)request.getAttribute("sendtojavaclass_"+biobId+"__"+index)
        if(sendToJavaClass!=null) {
          sInfo.setSendToJavaClass(true);
          String javaClassPath = (String)request.getAttribute("javaclasspath_"+biobId+"__"+index)
          JavaClassDestination tryClass=null;
          try{
          tryClass=(JavaClassDestination)Class.forName(javaClassPath).newInstance();
          }
          catch (ClassCastException e) {
            logger.error("Error in istantiating class");
            EMFValidationError emfError=new EMFValidationError(EMFErrorSeverity.ERROR, "sendtojavaclass_"+biobId+"__"+index, "12200");
            errorHandler.addError(emfError);
         
          }       
          catch (Exception e) {
            logger.error("Error in istantiating class");
            EMFValidationError emfError=new EMFValidationError(EMFErrorSeverity.ERROR, "sendtojavaclass_"+biobId+"__"+index, "12100");
            errorHandler.addError(emfError);
          }         
          sInfo.setJavaClassPath(javaClassPath);
       
       
       
        String saveasdoc = (String)request.getAttribute("saveasdocument_"+biobId+"__"+index)
        if(saveasdoc!=null) {
          sInfo.setSaveAsDocument(true);
          String docname = (String)request.getAttribute("documentname_"+biobId+"__"+index)
          sInfo.setDocumentName(docname);
          String docdescr = (String)request.getAttribute("documentdescription_"+biobId+"__"+index)
          sInfo.setDocumentDescription(docdescr);
          boolean useFixedFolder = "true".equalsIgnoreCase((String) request.getAttribute("useFixedFolder_"+biobId+"__"+index));
          sInfo.setUseFixedFolder(useFixedFolder);
          if (useFixedFolder) {
            String functIdsConcat = "";
            String tmpValReq = "tree_"+biobId+"__"+index+"_funct_id";
            List functIds = request.getAttributeAsList(tmpValReq)
            Iterator iterFunctIds = functIds.iterator();
            while(iterFunctIds.hasNext()) {
              String idFunct = (String)iterFunctIds.next();
              functIdsConcat += idFunct;
              if(iterFunctIds.hasNext()){
                functIdsConcat += ",";
              }
            }
            sInfo.setFunctionalityIds(functIdsConcat);
          }
          //gestire acquisizione folder
          boolean useFolderDataset = "true".equalsIgnoreCase((String) request.getAttribute("useFolderDataset_"+biobId+"__"+index));
          sInfo.setUseFolderDataSet(useFolderDataset);
          if (useFolderDataset) {
            String dsLabel = (String)request.getAttribute("datasetFolderLabel_"+biobId+"__"+index)
            sInfo.setDataSetFolderLabel(dsLabel);
            String datasetParameterLabel = (String)request.getAttribute("datasetFolderParameter_"+biobId+"__"+index)
            sInfo.setDataSetFolderParameterLabel(datasetParameterLabel);
            if (dsLabel == null || dsLabel.trim().equals("")) {
              BIObject biobj = DAOFactory.getBIObjectDAO().loadBIObjectById(biobId);
              List params = new ArrayList();
              params.add(biobj.getName());
              this.getErrorHandler().addError(new EMFValidationError(EMFErrorSeverity.ERROR, null, "errors.trigger.missingDataSet", params, "component_scheduler_messages"));
            }
            if (datasetParameterLabel == null || datasetParameterLabel.trim().equals("")) {
              BIObject biobj = DAOFactory.getBIObjectDAO().loadBIObjectById(biobId);
              List params = new ArrayList();
              params.add(biobj.getName());
              this.getErrorHandler().addError(new EMFValidationError(EMFErrorSeverity.ERROR, null, "errors.trigger.missingDataSetParameter", params, "component_scheduler_messages"));
            }
          //  sInfo.setFunctionalityIds(functIdsConcat);
          }
        }
        String sendmail = (String)request.getAttribute("sendmail_"+biobId+"__"+index)
        if(sendmail!=null) {
          sInfo.setSendMail(true);
          boolean useFixedRecipients = "true".equalsIgnoreCase((String) request.getAttribute("useFixedRecipients_"+biobId+"__"+index));
          sInfo.setUseFixedRecipients(useFixedRecipients);
          if (useFixedRecipients) {
            String mailtos = (String)request.getAttribute("mailtos_"+biobId+"__"+index);
            sInfo.setMailTos(mailtos);
            if (mailtos == null || mailtos.trim().equals("")) {
              BIObject biobj = DAOFactory.getBIObjectDAO().loadBIObjectById(biobId);
              List params = new ArrayList();
              params.add(biobj.getName());
              this.getErrorHandler().addError(new EMFValidationError(EMFErrorSeverity.ERROR, null, "errors.trigger.missingFixedRecipients", params, "component_scheduler_messages"));
            }
          }
          boolean useDataset = "true".equalsIgnoreCase((String) request.getAttribute("useDataset_"+biobId+"__"+index));
          sInfo.setUseDataSet(useDataset);
          if (useDataset) {
            String dsLabel = (String)request.getAttribute("datasetLabel_"+biobId+"__"+index)
            sInfo.setDataSetLabel(dsLabel);
            String datasetParameterLabel = (String)request.getAttribute("datasetParameter_"+biobId+"__"+index)
            sInfo.setDataSetParameterLabel(datasetParameterLabel);
            if (dsLabel == null || dsLabel.trim().equals("")) {
              BIObject biobj = DAOFactory.getBIObjectDAO().loadBIObjectById(biobId);
              List params = new ArrayList();
              params.add(biobj.getName());
              this.getErrorHandler().addError(new EMFValidationError(EMFErrorSeverity.ERROR, null, "errors.trigger.missingDataSet", params, "component_scheduler_messages"));
            }
            if (datasetParameterLabel == null || datasetParameterLabel.trim().equals("")) {
              BIObject biobj = DAOFactory.getBIObjectDAO().loadBIObjectById(biobId);
              List params = new ArrayList();
              params.add(biobj.getName());
              this.getErrorHandler().addError(new EMFValidationError(EMFErrorSeverity.ERROR, null, "errors.trigger.missingDataSetParameter", params, "component_scheduler_messages"));
            }
          }
          boolean useExpression = "true".equalsIgnoreCase((String) request.getAttribute("useExpression_"+biobId+"__"+index));
          sInfo.setUseExpression(useExpression);
          if (useExpression) {
            String expression = (String)request.getAttribute("expression_"+biobId+"__"+index)
            sInfo.setExpression(expression);
            if (expression == null || expression.trim().equals("")) {
              BIObject biobj = DAOFactory.getBIObjectDAO().loadBIObjectById(biobId);
              List params = new ArrayList();
              params.add(biobj.getName());
              this.getErrorHandler().addError(new EMFValidationError(EMFErrorSeverity.ERROR, null, "errors.trigger.missingExpression", params, "component_scheduler_messages"));
            }
          }
         
          if (!useFixedRecipients && !useDataset && !useExpression) {
            BIObject biobj = DAOFactory.getBIObjectDAO().loadBIObjectById(biobId);
            List params = new ArrayList();
            params.add(biobj.getName());
            this.getErrorHandler().addError(new EMFValidationError(EMFErrorSeverity.ERROR, null, "errors.trigger.missingRecipients", params, "component_scheduler_messages"))
          }
         
          String mailsubj = (String)request.getAttribute("mailsubj_"+biobId+"__"+index)
          sInfo.setMailSubj(mailsubj);
          String mailtxt = (String)request.getAttribute("mailtxt_"+biobId+"__"+index)
          sInfo.setMailTxt(mailtxt);
        }
        String sendtodl = (String)request.getAttribute("saveasdl_"+biobId+"__"+index)
        if(sendtodl!=null) {
          sInfo.setSendToDl(true);
          sInfo.setBiobjId(biobId.intValue());
          List dlist = DAOFactory.getDistributionListDAO().loadAllDistributionLists()
          Iterator it = dlist.iterator();
          while(it.hasNext()){
            DistributionList dl = (DistributionList)it.next();
            int dlId = dl.getId();
            String listID = (String)request.getAttribute("sendtodl_"+dlId+"_"+biobId+"__"+index);
            if(listID!=null){
              sInfo.addDlId(new Integer(listID));
            }
            else{
             
              DAOFactory.getDistributionListDAO().eraseDistributionListObjects(dl,biobId.intValue(),triggername);
            }
                     
          }
         
        }
       
        saveOptions.put(biobId+"__"+index, sInfo);
      }
      triggerInfo.setSaveOptions(saveOptions);
     
      // check for input validation errors
      if(!this.getErrorHandler().isOKByCategory(EMFErrorCategory.VALIDATION_ERROR)) {
        List functionalities = DAOFactory.getLowFunctionalityDAO().loadAllLowFunctionalities(false);
        response.setAttribute(SpagoBIConstants.FUNCTIONALITIES_LIST, functionalities);
        List allDatasets = DAOFactory.getDataSetDAO().loadAllActiveDataSets();
        response.setAttribute(SpagoBIConstants.DATASETS_LIST, allDatasets);
        response.setAttribute(SpagoBIConstants.PUBLISHER_NAME, "TriggerDetail");
        return;
      }
     
      StringBuffer message = createMessageSaveSchedulation(triggerInfo, false,profile);
      // call the web service to create the schedule
      String servoutStr = schedulerService.scheduleJob(message.toString());
      SourceBean execOutSB = SchedulerUtilities.getSBFromWebServiceResponse(servoutStr);
      if(execOutSB!=null) {
        String outcome = (String)execOutSB.getAttribute("outcome");
        if(outcome.equalsIgnoreCase("fault"))
          throw new Exception("Trigger "+triggername+" not created by the web service");
View Full Code Here

 
 
  private void newScheduleForJob(SourceBean request, SourceBean response) throws EMFUserError {
    String jobName = "";
    try{
        SchedulerServiceSupplier schedulerService=new SchedulerServiceSupplier();
      jobName = (String)request.getAttribute("jobName");
      String jobGroupName = (String)request.getAttribute("jobGroupName");
      TriggerInfo ti = new TriggerInfo();
      String respStr = schedulerService.getJobDefinition(jobName, jobGroupName);
            SourceBean jobDetailSB = SchedulerUtilities.getSBFromWebServiceResponse(respStr);     
      if(jobDetailSB!=null) {
        JobInfo jobInfo = SchedulerUtilities.getJobInfoFromJobSourceBean(jobDetailSB);
        ti.setJobInfo(jobInfo);
        Map saveOptions = new HashMap();
View Full Code Here

 
 
  private void getTriggersForJob(SourceBean request, SourceBean response) throws EMFUserError {
    String jobName = "";
    try{
        SchedulerServiceSupplier schedulerService=new SchedulerServiceSupplier();
      // create the sourcebean of the list
      SourceBean pageListSB  = new SourceBean("PAGED_LIST");
      jobName = (String)request.getAttribute("jobName");
      String jobGroupName = (String)request.getAttribute("jobGroupName");
      String serviceResp = schedulerService.getJobSchedulationList(jobName, jobGroupName);
      SourceBean rowsSB = SourceBean.fromXMLString(serviceResp);
      if(rowsSB==null) {
        rowsSB = new SourceBean("ROWS");
      }
      // fill the list sourcebean     
View Full Code Here

 
  private void getAllJobs(SourceBean request, SourceBean response) throws EMFUserError {
    try {
      // create the sourcebean of the list
      SourceBean pageListSB  = new SourceBean("PAGED_LIST");
      SchedulerServiceSupplier schedulerService=new SchedulerServiceSupplier();
      String xmlList = schedulerService.getJobList();
      //SourceBean schedModRespSB = SchedulerUtilities.getSBFromWebServiceResponse(wsresp);
      SourceBean rowsSB = SourceBean.fromXMLString(xmlList);
      if(rowsSB==null){
        throw new Exception("Web service response incomplete");
      }
      // recover all jobs
      List jobSBs = rowsSB.getAttributeAsList("ROW");
     
      Iterator jobSBiter = jobSBs.iterator();
      while(jobSBiter.hasNext()) {
        SourceBean jobSB = (SourceBean)jobSBiter.next();
        String jobname = (String)jobSB.getAttribute("jobName");
        String jobgroupname = (String)jobSB.getAttribute("jobGroupName");
        String xmlSchedList = schedulerService.getJobSchedulationList(jobname, jobgroupname);
        int numSchedulation = 0;
        SourceBean rowsSB_JSL = SourceBean.fromXMLString(xmlSchedList);
        if(rowsSB_JSL!=null) {
          List schedulations = rowsSB_JSL.getAttributeAsList("ROW");
          if(schedulations!=null){
View Full Code Here

    }
  }
 
  private void deleteJob(SourceBean request, SourceBean response) throws EMFUserError {
    try {
            SchedulerServiceSupplier schedulerService=new SchedulerServiceSupplier();
      String jobName = (String)request.getAttribute("jobName");
      String jobGroupName = (String)request.getAttribute("jobGroupName");
      String xmlSchedList = schedulerService.getJobSchedulationList(jobName, jobGroupName);
      SourceBean rowsSB_JSL = SourceBean.fromXMLString(xmlSchedList);
      if(rowsSB_JSL==null) {
        throw new Exception("List of job triggers not returned by Web service ");
      }
      // delete each schedulation
      List schedules = rowsSB_JSL.getAttributeAsList("ROW");
      Iterator iterSchedules = schedules.iterator();
      while(iterSchedules.hasNext()) {
           SourceBean scheduleSB = (SourceBean)iterSchedules.next();
           String triggerName = (String)scheduleSB.getAttribute("triggerName");
           String triggerGroup = (String)scheduleSB.getAttribute("triggerGroup");
           DAOFactory.getDistributionListDAO().eraseAllRelatedDistributionListObjects(triggerName);
           String delResp = schedulerService.deleteSchedulation(triggerName, triggerGroup);
        SourceBean schedModRespSB_DS = SchedulerUtilities.getSBFromWebServiceResponse(delResp);
        if(schedModRespSB_DS==null) {
          throw new Exception("Imcomplete response returned by the Web service " +
                          "during schedule "+triggerName+" deletion");
       
        if(!SchedulerUtilities.checkResultOfWSCall(schedModRespSB_DS)){
          throw new Exception("Schedule "+triggerName+" not deleted by the Web Service");
        }
      }     
      // delete job 
      String resp_DJ = schedulerService.deleteJob(jobName, jobGroupName);
      SourceBean schedModRespSB_DJ = SchedulerUtilities.getSBFromWebServiceResponse(resp_DJ);
      if(schedModRespSB_DJ==null) {
        throw new Exception("Imcomplete response returned by the Web service " +
                        "during job "+jobName+" deletion");
     
View Full Code Here

  }

 
  private void saveJob(JobInfo jobInfo) throws EMFUserError {
    try {
      SchedulerServiceSupplier schedulerService=new SchedulerServiceSupplier();
      // create message to define the new job (for the web service)
      String jobGroupName = JOB_GROUP;
      StringBuffer message = new StringBuffer();
      message.append("<SERVICE_REQUEST ");
      message.append(" jobName=\""+jobInfo.getJobName()+"\" ");
      message.append(" jobDescription=\""+jobInfo.getJobDescription()+"\" ");
      message.append(" jobGroupName=\""+jobGroupName+"\" ");
      message.append(" jobRequestRecovery=\"false\" ");
      message.append(" jobClass=\"it.eng.spagobi.tools.scheduler.jobs.ExecuteBIDocumentJob\" ");
      message.append(">");
      message.append("   <PARAMETERS>");
      List biobjs = jobInfo.getBiobjects();
      Iterator iterbiobj = biobjs.iterator();
      String doclabels = "";
      int index = 0;
      while(iterbiobj.hasNext()) {
        index ++;
        BIObject biobj = (BIObject)iterbiobj.next();
        List pars = biobj.getBiObjectParameters();
        Iterator iterPars = pars.iterator();
        StringBuffer fixedParameters = new StringBuffer("");
        StringBuffer iterativeParameters = new StringBuffer("");
        StringBuffer loadAtRuntimeParameters = new StringBuffer("");
        StringBuffer useFormulaParameters = new StringBuffer("");
        while(iterPars.hasNext()) {
          BIObjectParameter biobjpar = (BIObjectParameter)iterPars.next();
          if (biobjpar.isIterative()) {
            iterativeParameters.append(biobjpar.getParameterUrlName() + ";");
          }
          Object strategyObj = biobjpar.getParameterValuesRetriever();
          if (strategyObj != null && strategyObj instanceof RuntimeLoadingParameterValuesRetriever) {
            RuntimeLoadingParameterValuesRetriever strategy = (RuntimeLoadingParameterValuesRetriever) strategyObj;
            String user = strategy.getUserIndentifierToBeUsed();
            String role = strategy.getRoleToBeUsed();
            loadAtRuntimeParameters.append(biobjpar.getParameterUrlName() + "(" + user + "|" + role + ");");
          } else if (strategyObj != null && strategyObj instanceof FormulaParameterValuesRetriever) {
            FormulaParameterValuesRetriever strategy = (FormulaParameterValuesRetriever) strategyObj;
            String fName = strategy.getFormula().getName();
            useFormulaParameters.append(biobjpar.getParameterUrlName() + "(" + fName + ");");
          } else {
            String concatenatedValue = "";
            List values = biobjpar.getParameterValues();
            if(values != null && !values.isEmpty()) {
              Iterator itervalues = values.iterator();
              while(itervalues.hasNext()) {
                String value = (String)itervalues.next();
                concatenatedValue += value + ";";
              }
              if(concatenatedValue.length()>0) {
                concatenatedValue = concatenatedValue.substring(0, concatenatedValue.length() - 1);
              }
 
            }
            if(concatenatedValue.length()>0) {
              fixedParameters.append(biobjpar.getParameterUrlName() + "=" + concatenatedValue + "%26");
            }
          }

        }
        if (fixedParameters.length() > 0) {
          fixedParameters = fixedParameters.delete(fixedParameters.length() -1, fixedParameters.length() - 1);
        }
        message.append("<PARAMETER name=\""+biobj.getLabel()+"__"+index+"\" value=\""+fixedParameters.toString()+"\" />");
        if (iterativeParameters.length() > 0) {
          iterativeParameters.deleteCharAt(iterativeParameters.length() - 1);
          message.append("<PARAMETER name=\""+biobj.getLabel()+"__"+index+"_iterative\" value=\""+iterativeParameters.toString()+"\" />");
        }
        if (loadAtRuntimeParameters.length() > 0) {
          loadAtRuntimeParameters.deleteCharAt(loadAtRuntimeParameters.length() - 1);
          message.append("<PARAMETER name=\""+biobj.getLabel()+"__"+index+"_loadAtRuntime\" value=\""+loadAtRuntimeParameters.toString()+"\" />");
        }
        if (useFormulaParameters.length() > 0) {
          useFormulaParameters.deleteCharAt(useFormulaParameters.length() - 1);
          message.append("<PARAMETER name=\""+biobj.getLabel()+"__"+index+"_useFormula\" value=\""+useFormulaParameters.toString()+"\" />");
        }
        doclabels += biobj.getLabel() +"__"+index+ ",";
      }
      if(doclabels.length()>0) {
        doclabels = doclabels.substring(0, doclabels.length()-1);
      }
      message.append("        <PARAMETER name=\"documentLabels\" value=\""+doclabels+"\" />");
      message.append("   </PARAMETERS>");
      message.append("</SERVICE_REQUEST>");
      // call the web service
      String servoutStr = schedulerService.defineJob(message.toString());
      SourceBean schedModRespSB = SchedulerUtilities.getSBFromWebServiceResponse(servoutStr);
      if(schedModRespSB==null) {
        throw new Exception("Imcomplete response returned by the Web service " +
                        "during job "+jobInfo.getJobName()+" creation");
     
View Full Code Here

    return toReturn;
  }

  private void getJobDetail(SourceBean request, SourceBean response) throws EMFUserError {
    try {
        SchedulerServiceSupplier schedulerService=new SchedulerServiceSupplier();
      List functionalities = DAOFactory.getLowFunctionalityDAO().loadAllLowFunctionalities(true);
      String jobName = (String)request.getAttribute("jobName");
      String jobGroupName = (String)request.getAttribute("jobGroupName");
          // call we service
      String respStr = schedulerService.getJobDefinition(jobName, jobGroupName);
            SourceBean jobDetailSB = SchedulerUtilities.getSBFromWebServiceResponse(respStr);
      if(jobDetailSB!=null) {
        JobInfo jobInfo = SchedulerUtilities.getJobInfoFromJobSourceBean(jobDetailSB);
        sessCont.setAttribute(SpagoBIConstants.JOB_INFO, jobInfo);
      } else {
View Full Code Here

TOP

Related Classes of it.eng.spagobi.services.scheduler.service.SchedulerServiceSupplier

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.