@Finder("latestFlowStatus") public List<FlowStatus> getLatestFlowStatus(@Context PagingContext context, @QueryParam("flowId") FlowId flowId) { LOG.info("getLatestFlowStatus called with flowGroup " + flowId.getFlowGroup() + " flowName " + flowId.getFlowName()); org.apache.gobblin.service.monitoring.FlowStatus latestFlowStatus = _flowStatusGenerator.getLatestFlowStatus(flowId.getFlowName(), flowId.getFlowGroup()); if (latestFlowStatus != null) { return Collections.singletonList(convertFlowStatus(latestFlowStatus)); } // will return 404 status code return null; }
@Finder("searchWithProjection") public List<ValidationDemo> searchWithProjection() { List<ValidationDemo> validationDemos = new ArrayList<ValidationDemo>(); validationDemos.add(_returnEntity); return validationDemos; } }
@Finder("customLong") public List<Greeting> customLong(@QueryParam(value="l", typeref=CustomLongRef.class) CustomLong l) { return Collections.emptyList(); }
@Finder("date") public List<Greeting> date(@QueryParam(value="d", typeref=DateRef.class) Date d) { return Collections.emptyList(); }
@Finder("calendars") public List<Greeting> calendars(@QueryParam(value="calendars", typeref=CalendarRef.class) Calendar[] calendars) { return Collections.emptyList(); }
@Override @Finder("searchWithoutMetadata") public CollectionResult<Greeting, NoMetadata> search() { return new CollectionResult<Greeting, NoMetadata>(Collections.<Greeting>emptyList(), 0, null); }
@Finder("predefinedSearch") public GreetingFinderResult predefinedSearch() { return new GreetingFinderResult(Collections.<Greeting>emptyList(), 0); } }
@Finder("calendar") public List<Greeting> calendar(@QueryParam(value="calendar", typeref=CalendarRef.class) Calendar calendar) { return Collections.emptyList(); }
@Finder("dateOnly") public List<Greeting> dateOnly(@AssocKeyParam(value="dateId", typeref=DateRef.class) Date dateId) { return Collections.emptyList(); }
@Finder("basicSearch") public BasicCollectionResult<Greeting> basicSearch() { return new BasicCollectionResult<Greeting>(Collections.<Greeting>emptyList(), 0); }
@Finder("assocKeyFinderOpt") public List<Message> assocKeyFinderOpt(@Optional @AssocKeyParam("src") String src) { return Collections.emptyList(); } }
@Finder("empty") public List<Greeting> emptyFinder(@QueryParam("array") EmptyArray array, @QueryParam("map") EmptyMap map) { return Collections.emptyList(); }
@Finder("prefix") public List<Message> prefix(@QueryParam("prefix") String prefix) { return _dataProvider.findByPrefix(prefix); }
@Finder("finderTaskNullList") public Task<List<Greeting>> finderTaskNullList(@PagingContextParam final PagingContext a, @QueryParam("tone") final Tone b) { return new BaseTask<List<Greeting>>() { protected Promise<List<Greeting>> run(final com.linkedin.parseq.Context context) throws Exception { //Depending on the tone, we return a null list or a list with a null element return Promises.value(searchReturnNullList(a, b)); } }; } }
@Finder("searchWithMetadata") public CollectionResult<Greeting, SearchMetadata> searchWithMetadata() { return new CollectionResult<Greeting, SearchMetadata>(Collections.<Greeting>emptyList(), 0, new SearchMetadata()); }
@Finder("finder") public List<Greeting> finder(@HeaderParam("Expected-Header") String header, @ProjectionParam MaskTree projection, @PathKeysParam PathKeys keys) { List<Greeting> list = new ArrayList<Greeting>(); Greeting greeting1 = createGreeting(projection, keys); greeting1.setId(1L); Greeting greeting2 = createGreeting(header); greeting2.setId(2L); list.add(greeting1); list.add(greeting2); return list; }
@Finder("searchWithDefault") public List<Greeting> searchWithDefault(@PagingContextParam PagingContext ctx, @QueryParam("tone") @Optional("FRIENDLY") Tone tone) { return search(ctx, tone); }
@Finder("latestFlowStatus") public List<FlowStatus> getLatestFlowStatus(@Context PagingContext context, @QueryParam("flowId") FlowId flowId) { LOG.info("getLatestFlowStatus called with flowGroup " + flowId.getFlowGroup() + " flowName " + flowId.getFlowName()); gobblin.service.monitoring.FlowStatus latestFlowStatus = _flowStatusGenerator.getLatestFlowStatus(flowId.getFlowName(), flowId.getFlowGroup()); if (latestFlowStatus != null) { return Collections.singletonList(convertFlowStatus(latestFlowStatus)); } // will return 404 status code return null; }
/** * This resource method performs automatic projection for the root object entities and also the custom metadata. */ @Finder("rootAutomaticMetadataAutomatic") public CollectionResult<Greeting, Greeting> rootAutomaticMetadataAutomatic( final @PagingContextParam PagingContext ctx, final @ProjectionParam MaskTree rootObjectProjection, final @MetadataProjectionParam MaskTree metadataProjection, final @PagingProjectionParam MaskTree pagingProjection) { return new CollectionResult<Greeting, Greeting>(LIST, 2, CUSTOM_METADATA_GREETING); }
@Finder("search") public List<Group> search(@PagingContextParam PagingContext pagingContext, @QueryParam("keywords") @Optional String keywords, @QueryParam("nameKeywords") @Optional String nameKeywords, @QueryParam("groupID") @Optional Integer groupID) { return getGroupMgr().search(keywords, nameKeywords, groupID, pagingContext.getStart(), pagingContext.getCount()); }