1 19 20 package za.org.coefficient.interfaces; 21 22 import org.apache.commons.fileupload.FileUploadException; 23 import org.apache.commons.httpclient.Cookie; 24 25 import za.co.csir.icomtek.workflow.interfaces.WorkflowContext; 26 import za.org.coefficient.authentication.CoefficientUser; 27 import za.org.coefficient.core.Project; 28 import za.org.coefficient.exception.ConfigurationException; 29 import za.org.coefficient.html.Page; 30 import za.org.coefficient.util.common.BaseMultipartRequest; 31 import za.org.coefficient.util.common.UploadedFile; 32 33 import java.io.IOException ; 34 import java.util.Date ; 35 import java.util.HashMap ; 36 37 43 public interface CoefficientContext extends WorkflowContext { 44 46 public void setCookie(Cookie cookie); 47 48 public Cookie[] getCookies(); 49 50 56 public CoefficientUser getCurrentUser(); 57 58 64 public void setError(String html); 65 66 public boolean isError(); 67 68 71 public void setForward(String moduleName) throws ConfigurationException; 72 73 77 public void setForward(String moduleName, String opName) 78 throws ConfigurationException; 79 80 96 public void setForward(String moduleName, String opName, HashMap params) 97 throws ConfigurationException; 98 99 107 public void setModuleContent(String html, String name) 108 throws RuntimeException ; 109 110 113 public void setModuleContent(String html, String name, String theme) 114 throws RuntimeException ; 115 116 126 public String clearModuleContent(String name); 127 128 public BaseMultipartRequest getMultipartRequest() throws FileUploadException; 129 130 public Page getPage(); 131 132 public String getTheme(); 133 public void setTheme(String theme); 134 135 145 public String getParameter(String name); 146 147 156 public String getParameter(String name, String defaultValue); 157 158 public boolean getParameterAsBoolean(String name); 159 160 public Date getParameterAsDate(String name); 161 162 public Double getParameterAsDouble(String name, double defaultValue); 163 164 public Double getParameterAsDouble(String name); 165 166 public double getParameterAsDoublePrimitive(String name, double defaultValue); 167 168 public int getParameterAsInt(String name, int defaultValue); 169 170 public Integer getParameterAsInteger(String name, int defaultValue); 171 172 public Integer getParameterAsInteger(String name); 173 174 public Long getParameterAsLong(String name, long defaultValue); 175 176 public Long getParameterAsLong(String name); 177 178 public long getParameterAsLongPrimitive(String name, long defaultValue); 179 180 188 public String [] getParameterValues(String name); 189 190 198 public Long [] getParameterValuesLong(String name); 199 200 public String [] getParametersValues(String name); 201 202 public void setProject(Project project); 203 204 public Project getProject(); 205 206 215 public boolean setProperties(Object bean); 216 217 public Object getRequestAttribute(String name); 218 219 public String getRequestURL(); 220 221 public String getLastNonHelpOp(); 222 223 public void setSessionAttribute(String name, Object value); 224 225 public Object getSessionAttribute(String name); 226 227 public UploadedFile getUploadedFile(String name) throws FileUploadException; 228 229 public void setWorkflowUser(CoefficientUser workflowUser); 230 231 public void invalidateSession(); 232 233 public void removeSessionAttribute(String name); 234 235 } 236 | Popular Tags |