target stringlengths 20 113k | src_fm stringlengths 11 86.3k | src_fm_fc stringlengths 21 86.4k | src_fm_fc_co stringlengths 30 86.4k | src_fm_fc_ms stringlengths 42 86.8k | src_fm_fc_ms_ff stringlengths 43 86.8k |
|---|---|---|---|---|---|
@Test void emptyMavenProject(final WebTarget target) throws IOException { final ProjectModel projectModel = new ProjectModel(); final Map<String, String> files = createZip(projectModel, target); assertEquals(Stream .of("application/.mvn/wrapper/", "application/mvnw.cmd", "application/", "application/mvnw", "application... | @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orElse("zip") + ".zip"... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... |
@Test void simpleInput(final WebTarget target) throws IOException { final ProjectModel.Entry datastoreConfig = new ProjectModel.Entry(); datastoreConfig.setName("testDso"); datastoreConfig.setType("string"); final ProjectModel.ReusableStructure datastore = new ProjectModel.ReusableStructure(); datastore.setId("24c20f6e... | @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orElse("zip") + ".zip"... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... |
@Test void lowercaseDataStore(final WebTarget target) throws IOException { final ProjectModel.Entry datastoreConfig = new ProjectModel.Entry(); datastoreConfig.setName("testDso"); datastoreConfig.setType("string"); final ProjectModel.ReusableStructure datastore = new ProjectModel.ReusableStructure(); datastore.setId("2... | @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orElse("zip") + ".zip"... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... |
@Test void formProject(final WebTarget target) throws IOException { final ProjectModel projectModel = new ProjectModel(); projectModel.setBuildType("Gradle"); final Map<String, String> files = createZip(projectModel, model -> target .path("project/zip/form") .queryParam("compressionType", "gzip") .request(MediaType.APP... | @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orElse("zip") + ".zip"... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... |
@Test void emptyGradleProject(final WebTarget target) throws IOException { final ProjectModel projectModel = new ProjectModel(); projectModel.setBuildType("Gradle"); final Map<String, String> files = createZip(projectModel, target); assertEquals(Stream .of("application/gradle/", "application/", "application/gradle/wrap... | @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orElse("zip") + ".zip"... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... |
@Test void testingProject(final WebTarget target) throws IOException { final ProjectModel projectModel = new ProjectModel(); projectModel.setFacets(singletonList("Talend Component Kit Testing")); final Map<String, String> files = createZip(projectModel, target); assertEquals(Stream .of("application/", "application/src/... | @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orElse("zip") + ".zip"... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... |
@Test void gradleTestingProject(final WebTarget target) throws IOException { final ProjectModel projectModel = new ProjectModel(); projectModel.setBuildType("Gradle"); projectModel.setFacets(singletonList("Talend Component Kit Testing")); final String buildFile = createZip(projectModel, target).get("application/build.g... | @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orElse("zip") + ".zip"... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... |
@Test void bigDecimalsInArrays(final JsonBuilderFactory jsonBuilderFactory, final JsonProvider jsonProvider, final RecordBuilderFactory recordBuilderFactory, final RecordConverters converter) throws Exception { final BigDecimal pos1 = new BigDecimal("48.8480275637"); final BigDecimal pos2 = new BigDecimal("2.2536945678... | public <T> Record toRecord(final MappingMetaRegistry registry, final T data, final Supplier<Jsonb> jsonbProvider, final Supplier<RecordBuilderFactory> recordBuilderProvider) { if (data == null) { return null; } if (Record.class.isInstance(data)) { return Record.class.cast(data); } if (JsonObject.class.isInstance(data))... | RecordConverters implements Serializable { public <T> Record toRecord(final MappingMetaRegistry registry, final T data, final Supplier<Jsonb> jsonbProvider, final Supplier<RecordBuilderFactory> recordBuilderProvider) { if (data == null) { return null; } if (Record.class.isInstance(data)) { return Record.class.cast(data... | RecordConverters implements Serializable { public <T> Record toRecord(final MappingMetaRegistry registry, final T data, final Supplier<Jsonb> jsonbProvider, final Supplier<RecordBuilderFactory> recordBuilderProvider) { if (data == null) { return null; } if (Record.class.isInstance(data)) { return Record.class.cast(data... | RecordConverters implements Serializable { public <T> Record toRecord(final MappingMetaRegistry registry, final T data, final Supplier<Jsonb> jsonbProvider, final Supplier<RecordBuilderFactory> recordBuilderProvider) { if (data == null) { return null; } if (Record.class.isInstance(data)) { return Record.class.cast(data... | RecordConverters implements Serializable { public <T> Record toRecord(final MappingMetaRegistry registry, final T data, final Supplier<Jsonb> jsonbProvider, final Supplier<RecordBuilderFactory> recordBuilderProvider) { if (data == null) { return null; } if (Record.class.isInstance(data)) { return Record.class.cast(data... |
@Test void wadlFacetMaven(final WebTarget target) throws IOException { final ProjectModel projectModel = new ProjectModel(); projectModel.setFacets(singletonList("WADL Client Generation")); final Map<String, String> files = createZip(projectModel, target); assertWadl(files); Stream .of(" <dependency>\n" + " <groupId>or... | @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orElse("zip") + ".zip"... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... |
@Test void travisFacet(final WebTarget target) throws IOException { final ProjectModel projectModel = new ProjectModel(); projectModel.setFacets(singletonList("Travis CI")); final Map<String, String> files = createZip(projectModel, target); assertTrue(files.get("application/README.adoc").contains("=== Travis CI\n")); a... | @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orElse("zip") + ".zip"... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... |
@Test void wadlFacetGradle(final WebTarget target) throws IOException { final ProjectModel projectModel = new ProjectModel(); projectModel.setBuildType("Gradle"); projectModel.setPackageBase("com.foo"); projectModel.setFacets(singletonList("WADL Client Generation")); final Map<String, String> files = createZip(projectM... | @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orElse("zip") + ".zip"... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... |
@Test void beamFacet(final WebTarget target) throws IOException { final ProjectModel projectModel = new ProjectModel(); projectModel.setPackageBase("com.foo"); projectModel.setFacets(singletonList("Apache Beam")); { final ProjectModel.Source source = new ProjectModel.Source(); source.setName("tIn"); source.setGenericOu... | @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orElse("zip") + ".zip"... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... |
@Test void beamFacetProcessorOutput(final WebTarget target) throws IOException { final ProjectModel projectModel = new ProjectModel(); projectModel.setPackageBase("com.foo"); projectModel.setFacets(singletonList("Apache Beam")); { final ProjectModel.Processor proc = new ProjectModel.Processor(); proc.setName("tIn"); { ... | @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orElse("zip") + ".zip"... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... |
@Test void codenvyFacet(final WebTarget target) throws IOException { final ProjectModel projectModel = new ProjectModel(); projectModel.setPackageBase("com.foo"); projectModel.setFacets(singletonList("Codenvy")); final Map<String, String> files = createZip(projectModel, target); assertEquals(resourceFileToString("gener... | @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orElse("zip") + ".zip"... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... | ProjectResource { @POST @Path("zip/form") @Produces("application/zip") public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) { final ProjectModel model = readProjectModel(compressedModel, providers); final String filename = ofNullable(model.getArtifact()).orEl... |
@Test void source() { final Set<ProjectRequest.SourceConfiguration> sources = singleton(new ProjectRequest.SourceConfiguration( "mycomp", "", false, new ProjectRequest.DataStructure( new ArrayList<>(singleton(new ProjectRequest.Entry("name", "string", null, null)))), new ProjectRequest.StructureConfiguration( new Proje... | public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.ReusableConfiguration> co... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... |
@Test void sourceComplexConfiguration() { final Map<String, String> files = generator .create("com.foo", build, "superfamily", "supercategory", singleton(new ProjectRequest.SourceConfiguration("mycomp", "", false, new ProjectRequest.DataStructure( new ArrayList<>(singleton(new ProjectRequest.Entry("person", "", null, n... | public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.ReusableConfiguration> co... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... |
@Test void withDataSetDataStore() { final Map<String, String> files = generator .create("com.foo", build, "superfamily", "supercategory", singleton(new ProjectRequest.SourceConfiguration("mycomp", "", false, new ProjectRequest.DataStructure(new ArrayList<>(asList( new ProjectRequest.Entry("identifier", "string", null, ... | public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.ReusableConfiguration> co... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... |
@Test void genericSource() { final Map<String, String> files = generator .create("com.foo", build, "superfamily", "supercategory", singleton(new ProjectRequest.SourceConfiguration("mycomp", "", false, new ProjectRequest.DataStructure(new ArrayList<>()), null)), emptyList(), emptyList()) .collect(toMap(FacetGenerator.In... | public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.ReusableConfiguration> co... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... |
@Test void split() { final Mapper mapper = new PartitionMapperImpl("Root", "Test", null, "Plugin", false, new SampleMapper()); assertEquals(10, mapper.assess()); final List<Mapper> split = mapper.split(3); assertEquals(3, split.stream().distinct().count()); split.forEach(s -> { assertTrue(PartitionMapperImpl.class.isIn... | @Override public List<Mapper> split(final long desiredSize) { lazyInit(); return ((Collection<?>) doInvoke(split, splitArgSupplier.apply(desiredSize))) .stream() .map(Serializable.class::cast) .map(mapper -> new PartitionMapperImpl(rootName(), name(), inputName, plugin(), stream, mapper)) .collect(toList()); } | PartitionMapperImpl extends LifecycleImpl implements Mapper, Delegated { @Override public List<Mapper> split(final long desiredSize) { lazyInit(); return ((Collection<?>) doInvoke(split, splitArgSupplier.apply(desiredSize))) .stream() .map(Serializable.class::cast) .map(mapper -> new PartitionMapperImpl(rootName(), nam... | PartitionMapperImpl extends LifecycleImpl implements Mapper, Delegated { @Override public List<Mapper> split(final long desiredSize) { lazyInit(); return ((Collection<?>) doInvoke(split, splitArgSupplier.apply(desiredSize))) .stream() .map(Serializable.class::cast) .map(mapper -> new PartitionMapperImpl(rootName(), nam... | PartitionMapperImpl extends LifecycleImpl implements Mapper, Delegated { @Override public List<Mapper> split(final long desiredSize) { lazyInit(); return ((Collection<?>) doInvoke(split, splitArgSupplier.apply(desiredSize))) .stream() .map(Serializable.class::cast) .map(mapper -> new PartitionMapperImpl(rootName(), nam... | PartitionMapperImpl extends LifecycleImpl implements Mapper, Delegated { @Override public List<Mapper> split(final long desiredSize) { lazyInit(); return ((Collection<?>) doInvoke(split, splitArgSupplier.apply(desiredSize))) .stream() .map(Serializable.class::cast) .map(mapper -> new PartitionMapperImpl(rootName(), nam... |
@Test void genericStreamMapper() { final Map<String, String> files = generator .create("com.foo", build, "superfamily", "supercategory", singleton(new ProjectRequest.SourceConfiguration("mycomp", "", true, new ProjectRequest.DataStructure(new ArrayList<>()), null)), emptyList(), emptyList()) .collect(toMap(FacetGenerat... | public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.ReusableConfiguration> co... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... |
@Test void isolatedProcessor() { final Map<String, String> files = generator .create("com.foo", build, "superfamily", "supercategory", emptyList(), singletonList(new ProjectRequest.ProcessorConfiguration("tProc", "", new ProjectRequest.DataStructure(new ArrayList<>()), null, null)), emptyList()) .collect(toMap(FacetGen... | public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.ReusableConfiguration> co... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... |
@Test void processorOutput() { final Map<String, String> files = generator .create("com.foo", build, "superfamily", "supercategory", emptyList(), singletonList(new ProjectRequest.ProcessorConfiguration("tProc", "", new ProjectRequest.DataStructure(new ArrayList<>()), null, new HashMap<String, ProjectRequest.StructureCo... | public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.ReusableConfiguration> co... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... |
@Test void processorGenericOutput() { final Map<String, String> files = generator .create("com.foo", build, "superfamily", "supercategory", emptyList(), singletonList(new ProjectRequest.ProcessorConfiguration("tProc", "", new ProjectRequest.DataStructure(new ArrayList<>()), null, singletonMap("__default__", new Project... | public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.ReusableConfiguration> co... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... |
@Test void processorInput() { final Map<String, String> files = generator .create("com.foo", build, "superfamily", "supercategory", emptyList(), singletonList(new ProjectRequest.ProcessorConfiguration("tProc", "", new ProjectRequest.DataStructure(new ArrayList<>()), singletonMap("__default__", new ProjectRequest.Struct... | public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.ReusableConfiguration> co... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... |
@Test void processorGenericInput() { final Map<String, String> files = generator .create("com.foo", build, "superfamily", "supercategory", emptyList(), singletonList(new ProjectRequest.ProcessorConfiguration("tProc", "", new ProjectRequest.DataStructure(new ArrayList<>()), singletonMap("__default__", new ProjectRequest... | public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.ReusableConfiguration> co... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... |
@Test void standardProcessor() { final Map<String, String> files = generator .create("com.foo", build, "superfamily", "supercategory", emptyList(), singletonList(new ProjectRequest.ProcessorConfiguration("tProc", "", new ProjectRequest.DataStructure(new ArrayList<>()), new HashMap<String, ProjectRequest.StructureConfig... | public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.ReusableConfiguration> co... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... |
@Test void configurationWithCredential() { ProjectRequest.DataStructure config = new ProjectRequest.DataStructure( new ArrayList<>(asList(new ProjectRequest.Entry("host", "string", null, null), new ProjectRequest.Entry("port", "string", null, null), new ProjectRequest.Entry("credential", null, null, new ProjectRequest.... | public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.ReusableConfiguration> co... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... | ComponentGenerator { public Stream<FacetGenerator.InMemoryFile> create(final String tuple, final Build build, final String family, final String category, final Collection<ProjectRequest.SourceConfiguration> sources, final Collection<ProjectRequest.ProcessorConfiguration> processors, final Collection<ProjectRequest.Reus... |
@Test void nestedDependency(@TempDir final File temporaryFolder) throws IOException { final File file = new File(temporaryFolder, UUID.randomUUID().toString() + ".jar"); file.getParentFile().mkdirs(); try (final JarOutputStream enclosing = new JarOutputStream(new FileOutputStream(file))) { enclosing.putNextEntry(new Zi... | @Override public Stream<Artifact> resolve(final ClassLoader rootLoader, final String artifact) { return Stream .of(readDependencies(ofNullable(getJar(artifact)) .filter(Files::exists) .map(this::findDependenciesFile) .orElseGet(() -> { final boolean isNested; try (final InputStream stream = rootLoader .getResourceAsStr... | MvnDependencyListLocalRepositoryResolver implements Resolver { @Override public Stream<Artifact> resolve(final ClassLoader rootLoader, final String artifact) { return Stream .of(readDependencies(ofNullable(getJar(artifact)) .filter(Files::exists) .map(this::findDependenciesFile) .orElseGet(() -> { final boolean isNeste... | MvnDependencyListLocalRepositoryResolver implements Resolver { @Override public Stream<Artifact> resolve(final ClassLoader rootLoader, final String artifact) { return Stream .of(readDependencies(ofNullable(getJar(artifact)) .filter(Files::exists) .map(this::findDependenciesFile) .orElseGet(() -> { final boolean isNeste... | MvnDependencyListLocalRepositoryResolver implements Resolver { @Override public Stream<Artifact> resolve(final ClassLoader rootLoader, final String artifact) { return Stream .of(readDependencies(ofNullable(getJar(artifact)) .filter(Files::exists) .map(this::findDependenciesFile) .orElseGet(() -> { final boolean isNeste... | MvnDependencyListLocalRepositoryResolver implements Resolver { @Override public Stream<Artifact> resolve(final ClassLoader rootLoader, final String artifact) { return Stream .of(readDependencies(ofNullable(getJar(artifact)) .filter(Files::exists) .map(this::findDependenciesFile) .orElseGet(() -> { final boolean isNeste... |
@Test void packageDefinition() { final ClassLoader parent = ConfigurableClassLoaderTest.class.getClassLoader(); try (final ConfigurableClassLoader loader = new ConfigurableClassLoader("", new URL[] { new File(Constants.DEPENDENCIES_LOCATION, "org/apache/tomee/ziplock/7.0.5/ziplock-7.0.5.jar").toURI().toURL() }, parent,... | @Override public Class<?> loadClass(final String name, final boolean resolve) throws ClassNotFoundException { if (name == null) { throw new ClassNotFoundException(); } final Class<?> aClass = proxies.get(name); if (aClass != null) { return aClass; } synchronized (getClassLoadingLock(name)) { Class<?> clazz; if (isDirec... | ConfigurableClassLoader extends URLClassLoader { @Override public Class<?> loadClass(final String name, final boolean resolve) throws ClassNotFoundException { if (name == null) { throw new ClassNotFoundException(); } final Class<?> aClass = proxies.get(name); if (aClass != null) { return aClass; } synchronized (getClas... | ConfigurableClassLoader extends URLClassLoader { @Override public Class<?> loadClass(final String name, final boolean resolve) throws ClassNotFoundException { if (name == null) { throw new ClassNotFoundException(); } final Class<?> aClass = proxies.get(name); if (aClass != null) { return aClass; } synchronized (getClas... | ConfigurableClassLoader extends URLClassLoader { @Override public Class<?> loadClass(final String name, final boolean resolve) throws ClassNotFoundException { if (name == null) { throw new ClassNotFoundException(); } final Class<?> aClass = proxies.get(name); if (aClass != null) { return aClass; } synchronized (getClas... | ConfigurableClassLoader extends URLClassLoader { @Override public Class<?> loadClass(final String name, final boolean resolve) throws ClassNotFoundException { if (name == null) { throw new ClassNotFoundException(); } final Class<?> aClass = proxies.get(name); if (aClass != null) { return aClass; } synchronized (getClas... |
@Test void create() { assertInput(new PartitionMapperImpl("Root", "Test", null, "Plugin", false, new SampleMapper())); } | @Override public Input create() { lazyInit(); final Serializable input = Serializable.class.cast(doInvoke(inputFactory)); if (isStream()) { return new StreamingInputImpl(rootName(), inputName, plugin(), input, loadRetryConfiguration()); } return new InputImpl(rootName(), inputName, plugin(), input); } | PartitionMapperImpl extends LifecycleImpl implements Mapper, Delegated { @Override public Input create() { lazyInit(); final Serializable input = Serializable.class.cast(doInvoke(inputFactory)); if (isStream()) { return new StreamingInputImpl(rootName(), inputName, plugin(), input, loadRetryConfiguration()); } return n... | PartitionMapperImpl extends LifecycleImpl implements Mapper, Delegated { @Override public Input create() { lazyInit(); final Serializable input = Serializable.class.cast(doInvoke(inputFactory)); if (isStream()) { return new StreamingInputImpl(rootName(), inputName, plugin(), input, loadRetryConfiguration()); } return n... | PartitionMapperImpl extends LifecycleImpl implements Mapper, Delegated { @Override public Input create() { lazyInit(); final Serializable input = Serializable.class.cast(doInvoke(inputFactory)); if (isStream()) { return new StreamingInputImpl(rootName(), inputName, plugin(), input, loadRetryConfiguration()); } return n... | PartitionMapperImpl extends LifecycleImpl implements Mapper, Delegated { @Override public Input create() { lazyInit(); final Serializable input = Serializable.class.cast(doInvoke(inputFactory)); if (isStream()) { return new StreamingInputImpl(rootName(), inputName, plugin(), input, loadRetryConfiguration()); } return n... |
@Test void childLoading() { Stream.of(true, false).forEach(parentFirst -> { final ClassLoader parent = ConfigurableClassLoaderTest.class.getClassLoader(); try (final ConfigurableClassLoader loader = new ConfigurableClassLoader("", new URL[] { new File(Constants.DEPENDENCIES_LOCATION, "org/apache/tomee/ziplock/7.0.5/zip... | @Override public Class<?> loadClass(final String name, final boolean resolve) throws ClassNotFoundException { if (name == null) { throw new ClassNotFoundException(); } final Class<?> aClass = proxies.get(name); if (aClass != null) { return aClass; } synchronized (getClassLoadingLock(name)) { Class<?> clazz; if (isDirec... | ConfigurableClassLoader extends URLClassLoader { @Override public Class<?> loadClass(final String name, final boolean resolve) throws ClassNotFoundException { if (name == null) { throw new ClassNotFoundException(); } final Class<?> aClass = proxies.get(name); if (aClass != null) { return aClass; } synchronized (getClas... | ConfigurableClassLoader extends URLClassLoader { @Override public Class<?> loadClass(final String name, final boolean resolve) throws ClassNotFoundException { if (name == null) { throw new ClassNotFoundException(); } final Class<?> aClass = proxies.get(name); if (aClass != null) { return aClass; } synchronized (getClas... | ConfigurableClassLoader extends URLClassLoader { @Override public Class<?> loadClass(final String name, final boolean resolve) throws ClassNotFoundException { if (name == null) { throw new ClassNotFoundException(); } final Class<?> aClass = proxies.get(name); if (aClass != null) { return aClass; } synchronized (getClas... | ConfigurableClassLoader extends URLClassLoader { @Override public Class<?> loadClass(final String name, final boolean resolve) throws ClassNotFoundException { if (name == null) { throw new ClassNotFoundException(); } final Class<?> aClass = proxies.get(name); if (aClass != null) { return aClass; } synchronized (getClas... |
@Test void parentFiltering() { final ClassLoader parent = ConfigurableClassLoaderTest.class.getClassLoader(); try (final ConfigurableClassLoader loader = new ConfigurableClassLoader("", new URL[0], parent, name -> !ConfigurableClassLoaderTest.class.getName().equals(name), name -> true, null, new String[0])) { try { loa... | @Override public Class<?> loadClass(final String name, final boolean resolve) throws ClassNotFoundException { if (name == null) { throw new ClassNotFoundException(); } final Class<?> aClass = proxies.get(name); if (aClass != null) { return aClass; } synchronized (getClassLoadingLock(name)) { Class<?> clazz; if (isDirec... | ConfigurableClassLoader extends URLClassLoader { @Override public Class<?> loadClass(final String name, final boolean resolve) throws ClassNotFoundException { if (name == null) { throw new ClassNotFoundException(); } final Class<?> aClass = proxies.get(name); if (aClass != null) { return aClass; } synchronized (getClas... | ConfigurableClassLoader extends URLClassLoader { @Override public Class<?> loadClass(final String name, final boolean resolve) throws ClassNotFoundException { if (name == null) { throw new ClassNotFoundException(); } final Class<?> aClass = proxies.get(name); if (aClass != null) { return aClass; } synchronized (getClas... | ConfigurableClassLoader extends URLClassLoader { @Override public Class<?> loadClass(final String name, final boolean resolve) throws ClassNotFoundException { if (name == null) { throw new ClassNotFoundException(); } final Class<?> aClass = proxies.get(name); if (aClass != null) { return aClass; } synchronized (getClas... | ConfigurableClassLoader extends URLClassLoader { @Override public Class<?> loadClass(final String name, final boolean resolve) throws ClassNotFoundException { if (name == null) { throw new ClassNotFoundException(); } final Class<?> aClass = proxies.get(name); if (aClass != null) { return aClass; } synchronized (getClas... |
@Test void nestedPackageDefinition(@TempDir final File temporaryFolder) throws Exception { final File nestedJar = createNestedJar(temporaryFolder, "org.apache.tomee:ziplock:jar:7.0.5"); try (final URLClassLoader parent = new URLClassLoader(new URL[] { nestedJar.toURI().toURL() }, Thread.currentThread().getContextClassL... | @Override public Class<?> loadClass(final String name, final boolean resolve) throws ClassNotFoundException { if (name == null) { throw new ClassNotFoundException(); } final Class<?> aClass = proxies.get(name); if (aClass != null) { return aClass; } synchronized (getClassLoadingLock(name)) { Class<?> clazz; if (isDirec... | ConfigurableClassLoader extends URLClassLoader { @Override public Class<?> loadClass(final String name, final boolean resolve) throws ClassNotFoundException { if (name == null) { throw new ClassNotFoundException(); } final Class<?> aClass = proxies.get(name); if (aClass != null) { return aClass; } synchronized (getClas... | ConfigurableClassLoader extends URLClassLoader { @Override public Class<?> loadClass(final String name, final boolean resolve) throws ClassNotFoundException { if (name == null) { throw new ClassNotFoundException(); } final Class<?> aClass = proxies.get(name); if (aClass != null) { return aClass; } synchronized (getClas... | ConfigurableClassLoader extends URLClassLoader { @Override public Class<?> loadClass(final String name, final boolean resolve) throws ClassNotFoundException { if (name == null) { throw new ClassNotFoundException(); } final Class<?> aClass = proxies.get(name); if (aClass != null) { return aClass; } synchronized (getClas... | ConfigurableClassLoader extends URLClassLoader { @Override public Class<?> loadClass(final String name, final boolean resolve) throws ClassNotFoundException { if (name == null) { throw new ClassNotFoundException(); } final Class<?> aClass = proxies.get(name); if (aClass != null) { return aClass; } synchronized (getClas... |
@Test void findContainedResources(@TempDir final File temporaryFolder) throws Exception { final File nestedJar = createNestedJar(temporaryFolder, "org.apache.tomee:ziplock:jar:7.0.5"); try (final URLClassLoader parent = new URLClassLoader(new URL[] { nestedJar.toURI().toURL() }, Thread.currentThread().getContextClassLo... | public List<InputStream> findContainedResources(final String name) { try { return Stream.concat(ofNullable(super.findResources(name)).map(urls -> list(urls).stream().map(url -> { try { return url.openStream(); } catch (final IOException e) { throw new IllegalStateException(e); } })).orElseGet(Stream::empty), ofNullable... | ConfigurableClassLoader extends URLClassLoader { public List<InputStream> findContainedResources(final String name) { try { return Stream.concat(ofNullable(super.findResources(name)).map(urls -> list(urls).stream().map(url -> { try { return url.openStream(); } catch (final IOException e) { throw new IllegalStateExcepti... | ConfigurableClassLoader extends URLClassLoader { public List<InputStream> findContainedResources(final String name) { try { return Stream.concat(ofNullable(super.findResources(name)).map(urls -> list(urls).stream().map(url -> { try { return url.openStream(); } catch (final IOException e) { throw new IllegalStateExcepti... | ConfigurableClassLoader extends URLClassLoader { public List<InputStream> findContainedResources(final String name) { try { return Stream.concat(ofNullable(super.findResources(name)).map(urls -> list(urls).stream().map(url -> { try { return url.openStream(); } catch (final IOException e) { throw new IllegalStateExcepti... | ConfigurableClassLoader extends URLClassLoader { public List<InputStream> findContainedResources(final String name) { try { return Stream.concat(ofNullable(super.findResources(name)).map(urls -> list(urls).stream().map(url -> { try { return url.openStream(); } catch (final IOException e) { throw new IllegalStateExcepti... |
@Test void getResourceAsStreamChildFirst(@TempDir final File temporaryFolder) throws IOException { final File jar = new File(temporaryFolder, "getResourceAsStreamChildFirst.jar"); temporaryFolder.mkdirs(); try (final JarOutputStream outputStream = new JarOutputStream(new FileOutputStream(jar))) { outputStream.putNextEn... | @Override public InputStream getResourceAsStream(final String name) { return ofNullable(doGetResourceAsStream(name)) .orElseGet(() -> ofNullable(resources.get(name)) .filter(s -> s.size() > 0) .map(s -> s.iterator().next().resource) .map(ByteArrayInputStream::new) .orElse(null)); } | ConfigurableClassLoader extends URLClassLoader { @Override public InputStream getResourceAsStream(final String name) { return ofNullable(doGetResourceAsStream(name)) .orElseGet(() -> ofNullable(resources.get(name)) .filter(s -> s.size() > 0) .map(s -> s.iterator().next().resource) .map(ByteArrayInputStream::new) .orEls... | ConfigurableClassLoader extends URLClassLoader { @Override public InputStream getResourceAsStream(final String name) { return ofNullable(doGetResourceAsStream(name)) .orElseGet(() -> ofNullable(resources.get(name)) .filter(s -> s.size() > 0) .map(s -> s.iterator().next().resource) .map(ByteArrayInputStream::new) .orEls... | ConfigurableClassLoader extends URLClassLoader { @Override public InputStream getResourceAsStream(final String name) { return ofNullable(doGetResourceAsStream(name)) .orElseGet(() -> ofNullable(resources.get(name)) .filter(s -> s.size() > 0) .map(s -> s.iterator().next().resource) .map(ByteArrayInputStream::new) .orEls... | ConfigurableClassLoader extends URLClassLoader { @Override public InputStream getResourceAsStream(final String name) { return ofNullable(doGetResourceAsStream(name)) .orElseGet(() -> ofNullable(resources.get(name)) .filter(s -> s.size() > 0) .map(s -> s.iterator().next().resource) .map(ByteArrayInputStream::new) .orEls... |
@Test void iterate() { final Iterator<List<String>> strings = asList(asList("a", "b"), asList("c"), asList("d", "e", "f")).iterator(); final BufferizedProducerSupport<String> support = new BufferizedProducerSupport<>(() -> strings.hasNext() ? strings.next().iterator() : null); assertEquals("a", support.next()); assertE... | public T next() { if (current == null || !current.hasNext()) { current = supplier.get(); } return current != null && current.hasNext() ? current.next() : null; } | BufferizedProducerSupport { public T next() { if (current == null || !current.hasNext()) { current = supplier.get(); } return current != null && current.hasNext() ? current.next() : null; } } | BufferizedProducerSupport { public T next() { if (current == null || !current.hasNext()) { current = supplier.get(); } return current != null && current.hasNext() ? current.next() : null; } } | BufferizedProducerSupport { public T next() { if (current == null || !current.hasNext()) { current = supplier.get(); } return current != null && current.hasNext() ? current.next() : null; } T next(); } | BufferizedProducerSupport { public T next() { if (current == null || !current.hasNext()) { current = supplier.get(); } return current != null && current.hasNext() ? current.next() : null; } T next(); } |
@Test void pathsAreClosed() { final String error = doValidate("closedpath", 1).iterator().next(); assertTrue(error.startsWith("[closedpath.svg] All path must be closed so end with 'z', found value:"), error); } | private String pathsAreClosed(final SVGOMSVGElement icon) { return browseDom(icon, node -> { if ("path".equals(node.getNodeName())) { final Node d = node.getAttributes() == null ? null : node.getAttributes().getNamedItem("d"); if (d == null || d.getNodeValue() == null) { return "Missing 'd' in a path"; } if (!d.getNode... | SvgValidator { private String pathsAreClosed(final SVGOMSVGElement icon) { return browseDom(icon, node -> { if ("path".equals(node.getNodeName())) { final Node d = node.getAttributes() == null ? null : node.getAttributes().getNamedItem("d"); if (d == null || d.getNodeValue() == null) { return "Missing 'd' in a path"; }... | SvgValidator { private String pathsAreClosed(final SVGOMSVGElement icon) { return browseDom(icon, node -> { if ("path".equals(node.getNodeName())) { final Node d = node.getAttributes() == null ? null : node.getAttributes().getNamedItem("d"); if (d == null || d.getNodeValue() == null) { return "Missing 'd' in a path"; }... | SvgValidator { private String pathsAreClosed(final SVGOMSVGElement icon) { return browseDom(icon, node -> { if ("path".equals(node.getNodeName())) { final Node d = node.getAttributes() == null ? null : node.getAttributes().getNamedItem("d"); if (d == null || d.getNodeValue() == null) { return "Missing 'd' in a path"; }... | SvgValidator { private String pathsAreClosed(final SVGOMSVGElement icon) { return browseDom(icon, node -> { if ("path".equals(node.getNodeName())) { final Node d = node.getAttributes() == null ? null : node.getAttributes().getNamedItem("d"); if (d == null || d.getNodeValue() == null) { return "Missing 'd' in a path"; }... |
@Test void noEmbedStyle() { final String error = doValidate("embeddedstyle", 1).iterator().next(); assertTrue(error.startsWith("[embeddedstyle.svg] Forbidden <style> in icon"), error); } | private String noEmbedStyle(final SVGOMSVGElement icon) { return browseDom(icon, node -> node.getNodeName().equals("style") ? "Forbidden <style> in icon" : null); } | SvgValidator { private String noEmbedStyle(final SVGOMSVGElement icon) { return browseDom(icon, node -> node.getNodeName().equals("style") ? "Forbidden <style> in icon" : null); } } | SvgValidator { private String noEmbedStyle(final SVGOMSVGElement icon) { return browseDom(icon, node -> node.getNodeName().equals("style") ? "Forbidden <style> in icon" : null); } } | SvgValidator { private String noEmbedStyle(final SVGOMSVGElement icon) { return browseDom(icon, node -> node.getNodeName().equals("style") ? "Forbidden <style> in icon" : null); } Stream<String> validate(final Path path); } | SvgValidator { private String noEmbedStyle(final SVGOMSVGElement icon) { return browseDom(icon, node -> node.getNodeName().equals("style") ? "Forbidden <style> in icon" : null); } Stream<String> validate(final Path path); } |
@Test void noDisplayNone() { final String error = doValidate("displaynone", 1).iterator().next(); assertTrue(error.startsWith("[displaynone.svg] 'display:none' is forbidden in SVG icons"), error); } | private String noDisplayNone(final SVGOMSVGElement icon) { return browseDom(icon, node -> { final Node display = node.getAttributes() == null ? null : node.getAttributes().getNamedItem("display"); if (display != null && display.getNodeValue() != null) { return display.getNodeValue().replaceAll(" +", "").equalsIgnoreCas... | SvgValidator { private String noDisplayNone(final SVGOMSVGElement icon) { return browseDom(icon, node -> { final Node display = node.getAttributes() == null ? null : node.getAttributes().getNamedItem("display"); if (display != null && display.getNodeValue() != null) { return display.getNodeValue().replaceAll(" +", "").... | SvgValidator { private String noDisplayNone(final SVGOMSVGElement icon) { return browseDom(icon, node -> { final Node display = node.getAttributes() == null ? null : node.getAttributes().getNamedItem("display"); if (display != null && display.getNodeValue() != null) { return display.getNodeValue().replaceAll(" +", "").... | SvgValidator { private String noDisplayNone(final SVGOMSVGElement icon) { return browseDom(icon, node -> { final Node display = node.getAttributes() == null ? null : node.getAttributes().getNamedItem("display"); if (display != null && display.getNodeValue() != null) { return display.getNodeValue().replaceAll(" +", "").... | SvgValidator { private String noDisplayNone(final SVGOMSVGElement icon) { return browseDom(icon, node -> { final Node display = node.getAttributes() == null ? null : node.getAttributes().getNamedItem("display"); if (display != null && display.getNodeValue() != null) { return display.getNodeValue().replaceAll(" +", "").... |
@Test void normalInstall() throws IOException { final StudioInstaller installer = newStudioInstaller(); installer.run(); final File backup = new File(this.studioHome, "configuration/backup"); assertTrue(backup.exists()); assertEquals(1, requireNonNull(backup.listFiles((dir, name) -> name.startsWith("config.ini"))).leng... | @Override public void run() { log.info("Installing development version of " + mainGav + " in " + studioHome); final List<String> artifacts = this.artifacts.values().stream().map(File::getName).collect(toList()); final String mvnMeta[] = mainGav.split(":"); final String artifact = mvnMeta[1]; final String version = mvnM... | StudioInstaller implements Runnable { @Override public void run() { log.info("Installing development version of " + mainGav + " in " + studioHome); final List<String> artifacts = this.artifacts.values().stream().map(File::getName).collect(toList()); final String mvnMeta[] = mainGav.split(":"); final String artifact = m... | StudioInstaller implements Runnable { @Override public void run() { log.info("Installing development version of " + mainGav + " in " + studioHome); final List<String> artifacts = this.artifacts.values().stream().map(File::getName).collect(toList()); final String mvnMeta[] = mainGav.split(":"); final String artifact = m... | StudioInstaller implements Runnable { @Override public void run() { log.info("Installing development version of " + mainGav + " in " + studioHome); final List<String> artifacts = this.artifacts.values().stream().map(File::getName).collect(toList()); final String mvnMeta[] = mainGav.split(":"); final String artifact = m... | StudioInstaller implements Runnable { @Override public void run() { log.info("Installing development version of " + mainGav + " in " + studioHome); final List<String> artifacts = this.artifacts.values().stream().map(File::getName).collect(toList()); final String mvnMeta[] = mainGav.split(":"); final String artifact = m... |
@Test void createStreaming() { final PartitionMapperImpl mapper = new PartitionMapperImpl("Root", "Test", null, "Plugin", true, new SampleMapper()); final Input input = mapper.create(); assertTrue(StreamingInputImpl.class.isInstance(input)); } | @Override public Input create() { lazyInit(); final Serializable input = Serializable.class.cast(doInvoke(inputFactory)); if (isStream()) { return new StreamingInputImpl(rootName(), inputName, plugin(), input, loadRetryConfiguration()); } return new InputImpl(rootName(), inputName, plugin(), input); } | PartitionMapperImpl extends LifecycleImpl implements Mapper, Delegated { @Override public Input create() { lazyInit(); final Serializable input = Serializable.class.cast(doInvoke(inputFactory)); if (isStream()) { return new StreamingInputImpl(rootName(), inputName, plugin(), input, loadRetryConfiguration()); } return n... | PartitionMapperImpl extends LifecycleImpl implements Mapper, Delegated { @Override public Input create() { lazyInit(); final Serializable input = Serializable.class.cast(doInvoke(inputFactory)); if (isStream()) { return new StreamingInputImpl(rootName(), inputName, plugin(), input, loadRetryConfiguration()); } return n... | PartitionMapperImpl extends LifecycleImpl implements Mapper, Delegated { @Override public Input create() { lazyInit(); final Serializable input = Serializable.class.cast(doInvoke(inputFactory)); if (isStream()) { return new StreamingInputImpl(rootName(), inputName, plugin(), input, loadRetryConfiguration()); } return n... | PartitionMapperImpl extends LifecycleImpl implements Mapper, Delegated { @Override public Input create() { lazyInit(); final Serializable input = Serializable.class.cast(doInvoke(inputFactory)); if (isStream()) { return new StreamingInputImpl(rootName(), inputName, plugin(), input, loadRetryConfiguration()); } return n... |
@Test void forceConflictVersionsInstall() throws IOException { normalInstall(); final StudioInstaller installer = new StudioInstaller("gtest:atest:2.0-SNAPSHOT", studioHome, emptyMap(), LOGGER, true, null); installer.run(); final File registration = new File(studioHome, "configuration/components-registration.properties... | @Override public void run() { log.info("Installing development version of " + mainGav + " in " + studioHome); final List<String> artifacts = this.artifacts.values().stream().map(File::getName).collect(toList()); final String mvnMeta[] = mainGav.split(":"); final String artifact = mvnMeta[1]; final String version = mvnM... | StudioInstaller implements Runnable { @Override public void run() { log.info("Installing development version of " + mainGav + " in " + studioHome); final List<String> artifacts = this.artifacts.values().stream().map(File::getName).collect(toList()); final String mvnMeta[] = mainGav.split(":"); final String artifact = m... | StudioInstaller implements Runnable { @Override public void run() { log.info("Installing development version of " + mainGav + " in " + studioHome); final List<String> artifacts = this.artifacts.values().stream().map(File::getName).collect(toList()); final String mvnMeta[] = mainGav.split(":"); final String artifact = m... | StudioInstaller implements Runnable { @Override public void run() { log.info("Installing development version of " + mainGav + " in " + studioHome); final List<String> artifacts = this.artifacts.values().stream().map(File::getName).collect(toList()); final String mvnMeta[] = mainGav.split(":"); final String artifact = m... | StudioInstaller implements Runnable { @Override public void run() { log.info("Installing development version of " + mainGav + " in " + studioHome); final List<String> artifacts = this.artifacts.values().stream().map(File::getName).collect(toList()); final String mvnMeta[] = mainGav.split(":"); final String artifact = m... |
@Test void reinstallWithLockedJar() throws IOException { final File m2Artifact = new File(configuration, ".m2/repository/gtest/atest/1.0-SNAPSHOT/atest-1.0-SNAPSHOT.jar"); if (!m2Artifact.getParentFile().mkdirs()) { fail("Can't create m2 repository for the test "); } try (final Writer w = new FileWriter(m2Artifact)) { ... | @Override public void run() { log.info("Installing development version of " + mainGav + " in " + studioHome); final List<String> artifacts = this.artifacts.values().stream().map(File::getName).collect(toList()); final String mvnMeta[] = mainGav.split(":"); final String artifact = mvnMeta[1]; final String version = mvnM... | StudioInstaller implements Runnable { @Override public void run() { log.info("Installing development version of " + mainGav + " in " + studioHome); final List<String> artifacts = this.artifacts.values().stream().map(File::getName).collect(toList()); final String mvnMeta[] = mainGav.split(":"); final String artifact = m... | StudioInstaller implements Runnable { @Override public void run() { log.info("Installing development version of " + mainGav + " in " + studioHome); final List<String> artifacts = this.artifacts.values().stream().map(File::getName).collect(toList()); final String mvnMeta[] = mainGav.split(":"); final String artifact = m... | StudioInstaller implements Runnable { @Override public void run() { log.info("Installing development version of " + mainGav + " in " + studioHome); final List<String> artifacts = this.artifacts.values().stream().map(File::getName).collect(toList()); final String mvnMeta[] = mainGav.split(":"); final String artifact = m... | StudioInstaller implements Runnable { @Override public void run() { log.info("Installing development version of " + mainGav + " in " + studioHome); final List<String> artifacts = this.artifacts.values().stream().map(File::getName).collect(toList()); final String mvnMeta[] = mainGav.split(":"); final String artifact = m... |
@Test void convert() throws IOException { final Path resolved = jarLocation(SVG2PngTest.class).toPath().resolve("test/icons"); final Path expected = resolved.resolve("logo_icon32.png"); if (Files.exists(expected)) { Files.delete(expected); } new SVG2Png(resolved, true, log).run(); assertTrue(Files.exists(expected)); } | @Override public void run() { try { Files.walkFileTree(iconsFolder, new SimpleFileVisitor<Path>() { @Override public FileVisitResult visitFile(final Path file, final BasicFileAttributes attrs) throws IOException { final String fileName = file.getFileName().toString(); if (fileName.endsWith(".svg")) { final Path svg = f... | SVG2Png implements Runnable { @Override public void run() { try { Files.walkFileTree(iconsFolder, new SimpleFileVisitor<Path>() { @Override public FileVisitResult visitFile(final Path file, final BasicFileAttributes attrs) throws IOException { final String fileName = file.getFileName().toString(); if (fileName.endsWith... | SVG2Png implements Runnable { @Override public void run() { try { Files.walkFileTree(iconsFolder, new SimpleFileVisitor<Path>() { @Override public FileVisitResult visitFile(final Path file, final BasicFileAttributes attrs) throws IOException { final String fileName = file.getFileName().toString(); if (fileName.endsWith... | SVG2Png implements Runnable { @Override public void run() { try { Files.walkFileTree(iconsFolder, new SimpleFileVisitor<Path>() { @Override public FileVisitResult visitFile(final Path file, final BasicFileAttributes attrs) throws IOException { final String fileName = file.getFileName().toString(); if (fileName.endsWith... | SVG2Png implements Runnable { @Override public void run() { try { Files.walkFileTree(iconsFolder, new SimpleFileVisitor<Path>() { @Override public FileVisitResult visitFile(final Path file, final BasicFileAttributes attrs) throws IOException { final String fileName = file.getFileName().toString(); if (fileName.endsWith... |
@Test void run(@TempDir final File output) throws Exception { final File out = new File(output, "my.props"); new ScanTask(singletonList(new File("target/test-classes")), singletonList("org.talend.test.valid.update.UpdateService"), singletonList("org.talend.test.valid.*"), "include-exclude", out).run(); final Properties... | @Override public void run() { output.getParentFile().mkdirs(); try (final OutputStream stream = new FileOutputStream(output)) { final Properties properties = new Properties(); properties.setProperty("classes.list", scanList().collect(joining(","))); properties.store(stream, "generated by " + getClass() + " at " + new D... | ScanTask implements Runnable { @Override public void run() { output.getParentFile().mkdirs(); try (final OutputStream stream = new FileOutputStream(output)) { final Properties properties = new Properties(); properties.setProperty("classes.list", scanList().collect(joining(","))); properties.store(stream, "generated by ... | ScanTask implements Runnable { @Override public void run() { output.getParentFile().mkdirs(); try (final OutputStream stream = new FileOutputStream(output)) { final Properties properties = new Properties(); properties.setProperty("classes.list", scanList().collect(joining(","))); properties.store(stream, "generated by ... | ScanTask implements Runnable { @Override public void run() { output.getParentFile().mkdirs(); try (final OutputStream stream = new FileOutputStream(output)) { final Properties properties = new Properties(); properties.setProperty("classes.list", scanList().collect(joining(","))); properties.store(stream, "generated by ... | ScanTask implements Runnable { @Override public void run() { output.getParentFile().mkdirs(); try (final OutputStream stream = new FileOutputStream(output)) { final Properties properties = new Properties(); properties.setProperty("classes.list", scanList().collect(joining(","))); properties.store(stream, "generated by ... |
@Test void stashIo() throws UnsupportedEncodingException { final IO testIO = new IO(); final ByteArrayOutputStream stdout = new ByteArrayOutputStream(); final PrintStream stdoutPs = new PrintStream(stdout); final ByteArrayOutputStream stderr = new ByteArrayOutputStream(); final PrintStream stderrPs = new PrintStream(st... | public void set() { System.setIn(stdin); System.setOut(stdout); System.setErr(stderr); } | IO { public void set() { System.setIn(stdin); System.setOut(stdout); System.setErr(stderr); } } | IO { public void set() { System.setIn(stdin); System.setOut(stdout); System.setErr(stderr); } IO(); } | IO { public void set() { System.setIn(stdin); System.setOut(stdout); System.setErr(stderr); } IO(); void set(); } | IO { public void set() { System.setIn(stdin); System.setOut(stdout); System.setErr(stderr); } IO(); void set(); } |
@Test void writeRecord() throws UnsupportedEncodingException { write(s -> s.writeRecord("test_stream", Json.createObjectBuilder().add("id", 1).add("name", "Test").build()), "{\"type\":\"RECORD\",\"stream\":\"test_stream\",\"time_extracted\":\"2019-08-23T11:26:00.000Z\",\"record\":{\"id\":1,\"name\":\"Test\"}}"); } | public synchronized void writeRecord(final String stream, final JsonObject record) { final JsonObject json = builderFactory .createObjectBuilder() .add("type", "RECORD") .add("stream", requireNonNull(stream, "stream can't be null")) .add("time_extracted", formatDate(dateTimeSupplier.get())) .add("record", record) .buil... | Singer { public synchronized void writeRecord(final String stream, final JsonObject record) { final JsonObject json = builderFactory .createObjectBuilder() .add("type", "RECORD") .add("stream", requireNonNull(stream, "stream can't be null")) .add("time_extracted", formatDate(dateTimeSupplier.get())) .add("record", reco... | Singer { public synchronized void writeRecord(final String stream, final JsonObject record) { final JsonObject json = builderFactory .createObjectBuilder() .add("type", "RECORD") .add("stream", requireNonNull(stream, "stream can't be null")) .add("time_extracted", formatDate(dateTimeSupplier.get())) .add("record", reco... | Singer { public synchronized void writeRecord(final String stream, final JsonObject record) { final JsonObject json = builderFactory .createObjectBuilder() .add("type", "RECORD") .add("stream", requireNonNull(stream, "stream can't be null")) .add("time_extracted", formatDate(dateTimeSupplier.get())) .add("record", reco... | Singer { public synchronized void writeRecord(final String stream, final JsonObject record) { final JsonObject json = builderFactory .createObjectBuilder() .add("type", "RECORD") .add("stream", requireNonNull(stream, "stream can't be null")) .add("time_extracted", formatDate(dateTimeSupplier.get())) .add("record", reco... |
@Test void writeShema() throws UnsupportedEncodingException { write(s -> s .writeSchema("test_stream", Json.createObjectBuilder().add("id", 1).add("name", "Test").build(), Json.createArrayBuilder().add("foo").build(), Json.createArrayBuilder().add("bar").build()), "{\"type\":\"SCHEMA\",\"stream\":\"test_stream\",\"sche... | public synchronized void writeSchema(final String stream, final JsonObject schema, final JsonArray keys, final JsonArray bookmarks) { final JsonObject json = builderFactory .createObjectBuilder() .add("type", "SCHEMA") .add("stream", requireNonNull(stream, "stream can't be null")) .add("schema", schema) .add("key_prope... | Singer { public synchronized void writeSchema(final String stream, final JsonObject schema, final JsonArray keys, final JsonArray bookmarks) { final JsonObject json = builderFactory .createObjectBuilder() .add("type", "SCHEMA") .add("stream", requireNonNull(stream, "stream can't be null")) .add("schema", schema) .add("... | Singer { public synchronized void writeSchema(final String stream, final JsonObject schema, final JsonArray keys, final JsonArray bookmarks) { final JsonObject json = builderFactory .createObjectBuilder() .add("type", "SCHEMA") .add("stream", requireNonNull(stream, "stream can't be null")) .add("schema", schema) .add("... | Singer { public synchronized void writeSchema(final String stream, final JsonObject schema, final JsonArray keys, final JsonArray bookmarks) { final JsonObject json = builderFactory .createObjectBuilder() .add("type", "SCHEMA") .add("stream", requireNonNull(stream, "stream can't be null")) .add("schema", schema) .add("... | Singer { public synchronized void writeSchema(final String stream, final JsonObject schema, final JsonArray keys, final JsonArray bookmarks) { final JsonObject json = builderFactory .createObjectBuilder() .add("type", "SCHEMA") .add("stream", requireNonNull(stream, "stream can't be null")) .add("schema", schema) .add("... |
@Test void writeState() throws UnsupportedEncodingException { write(s -> s.writeState(Json.createObjectBuilder().add("offset", 1).build()), "{\"type\":\"STATE\",\"value\":{\"offset\":1}}"); } | public synchronized void writeState(final JsonObject state) { final JsonObject json = builderFactory.createObjectBuilder().add("type", "STATE").add("value", state).build(); runIo.getStdout().println(json); } | Singer { public synchronized void writeState(final JsonObject state) { final JsonObject json = builderFactory.createObjectBuilder().add("type", "STATE").add("value", state).build(); runIo.getStdout().println(json); } } | Singer { public synchronized void writeState(final JsonObject state) { final JsonObject json = builderFactory.createObjectBuilder().add("type", "STATE").add("value", state).build(); runIo.getStdout().println(json); } Singer(); } | Singer { public synchronized void writeState(final JsonObject state) { final JsonObject json = builderFactory.createObjectBuilder().add("type", "STATE").add("value", state).build(); runIo.getStdout().println(json); } Singer(); String formatDate(final ZonedDateTime dateTime); synchronized void writeState(final JsonObjec... | Singer { public synchronized void writeState(final JsonObject state) { final JsonObject json = builderFactory.createObjectBuilder().add("type", "STATE").add("value", state).build(); runIo.getStdout().println(json); } Singer(); String formatDate(final ZonedDateTime dateTime); synchronized void writeState(final JsonObjec... |
@Test void discover() throws IOException { final Kitap kitap = new Kitap(new SingerArgs("--config", config.toAbsolutePath().toString(), "--discover"), new Singer(new IO(), () -> CONSTANT_DATE)); kitap.run(); flushIO.run(); assertEquals("{\"streams\":[" + "{\"tap_stream_id\":\"default\",\"stream\":\"default\"," + "\"sch... | private void discover(final Mapper mapper) { final JsonObject schema = records(mapper) .findFirst() .map(record -> new JsonSchemaGenerator(record.getSchema().getEntries(), jsonBuilderFactory).get()) .orElseThrow(() -> new IllegalArgumentException( "No record found for " + mapper.rootName() + '#' + mapper.name())); fina... | Kitap implements Runnable { private void discover(final Mapper mapper) { final JsonObject schema = records(mapper) .findFirst() .map(record -> new JsonSchemaGenerator(record.getSchema().getEntries(), jsonBuilderFactory).get()) .orElseThrow(() -> new IllegalArgumentException( "No record found for " + mapper.rootName() +... | Kitap implements Runnable { private void discover(final Mapper mapper) { final JsonObject schema = records(mapper) .findFirst() .map(record -> new JsonSchemaGenerator(record.getSchema().getEntries(), jsonBuilderFactory).get()) .orElseThrow(() -> new IllegalArgumentException( "No record found for " + mapper.rootName() +... | Kitap implements Runnable { private void discover(final Mapper mapper) { final JsonObject schema = records(mapper) .findFirst() .map(record -> new JsonSchemaGenerator(record.getSchema().getEntries(), jsonBuilderFactory).get()) .orElseThrow(() -> new IllegalArgumentException( "No record found for " + mapper.rootName() +... | Kitap implements Runnable { private void discover(final Mapper mapper) { final JsonObject schema = records(mapper) .findFirst() .map(record -> new JsonSchemaGenerator(record.getSchema().getEntries(), jsonBuilderFactory).get()) .orElseThrow(() -> new IllegalArgumentException( "No record found for " + mapper.rootName() +... |
@Test void readAll() throws IOException { final Kitap kitap = new Kitap(new SingerArgs("--config", config.toAbsolutePath().toString()), new Singer(new IO(), () -> CONSTANT_DATE)); kitap.run(); flushIO.run(); try (final BufferedReader reader = new BufferedReader(new StringReader(stdout.toString("UTF-8")))) { final List<... | private void readAll(final JsonObject config, final JsonObject stream, final String streamName, final Mapper mapper) { final AtomicReference<Schema> lastSchema = new AtomicReference<>(); records(mapper).peek(record -> { final Schema newSchema = record.getSchema(); if (!newSchema.equals(lastSchema.get())) { final JsonAr... | Kitap implements Runnable { private void readAll(final JsonObject config, final JsonObject stream, final String streamName, final Mapper mapper) { final AtomicReference<Schema> lastSchema = new AtomicReference<>(); records(mapper).peek(record -> { final Schema newSchema = record.getSchema(); if (!newSchema.equals(lastS... | Kitap implements Runnable { private void readAll(final JsonObject config, final JsonObject stream, final String streamName, final Mapper mapper) { final AtomicReference<Schema> lastSchema = new AtomicReference<>(); records(mapper).peek(record -> { final Schema newSchema = record.getSchema(); if (!newSchema.equals(lastS... | Kitap implements Runnable { private void readAll(final JsonObject config, final JsonObject stream, final String streamName, final Mapper mapper) { final AtomicReference<Schema> lastSchema = new AtomicReference<>(); records(mapper).peek(record -> { final Schema newSchema = record.getSchema(); if (!newSchema.equals(lastS... | Kitap implements Runnable { private void readAll(final JsonObject config, final JsonObject stream, final String streamName, final Mapper mapper) { final AtomicReference<Schema> lastSchema = new AtomicReference<>(); records(mapper).peek(record -> { final Schema newSchema = record.getSchema(); if (!newSchema.equals(lastS... |
@Test void split() { final Mapper mapper = new LocalPartitionMapper("Root", "Test", "Plugin", null); assertEquals(1, mapper.assess()); assertEquals(singletonList(mapper), mapper.split(1)); assertEquals(singletonList(mapper), mapper.split(10)); assertEquals(singletonList(mapper), mapper.split(-159)); } | @Override public List<Mapper> split(final long desiredSize) { return new ArrayList<>(singletonList(this)); } | LocalPartitionMapper extends Named implements Mapper, Delegated { @Override public List<Mapper> split(final long desiredSize) { return new ArrayList<>(singletonList(this)); } } | LocalPartitionMapper extends Named implements Mapper, Delegated { @Override public List<Mapper> split(final long desiredSize) { return new ArrayList<>(singletonList(this)); } protected LocalPartitionMapper(); LocalPartitionMapper(final String rootName, final String name, final String plugin,
final Seriali... | LocalPartitionMapper extends Named implements Mapper, Delegated { @Override public List<Mapper> split(final long desiredSize) { return new ArrayList<>(singletonList(this)); } protected LocalPartitionMapper(); LocalPartitionMapper(final String rootName, final String name, final String plugin,
final Seriali... | LocalPartitionMapper extends Named implements Mapper, Delegated { @Override public List<Mapper> split(final long desiredSize) { return new ArrayList<>(singletonList(this)); } protected LocalPartitionMapper(); LocalPartitionMapper(final String rootName, final String name, final String plugin,
final Seriali... |
@Test void generateSchema() { final Schema schema = factory .newSchemaBuilder(Schema.Type.RECORD) .withEntry(factory.newEntryBuilder().withType(Schema.Type.STRING).withName("name").build()) .withEntry(factory.newEntryBuilder().withType(Schema.Type.INT).withName("id").build()) .withEntry(factory .newEntryBuilder() .with... | @Override public JsonObject get() { final JsonObjectBuilder json = jsonBuilderFactory.createObjectBuilder(); json.add("type", jsonBuilderFactory.createArrayBuilder().add("null").add("object").build()); json.add("additionalProperties", false); json.add("properties", properties.stream().map(this::toJson).collect(toJsonOb... | JsonSchemaGenerator implements Supplier<JsonObject> { @Override public JsonObject get() { final JsonObjectBuilder json = jsonBuilderFactory.createObjectBuilder(); json.add("type", jsonBuilderFactory.createArrayBuilder().add("null").add("object").build()); json.add("additionalProperties", false); json.add("properties", ... | JsonSchemaGenerator implements Supplier<JsonObject> { @Override public JsonObject get() { final JsonObjectBuilder json = jsonBuilderFactory.createObjectBuilder(); json.add("type", jsonBuilderFactory.createArrayBuilder().add("null").add("object").build()); json.add("additionalProperties", false); json.add("properties", ... | JsonSchemaGenerator implements Supplier<JsonObject> { @Override public JsonObject get() { final JsonObjectBuilder json = jsonBuilderFactory.createObjectBuilder(); json.add("type", jsonBuilderFactory.createArrayBuilder().add("null").add("object").build()); json.add("additionalProperties", false); json.add("properties", ... | JsonSchemaGenerator implements Supplier<JsonObject> { @Override public JsonObject get() { final JsonObjectBuilder json = jsonBuilderFactory.createObjectBuilder(); json.add("type", jsonBuilderFactory.createArrayBuilder().add("null").add("object").build()); json.add("additionalProperties", false); json.add("properties", ... |
@Test void map() { final JsonObject object = new RecordJsonMapper(Json.createBuilderFactory(emptyMap()), new Singer(new IO(), ZonedDateTime::now)) .apply(factory .newRecordBuilder() .withString("name", "hello") .withInt("age", 1) .withBoolean("toggle", true) .withDateTime("date", ZonedDateTime.of(2019, 8, 23, 16, 31, 0... | @Override public JsonObject apply(final Record record) { return service.visit(new JsonVisitor(singer, service, jsonBuilderFactory), record); } | RecordJsonMapper implements Function<Record, JsonObject> { @Override public JsonObject apply(final Record record) { return service.visit(new JsonVisitor(singer, service, jsonBuilderFactory), record); } } | RecordJsonMapper implements Function<Record, JsonObject> { @Override public JsonObject apply(final Record record) { return service.visit(new JsonVisitor(singer, service, jsonBuilderFactory), record); } } | RecordJsonMapper implements Function<Record, JsonObject> { @Override public JsonObject apply(final Record record) { return service.visit(new JsonVisitor(singer, service, jsonBuilderFactory), record); } @Override JsonObject apply(final Record record); } | RecordJsonMapper implements Function<Record, JsonObject> { @Override public JsonObject apply(final Record record) { return service.visit(new JsonVisitor(singer, service, jsonBuilderFactory), record); } @Override JsonObject apply(final Record record); } |
@Test void getDependencies() { final String compId = client.getJdbcId(); final Dependencies dependencies = base .path("component/dependencies") .queryParam("identifier", compId) .request(APPLICATION_JSON_TYPE) .get(Dependencies.class); assertEquals(1, dependencies.getDependencies().size()); final DependencyDefinition d... | @Override public Dependencies getDependencies(final String[] ids) { if (ids.length == 0) { return new Dependencies(emptyMap()); } final Map<String, DependencyDefinition> dependencies = new HashMap<>(); for (final String id : ids) { if (virtualComponents.isExtensionEntity(id)) { final DependencyDefinition deps = ofNulla... | ComponentResourceImpl implements ComponentResource { @Override public Dependencies getDependencies(final String[] ids) { if (ids.length == 0) { return new Dependencies(emptyMap()); } final Map<String, DependencyDefinition> dependencies = new HashMap<>(); for (final String id : ids) { if (virtualComponents.isExtensionEn... | ComponentResourceImpl implements ComponentResource { @Override public Dependencies getDependencies(final String[] ids) { if (ids.length == 0) { return new Dependencies(emptyMap()); } final Map<String, DependencyDefinition> dependencies = new HashMap<>(); for (final String id : ids) { if (virtualComponents.isExtensionEn... | ComponentResourceImpl implements ComponentResource { @Override public Dependencies getDependencies(final String[] ids) { if (ids.length == 0) { return new Dependencies(emptyMap()); } final Map<String, DependencyDefinition> dependencies = new HashMap<>(); for (final String id : ids) { if (virtualComponents.isExtensionEn... | ComponentResourceImpl implements ComponentResource { @Override public Dependencies getDependencies(final String[] ids) { if (ids.length == 0) { return new Dependencies(emptyMap()); } final Map<String, DependencyDefinition> dependencies = new HashMap<>(); for (final String id : ids) { if (virtualComponents.isExtensionEn... |
@Test void getDependency(final TestInfo info, @TempDir final File folder) { final Function<String, File> download = id -> { final InputStream stream = base .path("component/dependency/{id}") .resolveTemplate("id", id) .request(APPLICATION_OCTET_STREAM_TYPE) .get(InputStream.class); final File file = new File(folder, in... | @Override public StreamingOutput getDependency(final String id) { final ComponentFamilyMeta.BaseMeta<?> component = componentDao.findById(id); final Supplier<InputStream> streamProvider; if (component != null) { final Path file = componentManagerService .manager() .findPlugin(component.getParent().getPlugin()) .orElseT... | ComponentResourceImpl implements ComponentResource { @Override public StreamingOutput getDependency(final String id) { final ComponentFamilyMeta.BaseMeta<?> component = componentDao.findById(id); final Supplier<InputStream> streamProvider; if (component != null) { final Path file = componentManagerService .manager() .f... | ComponentResourceImpl implements ComponentResource { @Override public StreamingOutput getDependency(final String id) { final ComponentFamilyMeta.BaseMeta<?> component = componentDao.findById(id); final Supplier<InputStream> streamProvider; if (component != null) { final Path file = componentManagerService .manager() .f... | ComponentResourceImpl implements ComponentResource { @Override public StreamingOutput getDependency(final String id) { final ComponentFamilyMeta.BaseMeta<?> component = componentDao.findById(id); final Supplier<InputStream> streamProvider; if (component != null) { final Path file = componentManagerService .manager() .f... | ComponentResourceImpl implements ComponentResource { @Override public StreamingOutput getDependency(final String id) { final ComponentFamilyMeta.BaseMeta<?> component = componentDao.findById(id); final Supplier<InputStream> streamProvider; if (component != null) { final Path file = componentManagerService .manager() .f... |
@Test void getIndex() { assertIndex(client.fetchIndex()); } | @Override public ComponentIndices getIndex(final String language, final boolean includeIconContent, final String query) { final Locale locale = localeMapper.mapLocale(language); caches.evictIfNeeded(indicesPerRequest, configuration.getMaxCacheSize() - 1); return indicesPerRequest.computeIfAbsent(new RequestKey(locale, ... | ComponentResourceImpl implements ComponentResource { @Override public ComponentIndices getIndex(final String language, final boolean includeIconContent, final String query) { final Locale locale = localeMapper.mapLocale(language); caches.evictIfNeeded(indicesPerRequest, configuration.getMaxCacheSize() - 1); return indi... | ComponentResourceImpl implements ComponentResource { @Override public ComponentIndices getIndex(final String language, final boolean includeIconContent, final String query) { final Locale locale = localeMapper.mapLocale(language); caches.evictIfNeeded(indicesPerRequest, configuration.getMaxCacheSize() - 1); return indi... | ComponentResourceImpl implements ComponentResource { @Override public ComponentIndices getIndex(final String language, final boolean includeIconContent, final String query) { final Locale locale = localeMapper.mapLocale(language); caches.evictIfNeeded(indicesPerRequest, configuration.getMaxCacheSize() - 1); return indi... | ComponentResourceImpl implements ComponentResource { @Override public ComponentIndices getIndex(final String language, final boolean includeIconContent, final String query) { final Locale locale = localeMapper.mapLocale(language); caches.evictIfNeeded(indicesPerRequest, configuration.getMaxCacheSize() - 1); return indi... |
@Test void migrate() { final Map<String, String> migrated = base .path("component/migrate/{id}/{version}") .resolveTemplate("id", client.getJdbcId()) .resolveTemplate("version", 1) .request(APPLICATION_JSON_TYPE) .post(entity(new HashMap<String, String>() { { } }, APPLICATION_JSON_TYPE), new GenericType<Map<String, Str... | @Override public Map<String, String> migrate(final String id, final int version, final Map<String, String> config) { if (virtualComponents.isExtensionEntity(id)) { return config; } return ofNullable(componentDao.findById(id)) .orElseThrow(() -> new WebApplicationException(Response .status(Response.Status.NOT_FOUND) .en... | ComponentResourceImpl implements ComponentResource { @Override public Map<String, String> migrate(final String id, final int version, final Map<String, String> config) { if (virtualComponents.isExtensionEntity(id)) { return config; } return ofNullable(componentDao.findById(id)) .orElseThrow(() -> new WebApplicationExce... | ComponentResourceImpl implements ComponentResource { @Override public Map<String, String> migrate(final String id, final int version, final Map<String, String> config) { if (virtualComponents.isExtensionEntity(id)) { return config; } return ofNullable(componentDao.findById(id)) .orElseThrow(() -> new WebApplicationExce... | ComponentResourceImpl implements ComponentResource { @Override public Map<String, String> migrate(final String id, final int version, final Map<String, String> config) { if (virtualComponents.isExtensionEntity(id)) { return config; } return ofNullable(componentDao.findById(id)) .orElseThrow(() -> new WebApplicationExce... | ComponentResourceImpl implements ComponentResource { @Override public Map<String, String> migrate(final String id, final int version, final Map<String, String> config) { if (virtualComponents.isExtensionEntity(id)) { return config; } return ofNullable(componentDao.findById(id)) .orElseThrow(() -> new WebApplicationExce... |
@Test void environment() { final Environment environment = base.path("environment").request(APPLICATION_JSON_TYPE).get(Environment.class); assertEquals(1, environment.getLatestApiVersion()); Stream .of(environment.getCommit(), environment.getTime(), environment.getVersion()) .forEach(Assertions::assertNotNull); assertT... | @Override public Environment get() { return new Environment(latestApiVersion, version, commit, time, configuration.getChangeLastUpdatedAtStartup() ? findLastUpdated() : service.findLastUpdated()); } | EnvironmentResourceImpl implements EnvironmentResource { @Override public Environment get() { return new Environment(latestApiVersion, version, commit, time, configuration.getChangeLastUpdatedAtStartup() ? findLastUpdated() : service.findLastUpdated()); } } | EnvironmentResourceImpl implements EnvironmentResource { @Override public Environment get() { return new Environment(latestApiVersion, version, commit, time, configuration.getChangeLastUpdatedAtStartup() ? findLastUpdated() : service.findLastUpdated()); } } | EnvironmentResourceImpl implements EnvironmentResource { @Override public Environment get() { return new Environment(latestApiVersion, version, commit, time, configuration.getChangeLastUpdatedAtStartup() ? findLastUpdated() : service.findLastUpdated()); } @Override Environment get(); } | EnvironmentResourceImpl implements EnvironmentResource { @Override public Environment get() { return new Environment(latestApiVersion, version, commit, time, configuration.getChangeLastUpdatedAtStartup() ? findLastUpdated() : service.findLastUpdated()); } @Override Environment get(); } |
@Test void execute() { final Response error = base .path("action/execute") .queryParam("type", "healthcheck") .queryParam("family", "chain") .queryParam("action", "default") .request(APPLICATION_JSON_TYPE) .post(Entity.entity(new HashMap<String, String>() { { put("dataSet.urls[0]", "empty"); } }, APPLICATION_JSON_TYPE)... | @Override public CompletionStage<Response> execute(final String family, final String type, final String action, final String lang, final Map<String, String> params) { return virtualActions .getAction(family, type, action) .map(it -> it.getHandler().apply(params, lang).exceptionally(this::onError)) .orElseGet(() -> doEx... | ActionResourceImpl implements ActionResource { @Override public CompletionStage<Response> execute(final String family, final String type, final String action, final String lang, final Map<String, String> params) { return virtualActions .getAction(family, type, action) .map(it -> it.getHandler().apply(params, lang).exce... | ActionResourceImpl implements ActionResource { @Override public CompletionStage<Response> execute(final String family, final String type, final String action, final String lang, final Map<String, String> params) { return virtualActions .getAction(family, type, action) .map(it -> it.getHandler().apply(params, lang).exce... | ActionResourceImpl implements ActionResource { @Override public CompletionStage<Response> execute(final String family, final String type, final String action, final String lang, final Map<String, String> params) { return virtualActions .getAction(family, type, action) .map(it -> it.getHandler().apply(params, lang).exce... | ActionResourceImpl implements ActionResource { @Override public CompletionStage<Response> execute(final String family, final String type, final String action, final String lang, final Map<String, String> params) { return virtualActions .getAction(family, type, action) .map(it -> it.getHandler().apply(params, lang).exce... |
@Test void selectById() { final String foo = new DocumentationResourceImpl() .selectById("Foo1", "== Foo0\n\n00000\n\n" + "=== Configuration\n\nWhatever0\n\n== Foo1\n\nThe description\n\n" + "=== Configuration\n\nWhatever1\n\n" + "== Foo2\n\n2222\n\n=== Configuration\n\nWhatever2", DocumentationResourceImpl.Documentati... | String selectById(final String name, final String value, final DocumentationSegment segment) { final List<String> lines; try (final BufferedReader reader = new BufferedReader(new StringReader(value))) { lines = reader.lines().collect(toList()); } catch (final IOException e) { throw new IllegalArgumentException(e); } re... | DocumentationResourceImpl implements DocumentationResource { String selectById(final String name, final String value, final DocumentationSegment segment) { final List<String> lines; try (final BufferedReader reader = new BufferedReader(new StringReader(value))) { lines = reader.lines().collect(toList()); } catch (final... | DocumentationResourceImpl implements DocumentationResource { String selectById(final String name, final String value, final DocumentationSegment segment) { final List<String> lines; try (final BufferedReader reader = new BufferedReader(new StringReader(value))) { lines = reader.lines().collect(toList()); } catch (final... | DocumentationResourceImpl implements DocumentationResource { String selectById(final String name, final String value, final DocumentationSegment segment) { final List<String> lines; try (final BufferedReader reader = new BufferedReader(new StringReader(value))) { lines = reader.lines().collect(toList()); } catch (final... | DocumentationResourceImpl implements DocumentationResource { String selectById(final String name, final String value, final DocumentationSegment segment) { final List<String> lines; try (final BufferedReader reader = new BufferedReader(new StringReader(value))) { lines = reader.lines().collect(toList()); } catch (final... |
@Test void selectByIdUsingComments() { final String content = " + " + "[cols=\"d,d,m,a,e,d\",options=\"header\"]\n" + "|===\n" + "|Display Name|Description|Default Value|Enabled If|Configuration Path|Configuration Type\n" + "|configuration|configuration configuration|-|Always enabled|configuration|-\n" + "|input|the in... | String selectById(final String name, final String value, final DocumentationSegment segment) { final List<String> lines; try (final BufferedReader reader = new BufferedReader(new StringReader(value))) { lines = reader.lines().collect(toList()); } catch (final IOException e) { throw new IllegalArgumentException(e); } re... | DocumentationResourceImpl implements DocumentationResource { String selectById(final String name, final String value, final DocumentationSegment segment) { final List<String> lines; try (final BufferedReader reader = new BufferedReader(new StringReader(value))) { lines = reader.lines().collect(toList()); } catch (final... | DocumentationResourceImpl implements DocumentationResource { String selectById(final String name, final String value, final DocumentationSegment segment) { final List<String> lines; try (final BufferedReader reader = new BufferedReader(new StringReader(value))) { lines = reader.lines().collect(toList()); } catch (final... | DocumentationResourceImpl implements DocumentationResource { String selectById(final String name, final String value, final DocumentationSegment segment) { final List<String> lines; try (final BufferedReader reader = new BufferedReader(new StringReader(value))) { lines = reader.lines().collect(toList()); } catch (final... | DocumentationResourceImpl implements DocumentationResource { String selectById(final String name, final String value, final DocumentationSegment segment) { final List<String> lines; try (final BufferedReader reader = new BufferedReader(new StringReader(value))) { lines = reader.lines().collect(toList()); } catch (final... |
@Test void createReader() { final Mapper mapper = new LocalPartitionMapper("Root", "Test", "Plugin", new Component()); final Input input = mapper.create(); assertTrue(Record.class.isInstance(input.next())); assertNotSame(input.next(), input.next()); } | @Override public Input create() { return Input.class.isInstance(input) ? Input.class.cast(input) : new InputImpl(rootName(), name(), plugin(), input); } | LocalPartitionMapper extends Named implements Mapper, Delegated { @Override public Input create() { return Input.class.isInstance(input) ? Input.class.cast(input) : new InputImpl(rootName(), name(), plugin(), input); } } | LocalPartitionMapper extends Named implements Mapper, Delegated { @Override public Input create() { return Input.class.isInstance(input) ? Input.class.cast(input) : new InputImpl(rootName(), name(), plugin(), input); } protected LocalPartitionMapper(); LocalPartitionMapper(final String rootName, final String name, fi... | LocalPartitionMapper extends Named implements Mapper, Delegated { @Override public Input create() { return Input.class.isInstance(input) ? Input.class.cast(input) : new InputImpl(rootName(), name(), plugin(), input); } protected LocalPartitionMapper(); LocalPartitionMapper(final String rootName, final String name, fi... | LocalPartitionMapper extends Named implements Mapper, Delegated { @Override public Input create() { return Input.class.isInstance(input) ? Input.class.cast(input) : new InputImpl(rootName(), name(), plugin(), input); } protected LocalPartitionMapper(); LocalPartitionMapper(final String rootName, final String name, fi... |
@Test void migrate() { final Map<String, String> config = ws .read(Map.class, "post", "/configurationtype/migrate/amRiYy1jb21wb25lbnQjamRiYyNkYXRhc2V0I2pkYmM/-2", "{}"); assertEquals("true", config.get("configuration.migrated")); assertEquals("1", config.get("configuration.size")); } | @Override public Map<String, String> migrate(final String id, final int version, final Map<String, String> config) { if (virtualComponents.isExtensionEntity(id)) { return config; } final Config configuration = ofNullable(configurations.findById(id)) .orElseThrow(() -> new WebApplicationException(Response .status(Respon... | ConfigurationTypeResourceImpl implements ConfigurationTypeResource { @Override public Map<String, String> migrate(final String id, final int version, final Map<String, String> config) { if (virtualComponents.isExtensionEntity(id)) { return config; } final Config configuration = ofNullable(configurations.findById(id)) .... | ConfigurationTypeResourceImpl implements ConfigurationTypeResource { @Override public Map<String, String> migrate(final String id, final int version, final Map<String, String> config) { if (virtualComponents.isExtensionEntity(id)) { return config; } final Config configuration = ofNullable(configurations.findById(id)) .... | ConfigurationTypeResourceImpl implements ConfigurationTypeResource { @Override public Map<String, String> migrate(final String id, final int version, final Map<String, String> config) { if (virtualComponents.isExtensionEntity(id)) { return config; } final Config configuration = ofNullable(configurations.findById(id)) .... | ConfigurationTypeResourceImpl implements ConfigurationTypeResource { @Override public Map<String, String> migrate(final String id, final int version, final Map<String, String> config) { if (virtualComponents.isExtensionEntity(id)) { return config; } final Config configuration = ofNullable(configurations.findById(id)) .... |
@Test void ensureOrderIsPreserved() { final List<String> expected = asList("a", "b", "c"); assertIterableEquals(expected, expected.stream().collect(toLinkedMap(identity(), identity())).keySet()); } | public static <T, K, V> Collector<T, ?, LinkedHashMap<K, V>> toLinkedMap( final Function<? super T, ? extends K> keyMapper, final Function<? super T, ? extends V> valueMapper) { return toMap(keyMapper, valueMapper, (v1, v2) -> { throw new IllegalArgumentException("conflict on key " + v1); }, LinkedHashMap::new); } | CustomCollectors { public static <T, K, V> Collector<T, ?, LinkedHashMap<K, V>> toLinkedMap( final Function<? super T, ? extends K> keyMapper, final Function<? super T, ? extends V> valueMapper) { return toMap(keyMapper, valueMapper, (v1, v2) -> { throw new IllegalArgumentException("conflict on key " + v1); }, LinkedHa... | CustomCollectors { public static <T, K, V> Collector<T, ?, LinkedHashMap<K, V>> toLinkedMap( final Function<? super T, ? extends K> keyMapper, final Function<? super T, ? extends V> valueMapper) { return toMap(keyMapper, valueMapper, (v1, v2) -> { throw new IllegalArgumentException("conflict on key " + v1); }, LinkedHa... | CustomCollectors { public static <T, K, V> Collector<T, ?, LinkedHashMap<K, V>> toLinkedMap( final Function<? super T, ? extends K> keyMapper, final Function<? super T, ? extends V> valueMapper) { return toMap(keyMapper, valueMapper, (v1, v2) -> { throw new IllegalArgumentException("conflict on key " + v1); }, LinkedHa... | CustomCollectors { public static <T, K, V> Collector<T, ?, LinkedHashMap<K, V>> toLinkedMap( final Function<? super T, ? extends K> keyMapper, final Function<? super T, ? extends V> valueMapper) { return toMap(keyMapper, valueMapper, (v1, v2) -> { throw new IllegalArgumentException("conflict on key " + v1); }, LinkedHa... |
@Test void mapFr() { assertEquals(Locale.FRENCH, mapper.mapLocale(Locale.FRANCE.toString())); assertEquals(Locale.FRENCH, mapper.mapLocale(Locale.CANADA_FRENCH.toString())); } | public Locale mapLocale(final String requested) { return new Locale(getLanguage(requested).toLowerCase(ENGLISH)); } | LocaleMapper { public Locale mapLocale(final String requested) { return new Locale(getLanguage(requested).toLowerCase(ENGLISH)); } } | LocaleMapper { public Locale mapLocale(final String requested) { return new Locale(getLanguage(requested).toLowerCase(ENGLISH)); } } | LocaleMapper { public Locale mapLocale(final String requested) { return new Locale(getLanguage(requested).toLowerCase(ENGLISH)); } Locale mapLocale(final String requested); } | LocaleMapper { public Locale mapLocale(final String requested) { return new Locale(getLanguage(requested).toLowerCase(ENGLISH)); } Locale mapLocale(final String requested); } |
@Test void mapDefault() { assertEquals(Locale.ENGLISH, mapper.mapLocale(null)); } | public Locale mapLocale(final String requested) { return new Locale(getLanguage(requested).toLowerCase(ENGLISH)); } | LocaleMapper { public Locale mapLocale(final String requested) { return new Locale(getLanguage(requested).toLowerCase(ENGLISH)); } } | LocaleMapper { public Locale mapLocale(final String requested) { return new Locale(getLanguage(requested).toLowerCase(ENGLISH)); } } | LocaleMapper { public Locale mapLocale(final String requested) { return new Locale(getLanguage(requested).toLowerCase(ENGLISH)); } Locale mapLocale(final String requested); } | LocaleMapper { public Locale mapLocale(final String requested) { return new Locale(getLanguage(requested).toLowerCase(ENGLISH)); } Locale mapLocale(final String requested); } |
@Test void gridLayoutTranslation() throws NoSuchMethodException { final List<ParameterMeta> params = new ParameterModelService(new PropertyEditorRegistry()) .buildParameterMetas(getClass().getDeclaredMethod("gridLayout", WithLayout.class), null, new BaseParameterEnricher.Context(new LocalConfigurationService(emptyList(... | public Stream<SimplePropertyDefinition> buildProperties(final List<ParameterMeta> meta, final ClassLoader loader, final Locale locale, final DefaultValueInspector.Instance rootInstance) { return buildProperties(meta, loader, locale, rootInstance, null); } | PropertiesService { public Stream<SimplePropertyDefinition> buildProperties(final List<ParameterMeta> meta, final ClassLoader loader, final Locale locale, final DefaultValueInspector.Instance rootInstance) { return buildProperties(meta, loader, locale, rootInstance, null); } } | PropertiesService { public Stream<SimplePropertyDefinition> buildProperties(final List<ParameterMeta> meta, final ClassLoader loader, final Locale locale, final DefaultValueInspector.Instance rootInstance) { return buildProperties(meta, loader, locale, rootInstance, null); } } | PropertiesService { public Stream<SimplePropertyDefinition> buildProperties(final List<ParameterMeta> meta, final ClassLoader loader, final Locale locale, final DefaultValueInspector.Instance rootInstance) { return buildProperties(meta, loader, locale, rootInstance, null); } Stream<SimplePropertyDefinition> buildPrope... | PropertiesService { public Stream<SimplePropertyDefinition> buildProperties(final List<ParameterMeta> meta, final ClassLoader loader, final Locale locale, final DefaultValueInspector.Instance rootInstance) { return buildProperties(meta, loader, locale, rootInstance, null); } Stream<SimplePropertyDefinition> buildPrope... |
@Test void parameterIndexMeta() throws NoSuchMethodException { final List<ParameterMeta> params = new ParameterModelService(new PropertyEditorRegistry()) .buildParameterMetas( getClass().getDeclaredMethod("multipleParams", String.class, BoolWrapper.class, String.class), null, new BaseParameterEnricher.Context(new Local... | public Stream<SimplePropertyDefinition> buildProperties(final List<ParameterMeta> meta, final ClassLoader loader, final Locale locale, final DefaultValueInspector.Instance rootInstance) { return buildProperties(meta, loader, locale, rootInstance, null); } | PropertiesService { public Stream<SimplePropertyDefinition> buildProperties(final List<ParameterMeta> meta, final ClassLoader loader, final Locale locale, final DefaultValueInspector.Instance rootInstance) { return buildProperties(meta, loader, locale, rootInstance, null); } } | PropertiesService { public Stream<SimplePropertyDefinition> buildProperties(final List<ParameterMeta> meta, final ClassLoader loader, final Locale locale, final DefaultValueInspector.Instance rootInstance) { return buildProperties(meta, loader, locale, rootInstance, null); } } | PropertiesService { public Stream<SimplePropertyDefinition> buildProperties(final List<ParameterMeta> meta, final ClassLoader loader, final Locale locale, final DefaultValueInspector.Instance rootInstance) { return buildProperties(meta, loader, locale, rootInstance, null); } Stream<SimplePropertyDefinition> buildPrope... | PropertiesService { public Stream<SimplePropertyDefinition> buildProperties(final List<ParameterMeta> meta, final ClassLoader loader, final Locale locale, final DefaultValueInspector.Instance rootInstance) { return buildProperties(meta, loader, locale, rootInstance, null); } Stream<SimplePropertyDefinition> buildPrope... |
@Test void booleanDefault() throws NoSuchMethodException { final List<SimplePropertyDefinition> props = propertiesService .buildProperties( new ParameterModelService(new PropertyEditorRegistry()) .buildParameterMetas(getClass().getDeclaredMethod("boolWrapper", BoolBool.class), null, new BaseParameterEnricher.Context( n... | public Stream<SimplePropertyDefinition> buildProperties(final List<ParameterMeta> meta, final ClassLoader loader, final Locale locale, final DefaultValueInspector.Instance rootInstance) { return buildProperties(meta, loader, locale, rootInstance, null); } | PropertiesService { public Stream<SimplePropertyDefinition> buildProperties(final List<ParameterMeta> meta, final ClassLoader loader, final Locale locale, final DefaultValueInspector.Instance rootInstance) { return buildProperties(meta, loader, locale, rootInstance, null); } } | PropertiesService { public Stream<SimplePropertyDefinition> buildProperties(final List<ParameterMeta> meta, final ClassLoader loader, final Locale locale, final DefaultValueInspector.Instance rootInstance) { return buildProperties(meta, loader, locale, rootInstance, null); } } | PropertiesService { public Stream<SimplePropertyDefinition> buildProperties(final List<ParameterMeta> meta, final ClassLoader loader, final Locale locale, final DefaultValueInspector.Instance rootInstance) { return buildProperties(meta, loader, locale, rootInstance, null); } Stream<SimplePropertyDefinition> buildPrope... | PropertiesService { public Stream<SimplePropertyDefinition> buildProperties(final List<ParameterMeta> meta, final ClassLoader loader, final Locale locale, final DefaultValueInspector.Instance rootInstance) { return buildProperties(meta, loader, locale, rootInstance, null); } Stream<SimplePropertyDefinition> buildPrope... |
@Test void buildProperties() { final String[] i18nPackages = { Config.class.getPackage().getName() }; final ParameterMeta host = new ParameterMeta(null, Config.class, ParameterMeta.Type.STRING, "configuration.host", "host", i18nPackages, emptyList(), null, emptyMap(), false); final ParameterMeta port = new ParameterMet... | public Stream<SimplePropertyDefinition> buildProperties(final List<ParameterMeta> meta, final ClassLoader loader, final Locale locale, final DefaultValueInspector.Instance rootInstance) { return buildProperties(meta, loader, locale, rootInstance, null); } | PropertiesService { public Stream<SimplePropertyDefinition> buildProperties(final List<ParameterMeta> meta, final ClassLoader loader, final Locale locale, final DefaultValueInspector.Instance rootInstance) { return buildProperties(meta, loader, locale, rootInstance, null); } } | PropertiesService { public Stream<SimplePropertyDefinition> buildProperties(final List<ParameterMeta> meta, final ClassLoader loader, final Locale locale, final DefaultValueInspector.Instance rootInstance) { return buildProperties(meta, loader, locale, rootInstance, null); } } | PropertiesService { public Stream<SimplePropertyDefinition> buildProperties(final List<ParameterMeta> meta, final ClassLoader loader, final Locale locale, final DefaultValueInspector.Instance rootInstance) { return buildProperties(meta, loader, locale, rootInstance, null); } Stream<SimplePropertyDefinition> buildPrope... | PropertiesService { public Stream<SimplePropertyDefinition> buildProperties(final List<ParameterMeta> meta, final ClassLoader loader, final Locale locale, final DefaultValueInspector.Instance rootInstance) { return buildProperties(meta, loader, locale, rootInstance, null); } Stream<SimplePropertyDefinition> buildPrope... |
@Test void validateProp() { assertThrows(IllegalArgumentException.class, () -> { ParameterMeta attribute = new ParameterMeta(null, BadConfig.class, ParameterMeta.Type.STRING, "configuration.attribute", "attribute", null, emptyList(), null, emptyMap(), false); ParameterMeta config = new ParameterMeta(null, Config.class,... | public Stream<SimplePropertyDefinition> buildProperties(final List<ParameterMeta> meta, final ClassLoader loader, final Locale locale, final DefaultValueInspector.Instance rootInstance) { return buildProperties(meta, loader, locale, rootInstance, null); } | PropertiesService { public Stream<SimplePropertyDefinition> buildProperties(final List<ParameterMeta> meta, final ClassLoader loader, final Locale locale, final DefaultValueInspector.Instance rootInstance) { return buildProperties(meta, loader, locale, rootInstance, null); } } | PropertiesService { public Stream<SimplePropertyDefinition> buildProperties(final List<ParameterMeta> meta, final ClassLoader loader, final Locale locale, final DefaultValueInspector.Instance rootInstance) { return buildProperties(meta, loader, locale, rootInstance, null); } } | PropertiesService { public Stream<SimplePropertyDefinition> buildProperties(final List<ParameterMeta> meta, final ClassLoader loader, final Locale locale, final DefaultValueInspector.Instance rootInstance) { return buildProperties(meta, loader, locale, rootInstance, null); } Stream<SimplePropertyDefinition> buildPrope... | PropertiesService { public Stream<SimplePropertyDefinition> buildProperties(final List<ParameterMeta> meta, final ClassLoader loader, final Locale locale, final DefaultValueInspector.Instance rootInstance) { return buildProperties(meta, loader, locale, rootInstance, null); } Stream<SimplePropertyDefinition> buildPrope... |
@Test void deployExistingPlugin() { try { componentManagerService.deploy("org.talend.test1:the-test-component:jar:1.2.6:compile"); } catch (final IllegalArgumentException iae) { assertTrue(iae.getMessage().contains("Container 'the-test-component' already exists")); } } | public String deploy(final String pluginGAV) { final String pluginPath = ofNullable(pluginGAV) .map(gav -> mvnCoordinateToFileConverter.toArtifact(gav)) .map(Artifact::toPath) .orElseThrow(() -> new IllegalArgumentException("Plugin GAV can't be empty")); final Path m2 = instance.getContainer().getRootRepositoryLocation... | ComponentManagerService { public String deploy(final String pluginGAV) { final String pluginPath = ofNullable(pluginGAV) .map(gav -> mvnCoordinateToFileConverter.toArtifact(gav)) .map(Artifact::toPath) .orElseThrow(() -> new IllegalArgumentException("Plugin GAV can't be empty")); final Path m2 = instance.getContainer()... | ComponentManagerService { public String deploy(final String pluginGAV) { final String pluginPath = ofNullable(pluginGAV) .map(gav -> mvnCoordinateToFileConverter.toArtifact(gav)) .map(Artifact::toPath) .orElseThrow(() -> new IllegalArgumentException("Plugin GAV can't be empty")); final Path m2 = instance.getContainer()... | ComponentManagerService { public String deploy(final String pluginGAV) { final String pluginPath = ofNullable(pluginGAV) .map(gav -> mvnCoordinateToFileConverter.toArtifact(gav)) .map(Artifact::toPath) .orElseThrow(() -> new IllegalArgumentException("Plugin GAV can't be empty")); final Path m2 = instance.getContainer()... | ComponentManagerService { public String deploy(final String pluginGAV) { final String pluginPath = ofNullable(pluginGAV) .map(gav -> mvnCoordinateToFileConverter.toArtifact(gav)) .map(Artifact::toPath) .orElseThrow(() -> new IllegalArgumentException("Plugin GAV can't be empty")); final Path m2 = instance.getContainer()... |
@Test void serialization() throws IOException, ClassNotFoundException { final LocalPartitionMapper mapper = Serializer.roundTrip(new LocalPartitionMapper("Root", "Test", "Plugin", new Component())); assertEquals("Root", mapper.rootName()); assertEquals("Test", mapper.name()); assertEquals("Plugin", mapper.plugin()); fi... | @Override public Input create() { return Input.class.isInstance(input) ? Input.class.cast(input) : new InputImpl(rootName(), name(), plugin(), input); } | LocalPartitionMapper extends Named implements Mapper, Delegated { @Override public Input create() { return Input.class.isInstance(input) ? Input.class.cast(input) : new InputImpl(rootName(), name(), plugin(), input); } } | LocalPartitionMapper extends Named implements Mapper, Delegated { @Override public Input create() { return Input.class.isInstance(input) ? Input.class.cast(input) : new InputImpl(rootName(), name(), plugin(), input); } protected LocalPartitionMapper(); LocalPartitionMapper(final String rootName, final String name, fi... | LocalPartitionMapper extends Named implements Mapper, Delegated { @Override public Input create() { return Input.class.isInstance(input) ? Input.class.cast(input) : new InputImpl(rootName(), name(), plugin(), input); } protected LocalPartitionMapper(); LocalPartitionMapper(final String rootName, final String name, fi... | LocalPartitionMapper extends Named implements Mapper, Delegated { @Override public Input create() { return Input.class.isInstance(input) ? Input.class.cast(input) : new InputImpl(rootName(), name(), plugin(), input); } protected LocalPartitionMapper(); LocalPartitionMapper(final String rootName, final String name, fi... |
@Test void undeployNonExistingPlugin() { final String gav = "org.talend:non-existing-component:jar:0.0.0:compile"; try { componentManagerService.undeploy(gav); } catch (final RuntimeException re) { assertTrue(re.getMessage().contains("No plugin found using maven GAV: " + gav)); } } | public void undeploy(final String pluginGAV) { if (pluginGAV == null || pluginGAV.isEmpty()) { throw new IllegalArgumentException("plugin maven GAV are required to undeploy a plugin"); } String pluginID = instance .find(c -> pluginGAV.equals(c.get(ComponentManager.OriginalId.class).getValue()) ? Stream.of(c.getId()) : ... | ComponentManagerService { public void undeploy(final String pluginGAV) { if (pluginGAV == null || pluginGAV.isEmpty()) { throw new IllegalArgumentException("plugin maven GAV are required to undeploy a plugin"); } String pluginID = instance .find(c -> pluginGAV.equals(c.get(ComponentManager.OriginalId.class).getValue())... | ComponentManagerService { public void undeploy(final String pluginGAV) { if (pluginGAV == null || pluginGAV.isEmpty()) { throw new IllegalArgumentException("plugin maven GAV are required to undeploy a plugin"); } String pluginID = instance .find(c -> pluginGAV.equals(c.get(ComponentManager.OriginalId.class).getValue())... | ComponentManagerService { public void undeploy(final String pluginGAV) { if (pluginGAV == null || pluginGAV.isEmpty()) { throw new IllegalArgumentException("plugin maven GAV are required to undeploy a plugin"); } String pluginID = instance .find(c -> pluginGAV.equals(c.get(ComponentManager.OriginalId.class).getValue())... | ComponentManagerService { public void undeploy(final String pluginGAV) { if (pluginGAV == null || pluginGAV.isEmpty()) { throw new IllegalArgumentException("plugin maven GAV are required to undeploy a plugin"); } String pluginID = instance .find(c -> pluginGAV.equals(c.get(ComponentManager.OriginalId.class).getValue())... |
@Test void paramResolutionToParent() throws Exception { final ConfigTypeNode node = load("param-resolution-to-parent.json", ConfigTypeNode.class); final Ui payload = service.convert("test", "en", node, null).toCompletableFuture().get(); final List<UiSchema> rootItems = List.class.cast(payload.getUiSchema().iterator().n... | public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path -> node.getProperties().stream().anyMatc... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... |
@Test void updatable() throws Exception { final ConfigTypeNode node = load("update.json", ConfigTypeNode.class); final Ui payload = service.convert("test", "en", node, null).toCompletableFuture().get(); final Iterator<UiSchema> rootItems = payload.getUiSchema().iterator().next().getItems().iterator(); rootItems.next();... | public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path -> node.getProperties().stream().anyMatc... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... |
@Test void updatableWithCondition() throws Exception { final ConfigTypeNode node = load("update-condition.json", ConfigTypeNode.class); final Ui payload = service.convert("test", "en", node, null).toCompletableFuture().get(); final Iterator<UiSchema> rootItems = payload.getUiSchema().iterator().next().getItems().iterat... | public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path -> node.getProperties().stream().anyMatc... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... |
@Test void conditionAnd() throws Exception { final ComponentDetail node = load("condition-and.json", ComponentDetail.class); final Ui payload = service.convert(node, "en", null).toCompletableFuture().get(); final UiSchema schema = payload .getUiSchema() .iterator() .next() .getItems() .iterator() .next() .getItems() .s... | public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path -> node.getProperties().stream().anyMatc... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... |
@Test void updatableAfter() throws Exception { final ConfigTypeNode node = load("update_after.json", ConfigTypeNode.class); final Ui payload = service.convert("test", "en", node, null).toCompletableFuture().get(); final Iterator<UiSchema> rootItems = payload.getUiSchema().iterator().next().getItems().iterator(); rootIt... | public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path -> node.getProperties().stream().anyMatc... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... |
@Test void optionsOrderInArray() throws Exception { final ConfigTypeNode node = load("config.json", ConfigTypeNodes.class).getNodes().get("U2VydmljZU5vdyNkYXRhc2V0I3RhYmxl"); final Ui payload = service.convert("Jdbc", "en", node, null).toCompletableFuture().get(); final Iterator<UiSchema> items = payload.getUiSchema().... | public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path -> node.getProperties().stream().anyMatc... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... |
@Test void enumAsRestrictedList() throws Exception { final ConfigTypeNode node = load("config.json", ConfigTypeNodes.class).getNodes().get("U2VydmljZU5vdyNkYXRhc2V0I3RhYmxl"); final Ui payload = service.convert("Jdbc", "en", node, null).toCompletableFuture().get(); final Iterator<UiSchema> items = payload.getUiSchema()... | public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path -> node.getProperties().stream().anyMatc... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... |
@Test void optionsOrder() throws Exception { final ConfigTypeNode node = load("optionsorder.json", ConfigTypeNode.class); final SimplePropertyDefinition root = node .getProperties() .stream() .filter(it -> it.getPath().equals("configuration")) .findFirst() .orElseThrow(() -> new IllegalArgumentException("bad config"));... | public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path -> node.getProperties().stream().anyMatc... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... |
@Test void proposablePrimitives() throws Exception { final ComponentDetail detail = load("multiSelectTagString.json", ComponentDetail.class); final Ui payload = service.convert(detail, "en", null).toCompletableFuture().get(); final UiSchema proposable = ((List<UiSchema>) payload.getUiSchema().iterator().next().getItems... | public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path -> node.getProperties().stream().anyMatc... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... |
@Test void lifecycle() { final Component delegate = new Component(); final Input input = new InputImpl("Root", "Test", "Plugin", delegate); assertFalse(delegate.start); assertFalse(delegate.stop); assertEquals(0, delegate.count); input.start(); assertTrue(delegate.start); assertFalse(delegate.stop); assertEquals(0, del... | @Override public Object next() { if (next == null) { init(); } final Object record = readNext(); if (record == null) { return null; } final Class<?> recordClass = record.getClass(); if (recordClass.isPrimitive() || String.class == recordClass) { return record; } return converters.toRecord(registry, record, this::jsonb,... | InputImpl extends LifecycleImpl implements Input, Delegated { @Override public Object next() { if (next == null) { init(); } final Object record = readNext(); if (record == null) { return null; } final Class<?> recordClass = record.getClass(); if (recordClass.isPrimitive() || String.class == recordClass) { return recor... | InputImpl extends LifecycleImpl implements Input, Delegated { @Override public Object next() { if (next == null) { init(); } final Object record = readNext(); if (record == null) { return null; } final Class<?> recordClass = record.getClass(); if (recordClass.isPrimitive() || String.class == recordClass) { return recor... | InputImpl extends LifecycleImpl implements Input, Delegated { @Override public Object next() { if (next == null) { init(); } final Object record = readNext(); if (record == null) { return null; } final Class<?> recordClass = record.getClass(); if (recordClass.isPrimitive() || String.class == recordClass) { return recor... | InputImpl extends LifecycleImpl implements Input, Delegated { @Override public Object next() { if (next == null) { init(); } final Object record = readNext(); if (record == null) { return null; } final Class<?> recordClass = record.getClass(); if (recordClass.isPrimitive() || String.class == recordClass) { return recor... |
@Test void isDefault() throws NoSuchMethodException { assertFalse(Defaults.isDefaultAndShouldHandle(SomeDefaultsOrNot.class.getMethod("foo"))); assertTrue(Defaults.isDefaultAndShouldHandle(SomeDefaultsOrNot.class.getMethod("defFoo"))); } | public static boolean isDefaultAndShouldHandle(final Method method) { return method.isDefault(); } | Defaults { public static boolean isDefaultAndShouldHandle(final Method method) { return method.isDefault(); } } | Defaults { public static boolean isDefaultAndShouldHandle(final Method method) { return method.isDefault(); } } | Defaults { public static boolean isDefaultAndShouldHandle(final Method method) { return method.isDefault(); } static boolean isDefaultAndShouldHandle(final Method method); static Object handleDefault(final Class<?> declaringClass, final Method method, final Object proxy,
final Object[] args); } | Defaults { public static boolean isDefaultAndShouldHandle(final Method method) { return method.isDefault(); } static boolean isDefaultAndShouldHandle(final Method method); static Object handleDefault(final Class<?> declaringClass, final Method method, final Object proxy,
final Object[] args); } |
@Test void configuration() throws Exception { final ConfigTypeNodes load = load("config.json", ConfigTypeNodes.class); final String family = load .getNodes() .entrySet() .stream() .filter(e -> e.getValue().getParentId() == null) .map(e -> e.getValue().getId()) .findFirst() .orElseThrow(() -> new IllegalArgumentExceptio... | public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path -> node.getProperties().stream().anyMatc... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... |
@Test void condition() throws Exception { final Ui payload = service.convert(load("rest-api.json"), "en", null).toCompletableFuture().get(); final UiSchema root = payload.getUiSchema().iterator().next(); final Map<String, Collection<Object>> condition = root .getItems() .stream() .filter(i -> i.getTitle().equals("Main"... | public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path -> node.getProperties().stream().anyMatc... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... |
@Test void guessSchema() throws Exception { final Ui payload = service.convert(load("rest-api.json"), "en", null).toCompletableFuture().get(); final UiSchema root = payload.getUiSchema().iterator().next(); final UiSchema advanced = root.getItems().stream().filter(i -> i.getTitle().equals("Advanced")).findFirst().get();... | public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path -> node.getProperties().stream().anyMatc... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... |
@Test void jsonSchemaArray() throws Exception { final Ui payload = service.convert(load("rest-api.json"), "en", null).toCompletableFuture().get(); final JsonSchema commonConfig = payload .getJsonSchema() .getProperties() .values() .iterator() .next() .getProperties() .entrySet() .stream() .filter(e -> e.getKey().equals... | public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path -> node.getProperties().stream().anyMatc... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... |
@Test void gridLayout() throws Exception { final Ui payload = service.convert(load("rest-api.json"), "en", null).toCompletableFuture().get(); final UiSchema tableDataSet = payload.getUiSchema().iterator().next(); assertEquals(2, tableDataSet.getItems().size()); final Iterator<UiSchema> tableDataSetIt = tableDataSet.get... | public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path -> node.getProperties().stream().anyMatc... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... |
@Test void defaultValues() throws Exception { final Ui payload = service.convert(load("rest-api.json"), "en", null).toCompletableFuture().get(); assertEquals(10000., read(payload.getProperties(), "tableDataSet.limit")); } | public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path -> node.getProperties().stream().anyMatc... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... |
@Test void triggerRelativeParameters() throws Exception { final Ui payload = service.convert(load("relative-params.json"), "en", null).toCompletableFuture().get(); final Collection<UiSchema> schema = payload.getUiSchema(); final UiSchema.Trigger driverTrigger = schema .iterator() .next() .getItems() .stream() .filter(c... | public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path -> node.getProperties().stream().anyMatc... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... |
@Test void suggestions() throws Exception { final Ui payload = service .convert("jdbc", "en", load("suggestions.json", ConfigTypeNode.class), null) .toCompletableFuture() .get(); final Collection<UiSchema> schema = payload.getUiSchema(); final Collection<UiSchema.Trigger> suggestionTriggers = schema .iterator() .next()... | public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path -> node.getProperties().stream().anyMatc... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... |
@Test void builtInSuggestions() throws Exception { final Ui payload = service .convert("somefamily", "en", load("built_in_suggestions.json", ConfigTypeNode.class), null) .toCompletableFuture() .get(); final Collection<UiSchema> schema = payload.getUiSchema(); final UiSchema.Trigger driverTrigger = schema .iterator() .n... | public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path -> node.getProperties().stream().anyMatc... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... |
@Test void jsonSchema() throws Exception { final Ui payload = service.convert(load("jdbc.json"), "en", null).toCompletableFuture().get(); final JsonSchema jsonSchema = payload.getJsonSchema(); assertNotNull(jsonSchema); assertEquals("JDBC Input", jsonSchema.getTitle()); assertEquals("object", jsonSchema.getType()); ass... | public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path -> node.getProperties().stream().anyMatc... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... |
@Test void start() { final StartOnly delegate = new StartOnly(); final Lifecycle impl = new LifecycleImpl(delegate, "Root", "Test", "Plugin"); assertEquals(0, delegate.counter); impl.start(); assertEquals(1, delegate.counter); impl.stop(); assertEquals(1, delegate.counter); } | @Override public void start() { invoke(PostConstruct.class); } | LifecycleImpl extends Named implements Lifecycle { @Override public void start() { invoke(PostConstruct.class); } } | LifecycleImpl extends Named implements Lifecycle { @Override public void start() { invoke(PostConstruct.class); } LifecycleImpl(final Object delegate, final String rootName, final String name, final String plugin); protected LifecycleImpl(); } | LifecycleImpl extends Named implements Lifecycle { @Override public void start() { invoke(PostConstruct.class); } LifecycleImpl(final Object delegate, final String rootName, final String name, final String plugin); protected LifecycleImpl(); @Override void start(); @Override void stop(); @Override boolean equals(final... | LifecycleImpl extends Named implements Lifecycle { @Override public void start() { invoke(PostConstruct.class); } LifecycleImpl(final Object delegate, final String rootName, final String name, final String plugin); protected LifecycleImpl(); @Override void start(); @Override void stop(); @Override boolean equals(final... |
@Test void properties() throws Exception { final Ui payload = service.convert(load("jdbc.json"), "en", null).toCompletableFuture().get(); final Map<String, Object> properties = Map.class.cast(payload.getProperties()); assertEquals(1, properties.size()); final Map<String, Object> configuration = Map.class.cast(propertie... | public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path -> node.getProperties().stream().anyMatc... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... |
@Test void uiSchema() throws Exception { final Ui payload = service.convert(load("jdbc.json"), "en", null).toCompletableFuture().get(); final Collection<UiSchema> uiSchema = payload.getUiSchema(); assertNotNull(uiSchema); assertEquals(1, uiSchema.size()); assertUiSchema(uiSchema.iterator().next(), "fieldset", "Configur... | public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path -> node.getProperties().stream().anyMatc... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... |
@Test @Disabled("debug test to log the produced model") void out() throws Exception { final Ui payload = service.convert(load("jdbc.json"), "en", null).toCompletableFuture().get(); System.out.println(JsonbBuilder.create(new JsonbConfig().withFormatting(true)).toJson(payload)); } | public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path -> node.getProperties().stream().anyMatc... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... | UiSpecService implements AutoCloseable { public CompletionStage<Ui> convert(final String family, final String lang, final ConfigTypeNode node, final T context) { final Collection<String> rootProperties = node.getProperties().stream().map(SimplePropertyDefinition::getPath).collect(toSet()); rootProperties .removeIf(path... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.