|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.makumba.forms.responder.ResponderFactory
public class ResponderFactory
This factory handles the creation, caching and retrieval of Responder objects.
Field Summary | |
---|---|
static String |
MAKUMBA_SUCCESSFUL_RESPONSE
|
static String[] |
RESPONSE_ATTRIBUTE_NAMES
|
static String |
RESPONSE_FORMATTED_STRING_NAME
|
static String |
RESPONSE_STRING_NAME
|
static String |
resultNamePrefix
|
(package private) static Integer |
ZERO
|
Constructor Summary | |
---|---|
ResponderFactory()
|
Method Summary | |
---|---|
FormResponder |
createResponder()
Creates a new empty FormResponder, to be used at form computation time. |
Responder |
getFirstResponder(ServletRequest req)
Returns the first responder object found fitting the request. |
static ResponderFactory |
getInstance()
|
Iterator<String> |
getOrderedResponderCodes(HttpServletRequest req)
Returns the responders in the page in a topological order |
Iterator<String> |
getOrderedResponderCodes(Iterator<String> responderCodes)
|
Responder |
getResponder(String code)
Returns a responder based on its code |
Iterator<String> |
getResponderCodes(HttpServletRequest req)
Reads all responder codes from a request (all code_suffix values of __mak__responder__). |
Iterator<String> |
getResponderCodes(Object o)
|
int |
getResponderIdentity(Responder responder)
Based on its instance, returns the key of the responder |
Exception |
getResponse(HttpServletRequest req,
HttpServletResponse resp)
Should compute the Response based on all the responders of one page, but for now just computes an
Exception. |
String[] |
getSuffixes(String responderCode)
Given a responder code, extracts suffix and parentSuffix |
ArrayList<InvalidValueException> |
getUnassignedExceptions(CompositeValidationException e,
HttpServletRequest req)
For all the (nested) forms of a page, gives all the errors which have not been assigned to a specific field. |
void |
printOrderedResponders(HttpServletRequest req)
|
void |
setResponderWorkingDir(HttpServletRequest request)
Set the responder directory according from information taken from the HttpServletRequest |
void |
setResponderWorkingDir(String tempDir,
String contextPath)
Additional method to set a responder directory, used in the JUnit tests in FormsOQLTest.beginFormResponderOrder(org.apache.cactus.Request) . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static Integer ZERO
public static final String RESPONSE_STRING_NAME
public static final String RESPONSE_FORMATTED_STRING_NAME
public static final String MAKUMBA_SUCCESSFUL_RESPONSE
public static final String[] RESPONSE_ATTRIBUTE_NAMES
public static final String resultNamePrefix
Constructor Detail |
---|
public ResponderFactory()
Method Detail |
---|
public static ResponderFactory getInstance()
public Iterator<String> getResponderCodes(HttpServletRequest req)
req
- the request in which we currently are
public Iterator<String> getResponderCodes(Object o)
public Iterator<String> getOrderedResponderCodes(HttpServletRequest req)
req
- the request corresponding to the current page
public Iterator<String> getOrderedResponderCodes(Iterator<String> responderCodes)
public void printOrderedResponders(HttpServletRequest req)
public String[] getSuffixes(String responderCode)
responderCode
- the responder code
public void setResponderWorkingDir(HttpServletRequest request)
HttpServletRequest
public void setResponderWorkingDir(String tempDir, String contextPath)
FormsOQLTest.beginFormResponderOrder(org.apache.cactus.Request)
.
public Responder getResponder(String code)
code
- the code that identifies one form in one page
Responder
corresponding to the code, fetched from the cachepublic Responder getFirstResponder(ServletRequest req)
ResponseControllerHandler
to find out the
value of #getReloadFormOnError()
.
req
- the current request
public ArrayList<InvalidValueException> getUnassignedExceptions(CompositeValidationException e, HttpServletRequest req)
e
- the CompositeValidationException
holding the errorsreq
- the request corresponding to the current page
public FormResponder createResponder()
FormResponder
public int getResponderIdentity(Responder responder)
responder
- the Responder object of which we want to get the key
public Exception getResponse(HttpServletRequest req, HttpServletResponse resp)
Response
based on all the responders of one page, but for now just computes an
Exception.
req
- the HttpServletRequest
corresponding to the current pageresp
- the HttpServletRequest
corresponding to the current page
ResponseControllerHandler
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |