Package it.eng.spago.base

Examples of it.eng.spago.base.SourceBean


          logger.debug("data="+data.toString());
          Date beginDate=context.getScheduledFireTime();
          Date endDate=context.getNextFireTime();
         
         
          SourceBean request = null;
          SourceBean resp = null;
          EMFErrorHandler errorHandler = null;
         
          try {
            request = new SourceBean("");
            resp = new SourceBean("");
          } catch (SourceBeanException e1) {
            e1.printStackTrace();
          }
          RequestContainer reqContainer = new RequestContainer();
          ResponseContainer resContainer = new ResponseContainer();
View Full Code Here


    logger.debug("IN");

    EMFErrorHandler errorHandler = responseContainer.getErrorHandler();
   
    // get the module response
    SourceBean moduleResponse = (SourceBean)responseContainer.getServiceResponse();
    String publisher_Name = (String)moduleResponse.getAttribute("publisher_Name");
   
    // if there are errors and they are only validation errors return the name for the detail publisher
    if(errorHandler.isOK() && errorHandler.isOKBySeverity(EMFErrorSeverity.ERROR)) {
        if(publisher_Name!=null && publisher_Name !="") {       
          logger.info("Publish:" + publisher_Name);   
View Full Code Here

   
   

    public String composeWorksheetTemplate(String workSheetDef, String workSheetQuery, String smartFilterValues, String originalQbeTempl) throws SourceBeanException{
      SourceBean confSB = SourceBean.fromXMLString( originalQbeTempl );
    SourceBean wk_def_sb = new SourceBean(WORKSHEET_DEFINITION);
    wk_def_sb.setCharacters(workSheetDef);
    confSB.updAttribute(wk_def_sb);
   
    if(workSheetQuery!=null && !workSheetQuery.equals("") ){
      SourceBean query_sb = new SourceBean(QUERY);
      query_sb.setCharacters(workSheetQuery);
      confSB.updAttribute(query_sb);
    }
   
    if(smartFilterValues!=null && !smartFilterValues.equals("")){
      SourceBean smartFilterValuesSB = new SourceBean(FORM_VALUES);
      smartFilterValuesSB.setCharacters(smartFilterValues);
      confSB.updAttribute(smartFilterValuesSB);
    }

    String template = confSB.toXML(false)
    return template;
View Full Code Here

        logger.warn("Error while getting portal locale.");
        portalLocale = MessageBuilder.getBrowserLocaleFromSpago();
        logger.debug("Spago locale: " + portalLocale);
    }
   
    SourceBean languageSB = null;
    if(portalLocale != null && portalLocale.getLanguage() != null) {
      languageSB = (SourceBean)config.getFilteredSourceBeanAttribute("SPAGOBI.LANGUAGE_SUPPORTED.LANGUAGE",
          "language", portalLocale.getLanguage());
    }
   
    if(languageSB != null) {
      map.put("country", (String)languageSB.getAttribute("country"));
      map.put("language", (String)languageSB.getAttribute("language"));
      logger.debug("Added parameter: country/" + (String)languageSB.getAttribute("country"));
      logger.debug("Added parameter: language/" + (String)languageSB.getAttribute("language"));
    } else {
      logger.warn("Language " + portalLocale.getLanguage() + " is not supported by SpagoBI");
      logger.warn("Portal locale will be replaced with the default lacale (country: US; language: en).");
      map.put("country", "US");
      map.put("language", "en");
View Full Code Here

      logger.error("Error while getting portal locale.");
      portalLocale = MessageBuilder.getBrowserLocaleFromSpago();
      logger.debug("Spago locale: " + portalLocale);
  }

  SourceBean languageSB = null;
  if (portalLocale != null && portalLocale.getLanguage() != null) {
      languageSB = (SourceBean) config.getFilteredSourceBeanAttribute("SPAGOBI.LANGUAGE_SUPPORTED.LANGUAGE",
        "language", portalLocale.getLanguage());
  }

  if (languageSB != null) {
      map.put(COUNTRY, (String) languageSB.getAttribute("country"));
      map.put(LANGUAGE, (String) languageSB.getAttribute("language"));
      logger.debug("Added parameter: country/" + (String) languageSB.getAttribute("country"));
      logger.debug("Added parameter: language/" + (String) languageSB.getAttribute("language"));
  } else {
      logger.warn("Language " + portalLocale.getLanguage() + " is not supported by SpagoBI");
      logger.warn("Portal locale will be replaced with the default lacale (country: US; language: en).");
      map.put(COUNTRY, "US");
      map.put(COUNTRY, "en");
View Full Code Here

    if(xmlMetadata==null){
      logger.error("String rapresentation of metadata is null");
      return null;
    }
    SourceBean sb=null;
    try {
      //sb=new SourceBean(xmlMetadata);
      sb=SourceBean.fromXMLString(xmlMetadata);
    } catch (SourceBeanException e) {
      logger.error("wrong xml metadata format");
      return null;
    }

    List lst=sb.getAttributeAsList("ROWS.ROW");
    for (Iterator iterator = lst.iterator(); iterator.hasNext();) {
      SourceBean sbRow = (SourceBean)iterator.next();
      String name=sbRow.getAttribute("NAME")!= null ? sbRow.getAttribute("NAME").toString() : null;
      String type=sbRow.getAttribute("TYPE")!= null ? sbRow.getAttribute("TYPE").toString() : null;
      if(name!=null){
        FieldMetadata fieldMeta=new FieldMetadata();
        fieldMeta.setName(name);
        if(type!=null){
          // remove class!
View Full Code Here

      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");
      }
      // fill spago response
      response.updAttribute(SpagoBIConstants.PUBLISHER_NAME, "ReturnToTriggerList");
View Full Code Here

    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");
      }
      // fill spago response
      response.setAttribute(SpagoBIConstants.PUBLISHER_NAME, "ReturnToTriggerList");
View Full Code Here

      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);
        } else {
View Full Code Here

      }
     
      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");
      }
      response.setAttribute(SpagoBIConstants.PUBLISHER_NAME, "ReturnToTriggerList");
      response.setAttribute(SpagoBIConstants.JOB_GROUP_NAME, jobGroupName);
View Full Code Here

TOP

Related Classes of it.eng.spago.base.SourceBean

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.