Search in sources :

Example 76 with DefaultValue

use of javax.ws.rs.DefaultValue in project mycore by MyCoRe-Org.

the class MCRSessionResource method list.

/**
 * Lists all {@link MCRSession}'s in json format.
 *
 * @param resolveHostname (false) if the host names are resolved. Resolving host names takes some
 *          time, so this is deactivated by default
 * @return list of sessions
 */
@GET
@Produces(MediaType.APPLICATION_JSON)
@Path("list")
public Response list(@DefaultValue("false") @QueryParam("resolveHostname") Boolean resolveHostname) {
    // check permissions
    MCRJerseyUtil.checkPermission("manage-sessions");
    // get all sessions
    JsonArray rootJSON = new ArrayList<>(MCRSessionMgr.getAllSessions().values()).parallelStream().map(s -> generateSessionJSON(s, resolveHostname)).collect(JsonArray::new, JsonArray::add, JsonArray::addAll);
    return Response.status(Status.OK).entity(rootJSON.toString()).build();
}
Also used : JsonArray(com.google.gson.JsonArray) Color(java.awt.Color) MCRJerseyUtil(org.mycore.frontend.jersey.MCRJerseyUtil) JsonObject(com.google.gson.JsonObject) Arrays(java.util.Arrays) PathParam(javax.ws.rs.PathParam) POST(javax.ws.rs.POST) Produces(javax.ws.rs.Produces) GET(javax.ws.rs.GET) Path(javax.ws.rs.Path) UnknownHostException(java.net.UnknownHostException) ArrayList(java.util.ArrayList) InetAddress(java.net.InetAddress) JsonElement(com.google.gson.JsonElement) MediaType(javax.ws.rs.core.MediaType) JsonArray(com.google.gson.JsonArray) QueryParam(javax.ws.rs.QueryParam) Response(javax.ws.rs.core.Response) MCRSession(org.mycore.common.MCRSession) Locale(java.util.Locale) MCRSessionMgr(org.mycore.common.MCRSessionMgr) DefaultValue(javax.ws.rs.DefaultValue) Status(javax.ws.rs.core.Response.Status) MCRUserInformation(org.mycore.common.MCRUserInformation) Path(javax.ws.rs.Path) Produces(javax.ws.rs.Produces) GET(javax.ws.rs.GET)

Example 77 with DefaultValue

use of javax.ws.rs.DefaultValue in project alluxio by Alluxio.

the class AlluxioWorkerRestServiceHandler method getWebUILogs.

/**
 * Gets web ui logs page data.
 *
 * @param requestPath the request path
 * @param requestOffset the request offset
 * @param requestEnd the request end
 * @param requestLimit the request limit
 * @return the response object
 */
@GET
@Path(WEBUI_LOGS)
public Response getWebUILogs(@DefaultValue("") @QueryParam("path") String requestPath, @DefaultValue("0") @QueryParam("offset") String requestOffset, @QueryParam("end") String requestEnd, @DefaultValue("20") @QueryParam("limit") String requestLimit) {
    return RestUtils.call(() -> {
        FilenameFilter filenameFilter = (dir, name) -> name.toLowerCase().endsWith(".log");
        WorkerWebUILogs response = new WorkerWebUILogs();
        if (!ServerConfiguration.getBoolean(PropertyKey.WEB_FILE_INFO_ENABLED)) {
            return response;
        }
        response.setDebug(ServerConfiguration.getBoolean(PropertyKey.DEBUG)).setInvalidPathError("").setViewingOffset(0).setCurrentPath("");
        // response.setDownloadLogFile(1);
        // response.setBaseUrl("./browseLogs");
        // response.setShowPermissions(false);
        String logsPath = ServerConfiguration.getString(PropertyKey.LOGS_DIR);
        File logsDir = new File(logsPath);
        String requestFile = requestPath;
        if (requestFile == null || requestFile.isEmpty()) {
            // List all log files in the log/ directory.
            List<UIFileInfo> fileInfos = new ArrayList<>();
            File[] logFiles = logsDir.listFiles(filenameFilter);
            if (logFiles != null) {
                for (File logFile : logFiles) {
                    String logFileName = logFile.getName();
                    fileInfos.add(new UIFileInfo(new UIFileInfo.LocalFileInfo(logFileName, logFileName, logFile.length(), UIFileInfo.LocalFileInfo.EMPTY_CREATION_TIME, logFile.lastModified(), logFile.isDirectory()), ServerConfiguration.global(), new WorkerStorageTierAssoc().getOrderedStorageAliases()));
                }
            }
            Collections.sort(fileInfos, UIFileInfo.PATH_STRING_COMPARE);
            response.setNTotalFile(fileInfos.size());
            try {
                int offset = Integer.parseInt(requestOffset);
                int limit = Integer.parseInt(requestLimit);
                limit = offset == 0 && limit > fileInfos.size() ? fileInfos.size() : limit;
                limit = offset + limit > fileInfos.size() ? fileInfos.size() - offset : limit;
                int sum = Math.addExact(offset, limit);
                fileInfos = fileInfos.subList(offset, sum);
                response.setFileInfos(fileInfos);
            } catch (NumberFormatException e) {
                response.setFatalError("Error: offset or limit parse error, " + e.getLocalizedMessage());
                return response;
            } catch (ArithmeticException e) {
                response.setFatalError("Error: offset or offset + limit is out of bound, " + e.getLocalizedMessage());
                return response;
            } catch (IllegalArgumentException e) {
                response.setFatalError(e.getLocalizedMessage());
                return response;
            }
        } else {
            // Request a specific log file.
            // Only allow filenames as the path, to avoid arbitrary local path lookups.
            requestFile = new File(requestFile).getName();
            response.setCurrentPath(requestFile);
            File logFile = new File(logsDir, requestFile);
            try {
                long fileSize = logFile.length();
                String offsetParam = requestOffset;
                long relativeOffset = 0;
                long offset;
                try {
                    if (offsetParam != null) {
                        relativeOffset = Long.parseLong(offsetParam);
                    }
                } catch (NumberFormatException e) {
                    relativeOffset = 0;
                }
                String endParam = requestEnd;
                // relative to the end of the file.
                if (endParam == null) {
                    offset = relativeOffset;
                } else {
                    offset = fileSize - relativeOffset;
                }
                if (offset < 0) {
                    offset = 0;
                } else if (offset > fileSize) {
                    offset = fileSize;
                }
                String fileData;
                try (InputStream is = new FileInputStream(logFile)) {
                    fileSize = logFile.length();
                    int len = (int) Math.min(5L * Constants.KB, fileSize - offset);
                    byte[] data = new byte[len];
                    long skipped = is.skip(offset);
                    if (skipped < 0) {
                        // Nothing was skipped.
                        fileData = "Unable to traverse to offset; is file empty?";
                    } else if (skipped < offset) {
                        // Couldn't skip all the way to offset.
                        fileData = "Unable to traverse to offset; is offset larger than the file?";
                    } else {
                        // Read may not read up to len, so only convert what was read.
                        int read = is.read(data, 0, len);
                        if (read < 0) {
                            // Stream couldn't read anything, skip went to EOF?
                            fileData = "Unable to read file";
                        } else {
                            fileData = WebUtils.convertByteArrayToStringWithoutEscape(data, 0, read);
                        }
                    }
                }
                response.setFileData(fileData).setViewingOffset(offset);
            } catch (IOException e) {
                response.setInvalidPathError("Error: File " + logFile + " is not available " + e.getMessage());
            }
        }
        return response;
    }, ServerConfiguration.global());
}
Also used : Produces(javax.ws.rs.Produces) LoggerFactory(org.slf4j.LoggerFactory) Path(javax.ws.rs.Path) WorkerWebUIMetrics(alluxio.wire.WorkerWebUIMetrics) PropertyKey(alluxio.conf.PropertyKey) LogUtils(alluxio.util.LogUtils) UIFileInfo(alluxio.util.webui.UIFileInfo) ApiOperation(io.swagger.annotations.ApiOperation) MediaType(javax.ws.rs.core.MediaType) FileSystem(alluxio.client.file.FileSystem) QueryParam(javax.ws.rs.QueryParam) WorkerWebUIBlockInfo(alluxio.wire.WorkerWebUIBlockInfo) MetricKey(alluxio.metrics.MetricKey) Map(java.util.Map) Counter(com.codahale.metrics.Counter) DefaultValue(javax.ws.rs.DefaultValue) WebUtils(alluxio.util.webui.WebUtils) Triple(org.apache.commons.lang3.tuple.Triple) WorkerWebUILogs(alluxio.wire.WorkerWebUILogs) Context(javax.ws.rs.core.Context) RestUtils(alluxio.RestUtils) ServerConfiguration(alluxio.conf.ServerConfiguration) WorkerWebUIConfiguration(alluxio.wire.WorkerWebUIConfiguration) Metric(com.codahale.metrics.Metric) Set(java.util.Set) AlluxioException(alluxio.exception.AlluxioException) ConfigProperty(alluxio.grpc.ConfigProperty) Sets(com.google.common.collect.Sets) List(java.util.List) Capacity(alluxio.wire.Capacity) Response(javax.ws.rs.core.Response) UIFileBlockInfo(alluxio.util.webui.UIFileBlockInfo) FileDoesNotExistException(alluxio.exception.FileDoesNotExistException) UIStorageDir(alluxio.util.webui.UIStorageDir) WorkerWebServer(alluxio.web.WorkerWebServer) BlockStoreMeta(alluxio.worker.block.BlockStoreMeta) Gauge(com.codahale.metrics.Gauge) RuntimeConstants(alluxio.RuntimeConstants) SortedMap(java.util.SortedMap) BlockWorker(alluxio.worker.block.BlockWorker) FilenameFilter(java.io.FilenameFilter) GET(javax.ws.rs.GET) GetConfigurationPOptions(alluxio.grpc.GetConfigurationPOptions) WorkerWebUIInit(alluxio.wire.WorkerWebUIInit) BlockId(alluxio.master.block.BlockId) NetworkAddressUtils(alluxio.util.network.NetworkAddressUtils) TreeSet(java.util.TreeSet) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) Constants(alluxio.Constants) AlluxioURI(alluxio.AlluxioURI) FormatUtils(alluxio.util.FormatUtils) MetricsSystem(alluxio.metrics.MetricsSystem) Api(io.swagger.annotations.Api) ConfigurationValueOptions(alluxio.conf.ConfigurationValueOptions) ImmutableTriple(org.apache.commons.lang3.tuple.ImmutableTriple) MetricRegistry(com.codahale.metrics.MetricRegistry) Logger(org.slf4j.Logger) POST(javax.ws.rs.POST) UIUsageOnTier(alluxio.util.webui.UIUsageOnTier) AlluxioWorkerInfo(alluxio.wire.AlluxioWorkerInfo) IOException(java.io.IOException) BlockMeta(alluxio.worker.block.meta.BlockMeta) FileInputStream(java.io.FileInputStream) Pair(alluxio.collections.Pair) ConfigurationUtils(alluxio.util.ConfigurationUtils) ImmutablePair(org.apache.commons.lang3.tuple.ImmutablePair) File(java.io.File) URIStatus(alluxio.client.file.URIStatus) TreeMap(java.util.TreeMap) UIWorkerInfo(alluxio.util.webui.UIWorkerInfo) ServletContext(javax.servlet.ServletContext) WorkerStorageTierAssoc(alluxio.WorkerStorageTierAssoc) WorkerWebUIOverview(alluxio.wire.WorkerWebUIOverview) Comparator(java.util.Comparator) BlockDoesNotExistException(alluxio.exception.BlockDoesNotExistException) Collections(java.util.Collections) InputStream(java.io.InputStream) NotThreadSafe(javax.annotation.concurrent.NotThreadSafe) FileInputStream(java.io.FileInputStream) InputStream(java.io.InputStream) ArrayList(java.util.ArrayList) WorkerStorageTierAssoc(alluxio.WorkerStorageTierAssoc) WorkerWebUILogs(alluxio.wire.WorkerWebUILogs) IOException(java.io.IOException) FileInputStream(java.io.FileInputStream) FilenameFilter(java.io.FilenameFilter) UIFileInfo(alluxio.util.webui.UIFileInfo) File(java.io.File) Path(javax.ws.rs.Path) GET(javax.ws.rs.GET)

