Search in sources :

Example 31 with Context

use of javax.ws.rs.core.Context in project cxf by apache.

the class ResourceUtils method createConstructorArguments.

public static Object[] createConstructorArguments(Constructor<?> c, Message m, boolean perRequest, Map<Class<?>, Object> contextValues, Class<?>[] params, Annotation[][] anns, Type[] genericTypes) {
    if (m == null) {
        m = new MessageImpl();
    }
    @SuppressWarnings("unchecked") MultivaluedMap<String, String> templateValues = (MultivaluedMap<String, String>) m.get(URITemplate.TEMPLATE_PARAMETERS);
    Object[] values = new Object[params.length];
    for (int i = 0; i < params.length; i++) {
        if (AnnotationUtils.getAnnotation(anns[i], Context.class) != null) {
            Object contextValue = contextValues != null ? contextValues.get(params[i]) : null;
            if (contextValue == null) {
                if (perRequest || InjectionUtils.VALUE_CONTEXTS.contains(params[i].getName())) {
                    values[i] = JAXRSUtils.createContextValue(m, genericTypes[i], params[i]);
                } else {
                    values[i] = InjectionUtils.createThreadLocalProxy(params[i]);
                }
            } else {
                values[i] = contextValue;
            }
        } else {
            // this branch won't execute for singletons given that the found constructor
            // is guaranteed to have only Context parameters, if any, for singletons
            Parameter p = ResourceUtils.getParameter(i, anns[i], params[i]);
            values[i] = JAXRSUtils.createHttpParameterValue(p, params[i], genericTypes[i], anns[i], m, templateValues, null);
        }
    }
    return values;
}
Also used : Context(javax.ws.rs.core.Context) Parameter(org.apache.cxf.jaxrs.model.Parameter) MultivaluedMap(javax.ws.rs.core.MultivaluedMap) MessageImpl(org.apache.cxf.message.MessageImpl)

Example 32 with Context

use of javax.ws.rs.core.Context in project jersey by jersey.

the class RetryHandlerTest method testRetryPost.

@Test
public void testRetryPost() throws IOException {
    ClientConfig cc = new ClientConfig();
    cc.connectorProvider(new ApacheConnectorProvider());
    cc.property(ApacheClientProperties.RETRY_HANDLER, (HttpRequestRetryHandler) (exception, executionCount, context) -> true);
    cc.property(ClientProperties.READ_TIMEOUT, READ_TIMEOUT_MS);
    Client client = ClientBuilder.newClient(cc);
    WebTarget r = client.target(getBaseUri());
    assertEquals("POST", r.request().property(ClientProperties.REQUEST_ENTITY_PROCESSING, RequestEntityProcessing.BUFFERED).post(Entity.text("POST"), String.class));
}
Also used : POST(javax.ws.rs.POST) Context(javax.ws.rs.core.Context) GET(javax.ws.rs.GET) ClientConfig(org.glassfish.jersey.client.ClientConfig) Path(javax.ws.rs.Path) Client(javax.ws.rs.client.Client) IOException(java.io.IOException) Test(org.junit.Test) Application(javax.ws.rs.core.Application) ClientProperties(org.glassfish.jersey.client.ClientProperties) Entity(javax.ws.rs.client.Entity) ClientBuilder(javax.ws.rs.client.ClientBuilder) JerseyTest(org.glassfish.jersey.test.JerseyTest) HttpHeaders(javax.ws.rs.core.HttpHeaders) RequestEntityProcessing(org.glassfish.jersey.client.RequestEntityProcessing) ResourceConfig(org.glassfish.jersey.server.ResourceConfig) WebTarget(javax.ws.rs.client.WebTarget) HttpRequestRetryHandler(org.apache.http.client.HttpRequestRetryHandler) Assert.assertEquals(org.junit.Assert.assertEquals) WebTarget(javax.ws.rs.client.WebTarget) ClientConfig(org.glassfish.jersey.client.ClientConfig) Client(javax.ws.rs.client.Client) Test(org.junit.Test) JerseyTest(org.glassfish.jersey.test.JerseyTest)

Example 33 with Context

