public class FileDownloadEventProcess extends AbstractShareEventProcessor
DocumentDetailsPage
showing the file details
EVENT_NAME_DOWNLOAD_DOCUMENT_COMPLETE
: DocumentDetailsPage
in ShareEventData
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_DOWNLOAD_VIA_CLICK |
static String |
EVENT_NAME_DOWNLOAD_DOCUMENT_COMPLETE |
eventNameActionComplete, logger, sessionService, userDataService
Constructor and Description |
---|
FileDownloadEventProcess(org.alfresco.bm.user.UserDataService userDataService) |
Modifier and Type | Method and Description |
---|---|
org.alfresco.bm.event.EventResult |
processEvent(org.alfresco.bm.event.Event event,
ShareEventData eventData)
Process a share based event.
|
void |
setDownloadDir(String downloadDir)
Set the location where the browser will be putting files.
|
void |
setDownloadViaClick(boolean downloadViaClick)
Override the
default method of executing the file
download (default:false). |
closeWebDrone, getUserData, processEvent, setEventNameActionComplete, setSessionService
getName, getWarnDelay, isAutoCloseSessionId, isAutoPropagateSessionId, isChart, processEvent, register, resumeTimer, setAutoCloseSessionId, setAutoPropagateSessionId, setBeanName, setChart, setEventName, setEventNames, setRegistry, setWarnDelay, stopTimer, suspendTimer, toString
public static final String EVENT_NAME_DOWNLOAD_DOCUMENT_COMPLETE
public static final boolean DEFAULT_DOWNLOAD_VIA_CLICK
public FileDownloadEventProcess(org.alfresco.bm.user.UserDataService userDataService)
userDataService
- service to provide user datadownloadDirectory
- the directory where downloaded files are stored.
Use empty string (or null) to indicate that the location
is unknown.public void setDownloadViaClick(boolean downloadViaClick)
default
method of executing the file
download (default:false).downloadViaClick
- true to have the browser click the link and
download the file to the browser's download directory;
the is less reliable than true, which uses a
HTTP client to download the file directly.public void setDownloadDir(String downloadDir)
downloadDir
- a path to a folder that must exist (null allowed)public org.alfresco.bm.event.EventResult processEvent(org.alfresco.bm.event.Event event, ShareEventData eventData) throws Exception
AbstractShareEventProcessor
processEvent
in class AbstractShareEventProcessor
event
- the origininating event (not normally required)eventData
- the share event data entityEventResult
the result of the process (includes errors and next events)Exception
Copyright © 2015. All rights reserved.