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 "Tellier Benoit (JIRA)" <ji...@apache.org> on 2017/11/02 06:12:00 UTC

[jira] [Created] (MAILBOX-317) Refactoring StoreManager constructor and hierarchy

Tellier Benoit created MAILBOX-317:
--------------------------------------

             Summary: Refactoring StoreManager constructor and hierarchy
                 Key: MAILBOX-317
                 URL: https://issues.apache.org/jira/browse/MAILBOX-317
             Project: James Mailbox
          Issue Type: Improvement
          Components: store
    Affects Versions: master
            Reporter: Tellier Benoit


StoreMailboxManager has 5 different constructors and it's hierarchy handles a total of ~30 constuctors.

We should rely on a single constructor on StoreMailboxManager, and each class in the hierarchy should only have a single constructor.

To do this:
 - We need to remove MailboxManager the responsibility of initialising the event system: it should be passed well initialized to it.
 - We should extract annotations. Thus configuration of annotations limit can be handled at THAT level and *not impact the entire classhierarchy*.

Finally, we can also rely more on InMemoryIntegrationResources to limit direct calls to raw constructors.

I really believe such changes, even painful, brings a :
 - way more separated responsibility
 - clearer code





--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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