com.taggercat.controller
Class DefaultRequestController

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<java.lang.String,NamedActionActionMapping>
          extended by com.taggercat.controller.AbstractRequestController
              extended by com.taggercat.controller.DefaultRequestController
All Implemented Interfaces:
RequestController, java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,NamedActionActionMapping>

public class DefaultRequestController
extends AbstractRequestController

This is TaggerCat's default RequestController. Action mappings can be provided via one or more of the following:

The Request Controller delegates requests to appropriate request handlers. To implement your own subclass of an existing handler, register your subclass with the same action name.

The standard action names are:

closeDataSources
closes the named data sources
delete
delete the current tcEntity from the data source
deleteSelected
deletes the selected rows in the data source
goFirst, goNext, goPrevious, goLast
scrolls the specified data source to the named position
insert
performs an insert action with data from the current request
login
logs in the user
logout
logs off the current user
noop
no operation, allows for page reload with no action
pageNavigate
performs a page navigate
qbf
performs a QBF style query on the data source
qbfClear
clears any QBF data on the current data source
query
performs a query ( or re-query ) action on the specified data source
reloadMetadata
reloads the System metadata, including derivations, and constraints etc.
reload
reloads the current entity on the named data source
save
performs a save action on the specified data source
saveall
performs a save action on all data sources within a single transaction
sort
performs a sort on the specified property name
undo
performs an undo action on the specified datasource
undoAll
performs an undo action on all data sources
update
updates data in the model

See Also:
Serialized Form
 

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
DefaultRequestController()
           
 
Method Summary
 void addAdditionalHandlers(RequestHandlerChain requestHandlerChain, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This is an extension point for adding additional handlers to the request change.
 void init(javax.servlet.http.HttpServlet servlet)
          Initializes the request map with standard and user-defined request handlers.
 void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Services the request by building a request handler chain, and adding any named request handlers to the chain.
 
Methods inherited from class com.taggercat.controller.AbstractRequestController
getServlet
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

DefaultRequestController

public DefaultRequestController()
Method Detail

init

public void init(javax.servlet.http.HttpServlet servlet)
          throws javax.servlet.ServletException
Initializes the request map with standard and user-defined request handlers.

Specified by:
init in interface RequestController
Overrides:
init in class AbstractRequestController
Throws:
javax.servlet.ServletException
Parameters:
servlet - this application's servlet

service

public void service(javax.servlet.http.HttpServletRequest request,
                    javax.servlet.http.HttpServletResponse response)
             throws javax.servlet.ServletException
Services the request by building a request handler chain, and adding any named request handlers to the chain.

Specified by:
service in interface RequestController
Specified by:
service in class AbstractRequestController
Throws:
javax.servlet.ServletException
Parameters:
request - the HttpServletRequest
response - the HttpServletResponse

addAdditionalHandlers

public void addAdditionalHandlers(RequestHandlerChain requestHandlerChain,
                                  javax.servlet.http.HttpServletRequest request,
                                  javax.servlet.http.HttpServletResponse response)
                           throws javax.servlet.ServletException
Description copied from class: AbstractRequestController
This is an extension point for adding additional handlers to the request change. The default implementation does nothing.

Specified by:
addAdditionalHandlers in class AbstractRequestController
Throws:
javax.servlet.ServletException
Parameters:
requestHandlerChain - the request chain
request - the HttpServletRequest
response - the HttpServletResponse