gov.nasa.pds.registry.resource
Class ServicesResource

java.lang.Object
  extended by gov.nasa.pds.registry.resource.ServicesResource

public class ServicesResource
extends Object

This resource is responsible for managing Service descriptions.

Author:
pramirez

Constructor Summary
ServicesResource(javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.Request request, gov.nasa.pds.registry.service.RegistryService registryService)
           
 
Method Summary
 javax.ws.rs.core.Response deleteService(String guid)
          Deletes the service from the registry.
 gov.nasa.pds.registry.model.Service getService(String guid)
          Retrieves the service with the given identifier.
 javax.ws.rs.core.Response getServices(Integer start, Integer rows)
           
protected static URI getServiceUri(gov.nasa.pds.registry.model.Service service, javax.ws.rs.core.UriInfo uriInfo)
           
 javax.ws.rs.core.Response publishService(gov.nasa.pds.registry.model.Service service)
          Publishes a service to the registry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServicesResource

public ServicesResource(javax.ws.rs.core.UriInfo uriInfo,
                        javax.ws.rs.core.Request request,
                        gov.nasa.pds.registry.service.RegistryService registryService)
Method Detail

publishService

public javax.ws.rs.core.Response publishService(gov.nasa.pds.registry.model.Service service)
Publishes a service to the registry.

Parameters:
service - to publish
Returns:
a HTTP response that indicates an error or the location of the created association and its guid

getService

public gov.nasa.pds.registry.model.Service getService(String guid)
Retrieves the service with the given identifier.

Parameters:
guid - globally unique identifier of service
Returns:
the matching service

deleteService

public javax.ws.rs.core.Response deleteService(String guid)
Deletes the service from the registry.

Parameters:
guid - globally unique identifier of service
Returns:
Response indicating whether the operation succeeded or an error

getServices

public javax.ws.rs.core.Response getServices(Integer start,
                                             Integer rows)

getServiceUri

protected static URI getServiceUri(gov.nasa.pds.registry.model.Service service,
                                   javax.ws.rs.core.UriInfo uriInfo)


Copyright © 2010-2011 Planetary Data System. All Rights Reserved.