|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree.enterprise.control.AbstractListener
org.deegree.portal.standard.wfs.control.DigitizeListener
public class DigitizeListener
This Listener is used to perform a wfs transaction (e.g. write a geometry that was digitized in the client to a WFS). The featureType must be passed as first parameter of the RPC request, the second parameter must contain a struct, whose members are replaced in the transaction template. WFS address and transaction template are both taken from the module configuration.
Field Summary | |
---|---|
protected DigitizerClientConfiguration |
config
|
protected static java.lang.String |
CRS
|
protected static java.lang.String |
DIGITIZER_CLIENT_CONFIGURATION
|
protected static java.lang.String |
GEOMETRY
|
Constructor Summary | |
---|---|
DigitizeListener()
|
Method Summary | |
---|---|
void |
actionPerformed(FormEvent event)
|
protected java.lang.String |
createWFSTransactionRequest(RPCWebEvent rpcEvent,
java.lang.String transactionType)
Create a WFS request (transaction) from the params given in the rpc event and the module configuration. |
protected QualifiedName |
extractFeatureTypeAsQualifiedName(RPCWebEvent rpcEvent)
The FEATURE_TYPE passed in the rpc must be given with namespace and featuretype name in the form: {http://some.address.com}:featureTypeName. |
protected void |
handleNegativeResponse(XMLFragment response)
A negative response by the WFS needs to be handled individually in each derived Listener. |
protected java.lang.Object[] |
handlePositiveResponse(XMLFragment response)
A positive response by the WFS needs to be handled individually in each derived Listener. |
protected java.lang.Object[] |
handleResponse(XMLFragment response)
Handle the WFS transaction response. |
protected XMLFragment |
performRequest(java.lang.String request,
java.lang.String wfsAddress)
Send the request (e.g. wfs:Transaction, wfs:GetFeature) to the WFS of the passed address and return the received WFS response as XMLFragment. |
protected java.lang.String |
replaceDeleteTemplateVars(java.lang.String request,
java.lang.Object... args)
this method will be overwritten in derived listeners |
protected java.lang.String |
replaceSpecialTemplateVars(java.lang.String request,
java.lang.Object... args)
this method will be overwritten in derived listeners |
protected java.lang.String |
replaceUpdateTemplateVars(java.lang.String request,
java.lang.Object... args)
this method will be overwritten in derived listeners |
protected void |
validateRequest(RPCWebEvent rpcEvent)
Validate the RPC request: number of RPCParameter must be 2 or more. |
Methods inherited from class org.deegree.enterprise.control.AbstractListener |
---|
getAlternativeNextPage, getHomePath, getInitParameter, getInitParameterList, getNextPage, getRequest, getReturnValue, gotoErrorPage, handle, setAlternativeNextPage, setDefaultAlternativeNextPage, setDefaultNextPage, setNextPage, setReturnValue, toModel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String DIGITIZER_CLIENT_CONFIGURATION
protected static final java.lang.String GEOMETRY
protected static final java.lang.String CRS
protected DigitizerClientConfiguration config
Constructor Detail |
---|
public DigitizeListener()
Method Detail |
---|
public void actionPerformed(FormEvent event)
actionPerformed
in interface WebListener
actionPerformed
in class AbstractListener
protected void validateRequest(RPCWebEvent rpcEvent) throws RPCException, GeometryException, UnknownCRSException
rpcEvent
-
RPCException
GeometryException
UnknownCRSException
protected QualifiedName extractFeatureTypeAsQualifiedName(RPCWebEvent rpcEvent) throws WFSClientException
QualifiedName
.
rpcEvent
-
WFSClientException
- if featureType cannot be transformed to a QualifiedName
.protected java.lang.String createWFSTransactionRequest(RPCWebEvent rpcEvent, java.lang.String transactionType) throws WFSClientException
rpcEvent
- transactionType
- the type of WFS transaction (might be "INSERT", "UPDATE", "DELETE")
WFSClientException
- if featureType in rpcEvent cannot be transformed to a QualifiedName
or if the query template could not be read.protected XMLFragment performRequest(java.lang.String request, java.lang.String wfsAddress) throws WFSClientException
request
- the request for the WFSwfsAddress
- the address of the WFS
WFSClientException
- if request agains wfsAddress failed, or if wfs response could not be loaded as
XMLFragmentprotected java.lang.Object[] handleResponse(XMLFragment response) throws WFSClientException
response
-
WFSClientException
- if the transaction response does not contain a root element of
"wfs:TransactionResponse"protected java.lang.Object[] handlePositiveResponse(XMLFragment response)
response
-
protected void handleNegativeResponse(XMLFragment response) throws WFSClientException
response
-
WFSClientException
- in any case. always.protected java.lang.String replaceSpecialTemplateVars(java.lang.String request, java.lang.Object... args) throws WFSClientException
request
- args
- any number of Objects needed in this method
WFSClientException
protected java.lang.String replaceUpdateTemplateVars(java.lang.String request, java.lang.Object... args) throws WFSClientException
request
- args
- any number of Objects needed in this method
WFSClientException
protected java.lang.String replaceDeleteTemplateVars(java.lang.String request, java.lang.Object... args) throws WFSClientException
request
- args
- any number of Objects needed in this method
WFSClientException
|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org