gov.nasa.pds.registry.server.connection
Class ConnectionManager

java.lang.Object
  extended by gov.nasa.pds.registry.server.connection.ConnectionManager

public class ConnectionManager
extends Object

Manager to send and receive info from remote registry service. Note that connection to localhost is currently hard wired in.

Author:
jagander

Field Summary
static String DEFAULT_SERVICE_ENDPOINT
          Default location of service endpoint
static Properties props
          Instance of applicaiton properties
static String PROPS_NAME
          Name of properties file that contains override for service endpoint
 
Constructor Summary
ConnectionManager()
           
 
Method Summary
static List<ViewAssociation> getAssociations(gov.nasa.pds.registry.query.AssociationQuery query)
           
static List<ViewAssociation> getAssociations(gov.nasa.pds.registry.query.AssociationQuery query, Integer start, Integer numResults)
           
static List<ViewAssociation> getAssociations(String lid, String userVersion, Integer start, Integer numResults)
           
static ViewProducts getProducts()
          Get products starting from the first record, with no filtering, the default sort and the default number of records.
static ViewProducts getProducts(Integer start)
          Get products starting from the given record number, with no filtering, the default sort and the default number of records.
static ViewProducts getProducts(Integer start, Integer numResults)
          Get products starting from the given record number and number of records.
static ViewProducts getProducts(gov.nasa.pds.registry.query.ProductQuery query, Integer start, Integer numResults)
          Retrieve products from remote registry service.
static Properties getProperties()
          Get an instance of the application properties.
static gov.nasa.pds.registry.client.RegistryClient getRegistry()
          Get instance of RegistryClient to work with REST interface of registry.
static StatusInformation getStatus()
           
static void postArtifacts()
           
static void postRevision()
           
static void synch()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SERVICE_ENDPOINT

public static final String DEFAULT_SERVICE_ENDPOINT
Default location of service endpoint

See Also:
Constant Field Values

PROPS_NAME

public static final String PROPS_NAME
Name of properties file that contains override for service endpoint

See Also:
Constant Field Values

props

public static Properties props
Instance of applicaiton properties

Constructor Detail

ConnectionManager

public ConnectionManager()
Method Detail

synch

public static void synch()

getStatus

public static StatusInformation getStatus()

getProducts

public static ViewProducts getProducts()
Get products starting from the first record, with no filtering, the default sort and the default number of records.

See Also:
#getProducts(RegistryQuery, Integer, Integer)

getProducts

public static ViewProducts getProducts(Integer start)
Get products starting from the given record number, with no filtering, the default sort and the default number of records.

Returns:
products from the given start
See Also:
#getProducts(RegistryQuery, Integer, Integer)

getProducts

public static ViewProducts getProducts(Integer start,
                                       Integer numResults)
Get products starting from the given record number and number of records.

Returns:
given number of products from the given start
See Also:
#getProducts(RegistryQuery, Integer, Integer)

getProducts

public static ViewProducts getProducts(gov.nasa.pds.registry.query.ProductQuery query,
                                       Integer start,
                                       Integer numResults)
Retrieve products from remote registry service. Note that this wraps the returned results in a view-only version of the products so that they may be used on the GWT client side.

Parameters:
query - a query object containing filter and search params for retrieving products
start - start index for retrieved results. Defaults to 1.
numResults - number of results to return. Defaults to 20.
Returns:
given number of products from the given start with the given filter conditions

getAssociations

public static List<ViewAssociation> getAssociations(gov.nasa.pds.registry.query.AssociationQuery query)

getAssociations

public static List<ViewAssociation> getAssociations(gov.nasa.pds.registry.query.AssociationQuery query,
                                                    Integer start,
                                                    Integer numResults)

getAssociations

public static List<ViewAssociation> getAssociations(String lid,
                                                    String userVersion,
                                                    Integer start,
                                                    Integer numResults)

postArtifacts

public static void postArtifacts()

postRevision

public static void postRevision()

getRegistry

public static gov.nasa.pds.registry.client.RegistryClient getRegistry()
Get instance of RegistryClient to work with REST interface of registry. Instantiates if necessary.


getProperties

public static Properties getProperties()
Get an instance of the application properties.



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