info.sswap.http.rest
Class MakePDG

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

public class MakePDG
extends RESTBase

A RESTful resource that handles requests to create a PDG.

Author:
Blazej Bulka

Field Summary
private static java.lang.String DESCRIPTION_RESOURCE
           
private static java.lang.String JSON_SCHEMA_RESOURCE
           
private static org.apache.log4j.Logger LOGGER
          The logger for the makePDG task.
 
Constructor Summary
MakePDG()
           
 
Method Summary
protected  info.sswap.api.model.PDG doMakePDG(java.lang.String jsonData, java.util.Map<java.lang.String,java.lang.String> prefixOverride)
          Creates a PDG from JSON data.
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
 javax.ws.rs.core.Response makePDG(javax.servlet.http.HttpServletRequest request)
          Creates a PDG when a POST request is invoked on this resource.
 javax.ws.rs.core.Response makePDG(java.lang.String uploadedJson, java.util.Map<java.lang.String,java.lang.String> prefixOverride)
           
 
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
The logger for the makePDG task.


DESCRIPTION_RESOURCE

private static final java.lang.String DESCRIPTION_RESOURCE
See Also:
Constant Field Values

JSON_SCHEMA_RESOURCE

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

MakePDG

public MakePDG()
Method Detail

makePDG

public javax.ws.rs.core.Response makePDG(@Context
                                         javax.servlet.http.HttpServletRequest request)
Creates a PDG when a POST request is invoked on this resource.

Parameters:
request - the HttpServletRequest object
Returns:
the response object

makePDG

public javax.ws.rs.core.Response makePDG(java.lang.String uploadedJson,
                                         java.util.Map<java.lang.String,java.lang.String> prefixOverride)

doMakePDG

protected info.sswap.api.model.PDG doMakePDG(java.lang.String jsonData,
                                             java.util.Map<java.lang.String,java.lang.String> prefixOverride)
                                      throws java.lang.IllegalArgumentException
Creates a PDG from JSON data.

Parameters:
jsonData - the data describing the PDG.
Returns:
a created PDG
Throws:
java.lang.IllegalArgumentException

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


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