@Test public void filterOptionsSimple() { when(inspectors.getPaths(DataShapeKinds.JAVA.toString(), "twitter4j.Status", null, Optional.empty())) .thenReturn(Arrays.asList("paramA", "paramB")); DataShape dataShape = dataShape(DataShapeKinds.JAVA, "twitter4j.Status"); FilterOptions options = handler.getFilterOptions(dataShape); assertThat(options.getPaths()).hasSize(2).contains("paramA", "paramB"); }
@POST @Produces(MediaType.APPLICATION_JSON) @Path(value = "/filters/options") public FilterOptions getFilterOptions(final DataShape dataShape) { final FilterOptions.Builder builder = new FilterOptions.Builder().addAllOps(Op.DEFAULT_OPTS); final List<String> paths = inspectors.getPaths(dataShape.getKind().toString(), dataShape.getType(), dataShape.getSpecification(), dataShape.getExemplar()); builder.paths(paths); return builder.build(); }
IntegrationHandler extends BaseHandler implements Lister<IntegrationOverview>, Getter<IntegrationOverview>,
    Creator<Integration>, Deleter<Integration>, Updater<Integration>, Validating<Integration> { @POST @Produces(MediaType.APPLICATION_JSON) @Path(value = "/filters/options") public FilterOptions getFilterOptions(final DataShape dataShape) { final FilterOptions.Builder builder = new FilterOptions.Builder().addAllOps(Op.DEFAULT_OPTS); final List<String> paths = inspectors.getPaths(dataShape.getKind().toString(), dataShape.getType(), dataShape.getSpecification(), dataShape.getExemplar()); builder.paths(paths); return builder.build(); } }
IntegrationHandler extends BaseHandler implements Lister<IntegrationOverview>, Getter<IntegrationOverview>,
    Creator<Integration>, Deleter<Integration>, Updater<Integration>, Validating<Integration> { @POST @Produces(MediaType.APPLICATION_JSON) @Path(value = "/filters/options") public FilterOptions getFilterOptions(final DataShape dataShape) { final FilterOptions.Builder builder = new FilterOptions.Builder().addAllOps(Op.DEFAULT_OPTS); final List<String> paths = inspectors.getPaths(dataShape.getKind().toString(), dataShape.getType(), dataShape.getSpecification(), dataShape.getExemplar()); builder.paths(paths); return builder.build(); } IntegrationHandler(final DataManager dataMgr, final OpenShiftService openShiftService,
                              final Validator validator, final Inspectors inspectors,
                              final EncryptionComponent encryptionSupport, final APIGenerator apiGenerator,
                              final IntegrationOverviewHelper integrationOverviewHelper); }
IntegrationHandler extends BaseHandler implements Lister<IntegrationOverview>, Getter<IntegrationOverview>,
    Creator<Integration>, Deleter<Integration>, Updater<Integration>, Validating<Integration> { @POST @Produces(MediaType.APPLICATION_JSON) @Path(value = "/filters/options") public FilterOptions getFilterOptions(final DataShape dataShape) { final FilterOptions.Builder builder = new FilterOptions.Builder().addAllOps(Op.DEFAULT_OPTS); final List<String> paths = inspectors.getPaths(dataShape.getKind().toString(), dataShape.getType(), dataShape.getSpecification(), dataShape.getExemplar()); builder.paths(paths); return builder.build(); } IntegrationHandler(final DataManager dataMgr, final OpenShiftService openShiftService,
                              final Validator validator, final Inspectors inspectors,
                              final EncryptionComponent encryptionSupport, final APIGenerator apiGenerator,
                              final IntegrationOverviewHelper integrationOverviewHelper); @Override Integration create(@Context final SecurityContext sec, final Integration integration); @Override void delete(final String id); @Override IntegrationOverview get(final String id); @POST @Produces(MediaType.APPLICATION_JSON) @Path(value = "/filters/options") FilterOptions getFilterOptions(final DataShape dataShape); @GET @Produces(MediaType.APPLICATION_JSON) @Path(value = "/filters/options") FilterOptions getGlobalFilterOptions(); Integration getIntegration(final String id); @GET @Produces(MediaType.APPLICATION_JSON) @Path(value = "/{id}/overview") IntegrationOverview getOverview(@PathParam("id") final String id); @Override Validator getValidator(); @Override ListResult<IntegrationOverview> list(int page, int perPage); @Override Kind resourceKind(); @Override void update(final String id, final Integration integration); }
IntegrationHandler extends BaseHandler implements Lister<IntegrationOverview>, Getter<IntegrationOverview>,
    Creator<Integration>, Deleter<Integration>, Updater<Integration>, Validating<Integration> { @POST @Produces(MediaType.APPLICATION_JSON) @Path(value = "/filters/options") public FilterOptions getFilterOptions(final DataShape dataShape) { final FilterOptions.Builder builder = new FilterOptions.Builder().addAllOps(Op.DEFAULT_OPTS); final List<String> paths = inspectors.getPaths(dataShape.getKind().toString(), dataShape.getType(), dataShape.getSpecification(), dataShape.getExemplar()); builder.paths(paths); return builder.build(); } IntegrationHandler(final DataManager dataMgr, final OpenShiftService openShiftService,
                              final Validator validator, final Inspectors inspectors,
                              final EncryptionComponent encryptionSupport, final APIGenerator apiGenerator,
                              final IntegrationOverviewHelper integrationOverviewHelper); @Override Integration create(@Context final SecurityContext sec, final Integration integration); @Override void delete(final String id); @Override IntegrationOverview get(final String id); @POST @Produces(MediaType.APPLICATION_JSON) @Path(value = "/filters/options") FilterOptions getFilterOptions(final DataShape dataShape); @GET @Produces(MediaType.APPLICATION_JSON) @Path(value = "/filters/options") FilterOptions getGlobalFilterOptions(); Integration getIntegration(final String id); @GET @Produces(MediaType.APPLICATION_JSON) @Path(value = "/{id}/overview") IntegrationOverview getOverview(@PathParam("id") final String id); @Override Validator getValidator(); @Override ListResult<IntegrationOverview> list(int page, int perPage); @Override Kind resourceKind(); @Override void update(final String id, final Integration integration);  }