Package io.meeds.social.link.service
Interface LinkService
public interface LinkService
-
Method Summary
Modifier and TypeMethodDescriptiongetLinkData(String linkSettingName) getLinkIconStream(String linkSettingName, long linkId) getLinkSetting(long linkSettingId) getLinkSetting(String linkSettingName) getLinkSetting(String linkSettingName, String language, boolean includeTranslations) getLinkSetting(String linkSettingName, String language, org.exoplatform.services.security.Identity identity) getLinkSettingByLinkId(long linkSettingId) booleanhasAccessPermission(String linkSettingName, org.exoplatform.services.security.Identity identity) booleanhasEditPermission(String linkSettingName, org.exoplatform.services.security.Identity identity) booleanhasLinkSetting(String linkSettingName) initLinkSetting(String name, String pageReference, long spaceId) Creates a new Instance ofLinkSettingto associate to a pagevoidsaveLinkData(String taregtLinkSettingName, LinkData linkData) Saves a complete configuration for Links representationsaveLinkSetting(LinkSetting linkSetting, List<Link> links) saveLinkSetting(LinkSetting linkSetting, List<Link> links, org.exoplatform.services.security.Identity identity)
-
Method Details
-
getLinkSetting
LinkSetting getLinkSetting(String linkSettingName, String language, org.exoplatform.services.security.Identity identity) throws IllegalAccessException - Parameters:
linkSettingName-LinkSettingunique nameidentity- User AclIdentitygetting access to links- Returns:
LinkSettingcorresponding to name or null if not exists- Throws:
IllegalAccessException- when user isn't allowed to access link settings
-
getLinkSetting
- Parameters:
linkSettingName-LinkSettingunique namelanguage- language to consider in header field translationincludeTranslations- whether to include translations of header or not- Returns:
LinkSettingcorresponding to name or null if not exists
-
getLinkSetting
- Parameters:
linkSettingName-LinkSettingunique name- Returns:
LinkSettingcorresponding to name or null if not exists. The result will not include translation field for header
-
getLinkSetting
- Parameters:
linkSettingId-LinkSettingtechnical id- Returns:
LinkSettingcorresponding to id or null if not exists
-
getLinkSettingByLinkId
- Parameters:
linkSettingId-LinkSettingtechnical id- Returns:
LinkSettingcorresponding toLinkid or null if not exists
-
getLinkData
LinkData getLinkData(String linkSettingName) throws org.exoplatform.commons.exception.ObjectNotFoundException - Parameters:
linkSettingName-LinkSettingunique name- Returns:
LinkDatacontainingLinkSettingand theListofLink- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException- whenLinkSettingnot found
-
initLinkSetting
Creates a new Instance ofLinkSettingto associate to a page- Parameters:
name- uniqueLinkSettingnamepageReference-Pagekey composite referencespaceId- space identifier where the page is displayed- Returns:
- created
LinkSetting
-
saveLinkSetting
LinkSetting saveLinkSetting(LinkSetting linkSetting, List<Link> links, org.exoplatform.services.security.Identity identity) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Parameters:
linkSetting-LinkSettingto create/updatelinks-ListofLinkto create/updateidentity- User AclIdentitymaking the operation- Returns:
- saved
LinkSetting - Throws:
IllegalAccessException- when user isn't allowed to write link settingsorg.exoplatform.commons.exception.ObjectNotFoundException- whenLinkSettingnot found
-
saveLinkSetting
LinkSetting saveLinkSetting(LinkSetting linkSetting, List<Link> links) throws org.exoplatform.commons.exception.ObjectNotFoundException - Parameters:
linkSetting-LinkSettingto create/updatelinks-ListofLinkto create/update- Returns:
- saved
LinkSetting - Throws:
org.exoplatform.commons.exception.ObjectNotFoundException- whenLinkSettingnot found
-
saveLinkData
void saveLinkData(String taregtLinkSettingName, LinkData linkData) throws org.exoplatform.commons.exception.ObjectNotFoundException Saves a complete configuration for Links representation- Parameters:
taregtLinkSettingName- TargetLinkSettingnamelinkData-LinkDatacontainingLinkSettingand theListofLink- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException- when target setting name doesn't exist
-
getLinks
- Parameters:
linkSettingName-LinkSettingnamelanguage- language to consider in name and description fields translationincludeTranslations- whether to include translations of name and description or not- Returns:
- corresponding
ListofLinkassociated toLinkSettingname
-
getLinks
- Parameters:
linkSettingName-LinkSettingname- Returns:
- corresponding
ListofLinkassociated toLinkSettingname. The name and description will be null in result.
-
getLinkIconStream
- Parameters:
linkSettingName-LinkSettingnamelinkId-Listtechnical identifier- Returns:
InputStreamof Icon file if exists else null- Throws:
IOException- when an error happens while readingInputStreamof an existing file
-
hasLinkSetting
- Parameters:
linkSettingName-LinkSettingname- Returns:
- true if setting name exists else false
-
hasAccessPermission
boolean hasAccessPermission(String linkSettingName, org.exoplatform.services.security.Identity identity) - Parameters:
linkSettingName-LinkSettingnameidentity- User AclIdentitymaking the operation- Returns:
- true if has read access else false
-
hasEditPermission
boolean hasEditPermission(String linkSettingName, org.exoplatform.services.security.Identity identity) - Parameters:
linkSettingName-LinkSettingnameidentity- User AclIdentitymaking the operation- Returns:
- true if has write access else false
-