it.eng.spagobi.geo.action
Class GeoAction
java.lang.Object
it.eng.spago.dispatching.service.DefaultRequestContext
it.eng.spago.dispatching.service.DefaultHttpRequestContext
it.eng.spago.dispatching.action.AbstractHttpAction
it.eng.spagobi.geo.action.GeoAction
- All Implemented Interfaces:
- it.eng.spago.dispatching.action.ActionIFace, it.eng.spago.dispatching.service.HttpRequestContextIFace, it.eng.spago.dispatching.service.RequestContextIFace, it.eng.spago.dispatching.service.ServiceIFace, it.eng.spago.init.InitializerIFace, java.io.Serializable
public class GeoAction
- extends it.eng.spago.dispatching.action.AbstractHttpAction
Spago Action which executes the map producing request
- See Also:
- Serialized Form
Method Summary |
static void |
flushFromInputStreamToOutputStream(java.io.InputStream is,
java.io.OutputStream os,
boolean closeStreams)
Given an InputStream as input flushs the content into an OutputStream
and then close the input and output stream. |
void |
service(it.eng.spago.base.SourceBean serviceRequest,
it.eng.spago.base.SourceBean serviceResponse)
Method called automatically by Spago framework when the action is invoked. |
Methods inherited from class it.eng.spago.dispatching.action.AbstractHttpAction |
getActionName, getConfig, init, setActionName |
Methods inherited from class it.eng.spago.dispatching.service.DefaultHttpRequestContext |
freezeHttpResponse, getHttpRequest, getHttpResponse, getServletConfig, isHttpResponseFreezed, setRequestContext, unfreezeHttpResponse |
Methods inherited from class it.eng.spago.dispatching.service.DefaultRequestContext |
getErrorHandler, getRequestContainer, getResponseContainer, getServiceRequest, getServiceResponse |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface it.eng.spago.dispatching.service.RequestContextIFace |
getErrorHandler, getRequestContainer, getResponseContainer, getServiceRequest, getServiceResponse |
GeoAction
public GeoAction()
service
public void service(it.eng.spago.base.SourceBean serviceRequest,
it.eng.spago.base.SourceBean serviceResponse)
throws java.lang.Exception
- Method called automatically by Spago framework when the action is invoked.
The method search into the request two parameters
- Template:an xml message (encodend in base64) which contains the configuration of the request
- OutputFormat: the format of the response (possible values are SVG,JPEG). Default is SVG
The template xml message must have the following structure
<MAP name="logical name of the map">
<DATAMART_PROVIDER connection_name=" name of one pool defined into data_access.xml "
query=" the query that obtains data "
column_id=" the name of a column of the resultset which is related to the id attribute of the svg tags "
column_value=" the name of a column of the resultset which contains the value related to the svg element "/>
<CONFIGURATION>
<!-- x,y: position of the first element of the legend -->
<LEGEND x=" " y=" " width=" " height=" " style=" svg style properties ">
<TITLE description=" title " style=" svg style properties "/>
<!-- ordered by threshold -->
<LEVELS>
<LEVEL threshold="0" style="svg style properties">
<TEXT description="Less then 1.000" style="svg style properties" />
</LEVEL>
<LEVEL threshold="1000" style="svg style properties">
<TEXT description="Da 1.000 a 2.000" style="svg style properties" />
</LEVEL>
......
</LEVELS>
</LEGEND>
</CONFIGURATION>
</MAP>
The query attribute can contain some parameters.
Each parameter must be specified with the sintax ${parameter_name}
During the execution the parameter sintax is substituted with the value ot the
same-name parameter send into request. If the request doesn't contain any parameter
with name equal to the one of the query the rendering is not performed
- Parameters:
serviceRequest
- the Spago request SourceBeanserviceResponse
- the Spago response SourceBean
- Throws:
java.lang.Exception
flushFromInputStreamToOutputStream
public static void flushFromInputStreamToOutputStream(java.io.InputStream is,
java.io.OutputStream os,
boolean closeStreams)
- Given an
InputStream
as input flushs the content into an OutputStream
and then close the input and output stream.
- Parameters:
is
- The input streamos
- The output streamcloseStreams,
- if true close both stream