public class ERDatabaseAttachmentProcessor extends ERAttachmentProcessor<ERDatabaseAttachment>
Name | Description |
---|---|
er.attachment.[configurationName].db.webPath | er.attachment.[configurationName].db.webPath |
er.attachment.db.webPath | er.attachment.db.webPath |
er.attachment.[configurationName].db.smallData | er.attachment.[configurationName].db.smallData |
er.attachment.db.smallData | er.attachment.db.smallData |
ERAttachmentProcessor.ERXAttachmentExceedsLengthException
log
Constructor and Description |
---|
ERDatabaseAttachmentProcessor() |
Modifier and Type | Method and Description |
---|---|
ERDatabaseAttachment |
_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.
|
ERDatabaseAttachment |
_process(com.webobjects.eocontrol.EOEditingContext editingContext,
com.webobjects.foundation.NSData data,
String recommendedFileName,
String mimeType,
String configurationName) |
InputStream |
attachmentInputStream(ERDatabaseAttachment attachment)
Returns an InputStream to the data of the given attachment.
|
String |
attachmentUrl(ERDatabaseAttachment attachment,
com.webobjects.appserver.WORequest request,
com.webobjects.appserver.WOContext context)
Returns a URL to the attachment's data.
|
void |
deleteAttachment(ERDatabaseAttachment attachment)
Deletes the attachment from the data store.
|
_parsePathTemplate, addAttachmentProcessorForType, attachmentInserted, delegate, process, process, process, process, process, process, processorForConfigurationName, processorForType, processorForType, processors, proxiedUrl, proxyAsAttachment, setDelegate
public ERDatabaseAttachment _process(com.webobjects.eocontrol.EOEditingContext editingContext, File uploadedFile, String recommendedFileName, String mimeType, String configurationName, String ownerID, boolean pendingDelete) throws IOException
ERAttachmentProcessor
_process
in class ERAttachmentProcessor<ERDatabaseAttachment>
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 aloneIOException
- if the processing failspublic ERDatabaseAttachment _process(com.webobjects.eocontrol.EOEditingContext editingContext, com.webobjects.foundation.NSData data, String recommendedFileName, String mimeType, String configurationName)
public InputStream attachmentInputStream(ERDatabaseAttachment attachment) throws FileNotFoundException
ERAttachmentProcessor
attachmentInputStream
in class ERAttachmentProcessor<ERDatabaseAttachment>
attachment
- the attachment to retrieve the data forFileNotFoundException
public String attachmentUrl(ERDatabaseAttachment attachment, com.webobjects.appserver.WORequest request, com.webobjects.appserver.WOContext context)
ERAttachmentProcessor
attachmentUrl
in class ERAttachmentProcessor<ERDatabaseAttachment>
attachment
- the attachment to generate a URL forrequest
- the current requestcontext
- the current contextpublic void deleteAttachment(ERDatabaseAttachment attachment)
ERAttachmentProcessor
deleteAttachment
in class ERAttachmentProcessor<ERDatabaseAttachment>
attachment
- the attachment to deleteCopyright © 2002 – 2020 Project Wonder.