gov.nasa.pds.registry.resource
Class PackagesResource

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

public class PackagesResource
extends Object

This resource is responsible for managing Packages with the registry service.

Author:
pramirez

Constructor Summary
PackagesResource(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 changeStatusOfPackageMembers(String packageGuid, gov.nasa.pds.registry.model.ObjectAction action)
          Updates the status of all the members of the package with the given global identifier.
 javax.ws.rs.core.Response deletePackage(String packageGuid)
          Deletes the package with the given global identifier.
 javax.ws.rs.core.Response deletePackageMembers(String packageGuid)
          Deletes all the members of a package with the given global identifier.
 gov.nasa.pds.registry.model.RegistryPackage getPackage(String packageGuid)
          Retrieves the package with the given global identifier.
protected static URI getPackageUri(gov.nasa.pds.registry.model.RegistryPackage registryPackage, javax.ws.rs.core.UriInfo uriInfo)
           
 javax.ws.rs.core.Response getServices(Integer start, Integer rows)
          Retrieves all packages managed by the registry given a set of filters.
 javax.ws.rs.core.Response publishPackage(gov.nasa.pds.registry.model.RegistryPackage registryPackage)
          Publishes a package to the registry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PackagesResource

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

publishPackage

public javax.ws.rs.core.Response publishPackage(gov.nasa.pds.registry.model.RegistryPackage registryPackage)
Publishes a package to the registry. Publishing includes validation, assigning an internal version, validating the submission, and notification.

Parameters:
registryPackage - to publish
Returns:
returns an HTTP response that indicates an error or the location of the created package and its guid

getPackageUri

protected static URI getPackageUri(gov.nasa.pds.registry.model.RegistryPackage registryPackage,
                                   javax.ws.rs.core.UriInfo uriInfo)

getPackage

public gov.nasa.pds.registry.model.RegistryPackage getPackage(String packageGuid)
Retrieves the package with the given global identifier.

Returns:
the package

deletePackage

public javax.ws.rs.core.Response deletePackage(String packageGuid)
Deletes the package with the given global identifier.

Parameters:
packageGuid - of package
Returns:
Response indicating whether the operation succeeded or had an error

deletePackageMembers

public javax.ws.rs.core.Response deletePackageMembers(String packageGuid)
Deletes all the members of a package with the given global identifier.

Parameters:
packageGuid - unique identifier of package to look up members of

changeStatusOfPackageMembers

public javax.ws.rs.core.Response changeStatusOfPackageMembers(String packageGuid,
                                                              gov.nasa.pds.registry.model.ObjectAction action)
Updates the status of all the members of the package with the given global identifier.

Parameters:
packageGuid - unique identifier of package to look up members of
action - to take on all members which will result in an update of status ObjectAction

getServices

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



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