You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Tim-Christian Mundt (JIRA)" <se...@james.apache.org> on 2010/06/07 17:53:42 UTC

[jira] Created: (IMAP-151) Replace MailboxMapper.existsMailboxStartingWith() with hasChildren()

Replace MailboxMapper.existsMailboxStartingWith() with hasChildren()
--------------------------------------------------------------------

                 Key: IMAP-151
                 URL: https://issues.apache.org/jira/browse/IMAP-151
             Project: JAMES Imap
          Issue Type: Improvement
            Reporter: Tim-Christian Mundt


existsMailboxStartingWith() is only used to find out whether a mailbox has children. For some implementations it's more efficient to use another mechanism (e.g. JCR nodes have a hasNodes() method). Thus existsMailboxStartingWith() should be removed, hasChildren() should be added and the implementations should make use of that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Updated: (IMAP-151) Replace MailboxMapper.existsMailboxStartingWith() with hasChildren()

Posted by "Tim-Christian Mundt (JIRA)" <se...@james.apache.org>.
     [ https://issues.apache.org/jira/browse/IMAP-151?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim-Christian Mundt updated IMAP-151:
-------------------------------------

    Attachment: IMAP-151a.patch

Yeah, sorry, that was kinda stupid. In the new patch I changed the JCR implementation back, but still i think the algorithm for hasChildren should be in the mapper rather than in the manager, that's what this patch does. Just a suggestion, whatever you think is right.

> Replace MailboxMapper.existsMailboxStartingWith() with hasChildren()
> --------------------------------------------------------------------
>
>                 Key: IMAP-151
>                 URL: https://issues.apache.org/jira/browse/IMAP-151
>             Project: JAMES Imap
>          Issue Type: Improvement
>            Reporter: Tim-Christian Mundt
>         Attachments: IMAP-151.patch, IMAP-151a.patch
>
>
> existsMailboxStartingWith() is only used to find out whether a mailbox has children. For some implementations it's more efficient to use another mechanism (e.g. JCR nodes have a hasNodes() method). Thus existsMailboxStartingWith() should be removed, hasChildren() should be added and the implementations should make use of that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Resolved: (IMAP-151) Replace MailboxMapper.existsMailboxStartingWith() with hasChildren()

Posted by "Norman Maurer (JIRA)" <se...@james.apache.org>.
     [ https://issues.apache.org/jira/browse/IMAP-151?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Norman Maurer resolved IMAP-151.
--------------------------------

    Fix Version/s: 0.1
       Resolution: Fixed

Commited patch IMAP-151a with some small adjustments. Thx for the patch!

> Replace MailboxMapper.existsMailboxStartingWith() with hasChildren()
> --------------------------------------------------------------------
>
>                 Key: IMAP-151
>                 URL: https://issues.apache.org/jira/browse/IMAP-151
>             Project: JAMES Imap
>          Issue Type: Improvement
>            Reporter: Tim-Christian Mundt
>            Assignee: Norman Maurer
>             Fix For: 0.1
>
>         Attachments: IMAP-151.patch, IMAP-151a.patch
>
>
> existsMailboxStartingWith() is only used to find out whether a mailbox has children. For some implementations it's more efficient to use another mechanism (e.g. JCR nodes have a hasNodes() method). Thus existsMailboxStartingWith() should be removed, hasChildren() should be added and the implementations should make use of that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Commented: (IMAP-151) Replace MailboxMapper.existsMailboxStartingWith() with hasChildren()

Posted by "Ian Boston (JIRA)" <se...@james.apache.org>.
    [ https://issues.apache.org/jira/browse/IMAP-151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12876301#action_12876301 ] 

Ian Boston commented on IMAP-151:
---------------------------------

Also there might be lots of other reasons there is a child node there.

There could be a 3rd party structure in the same space as the imap storage (this is unstructured content so that is something that happens)

It would be safer to scan or query for jcr nodes that match a pattern (like have a mixin or of a primary type), that really means they are imap folders.


> Replace MailboxMapper.existsMailboxStartingWith() with hasChildren()
> --------------------------------------------------------------------
>
>                 Key: IMAP-151
>                 URL: https://issues.apache.org/jira/browse/IMAP-151
>             Project: JAMES Imap
>          Issue Type: Improvement
>            Reporter: Tim-Christian Mundt
>         Attachments: IMAP-151.patch
>
>
> existsMailboxStartingWith() is only used to find out whether a mailbox has children. For some implementations it's more efficient to use another mechanism (e.g. JCR nodes have a hasNodes() method). Thus existsMailboxStartingWith() should be removed, hasChildren() should be added and the implementations should make use of that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Assigned: (IMAP-151) Replace MailboxMapper.existsMailboxStartingWith() with hasChildren()

Posted by "Norman Maurer (JIRA)" <se...@james.apache.org>.
     [ https://issues.apache.org/jira/browse/IMAP-151?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Norman Maurer reassigned IMAP-151:
----------------------------------

    Assignee: Norman Maurer

> Replace MailboxMapper.existsMailboxStartingWith() with hasChildren()
> --------------------------------------------------------------------
>
>                 Key: IMAP-151
>                 URL: https://issues.apache.org/jira/browse/IMAP-151
>             Project: JAMES Imap
>          Issue Type: Improvement
>            Reporter: Tim-Christian Mundt
>            Assignee: Norman Maurer
>         Attachments: IMAP-151.patch, IMAP-151a.patch
>
>
> existsMailboxStartingWith() is only used to find out whether a mailbox has children. For some implementations it's more efficient to use another mechanism (e.g. JCR nodes have a hasNodes() method). Thus existsMailboxStartingWith() should be removed, hasChildren() should be added and the implementations should make use of that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Updated: (IMAP-151) Replace MailboxMapper.existsMailboxStartingWith() with hasChildren()

Posted by "Tim-Christian Mundt (JIRA)" <se...@james.apache.org>.
     [ https://issues.apache.org/jira/browse/IMAP-151?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim-Christian Mundt updated IMAP-151:
-------------------------------------

    Attachment: IMAP-151.patch

I took the opportunity and also put the methods in the Mapper interface in a sensible order.

> Replace MailboxMapper.existsMailboxStartingWith() with hasChildren()
> --------------------------------------------------------------------
>
>                 Key: IMAP-151
>                 URL: https://issues.apache.org/jira/browse/IMAP-151
>             Project: JAMES Imap
>          Issue Type: Improvement
>            Reporter: Tim-Christian Mundt
>         Attachments: IMAP-151.patch
>
>
> existsMailboxStartingWith() is only used to find out whether a mailbox has children. For some implementations it's more efficient to use another mechanism (e.g. JCR nodes have a hasNodes() method). Thus existsMailboxStartingWith() should be removed, hasChildren() should be added and the implementations should make use of that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Commented: (IMAP-151) Replace MailboxMapper.existsMailboxStartingWith() with hasChildren()

Posted by "Norman Maurer (JIRA)" <se...@james.apache.org>.
    [ https://issues.apache.org/jira/browse/IMAP-151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12876295#action_12876295 ] 

Norman Maurer commented on IMAP-151:
------------------------------------

Hi Tim,

using Node.hasNodes() will not work with the current jcr layout. I'm not sure we should adjust it. The problem is this:

If you have two mailboxes with the names:
* INBOX
* INBOX.test

If you now remove INBOX you need to be sure that INBOX.test still exists, thats an IMAP RFC requirement. 

So I dedicited to just create a folder with the fullname of the Mailbox. But I agree from the idea of having Folders it would more sence to put them in Hierachical order..

> Replace MailboxMapper.existsMailboxStartingWith() with hasChildren()
> --------------------------------------------------------------------
>
>                 Key: IMAP-151
>                 URL: https://issues.apache.org/jira/browse/IMAP-151
>             Project: JAMES Imap
>          Issue Type: Improvement
>            Reporter: Tim-Christian Mundt
>         Attachments: IMAP-151.patch
>
>
> existsMailboxStartingWith() is only used to find out whether a mailbox has children. For some implementations it's more efficient to use another mechanism (e.g. JCR nodes have a hasNodes() method). Thus existsMailboxStartingWith() should be removed, hasChildren() should be added and the implementations should make use of that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Commented: (IMAP-151) Replace MailboxMapper.existsMailboxStartingWith() with hasChildren()

Posted by "Norman Maurer (JIRA)" <se...@james.apache.org>.
    [ https://issues.apache.org/jira/browse/IMAP-151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12876304#action_12876304 ] 

Norman Maurer commented on IMAP-151:
------------------------------------

Btw, I agree that the method name is not optimal at least atm ;). So we should really change the name sooner then later ..

> Replace MailboxMapper.existsMailboxStartingWith() with hasChildren()
> --------------------------------------------------------------------
>
>                 Key: IMAP-151
>                 URL: https://issues.apache.org/jira/browse/IMAP-151
>             Project: JAMES Imap
>          Issue Type: Improvement
>            Reporter: Tim-Christian Mundt
>         Attachments: IMAP-151.patch
>
>
> existsMailboxStartingWith() is only used to find out whether a mailbox has children. For some implementations it's more efficient to use another mechanism (e.g. JCR nodes have a hasNodes() method). Thus existsMailboxStartingWith() should be removed, hasChildren() should be added and the implementations should make use of that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org