@ RequestMapping ( value = "/api/profile/{profileIdentifier}/clients/{clientUUID}" , method = RequestMethod . POST ) public @ ResponseBody HashMap < String , Object > updateClient ( Model model , @ PathVariable ( "profileIdentifier" ) String profileIdentifier , @ PathVariable ( "clientUUID" ) String clientUUID , @ RequestParam ( required = false ) Boolean active , @ RequestParam ( required = false ) String friendlyName , @ RequestParam ( required = false ) Boolean reset ) throws Exception { Integer profileId = ControllerUtils . convertProfileIdentifier ( profileIdentifier ) ; if ( active != null ) { logger . info ( "Active: {}" , active ) ; clientService . updateActive ( profileId , clientUUID , active ) ; } if ( friendlyName != null ) { clientService . setFriendlyName ( profileId , clientUUID , friendlyName ) ; } if ( reset != null && reset ) { clientService . reset ( profileId , clientUUID ) ; } HashMap < String , Object > valueHash = new HashMap < String , Object > ( ) ; valueHash . put ( "client" , clientService . findClient ( clientUUID , profileId ) ) ; return valueHash ; }
Update properties for a specific client id