I added the code to the SpoolManagementService: I think it is the best place. It does something different from the FromRepository mailet.

I created it to work only with SPOOL because we already had management only for SPOOL and not for MAIL repositories.

As we can always provide the SpoolRepository interface over a MailRepository object and viceversa I think that we should try to simplify this by always returning a SpoolRepository implementation even if they request a MAIL type. This would let us to have simple commands: otherwise we have to add the "type" to every command working with the repository.

I think this would be the first good step to later introduce a different type: MESSAGE. The MESSAGE type is the one managed by MailboxManager (aka Mailbox or MessageRepository).

My code is not specific to any state: if you want you can specify a state as input filter, and also optionally you can specify a destination state.

Also it is not specific to any repository: you simply use the urls and it retrieve "type SPOOL" repositories.

If this explanation is not enough maybe I've not understood your comment.

Stefano

Noel J. Bergman (JIRA) wrote:
[ http://issues.apache.org/jira/browse/JAMES-704?page=comments#action_12451046 ] Noel J. Bergman commented on JAMES-704:
---------------------------------------

If you were to pull the code out into a utility class, we could make use of it 
in the FromRepository mailet.  And it should be generic to any repository, not 
just messages in a particular spool and spool state.  :-)

Add MOVEMAILS command to RemoteManager (and MBean implementation) to move mails 
between SPOOLs
----------------------------------------------------------------------------------------------

                Key: JAMES-704
                URL: http://issues.apache.org/jira/browse/JAMES-704
            Project: James
         Issue Type: Improvement
         Components: Remote Manager
   Affects Versions: Next Major
           Reporter: Stefano Bagnara
        Assigned To: Stefano Bagnara
            Fix For: Next Major


Add management and remote manager commands to move mails between spools.




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

Reply via email to