use of javax.ws.rs.core.Context in project nifi by apache.

the class SnippetResource method deleteSnippet.

/**
 * Removes the specified snippet.
 *
 * @param httpServletRequest request
 * @param snippetId          The id of the snippet to remove.
 * @return A entity containing the client id and an updated revision.
 */
@DELETE
@Consumes(MediaType.WILDCARD)
@Produces(MediaType.APPLICATION_JSON)
@Path("{id}")
@ApiOperation(value = "Deletes the components in a snippet and discards the snippet", response = SnippetEntity.class, authorizations = { @Authorization(value = "Write - /{component-type}/{uuid} - For each component in the Snippet and their descendant components"), @Authorization(value = "Write - Parent Process Group - /process-groups/{uuid}") })
@ApiResponses(value = { @ApiResponse(code = 400, message = "NiFi was unable to complete the request because it was invalid. The request should not be retried without modification."), @ApiResponse(code = 401, message = "Client could not be authenticated."), @ApiResponse(code = 403, message = "Client is not authorized to make this request."), @ApiResponse(code = 404, message = "The specified resource could not be found."), @ApiResponse(code = 409, message = "The request was valid but NiFi was not in the appropriate state to process it. Retrying the same request later may be successful.") })
public Response deleteSnippet(@Context final HttpServletRequest httpServletRequest, @ApiParam(value = "The snippet id.", required = true) @PathParam("id") final String snippetId) {
    if (isReplicateRequest()) {
        return replicate(HttpMethod.DELETE);
    }
    final ComponentEntity requestEntity = new ComponentEntity();
    requestEntity.setId(snippetId);
    // get the revision from this snippet
    final Set<Revision> requestRevisions = serviceFacade.getRevisionsFromSnippet(snippetId);
    return withWriteLock(serviceFacade, requestEntity, requestRevisions, lookup -> {
        // ensure write permission to every component in the snippet excluding referenced services
        final SnippetAuthorizable snippet = lookup.getSnippet(snippetId);
        authorizeSnippet(snippet, authorizer, lookup, RequestAction.WRITE, true, false);
        // ensure write permission to the parent process group
        snippet.getParentProcessGroup().authorize(authorizer, RequestAction.WRITE, NiFiUserUtils.getNiFiUser());
    }, () -> serviceFacade.verifyDeleteSnippet(snippetId, requestRevisions.stream().map(rev -> rev.getComponentId()).collect(Collectors.toSet())), (revisions, entity) -> {
        // delete the specified snippet
        final SnippetEntity snippetEntity = serviceFacade.deleteSnippet(revisions, entity.getId());
        return generateOkResponse(snippetEntity).build();
    });
}
Also used : PathParam(javax.ws.rs.PathParam) Revision(org.apache.nifi.web.Revision) Produces(javax.ws.rs.Produces) Path(javax.ws.rs.Path) ApiParam(io.swagger.annotations.ApiParam) AccessDeniedException(org.apache.nifi.authorization.AccessDeniedException) ApiResponses(io.swagger.annotations.ApiResponses) HttpMethod(javax.ws.rs.HttpMethod) ApiOperation(io.swagger.annotations.ApiOperation) SnippetEntity(org.apache.nifi.web.api.entity.SnippetEntity) HttpServletRequest(javax.servlet.http.HttpServletRequest) MediaType(javax.ws.rs.core.MediaType) Consumes(javax.ws.rs.Consumes) Api(io.swagger.annotations.Api) URI(java.net.URI) DELETE(javax.ws.rs.DELETE) NiFiServiceFacade(org.apache.nifi.web.NiFiServiceFacade) POST(javax.ws.rs.POST) Context(javax.ws.rs.core.Context) Authorizable(org.apache.nifi.authorization.resource.Authorizable) AuthorizableLookup(org.apache.nifi.authorization.AuthorizableLookup) RequestAction(org.apache.nifi.authorization.RequestAction) Set(java.util.Set) SnippetAuthorizable(org.apache.nifi.authorization.SnippetAuthorizable) Collectors(java.util.stream.Collectors) Consumer(java.util.function.Consumer) ComponentEntity(org.apache.nifi.web.api.entity.ComponentEntity) Authorizer(org.apache.nifi.authorization.Authorizer) Response(javax.ws.rs.core.Response) ApiResponse(io.swagger.annotations.ApiResponse) NiFiUserUtils(org.apache.nifi.authorization.user.NiFiUserUtils) PUT(javax.ws.rs.PUT) SnippetDTO(org.apache.nifi.web.api.dto.SnippetDTO) Authorization(io.swagger.annotations.Authorization) Revision(org.apache.nifi.web.Revision) SnippetAuthorizable(org.apache.nifi.authorization.SnippetAuthorizable) ComponentEntity(org.apache.nifi.web.api.entity.ComponentEntity) SnippetEntity(org.apache.nifi.web.api.entity.SnippetEntity) Path(javax.ws.rs.Path) DELETE(javax.ws.rs.DELETE) Consumes(javax.ws.rs.Consumes) Produces(javax.ws.rs.Produces) ApiOperation(io.swagger.annotations.ApiOperation) ApiResponses(io.swagger.annotations.ApiResponses)

