Project Wonder 5.0

er.corebusinesslogic
Class ERCMailMessage

java.lang.Object
  extended by com.webobjects.eocontrol.EOCustomObject
      extended by com.webobjects.eocontrol.EOGenericRecord
          extended by er.extensions.eof.ERXGenericRecord
              extended by er.corebusinesslogic._ERCMailMessage
                  extended by er.corebusinesslogic.ERCMailMessage
All Implemented Interfaces:
_EOPrivateMemento, EODeferredFaulting, EOEnterpriseObject, EOFaulting, EOKeyValueCoding, EOKeyValueCoding._BestBindingCreation._ForwardingBindingCheck, EOKeyValueCoding._KeyBindingCreation, EOKeyValueCodingAdditions, EORelationshipManipulation, EOValidation, NSKeyValueCoding, NSKeyValueCoding._KeyBindingCreation, NSKeyValueCoding._ReflectionKeyBindingCreation.Callback, NSKeyValueCoding.ErrorHandling, NSKeyValueCodingAdditions, NSValidation, ERXDatabaseContextDelegate.AutoBatchFaultingEnterpriseObject, ERXEnterpriseObject, ERXGeneratesPrimaryKeyInterface, ERXGuardedObjectInterface, ERXKey.ValueCoding, ERXNonNullObjectInterface, Serializable
Direct Known Subclasses:
_ERCMailMessageArchive

public class ERCMailMessage
extends _ERCMailMessage

See Also:
Serialized Form
Properties
er.corebusinesslogic.ERCMailMessage.ShouldArchiveer.corebusinesslogic.ERCMailMessage.ShouldArchive
           
er.corebusinesslogic.ERCMailMessage.ShouldGzipContenter.corebusinesslogic.ERCMailMessage.ShouldGzipContent
           

Nested Class Summary
static class ERCMailMessage.ERCMailMessageClazz
          Clazz object used to hold all clazz related methods.
 
Nested classes/interfaces inherited from class er.corebusinesslogic._ERCMailMessage
_ERCMailMessage._ERCMailMessageClazz, _ERCMailMessage.Key
 
Nested classes/interfaces inherited from class er.extensions.eof.ERXGenericRecord
ERXGenericRecord.ERXGenericRecordClazz<T extends EOEnterpriseObject>, ERXGenericRecord.InverseRelationshipUpdater, ERXGenericRecord.LocalizedBinding, ERXGenericRecord.TouchingBinding
 
Nested classes/interfaces inherited from class com.webobjects.eocontrol.EOGenericRecord
EOGenericRecord._DictionaryBinding, EOGenericRecord._LazyDictionaryBinding
 
Nested classes/interfaces inherited from class com.webobjects.eocontrol.EOCustomObject
EOCustomObject._BooleanFieldBinding, EOCustomObject._FieldBinding, EOCustomObject._LazyFieldBinding, EOCustomObject._NumberFieldBinding
 
Nested classes/interfaces inherited from interface er.extensions.eof.ERXEnterpriseObject
ERXEnterpriseObject.Observer, ERXEnterpriseObject.Processor
 
Nested classes/interfaces inherited from interface com.webobjects.eocontrol.EOKeyValueCodingAdditions
EOKeyValueCodingAdditions.DefaultImplementation, EOKeyValueCodingAdditions.Utility
 
Nested classes/interfaces inherited from interface com.webobjects.eocontrol.EOKeyValueCoding
EOKeyValueCoding._BestBindingCreation, EOKeyValueCoding._KeyBindingCreation, EOKeyValueCoding._StoredForwardingBinding
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCoding
NSKeyValueCoding._BooleanFieldBinding, NSKeyValueCoding._BooleanMethodBinding, NSKeyValueCoding._FieldBinding, NSKeyValueCoding._ForwardingBinding, NSKeyValueCoding._KeyBinding, NSKeyValueCoding._NumberFieldBinding, NSKeyValueCoding._NumberMethodBinding, NSKeyValueCoding._ReflectionKeyBindingCreation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.MapImplementation, NSKeyValueCoding.Null<T>, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.ValueAccessor
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSValidation
NSValidation._MethodBinding, NSValidation._ValidationBinding, NSValidation.ValidationException
 
