@Path(value="/queryapi")
@Produces(value={"application/xml","application/json"})
public class SavedQueryResource
extends Object
| Constructor and Description |
|---|
SavedQueryResource() |
| Modifier and Type | Method and Description |
|---|---|
ResourceModifiedResponse |
create(LensSessionHandle sessionid,
SavedQuery savedQuery,
org.glassfish.grizzly.http.server.Response response)
Creates a new saved query.
|
ResourceModifiedResponse |
deleteById(LensSessionHandle sessionid,
long id)
Deletes the saved query with the given id.
|
SavedQuery |
getByID(LensSessionHandle sessionid,
long id)
Gets the saved query with the given id.
|
ListResponse |
getList(LensSessionHandle sessionid,
javax.ws.rs.core.UriInfo info,
int start,
String count)
Gets a list of saved queries matching the criteria (url parameters)
windowed by count and start.
|
String |
getMessage() |
ParameterParserResponse |
getParameters(LensSessionHandle sessionid,
String query)
Parses the query and returns parameters that are found in the query.
|
LensAPIResult<QueryHandle> |
run(long id,
javax.ws.rs.core.UriInfo info,
LensSessionHandle sessionid,
LensConf conf)
Runs the saved query with the given id and returns a query handle.
|
ResourceModifiedResponse |
update(LensSessionHandle sessionid,
long id,
SavedQuery savedQuery,
org.glassfish.grizzly.http.server.Response response)
Updates the saved query {id} with the new payload.
|
@GET @Path(value="/savedqueries/health") @Produces(value="text/plain") public String getMessage()
@GET @Path(value="/savedqueries") @Consumes(value="application/x-www-form-urlencoded") public ListResponse getList(@QueryParam(value="sessionid") LensSessionHandle sessionid, @Context javax.ws.rs.core.UriInfo info, @DefaultValue(value="0") @QueryParam(value="start") int start, @QueryParam(value="count") String count) throws LensException
sessionid - The sessionid in which user is workinginfo - URI context injected for query parametersstart - Offset to start from the search resultcount - Number of records to fetch from startListResponse ListResponse objectLensException@GET
@Path(value="/savedqueries/{id}")
public SavedQuery getByID(@QueryParam(value="sessionid")
LensSessionHandle sessionid,
@PathParam(value="id")
long id)
throws LensException
sessionid - The sessionid in which user is workingid - id of the saved querySavedQuery SavedQuery objectLensException@DELETE
@Path(value="/savedqueries/{id}")
public ResourceModifiedResponse deleteById(@QueryParam(value="sessionid")
LensSessionHandle sessionid,
@PathParam(value="id")
long id)
throws LensException
sessionid - The sessionid in which user is workingid - id of the saved queryResourceModifiedResponse ResourceModifiedResponse objectLensException@POST
@Path(value="/savedqueries")
@Consumes(value={"application/xml","application/json"})
public ResourceModifiedResponse create(@QueryParam(value="sessionid")
LensSessionHandle sessionid,
SavedQuery savedQuery,
@Context
org.glassfish.grizzly.http.server.Response response)
throws LensException,
IOException
sessionid - The sessionid in which user is workingsavedQuery - Saved query objectresponse - Injected response context objectResourceModifiedResponse ResourceModifiedResponse objectLensExceptionIOException@PUT
@Path(value="/savedqueries/{id}")
@Consumes(value={"application/xml","application/json"})
public ResourceModifiedResponse update(@QueryParam(value="sessionid")
LensSessionHandle sessionid,
@PathParam(value="id")
long id,
SavedQuery savedQuery,
@Context
org.glassfish.grizzly.http.server.Response response)
throws LensException,
IOException
sessionid - The sessionid in which user is workingsavedQuery - Saved query objectresponse - Injected response context objectResourceModifiedResponse ResourceModifiedResponse objectLensExceptionIOException@POST @Path(value="/savedqueries/parameters") public ParameterParserResponse getParameters(@QueryParam(value="sessionid") LensSessionHandle sessionid, String query)
sessionid - The sessionid in which user is workingquery - The HQL queryParameterParserResponse ParameterParserResponse object@POST
@Path(value="/savedqueries/{id}")
public LensAPIResult<QueryHandle> run(@PathParam(value="id")
long id,
@Context
javax.ws.rs.core.UriInfo info,
LensSessionHandle sessionid,
LensConf conf)
throws LensException
id - id of the saved queryinfo - Injected UriInfo context objectsessionid - The sessionid in which user is workingconf - Lens configuration overrides for the queryLensExceptionCopyright © 2014–2018 Apache Software Foundation. All rights reserved.