Examples of ActionRequest


Examples of javax.portlet.ActionRequest

    ExternalContext extCtx = ctx.getExternalContext();

    if (BridgeUtil.getPortletRequestPhase() ==
        Bridge.PortletPhase.ACTION_PHASE)
    {
      ActionRequest actionRequest = (ActionRequest) extCtx.getRequest();
      String contentType = extCtx.getRequestContentType();
      String actionContentType = actionRequest.getContentType();
      if ((contentType == null && actionContentType == null) ||
          contentType.equals(actionContentType))
      {
        testRunner.setTestResult(true,
                                 "extCtx.getRequestContentType() correctly returned the same value as actionRequest.getContentType()");
View Full Code Here

Examples of javax.portlet.ActionRequest

        // add the cocoon header timestamp
        res.setProperty("X-Cocoon-Version", Constants.VERSION);

        // get the request (wrapped if contains multipart-form data)
        ActionRequest request;
        try {
            if (this.enableUploads) {
                request = requestFactory.getServletRequest(req);
            } else {
                request = req;
            }
        } catch (Exception e) {
            if (getLogger().isErrorEnabled()) {
                getLogger().error("Problem with Cocoon portlet", e);
            }

            manageException(req, res, null, null,
                            "Problem in creating the Request", null, null, e);
            return;
        }

        // Get the cocoon engine instance
        Cocoon cocoon = getCocoon();

        // Check if cocoon was initialized
        if (cocoon == null) {
            manageException(request, res, null, null,
                            "Initialization Problem",
                            null /* "Cocoon was not initialized" */,
                            null /* "Cocoon was not initialized, cannot process request" */,
                            this.exception);
            return;
        }

        // We got it... Process the request
        String uri = this.servletPath;
        if (uri == null) {
            uri = "portlets/" + getPortletConfig().getPortletName();
        }

        // override servlet-path by the request
        if (servletPathOverriding) {
            String reqServletPath = (String) request.getAttribute("servlet-path");

            if (reqServletPath != null) {
                uri = reqServletPath;
            } else {
                PortletPreferences prefs = request.getPreferences();
               
                if (prefs != null) {
                    uri = prefs.getValue("servlet-path", uri);
                }
            }
View Full Code Here

Examples of javax.portlet.ActionRequest

            Thread.currentThread().setContextClassLoader(paClassLoader);

            if (method == ContainerConstants.METHOD_ACTION)
            {
                ActionRequest actionRequest = (ActionRequest) portletRequest;
                ActionResponse actionResponse = (ActionResponse) portletResponse;

                portletInstance.processAction(actionRequest, actionResponse);
            }
            else if (method == ContainerConstants.METHOD_RENDER)
View Full Code Here

Examples of javax.portlet.ActionRequest

        }

        String location = null;

        InternalActionResponse _actionResponse = null;
        ActionRequest actionRequest = null;

        try
        {
            /*ActionRequest*/
            actionRequest =
View Full Code Here

Examples of javax.portlet.ActionRequest

    // This tests that we can encode a new mode in an actionURL
    // done by navigation rule.
    if (BridgeUtil.getPortletRequestPhase() ==
        Bridge.PortletPhase.ACTION_PHASE)
    {
      ActionRequest aRequest =
        new ActionRequestWrapper((ActionRequest) extCtx.getRequest());

      extCtx.setRequest(aRequest);
      if (extCtx.getRequest() == aRequest)
      {
View Full Code Here

Examples of jodd.madvoc.ActionRequest

   * On first invoke, initializes the action configuration before further proceeding.
   *
   * @see jodd.madvoc.component.ActionMethodParser#buildActionPath(String, String, String, String, String)
   */
  public String invoke(String actionPath, HttpServletRequest servletRequest, HttpServletResponse servletResponse) throws Exception {
    ActionRequest actionRequest = null;

    boolean characterEncodingSet = false;

    while (actionPath != null) {
      if (log.isDebugEnabled()) {
        log.debug("Action path: " + actionPath);
      }

      // build action path
      String httpMethod = servletRequest.getMethod().toUpperCase();

      actionPath = actionPathRewriter.rewrite(servletRequest, actionPath, httpMethod);

      // resolve action configuration
      ActionConfig actionConfig = actionsManager.lookup(actionPath, httpMethod);
      if (actionConfig == null) {
        return actionPath;
      }
      if (log.isDebugEnabled()) {
        log.debug("Invoking action path '" + actionPath + "' using " + actionConfig.actionClass.getSimpleName());
      }

      // set character encoding
      if (!characterEncodingSet && madvocConfig.isApplyCharacterEncoding()) {

        String encoding = madvocConfig.getEncoding();

        if (encoding != null) {
          servletRequest.setCharacterEncoding(encoding);
          servletResponse.setCharacterEncoding(encoding);
        }

        characterEncodingSet = true;
      }

      // create action object
      Object action = createAction(actionConfig.actionClass);

      // create action request
      ActionRequest previousRequest = actionRequest;
      actionRequest = createActionRequest(actionPath, actionConfig, action, servletRequest, servletResponse);
      actionRequest.setPreviousActionRequest(previousRequest);

      // invoke and render
      if (actionConfig.isAsync()) {
View Full Code Here

Examples of org.apache.ambari.server.controller.ActionRequest

      if (PropertyHelper.getPropertyCategory(propertyid).equals("parameters")
          && null != entry.getValue()) {
        params.put(PropertyHelper.getPropertyName(propertyid), entry.getValue().toString());
      }
    }
    return new ActionRequest(
        (Stringproperties.get(ACTION_CLUSTER_NAME_PROPERTY_ID),
        (Stringproperties.get(ACTION_SERVICE_NAME_PROPERTY_ID),
        (Stringproperties.get(ACTION_ACTION_NAME_PROPERTY_ID),
        params);
  }
View Full Code Here

Examples of org.apache.ambari.server.controller.ActionRequest

  public static class ActionRequestSetMatcher extends HashSet<ActionRequest> implements IArgumentMatcher {

    private final ActionRequest actionRequest;

    public ActionRequestSetMatcher(String clusterName, String serviceName, String actionName) {
      this.actionRequest = new ActionRequest(clusterName, serviceName, actionName, null);
      add(this.actionRequest);
    }
View Full Code Here

Examples of org.apache.ambari.server.controller.ActionRequest

          propertyCategory.equals("parameters") &&
          null != entry.getValue()) {
        params.put(PropertyHelper.getPropertyName(propertyid), entry.getValue().toString());
      }
    }
    return new ActionRequest(
        (Stringproperties.get(ACTION_CLUSTER_NAME_PROPERTY_ID),
        (Stringproperties.get(ACTION_SERVICE_NAME_PROPERTY_ID),
        (Stringproperties.get(ACTION_ACTION_NAME_PROPERTY_ID),
        params);
  }
View Full Code Here

Examples of org.cybergarage.upnp.control.ActionRequest

  private void soapActionRecieved(HTTPRequest soapReq) {
    String uri = soapReq.getURI();
    Service ctlService = getServiceByControlURL(uri);
    if (ctlService != null) {
      ActionRequest crlReq = new ActionRequest(soapReq);
      deviceControlRequestRecieved(crlReq, ctlService);
      return;
    }
    soapBadActionRecieved(soapReq);
  }
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.