Nested classes/interfaces inherited from interface com.webobjects.eocontrol._EOPrivateMemento
_EOPrivateMemento.DefaultImplementation
 
Field Summary
static String AddressSeparator
          holds the address separator
static Logger log
          logging support
 
Fields inherited from class er.corebusinesslogic._ERCMailMessage
ENTITY_NAME
 
Fields inherited from class er.extensions.eof.ERXGenericRecord
_primaryKey, _touchSource, insertionStackTrace
 
Fields inherited from class com.webobjects.eocontrol.EOGenericRecord
_CLASS
 
Fields inherited from class com.webobjects.eocontrol.EOCustomObject
__readOnly
 
Fields inherited from interface er.extensions.eof.ERXEnterpriseObject
applyRestrictingQualifierOnInsert, DidDeleteProcessor, DidInsertProcessor, DidRevertProcessor, DidUpdateProcessor, FlushCachesProcessor, insertionTrackingLog, KEY_MARKER, logMod, tranLogDidDelete, tranLogDidInsert, tranLogDidRevert, tranLogDidUpdate, tranLogMightDelete, tranLogWillDelete, tranLogWillInsert, tranLogWillRevert, tranLogWillUpdate, validation, validationException, WillDeleteProcessor, WillInsertProcessor, WillRevertProcessor, WillUpdateProcessor
 
Fields inherited from interface com.webobjects.eocontrol.EOEnterpriseObject
_CLASS
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
_KeyPathSeparatorChar, KeyPathSeparator
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding
NullValue
 
Constructor Summary
ERCMailMessage()
          Public constructor.
 
Method Summary
 void addToBothSidesOfAttachments(ERCMessageAttachment attachement)
           
 void appendText(String text)
          Appends test to the currently stored text.
 ERCMailMessage archive()
           
 void attachFileWithMimeType(String filePath, String mimeType)
           
 NSArray bccAddressesAsArray()
           
 NSArray ccAddressesAsArray()
           
 boolean hasAttachments()
          Simple test if an attachment has any attachments.
 void init(EOEditingContext anEditingContext)
          Default state of the mail message is 'Ready To Be Sent'.
 boolean isExceptionState()
           
 boolean isReadAsBoolean()
           
 boolean isReadyToSendState()
           
 boolean isReceivedState()
           
 boolean isSentState()
           
 String longDescription()
          Long description of the mail message.
static ERCMailMessage.ERCMailMessageClazz mailMessageClazz()
          Gets the singleton clazz object for this Class.
 void markReadBy(EOEnterpriseObject by)
           
 void setBccAddressesAsArray(NSArray bccAddresses)
           
 void setCcAddressesAsArray(NSArray ccAddresses)
           
 void setReadAsBoolean(boolean read)
          Deprecated. setIsRead
 void setText(String aValue)
           
 void setToAddressesAsArray(NSArray toAddresses)
           
 boolean shouldArchiveSentMailAsBoolean()
           
 String storedGzippedValueForKey(String key)
           
 void takeStoredGzippedValueForKey(String aValue, String key)
           
 String text()
           
 NSArray toAddressesAsArray()
           
 String toLongString()
          Returns the super classes implementation of toString which prints out the current key-value pairs for all of the attributes and relationships for the current object.
 String toString()
          Overrides the EOGenericRecord's implementation to provide a slightly less verbose output.
 Object validateEmptyStringForKey(Object value, String field)
           
 void validateForSave()
          This method performs a few checks before invoking super's implementation.
 Object validateFromAddress(String newValue)
           
 Object validateTitle(String newValue)
           
 Object validateToAddresses(String newValue)
           
 void willInsert()
          Called as part of the augmented transaction process.
 void willUpdate()
          Called as part of the augmented transaction process.
 
