/** * @see API: <a href= * "http://community.abiquo.com/display/ABI20/User+resource#Userresource-Updatesanexistinguser" * > http://community.abiquo.com/display/ABI20/User+resource#Userresource * -Updatesanexistinguser </a> */ public void update() { // update role link (if exists) if (role != null) { target.searchLink("role").setHref(role.unwrap().getEditLink().getHref()); } target = context.getApi().getEnterpriseApi().updateUser(target); }
/** * @see API: <a href= * "http://community.abiquo.com/display/ABI20/User+resource#Userresource-Createanewuser" > * http://community.abiquo.com/display/ABI20/User+resource#Userresource -Createanewuser</a> */ public void save() { // set role link target.addLink(new RESTLink("role", role.unwrap().getEditLink().getHref())); target = context.getApi().getEnterpriseApi().createUser(enterprise.unwrap(), target); }