@ Route ( method = HttpMethod . POST , uri = "/{id}" ) public Result updateBundle ( @ Parameter ( "id" ) long id ) { final Bundle bundle = context . getBundle ( id ) ; if ( bundle == null ) { return notFound ( "Bundle " + id + " not found" ) ; } else { return async ( new Callable < Result > ( ) { @ Override public Result call ( ) throws Exception { try { logger ( ) . info ( "Updating bundle {} from {}" , bundle . getSymbolicName ( ) , bundle . getLocation ( ) ) ; bundle . update ( ) ; return ok ( ) ; } catch ( BundleException e ) { logger ( ) . error ( "Cannot update bundle {}" , bundle . getSymbolicName ( ) , e ) ; return badRequest ( e ) ; } } } ) ; } }
Updates the given bundle . The bundle is updated from the installation url .