Package it.eng.spago.error

Examples of it.eng.spago.error.EMFUserError


    String message = (String) request.getAttribute("MESSAGEDET");
    logger.debug("begin of detail Data Source service with message =" +message);
    EMFErrorHandler errorHandler = getErrorHandler();
    try {
      if (message == null) {
        EMFUserError userError = new EMFUserError(EMFErrorSeverity.ERROR, 101);
        logger.debug("The message parameter is null");
        throw userError;
      }
      logger.debug("The message parameter is: " + message.trim());
      if (message.trim().equalsIgnoreCase(SpagoBIConstants.DETAIL_SELECT)) {
View Full Code Here


      response.setAttribute("metaObj", meta);
    } catch (Exception ex) {
      logger.error("Cannot fill response container" + ex.getLocalizedMessage())
      HashMap params = new HashMap();
      params.put(AdmintoolsConstants.PAGE, ListObjMetadataModule.MODULE_PAGE);
      throw new EMFUserError(EMFErrorSeverity.ERROR, 13003, new Vector(), params);
    }
   
  }
View Full Code Here

      if (mod.equalsIgnoreCase(SpagoBIConstants.DETAIL_INS)) {     
        //if a ds with the same label not exists on db ok else error
        if (dao.loadObjMetadataByLabel(metaNew.getLabel()) != null){
          HashMap params = new HashMap();
          params.put(AdmintoolsConstants.PAGE, ListObjMetadataModule.MODULE_PAGE);
          EMFUserError error = new EMFUserError(EMFErrorSeverity.ERROR, 13004, new Vector(), params );
          getErrorHandler().addError(error);
          return;
        }      

        dao.insertObjMetadata(metaNew);
       
        ObjMetadata tmpMeta = dao.loadObjMetadataByLabel(metaNew.getLabel());
        metaNew.setObjMetaId(tmpMeta.getObjMetaId());
        mod = SpagoBIConstants.DETAIL_MOD;
      } else {       
        //update metadata
        dao.modifyObjMetadata(metaNew);     
     
      IDomainDAO domaindao = DAOFactory.getDomainDAO();
      List dataTypes = domaindao.loadListDomainsByType("OBJMETA_DATA_TYPE");
      serviceResponse.setAttribute(OBJMETA_DATA_TYPE, dataTypes);
     
      if (serviceRequest.getAttribute("SUBMESSAGEDET") != null &&
        ((String)serviceRequest.getAttribute("SUBMESSAGEDET")).equalsIgnoreCase(MOD_SAVE)) { 
        serviceResponse.setAttribute("modality", mod);
        serviceResponse.setAttribute("metaObj", metaNew);       
        return;
      }
      else if (serviceRequest.getAttribute("SUBMESSAGEDET") != null &&
          ((String)serviceRequest.getAttribute("SUBMESSAGEDET")).equalsIgnoreCase(MOD_SAVEBACK)){
          serviceResponse.setAttribute("loopback", "true");
            return;
      }              
    } catch (EMFUserError e){
      logger.error("Cannot fill response container" + e.getLocalizedMessage());
      HashMap params = new HashMap();
      params.put(AdmintoolsConstants.PAGE, ListObjMetadataModule.MODULE_PAGE);
      throw new EMFUserError(EMFErrorSeverity.ERROR, 13005, new Vector(), params);
     
    }
   
    catch (Exception ex) {   
      logger.error("Cannot fill response container" , ex);   
      throw new EMFUserError(EMFErrorSeverity.ERROR, 100);
    }     
  }
View Full Code Here

    }
    catch (EMFUserError e){
        logger.error("Cannot fill response container" + e.getLocalizedMessage());
        HashMap params = new HashMap();     
        params.put(AdmintoolsConstants.PAGE, ListObjMetadataModule.MODULE_PAGE);
        throw new EMFUserError(EMFErrorSeverity.ERROR, 13006, new Vector(), params);
       
    }
      catch (Exception ex) {   
        ex.printStackTrace();
      logger.error("Cannot fill response container" ,ex);
      throw new EMFUserError(EMFErrorSeverity.ERROR, 100);
      }
      response.setAttribute("loopback", "true");     
  }
View Full Code Here

      List dataTypes = domaindao.loadListDomainsByType("OBJMETA_DATA_TYPE");
      response.setAttribute(OBJMETA_DATA_TYPE, dataTypes);
     
    } catch (Exception ex) {
      logger.error("Cannot prepare page for the insertion" , ex);   
      throw new EMFUserError(EMFErrorSeverity.ERROR, 100);
    }
   
  }
View Full Code Here

      aSession = HibernateUtil.currentSession();
      Connection jdbcConnection = aSession.connection();
      IEngUserProfile profile = UserUtilities.getUserProfile();
      AuditLogUtilities.updateAudit(jdbcConnection,  profile, "activity.HotLinkMenu", null);
    } catch (HibernateException he) {
      throw new EMFUserError(EMFErrorSeverity.ERROR, 100);
    } finally {
      if (aSession!=null){
        if (aSession.isOpen()) aSession.close();
      }
    }
View Full Code Here

    SourceBean moduleResponse = (SourceBean)responseContainer.getServiceResponse().getAttribute("DetailObjMetadataModule");
   
    // 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";
    }
   
    // if there are errors and they are only validation errors return the name for the detail publisher
View Full Code Here

      logger.error("Error while loading the metadata with type " + (type!=null?type:""), he);     

      if (tx != null)
        tx.rollback();

      throw new EMFUserError(EMFErrorSeverity.ERROR, 100);

    } finally {
      if (aSession!=null){
        if (aSession.isOpen()) aSession.close();
        logger.debug("OUT");
View Full Code Here

      logger.error("Error while loading the metadata with id " + id.toString(), he);     

      if (tx != null)
        tx.rollback();

      throw new EMFUserError(EMFErrorSeverity.ERROR, 100);

    } finally {
      if (aSession!=null){
        if (aSession.isOpen()) aSession.close();
        logger.debug("OUT");
View Full Code Here

      tx.commit();
    } catch (HibernateException he) {
      logger.error("Error while loading the metadata with label " + label, he);
      if (tx != null)
        tx.rollback();
      throw new EMFUserError(EMFErrorSeverity.ERROR, 100);
    } finally {
      if (tmpSession!=null){
        if (tmpSession.isOpen()) tmpSession.close();
      }
    }
View Full Code Here

TOP

Related Classes of it.eng.spago.error.EMFUserError

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.