Package it.eng.spagobi.utilities.exceptions

Examples of it.eng.spagobi.utilities.exceptions.SpagoBIException


      JSONObject foldersResponseJSON =  createJSONResponseFolders(foldersJSON);
   
      try {
        writeBackToClient( new JSONSuccess( createJSONResponse(foldersResponseJSON, documentsResponseJSON) ) );
      } catch (IOException e) {
        throw new SpagoBIException("Impossible to write back the responce to the client", e);
      }
     
    } catch (Throwable t) {
      throw new SpagoBIException("An unexpected error occured while executing " + getActionName(), t);
    } finally {
      logger.debug("OUT");
    }
  }
View Full Code Here


                  }
        }
        searcher.close();
      } catch (CorruptIndexException e) {
        logger.error(e.getMessage(), e);
        throw new SpagoBIException("Index corrupted", e);
       
      } catch (IOException e) {
        logger.error(e.getMessage(), e);
        throw new SpagoBIException("Unable to read index", e);
       
      } // only searching, so
      catch (ParseException e) {
        logger.error(e.getMessage(), e);
        throw new SpagoBIException("Wrong query syntax", e);
       
      }
     
   
      JSONArray documentsJSON = (JSONArray)SerializerFactory.getSerializer("application/json").serialize( objects, null);
      for(int i=0; i<documentsJSON.length();i++){
        JSONObject jsonobj = documentsJSON.getJSONObject(i);
        String biobjid = jsonobj.getString("id");
        String summary = (String)returned.get(biobjid);
        jsonobj.put("summary", summary);
        String views = (String)returned.get(biobjid+"-views");
        jsonobj.put("views", views);
      }
      Collection func = profile.getFunctionalities();
     
      if(func.contains("SeeMetadataFunctionality")){
        JSONObject showmetadataAction = new JSONObject();
        showmetadataAction.put("name", "showmetadata");
        showmetadataAction.put("description", "Show Metadata");
        for(int i = 0; i < documentsJSON.length(); i++) {
          JSONObject documentJSON = documentsJSON.getJSONObject(i);
          documentJSON.getJSONArray("actions").put(showmetadataAction);
        }
      }
      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);
      }
     
    } catch (Exception e) {
      logger.error("Excepiton",e);
    } finally {
View Full Code Here

      jsonFTree = (JSONArray)SerializerFactory.getSerializer("application/json").serialize( folders,locale );

      try {
        writeBackToClient( new JSONSuccesscreateNode(jsonFTree) ) ) ;
      } catch (IOException e) {
        throw new SpagoBIException("Impossible to write back the responce to the client", e);
      }
    } catch (Throwable t) {
      throw new SpagoBIException("An unexpected error occured while executing GET_FTREE_FOLDERS_ACTION", t);
    } finally {
      logger.debug("OUT");
    }
  }
View Full Code Here

          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);
      }
     
    } catch (Throwable t) {
      throw new SpagoBIException("An unexpected error occured while executing " + getActionName(), t);
    } finally {
      logger.debug("OUT");
    }
  }
View Full Code Here

        response.setAttribute("metaConfiguration", jsonObj);
      }     
     
    } catch (Throwable t) {
      logger.error("[DAJS]:: error", t);
      throw new SpagoBIException("An unexpected error occured while executing UserDocumentsBrowserPortletStartAction", t);
    } finally {
      logger.debug("OUT");
    }
  } 
View Full Code Here

      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) {
      // TODO set up spago's trap mechanism and move this error handling code to a specialized action
      String message = "Impossible to write back the responce to the client";
View Full Code Here

        }
       
      }
      response.setAttribute("metaConfiguration", jsonObj);     
    } catch (Throwable t) {
      throw new SpagoBIException("An unexpected error occured while executing UserDocumentsBrowserStartAction", t);
    } finally {
      logger.debug("OUT");
    }
  }
View Full Code Here

TOP

Related Classes of it.eng.spagobi.utilities.exceptions.SpagoBIException

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.