Package it.eng.spago.dispatching.service

Examples of it.eng.spago.dispatching.service.RequestContextIFace


              }
            }
            // *******************************************************************
          } else {
              Exception serviceException = (Exception)responseContainer.getAttribute(PORTLET_EXCEPTION);
                RequestContextIFace requestContext =
                    new DefaultRequestContext(requestContainer, responseContainer);
                PublisherConfiguration publisher =
                  Publisher.getPublisherConfiguration(requestContext,
                      serviceException);
              String publisherType = publisher.getType();
View Full Code Here


   
    public void service(HttpServletRequest request, HttpServletResponse response)
            throws IOException, ServletException {
        Monitor monitor = null;
      IEventNotifier eventNotifier = null;
      RequestContextIFace requestContext = null;

        try {
          SourceBean serviceRequest = null;
            EMFErrorHandler emfErrorHandler = null;
            EMFExceptionHandler exceptionHandler = new EMFExceptionHandler();
View Full Code Here

      request.delAttribute("TYPE_ORDER");
      request.setAttribute("TYPE_ORDER",currentTypOrder);     
    }

    InitializerIFace serviceInitializer = (InitializerIFace) service;
    RequestContextIFace serviceRequestContext = (RequestContextIFace) service;
    int pagedRows = 10;
    SourceBean rowsSourceBean = null;
    pagedRows = Integer.parseInt((String) serviceInitializer.getConfig().getAttribute("ROWS"));
    paginator.setPageSize(pagedRows);
    SourceBean statement = (SourceBean) serviceInitializer.getConfig().getAttribute("QUERIES.SELECT_QUERY");   
   
    try {     
     
      aSession = HibernateUtil.currentSession();
      tx = aSession.beginTransaction();
      Connection jdbcConnection = aSession.connection();
      DataConnection dataConnection = getDataConnection(jdbcConnection);
     
      rowsSourceBean =
        (SourceBean) DelegatedQueryExecutor.executeQuery(
          serviceRequestContext.getRequestContainer(),
          serviceRequestContext.getResponseContainer(),
          dataConnection,
          statement,
          "SELECT");
    } catch (HibernateException he) {
      logException(he);
      if (tx != null)
        tx.rollback();
      throw new EMFUserError(EMFErrorSeverity.ERROR, 100);
    } finally {
      if (aSession != null) {
        if (aSession.isOpen()) aSession.close();
      }
    }
    List rowsVector = null;
    if (rowsSourceBean != null)
      rowsVector = rowsSourceBean.getAttributeAsList(DataRow.ROW_TAG);
    if (rowsSourceBean == null) {
      EMFErrorHandler engErrorHandler = serviceRequestContext.getErrorHandler();
      engErrorHandler.addError(new EMFUserError(EMFErrorSeverity.INFORMATION, 10001));
    }
    else
      for (int i = 0; i < rowsVector.size(); i++)
        paginator.addRow(rowsVector.get(i));   
   
    ListIFace list = new GenericList();
    list.setPaginator(paginator);
   
    // filter the list
    Object valuefilterObj = (Object)request.getAttribute(SpagoBIConstants.VALUE_FILTER);
    String valuefilter = null;
    if(valuefilterObj!=null){
      valuefilter = valuefilterObj.toString();
    }
    //String valuefilter = (String)request.getAttribute(SpagoBIConstants.VALUE_FILTER);
    if (valuefilter != null) {
      String columnfilter = (String) request
          .getAttribute(SpagoBIConstants.COLUMN_FILTER);
      String typeFilter = (String) request
          .getAttribute(SpagoBIConstants.TYPE_FILTER);
      String typeValueFilter = (String) request
          .getAttribute(SpagoBIConstants.TYPE_VALUE_FILTER);
      list = filterList(list, valuefilter, typeValueFilter, columnfilter, typeFilter, serviceRequestContext.getErrorHandler());
    }
   
    return list;
  }
View Full Code Here

TOP

Related Classes of it.eng.spago.dispatching.service.RequestContextIFace

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.