Esri Geoportal Server
1.0

com.esri.gpt.server.assertion.components
Class AsnResponse

java.lang.Object
  extended by com.esri.gpt.server.assertion.components.AsnResponse

public class AsnResponse
extends Object

Represents an assertion operation response.


Constructor Summary
AsnResponse()
          Default constructor
 
Method Summary
 void exceptionToResponse(AsnContext context, Exception e)
          Generates an exception based operation response.
 void generateFailedResponse(AsnContext context, String message)
          Generates a failed operation response.
 void generateOkResponse(AsnContext context, String message)
          Generates an OK operation response.
 void generateResponse(AsnContext context, AsnProperties body)
          Generates an operation response.
 void generateResponse(AsnContext context, AsnProperty body)
          Generates an operation response.
 String getMimeType()
          Gets the HTTP response MIME type.
 String getOutputFormat()
          Gets the output format.
 AsnProperty getResponseProperty()
          Gets the root property for the response.
 String getResponseString()
          Gets the response string.
 void propertyToResponseString()
          Generates a response string from the active response property
 void setOutputFormat(String outputFormat)
          Sets the HTTP output format (MIME type).
 void setResponseProperty(AsnProperty responseProperty)
          Sets the root property for the response.
 void setResponseString(String response)
          Sets the response string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsnResponse

public AsnResponse()
Default constructor

Method Detail

getMimeType

public String getMimeType()
Gets the HTTP response MIME type.

Returns:
the response MIME type

getOutputFormat

public String getOutputFormat()
Gets the output format.

Returns:
the output format (can be null)

setOutputFormat

public void setOutputFormat(String outputFormat)
Sets the HTTP output format (MIME type).

Parameters:
outputFormat - the output format

getResponseProperty

public AsnProperty getResponseProperty()
Gets the root property for the response.

Returns:
the root response property

setResponseProperty

public void setResponseProperty(AsnProperty responseProperty)
Sets the root property for the response.

Parameters:
responseProperty - the root response property

getResponseString

public String getResponseString()
Gets the response string.

Returns:
the response string (can be null)

setResponseString

public void setResponseString(String response)
Sets the response string.

Parameters:
response - the response string

exceptionToResponse

public void exceptionToResponse(AsnContext context,
                                Exception e)
                         throws IOException
Generates an exception based operation response.

Parameters:
context - the assertion operation context
e - the exception
Throws:
IOException - if an I/O exception occurs

generateFailedResponse

public void generateFailedResponse(AsnContext context,
                                   String message)
                            throws IOException
Generates a failed operation response.

Parameters:
context - the assertion operation context
message - the message (RDF value, can be null)
Throws:
IOException - if an I/O exception occurs

generateOkResponse

public void generateOkResponse(AsnContext context,
                               String message)
                        throws IOException
Generates an OK operation response.

Parameters:
context - the assertion operation context
message - the message (RDF value, can be null)
Throws:
IOException - if an I/O exception occurs

generateResponse

public void generateResponse(AsnContext context,
                             AsnProperty body)
                      throws IOException
Generates an operation response.

Parameters:
context - the assertion operation context
body - a property representing the body of the response
Throws:
IOException - if an I/O exception occurs

generateResponse

public void generateResponse(AsnContext context,
                             AsnProperties body)
                      throws IOException
Generates an operation response.

Parameters:
context - the assertion operation context
body - a properties representing the body of the response
Throws:
IOException - if an I/O exception occurs

propertyToResponseString

public void propertyToResponseString()
                              throws IOException
Generates a response string from the active response property

Throws:
IOException - if an I/O exception occurs

Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.