Examples of URLHelper


Examples of flash.util.URLHelper

      {
        // escape spaces if we have any
        uri = URLHelper.escapeSpace(uri);

            // be sure that ?debug=true is included in query string
        URLHelper urlHelper = new URLHelper(uri);
        Map<String, String> params = urlHelper.getParameterMap();
        params.put("debug", "true"); //$NON-NLS-1$ //$NON-NLS-2$
        urlHelper.setParameterMap(params);

        uri = urlHelper.getURL();
        }
    }
    else
    {
      // ok, its not an http: type request therefore we should be able to see
View Full Code Here

Examples of flash.util.URLHelper

      {
        // escape spaces if we have any
        uri = URLHelper.escapeSpace(uri);

            // be sure that ?debug=true is included in query string
        URLHelper urlHelper = new URLHelper(uri);
        Map<String, String> params = urlHelper.getParameterMap();
        params.put("debug", "true"); //$NON-NLS-1$ //$NON-NLS-2$
        urlHelper.setParameterMap(params);

        uri = urlHelper.getURL();
        }
    }
    else
    {
      // ok, its not an http: type request therefore we should be able to see
View Full Code Here

Examples of org.apache.struts2.views.util.UrlHelper

        //mock container
        Container container = EasyMock.createNiceMock(Container.class);
        EasyMock.expect(container.getInstance(XWorkConverter.class)).andReturn(converter).anyTimes();

        UrlHelper urlHelper = new DefaultUrlHelper();
        EasyMock.expect(container.getInstance(UrlHelper.class)).andReturn(urlHelper).anyTimes();

        EasyMock.replay(container);
        stackContext.put(ActionContext.CONTAINER, container);
        actionContext.setContainer(container);
View Full Code Here

Examples of org.apache.struts2.views.util.UrlHelper

        params.put( "projectId", projectId );

        params.put( "projectName", projectName );

        UrlHelper urlHelper = UrlHelperFactory.getInstance();
       
        String baseUrl = urlHelper.buildUrl( "/workingCopy.action", ServletActionContext.getRequest(),
                                             ServletActionContext.getResponse(), params );

        String imagesBaseUrl = urlHelper.buildUrl( "/images/", ServletActionContext.getRequest(),
                                                   ServletActionContext.getResponse(), params );

        imagesBaseUrl = imagesBaseUrl.substring( 0, imagesBaseUrl.indexOf( "/images/" ) + "/images/".length() );

        if ( getContinuum().getConfiguration().isDistributedBuildEnabled() )
View Full Code Here

Examples of org.apache.struts2.views.util.UrlHelper

        Container container = EasyMock.createNiceMock(Container.class);
        EasyMock.expect(container.getInstance(XWorkConverter.class)).andReturn(converter).anyTimes();
        EasyMock.expect(container.getInstanceNames(FileManager.class)).andReturn(new HashSet<String>()).anyTimes();
        EasyMock.expect(container.getInstance(FileManager.class)).andReturn(fileManager).anyTimes();

        UrlHelper urlHelper = new DefaultUrlHelper();
        EasyMock.expect(container.getInstance(UrlHelper.class)).andReturn(urlHelper).anyTimes();
        FileManagerFactory fileManagerFactory = new DummyFileManagerFactory();
        EasyMock.expect(container.getInstance(FileManagerFactory.class)).andReturn(fileManagerFactory).anyTimes();

        EasyMock.replay(container);
View Full Code Here

Examples of org.apache.struts2.views.util.UrlHelper

        TextParser parser = new OgnlTextParser();
        EasyMock.expect(container.getInstance(TextParser.class)).andReturn(parser).anyTimes();
        EasyMock.expect(container.getInstanceNames(FileManager.class)).andReturn(new HashSet<String>()).anyTimes();
        EasyMock.expect(container.getInstance(FileManager.class)).andReturn(fileManager).anyTimes();

        UrlHelper urlHelper = new DefaultUrlHelper();
        EasyMock.expect(container.getInstance(UrlHelper.class)).andReturn(urlHelper).anyTimes();
        FileManagerFactory fileManagerFactory = new DummyFileManagerFactory();
        EasyMock.expect(container.getInstance(FileManagerFactory.class)).andReturn(fileManagerFactory).anyTimes();

        EasyMock.replay(container);
View Full Code Here

Examples of org.apache.struts2.views.util.UrlHelper

    }

    public static void handle(String location, boolean flush) throws Exception {
        final HttpServletResponse response = ServletActionContext.getResponse();
        final HttpServletRequest request = ServletActionContext.getRequest();
        final UrlHelper urlHelper = ServletActionContext.getContext().getInstance(UrlHelper.class);

        int i = location.indexOf("?");
        if (i > 0) {
            //extract params from the url and add them to the request
            Map<String, Object> parameters = ActionContext.getContext().getParameters();
            String query = location.substring(i + 1);
            Map<String, Object> queryParams = urlHelper.parseQueryString(query, true);
            if (queryParams != null && !queryParams.isEmpty())
                parameters.putAll(queryParams);
            location = location.substring(0, i);
        }
View Full Code Here

Examples of org.infoglue.cms.util.URLHelper

   *
   */
  protected void execute() throws WorkflowException
  {
    final String baseURL   = CmsPropertyHandler.getPreviewDeliveryUrl();
    final URLHelper helper = new URLHelper(baseURL, content.getId(), previewSiteNode.getId(), language.getId());
    setPropertySetString(PREVIEW_URL_PROPERTYSET_KEY, helper.getURL());
  }
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.