Examples of EventResponse


Examples of com.cloud.api.response.EventResponse

        return createTemplateResponses(templateId, host.getDataCenterId(), true);
    }

    @Override
    public EventResponse createEventResponse(Event event) {
        EventResponse responseEvent = new EventResponse();
        responseEvent.setCreated(event.getCreateDate());
        responseEvent.setDescription(event.getDescription());
        responseEvent.setEventType(event.getType());
        responseEvent.setId(event.getId());
        responseEvent.setLevel(event.getLevel());
        responseEvent.setParentId(event.getStartId());
        responseEvent.setState(event.getState());

        populateOwner(responseEvent, event);

        User user = ApiDBUtils.findUserById(event.getUserId());
        if (user != null) {
            responseEvent.setUsername(user.getUsername());
        }

        responseEvent.setObjectName("event");
        return responseEvent;
    }
View Full Code Here

Examples of javax.portlet.EventResponse

    @Test
    public void testEventPortletRequest() throws NoSuchFieldException, IllegalAccessException {
        ApplicationContext applicationContext = createMock(ApplicationContext.class);
        PortletContext portletContext = createMock(PortletContext.class);
        EventRequest request = createMock(EventRequest.class);
        EventResponse response = createMock(EventResponse.class);

        replay(applicationContext, portletContext, request, response);
        EventPortletRequest req = new EventPortletRequest(applicationContext,
                portletContext, request, response);
        Class<? extends EventPortletRequest> clazz = req.getClass();
View Full Code Here

Examples of javax.portlet.EventResponse

        PortletInvokerService invoker = getContainerServices().getPortletInvokerService();

        PortletRequestContext requestContext = rcService.getPortletEventRequestContext(this, request, response, portletWindow);
        PortletEventResponseContext responseContext = rcService.getPortletEventResponseContext(this, request, response, portletWindow);
        EventRequest portletRequest = envService.createEventRequest(requestContext, responseContext, event);
        EventResponse portletResponse = envService.createEventResponse(responseContext);

        FilterManager filterManager = filterInitialisation(portletWindow,PortletRequest.EVENT_PHASE);

        List<Event> events = null;
        try
View Full Code Here

Examples of javax.portlet.EventResponse

    {
        assertTrue(scriptPortlet instanceof EventPortlet);
       
        Map<String, String> values = new HashMap<String, String>();
        EventRequest request = createNiceMock(EventRequest.class);
        EventResponse response = createNiceMock(EventResponse.class);
       
        Event event = createNiceMock(Event.class);
        QName qname = new QName("unknown");
       
        expect(event.getQName()).andReturn(qname);
View Full Code Here

Examples of javax.portlet.EventResponse

        PortletInvokerService invoker = getContainerServices().getPortletInvokerService();

        PortletRequestContext requestContext = rcService.getPortletEventRequestContext(this, request, response, portletWindow);
        PortletEventResponseContext responseContext = rcService.getPortletEventResponseContext(this, request, response, portletWindow);
        EventRequest portletRequest = envService.createEventRequest(requestContext, responseContext, event);
        EventResponse portletResponse = envService.createEventResponse(responseContext);

        FilterManager filterManager = filterInitialisation(portletWindow,PortletRequest.EVENT_PHASE);

        List<Event> events = null;
        try
View Full Code Here

Examples of javax.portlet.EventResponse

            // The request methode is Event: call Portlet.processEvent(..)
            else if (methodId == PortletInvokerService.METHOD_EVENT)
            {
                EventRequest eventRequest = (EventRequest) portletRequest;
                EventResponse eventResponse = (EventResponse) portletResponse;
                filterManager.processFilter(eventRequest, eventResponse,
                        eventPortlet, portletContext);
            }
            // The requested method is ADMIN: call handlers.
            else if (methodId == PortletInvokerService.METHOD_ADMIN)
View Full Code Here

Examples of javax.portlet.EventResponse

      RenderRequest rreq = getRenderRequest();
      RenderResponse rresp = getRenderResponse();
      ActionRequest areq = getActionRequest();
      ActionResponse aresp = getActionResponse();
      EventRequest ereq = getEventRequest();
      EventResponse eresp = getEventResponse();
      ResourceRequest rsreq = getResourceRequest();
      ResourceResponse rsresp = getResourceResponse();
      PortletConfig portletConfig = getConfig();
      PortletSession portletSession = getSession();
      Map<String, Object> portletSessionScope = getPortletSessionScope();
View Full Code Here

Examples of javax.portlet.EventResponse

                }
            }
            else if (PortletWindow.Action.EVENT.equals(window.getAction()))
            {
                EventRequest eventRequest = (EventRequest)window.getPortletRequest();
                EventResponse eventResponse =  (EventResponse)window.getPortletResponse();
               
                if (filterManager != null)
                {
                    filterManager.processFilter(eventRequest, eventResponse, portletInstance, portletConfig.getPortletContext());
                }
View Full Code Here

Examples of javax.portlet.EventResponse

                }
            }
            else if (PortletWindow.Action.EVENT.equals(window.getAction()))
            {
                EventRequest eventRequest = (EventRequest)window.getPortletRequest();
                EventResponse eventResponse =  (EventResponse)window.getPortletResponse();
               
                if (filterManager != null)
                {
                    filterManager.processFilter(eventRequest, eventResponse, portletInstance, portletConfig.getPortletContext());
                }
View Full Code Here

Examples of javax.portlet.EventResponse

      RenderRequest rreq = getRenderRequest();
      RenderResponse rresp = getRenderResponse();
      ActionRequest areq = getActionRequest();
      ActionResponse aresp = getActionResponse();
      EventRequest ereq = getEventRequest();
      EventResponse eresp = getEventResponse();
      ResourceRequest rsreq = getResourceRequest();
      ResourceResponse rsresp = getResourceResponse();
      PortletConfig portletConfig = getConfig();
      PortletSession portletSession = getSession();
      Map<String, Object> portletSessionScope = getPortletSessionScope();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.