Package org.alfresco.rest.api.impl
Class QuickShareLinksImpl
- java.lang.Object
-
- org.alfresco.rest.api.impl.QuickShareLinksImpl
-
- All Implemented Interfaces:
QuickShareLinks
,RecognizedParamsExtractor
,org.springframework.beans.factory.InitializingBean
public class QuickShareLinksImpl extends java.lang.Object implements QuickShareLinks, RecognizedParamsExtractor, org.springframework.beans.factory.InitializingBean
Centralises access to shared link (public "quick share") services and maps between representations.- Since:
- publicapi1.0
- Author:
- janv, Jamal Kaabi-Mofrad
-
-
Field Summary
-
Fields inherited from interface org.alfresco.rest.api.QuickShareLinks
PARAM_INCLUDE_ALLOWABLEOPERATIONS, PARAM_INCLUDE_ASPECTNAMES, PARAM_INCLUDE_ISFAVORITE, PARAM_INCLUDE_PATH, PARAM_INCLUDE_PROPERTIES, PARAM_SHAREDBY
-
Fields inherited from interface org.alfresco.rest.framework.tools.RecognizedParamsExtractor
KNOWN_PARAMS, PARAM_FILTER_FIELDS, PARAM_FILTER_PROPERTIES, PARAM_INCLUDE, PARAM_INCLUDE_SOURCE_ENTITY, PARAM_ORDERBY, PARAM_PAGING_MAX, PARAM_PAGING_SKIP, PARAM_RELATIONS, PARAM_SELECT, PARAM_WHERE
-
-
Constructor Summary
Constructors Constructor Description QuickShareLinksImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
java.util.List<QuickShareLink>
create(java.util.List<QuickShareLink> nodeIds, Parameters parameters)
Create quick share.void
delete(java.lang.String sharedId, Parameters parameters)
Delete the shared link.void
emailSharedLink(java.lang.String sharedId, QuickShareLinkEmailRequest emailRequest, Parameters parameters)
Notifies users by email that a content has been shared with them.CollectionWithPagingInfo<QuickShareLink>
findLinks(Parameters parameters)
Find (search) for shared links visible to current user.Rendition
getRendition(java.lang.String sharedId, java.lang.String renditionId)
Gets information about a rendition of a shared link.CollectionWithPagingInfo<Rendition>
getRenditions(java.lang.String sharedId)
List renditions info - note: only returns available (=> created) renditions.QuickShareLink
readById(java.lang.String sharedId, Parameters parameters)
Returns limited metadata regarding the shared (content) link.BinaryResource
readProperty(java.lang.String sharedId, java.lang.String renditionId, Parameters parameters)
Download content via shared link.void
setEnabled(boolean enabled)
void
setNodes(Nodes nodes)
void
setQuickShareService(org.alfresco.service.cmr.quickshare.QuickShareService quickShareService)
void
setRenditions(Renditions renditions)
void
setServiceRegistry(org.alfresco.service.ServiceRegistry sr)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.alfresco.rest.framework.tools.RecognizedParamsExtractor
findPaging, getClause, getFilter, getFilter, getIncludeClause, getPaging, getRecognizedParams, getRelationFilter, getRequestParameters, getSelectClause, getSort, getWhereClause, rpeLogger
-
-
-
-
Method Detail
-
setServiceRegistry
public void setServiceRegistry(org.alfresco.service.ServiceRegistry sr)
-
setQuickShareService
public void setQuickShareService(org.alfresco.service.cmr.quickshare.QuickShareService quickShareService)
-
setNodes
public void setNodes(Nodes nodes)
-
setRenditions
public void setRenditions(Renditions renditions)
-
setEnabled
public void setEnabled(boolean enabled)
-
afterPropertiesSet
public void afterPropertiesSet()
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-
readById
public QuickShareLink readById(java.lang.String sharedId, Parameters parameters)
Returns limited metadata regarding the shared (content) link.Note: does *not* require authenticated access for (public) shared link.
- Specified by:
readById
in interfaceQuickShareLinks
-
readProperty
public BinaryResource readProperty(java.lang.String sharedId, java.lang.String renditionId, Parameters parameters) throws EntityNotFoundException
Download content via shared link.Note: does *not* require authenticated access for (public) shared link.
- Specified by:
readProperty
in interfaceQuickShareLinks
- Parameters:
sharedId
-renditionId
- - optionalparameters
-Parameters
- Returns:
- Throws:
EntityNotFoundException
-
delete
public void delete(java.lang.String sharedId, Parameters parameters)
Delete the shared link.Once deleted, the shared link will no longer exist hence get/download will no longer work (ie. return 404). If the link is later re-created then a new unique shared id will be generated.
Requires authenticated access.
- Specified by:
delete
in interfaceQuickShareLinks
- Parameters:
sharedId
- String id of the quick share
-
create
public java.util.List<QuickShareLink> create(java.util.List<QuickShareLink> nodeIds, Parameters parameters)
Create quick share.Requires authenticated access.
- Specified by:
create
in interfaceQuickShareLinks
- Parameters:
nodeIds
-parameters
-- Returns:
-
emailSharedLink
public void emailSharedLink(java.lang.String sharedId, QuickShareLinkEmailRequest emailRequest, Parameters parameters)
Description copied from interface:QuickShareLinks
Notifies users by email that a content has been shared with them.- Specified by:
emailSharedLink
in interfaceQuickShareLinks
- Parameters:
sharedId
- The string id of the quick shareemailRequest
- The email details including its template detailsparameters
- TheParameters
object to get the parameters passed into the request
-
getRendition
public Rendition getRendition(java.lang.String sharedId, java.lang.String renditionId)
Description copied from interface:QuickShareLinks
Gets information about a rendition of a shared link.- Specified by:
getRendition
in interfaceQuickShareLinks
- Returns:
- the
Rendition
object
-
getRenditions
public CollectionWithPagingInfo<Rendition> getRenditions(java.lang.String sharedId)
Description copied from interface:QuickShareLinks
List renditions info - note: only returns available (=> created) renditions. Note: does *not* require authenticated access for (public) shared link.- Specified by:
getRenditions
in interfaceQuickShareLinks
- Returns:
-
findLinks
public CollectionWithPagingInfo<QuickShareLink> findLinks(Parameters parameters)
Description copied from interface:QuickShareLinks
Find (search) for shared links visible to current user. Optionally filter by "sharedByUser/id" (if -me- then filter by current user).- Specified by:
findLinks
in interfaceQuickShareLinks
- Returns:
-
-