Package aQute.bnd.osgi

Examples of aQute.bnd.osgi.Macro$Link


    @Test
    public void null_value_is_a_remove()
    {
        Request request = mockRequest(null);
        Link link = mockLink();

        String pageName = "Foo";
        String componentId = "bar.baz";
        String fieldName = "woops";
View Full Code Here


     */
    @Test
    public void discard_changes()
    {
        Request request = mockRequest(null);
        Link link = mockLink();

        String pageName = "Foo";
        String componentId = "bar.baz";
        String fieldName = "woops";

View Full Code Here

        ComponentEventRequestParameters parameters = new ComponentEventRequestParameters(activePageName,
                page.getName(), toBlank(nestedId), eventType,
                new ArrayEventContext(typeCoercer, pageActivationContext), new ArrayEventContext(typeCoercer,
                        eventContext));

        Link link = linkEncoder.createComponentEventLink(parameters, forForm);

        for (LinkCreationListener2 listener : listeners)
            listener.createdComponentEventLink(link, parameters);

        return link;
View Full Code Here

                && pageCache.get(pageName).hasResetListeners();

        PageRenderRequestParameters parameters = new PageRenderRequestParameters(canonical, new ArrayEventContext(
                typeCoercer, context), loopback);

        Link link = linkEncoder.createPageRenderLink(parameters);

        for (LinkCreationListener2 listener : listeners)
            listener.createdPageRenderLink(link, parameters);

        return link;
View Full Code Here

   public void check_add_javascript_calls_component_resources_to_create_url()
   {
      Object [] context = new Object[]{ "something", "somewhere" };
      ComponentResources resources = mockComponentResources();
      JavaScriptSupport javaScriptSupport = mockJavaScriptSupport();
      Link link = mockLink();
     
      Zone zone = mockZone();
     
      ZoneRefresh zoneRefresh = new ZoneRefresh(context, resources, javaScriptSupport, zone);
     
      expect(resources.createEventLink("zoneRefresh", context)).andReturn(link);
      expect(link.toAbsoluteURI()).andReturn("mylink");
     
      JSONObject params = new JSONObject();
      params.put("period", 0);
      params.put("id", zone.getClientId());
      params.put("URL", "mylink");
View Full Code Here

                if (value == null)
                {
                    return;
                }

                Link link = event.getEventContext().get(Link.class, 0);

                String clientValue = encoder.toClient(value);

                // TAP5-1768: escape special characters
                clientValue = urlEncoder.encode(clientValue);

                link.addParameter(parameterName, clientValue);
            }
        };

        support.addEventHandler(EventConstants.DECORATE_COMPONENT_EVENT_LINK, 0,
                String.format("ActivationRequestParameterWorker decorate component event link event handler for field %s as query parameter '%s'", fieldName, parameterName), handler);
View Full Code Here

                                                                              manager, optimizer, null, null, null,
                                                                              false);

        PageRenderRequestParameters parameters = new PageRenderRequestParameters("MyPage", new EmptyEventContext());

        Link link = encoder.createPageRenderLink(parameters);

        assertEquals(link.toAbsoluteURI(), "MAGIC");

        verify();
    }
View Full Code Here

        return asset;
    }

    protected final Link mockLink(String absoluteURI)
    {
        Link link = mockLink();

        expect(link.toURI()).andReturn(absoluteURI).atLeastOnce();

        return link;
    }
View Full Code Here

        "id", menuId,

        "class", "t-autocomplete-menu");
        writer.end();

        Link link = resources.createEventLink(EVENT_NAME);

        JSONObject config = new JSONObject();
        config.put("paramName", PARAM_NAME);
        config.put("indicator", loaderId);

        if (resources.isBound("minChars"))
            config.put("minChars", minChars);

        if (resources.isBound("frequency"))
            config.put("frequency", frequency);

        if (resources.isBound("tokens"))
        {
            for (int i = 0; i < tokens.length(); i++)
            {
                config.accumulate("tokens", tokens.substring(i, i + 1));
            }
        }

        // Let subclasses do more.
        configure(config);

        JSONObject spec = new JSONObject("elementId", id, "menuId", menuId, "url", link.toURI()).put("config",
                config);

        jsSupport.addInitializerCall("autocompleter", spec);
    }
View Full Code Here

        // Page is secure but request is not, so redirect.
        // We can safely ignore the forForm parameter since secure form requests are always done from
        // an already secured page

        Link link = componentEventLinkEncoder.createComponentEventLink(parameters, false);

        response.sendRedirect(link);

        return true;
    }
View Full Code Here

TOP

Related Classes of aQute.bnd.osgi.Macro$Link

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.