gov.nasa.pds.registry.resource
Class PackagesResource
java.lang.Object
gov.nasa.pds.registry.resource.PackagesResource
public class PackagesResource
- extends Object
- 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 |
deletePackage(String guid)
Deletes the package with the given guid |
gov.nasa.pds.registry.model.RegistryPackage |
getPackage(String guid)
Retrieves a 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 |
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 |
PackagesResource
public PackagesResource(javax.ws.rs.core.UriInfo uriInfo,
javax.ws.rs.core.Request request,
gov.nasa.pds.registry.service.RegistryService registryService)
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 guid)
- Retrieves a package with the given global identifier.
- Returns:
- the package
deletePackage
public javax.ws.rs.core.Response deletePackage(String guid)
- Deletes the package with the given guid
- Parameters:
guid
- of package
- Returns:
- Response indicating whether the operation succeeded or had an error
Copyright © 2010-2011 Planetary Data System. All Rights Reserved.