gov.nasa.pds.registry.resource
Class ExternalIdentifiersResource

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

public class ExternalIdentifiersResource
extends Object

This resource is responsible for managing External Identifiers with the registry service.

Author:
pramirez

Constructor Summary
ExternalIdentifiersResource(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 deleteIdentifier(String guid)
          Deletes the external identifier with the given global identifier.
 gov.nasa.pds.registry.model.ExternalIdentifier getIdentifier(String guid)
          Retrieves an external identifier with the given global identifier.
protected static URI getIdentifierUri(gov.nasa.pds.registry.model.ExternalIdentifier identifier, javax.ws.rs.core.UriInfo uriInfo)
           
 javax.ws.rs.core.Response publishIdentifier(gov.nasa.pds.registry.model.ExternalIdentifier identifier, String packageGuid)
          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

ExternalIdentifiersResource

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

publishIdentifier

public javax.ws.rs.core.Response publishIdentifier(gov.nasa.pds.registry.model.ExternalIdentifier identifier,
                                                   String packageGuid)
Publishes a package to the registry. Publishing includes validation, assigning an internal version, validating the submission, and notification.

Parameters:
identifier - to publish to registry
packageGuid - optional package guid which this registry object is a member of
Returns:
returns an HTTP response that indicates an error or the location of the created identifier and its guid

getIdentifierUri

protected static URI getIdentifierUri(gov.nasa.pds.registry.model.ExternalIdentifier identifier,
                                      javax.ws.rs.core.UriInfo uriInfo)

getIdentifier

public gov.nasa.pds.registry.model.ExternalIdentifier getIdentifier(String guid)
Retrieves an external identifier with the given global identifier.

Returns:
the package

deleteIdentifier

public javax.ws.rs.core.Response deleteIdentifier(String guid)
Deletes the external identifier with the given global identifier.

Parameters:
guid - of external identifier
Returns:
Response indicating whether the operation succeeded or had an error


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