Example 78 with DefaultValue

use of javax.ws.rs.DefaultValue in project component-runtime by Talend.

the class ActionResource method getIndex.

/**
 * This endpoint returns the list of available actions for a certain family and potentially filters the "
 * output limiting it to some families and types of actions.
 *
 * @param types the types of actions (optional).
 * @param families the families (optional).
 * @param language the language to use (optional).
 * @return the list of actions matching the requested filters or all if none are set.
 */
@GET
// add an index if needed or too slow
@Path("index")
public ActionList getIndex(@QueryParam("type") final String[] types, @QueryParam("family") final String[] families, @QueryParam("language") @DefaultValue("en") final String language) {
    final Predicate<ServiceMeta.ActionMeta> typeMatcher = new Predicate<ServiceMeta.ActionMeta>() {

        private final Collection<String> accepted = new HashSet<>(asList(types));

        @Override
        public boolean test(final ServiceMeta.ActionMeta actionMeta) {
            return accepted.isEmpty() || accepted.contains(actionMeta.getType());
        }
    };
    final Predicate<ServiceMeta.ActionMeta> componentMatcher = new Predicate<ServiceMeta.ActionMeta>() {

        private final Collection<String> accepted = new HashSet<>(asList(families));

        @Override
        public boolean test(final ServiceMeta.ActionMeta actionMeta) {
            return accepted.isEmpty() || accepted.contains(actionMeta.getFamily());
        }
    };
    final Locale locale = localeMapper.mapLocale(language);
    return new ActionList(manager.find(c -> c.get(ContainerComponentRegistry.class).getServices().stream().map(s -> s.getActions().stream()).flatMap(identity()).filter(typeMatcher.and(componentMatcher)).map(s -> new ActionItem(s.getFamily(), s.getType(), s.getAction(), propertiesService.buildProperties(s.getParameters(), c.getLoader(), locale, null).collect(toList())))).collect(toList()));
}
Also used : Locale(java.util.Locale) Produces(javax.ws.rs.Produces) PropertiesService(org.talend.sdk.component.server.service.PropertiesService) GET(javax.ws.rs.GET) Path(javax.ws.rs.Path) HashSet(java.util.HashSet) Inject(javax.inject.Inject) LocaleMapper(org.talend.sdk.component.server.service.LocaleMapper) QueryParam(javax.ws.rs.QueryParam) Consumes(javax.ws.rs.Consumes) Arrays.asList(java.util.Arrays.asList) Locale(java.util.Locale) Map(java.util.Map) DefaultValue(javax.ws.rs.DefaultValue) APPLICATION_JSON(javax.ws.rs.core.MediaType.APPLICATION_JSON) IgnoreNetAuthenticator(org.talend.sdk.component.server.service.httpurlconnection.IgnoreNetAuthenticator) ActionItem(org.talend.sdk.component.server.front.model.ActionItem) POST(javax.ws.rs.POST) ContainerComponentRegistry(org.talend.sdk.component.runtime.manager.ContainerComponentRegistry) Optional.ofNullable(java.util.Optional.ofNullable) Predicate(java.util.function.Predicate) Collection(java.util.Collection) ActionList(org.talend.sdk.component.server.front.model.ActionList) ErrorDictionary(org.talend.sdk.component.server.front.model.ErrorDictionary) ErrorPayload(org.talend.sdk.component.server.front.model.error.ErrorPayload) ComponentActionDao(org.talend.sdk.component.server.dao.ComponentActionDao) Collectors.toList(java.util.stream.Collectors.toList) Slf4j(lombok.extern.slf4j.Slf4j) Response(javax.ws.rs.core.Response) Function.identity(java.util.function.Function.identity) APPLICATION_JSON_TYPE(javax.ws.rs.core.MediaType.APPLICATION_JSON_TYPE) WebApplicationException(javax.ws.rs.WebApplicationException) ApplicationScoped(javax.enterprise.context.ApplicationScoped) ComponentManager(org.talend.sdk.component.runtime.manager.ComponentManager) ServiceMeta(org.talend.sdk.component.runtime.manager.ServiceMeta) ContainerComponentRegistry(org.talend.sdk.component.runtime.manager.ContainerComponentRegistry) ActionItem(org.talend.sdk.component.server.front.model.ActionItem) Collection(java.util.Collection) ActionList(org.talend.sdk.component.server.front.model.ActionList) Predicate(java.util.function.Predicate) ServiceMeta(org.talend.sdk.component.runtime.manager.ServiceMeta) Path(javax.ws.rs.Path) GET(javax.ws.rs.GET)

