Search in sources :

Example 6 with APPLICATION_JSON_TYPE

use of javax.ws.rs.core.MediaType.APPLICATION_JSON_TYPE in project component-runtime by Talend.

the class ComponentResourceTest method getDetailsMeta.

@Test
void getDetailsMeta() {
    final ComponentDetailList details = base.path("component/details").queryParam("identifiers", client.getJdbcId()).request(APPLICATION_JSON_TYPE).get(ComponentDetailList.class);
    assertEquals(1, details.getDetails().size());
    final ComponentDetail detail = details.getDetails().iterator().next();
    assertEquals("true", detail.getProperties().stream().filter(p -> p.getPath().equals("configuration.connection.password")).findFirst().orElseThrow(() -> new IllegalArgumentException("No credential found")).getMetadata().get("ui::credential"));
    assertEquals("0", detail.getProperties().stream().filter(p -> p.getPath().equals("configuration.timeout")).findFirst().orElseThrow(() -> new IllegalArgumentException("No timeout found")).getDefaultValue());
    assertNull(detail.getProperties().stream().filter(p -> p.getPath().equals("configuration.connection.url")).findFirst().orElseThrow(() -> new IllegalArgumentException("No url found")).getDefaultValue());
}
Also used : MonoMeecrowaveConfig(org.apache.meecrowave.junit5.MonoMeecrowaveConfig) JarFile(java.util.jar.JarFile) Collections.singletonList(java.util.Collections.singletonList) ComponentDetail(org.talend.sdk.component.server.front.model.ComponentDetail) MediaType(javax.ws.rs.core.MediaType) Link(org.talend.sdk.component.server.front.model.Link) ActionReference(org.talend.sdk.component.server.front.model.ActionReference) Map(java.util.Map) ComponentDetailList(org.talend.sdk.component.server.front.model.ComponentDetailList) Predicate(java.util.function.Predicate) Collection(java.util.Collection) WebsocketClient(org.talend.sdk.component.server.test.websocket.WebsocketClient) DependencyDefinition(org.talend.sdk.component.server.front.model.DependencyDefinition) StandardCharsets(java.nio.charset.StandardCharsets) TestInfo(org.junit.jupiter.api.TestInfo) GenericType(javax.ws.rs.core.GenericType) Test(org.junit.jupiter.api.Test) Base64(java.util.Base64) List(java.util.List) APPLICATION_OCTET_STREAM_TYPE(javax.ws.rs.core.MediaType.APPLICATION_OCTET_STREAM_TYPE) ComponentClient(org.talend.sdk.component.server.test.ComponentClient) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) TemporaryFolder(org.talend.sdk.component.junit.base.junit5.TemporaryFolder) PropertyValidation(org.talend.sdk.component.server.front.model.PropertyValidation) Assertions.fail(org.junit.jupiter.api.Assertions.fail) Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) Dependencies(org.talend.sdk.component.server.front.model.Dependencies) Assertions.assertNull(org.junit.jupiter.api.Assertions.assertNull) HashMap(java.util.HashMap) Entity.entity(javax.ws.rs.client.Entity.entity) DeploymentException(javax.websocket.DeploymentException) Function(java.util.function.Function) ArrayList(java.util.ArrayList) Inject(javax.inject.Inject) WithTemporaryFolder(org.talend.sdk.component.junit.base.junit5.WithTemporaryFolder) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) OutputStream(java.io.OutputStream) Iterator(java.util.Iterator) FileOutputStream(java.io.FileOutputStream) IOException(java.io.IOException) ComponentIndex(org.talend.sdk.component.server.front.model.ComponentIndex) ComponentIndices(org.talend.sdk.component.server.front.model.ComponentIndices) File(java.io.File) Consumer(java.util.function.Consumer) IO(org.apache.ziplock.IO) SimplePropertyDefinition(org.talend.sdk.component.server.front.model.SimplePropertyDefinition) APPLICATION_JSON_TYPE(javax.ws.rs.core.MediaType.APPLICATION_JSON_TYPE) WebTarget(javax.ws.rs.client.WebTarget) Comparator(java.util.Comparator) InputStream(java.io.InputStream) ComponentDetailList(org.talend.sdk.component.server.front.model.ComponentDetailList) ComponentDetail(org.talend.sdk.component.server.front.model.ComponentDetail) Test(org.junit.jupiter.api.Test)

