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 with the registry service.

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 with the given global identifier.
 gov.nasa.pds.registry.model.Service getService(String guid)
          Retrieves the service with the given global identifier.
 javax.ws.rs.core.Response getServices(Integer start, Integer rows)
          Retrieves all services managed by the registry given a set of filters.
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, String packageGuid)
          Publishes a service to the registry.
 javax.ws.rs.core.Response updateService(String guid, gov.nasa.pds.registry.model.Service service)
          Updates the service and its contained objects with the given global identifier.
 javax.ws.rs.core.Response updateServiceWithPost(String guid, gov.nasa.pds.registry.model.Service service)
          Updates the service and its contained objects with the given global identifier.
 
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,
                                                String packageGuid)
Publishes a service to the registry.

Parameters:
service - to publish to registry
packageGuid - optional package guid which this registry object is a member of
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 global 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 with the given global identifier.

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

updateService

public javax.ws.rs.core.Response updateService(String guid,
                                               gov.nasa.pds.registry.model.Service service)
Updates the service and its contained objects with the given global identifier.

Parameters:
guid - globally unique identifier of the service
service - updates to the service
Returns:
returns an HTTP response that indicates an error or ok

updateServiceWithPost

public javax.ws.rs.core.Response updateServiceWithPost(String guid,
                                                       gov.nasa.pds.registry.model.Service service)
Updates the service and its contained objects with the given global identifier. This method supports clients that can not do a PUT operation.


getServices

public javax.ws.rs.core.Response getServices(Integer start,
                                             Integer rows)
Retrieves all services managed by the registry given a set of filters.


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.