On 20/03/2012 18:11, Colm O hEigeartaigh wrote:
Hi all,

Some more questions, this time about the REST Schema API:

1) Is it possible to list or read derived or virtual schema attributes? For example, 
"schema/user/list" just returns a collection of SchemaTO objects that represent 
the user attributes, and not the user derived or virtual attributes.

There must be a way since the console shows them up, and console is a REST client like anything else ;-)

Take a look at DerivedSchemaController / DerivedSchemaTestITCase and VirtualSchemaController / VirtualSchemaTestITCase for more info.

2) It does not appear possible to search for a schema attribute - is this 
correct?

Generally speaking, search operations were only implemented for users, so far. While I do believe the search can be useful for some other entities (like roles), I am not sure that searching through defined schemas can be equally useful.

3) The update method to update a Schema takes a "SchemaTO" object, whereas I would have 
expected it to take a "SchemaMod" object for consistency with users and roles. Is there a 
reason why it doesn't follow the same convention?

*Mod transfer objects are used only for roles, users and memberships, i.e. for classes extending AbstractAttributable (or AbstractAttributableTO).
Hence, UserController and RoleController deal with UserMod and RoleMod.

Any other REST controller takes only *TO, even for update().

*Mod were introduced because in a typical IdM deployment users and roles will be the "main" entities to deal with, including many attributes - each one potentially with many values, with main purpose of keeping the payload as small as possible.

Anyway, thanks to AttributableOperations utility class, it shouldn't be hard to have both update(UserMod) and update(UserTO) / update (RoleMod) and update(RoleTO).

Regards.

--
Francesco Chicchiriccò

Apache Cocoon PMC and Apache Syncope PPMC Member
http://people.apache.org/~ilgrosso/

Reply via email to