Example 7 with APPLICATION_JSON_TYPE

use of javax.ws.rs.core.MediaType.APPLICATION_JSON_TYPE in project component-runtime by Talend.

the class ComponentResource method getDependency.

/**
 * Return a binary of the dependency represented by `id`.
 * It can be maven coordinates for dependencies or a component id.
 *
 * @param id the dependency identifier.
 * @return the dependency binary (jar).
 */
@GET
@Path("dependency/{id}")
@Produces(MediaType.APPLICATION_OCTET_STREAM)
public StreamingOutput getDependency(@PathParam("id") final String id) {
    final ComponentFamilyMeta.BaseMeta<?> component = componentDao.findById(id);
    final File file;
    if (component != null) {
        // local dep
        file = componentManagerService.manager().findPlugin(component.getParent().getPlugin()).orElseThrow(() -> new WebApplicationException(Response.status(Response.Status.NOT_FOUND).type(APPLICATION_JSON_TYPE).entity(new ErrorPayload(PLUGIN_MISSING, "No plugin matching the id: " + id)).build())).getContainerFile().orElseThrow(() -> new WebApplicationException(Response.status(Response.Status.NOT_FOUND).type(APPLICATION_JSON_TYPE).entity(new ErrorPayload(PLUGIN_MISSING, "No dependency matching the id: " + id)).build()));
    } else {
        // just try to resolve it locally, note we would need to ensure some security here
        // .map(Artifact::toPath).map(localDependencyRelativeResolver
        final Artifact artifact = Artifact.from(id);
        file = componentManagerService.manager().getContainer().resolve(artifact.toPath());
    }
    if (!file.exists()) {
        throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND).type(APPLICATION_JSON_TYPE).entity(new ErrorPayload(PLUGIN_MISSING, "No file found for: " + id)).build());
    }
    return output -> {
        // 5k
        final byte[] buffer = new byte[40960];
        try (final InputStream stream = new BufferedInputStream(new FileInputStream(file), buffer.length)) {
            int count;
            while ((count = stream.read(buffer)) >= 0) {
                if (count == 0) {
                    continue;
                }
                output.write(buffer, 0, count);
            }
        }
    };
}
Also used : BufferedInputStream(java.io.BufferedInputStream) Produces(javax.ws.rs.Produces) PropertiesService(org.talend.sdk.component.server.service.PropertiesService) ComponentFamilyMeta(org.talend.sdk.component.runtime.manager.ComponentFamilyMeta) Path(javax.ws.rs.Path) Icon(org.talend.sdk.component.server.front.model.Icon) Collections.singletonList(java.util.Collections.singletonList) ComponentDetail(org.talend.sdk.component.server.front.model.ComponentDetail) ComponentManagerService(org.talend.sdk.component.server.service.ComponentManagerService) MediaType(javax.ws.rs.core.MediaType) Link(org.talend.sdk.component.server.front.model.Link) QueryParam(javax.ws.rs.QueryParam) Collectors.toMap(java.util.stream.Collectors.toMap) Consumes(javax.ws.rs.Consumes) Locale(java.util.Locale) Map(java.util.Map) DefaultValue(javax.ws.rs.DefaultValue) ComponentId(org.talend.sdk.component.server.front.model.ComponentId) ComponentFamilyDao(org.talend.sdk.component.server.dao.ComponentFamilyDao) ContainerComponentRegistry(org.talend.sdk.component.runtime.manager.ContainerComponentRegistry) ComponentDetailList(org.talend.sdk.component.server.front.model.ComponentDetailList) Collections.emptyList(java.util.Collections.emptyList) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) StreamingOutput(javax.ws.rs.core.StreamingOutput) DependencyDefinition(org.talend.sdk.component.server.front.model.DependencyDefinition) ErrorDictionary(org.talend.sdk.component.server.front.model.ErrorDictionary) ErrorPayload(org.talend.sdk.component.server.front.model.error.ErrorPayload) Objects(java.util.Objects) List(java.util.List) Slf4j(lombok.extern.slf4j.Slf4j) Stream(java.util.stream.Stream) Response(javax.ws.rs.core.Response) PostConstruct(javax.annotation.PostConstruct) Optional(java.util.Optional) WebApplicationException(javax.ws.rs.WebApplicationException) ApplicationScoped(javax.enterprise.context.ApplicationScoped) PathParam(javax.ws.rs.PathParam) GET(javax.ws.rs.GET) Dependencies(org.talend.sdk.component.server.front.model.Dependencies) DESIGN_MODEL_MISSING(org.talend.sdk.component.server.front.model.ErrorDictionary.DESIGN_MODEL_MISSING) HashMap(java.util.HashMap) ConcurrentMap(java.util.concurrent.ConcurrentMap) Inject(javax.inject.Inject) LocaleMapper(org.talend.sdk.component.server.service.LocaleMapper) PLUGIN_MISSING(org.talend.sdk.component.server.front.model.ErrorDictionary.PLUGIN_MISSING) RequestKey(org.talend.sdk.component.server.front.base.internal.RequestKey) ActionsService(org.talend.sdk.component.server.service.ActionsService) Collections.emptyMap(java.util.Collections.emptyMap) POST(javax.ws.rs.POST) Container(org.talend.sdk.component.container.Container) Optional.ofNullable(java.util.Optional.ofNullable) Artifact(org.talend.sdk.component.dependencies.maven.Artifact) COMPONENT_MISSING(org.talend.sdk.component.server.front.model.ErrorDictionary.COMPONENT_MISSING) DesignModel(org.talend.sdk.component.design.extension.DesignModel) ComponentIndex(org.talend.sdk.component.server.front.model.ComponentIndex) FileInputStream(java.io.FileInputStream) ComponentIndices(org.talend.sdk.component.server.front.model.ComponentIndices) IconResolver(org.talend.sdk.component.server.service.IconResolver) File(java.io.File) Collectors.toList(java.util.stream.Collectors.toList) ComponentDao(org.talend.sdk.component.server.dao.ComponentDao) APPLICATION_JSON_TYPE(javax.ws.rs.core.MediaType.APPLICATION_JSON_TYPE) ComponentManager(org.talend.sdk.component.runtime.manager.ComponentManager) InputStream(java.io.InputStream) ErrorPayload(org.talend.sdk.component.server.front.model.error.ErrorPayload) WebApplicationException(javax.ws.rs.WebApplicationException) BufferedInputStream(java.io.BufferedInputStream) BufferedInputStream(java.io.BufferedInputStream) FileInputStream(java.io.FileInputStream) InputStream(java.io.InputStream) ComponentFamilyMeta(org.talend.sdk.component.runtime.manager.ComponentFamilyMeta) File(java.io.File) Artifact(org.talend.sdk.component.dependencies.maven.Artifact) FileInputStream(java.io.FileInputStream) Path(javax.ws.rs.Path) Produces(javax.ws.rs.Produces) GET(javax.ws.rs.GET)

