Kervin L. Pierre wrote:
Hello,
I started designing a message store interface
recently.
I need to hook JAMES store to my store, too. So...
Features I am targetting include so far...
1. Folder and File objects
2. Generic attributes / properties on
Folder and File objects
3. Object caching
Maybe I can help with some code:
http://cvs.sourceforge.net/viewcvs.py/*checkout*/neurogrid/neurogrid/torque-ng/src/java/com/neurogrid/middle/Cache.java
It's SoftReferenced Map - you keep em in memory, as much as you can.
4. Transactions / Savepoints
5. Search API
The above code is part of a search engine... so few words BTW, maybe you
can use it somehow.
We use triplets, like, subject-predicate-object. It turns to
MsgID-MsgAttribute-AttribValue. i.e.
[EMAIL PROTECTED]@adevsoft.com.
So it's good for search by message attributes but not for full-text body
search.
Still you can specify any search criteria with such an API: introduce
'body contains' predicate or something. This predicate will not be
stored, instead it specifies search method. Sure you can introduce
'domain' predicate or whatever.
But the point is, search API is simple: specify msg id and you get msg,
specify any attribute(s) and you get mgs list.
Now, one might argue that mixing actual predicates that get stored with
predicates that specify search method isn't quite straigthforward
development practice, but I call this 'abstraction': store handles
predicates as it needs.
And in the end it's
public Message[] search( Object msgid, Object attrib, Object value )
each arg may be null.
Regards...
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]