I have few questions on this API?
Why are we using a type Object as credential? Can't we make it better typed?
If you are taking an object as an input you should check whether that is an
instance of the anticipated type.
You can make the API more readable by declaring it as;
public void updateUser(String userName, Credential oldCredential, Credential
newCredential) throws UserManagerException
/Sanjaya
On Thursday 13 December 2007, Dimuthu Leelarathne wrote:
> Hi all,
>
> I am wrapping WSAS admin functions in a Realm to be used in MashUp.
> I came across this problem when writing the updateUser() method.
>
> public void updateUser(String userName, Object credential) throws
> UserManagerException {
> try {
> UserAdmin admin = new UserAdmin();
> admin.e.editUserPassword(oldPassword, username, password)
> } catch (AxisFault e) {
> throw new UserManagerException(e.getMessage());
> }
>
> }
>
> Please notice the oldPassword field. I think in the UM the following
> method should be changed as follows.
>
> old method
> public void updateUser(String userName, Object credential)
> new method
> public void updateUser(Object oldCredential, String userName, Object
> credential)
>
> Any thoughts?
>
> Regards,
> Dimuthu
>
>
>
> _______________________________________________
> Commons-dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/commons-dev
_______________________________________________
Commons-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/commons-dev