@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; }
String queryType = finderAnno.value();
@Finder("searchWithProjection") public List<ValidationDemo> searchWithProjection() { List<ValidationDemo> validationDemos = new ArrayList<ValidationDemo>(); validationDemos.add(_returnEntity); return validationDemos; } }
@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("customLong") public List<Greeting> customLong(@QueryParam(value="l", typeref=CustomLongRef.class) CustomLong l) { return Collections.emptyList(); }
@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("ip") public List<Greeting> ip(@QueryParam(value="ip", typeref=IPAddressSimple.class) InetAddress ip) { return Collections.emptyList(); }
@Finder("customLongArray") public List<Greeting> customLongArray(@QueryParam(value="ls", typeref=CustomLongRef.class) CustomLong[] ls) { return Collections.emptyList(); }
@Finder("dateOnly") public List<Greeting> dateOnly(@AssocKeyParam(value="birthday", typeref=DateRef.class) Date date) { return Collections.emptyList(); }
@Finder("assocKeyFinder") public List<Message> assocKeyFinder(@AssocKeyParam("src") String src) { return Collections.emptyList(); }
@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("searchReturnNullList") public List<Greeting> searchReturnNullList(@PagingContextParam PagingContext ctx, @QueryParam("tone") Tone tone) { if (tone == Tone.INSULTING) { //return a null list return null; } else { //return a list with a null element in it final List<Greeting> greetings = new ArrayList<Greeting>(); greetings.add(null); greetings.add(DB.get(1)); return greetings; } }
/** * This resource method is used to create additional paging metadata for fields such as links. Client side * tests can use this method to potentially project on fields inside of links. */ @Finder("searchWithLinksResult") public CollectionResult<Greeting, Empty> searchWithLinksResult(@PagingContextParam PagingContext ctx) { List<Greeting> greetings = new ArrayList<Greeting>(); for (int i = 0; i<5; i++) { greetings.add(GREETING_ONE); greetings.add(GREETING_TWO); } return new CollectionResult<Greeting, Empty>(greetings, 50); } }
@Finder("prefix") public List<Message> prefix(@QueryParam("prefix") String prefix) { return _dataProvider.findByPrefix(prefix); }