01: package org.enhydra.util.chiba;
02:
03: import org.chiba.xml.xforms.connector.DefaultConnectorFactory;
04: import org.chiba.xml.xforms.connector.SubmissionHandler;
05: import org.chiba.xml.xforms.exception.XFormsException;
06: import org.w3c.dom.Element;
07:
08: public class ChibaConnectorFactory extends DefaultConnectorFactory {
09:
10: /**
11: * Creates a new submission handler for the specified URI.
12: *
13: * @param uri the relative or absolute URI string.
14: * @param element the element to start with XML Base resolution for relative
15: * URIs.
16: * @return a new submission handler for the specified URI.
17: * @throws XFormsException if a relative URI could not be resolved, no
18: * submission handler is registered for the specified URI or any error
19: * occurred during submission handler creation.
20: */
21: public SubmissionHandler createSubmissionHandler(final String uri,
22: final Element element) throws XFormsException {
23: HTTPSubmissionHandler submissionHandler = new HTTPSubmissionHandler();
24:
25: submissionHandler.setURI(uri);
26: submissionHandler.setContext(getContext());
27:
28: return submissionHandler;
29: }
30:
31: }
|