Package io.meeds.social.cms.service
Interface ContentLinkService
public interface ContentLinkService
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanEdit(ContentObjectIdentifier contentObject, String username) booleancanView(ContentObjectIdentifier link, String username) voiddeleteLinks(ContentObjectIdentifier contentObject) Delete theListof Links attached to the designated ObjectgetLink(ContentLinkIdentifier link) getLink(ContentLinkIdentifier link, String username) getLinkIdentifiers(ContentObject contentObject) getLinks(ContentObject contentObject, Locale locale, String username) voidsaveLinks(ContentObject contentObject, List<? extends ContentObjectIdentifier> links) Saves theListof Links attached to the designated ObjectvoidsaveLinks(ContentObject contentObject, List<? extends ContentObjectIdentifier> links, String username) Saves theListof Links attached to the designated ObjectsearchLinks(String objectType, String keyword, String username, Locale locale, int offset, int limit)
-
Method Details
-
saveLinks
void saveLinks(ContentObject contentObject, List<? extends ContentObjectIdentifier> links, String username) throws IllegalAccessException Saves theListof Links attached to the designated Object- Parameters:
contentObject-ContentObjectlinks-ListofContentObjectIdentifierto attach- Throws:
IllegalAccessException- when user doesn't have edit permission on Content Object
-
saveLinks
Saves theListof Links attached to the designated Object- Parameters:
contentObject-ContentObjectlinks-ListofContentObjectIdentifierto attach
-
deleteLinks
Delete theListof Links attached to the designated Object- Parameters:
contentObject-ContentObjectIdentifier
-
getLinks
List<ContentLink> getLinks(ContentObject contentObject, Locale locale, String username) throws IllegalAccessException - Parameters:
contentObject-ContentObjectlocale- userLocaleusername- User login identifier- Returns:
- the
Listof Links attached to the designated Object - Throws:
IllegalAccessException- when user doesn't have view permission on Content Object
-
searchLinks
List<ContentLinkSearchResult> searchLinks(String objectType, String keyword, String username, Locale locale, int offset, int limit) - Parameters:
objectType- object type (notes, activity, space ...)keyword- Searched keywordusername- user namelocale-Localeuser Localeoffset- Search results offsetlimit- Search results limit- Returns:
ListofContentLinkSearchResult
-
getLinkIdentifiers
- Parameters:
contentObject-ContentObject- Returns:
- the
Listof Links attached to the designated Object
-
getLink
ContentLink getLink(ContentLinkIdentifier link, String username) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Parameters:
link-ContentLinkIdentifierwith object type, id and localeusername- User willing to access to the linked content- Returns:
ContentLinkwith associated title and uri- Throws:
IllegalAccessException- when user doesn't have edit permission on Content Objectorg.exoplatform.commons.exception.ObjectNotFoundException- whenContentLinknot found
-
getLink
- Parameters:
link-ContentLinkIdentifierwith object type, id and locale- Returns:
ContentLinkwith associated title and uri
-
canView
- Parameters:
link-ContentObjectIdentifierwith object type and idusername- User willing to access to the linked content- Returns:
- true if the user can view the object title
-
canEdit
- Parameters:
contentObject-ContentObjectIdentifierwith object type/idusername- User willing to access to the linked content- Returns:
- true if the user can edit the object title
-
getExtensions
List<ContentLinkExtension> getExtensions()- Returns:
Listof managedContentLinkExtension
-