Example 79 with DefaultValue

use of javax.ws.rs.DefaultValue in project component-runtime by Talend.

the class DocumentationResource method getDocumentation.

/**
 * Returns an asciidoctor version of the documentation for the component represented by its identifier `id`.
 *
 * Format can be either asciidoc or html - if not it will fallback on asciidoc - and if html is selected you get
 * a partial document.
 *
 * IMPORTANT: it is recommended to use asciidoc format and handle the conversion on your side if you can,
 * the html flavor handles a limited set of the asciidoc syntax only like plain arrays, paragraph and titles.
 *
 * The documentation will likely be the family documentation but you can use anchors to access a particular
 * component (_componentname_inlowercase).
 *
 * @param id the component identifier.
 * @param language the expected language for the documentation (default to en if not found).
 * @param format the expected format (asciidoc or html).
 * @return the documentation for that component.
 */
@GET
@Path("component/{id}")
@Produces(MediaType.APPLICATION_JSON)
public DocumentationContent getDocumentation(@PathParam("id") final String id, @QueryParam("language") @DefaultValue("en") final String language, @QueryParam("format") @DefaultValue("asciidoc") final String format) {
    final Locale locale = localeMapper.mapLocale(language);
    final Container container = ofNullable(componentDao.findById(id)).map(meta -> manager.findPlugin(meta.getParent().getPlugin()).orElseThrow(() -> new WebApplicationException(Response.status(NOT_FOUND).entity(new ErrorPayload(ErrorDictionary.PLUGIN_MISSING, "No plugin '" + meta.getParent().getPlugin() + "'")).build()))).orElseThrow(() -> new WebApplicationException(Response.status(NOT_FOUND).entity(new ErrorPayload(ErrorDictionary.COMPONENT_MISSING, "No component '" + id + "'")).build()));
    // rendering to html can be slow so do it lazily and once
    DocumentationCache cache = container.get(DocumentationCache.class);
    if (cache == null) {
        synchronized (container) {
            cache = container.get(DocumentationCache.class);
            if (cache == null) {
                cache = new DocumentationCache();
                container.set(DocumentationCache.class, cache);
            }
        }
    }
    return cache.documentations.computeIfAbsent(new DocKey(id, language, format), key -> {
        // todo: handle i18n properly, for now just fallback on not suffixed version and assume the dev put it
        // in the comp
        final String content = Stream.of("documentation_" + locale.getLanguage() + ".adoc", "documentation_" + language + ".adoc", "documentation.adoc").map(name -> container.getLoader().getResource("TALEND-INF/" + name)).filter(Objects::nonNull).findFirst().map(url -> {
            try (final BufferedReader stream = new BufferedReader(new InputStreamReader(url.openStream(), StandardCharsets.UTF_8))) {
                return stream.lines().collect(joining("\n"));
            } catch (final IOException e) {
                throw new WebApplicationException(Response.status(INTERNAL_SERVER_ERROR).entity(new ErrorPayload(ErrorDictionary.UNEXPECTED, e.getMessage())).build());
            }
        }).map(value -> {
            switch(format) {
                case "html":
                case "html5":
                    return adoc.toHtml(value);
                case "asciidoc":
                case "adoc":
                default:
                    return value;
            }
        }).orElseThrow(() -> new WebApplicationException(Response.status(NOT_FOUND).entity(new ErrorPayload(ErrorDictionary.COMPONENT_MISSING, "No component '" + id + "'")).build()));
        return new DocumentationContent(format, content);
    });
}
Also used : Locale(java.util.Locale) PathParam(javax.ws.rs.PathParam) Produces(javax.ws.rs.Produces) GET(javax.ws.rs.GET) Path(javax.ws.rs.Path) ConcurrentMap(java.util.concurrent.ConcurrentMap) Inject(javax.inject.Inject) MediaType(javax.ws.rs.core.MediaType) DocumentationContent(org.talend.sdk.component.server.front.model.DocumentationContent) LocaleMapper(org.talend.sdk.component.server.service.LocaleMapper) QueryParam(javax.ws.rs.QueryParam) Locale(java.util.Locale) DefaultValue(javax.ws.rs.DefaultValue) Container(org.talend.sdk.component.container.Container) AsciidoctorService(org.talend.sdk.component.server.service.AsciidoctorService) Optional.ofNullable(java.util.Optional.ofNullable) INTERNAL_SERVER_ERROR(javax.ws.rs.core.Response.Status.INTERNAL_SERVER_ERROR) NOT_FOUND(javax.ws.rs.core.Response.Status.NOT_FOUND) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) IOException(java.io.IOException) InputStreamReader(java.io.InputStreamReader) Collectors.joining(java.util.stream.Collectors.joining) StandardCharsets(java.nio.charset.StandardCharsets) ErrorDictionary(org.talend.sdk.component.server.front.model.ErrorDictionary) ErrorPayload(org.talend.sdk.component.server.front.model.error.ErrorPayload) Objects(java.util.Objects) Slf4j(lombok.extern.slf4j.Slf4j) Stream(java.util.stream.Stream) Response(javax.ws.rs.core.Response) ComponentDao(org.talend.sdk.component.server.dao.ComponentDao) Data(lombok.Data) WebApplicationException(javax.ws.rs.WebApplicationException) ApplicationScoped(javax.enterprise.context.ApplicationScoped) BufferedReader(java.io.BufferedReader) ComponentManager(org.talend.sdk.component.runtime.manager.ComponentManager) WebApplicationException(javax.ws.rs.WebApplicationException) InputStreamReader(java.io.InputStreamReader) IOException(java.io.IOException) DocumentationContent(org.talend.sdk.component.server.front.model.DocumentationContent) Container(org.talend.sdk.component.container.Container) ErrorPayload(org.talend.sdk.component.server.front.model.error.ErrorPayload) Objects(java.util.Objects) BufferedReader(java.io.BufferedReader) Path(javax.ws.rs.Path) Produces(javax.ws.rs.Produces) GET(javax.ws.rs.GET)

