Interface MyLinksService
-
- All Known Implementing Classes:
DefaultMyLinksService
public interface MyLinksService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description CategoryDetail
createCategory(CategoryDetail category)
Creates a new category from the data given by theCategoryDetail
parameter.LinkDetail
createLink(LinkDetail link)
Creates a new link from the data given by theLinkDetail
parameter.void
deleteCategories(String[] categoryIds)
Deletes the categories referenced by the given identifiers.void
deleteLinks(String[] links)
Deletes the links referenced by the given identifiers.void
deleteUserData(String userId)
Deletes all the data associated to a user.List<CategoryDetail>
getAllCategoriesByUser(String userId)
Gets all the categories associated to the user represented by the given id.
The result list is sorted byCategoryDetailComparator
.List<LinkDetail>
getAllLinks(String userId)
Deprecated, for removal: This API element is subject to removal in a future version.usedgetAllLinksByUser(String)
instead.List<LinkDetail>
getAllLinksByInstance(String instanceId)
Gets all the links associated to the component instance represented by the given id.
The result list is sorted byLinkDetailComparator
.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 byLinkDetailComparator
.List<LinkDetail>
getAllLinksByUser(String userId)
Gets all the links associated to the user represented by the given id.
The result list is sorted byLinkDetailComparator
.CategoryDetail
getCategory(String categoryId)
Gets aCategoryDetail
from its identifier.LinkDetail
getLink(String linkId)
Gets aLinkDetail
from its identifier.CategoryDetail
updateCategory(CategoryDetail category)
Updates a category with the givenCategoryDetail
data.LinkDetail
updateLink(LinkDetail link)
Updates a link with the givenLinkDetail
data.
-
-
-
Method Detail
-
getAllLinks
@Deprecated(forRemoval=true) List<LinkDetail> getAllLinks(String userId)
Deprecated, for removal: This API element is subject to removal in a future version.usedgetAllLinksByUser(String)
instead.- See Also:
getAllLinksByUser(String)
-
getAllCategoriesByUser
List<CategoryDetail> getAllCategoriesByUser(String userId)
Gets all the categories associated to the user represented by the given id.
The result list is sorted byCategoryDetailComparator
.- 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 theCategoryDetail
parameter.- Parameters:
category
- the data to register.- Returns:
- a new instance representing the data saved into database.
-
getCategory
CategoryDetail getCategory(String categoryId)
Gets aCategoryDetail
from its identifier.- Parameters:
categoryId
- a category identifier.- Returns:
- a
CategoryDetail
instance, or null if no data.
-
deleteCategories
void deleteCategories(String[] categoryIds)
Deletes the categories referenced by the given identifiers.- Parameters:
categoryIds
- the category identifiers.
-
updateCategory
CategoryDetail updateCategory(CategoryDetail category)
Updates a category with the givenCategoryDetail
data.- Parameters:
category
- the data to update.- Returns:
- the updated data.
-
getAllLinksByUser
List<LinkDetail> getAllLinksByUser(String userId)
Gets all the links associated to the user represented by the given id.
The result list is sorted byLinkDetailComparator
.- 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 byLinkDetailComparator
.- 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 byLinkDetailComparator
.- 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 theLinkDetail
parameter.- Parameters:
link
- the data to register.- Returns:
- a new instance representing the data saved into database.
-
getLink
LinkDetail getLink(String linkId)
Gets aLinkDetail
from its identifier.- Parameters:
linkId
- a link identifier.- Returns:
- a
LinkDetail
instance, or null if no data.
-
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 givenLinkDetail
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.
-
-