class ServerRestService {

    @GET
    @Path( "/{host_id}/bootoptions" )
    @Produces( "application/json" )
    public SystemBootOptions getSystemBootOptions( @PathParam( "host_id" ) String host_id )
        throws HMSRestException
    {

        if ( !serverConnector.getNodeMap().containsKey( host_id ) )
            throw new HMSRestException( Status.NOT_FOUND.getStatusCode(), "Invalid Request",
                                        "Can't find host with id " + host_id );
        else
        {
            ServerNode node = (ServerNode) serverConnector.getNodeMap().get( host_id );

            try
            {
                executeTask( node, TaskType.GetSystemBootOptions );
            }
            catch ( HmsResourceBusyException e )
            {
                throw new HMSRestException( Status.INTERNAL_SERVER_ERROR.getStatusCode(), Constants.RESOURCE_BUSY,
                                            e.getMessage() );
            }
            catch ( HmsException e )
            {
                if ( e instanceof HMSRestException )
                {
                    throw e;
                }
                else
                {
                    throw new HMSRestException( Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Server Error",
                                                e.getMessage() );
                }
            }
            catch ( Exception e )
            {
                throw new HMSRestException( Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Server Error",
                                            e.getMessage() );
            }

            return node.getSytemBootOptions();
        }
    }

}