Package it.eng.spagobi.utilities.service

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


      } 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


      JSONArray emptyListJSON = new JSONArray();
      JSONObject results = new JSONObject();
      results.put("message", message);
      results.put("results", emptyListJSON);
      results.put("totalCount", emptyListJSON.length());
      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

      }

      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

        throw new SpagoBIServiceException(SERVICE_NAME, "Impossible to check if a viewpoint with name [" + viewpointName + "] already exists", e);
      }
       
      try {
        JSONObject results = (JSONObject) SerializerFactory.getSerializer("application/json").serialize( viewpoint,null );
        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);
      }
View Full Code Here

      }
     
      try {
        JSONObject result = new JSONObject();
        result.put("result", message);
        writeBackToClient( new JSONSuccess( result ) );
      } 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

     
      try {
        JSONArray subObjectsListJSON = (JSONArray) SerializerFactory.getSerializer("application/json").serialize( subObjectsList,null );
        JSONObject results = new JSONObject();
        results.put("results", subObjectsListJSON);
        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

      JSONArray emptyListJSON = new JSONArray();
      JSONObject results = new JSONObject();
      results.put("message", message);
      results.put("results", emptyListJSON);
      results.put("totalCount", emptyListJSON.length());
      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

      MenuUtilities.getMenuItems(request, response, profile)
      try {
        JSONObject results = new JSONObject();
        results.put("username", username);
        results.put("userid", profile.getUserUniqueIdentifier());
        writeBackToClient( new JSONSuccess( results, callback ) );
      } 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

      } 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 (Throwable e) {
        throw new SpagoBIServiceException("Impossible to serialize datastore", e);
      }
     
      try {
        writeBackToClient( new JSONSuccess( results, 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

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.