Class GoalsServiceEndPoint


  • @Produces("application/json")
    @Consumes("application/json")
    @Path("/goals")
    public class GoalsServiceEndPoint
    extends Object
    A JAX-RS endpoint to manage Goals and related information.
    • Constructor Detail

      • GoalsServiceEndPoint

        public GoalsServiceEndPoint()
    • Method Detail

      • setGoalsService

        public void setGoalsService​(GoalsService goalsService)
      • getGoalMetadatas

        @GET
        @Path("/")
        public Set<Metadata> getGoalMetadatas()
        Retrieves the set of Metadata associated with existing goals.
        Returns:
        the set of Metadata associated with existing goals
      • setGoal

        @POST
        @Path("/")
        public void setGoal​(Goal goal)
        Saves the specified goal in the context server and creates associated Rules if the goal is enabled.
        Parameters:
        goal - the Goal to be saved
      • getGoalMetadatas

        @POST
        @Path("/query")
        public Set<Metadata> getGoalMetadatas​(Query query)
        Retrieves the set of Metadata associated with existing goals matching the specified Query
        Parameters:
        query - the Query used to filter the Goals which metadata we want to retrieve
        Returns:
        the set of Metadata associated with existing goals matching the specified Query
      • getGoal

        @GET
        @Path("/{goalId}")
        public Goal getGoal​(@PathParam("goalId")
                            String goalId)
        Retrieves the goal associated with the specified identifier.
        Parameters:
        goalId - the identifier of the goal to retrieve
        Returns:
        the goal associated with the specified identifier or null if no such goal exists
      • removeGoal

        @DELETE
        @Path("/{goalId}")
        public void removeGoal​(@PathParam("goalId")
                               String goalId)
        Removes the goal associated with the specified identifier, also removing associated rules if needed.
        Parameters:
        goalId - the identifier of the goal to be removed
      • getGoalReport

        @GET
        @Path("/{goalID}/report")
        public GoalReport getGoalReport​(@PathParam("goalID")
                                        String goalId)
        Retrieves the report for the goal identified with the specified identifier.
        Parameters:
        goalId - the identifier of the goal which report we want to retrieve
        Returns:
        the report for the specified goal
      • getGoalReport

        @POST
        @Path("/{goalID}/report")
        public GoalReport getGoalReport​(@PathParam("goalID")
                                        String goalId,
                                        AggregateQuery query)
        Retrieves the report for the goal identified with the specified identifier, considering only elements determined by the specified AggregateQuery.
        Parameters:
        goalId - the identifier of the goal which report we want to retrieve
        query - an AggregateQuery to further specify which elements of the report we want
        Returns:
        the report for the specified goal and query