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 "Tung TRAN (Jira)" <se...@james.apache.org> on 2022/08/04 08:32:00 UTC

[jira] [Updated] (JAMES-3796) Guice support the custom task-json in extension

     [ https://issues.apache.org/jira/browse/JAMES-3796?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tung TRAN updated JAMES-3796:
-----------------------------
    Description: 
*Why*
 - James is supporting the custom web admin ([https://james.apache.org/howTo/custom-webadmin-routes.html]), but It does not yet support the `task-json` in the extension. 

We got an error when trying to guice bind more `AdditionalInformationDTOModule` to Set in the extension module. 
Eg:
{code:java}
    @Named(DTOModuleInjections.WEBADMIN_DTO)
    @ProvidesIntoSet
    public AdditionalInformationDTOModule<? extends TaskExecutionDetails.AdditionalInformation, ? extends AdditionalInformationDTO> webAdminFeedHamAdditionalInformation()

{         return FeedHamToRSpamDTaskAdditionalInformationDTO.SERIALIZATION_MODULE;     }
{code}
-> It will be better if have a mechanism for support that 

*How* 
 - Add one more configure for `webadmin-dto` guice in `webadmin.properties`. Eg: `extensions.dtos=org.apache.james.modules.server.WebAdminDTOExtensionModuleImpl` 
 - Add one more configure for `task-json` guice in `extensions.properties` 
Eg: `guice.extension.task=org.apache.james.server.task.json.TaskExtensionModuleImpl` 

 

Mailing-list: [https://www.mail-archive.com/server-dev@james.apache.org/msg72210.html]

  was:
*Why*
- James is supporting the custom web admin (https://james.apache.org/howTo/custom-webadmin-routes.html), but It does not yet support the `task-json` in the extension. 

We got an error when trying to guice bind more `AdditionalInformationDTOModule` to Set in the extension module. 
Eg:

```java
    @Named(DTOModuleInjections.WEBADMIN_DTO)
    @ProvidesIntoSet
    public AdditionalInformationDTOModule<? extends TaskExecutionDetails.AdditionalInformation, ? extends AdditionalInformationDTO> webAdminFeedHamAdditionalInformation() {
        return FeedHamToRSpamDTaskAdditionalInformationDTO.SERIALIZATION_MODULE;
    }
```

-> It will be better if have a mechanism for support that 

*How* 
- Add one more configure for `webadmin-dto` guice in `webadmin.properties`. Eg: `extensions.dtos=org.apache.james.modules.server.WebAdminDTOExtensionModuleImpl` 
- Add one more configure for `task-json` guice in `extensions.properties` 
Eg: `guice.extension.task=org.apache.james.server.task.json.TaskExtensionModuleImpl` 

 

Mailing-list: https://www.mail-archive.com/server-dev@james.apache.org/msg72210.html


> Guice support the custom task-json in extension
> -----------------------------------------------
>
>                 Key: JAMES-3796
>                 URL: https://issues.apache.org/jira/browse/JAMES-3796
>             Project: James Server
>          Issue Type: Improvement
>            Reporter: Tung TRAN
>            Priority: Minor
>
> *Why*
>  - James is supporting the custom web admin ([https://james.apache.org/howTo/custom-webadmin-routes.html]), but It does not yet support the `task-json` in the extension. 
> We got an error when trying to guice bind more `AdditionalInformationDTOModule` to Set in the extension module. 
> Eg:
> {code:java}
>     @Named(DTOModuleInjections.WEBADMIN_DTO)
>     @ProvidesIntoSet
>     public AdditionalInformationDTOModule<? extends TaskExecutionDetails.AdditionalInformation, ? extends AdditionalInformationDTO> webAdminFeedHamAdditionalInformation()
> {         return FeedHamToRSpamDTaskAdditionalInformationDTO.SERIALIZATION_MODULE;     }
> {code}
> -> It will be better if have a mechanism for support that 
> *How* 
>  - Add one more configure for `webadmin-dto` guice in `webadmin.properties`. Eg: `extensions.dtos=org.apache.james.modules.server.WebAdminDTOExtensionModuleImpl` 
>  - Add one more configure for `task-json` guice in `extensions.properties` 
> Eg: `guice.extension.task=org.apache.james.server.task.json.TaskExtensionModuleImpl` 
>  
> Mailing-list: [https://www.mail-archive.com/server-dev@james.apache.org/msg72210.html]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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