| java.lang.Object za.org.coefficient.core.BaseCoefficientContext
All known Subclasses: za.org.coefficient.core.CoefficientWebContext, za.org.coefficient.util.testing.CoefficientTestingContext,
BaseCoefficientContext | abstract public class BaseCoefficientContext implements CoefficientContext(Code) | | Project: coefficient
Description:
Copyright: Copyright (c) 2003
Company: CSIR
author: tfogwill |
Method Summary | |
public void | beginWorkflowAction() | public String | clearModuleContent(String name) | protected void | clearPage() | protected void | createPageObject() | public void | endWorkflowAction() | public Cookie[] | getCookies() | public CoefficientUser | getCurrentUser() | public String | getLastNonHelpOp() | public BaseMultipartRequest | getMultipartRequest() | public Page | getPage() | public String | getParameter(String name) Passthru method to the request object.
Parameters: name - a String containing the paramameter name. | public String | getParameter(String name, String defaultValue) Passthru method to the request object. | public boolean | getParameterAsBoolean(String name) | public Date | getParameterAsDate(String name) | public Double | getParameterAsDouble(String name, double defaultValue) | public Double | getParameterAsDouble(String name) | public double | getParameterAsDoublePrimitive(String name, double defaultValue) | public int | getParameterAsInt(String name, int defaultValue) | public Integer | getParameterAsInteger(String name, int defaultValue) | public Integer | getParameterAsInteger(String name) | public Long | getParameterAsLong(String name, long defaultValue) | public Long | getParameterAsLong(String name) | public long | getParameterAsLongPrimitive(String name, long defaultValue) | public String[] | getParameterValues(String name) Passthru method to the request object. | public Long[] | getParameterValuesLong(String name) Method to the request values as longs.
Parameters: name - a String containing the parameter name. | public String[] | getParametersValues(String name) | public Project | getProject() | public Object | getRequestAttribute(String name) | public String | getRequestURL() | public Object | getSessionAttribute(String name) | public String | getTheme() | public UploadedFile | getUploadedFile(String name) | public void | invalidateSession() | public boolean | isError() | public void | removeRequestAttribute(String name) | public void | removeSessionAttribute(String name) | public void | setCookie(Cookie cookie) | public void | setError(String html) | public void | setForward(String moduleName) | public void | setForward(String moduleName, String opName) | public void | setForward(String moduleName, String opName, HashMap params) This method is used to force a redirect after the current iteration
of the interceptor chain has completed.
Parameters: moduleName - is the module to forward control to, this must notbe null Parameters: opName - is the operation that the forwarded module should performif this value is null then it will use the MainMethod Parameters: params - is a hashmap containing key-value pairs that will beadditional parameters included on the request line to thespecified module. | public void | setModuleContent(String html, String name) | public void | setModuleContent(String html, String name, String theme) | public void | setProject(Project project) | public boolean | setProperties(Object bean) | protected void | setProperty(Object bean, PropertyDescriptor prop) Set the property 'prop' in the bean to the value of the
corresponding parameters. | public void | setRequestAttribute(String name, Object value) | public void | setSessionAttribute(String name, Object value) | public void | setTheme(String theme) | public void | setWorkflowUser(CoefficientUser workflowUser) |
CURRENT_PROJECT | final public static String CURRENT_PROJECT(Code) | | |
LAST_NON_HELP_OP | final public static String LAST_NON_HELP_OP(Code) | | |
fileUploadData | protected Map fileUploadData(Code) | | |
inWorkflowAction | protected boolean inWorkflowAction(Code) | | |
invalidateSession | protected boolean invalidateSession(Code) | | |
page_ | protected Page page_(Code) | | The page to handle this request
|
redirectionURL | protected String redirectionURL(Code) | | URL to redirect to if set
|
requestAttributes | protected Map requestAttributes(Code) | | |
serializableExistingCookies | protected Cookie[] serializableExistingCookies(Code) | | |
beginWorkflowAction | public void beginWorkflowAction()(Code) | | This is used to do anything that needs doing for a workflow action
to succeed
|
endWorkflowAction | public void endWorkflowAction()(Code) | | This should reset the state if need be
|
getCookies | public Cookie[] getCookies()(Code) | | |
getCurrentUser | public CoefficientUser getCurrentUser()(Code) | | If a user is logged in this will return that user otherwise it will
return null
the logged in user or null if not logged in |
getParameter | public String getParameter(String name, String defaultValue)(Code) | | Passthru method to the request object.
Parameters: name - a String with the name of the parameter Parameters: defaultValue - if no parameter with that name is definedthe return value is the defaultValue a String with the parameter value orthe default value. |
getParameterAsBoolean | public boolean getParameterAsBoolean(String name)(Code) | | |
getParameterAsDouble | public Double getParameterAsDouble(String name, double defaultValue)(Code) | | |
getParameterAsDoublePrimitive | public double getParameterAsDoublePrimitive(String name, double defaultValue)(Code) | | |
getParameterAsInt | public int getParameterAsInt(String name, int defaultValue)(Code) | | |
getParameterAsLong | public Long getParameterAsLong(String name, long defaultValue)(Code) | | |
getParameterAsLongPrimitive | public long getParameterAsLongPrimitive(String name, long defaultValue)(Code) | | |
getParameterValues | public String[] getParameterValues(String name)(Code) | | Passthru method to the request object. If request
is null, return an empty array of String.
Parameters: name - a String containing the parameter name. an array of Strings with all values associated |
getParameterValuesLong | public Long[] getParameterValuesLong(String name)(Code) | | Method to the request values as longs.
Parameters: name - a String containing the parameter name. an array of Longs with all values associated |
invalidateSession | public void invalidateSession()(Code) | | |
isError | public boolean isError()(Code) | | |
removeRequestAttribute | public void removeRequestAttribute(String name)(Code) | | |
removeSessionAttribute | public void removeSessionAttribute(String name)(Code) | | |
setCookie | public void setCookie(Cookie cookie)(Code) | | |
setError | public void setError(String html)(Code) | | Passthru method to set the error content on the internal Page object
Parameters: html - a String containing the html content defining an errordisplay |
setForward | public void setForward(String moduleName, String opName) throws ConfigurationException(Code) | | This will forward to the module and perform the method specified by
op and will pass no other parameters
|
setForward | public void setForward(String moduleName, String opName, HashMap params) throws ConfigurationException(Code) | | This method is used to force a redirect after the current iteration
of the interceptor chain has completed.
Parameters: moduleName - is the module to forward control to, this must notbe null Parameters: opName - is the operation that the forwarded module should performif this value is null then it will use the MainMethod Parameters: params - is a hashmap containing key-value pairs that will beadditional parameters included on the request line to thespecified module. If null no additional parameters willbe sent exception: configuationException - is thrown if module name is emptyor null |
setModuleContent | public void setModuleContent(String html, String name) throws RuntimeException(Code) | | Passthru method to set the module content on the internal Page object
Parameters: html - a String containing the html content the module wants todisplay Parameters: name - is the result of the call to getModuleName on the modulesetting the content |
setProperties | public boolean setProperties(Object bean)(Code) | | Uses bean introspection to set writable properties of bean from the
parameters, where a (case-insensitive) name match between the bean
property and the parameter is looked for
Parameters: bean - an object if true then all properties were successfully set, else somewere not |
setProperty | protected void setProperty(Object bean, PropertyDescriptor prop) throws Exception(Code) | | Set the property 'prop' in the bean to the value of the
corresponding parameters. Supports all types supported by
getXXX methods plus a few more that come for free because
primitives have to be wrapped before being passed to invoke
anyway.
Parameters: bean - An Object. Parameters: prop - A PropertyDescriptor. exception: Exception - a generic exception. |
|
|