Package org.sonatype.nexus.component.source

Examples of org.sonatype.nexus.component.source.ComponentRequest


    when(mockComponent.getAssets()).thenReturn(asList(mock(RawAsset.class)));

    Iterable<ComponentEnvelope<RawComponent, RawAsset>> fetchedComponents = asList(mockComponent);

    final ImmutableMap<String, String> fetchParameters = ImmutableMap.of("path", PATH);
    final ComponentRequest fetchRequest = new ComponentRequest(fetchParameters);
    when(source.fetchComponents(eq(fetchRequest))).thenReturn(fetchedComponents);

    final ViewResponse handle = handler.handle(context);

    verify(source).fetchComponents(eq(fetchRequest));
View Full Code Here


        }

        // If not, contact the remote source and store whatever it has

        try {
          final ComponentRequest path = new ComponentRequest(ImmutableMap.of("path", requestPath));

          // Here we presume we're getting Component back, since we don't actually use the component metadata
          final Iterable<ComponentEnvelope<RawComponent, RawAsset>> envelopes = getSource().fetchComponents(path);

          for (ComponentEnvelope<RawComponent, RawAsset> envelope : envelopes) {
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.component.source.ComponentRequest

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.