james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Søren Hilmer ...@itplus.dk>
Subject [PATCH] bug 18471 attributes on mail
Date Wed, 25 Jun 2003 13:51:27 GMT
This patch finishes (hopefully) the implementation of attributes on
Mail (Bug 18471).

The implementation largely follows Noels plan:
  - change sqlResources.xml to accomodate the extra
    - change create
    - add updateMessageAttributesSQL
    - add retrieveMessageAttributesSQL
   - change JDBCMailRepository to store the BLOB if the
     the updateMessageAttributesSQL is present *AND*
     there are attributes
   - change JDBCMailRepository to retrieve the BLOB if
     the retrieveMessageAttributesSQL is present
   - comment out updateMessageAttributesSQL and
     retrieveMessageAttributesSQL by default in

    -In JDBCMailRepository, log and discard the SQLException of the
     table hasn't be updated to allow the operation.
In addition it was necessary to add methods to MailImpl for
getting/setting the attributes HashMap directly, those methods are not
exposed in the Mail interface.

The comment out part of updateMessageAttributesSQL and
retrieveMessageAttributesSQL is only done for the Mail repository the
spool repository has them commented in.

It was necessary to have distinct insertMsgSQL statements one for use
with repositories with attributes and one for repositories without,
the version for inserting messages containing attributes are commented
out for Mail repository but not for spool repositories.

Note the feature will only work with spool database repositories, if
the spool table in the database are recreated, this should not be a
compatibility problem as entries in spool are of a temporary nature. 

Also I have added a removeAllAttributes to the Mail interface to allow
such an operation to be fast (as compared to removing each attribute
individually in a loop over attributeNames), and a hasAttributes
method which returns true if the Mail instance has any attributes set.

Søren Hilmer, M.Sc.
R&D manager		Phone:	+45 70 27 64 00
TietoEnator IT+		Fax:	+45 70 27 64 40
Ved Lunden 12		Direct:	+45 87 46 64 57
DK-8230 Åbyhøj		Email:	soren.hilmer@tietoenator.com

View raw message