@ApiOperation( "Check if a given store exists" )
    @ApiResponses( { @ApiResponse( code = 200, message = "The store exists" ),
                           @ApiResponse( code = 404, message = "The store doesn't exist" ) } )
    @Path( "/{name}" )
    @HEAD
    public Response exists( final @PathParam( "packageType" ) String packageType,
                            final @ApiParam( allowableValues = "hosted,group,remote", required = true )
                            @PathParam( "type" ) String type,
                            @ApiParam( required = true ) @PathParam( "name" ) final String name )
    {
        Response response;
        final StoreType st = StoreType.get( type );

        logger.info( "Checking for existence of: {}:{}:{}", packageType, st, name );

        if ( adminController.exists( new StoreKey( packageType, st, name ) ) )
        {

            logger.info( "returning OK" );
            response = Response.ok().build();
        }
        else
        {
            logger.info( "Returning NOT FOUND" );
            response = Response.status( Status.NOT_FOUND ).build();
        }
        return response;
    }
@ApiOperation( "Check if a given store exists" )
    @ApiResponses( { @ApiResponse( code = 200, message = "The store exists" ),
                           @ApiResponse( code = 404, message = "The store doesn't exist" ) } )
    @Path( "/{name}" )
    @HEAD
    public Response exists( final @PathParam( "packageType" ) String packageType,
                            final @ApiParam( allowableValues = "hosted,group,remote", required = true )
                            @PathParam( "type" ) String type,
                            @ApiParam( required = true ) @PathParam( "name" ) final String name )
    {
        Response response;
        final StoreType st = StoreType.get( type );

        logger.info( "Checking for existence of: {}:{}:{}", packageType, st, name );

        if ( adminController.exists( new StoreKey( packageType, st, name ) ) )
        {

            logger.info( "returning OK" );
            response = Response.ok().build();
        }
        else
        {
            logger.info( "Returning NOT FOUND" );
            response = Response.status( Status.NOT_FOUND ).build();
        }
        return response;
    }
@ ApiOperation ( "Check if a given store exists" ) @ ApiResponses ( { @ ApiResponse ( code = 200 , message = "The store exists" ) , @ ApiResponse ( code = 404 , message = "The store doesn't exist" ) } ) @ Path ( "/{name}" ) @ HEAD public Response exists ( final @ PathParam ( "packageType" ) String packageType , final @ ApiParam ( allowableValues = "hosted,group,remote" , required = true ) @ PathParam ( "type" ) String type , @ ApiParam ( required = true ) @ PathParam ( "name" ) final String name ) { Response response ; final StoreType st = StoreType . get ( type ) ; logger . info ( "Checking for existence of: {}:{}:{}" , packageType , st , name ) ; if ( adminController . exists ( new StoreKey ( packageType , st , name ) ) ) { logger . info ( "returning OK" ) ; response = Response . ok ( ) . build ( ) ; } else { logger . info ( "Returning NOT FOUND" ) ; response = Response . status ( Status . NOT_FOUND ) . build ( ) ; } return response ; }
private HttpServletRequest request;
private HttpServletRequest request ;