Package org.oasis.wsrp.v2

Examples of org.oasis.wsrp.v2.HandleEvents


   @Override
   protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
   {
      WSRP2Producer producer = ProducerHolder.getProducer();

      GetResource getResource = ResourceServingUtil.decode(req);

      try
      {
         ResourceResponse resource = producer.getResource(getResource);
         ResourceContext resourceContext = resource.getResourceContext();
         byte[] itemBinary = resourceContext.getItemBinary();
         String itemString = resourceContext.getItemString();

         final String mimeType = resourceContext.getMimeType();
         if (!ParameterValidation.isNullOrEmpty(mimeType))
         {
            resp.setContentType(mimeType);
         }

         if (itemBinary != null && itemBinary.length > 0)
         {
            resp.getOutputStream().write(itemBinary);
         }

         if (!ParameterValidation.isNullOrEmpty(itemString))
         {
            resp.getWriter().write(itemString);
         }
      }
      catch (Exception exception)
      {
         throw new ServletException("Couldn't get resource " + getResource.getResourceParams().getResourceID()
            + " for portlet " + getResource.getPortletContext(), exception);
      }
   }
View Full Code Here


      PortletStateChangeRequired, ResourceSuspended, UnsupportedLocale, UnsupportedMimeType, UnsupportedMode,
      UnsupportedWindowState
   {
      forceSessionAccess();

      HandleEvents handleEvents = WSRPTypeFactory.createHandleEvents(registrationContext, portletContext, runtimeContext, userContext, markupParams, eventParams);

      HandleEventsResponse response = producer.handleEvents(handleEvents);

      updateResponse.value = response.getUpdateResponse();
      failedEvents.value = response.getFailedEvents();
View Full Code Here

      PortletStateChangeRequired, ResourceSuspended, UnsupportedLocale, UnsupportedMimeType, UnsupportedMode,
      UnsupportedWindowState
   {
      forceSessionAccess();

      HandleEvents handleEvents = WSRPTypeFactory.createHandleEvents(registrationContext, portletContext, runtimeContext, userContext, markupParams, eventParams);

      HandleEventsResponse response = producer.handleEvents(handleEvents);

      updateResponse.value = response.getUpdateResponse();
      failedEvents.value = response.getFailedEvents();
View Full Code Here

      PortletStateChangeRequired, ResourceSuspended, UnsupportedLocale, UnsupportedMimeType, UnsupportedMode,
      UnsupportedWindowState
   {
      forceSessionAccess();

      HandleEvents handleEvents = WSRPTypeFactory.createHandleEvents(registrationContext, portletContext, runtimeContext, userContext, markupParams, eventParams);

      HandleEventsResponse response = producer.handleEvents(handleEvents);

      updateResponse.value = response.getUpdateResponse();
      failedEvents.value = response.getFailedEvents();
View Full Code Here

      ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(portletContext.getPortletHandle(), "portlet handle", "PortletContext");
      ParameterValidation.throwIllegalArgExceptionIfNull(runtimeContext, "RuntimeContext");
      ParameterValidation.throwIllegalArgExceptionIfNull(markupParams, "MarkupParams");
      ParameterValidation.throwIllegalArgExceptionIfNull(eventParams, "EventParams");

      HandleEvents handleEvents = new HandleEvents();
      handleEvents.setRegistrationContext(registrationContext);
      handleEvents.setPortletContext(portletContext);
      handleEvents.setRuntimeContext(runtimeContext);
      handleEvents.setUserContext(userContext);
      handleEvents.setMarkupParams(markupParams);
      handleEvents.setEventParams(eventParams);
      return handleEvents;
   }
View Full Code Here

         PerformBlockingInteraction performBlockingInteraction = (PerformBlockingInteraction)request;
         return new ActionRequestProcessor(producer, performBlockingInteraction);
      }
      else if (request instanceof HandleEvents)
      {
         HandleEvents handleEvents = (HandleEvents)request;
         try
         {
            return new EventRequestProcessor(producer, handleEvents);
         }
         catch (OperationNotSupported operationNotSupported)
View Full Code Here

      ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(portletContext.getPortletHandle(), "portlet handle", "PortletContext");
      ParameterValidation.throwIllegalArgExceptionIfNull(runtimeContext, "RuntimeContext");
      ParameterValidation.throwIllegalArgExceptionIfNull(markupParams, "MarkupParams");
      ParameterValidation.throwIllegalArgExceptionIfNull(eventParams, "EventParams");

      HandleEvents handleEvents = new HandleEvents();
      handleEvents.setRegistrationContext(registrationContext);
      handleEvents.setPortletContext(portletContext);
      handleEvents.setRuntimeContext(runtimeContext);
      handleEvents.setUserContext(userContext);
      handleEvents.setMarkupParams(markupParams);
      handleEvents.setEventParams(eventParams);
      return handleEvents;
   }
View Full Code Here

      PortletStateChangeRequired, ResourceSuspended, UnsupportedLocale, UnsupportedMimeType, UnsupportedMode,
      UnsupportedWindowState
   {
      forceSessionAccess();

      HandleEvents handleEvents = WSRPTypeFactory.createHandleEvents(registrationContext, portletContext, runtimeContext, userContext, markupParams, eventParams);

      HandleEventsResponse response = producer.handleEvents(handleEvents);

      updateResponse.value = response.getUpdateResponse();
      failedEvents.value = response.getFailedEvents();
View Full Code Here

      ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(portletContext.getPortletHandle(), "portlet handle", "PortletContext");
      ParameterValidation.throwIllegalArgExceptionIfNull(runtimeContext, "RuntimeContext");
      ParameterValidation.throwIllegalArgExceptionIfNull(markupParams, "MarkupParams");
      ParameterValidation.throwIllegalArgExceptionIfNull(eventParams, "EventParams");

      HandleEvents handleEvents = new HandleEvents();
      handleEvents.setRegistrationContext(registrationContext);
      handleEvents.setPortletContext(portletContext);
      handleEvents.setRuntimeContext(runtimeContext);
      handleEvents.setUserContext(userContext);
      handleEvents.setMarkupParams(markupParams);
      handleEvents.setEventParams(eventParams);
      return handleEvents;
   }
View Full Code Here

   protected HandleEventsResponse internalProcessResponse(PortletInvocationResponse response)
   {
      if (response instanceof UpdateNavigationalStateResponse)
      {
         UpdateNavigationalStateResponse unsResponse = (UpdateNavigationalStateResponse)response;
         HandleEventsResponse eventsResponse = WSRPTypeFactory.createHandleEventsReponse();

         UpdateResponse updateResponse = createUpdateResponse(unsResponse);
         eventsResponse.setUpdateResponse(updateResponse);

         return eventsResponse;
      }
      else
      {
View Full Code Here

TOP

Related Classes of org.oasis.wsrp.v2.HandleEvents

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.