Example 8 with APPLICATION_JSON_TYPE

use of javax.ws.rs.core.MediaType.APPLICATION_JSON_TYPE in project component-runtime by Talend.

the class ComponentResourceTest method getDetails.

@Test
void getDetails() {
    final ComponentDetailList details = base.path("component/details").queryParam("identifiers", client.fetchIndex().getComponents().stream().filter(c -> c.getId().getFamily().equals("chain") && c.getId().getName().equals("list")).findFirst().orElseThrow(() -> new IllegalArgumentException("no chain#list component")).getId().getId()).request(APPLICATION_JSON_TYPE).get(ComponentDetailList.class);
    assertEquals(1, details.getDetails().size());
    final ComponentDetail detail = details.getDetails().iterator().next();
    assertEquals("the-test-component", detail.getId().getPlugin());
    assertEquals("chain", detail.getId().getFamily());
    assertEquals("list", detail.getId().getName());
    assertEquals("The List Component", detail.getDisplayName());
    final Collection<ActionReference> remoteActions = detail.getActions();
    assertEquals(1, remoteActions.size());
    final ActionReference action = remoteActions.iterator().next();
    assertEquals("default", action.getName());
    assertEquals("healthcheck", action.getType());
    assertEquals(6, action.getProperties().size());
    assertValidation("remote.urls", detail, validation -> validation.getMinItems() == 1);
    assertValidation("remote.urls", detail, validation -> validation.getUniqueItems() != null && validation.getUniqueItems());
    assertValidation("remote.user.user", detail, validation -> validation.getMinLength() != null && validation.getMinLength() == 2);
    assertValidation("remote.user.password", detail, validation -> validation.getMaxLength() != null && validation.getMaxLength() == 8);
    assertValidation("remote.user.password", detail, validation -> validation.getRequired() != null && validation.getRequired());
    // for now
    assertEquals(0, detail.getLinks().size());
/*
         * final Link link = detail.getLinks().iterator().next(); assertEquals("Detail", link.getName());
         * assertEquals("/component/...", link.getPath());
         */
}
Also used : MonoMeecrowaveConfig(org.apache.meecrowave.junit5.MonoMeecrowaveConfig) JarFile(java.util.jar.JarFile) Collections.singletonList(java.util.Collections.singletonList) ComponentDetail(org.talend.sdk.component.server.front.model.ComponentDetail) MediaType(javax.ws.rs.core.MediaType) Link(org.talend.sdk.component.server.front.model.Link) ActionReference(org.talend.sdk.component.server.front.model.ActionReference) Map(java.util.Map) ComponentDetailList(org.talend.sdk.component.server.front.model.ComponentDetailList) Predicate(java.util.function.Predicate) Collection(java.util.Collection) WebsocketClient(org.talend.sdk.component.server.test.websocket.WebsocketClient) DependencyDefinition(org.talend.sdk.component.server.front.model.DependencyDefinition) StandardCharsets(java.nio.charset.StandardCharsets) TestInfo(org.junit.jupiter.api.TestInfo) GenericType(javax.ws.rs.core.GenericType) Test(org.junit.jupiter.api.Test) Base64(java.util.Base64) List(java.util.List) APPLICATION_OCTET_STREAM_TYPE(javax.ws.rs.core.MediaType.APPLICATION_OCTET_STREAM_TYPE) ComponentClient(org.talend.sdk.component.server.test.ComponentClient) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) TemporaryFolder(org.talend.sdk.component.junit.base.junit5.TemporaryFolder) PropertyValidation(org.talend.sdk.component.server.front.model.PropertyValidation) Assertions.fail(org.junit.jupiter.api.Assertions.fail) Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) Dependencies(org.talend.sdk.component.server.front.model.Dependencies) Assertions.assertNull(org.junit.jupiter.api.Assertions.assertNull) HashMap(java.util.HashMap) Entity.entity(javax.ws.rs.client.Entity.entity) DeploymentException(javax.websocket.DeploymentException) Function(java.util.function.Function) ArrayList(java.util.ArrayList) Inject(javax.inject.Inject) WithTemporaryFolder(org.talend.sdk.component.junit.base.junit5.WithTemporaryFolder) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) OutputStream(java.io.OutputStream) Iterator(java.util.Iterator) FileOutputStream(java.io.FileOutputStream) IOException(java.io.IOException) ComponentIndex(org.talend.sdk.component.server.front.model.ComponentIndex) ComponentIndices(org.talend.sdk.component.server.front.model.ComponentIndices) File(java.io.File) Consumer(java.util.function.Consumer) IO(org.apache.ziplock.IO) SimplePropertyDefinition(org.talend.sdk.component.server.front.model.SimplePropertyDefinition) APPLICATION_JSON_TYPE(javax.ws.rs.core.MediaType.APPLICATION_JSON_TYPE) WebTarget(javax.ws.rs.client.WebTarget) Comparator(java.util.Comparator) InputStream(java.io.InputStream) ComponentDetailList(org.talend.sdk.component.server.front.model.ComponentDetailList) ActionReference(org.talend.sdk.component.server.front.model.ActionReference) ComponentDetail(org.talend.sdk.component.server.front.model.ComponentDetail) Test(org.junit.jupiter.api.Test)

