Class ActivitiesUnsubscribeWebScript
java.lang.Object
org.springframework.extensions.webscripts.AbstractWebScript
org.springframework.extensions.webscripts.DeclarativeWebScript
fr.becpg.repo.web.scripts.activity.ActivitiesUnsubscribeWebScript
- All Implemented Interfaces:
org.springframework.extensions.webscripts.WebScript
public class ActivitiesUnsubscribeWebScript
extends org.springframework.extensions.webscripts.DeclarativeWebScript
Unauthenticated one-click unsubscribe link of the activity emails (RFC 8058).
The GET shows a confirmation page and changes nothing, since mail clients and security scanners open the links of the emails they receive. The POST, sent by the mail client button or by the confirmation page, disables the activity emails of the user designated by the token. Both answer the same page whatever the token, so that the endpoint tells nothing about the users of the instance.
- Author:
- valentin
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.extensions.webscripts.AbstractWebScript
org.springframework.extensions.webscripts.AbstractWebScript.ScriptDetails -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ActivitiesUnsubscribeServiceprivate static final StringbeCPG logo of the activity email header, served by Share.private static final String[]private static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate org.alfresco.repo.admin.SysAdminParams -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildPageModel(String token) executeImpl(org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.Status status, org.springframework.extensions.webscripts.Cache cache) voidsetActivitiesUnsubscribeService(ActivitiesUnsubscribeService activitiesUnsubscribeService) Setter for the fieldactivitiesUnsubscribeService.voidsetSysAdminParams(org.alfresco.repo.admin.SysAdminParams sysAdminParams) Setter for the fieldsysAdminParams.Methods inherited from class org.springframework.extensions.webscripts.DeclarativeWebScript
execute, executeFinallyImpl, executeImpl, executeImpl, getTemplateModel, renderFormatTemplateMethods inherited from class org.springframework.extensions.webscripts.AbstractWebScript
addModuleBundleToCache, checkModuleBundleCache, createArgs, createArgsM, createHeaders, createHeadersM, createScriptParameters, createStatusException, createTemplateParameters, executeScript, getContainer, getDescription, getExecuteScript, getResources, getStatusTemplate, init, renderString, renderString, renderTemplate, sendStatus, setURLModelFactory, toString
-
Field Details
-
PARAM_TOKEN
- See Also:
-
METHOD_POST
- See Also:
-
MESSAGE_PREFIX
- See Also:
-
MESSAGE_KEYS
-
MODEL_LOGO_URL
- See Also:
-
LOGO_PATH
beCPG logo of the activity email header, served by Share.- See Also:
-
activitiesUnsubscribeService
-
sysAdminParams
private org.alfresco.repo.admin.SysAdminParams sysAdminParams
-
-
Constructor Details
-
ActivitiesUnsubscribeWebScript
public ActivitiesUnsubscribeWebScript()
-
-
Method Details
-
setActivitiesUnsubscribeService
public void setActivitiesUnsubscribeService(ActivitiesUnsubscribeService activitiesUnsubscribeService) Setter for the field
activitiesUnsubscribeService.- Parameters:
activitiesUnsubscribeService- the service disabling the activity emails
-
setSysAdminParams
public void setSysAdminParams(org.alfresco.repo.admin.SysAdminParams sysAdminParams) Setter for the field
sysAdminParams.- Parameters:
sysAdminParams- the public URLs of the instance, used to find the logo
-
executeImpl
protected Map<String,Object> executeImpl(org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.Status status, org.springframework.extensions.webscripts.Cache cache) - Overrides:
executeImplin classorg.springframework.extensions.webscripts.DeclarativeWebScript
-
buildPageModel
-