Interface MyLinksService

    • Method Detail

      • getAllCategoriesByUser

        List<CategoryDetail> getAllCategoriesByUser​(String userId)
        Gets all the categories associated to the user represented by the given id.
        The result list is sorted by CategoryDetailComparator.
        Parameters:
        userId - a user identifier.
        Returns:
        a sorted list of category, empty if no category found.
      • createCategory

        CategoryDetail createCategory​(CategoryDetail category)
        Creates a new category from the data given by the CategoryDetail parameter.
        Parameters:
        category - the data to register.
        Returns:
        a new instance representing the data saved into database.
      • deleteCategories

        void deleteCategories​(String[] categoryIds)
        Deletes the categories referenced by the given identifiers.
        Parameters:
        categoryIds - the category identifiers.
      • getAllLinksByUser

        List<LinkDetail> getAllLinksByUser​(String userId)
        Gets all the links associated to the user represented by the given id.
        The result list is sorted by LinkDetailComparator.
        Parameters:
        userId - a user identifier.
        Returns:
        a sorted list of links, empty if no link found.
      • getAllLinksByInstance

        List<LinkDetail> getAllLinksByInstance​(String instanceId)
        Gets all the links associated to the component instance represented by the given id.
        The result list is sorted by LinkDetailComparator.
        Parameters:
        instanceId - a component instance identifier.
        Returns:
        a sorted list of links, empty if no link found.
      • getAllLinksByObject

        List<LinkDetail> getAllLinksByObject​(String instanceId,
                                             String objectId)
        Gets all the links associated to the resource represented by the given objectId and hosted into component instance represented by instanceId parameter.
        The result list is sorted by LinkDetailComparator.
        Parameters:
        instanceId - a component instance identifier.
        objectId - an identifier of an object.
        Returns:
        a sorted list of links, empty if no link found.
      • createLink

        LinkDetail createLink​(LinkDetail link)
        Creates a new link from the data given by the LinkDetail parameter.
        Parameters:
        link - the data to register.
        Returns:
        a new instance representing the data saved into database.
      • deleteLinks

        void deleteLinks​(String[] links)
        Deletes the links referenced by the given identifiers.
        Parameters:
        links - the link identifiers.
      • updateLink

        LinkDetail updateLink​(LinkDetail link)
        Updates a link with the given LinkDetail data.
        Parameters:
        link - the data to update.
        Returns:
        the updated data.
      • deleteUserData

        void deleteUserData​(String userId)
        Deletes all the data associated to a user.

        Data associated to a user are those with column userid filled with the given identifier and not linked to links which instanceid or objectid is filled.

        Parameters:
        userId - a user identifier.