You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@syncope.apache.org by Francesco Chicchiriccò <il...@apache.org> on 2013/01/16 15:10:38 UTC

Missplaced classes?

Hi all,
while reviewing some wiki pages, I've unexpectedly found that 
PropagationActions, SyncActions and SyncResult were put in package 
org.apache.syncope.core.persistence.beans

This package, as its name suggests, is meant for JPA entities, not for 
interfaces having their own package (org.apache.syncope.core.sync and 
org.apache.syncope.core.propagation).

If you don't have objections, I'll move back in the right package.

Regards.

-- 
Francesco Chicchiriccò

ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/


Re: Missplaced classes?

Posted by Christian Schneider <ch...@die-schneider.net>.
On 16.01.2013 15:58, Francesco Chicchiriccò wrote:
> On 16/01/2013 15:46, Christian Schneider wrote:
>> Hi Francesco,
>>
>> I put these interfaces in the beans package as they are referenced by
>> classes in persistence. You are right that they should go to a better
>> named package. The problem with core.sync and core.propagation is that
>> these packages have heavy dependencies to most other parts of the
>> system.
>
> What if we
>  1. move the "missplaced" from core.persistence.beans to core.sync /
> core.propagation
>  2. move all implementation classes (not interfaces / enums /
> exceptions) to new packages core.sync.impl / core.propagation.impl

Sounds like a good idea. I just tried this with propagation. The only
problem I hit was the ConnectorFactory which references the
ConnectorFacadeProxy. Perhaps I can solve this with an interface for
this class. Will try it and give you feedback.

Christian



Re: Missplaced classes?

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 16/01/2013 15:46, Christian Schneider wrote:
> Hi Francesco,
>
> I put these interfaces in the beans package as they are referenced by classes in persistence. You are right that they should go to a better named package. The problem with core.sync and core.propagation is that
> these packages have heavy dependencies to most other parts of the system.

What if we
  1. move the "missplaced" from core.persistence.beans to core.sync / 
core.propagation
  2. move all implementation classes (not interfaces / enums / 
exceptions) to new packages core.sync.impl / core.propagation.impl
?

> So for example SyncActions is referenced by org.apache.syncope.core.persistence.validation.entity.SyncTaskValidator.
> So if it is moved to core.sync then this will cause a cycle with persistence.
> SyncResult is referenced by SyncActions. PropagationActions is referenced by
> org.apache.syncope.core.persistence.validation.entity.ExternalResourceValidator.
> So basically the validation classes cause the cycles.
>
> So I moved these classes / interfaces near classes that have a lot to do with them. Another aproach would be to move validation out of peristence and avoid all references from persistence classes to validation but this
> is much more difficult to achieve.
>
> I have attached the structure 101 diagram of syncope core so you can see the current dependencies.

ML strips attachments, anyway there is no need for me to look at that, 
thanks.

> On 16.01.2013 15:10, Francesco Chicchiriccò wrote:
>> Hi all,
>> while reviewing some wiki pages, I've unexpectedly found that
>> PropagationActions, SyncActions and SyncResult were put in package
>> org.apache.syncope.core.persistence.beans
>>
>> This package, as its name suggests, is meant for JPA entities, not for
>> interfaces having their own package (org.apache.syncope.core.sync and
>> org.apache.syncope.core.propagation).
>>
>> If you don't have objections, I'll move back in the right package.
>>
>> Regards.

-- 
Francesco Chicchiriccò

ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/


Re: Missplaced classes?

Posted by Christian Schneider <ch...@die-schneider.net>.
Hi Francesco,

I put these interfaces in the beans package as they are referenced by
classes in persistence. You are right that they should go to a better
named package. The problem with core.sync and core.propagation is that
these packages have heavy dependencies to most other parts of the system.

So for example SyncActions is referenced by
org.apache.syncope.core.persistence.validation.entity.SyncTaskValidator.
So if it is moved to core.sync then this will cause a cycle with
persistence.
SyncResult is referenced by SyncActions. PropagationActions is
referenced by
org.apache.syncope.core.persistence.validation.entity.ExternalResourceValidator.
So basically the validation classes cause the cycles.

So I moved these classes / interfaces near classes that have a lot to do
with them. Another aproach would be to move validation out of peristence
and avoid all references from persistence classes to validation but this
is much more difficult to achieve.

I have attached the structure 101 diagram of syncope core so you can see
the current dependencies.

Christian

On 16.01.2013 15:10, Francesco Chicchiriccò wrote:
> Hi all,
> while reviewing some wiki pages, I've unexpectedly found that
> PropagationActions, SyncActions and SyncResult were put in package
> org.apache.syncope.core.persistence.beans
>
> This package, as its name suggests, is meant for JPA entities, not for
> interfaces having their own package (org.apache.syncope.core.sync and
> org.apache.syncope.core.propagation).
>
> If you don't have objections, I'll move back in the right package.
>
> Regards.
>