ERAttachment Class Reference

Inherits er::attachment::model::_ERAttachment.

Inherited by _ERDatabaseAttachment, _ERFileAttachment, and _ERS3Attachment.

Collaboration diagram for ERAttachment:

Collaboration graph
[legend]

List of all members.

Public Member Functions

void didDelete (EOEditingContext ec)
void didInsert ()
 ERAttachment ()
ERMimeType erMimeType ()
String extension ()
String fileName ()

Static Public Member Functions

static ERAttachment fetchRequiredAttachmentWithWebPath (EOEditingContext editingContext, String webPath)

Private Member Functions

boolean isInNestedEditingContext ()

Static Private Attributes

static Logger log = Logger.getLogger(ERAttachment.class)


Detailed Description

ERAttachment is the superclass of all attachment types. An attachment object encapsulates a small amount of metadata and the information necessary to construct a url or a stream onto the attachment data.

Author:
mschrag

Constructor & Destructor Documentation

ERAttachment (  ) 


Member Function Documentation

void didDelete ( EOEditingContext  ec  )  [virtual]

Called on the object after is has been deleted. The editing context is passed to the object since by this point the editingContext of the object is null. You should check if the ec is a child context when doing something here that can't be undone.

Parameters:
ec editing context that used to be associated with the object.

Reimplemented from ERXGenericRecord.

void didInsert (  )  [virtual]

Called on the object after is has successfully been inserted into the database.

Reimplemented from ERXGenericRecord.

Reimplemented in ERS3Attachment.

ERMimeType erMimeType (  ) 

Returns the ERMimeType that corresponds to the mimeType.

Returns:
the ERMimeType that corresponds to the mimeType

String extension (  ) 

Returns the file extension of this attachment, first checking the mime type, then returning the actual extension.

Returns:
the file extension of this attachment

static ERAttachment fetchRequiredAttachmentWithWebPath ( EOEditingContext  editingContext,
String  webPath 
) [static]

Fetches the required attachment associated with the given web path.

Parameters:
editingContext the editing context to load in
webPath the web path of the attachment
Returns:
the attachment
Exceptions:
NoSuchElementException if there is no attachment with the given web path

String fileName (  ) 

Returns the file name portion of the webPath.

Returns:
the file name portion of the webPath

boolean isInNestedEditingContext (  )  [private]

Reimplemented in ERS3Attachment.


Member Data Documentation

Logger log = Logger.getLogger(ERAttachment.class) [static, private]

general logging support

Implements ERXEnterpriseObject.

Reimplemented in ERDatabaseAttachment, ERFileAttachment, and ERS3Attachment.


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:42:42 2012 for Project Wonder by  doxygen 1.5.8