public void rename ( String newName ) { URL url = FOLDER_INFO_URL_TEMPLATE . build ( this . getAPI ( ) . getBaseURL ( ) , this . getID ( ) ) ; BoxJSONRequest request = new BoxJSONRequest ( this . getAPI ( ) , url , "PUT" ) ; JsonObject updateInfo = new JsonObject ( ) ; updateInfo . add ( "name" , newName ) ; request . setBody ( updateInfo . toString ( ) ) ; BoxJSONResponse response = ( BoxJSONResponse ) request . send ( ) ; response . getJSON ( ) ; }
Renames this folder .