Example 34 with Context

use of javax.ws.rs.core.Context in project nifi by apache.

the class SnippetResource method updateSnippet.

/**
 * Move's the components in this Snippet into a new Process Group.
 *
 * @param httpServletRequest request
 * @param snippetId          The id of the snippet.
 * @param requestSnippetEntity      A snippetEntity
 * @return A snippetEntity
 */
@PUT
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@Path("{id}")
@ApiOperation(value = "Move's the components in this Snippet into a new Process Group and discards the snippet", response = SnippetEntity.class, authorizations = { @Authorization(value = "Write Process Group - /process-groups/{uuid}"), @Authorization(value = "Write - /{component-type}/{uuid} - For each component in the Snippet and their descendant components") })
@ApiResponses(value = { @ApiResponse(code = 400, message = "NiFi was unable to complete the request because it was invalid. The request should not be retried without modification."), @ApiResponse(code = 401, message = "Client could not be authenticated."), @ApiResponse(code = 403, message = "Client is not authorized to make this request."), @ApiResponse(code = 404, message = "The specified resource could not be found."), @ApiResponse(code = 409, message = "The request was valid but NiFi was not in the appropriate state to process it. Retrying the same request later may be successful.") })
public Response updateSnippet(@Context HttpServletRequest httpServletRequest, @ApiParam(value = "The snippet id.", required = true) @PathParam("id") String snippetId, @ApiParam(value = "The snippet configuration details.", required = true) final SnippetEntity requestSnippetEntity) {
    if (requestSnippetEntity == null || requestSnippetEntity.getSnippet() == null) {
        throw new IllegalArgumentException("Snippet details must be specified.");
    }
    // ensure the ids are the same
    final SnippetDTO requestSnippetDTO = requestSnippetEntity.getSnippet();
    if (!snippetId.equals(requestSnippetDTO.getId())) {
        throw new IllegalArgumentException(String.format("The snippet id (%s) in the request body does not equal the " + "snippet id of the requested resource (%s).", requestSnippetDTO.getId(), snippetId));
    }
    if (isReplicateRequest()) {
        return replicate(HttpMethod.PUT, requestSnippetEntity);
    }
    // get the revision from this snippet
    final Set<Revision> requestRevisions = serviceFacade.getRevisionsFromSnippet(snippetId);
    return withWriteLock(serviceFacade, requestSnippetEntity, requestRevisions, lookup -> {
        // ensure write access to the target process group
        if (requestSnippetDTO.getParentGroupId() != null) {
            lookup.getProcessGroup(requestSnippetDTO.getParentGroupId()).getAuthorizable().authorize(authorizer, RequestAction.WRITE, NiFiUserUtils.getNiFiUser());
        }
        // ensure write permission to every component in the snippet excluding referenced services
        final SnippetAuthorizable snippet = lookup.getSnippet(snippetId);
        authorizeSnippet(snippet, authorizer, lookup, RequestAction.WRITE, false, false);
    }, () -> serviceFacade.verifyUpdateSnippet(requestSnippetDTO, requestRevisions.stream().map(rev -> rev.getComponentId()).collect(Collectors.toSet())), (revisions, snippetEntity) -> {
        // update the snippet
        final SnippetEntity entity = serviceFacade.updateSnippet(revisions, snippetEntity.getSnippet());
        populateRemainingSnippetEntityContent(entity);
        return generateOkResponse(entity).build();
    });
}
Also used : PathParam(javax.ws.rs.PathParam) Revision(org.apache.nifi.web.Revision) Produces(javax.ws.rs.Produces) Path(javax.ws.rs.Path) ApiParam(io.swagger.annotations.ApiParam) AccessDeniedException(org.apache.nifi.authorization.AccessDeniedException) ApiResponses(io.swagger.annotations.ApiResponses) HttpMethod(javax.ws.rs.HttpMethod) ApiOperation(io.swagger.annotations.ApiOperation) SnippetEntity(org.apache.nifi.web.api.entity.SnippetEntity) HttpServletRequest(javax.servlet.http.HttpServletRequest) MediaType(javax.ws.rs.core.MediaType) Consumes(javax.ws.rs.Consumes) Api(io.swagger.annotations.Api) URI(java.net.URI) DELETE(javax.ws.rs.DELETE) NiFiServiceFacade(org.apache.nifi.web.NiFiServiceFacade) POST(javax.ws.rs.POST) Context(javax.ws.rs.core.Context) Authorizable(org.apache.nifi.authorization.resource.Authorizable) AuthorizableLookup(org.apache.nifi.authorization.AuthorizableLookup) RequestAction(org.apache.nifi.authorization.RequestAction) Set(java.util.Set) SnippetAuthorizable(org.apache.nifi.authorization.SnippetAuthorizable) Collectors(java.util.stream.Collectors) Consumer(java.util.function.Consumer) ComponentEntity(org.apache.nifi.web.api.entity.ComponentEntity) Authorizer(org.apache.nifi.authorization.Authorizer) Response(javax.ws.rs.core.Response) ApiResponse(io.swagger.annotations.ApiResponse) NiFiUserUtils(org.apache.nifi.authorization.user.NiFiUserUtils) PUT(javax.ws.rs.PUT) SnippetDTO(org.apache.nifi.web.api.dto.SnippetDTO) Authorization(io.swagger.annotations.Authorization) SnippetDTO(org.apache.nifi.web.api.dto.SnippetDTO) Revision(org.apache.nifi.web.Revision) SnippetAuthorizable(org.apache.nifi.authorization.SnippetAuthorizable) SnippetEntity(org.apache.nifi.web.api.entity.SnippetEntity) Path(javax.ws.rs.Path) Consumes(javax.ws.rs.Consumes) Produces(javax.ws.rs.Produces) ApiOperation(io.swagger.annotations.ApiOperation) PUT(javax.ws.rs.PUT) ApiResponses(io.swagger.annotations.ApiResponses)

