[jira] [Commented] (JAMES-2320) MailQueue element removal should be backed by a Task

2018-02-26 Thread Matthieu Baechler (JIRA)

[ 
https://issues.apache.org/jira/browse/JAMES-2320?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16376960#comment-16376960
 ] 

Matthieu Baechler commented on JAMES-2320:
--

The task could the Type and the value as parameters and call queue.remove 
blindly, don't you thing ?

> MailQueue element removal should be backed by a Task
> 
>
> Key: JAMES-2320
> URL: https://issues.apache.org/jira/browse/JAMES-2320
> Project: James Server
>  Issue Type: Improvement
>  Components: Queue, webadmin
>Affects Versions: master
>Reporter: Tellier Benoit
>Priority: Major
>  Labels: feature, newbie
>
> {code:java}
> DELETE /mailQueues/:name/messages/ ?sender ?name ?recipient 
> 201 + taskId
> {code}
> Should generate a Task.No status is required as it might be complicated to 
> implement.
> You need to write related unit tests.
> A few indications:
>  - *MailQueueRoutes* declares the /mailQueues webAdmin endpoints
>  - You need to implement a *Task** performing DELETE in a mailQueue
>  - *TaskManager* is used to submit the task (and can be injected. Have a look 
> to MailRepositoriesRoutes if you are looking for an example.
>  - Use *TaskIdDto::respond* in order to send a valid response.
>  - You need some additional tests in *MailQueueRoutesTest* :
>-- Ensure that the status is 201, and that the Location header is well 
> positionned.
>-- Check the created task details
>-- Await the end of the task, and check the effects.
> (Again, a look to *MailRepositoriesRoutesTest::reprocessingOneTaskShould\** 
> tests can be helpful)
> If you need more details to implement this feature, we are willing to provide 
> support. Don't hesitate to ask on https://gitter.im/apache/james-project. We 
> are willing to provide guidance.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Commented] (JAMES-2320) MailQueue element removal should be backed by a Task

2018-02-26 Thread Sameera Kannangara (JIRA)

[ 
https://issues.apache.org/jira/browse/JAMES-2320?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16376654#comment-16376654
 ] 

Sameera Kannangara commented on JAMES-2320:
---

Hi all,

As per my understanding single implementation of org.apache.james.task.Task can 
execute only a single operation. Therefore does this issue require to implement 
three separate tasks to delete based on sender, name and recipient?

Thanks,

Sameera.

> MailQueue element removal should be backed by a Task
> 
>
> Key: JAMES-2320
> URL: https://issues.apache.org/jira/browse/JAMES-2320
> Project: James Server
>  Issue Type: Improvement
>  Components: Queue, webadmin
>Affects Versions: master
>Reporter: Tellier Benoit
>Priority: Major
>  Labels: feature, newbie
>
> {code:java}
> DELETE /mailQueues/:name/messages/ ?sender ?name ?recipient 
> 201 + taskId
> {code}
> Should generate a Task.No status is required as it might be complicated to 
> implement.
> You need to write related unit tests.
> A few indications:
>  - *MailQueueRoutes* declares the /mailQueues webAdmin endpoints
>  - You need to implement a *Task** performing DELETE in a mailQueue
>  - *TaskManager* is used to submit the task (and can be injected. Have a look 
> to MailRepositoriesRoutes if you are looking for an example.
>  - Use *TaskIdDto::respond* in order to send a valid response.
>  - You need some additional tests in *MailQueueRoutesTest* :
>-- Ensure that the status is 201, and that the Location header is well 
> positionned.
>-- Check the created task details
>-- Await the end of the task, and check the effects.
> (Again, a look to *MailRepositoriesRoutesTest::reprocessingOneTaskShould\** 
> tests can be helpful)
> If you need more details to implement this feature, we are willing to provide 
> support. Don't hesitate to ask on https://gitter.im/apache/james-project. We 
> are willing to provide guidance.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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