@POST
    @Path("/{gavc}" + ServerAPI.GET_DOWNLOAD_URL)
    public Response updateDownloadUrl(@Auth final DbCredential credential, @PathParam("gavc") final String gavc, @QueryParam(ServerAPI.URL_PARAM) final String downLoadUrl){
        if(!credential.getRoles().contains(AvailableRoles.DATA_UPDATER)){
            throw new WebApplicationException(Response.status(Response.Status.UNAUTHORIZED).build());
        }

        if(LOG.isInfoEnabled()) {
            LOG.info(String.format("Got an update downloadUrl request [%s] [%s]", gavc, downLoadUrl));
        }

        if(gavc == null || downLoadUrl == null){
            return Response.serverError().status(HttpStatus.NOT_ACCEPTABLE_406).build();
        }

        getArtifactHandler().updateDownLoadUrl(gavc, downLoadUrl);

        return Response.ok("done").build();
    }
@ POST @ Path ( "/{gavc}" + ServerAPI . GET_DOWNLOAD_URL ) public Response updateDownloadUrl ( @ Auth final DbCredential credential , @ PathParam ( "gavc" ) final String gavc , @ QueryParam ( ServerAPI . URL_PARAM ) final String downLoadUrl ) { if ( ! credential . getRoles ( ) . contains ( AvailableRoles . DATA_UPDATER ) ) { throw new WebApplicationException ( Response . status ( Response . Status . UNAUTHORIZED ) . build ( ) ) ; } if ( LOG . isInfoEnabled ( ) ) { LOG . info ( String . format ( "Got an update downloadUrl request [%s] [%s]" , gavc , downLoadUrl ) ) ; } if ( gavc == null || downLoadUrl == null ) { return Response . serverError ( ) . status ( HttpStatus . NOT_ACCEPTABLE_406 ) . build ( ) ; } getArtifactHandler ( ) . updateDownLoadUrl ( gavc , downLoadUrl ) ; return Response . ok ( "done" ) . build ( ) ; }
Update an artifact download url.
This method is call via GET <grapes_url>/artifact/<gavc>/downloadurl?url=<targetUrl>

@param credential DbCredential
@param gavc String
@param downLoadUrl String
@return Response