Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Path("/candrink/{name}/{age}")
- public class CanDrinkResource {
- @Named("canDrinkKS")
- RuleUnit<SessionMemory> ruleUnit;
- @GET
- @Produces(MediaType.TEXT_PLAIN)
- public String canDrink( @PathParam("name") String name, @PathParam("age") int age ) {
- SessionMemory memory = new SessionMemory();
- Result result = new Result();
- memory.add(result);
- memory.add(new Person( name, age ));
- ruleUnit.evaluate(memory);
- return result.toString();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement