public class ERCloudFilesAttachmentProcessor extends ERAttachmentProcessor<ERCloudFilesAttachment>
Name | Description |
---|---|
er.attachment.[configurationName].cf.container | er.attachment.[configurationName].cf.container |
er.attachment.cf.container | er.attachment.cf.container |
er.attachment.[configurationName].cf.key | er.attachment.[configurationName].cf.key |
er.attachment.cf.key | er.attachment.cf.key |
er.attachment.[configurationName].cf.username | er.attachment.[configurationName].cf.username |
er.attachment.cf.username | er.attachment.cf.username |
er.attachment.[configurationName].cf.secretAccessKey | er.attachment.[configurationName].cf.secretAccessKey |
er.attachment.cf.secretAccessKey | er.attachment.cf.secretAccessKey |
Modifier and Type | Class and Description |
---|---|
class |
ERCloudFilesAttachmentProcessor.ERCloudFilesUploadQueue |
ERAttachmentProcessor.ERXAttachmentExceedsLengthException
Modifier and Type | Field and Description |
---|---|
static String |
CF_URL |
log
Constructor and Description |
---|
ERCloudFilesAttachmentProcessor() |
Modifier and Type | Method and Description |
---|---|
ERCloudFilesAttachment |
_process(com.webobjects.eocontrol.EOEditingContext editingContext,
File uploadedFile,
String recommendedFileName,
String mimeType,
String configurationName,
String ownerID,
boolean pendingDelete)
Processes an uploaded file, imports it into the appropriate data store, and returns an ERAttachment that
represents it.
|
InputStream |
attachmentInputStream(ERCloudFilesAttachment attachment)
Returns an InputStream to the data of the given attachment.
|
void |
attachmentInserted(ERCloudFilesAttachment attachment)
Called after an attachment has been inserted (from didInsert).
|
String |
attachmentUrl(ERCloudFilesAttachment attachment,
com.webobjects.appserver.WORequest request,
com.webobjects.appserver.WOContext context)
Returns a URL to the attachment's data.
|
void |
deleteAttachment(ERCloudFilesAttachment attachment)
Deletes the attachment from the data store.
|
void |
performUpload(File uploadedFile,
String originalFileName,
String bucket,
String key,
String mimeType,
ERCloudFilesAttachment attachment) |
_parsePathTemplate, addAttachmentProcessorForType, delegate, process, process, process, process, process, process, processorForConfigurationName, processorForType, processorForType, processors, proxiedUrl, proxyAsAttachment, setDelegate
public static final String CF_URL
public ERCloudFilesAttachment _process(com.webobjects.eocontrol.EOEditingContext editingContext, File uploadedFile, String recommendedFileName, String mimeType, String configurationName, String ownerID, boolean pendingDelete)
ERAttachmentProcessor
_process
in class ERAttachmentProcessor<ERCloudFilesAttachment>
editingContext
- the EOEditingContext to create the ERAttachment inuploadedFile
- the uploaded temporary file (which will be deleted at the end)recommendedFileName
- the filename recommended by the user during importmimeType
- the mimeType to use (null = guess based on file extension)configurationName
- the name of the configuration settings to use for this processor (see top level docs)ownerID
- an arbitrary string that represents the ID of the "owner" of this thumbnail (Person.primaryKey, for instance)pendingDelete
- if true, the uploadedFile will be deleted after import; if false, it will be left alonepublic InputStream attachmentInputStream(ERCloudFilesAttachment attachment) throws IOException
ERAttachmentProcessor
attachmentInputStream
in class ERAttachmentProcessor<ERCloudFilesAttachment>
attachment
- the attachment to retrieve the data forIOException
- if the stream cannot be createdpublic String attachmentUrl(ERCloudFilesAttachment attachment, com.webobjects.appserver.WORequest request, com.webobjects.appserver.WOContext context)
ERAttachmentProcessor
attachmentUrl
in class ERAttachmentProcessor<ERCloudFilesAttachment>
attachment
- the attachment to generate a URL forrequest
- the current requestcontext
- the current contextpublic void deleteAttachment(ERCloudFilesAttachment attachment) throws MalformedURLException, IOException
ERAttachmentProcessor
deleteAttachment
in class ERAttachmentProcessor<ERCloudFilesAttachment>
attachment
- the attachment to deleteIOException
- if the delete failsMalformedURLException
public void attachmentInserted(ERCloudFilesAttachment attachment)
ERAttachmentProcessor
attachmentInserted
in class ERAttachmentProcessor<ERCloudFilesAttachment>
attachment
- the inserted attachmentpublic void performUpload(File uploadedFile, String originalFileName, String bucket, String key, String mimeType, ERCloudFilesAttachment attachment) throws MalformedURLException, IOException
MalformedURLException
IOException
Copyright © 2002 – 2020 Project Wonder.