public void promote ( ) { URL url = VERSION_URL_TEMPLATE . build ( this . getAPI ( ) . getBaseURL ( ) , this . fileID , "current" ) ; JsonObject jsonObject = new JsonObject ( ) ; jsonObject . add ( "type" , "file_version" ) ; jsonObject . add ( "id" , this . getID ( ) ) ; BoxJSONRequest request = new BoxJSONRequest ( this . getAPI ( ) , url , "POST" ) ; request . setBody ( jsonObject . toString ( ) ) ; BoxJSONResponse response = ( BoxJSONResponse ) request . send ( ) ; this . parseJSON ( JsonObject . readFrom ( response . getJSON ( ) ) ) ; }
Promotes this version of the file to be the latest version .