Package it.eng.spagobi.utilities.service

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


      }
     
      Assert.assertNotNull(response, "An internal error occurred while generating service response. Service response cannot be null");
           
      try {
        writeBackToClient( new JSONSuccess( response ) );
      } catch (IOException e) {
        throw new SpagoBIServiceException(SERVICE_NAME, "Impossible to write back the responce to the client", e);
      }
    } finally {
      logger.debug("OUT");
View Full Code Here


     
      try {
        JSONArray snapshotsListJSON = (JSONArray) SerializerFactory.getSerializer("application/json").serialize( snapshotsList ,null);
        JSONObject results = new JSONObject();
        results.put("results", snapshotsListJSON);
        writeBackToClient( new JSONSuccess( results ) );
      } catch (IOException e) {
        throw new SpagoBIServiceException(SERVICE_NAME, "Impossible to write back the responce to the client", e);
      } catch (SerializationException e) {
        throw new SpagoBIServiceException(SERVICE_NAME, "Cannot serialize objects", e);
      } catch (JSONException e) {
View Full Code Here

      } catch (Throwable e) {
        throw new SpagoBIServiceException("Impossible to serialize datastore", e);
      }
     
      try {
        writeBackToClient( new JSONSuccess( dataSetJSON, callback ) );
      } catch (IOException e) {
        throw new SpagoBIServiceException("Impossible to write back the responce to the client", e);
      }
    } catch (Throwable t) {
      throw SpagoBIEngineServiceExceptionHandler.getInstance().getWrappedException(getActionName(), getEngineInstance(), t);
View Full Code Here

    } catch (SerializationException e) {
      e.printStackTrace();
    }
   
    try {
      writeBackToClient( new JSONSuccess( rolesJSON ) );
    } catch (IOException e) {
      throw new SpagoBIServiceException("Impossible to write back the responce to the client", e);
    }
    } catch (Throwable t) {
      SpagoBIServiceExceptionHandler.getInstance().getWrappedException(SERVICE_NAME, t);
View Full Code Here

      }
      try {
        JSONObject results = new JSONObject();
        results.put("result", "OK");
        writeBackToClient(new JSONSuccess(results));
      } catch (IOException e) {
        throw new SpagoBIServiceException(SERVICE_NAME, "Impossible to write back the responce to the client", e);
      } catch (JSONException e) {
        throw new SpagoBIServiceException(SERVICE_NAME, "Cannot serialize objects into a JSON object", e);
      }
View Full Code Here

      }
      // END building JSON object to be returned
     
     
      try {
        writeBackToClient( new JSONSuccess( valuesJSON ) );
      } catch (IOException e) {
        throw new SpagoBIServiceException("Impossible to write back the responce to the client", e);
      }
   
    } finally {
View Full Code Here

      JSONArray documentsJSON = (JSONArray)SerializerFactory.getSerializer("application/json").serialize( objects,null );
      JSONObject documentsResponseJSON =  createJSONResponseDocuments(documentsJSON);
   
      try {
        if(callback == null) {
          writeBackToClient( new JSONSuccess( createJSONResponse(documentsResponseJSON) ) );
        } else {
          writeBackToClient( new JSONSuccess( createJSONResponse(documentsResponseJSON), callback ) );
        }
      } catch (IOException e) {
        throw new SpagoBIException("Impossible to write back the responce to the client", e);
      }
     
View Full Code Here

        }
      }
      JSONObject documentsResponseJSON =  createJSONResponseDocuments(documentsJSON);
   
      try {
        writeBackToClient( new JSONSuccess( createJSONResponse(documentsResponseJSON) ) );
      } catch (IOException e) {
        logger.error(e.getMessage(), e);
        throw new SpagoBIException("Impossible to write back the responce to the client", e);
      }
     
View Full Code Here

      MessageBuilder m = new MessageBuilder();
      Locale locale = m.getLocale(httpRequest);
      JSONArray foldersJSON = (JSONArray)SerializerFactory.getSerializer("application/json").serialize( functionalities,locale );
     
      try {
        writeBackToClient( new JSONSuccesscreateJSONResponse(foldersJSON) ) ) ;
      } catch (IOException e) {
        throw new SpagoBIException("Impossible to write back the responce to the client", e);
      }
     
    } catch (Throwable t) {
View Full Code Here

      responseJSON.put("maps", mapsJSON);
     
      logger.debug( "Generated service response: " + responseJSON.toString() );
     
      try {
        writeBackToClient( new JSONSuccess(responseJSON) );
      } catch (IOException e) {
        String message = "Impossible to write back the responce to the client";
        throw new SpagoBIEngineServiceException(getActionName(), message, e);
      }   
    } catch (Throwable t) {
View Full Code Here

TOP

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

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.