Methods inherited from class er.corebusinesslogic._ERCMailMessage
addToAttachments, attachments, bccAddresses, ccAddresses, contentGzipped, created, dateSent, exceptionReason, fromAddress, isRead, lastModified, plainText, plainTextCompressed, removeFromAttachments, replyToAddress, setBccAddresses, setCcAddresses, setContentGzipped, setCreated, setDateSent, setExceptionReason, setFromAddress, setIsRead, setLastModified, setPlainText, setPlainTextCompressed, setReplyToAddress, setShouldArchiveSentMail, setState, setTextCompressed, setTitle, setToAddresses, setXMailer, shouldArchiveSentMail, state, textCompressed, title, toAddresses, xMailer
 
Methods inherited from class er.extensions.eof.ERXGenericRecord
_otherStorageBinding, _setPrimaryKeyDictionary, _setUpdateInverseRelationships, _setValueForPrimaryKey, _updateInverseRelationships, _validateValueForKey, addObjectsToBothSidesOfRelationshipWithKey, addObjectToBothSidesOfRelationshipWithKey, applyRestrictingQualifierOnInsert, awakeFromClientUpdate, awakeFromFetch, awakeFromInsertion, batchCheckConsistency, batchFaultingRelationshipName, batchFaultingSourceGlobalID, batchFaultingTimeStamp, canDelete, canUpdate, changesFromCommittedSnapshot, checkConsistency, checkMatchingEditingContexts, clearProperties, committedSnapshot, committedSnapshotValueForKey, delete, description, didCopyFromChildInEditingContext, didDelete, didInsert, didRevert, didUpdate, encryptedPrimaryKey, entity, excludeObjectFromPropertyWithKey, flushCaches, foreignKeyForRelationshipWithKey, getClassLog, hasKeyChangedFromCommittedSnapshot, hasKeyChangedFromCommittedSnapshotFromValue, hasKeyChangedFromCommittedSnapshotFromValueToNewValue, hasKeyChangedFromCommittedSnapshotToValue, includeObjectIntoPropertyWithKey, isDeletedEO, isNewEO, isNewObject, isNonNull, isUpdatedObject, isValidatedWhenNested, localesForKey, localInstanceIn, localInstanceOf, localInstancesOf, localizationShouldFallbackToDefaultLanguage, mightDelete, parentObjectStoreIsObjectStoreCoordinator, permanentGlobalID, permanentGlobalID, primaryKey, primaryKeyAttributeNames, primaryKeyDictionary, primaryKeyInTransaction, rawPrimaryKey, rawPrimaryKeyInTransaction, refetchObjectFromDB, refetchObjectFromDBinEditingContext, removeObjectsFromBothSidesOfRelationshipWithKey, removeObjectsFromPropertyWithKey, self, setBatchFaultingTimestamp, setValidatedWhenNested, shouldSkipValidateForSave, shouldTrimSpaces, takeStoredValueForKey, takeValueForKey, takeValueForKey, touchFromBatchFaultingSource, trimSpaces, updateFromSnapshot, validateForInsert, validateForUpdate, validateValueForKey, valueForKey, willDelete, willReadRelationship, willRevert
 
Methods inherited from class com.webobjects.eocontrol.EOGenericRecord
__setClassDescription, _keyGetBindingForKey, _keySetBindingForKey, _storedKeyGetBindingForKey, _storedKeySetBindingForKey, classDescription, usesDeferredFaultCreation
 
