public class QuickShareServiceImpl extends Object implements QuickShareService, NodeServicePolicies.BeforeDeleteNodePolicy, CopyServicePolicies.OnCopyNodePolicy, NodeServicePolicies.OnRestoreNodePolicy
| Modifier and Type | Class and Description |
|---|---|
static class |
QuickShareServiceImpl.QuickShareEmailRequest
Represents an email request to send a quick share link.
|
Policy.ArgQNAMEARG_0, ARG_1, QNAMEQNAME| Constructor and Description |
|---|
QuickShareServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
beforeDeleteNode(NodeRef beforeDeleteNodeRef)
Called before a node is deleted.
|
boolean |
canDeleteSharedLink(NodeRef nodeRef,
String sharedByUserId)
Determine if the current user has permission to delete the shared link.
|
boolean |
canRead(String sharedId)
Determine if the current user has permission to read the shared content.
|
protected void |
deleteQuickShareLinkExpiryAction(NodeRef linkExpiryActionNodeRef)
Removes (hard deletes) the previously persisted
QuickShareLinkExpiryAction and its related
schedule ScheduledPersistedAction from the repository. |
void |
deleteQuickShareLinkExpiryAction(QuickShareLinkExpiryAction linkExpiryAction)
Removes (hard deletes) the previously persisted
QuickShareLinkExpiryAction and its related
schedule ScheduledPersistedAction from the repository. |
CopyBehaviourCallback |
getCopyCallback(QName classRef,
CopyDetails copyDetails)
Called for all types and aspects before copying a node.
|
Map<String,Object> |
getMetaData(NodeRef nodeRef)
Get QuickShare related metadata for the given node.
|
Map<String,Object> |
getMetaData(String sharedId)
Get QuickShare related metadata for the given shareId.
|
protected String |
getSharedLinkEmailTemplatePath(ClientAppConfig.ClientApp clientApp) |
Pair<String,NodeRef> |
getTenantNodeRefFromSharedId(String sharedId)
Get the tenant domain and node reference for the the given share id.
|
void |
init()
The initialise method.
|
boolean |
isQuickShareEnabled()
Whether the quick share is enabled or not.
|
void |
onRestoreNode(ChildAssociationRef childAssocRef)
Called after an archived node is restored.
|
protected void |
saveSharedLinkExpiryAction(String sharedId,
Date expiryDate)
Creates and persists the quick share link expiry action and its related schedule.
|
void |
sendEmailNotification(QuickShareServiceImpl.QuickShareEmailRequest emailRequest)
Notifies users by email that a content has been shared with them, and the details of it.
|
void |
setActionService(ActionService actionService)
Set the actionService
|
void |
setAttributeService(AttributeService attributeService)
Set the attribute service
|
void |
setAuthorityService(AuthorityService authorityService)
Spring configuration
|
void |
setBehaviourFilter(BehaviourFilter behaviourFilter)
Spring configuration
|
void |
setClientAppConfig(ClientAppConfig clientAppConfig)
Set the quickShare clientAppConfig
|
void |
setDefaultEmailSender(String defaultEmailSender)
Set the default email sender
|
void |
setDictionaryService(DictionaryService dictionaryService)
Set the dictionary service
|
void |
setEmailHelper(EmailHelper emailHelper)
Spring configuration
|
void |
setEnabled(boolean enabled)
Enable or disable this service.
|
void |
setEventPublisher(org.alfresco.repo.events.EventPublisher eventPublisher)
Set the eventPublisher
|
void |
setExpiryDatePeriod(String expiryDatePeriod)
Spring configuration
|
void |
setNodeService(NodeService nodeService)
Set the node service
|
void |
setPermissionService(PermissionService permissionService)
Set the Permission service
|
void |
setPersonService(PersonService personService)
Set the person service
|
void |
setPolicyComponent(PolicyComponent policyComponent)
Set the policy component
|
void |
setQuickShareLinkExpiryActionPersister(QuickShareLinkExpiryActionPersister quickShareLinkExpiryActionPersister)
Spring configuration
|
void |
setScheduledPersistedActionService(ScheduledPersistedActionService scheduledPersistedActionService)
Spring configuration
|
void |
setSearchService(SearchService searchService)
Spring configuration
|
void |
setSiteService(SiteService siteService)
Spring configuration
|
void |
setSysAdminParams(SysAdminParams sysAdminParams)
Spring configuration
|
void |
setTenantService(TenantService tenantService)
Set the tenant service
|
void |
setThumbnailService(ThumbnailService thumbnailService)
Set the thumbnail service
|
QuickShareDTO |
shareContent(NodeRef nodeRef)
Share content identified by nodeRef.
|
QuickShareDTO |
shareContent(NodeRef nodeRef,
Date expiryDate)
Share content identified by nodeRef and optionally set an expiry date for the shared link.
|
void |
unshareContent(String sharedId)
Unshare the content identified by sharedId
|
public void setAttributeService(AttributeService attributeService)
public void setDictionaryService(DictionaryService dictionaryService)
public void setNodeService(NodeService nodeService)
public void setPermissionService(PermissionService permissionService)
public void setPersonService(PersonService personService)
public void setPolicyComponent(PolicyComponent policyComponent)
public void setTenantService(TenantService tenantService)
public void setThumbnailService(ThumbnailService thumbnailService)
public void setEventPublisher(org.alfresco.repo.events.EventPublisher eventPublisher)
public void setActionService(ActionService actionService)
public void setBehaviourFilter(BehaviourFilter behaviourFilter)
behaviourFilter - the behaviourFilter to setpublic void setSearchService(SearchService searchService)
searchService - the searchService to setpublic void setSiteService(SiteService siteService)
siteService - the siteService to setpublic void setAuthorityService(AuthorityService authorityService)
authorityService - the authorityService to setpublic void setSysAdminParams(SysAdminParams sysAdminParams)
sysAdminParams - the sysAdminParams to setpublic void setEmailHelper(EmailHelper emailHelper)
emailHelper - the emailHelper to setpublic void setEnabled(boolean enabled)
public void setDefaultEmailSender(String defaultEmailSender)
public void setClientAppConfig(ClientAppConfig clientAppConfig)
public void setScheduledPersistedActionService(ScheduledPersistedActionService scheduledPersistedActionService)
scheduledPersistedActionService - the scheduledPersistedActionService to setpublic void setQuickShareLinkExpiryActionPersister(QuickShareLinkExpiryActionPersister quickShareLinkExpiryActionPersister)
quickShareLinkExpiryActionPersister - the quickShareLinkExpiryActionPersister to setpublic void setExpiryDatePeriod(String expiryDatePeriod)
expiryDatePeriod - the expiryDatePeriod to setpublic void init()
public QuickShareDTO shareContent(NodeRef nodeRef)
QuickShareServiceshareContent in interface QuickShareServicenodeRef - The NodeRef of the content to sharepublic QuickShareDTO shareContent(NodeRef nodeRef, Date expiryDate) throws QuickShareDisabledException, InvalidNodeRefException
QuickShareServiceshareContent in interface QuickShareServicenodeRef - The NodeRef of the content to shareexpiryDate - The expiry date of the shared linkQuickShareDisabledExceptionInvalidNodeRefExceptionpublic Map<String,Object> getMetaData(NodeRef nodeRef)
QuickShareServicegetMetaData in interface QuickShareServicenodeRef - NodeRefpublic Pair<String,NodeRef> getTenantNodeRefFromSharedId(String sharedId)
QuickShareServicegetTenantNodeRefFromSharedId in interface QuickShareServicesharedId - Stringpublic Map<String,Object> getMetaData(String sharedId)
QuickShareServicegetMetaData in interface QuickShareServicesharedId - Stringpublic void beforeDeleteNode(NodeRef beforeDeleteNodeRef)
NodeServicePolicies.BeforeDeleteNodePolicybeforeDeleteNode in interface NodeServicePolicies.BeforeDeleteNodePolicybeforeDeleteNodeRef - the node referencepublic void onRestoreNode(ChildAssociationRef childAssocRef)
NodeServicePolicies.OnRestoreNodePolicyonRestoreNode in interface NodeServicePolicies.OnRestoreNodePolicychildAssocRef - the newly created child association referencepublic void unshareContent(String sharedId)
QuickShareServiceunshareContent in interface QuickShareServicesharedId - The shared id of the content to unshare.public CopyBehaviourCallback getCopyCallback(QName classRef, CopyDetails copyDetails)
CopyServicePolicies.OnCopyNodePolicygetCopyCallback in interface CopyServicePolicies.OnCopyNodePolicyclassRef - the type or aspect qualified namecopyDetails - the details of the impending copyCopyServicePoliciespublic boolean canRead(String sharedId)
QuickShareServicecanRead in interface QuickShareServicepublic void sendEmailNotification(QuickShareServiceImpl.QuickShareEmailRequest emailRequest)
QuickShareServicesendEmailNotification in interface QuickShareServiceemailRequest - The email details including its template detailsprotected String getSharedLinkEmailTemplatePath(ClientAppConfig.ClientApp clientApp)
public boolean canDeleteSharedLink(NodeRef nodeRef, String sharedByUserId)
QuickShareServicecanDeleteSharedLink in interface QuickShareServicepublic boolean isQuickShareEnabled()
QuickShareServiceisQuickShareEnabled in interface QuickShareServiceprotected void saveSharedLinkExpiryAction(String sharedId, Date expiryDate)
public void deleteQuickShareLinkExpiryAction(QuickShareLinkExpiryAction linkExpiryAction)
QuickShareServiceQuickShareLinkExpiryAction and its related
schedule ScheduledPersistedAction from the repository.deleteQuickShareLinkExpiryAction in interface QuickShareServicelinkExpiryAction - The QuickShareLinkExpiryAction to be deleted.protected void deleteQuickShareLinkExpiryAction(NodeRef linkExpiryActionNodeRef)
QuickShareLinkExpiryAction and its related
schedule ScheduledPersistedAction from the repository.Copyright © 2005–2021 Alfresco Software. All rights reserved.