Hi,
my recent commit [3] for SYNCOPE-425 should have applied all applicable RESTful best practices plus most of what discussed below: see issue comments for more details.

Please double check the changes I've made to services and let me know if you still found any anomaly.

Regards.

On 16/10/2013 10:22, Francesco Chicchiriccò wrote:
Hi,
replying to this old thread, trying to catch some interest about this topic.

I'd like to create an issue for improving the current UserService on trunk [2] with the following modifications:

1. add a couple of 'resolve' methods which allows to obtain an user id from its username and vice versa:
 1a. GET /{userId}/username
 1b. GET /{username}/userId

2. remove any {username} related method

3. add PUT /status/{userId} with UserStatusMod argument, where UserStatusMod is a new transfer object encapsulating any status change request (possibly not limited to current 'activate', 'suspend', 'reactivate').

4. remove 'activate', 'suspend', 'reactivate' methods

5. (side change) remove UserTO#setStatus in order to avoid confusion on this topic (status cannot be directly set when creating or updating user, it's up to workflow definition); internal methods will use reflection for this purpose

WDYT?

Regards.

On 07/08/2013 09:24, Francesco Chicchiriccò wrote:
Hi all,
[1] reports that "User Service Interface in Version 1.1.0 is still not applying some major RESTful best practices. Therefore refactoring for release >= 1.2.0 is most likely."

Does anyone remember what is still missing? Shall we restart such discussion?

Regards.

[1] https://cwiki.apache.org/confluence/display/SYNCOPE/REST+API+upgrade#RESTAPIupgrade-UserService
[2] https://svn.apache.org/repos/asf/syncope/trunk/common/src/main/java/org/apache/syncope/common/services/UserService.java

[3] http://svn.apache.org/r1537047

--
Francesco Chicchiriccò

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

Reply via email to