Methods inherited from class com.webobjects.eocontrol.EOCustomObject
__classDescription, __clearPendingChanges, __editingContext, __globalID, __hasAuxillaryObservers, __hasPendingChanges, __hasPendingUpdate, __isInitialized, __isPendingDeletion, __isPendingInsertion, __isShared, __lastSnapshot, __originalSnapshot, __retainCount, __setAuxillaryObservers, __setEditingContext, __setGlobalID, __setInitialized, __setLastSnapshot, __setOriginalSnapshot, __setPendingDeletion, __setPendingInsertion, __setPendingUpdate, __setRetainCount, __setShared, _createKeyGetBindingForKey, _createKeySetBindingForKey, _createStoredKeyGetBindingForKey, _createStoredKeySetBindingForKey, _fieldKeyBinding, _forwardingBindingNeededForClass, _methodKeyGetBinding, _methodKeySetBinding, addObjectToPropertyWithKey, allPropertyKeys, attributeKeys, canAccessFieldsDirectly, changesFromSnapshot, classDescriptionForDestinationKey, clearFault, deleteRuleForRelationshipKey, editingContext, entityName, eoDescription, eoShallowDescription, equals, faultHandler, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hashCode, inverseForRelationshipKey, invokeRemoteMethod, isFault, isReadOnly, isToManyKey, opaqueState, ownsDestinationObjectsForRelationshipKey, prepareValuesForClient, propagateDeleteWithEditingContext, readResolve, reapplyChangesFromDictionary, removeObjectFromBothSidesOfRelationshipWithKey, removeObjectFromPropertyWithKey, shouldUseStoredAccessors, snapshot, storedValueForKey, takeValueForKeyPath, takeValuesFromDictionary, takeValuesFromDictionaryWithMapping, toManyRelationshipKeys, toOneRelationshipKeys, turnIntoFault, unableToSetNullForKey, userPresentableDescription, validateClientUpdate, validateForDelete, validateTakeValueForKeyPath, valueForKey, valueForKeyPath, valuesForKeys, valuesForKeysWithMapping, willChange, willRead
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.webobjects.eocontrol.EOEnterpriseObject
allPropertyKeys, attributeKeys, changesFromSnapshot, classDescription, classDescriptionForDestinationKey, deleteRuleForRelationshipKey, editingContext, entityName, eoDescription, eoShallowDescription, inverseForRelationshipKey, invokeRemoteMethod, isReadOnly, isToManyKey, opaqueState, ownsDestinationObjectsForRelationshipKey, prepareValuesForClient, propagateDeleteWithEditingContext, reapplyChangesFromDictionary, snapshot, toManyRelationshipKeys, toOneRelationshipKeys, userPresentableDescription, willChange
 
Methods inherited from interface com.webobjects.eocontrol.EOKeyValueCodingAdditions
takeValuesFromDictionary, takeValuesFromDictionaryWithMapping, valuesForKeys, valuesForKeysWithMapping
 
Methods inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
takeValueForKeyPath, valueForKeyPath
 
Methods inherited from interface com.webobjects.eocontrol.EOKeyValueCoding
storedValueForKey
 
Methods inherited from interface com.webobjects.foundation.NSKeyValueCoding
valueForKey
 
Methods inherited from interface com.webobjects.foundation.NSKeyValueCoding.ErrorHandling
handleQueryWithUnboundKey, handleTakeValueForUnboundKey, unableToSetNullForKey
 
Methods inherited from interface com.webobjects.eocontrol.EORelationshipManipulation
addObjectToPropertyWithKey, removeObjectFromBothSidesOfRelationshipWithKey, removeObjectFromPropertyWithKey
 
Methods inherited from interface com.webobjects.eocontrol.EOValidation
validateClientUpdate, validateForDelete
 
Methods inherited from interface com.webobjects.foundation.NSValidation
validateTakeValueForKeyPath
 
Methods inherited from interface com.webobjects.eocontrol.EOFaulting
clearFault, faultHandler, isFault, turnIntoFault, willRead
 

Field Detail

log

public static final Logger log
logging support


AddressSeparator

public static final String AddressSeparator
holds the address separator

See Also:
Constant Field Values
Constructor Detail

ERCMailMessage

public ERCMailMessage()
Public constructor.

Method Detail

mailMessageClazz

public static ERCMailMessage.ERCMailMessageClazz mailMessageClazz()
Gets the singleton clazz object for this Class.

Returns:
sigleton clazz object

init

public void init(EOEditingContext anEditingContext)
Default state of the mail message is 'Ready To Be Sent'.

Overrides:
init in class ERXGenericRecord
Parameters:
anEditingContext - inserted into

isReadyToSendState

public boolean isReadyToSendState()

isSentState

public boolean isSentState()

isExceptionState

public boolean isExceptionState()

isReceivedState

public boolean isReceivedState()

markReadBy

public void markReadBy(EOEnterpriseObject by)

setReadAsBoolean

public void setReadAsBoolean(boolean read)
Deprecated. setIsRead

Use setIsRead(boolean)


isReadAsBoolean

public boolean isReadAsBoolean()

