Package it.eng.spagobi.utilities.service

Examples of it.eng.spagobi.utilities.service.JSONAcknowledge


      IModelEntity parentEntity = getDataSource().getModelStructure().getEntity(parentEntityUniqueName);
      calculatedField.setParent(parentEntity);
      parentEntity.deleteCalculatedField(calculatedField.getUniqueName());
     
      try {
        writeBackToClient( new JSONAcknowledge() );
      } catch (IOException e) {
        String message = "Impossible to write back the responce to the client";
        throw new SpagoBIEngineServiceException(getActionName(), message, e);
      }
     
View Full Code Here


      Integer id = getAttributeAsInteger(ID);
      try {
        Role aRole = roleDao.loadByID(id);
        roleDao.eraseRole(aRole);
        logger.debug("Role deleted");
        writeBackToClient( new JSONAcknowledge("Operazion succeded") );

      } catch (Throwable e) {
        logger.error("Exception occurred while deleting role", e);
        throw new SpagoBIServiceException(SERVICE_NAME,
            "Exception occurred while deleting role",
View Full Code Here

        groovyScriptEngine.put("fields", qFields);
       
        Object calculatedValue = null;
        try {
          calculatedValue = groovyScriptEngine.eval(expression);
          jsonResponse = new JSONAcknowledge();
        } catch (ScriptException e) {
          SpagoBIEngineServiceException validationException;
          Throwable t = e;
          String msg = t.getMessage();
          while( (msg = t.getMessage()) == null && t.getCause()!= null) t = t.getCause();
View Full Code Here

     
      IModelEntity parentEntity = getDataSource().getModelStructure().getEntity(parentEntityUniqueName);
      parentEntity.addCalculatedField(calculatedField);
     
      try {
        writeBackToClient( new JSONAcknowledge() );
      } catch (IOException e) {
        String message = "Impossible to write back the responce to the client";
        throw new SpagoBIEngineServiceException(getActionName(), message, e);
      }
     
View Full Code Here

        Assert.assertNotNull(query, "A query with id equals to [" + id + "] does not exist in teh catalogue");
        logger.debug("Qury with id equals to [" + QUERY_IDS + "] has been removed succesfully from the catalogue]");
      }
     
      try {
        writeBackToClient( new JSONAcknowledge() );
      } catch (IOException e) {
        String message = "Impossible to write back the responce to the client";
        throw new SpagoBIEngineServiceException(getActionName(), message, e);
      }
     
View Full Code Here

      Assert.assertNotNull(calculatedFields, "Calculated field map cannot be null in order to execute " + this.getActionName() + " service");
     
      getDataSource().getConfiguration().saveCalculatedFields(calculatedFields);
     
      try {
        writeBackToClient( new JSONAcknowledge() );
      } catch (IOException e) {
        String message = "Impossible to write back the responce to the client";
        throw new SpagoBIEngineServiceException(getActionName(), message, e);
      }
     
View Full Code Here

    } else if (serviceType != null  && serviceType.equalsIgnoreCase(KPI_DELETE)) {
      Integer id = getAttributeAsInteger(ID);
      try {
        kpiDao.deleteKpi(id);
        logger.debug("Resource deleted");
        writeBackToClient( new JSONAcknowledge("Operation succeded") );
      } catch (Throwable e) {
        logger.error("Exception occurred while retrieving resource to delete", e);
        throw new SpagoBIServiceException(SERVICE_NAME,
            "Exception occurred while retrieving resource to delete", e);
      }
View Full Code Here

    } else if (serviceType != null  && serviceType.equalsIgnoreCase(THRESHOLD_DELETE)) {
      Integer id = getAttributeAsInteger(ID);
      try {
        thrDao.deleteThreshold(id);
        logger.debug("Threshold deleted");
        writeBackToClient( new JSONAcknowledge("Operation succeded") );
      } catch (Throwable e) {
        logger.error("Exception occurred while retrieving Threshold to delete", e);
        throw new SpagoBIServiceException(SERVICE_NAME,
            "Exception occurred while retrieving Threshold to delete", e);
      }
    }else if (serviceType != null  && serviceType.equalsIgnoreCase(THR_VAL_DELETE)) {
      Integer id = getAttributeAsInteger(THR_VAL_ID_TO_DELETE);
      try {
        tDao.deleteThresholdValue(id);
       
        logger.debug("Threshold value deleted deleted");
        writeBackToClient( new JSONAcknowledge("Operation succeded") );
      } catch (Throwable e) {
        logger.error("Exception occurred while retrieving Threshold value  to delete", e);
        throw new SpagoBIServiceException(SERVICE_NAME,
            "Exception occurred while retrieving Threshold value  to delete", e);
      }
View Full Code Here

    } else if (serviceType != null  && serviceType.equalsIgnoreCase(DataSetConstants.DATASET_DELETE)) {
      Integer dsID = getAttributeAsInteger(DataSetConstants.ID);
      try {
        dsDao.deleteDataSet(dsID);
        logger.debug("Dataset deleted");
        writeBackToClient( new JSONAcknowledge("Operation succeded") );
      } catch (Throwable e) {
        logger.error("Exception occurred while retrieving dataset to delete", e);
        throw new SpagoBIServiceException(SERVICE_NAME,"sbi.ds.deleteDsError", e);
      }
    }else if (serviceType != null  && serviceType.equalsIgnoreCase(DataSetConstants.DATASET_VERSION_DELETE)) {
      Integer dsVersionID = getAttributeAsInteger(DataSetConstants.VERSION_ID);
      try {
        boolean deleted = dsDao.deleteInactiveDataSetVersion(dsVersionID)
        if(deleted){
          logger.debug("Dataset Version deleted");
          writeBackToClient( new JSONAcknowledge("Operation succeded") );
        }else{
          throw new SpagoBIServiceException(SERVICE_NAME,"sbi.ds.deleteVersion");
        }
      } catch (Throwable e) {
        logger.error("Exception occurred while retrieving dataset version to delete", e);
        throw new SpagoBIServiceException(SERVICE_NAME,"sbi.ds.deleteVersion", e);
      }
    }else if (serviceType != null  && serviceType.equalsIgnoreCase(DataSetConstants.DATASET_ALL_VERSIONS_DELETE)) {
      Integer dsID = getAttributeAsInteger(DataSetConstants.DS_ID);
      try {
        dsDao.deleteAllInactiveDataSetVersions(dsID);
        logger.debug("All Older Dataset versions deleted");
        writeBackToClient( new JSONAcknowledge("Operation succeded") );
      } catch (Throwable e) {
        logger.error("Exception occurred while retrieving dataset to delete", e);
        throw new SpagoBIServiceException(SERVICE_NAME,"sbi.ds.deleteVersion", e);
      }
    }else if (serviceType != null  && serviceType.equalsIgnoreCase(DataSetConstants.DATASET_VERSION_RESTORE)) {
View Full Code Here

      //      ((UserProfile)profile).setFunctionalities(coll);
      // end refresh of the functionalities
      logger.debug("FIltered functionalities for selected role "+selRole);

      try {
        writeBackToClient( new JSONAcknowledge() );
      } catch (IOException e) {
        String message = "Impossible to write back the responce to the client";
        throw new SpagoBIEngineServiceException(getActionName(), message, e);
      }
View Full Code Here

TOP

Related Classes of it.eng.spagobi.utilities.service.JSONAcknowledge

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.