Loading...

server-user@james.apache.org

[Prev] Thread [Next]  |  [Prev] Date [Next]

Re: Display non-mailbox as items from finders Eric Charles Fri Feb 17 01:01:17 2012

If you only touch mailbox, it's still better indeed.
You will need to inject mailboxmanager in the subscriptionmanager to create/delete on(Un)Subscription.

Keep us posted with your results/questions :)
Eric

On 17/02/12 06:54, Jentu Jain wrote:
Thanks Eric for your guidance. We have decided to go by tweaking the managers 
instead of the processor as we are not going to deal with a different nature of 
mailbox. Also, the other reason being, this design would help me to plug-in my 
implementations easily into IMAP server.

Regards
------------------------------------
Jentu Jain | Datacert, Inc.

Why are major companies rapidly migrating to Passport?  Find Out Here



-----Original Message-----
From: Eric Charles [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 16, 2012 6:49 PM
To: James Users List
Subject: Re: Display non-mailbox as items from finders

OK, So add a Item class in the datamodel, implement the Item persistence in the 
mailbox-impl of your choice, hack the List processor to return the item list 
(you can create Item MailboxManager.getItems()), hack (Un)Subscribe to 
create/delete the mailbox upon (Un)Subscription.

Does it make sense?
Eric

On 16/02/12 13:36, Jentu Jain wrote:
The users would use the "subscribe" option of the mail client to subscribe.

Regards
------------------------------------
Jentu Jain | Datacert, Inc.

Why are major companies rapidly migrating to Passport?  Find Out Here


-----Original Message-----
From: Eric Charles [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 16, 2012 6:05 PM
To: James Users List
Subject: Re: Display non-mailbox as items from finders

Do you expect that the list of items to be proposed to the end user (let's say 
for example via a the 'Subscribe' menu of the mail client), or will the 
end-user have another tool to subscribe.

This can make some difference in your implementations, because in the first 
case, the system will have to propose a list of all potential items to 
subscribe to...

Thx,
Eric

On 16/02/12 13:29, Jentu Jain wrote:
My problem having it as a mailbox is that, there can be huge volume of items 
(ranging upto ten thousands of items) coming from another application whereas 
the end user may be interested only in a few of them. So, the end-user would 
like to see only subscribed items as mailboxes and not others.

Hence, my intent is to have the item as a mailbox until the user is subscribed 
to it.

Right now, I'm trying to tweak the store Mailbox and subscription managers to 
create mailboxes but store them in underlying storage(using InMemory storage) 
only when the user subscribes to it. Would this be the right way to go?

Regards
------------------------------------
Jentu Jain | Datacert, Inc.

Why are major companies rapidly migrating to Passport?  Find Out Here


-----Original Message-----
From: Eric Charles [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 16, 2012 5:50 PM
To: James Users List
Subject: Re: Display non-mailbox as items from finders

Interesting :)

It would be easier if the item can be a mailbox with a special attributed.

You could simply hack the (Un)SubscribeProcess and implement there some 
specific changes in doProcessRequest to change the value of the new 
Mailbox.isItem.

Or if you want to decouple things, something like:
- add an attribute 'isItem' on the mailbox model.
- define a MailboxSubscriptionEvent and MailboxUnsubscriptionEvent
- let the SubscribeProcessor generate a MailboxSubscriptionEvent
- let the UnsubscribeProcessor generate a MailboxUnsubscriptionEvent
- implement more machinery for a SubscriptionListener*, such as the 
MailboxListener.
- implement the logic in the SubscriptionListener to create/delete
upon

Now if you want an Item to be completely different of a Mailbox, you need to 
implement an additional data model, and impact many other stuff on mailbox/imap 
levels.

thx,
Eric

On 16/02/12 12:53, Jentu Jain wrote:
The item turns into a mailbox only after the end-user subscribes until that 
it's just a non-mailbox item.

Regards
------------------------------------
Jentu Jain | Datacert, Inc.

Why are major companies rapidly migrating to Passport?  Find Out
Here



-----Original Message-----
From: Eric Charles [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 16, 2012 5:22 PM
To: James Users List
Subject: Re: Display non-mailbox as items from finders

thx, is 'item' synonymous to 'mailbox'?
Eric

On 16/02/12 12:48, Jentu Jain wrote:
Eric,
Let me explain the requirement to you completely
1) Display a list of items (without having to create them as mailboxes) from an 
application.
2) The mailbox should be created only when the user subscribes to that item.
3) The mailbox should be deleted when the user unsubscribes the item (i.e.) it 
should again appear as a normal item in the list of folders.

Please let me know the changes to be done to serve this purpose.

Regards
------------------------------------
Jentu Jain | Datacert, Inc.

Why are major companies rapidly migrating to Passport?  Find Out
Here



-----Original Message-----
From: Eric Charles [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 16, 2012 5:13 PM
To: James Users List
Subject: Re: Display non-mailbox as items from finders

Hi,

A mailbox folder is only created when there is a request to access it.

To implement what you describe, you would hack the ListProcessor sources, 
rather than the MailboxMapper.
https://svn.apache.org/repos/asf/james/imap/trunk/processor/src/mai
n / j ava/org/apache/james/imap/processor/ListProcessor.java

But it depends of your context: are you willing to integrate mailbox in a 3rd 
party application, or leave it in James server?

Thx, Eric

On 16/02/12 10:19, Jentu Jain wrote:
I like to display a list of possible folders(without having to
create them as mailbox) to the user when the MailboxMapper.finder is called.
The mailbox should be created only when the user subscribes for it.
Please let me know the logic to implement the same.

Regards

------------------------------------
Jentu Jain | Datacert, Inc.

/Why are major companies rapidly migrating to Passport? Find Out
Here<http://www.datacert.com/>/

Description: cid:image001.gif@01CBF2C7.283B26D0
<http://www.datacert.com/feed.xml>Description:
cid:image002.gif@01CBF2C7.283B26D0<http://twitter.com/datacert>


--
eric | http://about.echarles.net | @echarles

-------------------------------------------------------------------
-
- To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-------------------------------------------------------------------
-
- To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
eric | http://about.echarles.net | @echarles

--------------------------------------------------------------------
- To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--------------------------------------------------------------------
- To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
eric | http://about.echarles.net | @echarles

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
eric | http://about.echarles.net | @echarles

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
eric | http://about.echarles.net | @echarles

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
eric | http://about.echarles.net | @echarles

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]