@GraphQLApi public class HeroFinder extends Object
Constructor and Description |
---|
HeroFinder() |
@Query public Character character(@Name(value="name") String name) throws UnknownCharacterException
UnknownCharacterException
@Query public SuperHero superHero(@Name(value="name") @Description(value="Super hero name, not real name") String name) throws UnknownHeroException
UnknownHeroException
@Query @Description(value="Testing the blacklist of Checked Exceptions") public SuperHero exportToFile(@Name(value="name") @Description(value="Super hero name, not real name") String name) throws IOException
IOException
@Query @Description(value="Testing the blacklist of transitive Checked Exceptions") public SuperHero exportToCSVFile(@Name(value="name") @Description(value="Super hero name, not real name") String name) throws CsvIOException
CsvIOException
@Query @Description(value="Testing the default blacklist for Runtime Exceptions") public SuperHero villian(@Name(value="name") @Description(value="Super hero name, not real name") String name)
@Query @Description(value="Testing the whitelist for Runtime Exceptions") public SuperHero weakness(@Name(value="name") @Description(value="Super hero name, not real name") String name)
@Query @Description(value="Testing the whitelist for transitive Runtime Exceptions") public SuperHero findFlaw(@Name(value="name") @Description(value="Super hero name, not real name") String name)
@Query @Description(value="Testing Errors, as in Java Error") public SuperHero wreakHavoc(@Name(value="name") @Description(value="Super hero name, not real name") String name)
@Query @Description(value="List all super heroes in the database") public Collection<SuperHero> allHeroes()
@Query public Collection<SuperHero> allHeroesIn(@DefaultValue(value="New York, NY") @Name(value="city") String city)
@Query public Collection<SuperHero> allHeroesWithPower(@Name(value="power") String power)
@Query public Collection<SuperHero> allHeroesInTeam(@Name(value="team") String teamName) throws UnknownTeamException
UnknownTeamException
@Query public Team getTeam(@Name(value="team") String teamName) throws UnknownTeamException
UnknownTeamException
@Query public Collection<Team> allTeams()
@Mutation public SuperHero createNewHero(@Name(value="hero") SuperHero newHero) throws DuplicateSuperHeroException, UnknownHeroException
@Mutation public Collection<SuperHero> createNewHeroes(@Name(value="heroes") List<SuperHero> newHeroes) throws DuplicateSuperHeroException, UnknownHeroException
@Mutation public SuperHero[] createNewHeroesWithArray(@Name(value="heroes") SuperHero[] newHeroes) throws DuplicateSuperHeroException, UnknownHeroException
@Mutation @Description(value="Adds a hero to the specified team and returns the updated team.") public Team addHeroToTeam(@Name(value="hero") String heroName, @Name(value="team") String teamName) throws UnknownTeamException, UnknownHeroException
@Mutation @Description(value="Removes a hero to the specified team and returns the updated team.") public Team removeHeroFromTeam(@Name(value="hero") String heroName, @Name(value="team") String teamName) throws UnknownTeamException, UnknownHeroException
@Mutation @Description(value="Removes a hero... permanently...") public Collection<SuperHero> removeHero(@Name(value="hero") String heroName) throws UnknownHeroException
UnknownHeroException
@Mutation @Description(value="Gives a hero new equipment") public SuperHero provisionHero(@Name(value="hero") String heroName, @DefaultValue(value="{ \"id\": 1000, \"name\": \"Cape\", \"powerLevel\": 3, \"height\": 1.2, \"weight\": 0.3, \"supernatural\": false, \"dateCreated\": \"19 February 1900 at 12:00 in Africa/Johannesburg\", \"dateLastUsed\": \"29 Jan 2020 at 09:45 in zone +0200\"}") @Name(value="item") Item item) throws UnknownHeroException
UnknownHeroException
@Mutation @Description(value="Removes equipment from a hero") public SuperHero removeItemFromHero(@Name(value="hero") String heroName, @Name(value="itemID") long itemID) throws UnknownHeroException
UnknownHeroException
@Mutation @Description(value="Update an item\'s powerLevel") public Item updateItemPowerLevel(@Name(value="itemID") long itemID, @DefaultValue(value="5") @Name(value="powerLevel") int newLevel)
@Mutation @Description(value="Update a hero\'s bank account") public SuperHero updateBankBalance(@Name(value="name") String name, @Name(value="bankBalance") double bankBalance) throws UnknownHeroException
UnknownHeroException
@Mutation @Description(value="Update a hero\'s bank account in US Dollar") public SuperHero updateBankBalanceInUS(@Name(value="name") String name, @Name(value="bankBalance") Double bankBalance) throws UnknownHeroException
UnknownHeroException
@Mutation @Description(value="Update a hero\'s favourite drink size") public SuperHero favouriteDrinkSize(@Name(value="name") String name, @Name(value="size") float size) throws UnknownHeroException
UnknownHeroException
@Mutation @Description(value="Update a hero\'s favourite drink size in milliliters") public SuperHero favouriteDrinkSizeInML(@Name(value="name") String name, @NumberFormat(value="###.## \'ml\'",locale="en-GB") @Name(value="size") @NumberFormat(value="###.## \'ml\'",locale="en-GB") Float size) throws UnknownHeroException
UnknownHeroException
@Mutation @Description(value="Update a hero\'s net worth") public SuperHero updateNetWorth(@Name(value="name") String name, @Name(value="netWorth") BigDecimal netWorth) throws UnknownHeroException
UnknownHeroException
@Mutation @Description(value="Update a hero\'s back account in USD") public SuperHero updateNetWorthInUSD(@Name(value="name") String name, @Name(value="netWorth") BigDecimal netWorth) throws UnknownHeroException
UnknownHeroException
@Mutation @Description(value="All the places this hero has been") public SuperHero beenThere(@Name(value="name") String name, @Name(value="places") Set<String> places) throws UnknownHeroException
UnknownHeroException
@Mutation @Description(value="Log the last place the hero was seen") public SuperHero logLocation(@Name(value="name") String name, @Name(value="coordinates") LinkedList<BigDecimal> coordinates) throws UnknownHeroException
UnknownHeroException
@Mutation @Description(value="Log the last place the hero was seen (Long Lat)") public SuperHero logLocationLongLat(@Name(value="name") String name, @Name(value="coordinates") List<BigDecimal> coordinates) throws UnknownHeroException
UnknownHeroException
@Mutation @Description(value="Log the last few places the hero was seen") public SuperHero trackHero(@Name(value="name") String name, @Name(value="coordinates") List<List<BigDecimal>> coordinates) throws UnknownHeroException
UnknownHeroException
@Mutation @Description(value="Log the last few places the hero was seen (Long Lat)") public SuperHero trackHeroLongLat(@Name(value="name") String name, @Name(value="coordinates") List<List<BigDecimal>> coordinates) throws UnknownHeroException
UnknownHeroException
@Mutation @Description(value="Log the last place the hero was seen (using an array)") public SuperHero logLocationWithArray(@Name(value="name") String name, @Name(value="coordinates") BigDecimal[] coordinates) throws UnknownHeroException
UnknownHeroException
@Mutation @Description(value="Log the last place the hero was seen (Long Lat) using an array") public SuperHero logLocationLongLatWithArray(@Name(value="name") String name, @Name(value="coordinates") BigDecimal[] coordinates) throws UnknownHeroException
UnknownHeroException
@Mutation @Description(value="Update an item\'s powerLevel in percentage") public Item updateItemPowerLevelPercentage(@Name(value="itemID") long itemID, @Name(value="powerLevel") int newLevel)
@Mutation @Description(value="Check in a superhero") public SuperHero checkIn(@Name(value="name") String name, @Name(value="date") LocalDate localDate) throws UnknownHeroException
UnknownHeroException
@Mutation @Description(value="Check in a superhero") public SuperHero checkInWithCorrectDateFormat(@Name(value="name") String name, @DateFormat(value="MM/dd/yyyy") @Name(value="date") @DateFormat(value="MM/dd/yyyy") LocalDate localDate) throws UnknownHeroException
UnknownHeroException
@Mutation @Description(value="Set all the important dates for a certain hero") public SuperHero importantDates(@Name(value="name") String name, @Name(value="dates") List<LocalDate> localDates) throws UnknownHeroException
UnknownHeroException
@Mutation @Description(value="Set all the important dates (US format) for a certain hero") public SuperHero importantDatesUS(@Name(value="name") String name, @Name(value="dates") List<LocalDate> localDates) throws UnknownHeroException
UnknownHeroException
@Mutation @Description(value="Set the time a hero started patrolling") public SuperHero startPatrolling(@Name(value="name") String name, @Name(value="time") LocalTime localTime) throws UnknownHeroException
UnknownHeroException
@Mutation @Description(value="Set the time a hero started patrolling (using formatted time)") public SuperHero startPatrollingWithCorrectDateFormat(@Name(value="name") String name, @Name(value="time") LocalTime localTime) throws UnknownHeroException
UnknownHeroException
@Mutation @Description(value="Start a battle") public SuperHero battle(@Name(value="name") String name, @Name(value="dateTime") LocalDateTime localDateTime) throws UnknownHeroException
UnknownHeroException
@Mutation @Description(value="Start a battle") public SuperHero battleWithCorrectDateFormat(@Name(value="name") String name, @Name(value="dateTime") LocalDateTime localDateTime) throws UnknownHeroException
UnknownHeroException
@Mutation @Description(value="Set the ID Number for a hero") public SuperHero idNumber(@Name(value="name") String name, @Name(value="id") Long idNumber) throws UnknownHeroException
UnknownHeroException
@Mutation @Description(value="Set the ID Number for a hero") public SuperHero idNumberWithCorrectFormat(@Name(value="name") String name, @Name(value="id") Long idNumber) throws UnknownHeroException
UnknownHeroException
@Query public String getCurrentLocation(@Name(value="superHero") @Source SuperHero hero) throws GraphQLException
GraphQLException
@Name(value="secretToken") public Token generateSecretToken(@Source SuperHero hero, @DefaultValue(value="true") @Name(value="maskFirstPart") boolean maskFirstPart) throws GraphQLException
GraphQLException
@Mutation(value="setRivalTeam") public Team setRivalTeam(@Name(value="teamName") String teamName, @Name(value="rivalTeam") Team rivalTeam) throws UnknownTeamException
UnknownTeamException
@Query public Collection<SuperHero> allHeroesWithError() throws GraphQLException
GraphQLException
@Query public Collection<SuperHero> allHeroesWithSpecificError() throws SuperHeroLookupException
SuperHeroLookupException
@Mutation public Team removeTeam(@Name(value="teamName") String teamName) throws UnknownTeamException
UnknownTeamException
Copyright © 2021 Eclipse Foundation. All rights reserved.