Package it.eng.spago.base

Examples of it.eng.spago.base.SourceBean


    logger.debug("IN");

    EMFErrorHandler errorHandler = responseContainer.getErrorHandler();
   
    // gets the module response
    SourceBean moduleResponse = (SourceBean)responseContainer.getServiceResponse().getAttribute("DetailDistributionListModule");
   
    // if the module response is null throws an error and returns the name of the error publisher
    if(moduleResponse==null) {
      logger.error("Module response null");
      EMFUserError error = new EMFUserError(EMFErrorSeverity.ERROR, 100 );
      errorHandler.addError(error);     
      return "error";
    }
   
    // if there are errors and they are only validation errors return the name for the detail publisher
    if(!errorHandler.isOK()) {
      if(GeneralUtilities.isErrorHandlerContainingOnlyValidationError(errorHandler)) {
        logger.info("Publish: detailDistributionList"  );
        return "detailDistributionList";
      }
    }
   
    // if there are some errors into the errorHandler (not validation errors), return the name for the errors publisher
    if(!errorHandler.isOKBySeverity(EMFErrorSeverity.ERROR)) {
      return new String("error");
    }

        Object loop = moduleResponse.getAttribute("loopback");
        if (loop != null) {
          logger.info("Publish: detailDistributionListLoop"  );
          logger.debug("OUT");
          return "detailDistributionListLoop";
    } else {
View Full Code Here


      
     
     
      String res=DataSetAccessFunctions.getDataSetResultFromId(profile, dataName,parameters);
      if (res!=null){
        SourceBean sbRows=SourceBean.fromXMLString(res);
        //SourceBean myResultBean=(SourceBean)sbRows.getAttribute("ROW");
        result=sbRows.toString();
      }
     
      // replace special characters
      result = result.replaceAll("&lt;", "<");
      result = result.replaceAll("&gt;", ">");
View Full Code Here

      String datamartName = this.getAttributeAsString(DATAMART_NAME);
      logger.debug("Datamart's name: " + datamartName);
     
      checkIfDatamartExists(datamartName);
     
      SourceBean template = buildTemplate(datamartName);
     
      logger.debug("Creating engine instance ...");
      try {
        qbeEngineInstance = QbeEngine.createInstance( template, env );
      } catch(Throwable t) {
View Full Code Here

        logger.debug("OUT");
      }
  }

  private SourceBean buildTemplate(String datamartName) throws SourceBeanException {
    SourceBean template = new SourceBean(QbeXMLTemplateParser.TAG_ROOT_NORMAL);
    SourceBean datamart = new SourceBean(QbeXMLTemplateParser.TAG_DATAMART);
    datamart.setAttribute(QbeXMLTemplateParser.PROP_DATAMART_NAME, datamartName);
    template.setAttribute(datamart);
    return template;
    }
View Full Code Here

    if (!errorHandler.isOKBySeverity(EMFErrorSeverity.ERROR)) {
      return "error";
    }
   
    // get the module response
    SourceBean moduleResponse = (SourceBean) responseContainer.getServiceResponse().getAttribute("HotLinkModule");
    // if the module response is null throws an error and return the name of
    // the errors publisher
    if (moduleResponse == null) {
        logger.error("Module response null");
        EMFUserError error = new EMFUserError(EMFErrorSeverity.ERROR, 10);
        errorHandler.addError(error);
        return "error";
    }
    // get the value of the publisher name attribute
    String publisherName = (String) moduleResponse.getAttribute(SpagoBIConstants.PUBLISHER_NAME);
    if (publisherName != null && !publisherName.trim().equals("")) {
        return publisherName;
    } else {
      logger.error("Publisher name attribute not found");
        EMFUserError error = new EMFUserError(EMFErrorSeverity.ERROR, 10);
View Full Code Here

        if (!hibList.isEmpty()){
        Iterator it = hibList.iterator()
        while (it.hasNext()) {
          SbiLov lov = (SbiLov)it.next();
          String prov = lov.getLovProvider();
            SourceBean sb = SourceBean.fromXMLString(prov);
            SourceBean conn = (SourceBean)sb.getAttribute("CONNECTION");
            String conne = conn.getCharacters();
            if (conne.equals(hibDataSource.getLabel())){
              int cutStart = prov.indexOf("<CONNECTION>");
              cutStart = cutStart+12;
              int cutEnd = prov.indexOf("</CONNECTION>");
              String firstPart = prov.substring(0, cutStart);
View Full Code Here

  pars.put("document", documentId);
  logger.debug("Add document parameter:" + documentId);

  // retrieving the date format
  ConfigSingleton config = ConfigSingleton.getInstance();
  SourceBean formatSB = (SourceBean) config.getAttribute("DATA-ACCESS.DATE-FORMAT");
  String format = (formatSB == null) ? "DD-MM-YYYY" : (String) formatSB.getAttribute("format");
  pars.put("dateformat", format);
  pars = addBIParameters(biobj, pars);
  pars = addBIParameterDescriptions(biobj, pars);
  logger.debug("OUT");
  return pars;
View Full Code Here

   * Defines the internal structure for recording associations.
   */
  public UserAssociationsKeeper() {
    logger.debug("IN");
    try{
      associationSB = new SourceBean("USER_ASSOCIATIONS");
      roleAssSB = new SourceBean("ROLE_ASSOCIATIONS");
      engineAssSB = new SourceBean("ENGINE_ASSOCIATIONS");
      datasourceAssSB = new SourceBean("DATA_SOURCE_ASSOCIATIONS");
      associationSB.setAttribute(roleAssSB);
      associationSB.setAttribute(engineAssSB);
      associationSB.setAttribute(datasourceAssSB);
    } catch (Exception e) {
      logger.error("Error while creating the association SourceBean \n " , e );
View Full Code Here

      logger.warn("Cannot record the association between exported role "+exportedRoleName+" " +
          "and the role " + existingRolename + ", the association SourceBean is null");
      return;
    }
    try{
      SourceBean roleSB = (SourceBean) roleAssSB.getFilteredSourceBeanAttribute("ROLE_ASSOCIATION", "exported", exportedRoleName);
      // association already recorder
      if (roleSB != null) {
        roleSB.updAttribute("associatedTo", existingRolename);
        //return;
      } else {
        // record association
        roleSB = new SourceBean("ROLE_ASSOCIATION");
        roleSB.setAttribute("exported", exportedRoleName);
        roleSB.setAttribute("associatedTo", existingRolename);
        roleAssSB.setAttribute(roleSB);
      }
    } catch (Exception e) {
      logger.error( "Error while recording the association between exported role "+exportedRoleName+" " +
          "and the role " + existingRolename + " \n " , e);
View Full Code Here

 
  private String invokeExternalService(
      ExternalServiceConfiguration serviceConfig, JSONArray records) throws RemoteException {
    ExportRecordsServiceProxy proxy = new ExportRecordsServiceProxy();
    proxy.setEndpoint(serviceConfig.getEndpoint());
    SourceBean sb = (SourceBean) ConfigSingleton.getInstance().getAttribute("QBE.EXTERNAL_SERVICES");
    int timeout = Integer.parseInt((String) sb.getAttribute("timeout"));
    proxy.setTimeout(timeout);
    String result = null;
    try {
      result = proxy.processRecords(records.toString(), serviceConfig.getOperation());
    } catch (RemoteException e) {
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.