|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ca.ucalgary.services.util.MobySpecWrapper ca.ucalgary.services.util.XHTMLForm
public class XHTMLForm
This class presents HTML forms as if they were ACD file descriptions of a command. This allows us to wrap Web pages as Moby services using a similar mechanism to that which wraps ACD-described command line tools such as EMBOSS programs.
Field Summary | |
---|---|
static String |
HIDDEN_SENTINEL
|
static String |
IMAGE_ANONYMOUS_NAME
|
static String |
IMAGE_DATATYPE
|
static String |
METHOD_GET
|
static String |
METHOD_POST
|
static String |
MULTIPART
|
static String |
NULL_NAME
|
static String |
RADIO_DEFAULT_SENTINEL
|
static String |
RADIO_SENTINEL
|
static String |
SUBMIT_ANONYMOUS_NAME
|
static String |
SUBMIT_DATATYPE
|
static String |
SUBMIT_DEFAULT_VALUE
|
static String |
URLENCODED
|
Constructor Summary | |
---|---|
XHTMLForm()
C-tor to use when you want to set a bunch of parameters manually. |
|
XHTMLForm(URL formUrl)
|
Method Summary | |
---|---|
void |
addFormFile(String paramName)
|
String |
getFormAction()
|
String |
getFormEncodingType()
|
List<String> |
getFormFiles()
|
String |
getFormMethod()
|
Map<String,String> |
getImageOptions()
Lists the named submit buttons, and may contain a special key IMAGE_ANONYMOUS_NAME that denotes that an unnamed submit button can be used. |
Map<String,String> |
getSubmitOptions()
Lists the named submit buttons, and may contain a special key SUBMIT_ANONYMOUS_NAME that denotes that an unnamed submit button can be used. |
static String |
join(String delim,
String[] array)
|
static StringBuffer |
join(String delim,
String[] array,
StringBuffer sb)
|
Map<String,Boolean> |
parseSelectField(Element selectElement,
String selectName)
|
void |
removeFormFile(String paramName)
|
void |
setCurrentService(String serviceToReport)
This method has extended functionality on this class, because the service can be set using the moby service name (as per XHTML markup), the index of the form (starting at 0) in the page, the form's HTML name, or the fully qualified action URL. |
void |
setFormAction(String action)
|
void |
setFormEncodingType(String encType)
|
void |
setFormMethod(String method)
|
void |
setImageOptions(Map<String,String> options)
|
void |
setSubmitOptions(Map<String,String> options)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String METHOD_POST
public static final String METHOD_GET
public static final String SUBMIT_DATATYPE
public static final String IMAGE_DATATYPE
public static final String NULL_NAME
public static final String MULTIPART
public static final String URLENCODED
public static final String RADIO_SENTINEL
public static final String RADIO_DEFAULT_SENTINEL
public static final String HIDDEN_SENTINEL
public static final String IMAGE_ANONYMOUS_NAME
public static final String SUBMIT_ANONYMOUS_NAME
public static final String SUBMIT_DEFAULT_VALUE
Constructor Detail |
---|
public XHTMLForm(URL formUrl) throws Exception
formUrl
- the location of the remote Web form that will be wrapped into a Moby Service
Exception
public XHTMLForm()
Method Detail |
---|
public void setCurrentService(String serviceToReport) throws IllegalArgumentException
setCurrentService
in class MobySpecWrapper
IllegalArgumentException
public Map<String,Boolean> parseSelectField(Element selectElement, String selectName) throws Exception
public void setSubmitOptions(Map<String,String> options)
public Map<String,String> getSubmitOptions()
public void setImageOptions(Map<String,String> options)
public Map<String,String> getImageOptions()
public void setFormEncodingType(String encType)
encType
- either constant MULTIPART or URLENCODEDpublic String getFormEncodingType()
public void setFormAction(String action)
action
- the value of the form's action attributepublic String getFormAction()
public void setFormMethod(String method)
method
- the value of the form's method attribute (i.e. GET or POST)public String getFormMethod()
public void addFormFile(String paramName)
public void removeFormFile(String paramName)
public List<String> getFormFiles()
public static String join(String delim, String[] array)
public static StringBuffer join(String delim, String[] array, StringBuffer sb)
|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |