Class MyLinksWebManager


  • @Service
    public class MyLinksWebManager
    extends Object
    Permits to centralize WEB service processing between MyLinksResource and the WAR controller.
    Author:
    silveryocha
    • Constructor Detail

      • MyLinksWebManager

        protected MyLinksWebManager()
    • Method Detail

      • getAllCategoriesOfCurrentUser

        public List<CategoryDetail> getAllCategoriesOfCurrentUser()
        Gets all the categories of the current user.
        Returns:
        List of category.
      • getAuthorizedCategory

        public CategoryDetail getAuthorizedCategory​(String categoryId)
        Gets category details from its id by verifying user modification rights.
        Parameters:
        categoryId - the identifier of a category.
        Returns:
        a CategoryDetail instance or null if id is unknown.
      • createCategory

        public CategoryDetail createCategory​(CategoryEntity newCategory)
        Creates a category into persistence.
        Parameters:
        newCategory - data of a new category.
        Returns:
        the persisted data.
      • updateCategory

        public CategoryDetail updateCategory​(CategoryEntity updatedCategory)
        Updates a category into persistence.
        Parameters:
        updatedCategory - data of a updated category.
        Returns:
        the saved data.
      • deleteCategories

        public void deleteCategories​(String[] categoryIds)
        Deletes categories into persistence.
        Parameters:
        categoryIds - category identifiers.
      • getAllLinksOfInstance

        public List<LinkDetail> getAllLinksOfInstance​(String instanceId)
        Gets all the links associated to given component instance identifier.
        Returns:
        List of link.
      • getAllLinksOfResourceOnInstance

        public List<LinkDetail> getAllLinksOfResourceOnInstance​(String resourceId,
                                                                String instanceId)
        Gets all the links associated to given resource identifier hosted into to given component instance identifier.
        Returns:
        List of link.
      • getAllLinksOfCurrentUser

        public List<LinkDetail> getAllLinksOfCurrentUser()
        Gets all the links of the current user.
        Returns:
        List of link.
      • getAuthorizedLink

        public LinkDetail getAuthorizedLink​(String linkId)
        Gets link details from its id by verifying user modification rights.
        Parameters:
        linkId - the identifier of a link.
        Returns:
        a LinkDetail instance or null if id is unknown.
      • createLink

        public LinkDetail createLink​(MyLinkEntity newLink)
        Creates a link into persistence.
        Parameters:
        newLink - data of a link.
        Returns:
        the persisted data.
      • updateLink

        public LinkDetail updateLink​(MyLinkEntity updatedLink)
        Updates a link into persistence
        Parameters:
        updatedLink - the updated date of a link.
        Returns:
        the saved data.
      • deleteLinks

        public void deleteLinks​(String[] links)
        Deletes links into persistence.
        Parameters:
        links - list of id about links to delete.