Example 80 with DefaultValue

use of javax.ws.rs.DefaultValue in project component-runtime by Talend.

the class ExecutionResource method read.

/**
 * Read inputs from an instance of mapper. The number of returned records if enforced to be limited to 1000.
 * The format is a JSON based format where each like is a json record.
 *
 * @param family the component family.
 * @param component the component name.
 * @param size the maximum number of records to read.
 * @param configuration the component configuration as key/values.
 */
@POST
@Deprecated
@Produces("talend/stream")
@Path("read/{family}/{component}")
public void read(@Suspended final AsyncResponse response, @Context final Providers providers, @PathParam("family") final String family, @PathParam("component") final String component, @QueryParam("size") @DefaultValue("50") final long size, final Map<String, String> configuration) {
    final long maxSize = Math.min(size, MAX_RECORDS);
    response.setTimeoutHandler(asyncResponse -> log.warn("Timeout on dataset retrieval"));
    response.setTimeout(appConfiguration.datasetRetrieverTimeout(), SECONDS);
    executorService.submit(() -> {
        final Optional<Mapper> mapperOptional = manager.findMapper(family, component, getConfigComponentVersion(configuration), configuration);
        if (!mapperOptional.isPresent()) {
            response.resume(new WebApplicationException(Response.status(BAD_REQUEST).entity(new ErrorPayload(COMPONENT_MISSING, "Didn't find the input component")).build()));
            return;
        }
        final Mapper mapper = mapperOptional.get();
        mapper.start();
        try {
            final Input input = mapper.create();
            try {
                input.start();
                response.resume((StreamingOutput) output -> {
                    Object data;
                    int current = 0;
                    while (current++ < maxSize && (data = input.next()) != null) {
                        if (CharSequence.class.isInstance(data) || Number.class.isInstance(data) || Boolean.class.isInstance(data)) {
                            final PrimitiveWrapper wrapper = new PrimitiveWrapper();
                            wrapper.setValue(data);
                            data = wrapper;
                        }
                        inlineStreamingMapper.toJson(data, output);
                        output.write(EOL);
                    }
                });
            } finally {
                input.stop();
            }
        } finally {
            mapper.stop();
        }
    });
}
Also used : PrimitiveWrapper(org.talend.sdk.component.server.front.model.execution.PrimitiveWrapper) Produces(javax.ws.rs.Produces) Path(javax.ws.rs.Path) BAD_FORMAT(org.talend.sdk.component.server.front.model.ErrorDictionary.BAD_FORMAT) PreDestroy(javax.annotation.PreDestroy) MediaType(javax.ws.rs.core.MediaType) JsonNumber(javax.json.JsonNumber) QueryParam(javax.ws.rs.QueryParam) Collectors.toMap(java.util.stream.Collectors.toMap) Consumes(javax.ws.rs.Consumes) Map(java.util.Map) DefaultValue(javax.ws.rs.DefaultValue) BAD_REQUEST(javax.ws.rs.core.Response.Status.BAD_REQUEST) JsonObject(javax.json.JsonObject) JsonbBuilder(javax.json.bind.JsonbBuilder) Context(javax.ws.rs.core.Context) Providers(javax.ws.rs.ext.Providers) AsyncResponse(javax.ws.rs.container.AsyncResponse) StreamingOutput(javax.ws.rs.core.StreamingOutput) Processor(org.talend.sdk.component.runtime.output.Processor) Suspended(javax.ws.rs.container.Suspended) StandardCharsets(java.nio.charset.StandardCharsets) ErrorPayload(org.talend.sdk.component.server.front.model.error.ErrorPayload) OutputEmitter(org.talend.sdk.component.api.processor.OutputEmitter) Branches(org.talend.sdk.component.runtime.output.Branches) Slf4j(lombok.extern.slf4j.Slf4j) Response(javax.ws.rs.core.Response) PostConstruct(javax.annotation.PostConstruct) Optional(java.util.Optional) WebApplicationException(javax.ws.rs.WebApplicationException) ApplicationScoped(javax.enterprise.context.ApplicationScoped) ACTION_ERROR(org.talend.sdk.component.server.front.model.ErrorDictionary.ACTION_ERROR) WriteStatistics(org.talend.sdk.component.server.front.model.execution.WriteStatistics) PathParam(javax.ws.rs.PathParam) OutputFactory(org.talend.sdk.component.runtime.output.OutputFactory) Inject(javax.inject.Inject) ComponentServerConfiguration(org.talend.sdk.component.server.configuration.ComponentServerConfiguration) Input(org.talend.sdk.component.runtime.input.Input) ExecutorService(java.util.concurrent.ExecutorService) POST(javax.ws.rs.POST) Optional.ofNullable(java.util.Optional.ofNullable) COMPONENT_MISSING(org.talend.sdk.component.server.front.model.ErrorDictionary.COMPONENT_MISSING) InputStreamReader(java.io.InputStreamReader) JsonString(javax.json.JsonString) Mapper(org.talend.sdk.component.runtime.input.Mapper) Jsonb(javax.json.bind.Jsonb) BufferedReader(java.io.BufferedReader) ComponentManager(org.talend.sdk.component.runtime.manager.ComponentManager) SECONDS(java.util.concurrent.TimeUnit.SECONDS) InputStream(java.io.InputStream) Mapper(org.talend.sdk.component.runtime.input.Mapper) PrimitiveWrapper(org.talend.sdk.component.server.front.model.execution.PrimitiveWrapper) ErrorPayload(org.talend.sdk.component.server.front.model.error.ErrorPayload) Input(org.talend.sdk.component.runtime.input.Input) WebApplicationException(javax.ws.rs.WebApplicationException) JsonNumber(javax.json.JsonNumber) JsonObject(javax.json.JsonObject) Path(javax.ws.rs.Path) POST(javax.ws.rs.POST) Produces(javax.ws.rs.Produces)

Aggregations

DefaultValue (javax.ws.rs.DefaultValue)83 Produces (javax.ws.rs.Produces)67 Response (javax.ws.rs.core.Response)63 Path (javax.ws.rs.Path)56 HeaderParam (javax.ws.rs.HeaderParam)49 GET (javax.ws.rs.GET)46 URI (java.net.URI)42 ListResponse (org.gluu.oxtrust.model.scim2.ListResponse)36 ApiOperation (com.wordnik.swagger.annotations.ApiOperation)35 QueryParam (javax.ws.rs.QueryParam)34 Consumes (javax.ws.rs.Consumes)32 POST (javax.ws.rs.POST)30 PathParam (javax.ws.rs.PathParam)29 List (java.util.List)24 ArrayList (java.util.ArrayList)23 Inject (javax.inject.Inject)20 PUT (javax.ws.rs.PUT)20 ProtectedApi (org.gluu.oxtrust.service.filter.ProtectedApi)20 InvalidAttributeValueException (javax.management.InvalidAttributeValueException)19 MediaType (javax.ws.rs.core.MediaType)19