Package it.eng.spagobi.engines.qbe.externalservices

Examples of it.eng.spagobi.engines.qbe.externalservices.ExternalServiceConfiguration


 
  public JSONArray getExternalServiceConfigurationsAsJSONArray() throws JSONException {
    JSONArray toReturn = new JSONArray();
    Iterator<ExternalServiceConfiguration> it = externalServicesConfiguration.iterator();
    while (it.hasNext()) {
      ExternalServiceConfiguration aServiceConfig = it.next();
      JSONObject obj = new JSONObject();
      obj.put("id", aServiceConfig.getId());
      obj.put("description", aServiceConfig.getDescription());
      toReturn.put(obj);
    }
    return toReturn;
  }
View Full Code Here


                + " attribute is mandatory.");
            e.addHint("Check document template in external service details section");
            throw e;
          }
         
          ExternalServiceConfiguration conf = new ExternalServiceConfiguration();
          String id = UUID.randomUUID().toString();
          logger.debug("Created id = " + id + " for service with description [" + description + "]");
          conf.setId(id);
          conf.setDescription(description);
          conf.setEndpoint(endpoint);
          conf.setOperation(operation);
          if (requiredColumns != null && !requiredColumns.trim().equals("")) {
            conf.setRequiredColumns(requiredColumns.split(","));
          }
          qbeTemplate.addExternalServiceConfiguration(conf);
        }
       
      } else {
View Full Code Here

     
      totalTimeMonitor = MonitorFactory.start("QbeEngine.invokeExternalServiceAction.totalTime");
     
      Assert.assertNotNull(getEngineInstance(), "It's not possible to execute " + this.getActionName() + " service before having properly created an instance of EngineInstance class");
     
      ExternalServiceConfiguration serviceConfig = this.getExternalServiceConfiguration();
      Assert.assertNotNull(serviceConfig, "Required service not found!!!");
     
      JSONArray records = this.getAttributeAsJSONArray(RECORDS);
      Assert.assertNotNull(records, "Parameter [" + RECORDS + "] cannot be null in oder to execute " + this.getActionName() + " service");
View Full Code Here

  }

  private ExternalServiceConfiguration getExternalServiceConfiguration() {
    try {
      logger.debug("IN");
      ExternalServiceConfiguration toReturn = null;
      String serviceId = this.getAttributeAsString(SERVICE_ID);
      logger.debug("Parameter [" + SERVICE_ID + "] is equals to [" + serviceId + "]");
      Assert.assertNotNull(serviceId, "Parameter [" + SERVICE_ID + "] cannot be null in oder to execute " + this.getActionName() + " service");
      List<ExternalServiceConfiguration> services = getEngineInstance().getTemplate().getExternalServiceConfigurations();
      Iterator<ExternalServiceConfiguration> it = services.iterator();
      while (it.hasNext()) {
        ExternalServiceConfiguration temp = it.next();
        if (temp.getId().equals(serviceId)) {
          logger.debug("Required service found");
          toReturn = temp;
          break;
        }
      }
View Full Code Here

TOP

Related Classes of it.eng.spagobi.engines.qbe.externalservices.ExternalServiceConfiguration

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.