gov.grants.apply.ws.production
Class GetApplicationProdModeProcessor

java.lang.Object
  extended bygov.grants.apply.ws.production.GetApplicationProdModeProcessor
All Implemented Interfaces:
IGetApplicationProcessor

public final class GetApplicationProdModeProcessor
extends java.lang.Object
implements IGetApplicationProcessor

Author:
Grants.gov WebServices Team Process the GetApplication web service request using the GGWSWrapper interface into the Grants.gov server.

Field Summary
 
Fields inherited from interface gov.grants.apply.ws.IGetApplicationProcessor
DEFAULT_ENCODING_TYPE, DOT_XML_EXT, XML_CONTENT_TYPE
 
Constructor Summary
GetApplicationProdModeProcessor()
           
 
Method Summary
 gov.grants.apply.WebServices.AgencyIntegrationServices_V1_0.GetApplicationResponse process(gov.grants.apply.WebServices.AgencyIntegrationServices_V1_0.GetApplicationRequest request)
          The GGWSWrapper class returns a weird Map object back as the result of the getApplication invocation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetApplicationProdModeProcessor

public GetApplicationProdModeProcessor()
Method Detail

process

public gov.grants.apply.WebServices.AgencyIntegrationServices_V1_0.GetApplicationResponse process(gov.grants.apply.WebServices.AgencyIntegrationServices_V1_0.GetApplicationRequest request)
                                                                                           throws ProcessorException
The GGWSWrapper class returns a weird Map object back as the result of the getApplication invocation. The grant application XML is indexed with the GGWSWrapper.GRANT_APPLICATION_XML_KEY key. The rest of the map holds a series of attachments. The weirdness is in how the attachments are represented: the key to an attachment is a String array that holds the contentID and mimeType information as its zeroth and first elements, respectively, the value gotten by this key is a byte array that is the attachment file. You cannot ask the Map for an attachment unless you form a String array key with the contentID and mimeType (hopefully, the Strings are externalized). Since we won't have that information, you are forced to iterate thru the set of Map Entries. Basically, we're going to treat the Map as a List and the key/value pairs as an Object that holds two Strings and a byte array.

Specified by:
process in interface IGetApplicationProcessor
Parameters:
request - The GetApplication web service request
Returns:
A null reference since we are setting the SOAP response manually.
Throws:
ProcessorException - When the request could not be serviced.