You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@syncope.apache.org by Jan Bernhardt <jb...@talend.com> on 2013/01/31 09:58:05 UTC

[DISCUSS] SchemaType and SchemaService

Hi Syncoper,

We know three different schema types in syncope "normal Schema", "derived Schema" and "virtual Schema". In Spring REST Interface these schemas are mapped to three different controllers which are basically doing the same thing, just for each type.

Therefore I only created a single SchemaService for new CXF REST Service, capable of handling all three kinds. To distinguish with type of Schema should be handled (e.g. returned for a list operation) I created a new enum SchemaType.

The topic to discuss however is, that in org.apache.syncope.common.types there is already a class named SchemaType containing data types for (user, role, membership) schema values (e.g. String, Long, Date, ...). My proposal would be to rename existing SchemaType class to EntitySchemaType (similar to EntityViolationType) and move SchemaType currently included in SchemaService Interface to org.apache.syncope.common.types.SchemaType.

Any objections?

Best regards.
Jan


Re: [DISCUSS] SchemaType and SchemaService

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 31/01/2013 09:58, Jan Bernhardt wrote:
> Hi Syncoper,
>
> We know three different schema types in syncope "normal Schema", "derived Schema" and "virtual Schema". In Spring REST Interface these schemas are mapped to three different controllers which are basically doing the same thing, just for each type.
>
> Therefore I only created a single SchemaService for new CXF REST Service, capable of handling all three kinds. To distinguish with type of Schema should be handled (e.g. returned for a list operation) I created a new enum SchemaType.
>
> The topic to discuss however is, that in org.apache.syncope.common.types there is already a class named SchemaType containing data types for (user, role, membership) schema values (e.g. String, Long, Date, ...). My proposal would be to rename existing SchemaType class to EntitySchemaType (similar to EntityViolationType) and move SchemaType currently included in SchemaService Interface to org.apache.syncope.common.types.SchemaType.
>
> Any objections?

Not in general; only, I would rather rename the existing SchemaType to 
AttributeSchemaType (or AttrSchemaType) since Entity* is usually 
referring to JPA entities.

Regards.

-- 
Francesco Chicchiriccò

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


Re: [DISCUSS] SchemaType and SchemaService

Posted by Fabio Martelli <fa...@gmail.com>.
Il giorno 31/gen/2013, alle ore 09.58, Jan Bernhardt ha scritto:

> Hi Syncoper,
> 
> We know three different schema types in syncope "normal Schema", "derived Schema" and "virtual Schema". In Spring REST Interface these schemas are mapped to three different controllers which are basically doing the same thing, just for each type.
> 
> Therefore I only created a single SchemaService for new CXF REST Service, capable of handling all three kinds. To distinguish with type of Schema should be handled (e.g. returned for a list operation) I created a new enum SchemaType.
> 
> The topic to discuss however is, that in org.apache.syncope.common.types there is already a class named SchemaType containing data types for (user, role, membership) schema values (e.g. String, Long, Date, ...). My proposal would be to rename existing SchemaType class to EntitySchemaType (similar to EntityViolationType) and move SchemaType currently included in SchemaService Interface to org.apache.syncope.common.types.SchemaType.
+1
no objections
> 
> Any objections?
> 
> Best regards.
> Jan
> 


Re: [DISCUSS] SchemaType and SchemaService

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
+1, it sounds good to me.

Regards
JB

On 01/31/2013 09:58 AM, Jan Bernhardt wrote:
> Hi Syncoper,
>
> We know three different schema types in syncope "normal Schema", "derived Schema" and "virtual Schema". In Spring REST Interface these schemas are mapped to three different controllers which are basically doing the same thing, just for each type.
>
> Therefore I only created a single SchemaService for new CXF REST Service, capable of handling all three kinds. To distinguish with type of Schema should be handled (e.g. returned for a list operation) I created a new enum SchemaType.
>
> The topic to discuss however is, that in org.apache.syncope.common.types there is already a class named SchemaType containing data types for (user, role, membership) schema values (e.g. String, Long, Date, ...). My proposal would be to rename existing SchemaType class to EntitySchemaType (similar to EntityViolationType) and move SchemaType currently included in SchemaService Interface to org.apache.syncope.common.types.SchemaType.
>
> Any objections?
>
> Best regards.
> Jan
>
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

RE: [DISCUSS] SchemaType and SchemaService

Posted by Andrei Shakirin <as...@talend.com>.
> None if you take care in the code that AttirbutableType can also be
> MEMBERSHIP in general while in the workflow context this is naturally
> meaningless.

Sure, it will BadRequest in case of MEMBERSHIP.

Andrei.

> -----Original Message-----
> From: Francesco Chicchiriccò [mailto:ilgrosso@apache.org]
> Sent: Donnerstag, 31. Januar 2013 11:48
> To: dev@syncope.apache.org
> Subject: Re: [DISCUSS] SchemaType and SchemaService
> 
> On 31/01/2013 11:30, Andrei Shakirin wrote:
> > Hi,
> >
> > Related topic: I going to use AttributableType in WorkflowService instead
> strings "user" and "role".
> > Any objections?
> 
> None if you take care in the code that AttirbutableType can also be
> MEMBERSHIP in general while in the workflow context this is naturally
> meaningless.
> 
> Regards.
> 
> --
> Francesco Chicchiriccò
> 
> ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
> http://people.apache.org/~ilgrosso/


Re: [DISCUSS] SchemaType and SchemaService

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 31/01/2013 11:30, Andrei Shakirin wrote:
> Hi,
>
> Related topic: I going to use AttributableType in WorkflowService instead strings "user" and "role".
> Any objections?

None if you take care in the code that AttirbutableType can also be 
MEMBERSHIP in general while in the workflow context this is naturally 
meaningless.

Regards.

-- 
Francesco Chicchiriccò

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


RE: [DISCUSS] SchemaType and SchemaService

Posted by Andrei Shakirin <as...@talend.com>.
Hi,

Related topic: I going to use AttributableType in WorkflowService instead strings "user" and "role".
Any objections?

Regards,
Andrei.

> -----Original Message-----
> From: Jan Bernhardt [mailto:jbernhardt@talend.com]
> Sent: Donnerstag, 31. Januar 2013 09:58
> To: dev@syncope.apache.org
> Subject: [DISCUSS] SchemaType and SchemaService
> 
> Hi Syncoper,
> 
> We know three different schema types in syncope "normal Schema",
> "derived Schema" and "virtual Schema". In Spring REST Interface these
> schemas are mapped to three different controllers which are basically doing
> the same thing, just for each type.
> 
> Therefore I only created a single SchemaService for new CXF REST Service,
> capable of handling all three kinds. To distinguish with type of Schema should
> be handled (e.g. returned for a list operation) I created a new enum
> SchemaType.
> 
> The topic to discuss however is, that in org.apache.syncope.common.types
> there is already a class named SchemaType containing data types for (user,
> role, membership) schema values (e.g. String, Long, Date, ...). My proposal
> would be to rename existing SchemaType class to EntitySchemaType (similar
> to EntityViolationType) and move SchemaType currently included in
> SchemaService Interface to
> org.apache.syncope.common.types.SchemaType.
> 
> Any objections?
> 
> Best regards.
> Jan