Example 35 with Context

use of javax.ws.rs.core.Context in project nifi by apache.

the class FlowResource method scheduleComponents.

/**
 * Updates the specified process group.
 *
 * @param httpServletRequest       request
 * @param id                       The id of the process group.
 * @param requestScheduleComponentsEntity A scheduleComponentsEntity.
 * @return A processGroupEntity.
 */
@PUT
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@Path("process-groups/{id}")
@ApiOperation(value = "Schedule or unschedule components in the specified Process Group.", response = ScheduleComponentsEntity.class, authorizations = { @Authorization(value = "Read - /flow"), @Authorization(value = "Write - /{component-type}/{uuid} - For every component being scheduled/unscheduled") })
@ApiResponses(value = { @ApiResponse(code = 400, message = "NiFi was unable to complete the request because it was invalid. The request should not be retried without modification."), @ApiResponse(code = 401, message = "Client could not be authenticated."), @ApiResponse(code = 403, message = "Client is not authorized to make this request."), @ApiResponse(code = 404, message = "The specified resource could not be found."), @ApiResponse(code = 409, message = "The request was valid but NiFi was not in the appropriate state to process it. Retrying the same request later may be successful.") })
public Response scheduleComponents(@Context HttpServletRequest httpServletRequest, @ApiParam(value = "The process group id.", required = true) @PathParam("id") String id, @ApiParam(value = "The request to schedule or unschedule. If the comopnents in the request are not specified, all authorized components will be considered.", required = true) final ScheduleComponentsEntity requestScheduleComponentsEntity) {
    // ensure the same id is being used
    if (!id.equals(requestScheduleComponentsEntity.getId())) {
        throw new IllegalArgumentException(String.format("The process group id (%s) in the request body does " + "not equal the process group id of the requested resource (%s).", requestScheduleComponentsEntity.getId(), id));
    }
    final ScheduledState state;
    if (requestScheduleComponentsEntity.getState() == null) {
        throw new IllegalArgumentException("The scheduled state must be specified.");
    } else {
        try {
            state = ScheduledState.valueOf(requestScheduleComponentsEntity.getState());
        } catch (final IllegalArgumentException iae) {
            throw new IllegalArgumentException(String.format("The scheduled must be one of [%s].", StringUtils.join(EnumSet.of(ScheduledState.RUNNING, ScheduledState.STOPPED), ", ")));
        }
    }
    // ensure its a supported scheduled state
    if (ScheduledState.DISABLED.equals(state) || ScheduledState.STARTING.equals(state) || ScheduledState.STOPPING.equals(state)) {
        throw new IllegalArgumentException(String.format("The scheduled must be one of [%s].", StringUtils.join(EnumSet.of(ScheduledState.RUNNING, ScheduledState.STOPPED), ", ")));
    }
    // if the components are not specified, gather all components and their current revision
    if (requestScheduleComponentsEntity.getComponents() == null) {
        // get the current revisions for the components being updated
        final Set<Revision> revisions = serviceFacade.getRevisionsFromGroup(id, group -> {
            final Set<String> componentIds = new HashSet<>();
            // ensure authorized for each processor we will attempt to schedule
            group.findAllProcessors().stream().filter(ScheduledState.RUNNING.equals(state) ? ProcessGroup.SCHEDULABLE_PROCESSORS : ProcessGroup.UNSCHEDULABLE_PROCESSORS).filter(processor -> processor.isAuthorized(authorizer, RequestAction.WRITE, NiFiUserUtils.getNiFiUser())).forEach(processor -> {
                componentIds.add(processor.getIdentifier());
            });
            // ensure authorized for each input port we will attempt to schedule
            group.findAllInputPorts().stream().filter(ScheduledState.RUNNING.equals(state) ? ProcessGroup.SCHEDULABLE_PORTS : ProcessGroup.UNSCHEDULABLE_PORTS).filter(inputPort -> inputPort.isAuthorized(authorizer, RequestAction.WRITE, NiFiUserUtils.getNiFiUser())).forEach(inputPort -> {
                componentIds.add(inputPort.getIdentifier());
            });
            // ensure authorized for each output port we will attempt to schedule
            group.findAllOutputPorts().stream().filter(ScheduledState.RUNNING.equals(state) ? ProcessGroup.SCHEDULABLE_PORTS : ProcessGroup.UNSCHEDULABLE_PORTS).filter(outputPort -> outputPort.isAuthorized(authorizer, RequestAction.WRITE, NiFiUserUtils.getNiFiUser())).forEach(outputPort -> {
                componentIds.add(outputPort.getIdentifier());
            });
            return componentIds;
        });
        // build the component mapping
        final Map<String, RevisionDTO> componentsToSchedule = new HashMap<>();
        revisions.forEach(revision -> {
            final RevisionDTO dto = new RevisionDTO();
            dto.setClientId(revision.getClientId());
            dto.setVersion(revision.getVersion());
            componentsToSchedule.put(revision.getComponentId(), dto);
        });
        // set the components and their current revision
        requestScheduleComponentsEntity.setComponents(componentsToSchedule);
    }
    if (isReplicateRequest()) {
        return replicate(HttpMethod.PUT, requestScheduleComponentsEntity);
    }
    final Map<String, RevisionDTO> requestComponentsToSchedule = requestScheduleComponentsEntity.getComponents();
    final Map<String, Revision> requestComponentRevisions = requestComponentsToSchedule.entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey, e -> getRevision(e.getValue(), e.getKey())));
    final Set<Revision> requestRevisions = new HashSet<>(requestComponentRevisions.values());
    return withWriteLock(serviceFacade, requestScheduleComponentsEntity, requestRevisions, lookup -> {
        // ensure access to the flow
        authorizeFlow();
        // ensure access to every component being scheduled
        requestComponentsToSchedule.keySet().forEach(componentId -> {
            final Authorizable connectable = lookup.getLocalConnectable(componentId);
            connectable.authorize(authorizer, RequestAction.WRITE, NiFiUserUtils.getNiFiUser());
        });
    }, () -> serviceFacade.verifyScheduleComponents(id, state, requestComponentRevisions.keySet()), (revisions, scheduleComponentsEntity) -> {
        final ScheduledState scheduledState = ScheduledState.valueOf(scheduleComponentsEntity.getState());
        final Map<String, RevisionDTO> componentsToSchedule = scheduleComponentsEntity.getComponents();
        final Map<String, Revision> componentRevisions = componentsToSchedule.entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey, e -> getRevision(e.getValue(), e.getKey())));
        // update the process group
        final ScheduleComponentsEntity entity = serviceFacade.scheduleComponents(id, scheduledState, componentRevisions);
        return generateOkResponse(entity).build();
    });
}
Also used : Bundle(org.apache.nifi.bundle.Bundle) DateTimeParameter(org.apache.nifi.web.api.request.DateTimeParameter) StatusHistoryEntity(org.apache.nifi.web.api.entity.StatusHistoryEntity) Produces(javax.ws.rs.Produces) BulletinBoardPatternParameter(org.apache.nifi.web.api.request.BulletinBoardPatternParameter) ApiParam(io.swagger.annotations.ApiParam) StringUtils(org.apache.commons.lang3.StringUtils) BucketsEntity(org.apache.nifi.web.api.entity.BucketsEntity) MediaType(javax.ws.rs.core.MediaType) ProcessGroupDTO(org.apache.nifi.web.api.dto.ProcessGroupDTO) NiFiRegistryException(org.apache.nifi.registry.client.NiFiRegistryException) AboutDTO(org.apache.nifi.web.api.dto.AboutDTO) Map(java.util.Map) ResourceNotFoundException(org.apache.nifi.web.ResourceNotFoundException) RegistriesEntity(org.apache.nifi.web.api.entity.RegistriesEntity) CurrentUserEntity(org.apache.nifi.web.api.entity.CurrentUserEntity) ProcessGroupFlowEntity(org.apache.nifi.web.api.entity.ProcessGroupFlowEntity) EnumSet(java.util.EnumSet) HistoryQueryDTO(org.apache.nifi.web.api.dto.action.HistoryQueryDTO) NarClassLoaders(org.apache.nifi.nar.NarClassLoaders) ControllerServicesEntity(org.apache.nifi.web.api.entity.ControllerServicesEntity) Set(java.util.Set) BulletinBoardDTO(org.apache.nifi.web.api.dto.BulletinBoardDTO) ScheduledState(org.apache.nifi.controller.ScheduledState) WebApplicationException(javax.ws.rs.WebApplicationException) ActionEntity(org.apache.nifi.web.api.entity.ActionEntity) ControllerBulletinsEntity(org.apache.nifi.web.api.entity.ControllerBulletinsEntity) RemoteProcessGroupStatusEntity(org.apache.nifi.web.api.entity.RemoteProcessGroupStatusEntity) GET(javax.ws.rs.GET) ControllerServiceEntity(org.apache.nifi.web.api.entity.ControllerServiceEntity) TemplateEntity(org.apache.nifi.web.api.entity.TemplateEntity) RevisionDTO(org.apache.nifi.web.api.dto.RevisionDTO) BulletinBoardEntity(org.apache.nifi.web.api.entity.BulletinBoardEntity) HttpMethod(javax.ws.rs.HttpMethod) ArrayList(java.util.ArrayList) HttpServletRequest(javax.servlet.http.HttpServletRequest) ReportingTaskTypesEntity(org.apache.nifi.web.api.entity.ReportingTaskTypesEntity) NiFiUser(org.apache.nifi.authorization.user.NiFiUser) NodeConnectionState(org.apache.nifi.cluster.coordination.node.NodeConnectionState) Api(io.swagger.annotations.Api) ProcessGroupFlowDTO(org.apache.nifi.web.api.dto.flow.ProcessGroupFlowDTO) FlowDTO(org.apache.nifi.web.api.dto.flow.FlowDTO) FlowConfigurationEntity(org.apache.nifi.web.api.entity.FlowConfigurationEntity) NiFiServiceFacade(org.apache.nifi.web.NiFiServiceFacade) RequestAction(org.apache.nifi.authorization.RequestAction) BannerEntity(org.apache.nifi.web.api.entity.BannerEntity) HistoryDTO(org.apache.nifi.web.api.dto.action.HistoryDTO) ClusteSummaryEntity(org.apache.nifi.web.api.entity.ClusteSummaryEntity) Authorizer(org.apache.nifi.authorization.Authorizer) NiFiProperties(org.apache.nifi.util.NiFiProperties) VersionedFlowSnapshotMetadataEntity(org.apache.nifi.web.api.entity.VersionedFlowSnapshotMetadataEntity) VersionedFlowSnapshotMetadataSetEntity(org.apache.nifi.web.api.entity.VersionedFlowSnapshotMetadataSetEntity) ProcessorStatusEntity(org.apache.nifi.web.api.entity.ProcessorStatusEntity) ApiResponse(io.swagger.annotations.ApiResponse) BucketEntity(org.apache.nifi.web.api.entity.BucketEntity) ScheduleComponentsEntity(org.apache.nifi.web.api.entity.ScheduleComponentsEntity) VersionedFlowEntity(org.apache.nifi.web.api.entity.VersionedFlowEntity) NodeIdentifier(org.apache.nifi.cluster.protocol.NodeIdentifier) ProcessGroup(org.apache.nifi.groups.ProcessGroup) BulletinQueryDTO(org.apache.nifi.web.api.dto.BulletinQueryDTO) Date(java.util.Date) Path(javax.ws.rs.Path) ClusterSummaryDTO(org.apache.nifi.web.api.dto.ClusterSummaryDTO) ProcessGroupStatusEntity(org.apache.nifi.web.api.entity.ProcessGroupStatusEntity) ApiOperation(io.swagger.annotations.ApiOperation) QueryParam(javax.ws.rs.QueryParam) Consumes(javax.ws.rs.Consumes) ControllerStatusDTO(org.apache.nifi.web.api.dto.status.ControllerStatusDTO) ActivateControllerServicesEntity(org.apache.nifi.web.api.entity.ActivateControllerServicesEntity) ConnectionStatusEntity(org.apache.nifi.web.api.entity.ConnectionStatusEntity) ControllerStatusEntity(org.apache.nifi.web.api.entity.ControllerStatusEntity) DefaultValue(javax.ws.rs.DefaultValue) IntegerParameter(org.apache.nifi.web.api.request.IntegerParameter) NodeResponse(org.apache.nifi.cluster.manager.NodeResponse) HistoryEntity(org.apache.nifi.web.api.entity.HistoryEntity) Context(javax.ws.rs.core.Context) Authorizable(org.apache.nifi.authorization.resource.Authorizable) ReportingTaskEntity(org.apache.nifi.web.api.entity.ReportingTaskEntity) Predicate(java.util.function.Predicate) NodeSearchResultDTO(org.apache.nifi.web.api.dto.search.NodeSearchResultDTO) ClusterSearchResultsEntity(org.apache.nifi.web.api.entity.ClusterSearchResultsEntity) LongParameter(org.apache.nifi.web.api.request.LongParameter) Collectors(java.util.stream.Collectors) List(java.util.List) Response(javax.ws.rs.core.Response) BannerDTO(org.apache.nifi.web.api.dto.BannerDTO) ProcessGroupEntity(org.apache.nifi.web.api.entity.ProcessGroupEntity) ControllerServiceState(org.apache.nifi.controller.service.ControllerServiceState) SearchResultsEntity(org.apache.nifi.web.api.entity.SearchResultsEntity) PathParam(javax.ws.rs.PathParam) Revision(org.apache.nifi.web.Revision) TemplatesEntity(org.apache.nifi.web.api.entity.TemplatesEntity) ClusterDTO(org.apache.nifi.web.api.dto.ClusterDTO) ControllerServiceNode(org.apache.nifi.controller.service.ControllerServiceNode) HashMap(java.util.HashMap) ApiResponses(io.swagger.annotations.ApiResponses) BundleDetails(org.apache.nifi.bundle.BundleDetails) HashSet(java.util.HashSet) ClusterCoordinator(org.apache.nifi.cluster.coordination.ClusterCoordinator) ControllerServiceTypesEntity(org.apache.nifi.web.api.entity.ControllerServiceTypesEntity) PrioritizerTypesEntity(org.apache.nifi.web.api.entity.PrioritizerTypesEntity) ProcessorTypesEntity(org.apache.nifi.web.api.entity.ProcessorTypesEntity) RegistryClientsEntity(org.apache.nifi.web.api.entity.RegistryClientsEntity) PortStatusEntity(org.apache.nifi.web.api.entity.PortStatusEntity) ComponentHistoryEntity(org.apache.nifi.web.api.entity.ComponentHistoryEntity) NiFiUserUtils(org.apache.nifi.authorization.user.NiFiUserUtils) SearchResultsDTO(org.apache.nifi.web.api.dto.search.SearchResultsDTO) AboutEntity(org.apache.nifi.web.api.entity.AboutEntity) RegistryEntity(org.apache.nifi.web.api.entity.RegistryEntity) NodeDTO(org.apache.nifi.web.api.dto.NodeDTO) PUT(javax.ws.rs.PUT) IllegalClusterResourceRequestException(org.apache.nifi.web.IllegalClusterResourceRequestException) Authorization(io.swagger.annotations.Authorization) VersionedFlowsEntity(org.apache.nifi.web.api.entity.VersionedFlowsEntity) ReportingTasksEntity(org.apache.nifi.web.api.entity.ReportingTasksEntity) HashMap(java.util.HashMap) ScheduleComponentsEntity(org.apache.nifi.web.api.entity.ScheduleComponentsEntity) RevisionDTO(org.apache.nifi.web.api.dto.RevisionDTO) Revision(org.apache.nifi.web.Revision) ScheduledState(org.apache.nifi.controller.ScheduledState) Authorizable(org.apache.nifi.authorization.resource.Authorizable) Map(java.util.Map) HashMap(java.util.HashMap) HashSet(java.util.HashSet) Path(javax.ws.rs.Path) Consumes(javax.ws.rs.Consumes) Produces(javax.ws.rs.Produces) ApiOperation(io.swagger.annotations.ApiOperation) PUT(javax.ws.rs.PUT) ApiResponses(io.swagger.annotations.ApiResponses)

Aggregations

Context (javax.ws.rs.core.Context)70 Response (javax.ws.rs.core.Response)51 Path (javax.ws.rs.Path)48 PathParam (javax.ws.rs.PathParam)41 GET (javax.ws.rs.GET)39 List (java.util.List)38 MediaType (javax.ws.rs.core.MediaType)36 POST (javax.ws.rs.POST)34 UriInfo (javax.ws.rs.core.UriInfo)32 Produces (javax.ws.rs.Produces)30 PUT (javax.ws.rs.PUT)29 Inject (javax.inject.Inject)27 HttpServletRequest (javax.servlet.http.HttpServletRequest)27 QueryParam (javax.ws.rs.QueryParam)27 Map (java.util.Map)25 IOException (java.io.IOException)24 Api (io.swagger.annotations.Api)23 ApiOperation (io.swagger.annotations.ApiOperation)23 ApiParam (io.swagger.annotations.ApiParam)23 URI (java.net.URI)23