info.sswap.http.rest
Class RootResource

java.lang.Object
  extended by info.sswap.http.rest.RESTBase
      extended by info.sswap.http.rest.RootResource

public class RootResource
extends RESTBase

Root RESTful resource. It sends a welcome message to the client that describes how SSWAP HTTP/JSON API could be used.

Author:
Blazej Bulka

Field Summary
private static java.lang.String DESCRIPTION_RESOURCE
          The file where the welcome message for this resource is stored.
private static java.lang.String JSON_SCHEMA_RESOURCE
           
private static org.apache.log4j.Logger LOGGER
           
 
Constructor Summary
RootResource()
           
 
Method Summary
 javax.ws.rs.core.Response forward(javax.servlet.http.HttpServletRequest request)
           
protected  java.lang.String getDescriptionResource()
          Returns the name of the resource (in the classpath) that contains the human-readable description about this RESTful interface
protected  java.lang.String getJSONSchemaResource()
          Returns the name of the resource (in the classpath) that contains the JSON schema for the document acceptable by this resource
 
Methods inherited from class info.sswap.http.rest.RESTBase
checkForUndefinedNS, clearLastForwardInTesting, displayDescription, displayJSONSchema, extractPrefixOverride, forward, getLastForwardInTesting, needsForwarding, rebuildPrefixOverrideQueryString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER

private static final org.apache.log4j.Logger LOGGER

DESCRIPTION_RESOURCE

private static final java.lang.String DESCRIPTION_RESOURCE
The file where the welcome message for this resource is stored.

See Also:
Constant Field Values

JSON_SCHEMA_RESOURCE

private static final java.lang.String JSON_SCHEMA_RESOURCE
See Also:
Constant Field Values
Constructor Detail

RootResource

public RootResource()
Method Detail

getDescriptionResource

protected java.lang.String getDescriptionResource()
Description copied from class: RESTBase
Returns the name of the resource (in the classpath) that contains the human-readable description about this RESTful interface

Specified by:
getDescriptionResource in class RESTBase
Returns:
the name of the resource (in the class path) that is a plain text file with the description

getJSONSchemaResource

protected java.lang.String getJSONSchemaResource()
Description copied from class: RESTBase
Returns the name of the resource (in the classpath) that contains the JSON schema for the document acceptable by this resource

Specified by:
getJSONSchemaResource in class RESTBase
Returns:
the name of the resource (in the classpath) that is a JSON schema file

forward

public javax.ws.rs.core.Response forward(@Context
                                         javax.servlet.http.HttpServletRequest request)


Copyright (c) 2010, iPlant Collaborative, University of Arizona, Cold Spring Harbor Laboratories, University of Texas at Austin.