Class MyLinksResource

    • Constructor Detail

      • MyLinksResource

        public MyLinksResource()
    • Method Detail

      • getAllCategoriesOfUser

        @GET
        @Path("categories")
        @Produces("application/json")
        public List<CategoryEntity> getAllCategoriesOfUser()
        Gets the JSON representation of all user categories of favorite links. Return only categories of the current user.
        Returns:
        the response to the HTTP GET request with the JSON representation of all user categories.
      • getCategory

        @GET
        @Path("categories/{catId}")
        @Produces("application/json")
        public CategoryEntity getCategory​(@PathParam("catId")
                                          String catId)
        Gets the JSON representation of the user category of favorite links. Return only category of the current user.
        Returns:
        the response to the HTTP GET request with the JSON representation of the user categories.
      • addCategory

        @POST
        @Path("categories")
        @Consumes("application/json")
        @Produces("application/json")
        public CategoryEntity addCategory​(CategoryEntity newCategory)
      • updateCategory

        @PUT
        @Path("categories/{catId}")
        @Consumes("application/json")
        @Produces("application/json")
        public CategoryEntity updateCategory​(@PathParam("catId")
                                             String catId,
                                             CategoryEntity updatedCategory)
      • deleteCategory

        @DELETE
        @Path("categories/{catId}")
        @Produces("application/json")
        public javax.ws.rs.core.Response deleteCategory​(@PathParam("catId")
                                                        String catId)
      • saveUserCategoriesOrder

        @POST
        @Path("categories/saveLinesOrder")
        @Consumes("application/json")
        public javax.ws.rs.core.Response saveUserCategoriesOrder​(CategoryPosition categoryPosition)
      • getMyLinks

        @GET
        @Produces("application/json")
        public List<MyLinkEntity> getMyLinks()
        Gets the JSON representation of the user favorite links.
        Returns:
        the response to the HTTP GET request with the JSON representation of the user links.
      • getLink

        @GET
        @Path("{id}")
        @Produces("application/json")
        public MyLinkEntity getLink​(@PathParam("id")
                                    String linkId)
        Gets the JSON representation of the user favorite links. Return only link of the current user.
        Returns:
        the response to the HTTP GET request with the JSON representation of the user links.
      • addLink

        @POST
        @Consumes("application/json")
        @Produces("application/json")
        public MyLinkEntity addLink​(MyLinkEntity newLink)
      • updateLink

        @PUT
        @Path("{linkId}")
        @Consumes("application/json")
        @Produces("application/json")
        public MyLinkEntity updateLink​(@PathParam("linkId")
                                       String linkId,
                                       MyLinkEntity updatedLink)
      • deleteLink

        @DELETE
        @Path("{linkId}")
        @Produces("application/json")
        public javax.ws.rs.core.Response deleteLink​(@PathParam("linkId")
                                                    String linkId)
      • saveUserLinksOrder

        @POST
        @Path("saveLinesOrder")
        @Consumes("application/json")
        public javax.ws.rs.core.Response saveUserLinksOrder​(MyLinkPosition linkPosition)
      • getComponentId

        public String getComponentId()
        Description copied from interface: SilverpeasWebResource
        Gets the identifier of the component instance to which the requested resource belongs to.
        Returns:
        the identifier of the Silverpeas component instance.