Example 9 with APPLICATION_JSON_TYPE

use of javax.ws.rs.core.MediaType.APPLICATION_JSON_TYPE in project component-runtime by Talend.

the class Generator method generatedJira.

private static void generatedJira(final File generatedDir, final String username, final String password, final String version) {
    if (username == null || username.trim().isEmpty() || "skip".equals(username)) {
        log.error("No JIRA credentials, will skip changelog generation");
        return;
    }
    final String project = "TCOMP";
    final String jiraBase = "https://jira.talendforge.org";
    final File file = new File(generatedDir, "generated_changelog.adoc");
    final Client client = ClientBuilder.newClient().register(new JsonbJaxrsProvider<>());
    final String auth = "Basic " + Base64.getEncoder().encodeToString((username + ':' + password).getBytes(StandardCharsets.UTF_8));
    try {
        final WebTarget restApi = client.target(jiraBase + "/rest/api/2").property("http.connection.timeout", 60000L);
        final List<JiraVersion> versions = restApi.path("project/{project}/versions").resolveTemplate("project", project).request(APPLICATION_JSON_TYPE).header("Authorization", auth).get(new GenericType<List<JiraVersion>>() {
        });
        final String currentVersion = version.replace("-SNAPSHOT", "");
        final List<JiraVersion> loggedVersions = versions.stream().filter(v -> (v.isReleased() || jiraVersionMatches(currentVersion, v.getName()))).collect(toList());
        if (loggedVersions.isEmpty()) {
            try (final PrintStream stream = new PrintStream(new WriteIfDifferentStream(file))) {
                stream.println("No version found.");
            }
            return;
        }
        final String jql = "project=" + project + " AND labels=\"changelog\"" + loggedVersions.stream().map(v -> "fixVersion=" + v.getName()).collect(joining(" OR ", " AND (", ")"));
        final Function<Long, JiraIssues> searchFrom = startAt -> restApi.path("search").queryParam("jql", jql).queryParam("startAt", startAt).request(APPLICATION_JSON_TYPE).header("Authorization", auth).get(JiraIssues.class);
        final Function<JiraIssues, Stream<JiraIssues>> paginate = new Function<JiraIssues, Stream<JiraIssues>>() {

            @Override
            public Stream<JiraIssues> apply(final JiraIssues issues) {
                final long nextStartAt = issues.getStartAt() + issues.getMaxResults();
                final Stream<JiraIssues> fetched = Stream.of(issues);
                return issues.getTotal() > nextStartAt ? Stream.concat(fetched, apply(searchFrom.apply(nextStartAt))) : fetched;
            }
        };
        final Set<String> includeStatus = Stream.of("closed", "resolved", "development done", "qa done", "done").collect(toSet());
        final Map<String, TreeMap<String, List<JiraIssue>>> issues = Stream.of(searchFrom.apply(0L)).flatMap(paginate).flatMap(i -> ofNullable(i.getIssues()).map(Collection::stream).orElseGet(Stream::empty)).filter(issue -> includeStatus.contains(issue.getFields().getStatus().getName().toLowerCase(ENGLISH))).flatMap(i -> i.getFields().getFixVersions().stream().map(v -> Pair.of(v, i))).collect(groupingBy(pair -> pair.getKey().getName(), () -> new TreeMap<>(versionComparator()), groupingBy(pair -> pair.getValue().getFields().getIssuetype().getName(), TreeMap::new, collectingAndThen(mapping(Pair::getValue, toList()), l -> {
            l.sort(comparing(JiraIssue::getKey));
            return l;
        }))));
        final String changelog = issues.entrySet().stream().map(versionnedIssues -> new StringBuilder("\n\n== Version ").append(versionnedIssues.getKey()).append(versionnedIssues.getValue().entrySet().stream().collect((Supplier<StringBuilder>) StringBuilder::new, (builder, issuesByType) -> builder.append("\n\n=== ").append(issuesByType.getKey()).append("\n\n").append(issuesByType.getValue().stream().collect((Supplier<StringBuilder>) StringBuilder::new, // useful
        (a, i) -> a.append("- link:").append(jiraBase).append("/browse/").append(i.getKey()).append("[").append(i.getKey()).append("^]").append(": ").append(i.getFields().getSummary()).append("\n"), StringBuilder::append)), StringBuilder::append))).collect(StringBuilder::new, StringBuilder::append, StringBuilder::append).toString();
        try (final PrintStream stream = new PrintStream(new WriteIfDifferentStream(file))) {
            stream.println(changelog);
        }
    } finally {
        client.close();
    }
}
Also used : Condition(org.talend.sdk.component.api.configuration.condition.meta.Condition) RequiredArgsConstructor(lombok.RequiredArgsConstructor) AnnotationFinder(org.apache.xbean.finder.AnnotationFinder) ConfigurationTypeParameterEnricher(org.talend.sdk.component.runtime.manager.reflect.parameterenricher.ConfigurationTypeParameterEnricher) Type(org.talend.sdk.component.api.service.schema.Type) Collectors.toMap(java.util.stream.Collectors.toMap) Pair(org.apache.commons.lang3.tuple.Pair) Map(java.util.Map) Defaults(org.talend.sdk.component.runtime.reflect.Defaults) ENGLISH(java.util.Locale.ENGLISH) UiParameterEnricher(org.talend.sdk.component.runtime.manager.reflect.parameterenricher.UiParameterEnricher) Collectors.toSet(java.util.stream.Collectors.toSet) Validations(org.talend.sdk.component.api.configuration.constraint.meta.Validations) JsonbBuilder(javax.json.bind.JsonbBuilder) ActiveIf(org.talend.sdk.component.api.configuration.condition.ActiveIf) Collection(java.util.Collection) Ui(org.talend.sdk.component.api.configuration.ui.meta.Ui) Mapper(org.apache.johnzon.mapper.Mapper) Set(java.util.Set) FilterOutputStream(java.io.FilterOutputStream) PropertyOrderStrategy(javax.json.bind.config.PropertyOrderStrategy) Collectors.joining(java.util.stream.Collectors.joining) StandardCharsets(java.nio.charset.StandardCharsets) InvocationTargetException(java.lang.reflect.InvocationTargetException) GenericType(javax.ws.rs.core.GenericType) Base64(java.util.Base64) List(java.util.List) Slf4j(lombok.extern.slf4j.Slf4j) Stream(java.util.stream.Stream) Documentation(org.talend.sdk.component.api.meta.Documentation) Modifier(java.lang.reflect.Modifier) Annotation(java.lang.annotation.Annotation) Configuration(org.apache.deltaspike.core.api.config.Configuration) PRIVATE(lombok.AccessLevel.PRIVATE) MapperBuilder(org.apache.johnzon.mapper.MapperBuilder) Proxy(java.lang.reflect.Proxy) ByteArrayOutputStream(java.io.ByteArrayOutputStream) Collectors.groupingBy(java.util.stream.Collectors.groupingBy) Client(javax.ws.rs.client.Client) Collectors.collectingAndThen(java.util.stream.Collectors.collectingAndThen) Function(java.util.function.Function) Supplier(java.util.function.Supplier) JsonbConfig(javax.json.bind.JsonbConfig) AutoLayout(org.talend.sdk.component.api.configuration.ui.layout.AutoLayout) Schema(org.talend.sdk.component.api.service.schema.Schema) ValidationParameterEnricher(org.talend.sdk.component.runtime.manager.reflect.parameterenricher.ValidationParameterEnricher) ConfigProperty(org.apache.deltaspike.core.api.config.ConfigProperty) FileArchive(org.apache.xbean.finder.archive.FileArchive) ArrayList(java.util.ArrayList) ClientBuilder(javax.ws.rs.client.ClientBuilder) ComponentServerConfiguration(org.talend.sdk.component.server.configuration.ComponentServerConfiguration) Collectors.mapping(java.util.stream.Collectors.mapping) Validation(org.talend.sdk.component.api.configuration.constraint.meta.Validation) ConfigurationType(org.talend.sdk.component.api.configuration.type.meta.ConfigurationType) GridLayout(org.talend.sdk.component.api.configuration.ui.layout.GridLayout) Comparator.comparing(java.util.Comparator.comparing) JsonbJaxrsProvider(org.apache.johnzon.jaxrs.jsonb.jaxrs.JsonbJaxrsProvider) ValidationResult(org.talend.sdk.component.api.service.asyncvalidation.ValidationResult) ConditionParameterEnricher(org.talend.sdk.component.runtime.manager.reflect.parameterenricher.ConditionParameterEnricher) OutputStream(java.io.OutputStream) PrintStream(java.io.PrintStream) BaseEnvironmentProvider(org.talend.sdk.component.junit.environment.BaseEnvironmentProvider) ParameterExtensionEnricher(org.talend.sdk.component.spi.parameter.ParameterExtensionEnricher) MalformedURLException(java.net.MalformedURLException) Files(java.nio.file.Files) JarArchive(org.apache.xbean.finder.archive.JarArchive) Values(org.talend.sdk.component.api.service.completion.Values) Optional.ofNullable(java.util.Optional.ofNullable) FileOutputStream(java.io.FileOutputStream) IOException(java.io.IOException) File(java.io.File) Collectors.toList(java.util.stream.Collectors.toList) TreeMap(java.util.TreeMap) HealthCheckStatus(org.talend.sdk.component.api.service.healthcheck.HealthCheckStatus) JarLocation.jarLocation(org.apache.ziplock.JarLocation.jarLocation) Data(lombok.Data) APPLICATION_JSON_TYPE(javax.ws.rs.core.MediaType.APPLICATION_JSON_TYPE) Jsonb(javax.json.bind.Jsonb) WebTarget(javax.ws.rs.client.WebTarget) Comparator(java.util.Comparator) ActionType(org.talend.sdk.component.api.service.ActionType) NoArgsConstructor(lombok.NoArgsConstructor) Function(java.util.function.Function) List(java.util.List) ArrayList(java.util.ArrayList) Collectors.toList(java.util.stream.Collectors.toList) FilterOutputStream(java.io.FilterOutputStream) Stream(java.util.stream.Stream) ByteArrayOutputStream(java.io.ByteArrayOutputStream) OutputStream(java.io.OutputStream) PrintStream(java.io.PrintStream) FileOutputStream(java.io.FileOutputStream) Client(javax.ws.rs.client.Client) Pair(org.apache.commons.lang3.tuple.Pair) PrintStream(java.io.PrintStream) TreeMap(java.util.TreeMap) WebTarget(javax.ws.rs.client.WebTarget) File(java.io.File)

Aggregations

APPLICATION_JSON_TYPE (javax.ws.rs.core.MediaType.APPLICATION_JSON_TYPE)9 List (java.util.List)7 Map (java.util.Map)7 WebTarget (javax.ws.rs.client.WebTarget)7 ArrayList (java.util.ArrayList)6 GenericType (javax.ws.rs.core.GenericType)6 File (java.io.File)5 StandardCharsets (java.nio.charset.StandardCharsets)5 Base64 (java.util.Base64)5 Optional.ofNullable (java.util.Optional.ofNullable)5 Response (javax.ws.rs.core.Response)5 Slf4j (lombok.extern.slf4j.Slf4j)5 IOException (java.io.IOException)4 InputStream (java.io.InputStream)4 Collection (java.util.Collection)4 Collections.singletonList (java.util.Collections.singletonList)4 Comparator (java.util.Comparator)4 Collectors.toList (java.util.stream.Collectors.toList)4 Collectors.toMap (java.util.stream.Collectors.toMap)4 Inject (javax.inject.Inject)4