Team Elements

Status: Caution PostgreSQL Open Source Initiative (OSI) Java
PUBLIC PROFILE

Back to topics

Feedback (Suggestions, comments, etc.)

API

11. 5/18/2007 12:23 PM EDT (edited)
Default user photo

By simon s

I have a problem with the UserList. I added UserSearchBean but the following Xml Request always returns all Users and not only the one specified by the email address:
...
<transaction id="2">
<meta>
<property>username</property>
<property>id</property>
</meta>
<userList action="select">
<searchCriteria>
<email>user@rightmail.com</email>
</searchCriteria>
</userList>
</transaction>
...

12. 5/23/2007 7:27 AM EDT
Default user photo

By simon s

Any suggestions on that?

13. 5/23/2007 8:42 AM EDT
Default user photo

By Matt Rajkowski

Concursive Corporation
Product Design

airplane-icon-100x100.png

After looking at the UserList class, I see that the UserSearchBean class is a property of UserList. So, to nest properties, a small tweak was made to the api (and will appear in the next 3.3 beta)... this tweak allows using a "." to separate the classes and is consistent with how the MVC framework that TE uses sets HTML forms and nested object properties.

The resulting will work...

<transaction id="2">
<meta>
<property>username</property>
<property>id</property>
</meta>
<userList action="select">
<searchCriteria.email>@rightmail.com</searchCriteria.email>
</userList>
</transaction>

Since search criteria uses wildcard searching, all users with @rightmail.com will be returned, here is the actual output:

<?xml version="1.0" encoding="UTF-8"?>
<team_elements>
<response id="2">
<status>0</status>
<errorText/>
<recordSet count="3" name="userList">
<record>
<username>test1@rightmail.com</username>
<id>77</id>
</record>
<record>
<username>test2@rightmail.com</username>
<id>38</id>
</record>
<record>
<username>test3@rightmail.com</username>
<id>5087</id>
</record>
</recordSet>
</response>
</team_elements>

For security reasons, will you need a feature so that users using your plug-in will need to issue a username/password for authentication, without having access to the password list? TE has access to this framework feature change but hasn't implemented it yet. If you think that sounds right then I'll push to have it added.

13 results found