toAddressesAsArray

public NSArray toAddressesAsArray()

setToAddressesAsArray

public void setToAddressesAsArray(NSArray toAddresses)

ccAddressesAsArray

public NSArray ccAddressesAsArray()

setCcAddressesAsArray

public void setCcAddressesAsArray(NSArray ccAddresses)

bccAddressesAsArray

public NSArray bccAddressesAsArray()

setBccAddressesAsArray

public void setBccAddressesAsArray(NSArray bccAddresses)

shouldArchiveSentMailAsBoolean

public boolean shouldArchiveSentMailAsBoolean()

longDescription

public String longDescription()
Long description of the mail message.

Returns:
very verbose description of the mail message.

toString

public String toString()
Description copied from class: ERXGenericRecord
Overrides the EOGenericRecord's implementation to provide a slightly less verbose output. A typical output for an object mapped to the class com.foo.User with a primary key of 50 would look like: EOGenericRecord's implementation is preserved in the method toLongString. To restore the original verbose logging in your subclasses override this method and return toLongString.

Overrides:
toString in class ERXGenericRecord
Returns:
much less verbose description of an enterprise object.

toLongString

public String toLongString()
Description copied from interface: ERXEnterpriseObject
Returns the super classes implementation of toString which prints out the current key-value pairs for all of the attributes and relationships for the current object. Very verbose.

Specified by:
toLongString in interface ERXEnterpriseObject
Overrides:
toLongString in class ERXGenericRecord
Returns:
super's implementation of toString.

archive

public ERCMailMessage archive()

appendText

public void appendText(String text)
Appends test to the currently stored text. Useful for nested mime messages or multi-part messages.

Parameters:
text - to be appended

validateEmptyStringForKey

public Object validateEmptyStringForKey(Object value,
                                        String field)

hasAttachments

public boolean hasAttachments()
Simple test if an attachment has any attachments.

Returns:
if the the message has any attachments

validateFromAddress

public Object validateFromAddress(String newValue)

validateTitle

public Object validateTitle(String newValue)

validateToAddresses

public Object validateToAddresses(String newValue)

validateForSave

public void validateForSave()
                     throws NSValidation.ValidationException
Description copied from class: ERXGenericRecord
This method performs a few checks before invoking super's implementation. If the property key: ERDebuggingEnabled is set to true then the method checkConsistency will be called on this object.

Specified by:
validateForSave in interface EOValidation
Overrides:
validateForSave in class ERXGenericRecord
Throws:
NSValidation.ValidationException - if the object does not pass validation for saving to the database.

attachFileWithMimeType

public void attachFileWithMimeType(String filePath,
                                   String mimeType)

addToBothSidesOfAttachments

public void addToBothSidesOfAttachments(ERCMessageAttachment attachement)

storedGzippedValueForKey

public String storedGzippedValueForKey(String key)

takeStoredGzippedValueForKey

public void takeStoredGzippedValueForKey(String aValue,
                                         String key)

text

public String text()
Overrides:
text in class _ERCMailMessage

setText

public void setText(String aValue)
Overrides:
setText in class _ERCMailMessage

willInsert

public void willInsert()
Description copied from interface: ERXEnterpriseObject
Called as part of the augmented transaction process. This method is called after saveChanges is called on the editing context, but before the object is actually inserted into the database. This method is also called before validateForInsert is called on this object. This method is called by the editing context delegate ERXDefaultEditingContextDelegate.

Specified by:
willInsert in interface ERXEnterpriseObject
Overrides:
willInsert in class ERXGenericRecord

willUpdate

public void willUpdate()
Description copied from interface: ERXEnterpriseObject
Called as part of the augmented transaction process. This method is called after saveChanges is called on the editing context, but before the object is actually updated in the database. This method is also called before validateForSave is called on this object. This method is called by the editing context delegate ERXDefaultEditingContextDelegate.

Specified by:
willUpdate in interface ERXEnterpriseObject
Overrides:
willUpdate in class ERXGenericRecord

Last updated: Wed, Feb 22, 2012 • 07:00 AM EST

Copyright © 2002 – 2011 Project Wonder.