org.overlord.sramp.atom.services
Class QueryResource

java.lang.Object
  extended by org.overlord.sramp.atom.services.AbstractFeedResource
      extended by org.overlord.sramp.atom.services.QueryResource

public class QueryResource
extends AbstractFeedResource

Implementation of the S-RAMP query features defined in the Atom Binding document.


Constructor Summary
QueryResource()
          Constructor.
 
Method Summary
protected  org.jboss.resteasy.plugins.providers.atom.Feed query(String query, Integer page, Integer pageSize, String orderBy, Boolean ascending, Set<String> propNames)
          Common method that performs the query and returns the atom Feed.
 org.jboss.resteasy.plugins.providers.atom.Feed queryFromGet(javax.ws.rs.core.UriInfo uri, String query, Integer page, Integer pageSize, String orderBy, Boolean asc, Set<String> propNames)
          Do an s-ramp query from a GET style request.
 org.jboss.resteasy.plugins.providers.atom.Feed queryFromPost(org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput input)
          Handles clients that POST the query to the /s-ramp endpoint.
 
Methods inherited from class org.overlord.sramp.atom.services.AbstractFeedResource
createArtifactFeed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryResource

public QueryResource()
Constructor.

Method Detail

queryFromGet

public org.jboss.resteasy.plugins.providers.atom.Feed queryFromGet(@Context
                                                                   javax.ws.rs.core.UriInfo uri,
                                                                   String query,
                                                                   Integer page,
                                                                   Integer pageSize,
                                                                   String orderBy,
                                                                   Boolean asc,
                                                                   Set<String> propNames)
                                                            throws SrampAtomException
Do an s-ramp query from a GET style request.

Parameters:
uri -
query -
page -
pageSize -
orderBy -
asc -
Throws:
SrampAtomException

queryFromPost

public org.jboss.resteasy.plugins.providers.atom.Feed queryFromPost(org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput input)
                                                             throws SrampAtomException
Handles clients that POST the query to the /s-ramp endpoint.

Parameters:
input - the multipart form data
Throws:
SrampAtomException

query

protected org.jboss.resteasy.plugins.providers.atom.Feed query(String query,
                                                               Integer page,
                                                               Integer pageSize,
                                                               String orderBy,
                                                               Boolean ascending,
                                                               Set<String> propNames)
                                                        throws SrampAtomException
Common method that performs the query and returns the atom Feed.

Parameters:
query - the x-path formatted s-ramp query
page - which page in the results should be returned
pageSize - the size of each page of results
orderBy - the property to sort the results by
ascending - the sort direction
propNames - the set of s-ramp property names - the extra properties that the query should return as part of the Feed
Returns:
an Atom Feed
Throws:
SrampAtomException


Copyright © 2011-2012 JBoss, a division of Red Hat. All Rights Reserved.