gov.nasa.pds.registry.resource
Class LinksResource

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

public class LinksResource
extends Object

This resource is responsible for managing External Links with the registry service. External links are essentially URIs to items that are outside the control of the registry.

Author:
pramirez

Constructor Summary
LinksResource(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 deleteLink(String guid)
          Deletes the external link with the given global identifier.
 javax.ws.rs.core.Response getLink(Integer start, Integer rows)
          Retrieves all external links managed by the registry given a set of filters.
 gov.nasa.pds.registry.model.ExternalLink getLInk(String guid)
          Retrieves the external link with the given global identifier.
protected static URI getLinkUri(gov.nasa.pds.registry.model.ExternalLink link, javax.ws.rs.core.UriInfo uriInfo)
           
 javax.ws.rs.core.Response publishLink(gov.nasa.pds.registry.model.ExternalLink link, String packageGuid)
          Publishes an external link to the registry.
 javax.ws.rs.core.Response updateLink(String guid, gov.nasa.pds.registry.model.ExternalLink link)
          Updates the external link with the given global identifier.
 javax.ws.rs.core.Response updateLinkWithPost(String guid, gov.nasa.pds.registry.model.ExternalLink link)
          Updates the external link 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

LinksResource

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

publishLink

public javax.ws.rs.core.Response publishLink(gov.nasa.pds.registry.model.ExternalLink link,
                                             String packageGuid)
Publishes an external link to the registry.

Parameters:
link - 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

getLInk

public gov.nasa.pds.registry.model.ExternalLink getLInk(String guid)
Retrieves the external link with the given global identifier.

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

deleteLink

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

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

updateLink

public javax.ws.rs.core.Response updateLink(String guid,
                                            gov.nasa.pds.registry.model.ExternalLink link)
Updates the external link with the given global identifier.

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

updateLinkWithPost

public javax.ws.rs.core.Response updateLinkWithPost(String guid,
                                                    gov.nasa.pds.registry.model.ExternalLink link)
Updates the external link with the given global identifier. This method supports clients that can not do a PUT operation.

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

getLink

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


getLinkUri

protected static URI getLinkUri(gov.nasa.pds.registry.model.ExternalLink link,
                                javax.ws.rs.core.UriInfo uriInfo)


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