Package io.meeds.portal.permlink.service
Interface PermanentLinkService
public interface PermanentLinkService
A service to get permanent link to an object in order to reference it
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiongetDirectAccessUrl(String randomizedPermanentLink, org.exoplatform.services.security.Identity identity) getLink(PermanentLinkObject object) getPermanentLink(PermanentLinkObject object)
-
Field Details
-
PERMANENT_LINK_URL_PREFIX
- See Also:
-
-
Method Details
-
getPermanentLink
- Parameters:
object-PermanentLinkObjectcontaining the object Type and Id- Returns:
- the permanent link with '/portal/' as prefix and domain name
-
getDirectAccessUrl
String getDirectAccessUrl(String randomizedPermanentLink, org.exoplatform.services.security.Identity identity) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Parameters:
randomizedPermanentLink- permanent link as generated by a randomizer- Returns:
- pretty link to access resource
- Throws:
IllegalAccessException- when current user doesn't have access to the given resourceorg.exoplatform.commons.exception.ObjectNotFoundException- when the pretty link isn't recognized or the given resource doesn't exist anymore
-
getLink
String getLink(PermanentLinkObject object) throws org.exoplatform.commons.exception.ObjectNotFoundException - Parameters:
object-PermanentLinkObjectcontaining the object Type and Id- Returns:
- pretty link to access resource
- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-