Examples of RequestHandler


Examples of org.ofbiz.webapp.control.RequestHandler

                    delim = "&";
                }

                out.write("<a href=\"");
                ServletContext servletContext = request.getSession().getServletContext();
                RequestHandler rh = (RequestHandler) servletContext.getAttribute("_REQUEST_HANDLER_");
                out.append(rh.makeLink(request, response, "/" + fullRequest, false, false, true));
                out.write("\">Edit</a>");
                out.write("</div>");
            }

            public String getEditStyle() {

Examples of org.ofbiz.webapp.control.RequestHandler

                    delim = "&";
                }

                out.write("<a href=\"");
                ServletContext servletContext = request.getSession().getServletContext();
                RequestHandler rh = (RequestHandler) servletContext.getAttribute("_REQUEST_HANDLER_");
                out.append(rh.makeLink(request, response, "/" + fullRequest, false, false, true));
                out.write("\">Edit</a>");
                out.write("</div>");
            }

            public String getEditStyle() {

Examples of org.ofbiz.webapp.control.RequestHandler

            return this.fields;

        } else if ("link".equalsIgnoreCase(name)) {
            // link to this content

            RequestHandler rh = (RequestHandler) this.context.get("_REQUEST_HANDLER_");
            HttpServletRequest request = (HttpServletRequest) this.context.get("request");
            HttpServletResponse response = (HttpServletResponse) this.context.get("response");

            if (rh != null && request != null && response != null) {
                String webSiteId = WebSiteWorker.getWebSiteId(request);
                Delegator delegator = (Delegator) request.getAttribute("delegator");
               
                String contentUri = this.contentId;
                // Try and find a WebSitePathAlias record to use, it isn't very feasible to find an alias by (parent)contentId/mapKey
                // so we're only looking for a direct alias using contentId
                if (webSiteId != null && delegator != null) {
                    EntityCondition condition = EntityCondition.makeCondition(
                            UtilMisc.toMap(
                                    "mapKey", null,
                                    "webSiteId", webSiteId,
                                    "contentId", this.contentId
                            )
                    );
                    try {
                        List<GenericValue> webSitePathAliases = delegator.findList("WebSitePathAlias", condition, null, null, null, true);
                        GenericValue webSitePathAlias = EntityUtil.getFirst(webSitePathAliases);
                        if (webSitePathAlias != null) {
                            contentUri = webSitePathAlias.getString("pathAlias");
                        }
                    } catch (GenericEntityException e) {
                        Debug.logError(e, module);
                    }
                }
                String contextLink = rh.makeLink(request, response, contentUri, true, false, true);
                // Debug.logInfo("Made link to content with ID [" + this.contentId + "]: " + contextLink, module);
                return contextLink;
            } else {
                return this.contentId;
            }

Examples of org.ofbiz.webapp.control.RequestHandler

                        String ovrdKeyword = productStoreKeywordOvrd.getString("keyword");
                        if (keywords.contains(ovrdKeyword)) {
                            String targetTypeEnumId = productStoreKeywordOvrd.getString("targetTypeEnumId");
                            String target = productStoreKeywordOvrd.getString("target");
                            ServletContext ctx = (ServletContext) request.getAttribute("servletContext");
                            RequestHandler rh = (RequestHandler) ctx.getAttribute("_REQUEST_HANDLER_");
                            if ("KOTT_PRODCAT".equals(targetTypeEnumId)) {
                                String requestName = "/category/~category_id=" + target;
                                target = rh.makeLink(request, response, requestName, false, false, false);
                            } else if ("KOTT_PRODUCT".equals(targetTypeEnumId)) {
                                String requestName = "/product/~product_id=" + target;
                                target = rh.makeLink(request, response, requestName, false, false, false);
                            } else if ("KOTT_OFBURL".equals(targetTypeEnumId)) {
                                target = rh.makeLink(request, response, target, false, false, false);
                            } else if ("KOTT_AURL".equals(targetTypeEnumId)) {
                                // do nothing, is absolute URL
                            } else {
                                Debug.logError("The targetTypeEnumId [] is not recognized, not doing keyword override", module);
                                // might as well see if there are any others...

Examples of org.ofbiz.webapp.webdav.RequestHandler

        this.handlerMap.put("PUT", new PutHandler());
        this.handlerMap.put("UNLOCK", doNothingHandler);
    }

    public RequestHandler getHandler(String method) {
        RequestHandler handler = this.handlerMap.get(method);
        if (handler == null) {
            return invalidMethodHandler;
        }
        return handler;
    }

Examples of org.openengsb.core.api.remote.RequestHandler

    private RequestMapperFilter requestMapperFilter;

    @Before
    public void setUp() {
        RequestHandler requestHandlerMock = mock(RequestHandler.class);
        when(requestHandlerMock.handleCall(any(MethodCall.class))).thenAnswer(new Answer<MethodResult>() {
            @Override
            public MethodResult answer(InvocationOnMock invocation) throws Throwable {
                MethodCall input = (MethodCall) invocation.getArguments()[0];
                return new MethodResult(input.getArgs()[0]);
            }

Examples of org.openstreetmap.josm.io.remotecontrol.handler.RequestHandler

                String help = "No command specified! The following commands are available:<ul>" + usage
                        + "</ul>" + "See <a href=\""+websiteDoc+"\">"+websiteDoc+"</a> for complete documentation.";
                sendBadRequest(out, help);
            } else {
                // create handler object
                RequestHandler handler = handlerClass.newInstance();
                try {
                    handler.setCommand(command);
                    handler.setUrl(url);
                    handler.setSender(sender);
                    handler.handle();
                    sendHeader(out, "200 OK", handler.getContentType(), false);
                    out.write("Content-length: " + handler.getContent().length()
                            + "\r\n");
                    out.write("\r\n");
                    out.write(handler.getContent());
                    out.flush();
                } catch (RequestHandlerErrorException ex) {
                    sendError(out);
                } catch (RequestHandlerBadRequestException ex) {
                    sendBadRequest(out, ex.getMessage());

Examples of org.sonar.api.server.ws.RequestHandler

  private void defineIndexAction(NewController controller) {
    controller.createAction("index")
      .setInternal(true)
      .setDescription("List the JAR files to be downloaded by source analyzer")
      .setHandler(new RequestHandler() {
        @Override
        public void handle(Request request, Response response) {
          try {
            response.stream().setMediaType("text/plain");
            IOUtils.write(batchIndex.getIndex(), response.stream().output());

Examples of org.vnetcon.xml.ws.servlet.request.RequestHandler

        e.printStackTrace();
      }
    }
   
    if(iLength > 0){
      RequestHandler rh = null;
      String requestString = null;
      String reply = null;
      buffer = new byte[iLength];
      reqIn.read(buffer, 0, iLength);
      requestString = new String(buffer, 0, iLength);
      try{
        byte[] buf = null;
        rh = new RequestHandler(requestString, this.wsClass, this.hashWebMethods, requestUrl);
        reply = rh.execute();
        resp.setContentType("text/xml");
        //resp.getWriter().println(reply);
        buf = reply.getBytes();
        if(buf.length > 10000000){
          throw new Exception("Buffer size exceed GAE limit 10.000.000 bytes: " + buf.length);

Examples of org.wso2.carbon.business.messaging.salesforce.mediator.handler.RequestHandler

                cfgCtx = ((Axis2SynapseEnvironment) synEnv).getAxis2ConfigurationContext();
                if (log.isDebugEnabled()) {
                    log.debug("Using default synapse Axis2 Configuration");
                }
            }
            requestHandler = new RequestHandler(cfgCtx);
            if (log.isDebugEnabled()) {
                log.debug("Salesforce mediator was initialized successfully");
            }
        } catch (AxisFault e) {
            String msg = "Error initializing salesforce mediator : "
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.