@Named
@Singleton
public class GroupHandler
extends org.sonatype.goodies.common.ComponentSupport
implements org.sonatype.nexus.repository.view.Handler
Modifier and Type | Class and Description |
---|---|
static class |
GroupHandler.DispatchedRepositories
Request-context state container for set of repositories already dispatched to.
|
Modifier and Type | Field and Description |
---|---|
static String |
IGNORE_FIREWALL |
static String |
INSUFFICIENT_LICENSE |
static String |
USE_DISPATCHED_RESPONSE |
Constructor and Description |
---|
GroupHandler() |
Modifier and Type | Method and Description |
---|---|
protected org.sonatype.nexus.repository.view.Response |
doGet(org.sonatype.nexus.repository.view.Context context,
GroupHandler.DispatchedRepositories dispatched)
Method that actually performs group GET.
|
protected LinkedHashMap<org.sonatype.nexus.repository.Repository,org.sonatype.nexus.repository.view.Response> |
getAll(org.sonatype.nexus.repository.view.Context context,
Iterable<org.sonatype.nexus.repository.Repository> members,
GroupHandler.DispatchedRepositories dispatched)
Returns all responses from all members as a linked map, where order is group member order.
|
protected LinkedHashMap<org.sonatype.nexus.repository.Repository,org.sonatype.nexus.repository.view.Response> |
getAll(org.sonatype.nexus.repository.view.Request request,
org.sonatype.nexus.repository.view.Context context,
Iterable<org.sonatype.nexus.repository.Repository> members,
GroupHandler.DispatchedRepositories dispatched)
Similar to
getAll(Context, Iterable, DispatchedRepositories) , but allows for using a
different request then provided by the Context.getRequest() while still using the
same Context to execute the request in. |
protected org.sonatype.nexus.repository.view.Response |
getFirst(org.sonatype.nexus.repository.view.Context context,
List<org.sonatype.nexus.repository.Repository> members,
GroupHandler.DispatchedRepositories dispatched)
Returns the first OK response from member repositories or
HttpResponses.notFound() if none of the members
responded with OK. |
org.sonatype.nexus.repository.view.Response |
handle(org.sonatype.nexus.repository.view.Context context) |
protected org.sonatype.nexus.repository.view.Response |
notFoundResponse(org.sonatype.nexus.repository.view.Context context)
Returns standard 404 with no message.
|
public static final String IGNORE_FIREWALL
public static final String USE_DISPATCHED_RESPONSE
public static final String INSUFFICIENT_LICENSE
@Nonnull public org.sonatype.nexus.repository.view.Response handle(@Nonnull org.sonatype.nexus.repository.view.Context context) throws Exception
Exception
protected org.sonatype.nexus.repository.view.Response doGet(@Nonnull org.sonatype.nexus.repository.view.Context context, @Nonnull GroupHandler.DispatchedRepositories dispatched) throws Exception
Exception
protected org.sonatype.nexus.repository.view.Response getFirst(@Nonnull org.sonatype.nexus.repository.view.Context context, @Nonnull List<org.sonatype.nexus.repository.Repository> members, @Nonnull GroupHandler.DispatchedRepositories dispatched) throws Exception
HttpResponses.notFound()
if none of the members
responded with OK.Exception
protected LinkedHashMap<org.sonatype.nexus.repository.Repository,org.sonatype.nexus.repository.view.Response> getAll(@Nonnull org.sonatype.nexus.repository.view.Context context, @Nonnull Iterable<org.sonatype.nexus.repository.Repository> members, @Nonnull GroupHandler.DispatchedRepositories dispatched) throws Exception
Exception
protected LinkedHashMap<org.sonatype.nexus.repository.Repository,org.sonatype.nexus.repository.view.Response> getAll(@Nonnull org.sonatype.nexus.repository.view.Request request, @Nonnull org.sonatype.nexus.repository.view.Context context, @Nonnull Iterable<org.sonatype.nexus.repository.Repository> members, @Nonnull GroupHandler.DispatchedRepositories dispatched) throws Exception
getAll(Context, Iterable, DispatchedRepositories)
, but allows for using a
different request then provided by the Context.getRequest()
while still using the
same Context
to execute the request in.request
- Request
that could be different then the Context.getRequest()
context
- Context
members
- Repository
'sdispatched
- GroupHandler.DispatchedRepositories
Exception
- throw for any issues dispatching the requestprotected org.sonatype.nexus.repository.view.Response notFoundResponse(org.sonatype.nexus.repository.view.Context context)
Copyright © 2008–2021 Sonatype, Inc.. All rights reserved.