@RestMethod( method = HttpMethod.DELETE, template = "/conflict/{teamType:[A-Z]{1,10}:TEAMTYPE}/{teamName:[a-zA-Z+'\\-0-9]{2,30}:TEXT}") public boolean deleteTeam4( @PathParameter(name = "teamType") String teamType, @PathParameter(name = "teamName") String teamName) { TestTeamPojo key = new TestTeamPojo(TestTeamPojo.Type.valueOf(teamType.toUpperCase()), teamName); lastMethodCalled = "deleteTeam4"; lastHttpMethodCalled = "DELETE"; return teams.remove(key); }
@RestMethod( method = HttpMethod.DELETE, template = "/{teamType:[A-Z]{1,10}:TEAMTYPE}/{teamName:[a-zA-Z+'\\-0-9]{2,30}:TEXT}") @Description("Delete a team from the collection") public boolean deleteTeam( @Description("The type of team (e.g. FOOTBALL, BASEBALL, etc)") @PathParameter(name = "teamType") String teamType, @Description("Name of the team") @PathParameter(name = "teamName") String teamName) { TestTeamPojo key = new TestTeamPojo(TestTeamPojo.Type.valueOf(teamType.toUpperCase()), teamName); lastMethodCalled = "deleteTeam"; lastHttpMethodCalled = "DELETE"; return teams.remove(key); }
@RestMethod( method = HttpMethod.GET, template = "/{teamType:[A-Z]{1,10}:TEAMTYPE}/{teamName:[a-zA-Z+'\\-0-9]{2,30}:TEXT}") public TestTeamPojo getTeam( @Nonnull @PathParameter(name = "teamType") String teamType, @PathParameter(name = "teamName") String teamName, @Terminus String terminus) { TestTeamPojo key = new TestTeamPojo(TestTeamPojo.Type.valueOf(teamType.toUpperCase()), teamName); logger.debug("Terminus = " + terminus); lastMethodCalled = "getTeam"; lastHttpMethodCalled = "GET"; if (teams.contains(key)) return teams.get(teams.indexOf(key)); return null; }