Page History
...
public void initialiseParameters();
public String buttonPressed(String buttonName) throws Exception;
Helper functions that are also accessible in JDBCMetaData:
protected final void addParameter(Parameter p);
public void setParameterValue(String key, Object value);
public final Object getParameterValue(String key);
public boolean isParameterRequired(String key);
public boolean hasDependentParameters(String key);
Metadata Function Definitions
...
Code Block | ||
---|---|---|
| ||
public void initialiseParameters() { super.initialiseParameters(); addParameter(new Parameter("HELP", "Connection Details", "Text", TYPE_NUMERIC, DISPLAY_STATIC_TEXT, null, true)); Parameter p = new Parameter("URL", "1. Request Access PIN", "Connect to twitter to receive a PIN for data access",TYPE_UNKNOWN, DISPLAY_URLBUTTON, null, true); p.addOption("BUTTONTEXT", "Request URL"); p.addOption("BUTTONURL", "http://google.com"); addParameter(p); addParameter(new Parameter("PIN", "2. Enter PIN", "Enter the PIN recieved from Twitter", TYPE_NUMERIC, DISPLAY_TEXT_MED, null, true)); p = new Parameter("POSTPIN", "3. Validate Pin", "Validate the PIN", TYPE_TEXT, DISPLAY_BUTTON, null, true); p.addOption("BUTTONTEXT", "Validate PIN"); addParameter(p); addParameter(new Parameter("ACCESSTOKEN", "Access Token", "AccessToken that allows access to the Twitter API", TYPE_TEXT, DISPLAY_PASSWORD, null, true)); addParameter(new Parameter("ACCESSTOKENSECRET", "Access Token Secret", "AccessToken Password that allows access to the Twitter API", TYPE_TEXT, DISPLAY_PASSWORD, null, true)); } |
Anchor | ||||
---|---|---|---|---|
|
protected final void addParameter(Parameter p);
...
Code Block | ||
---|---|---|
| ||
Parameter p = new Parameter("URL", " Access PIN", "Connect to twitter to receive a PIN for data access",TYPE_UNKNOWN, DISPLAY_URLBUTTON, null, true); p.addOption("BUTTONTEXT", "Request URL"); p.addOption("BUTTONURL", "http://google.com"); addParameter(p); |
Anchor | ||
---|---|---|
|
|
public String buttonPressed(String buttonName) throws Exception;
...
A button callback may be used to change the values of other parameters programmatically. A parameter can be set with setParameterValue(String key, String value).
Anchor | ||||
---|---|---|---|---|
|
public void setParameterValue(String key, Object value);
Set the value of the parameter. Where function parameter key is the unique key of the parameter to be set and value is the value to assign to it.
Anchor | ||||
---|---|---|---|---|
|
public final Object getParameterValue(String key);
Get the value of a parameter. Where the function parameter key is the unique key of the parameter value to fetch.
Anchor | ||||
---|---|---|---|---|
|
public boolean isParameterRequired(String key);
...
Code Block | ||
---|---|---|
| ||
public boolean isParameterRequired(String key) { if ("DOMAIN".equals(key)) { if ("SQL".equals(getParameterValue("WINDOWSAUTH"))) { return false; } } return true; } |
Anchor | ||||
---|---|---|---|---|
|
public boolean hasDependentParameters(String key);
...