Board: APW QA

Subject

CVS: apw/src/org/paneris/apw/controller Download.java,1.4,1.5 FileTransfer.java,1.18,1.19

Author

TimP (CVS User)

Status

Date

25/06/2003 00:51

Message

Update of /usr/cvsroot/apw/src/org/paneris/apw/controller
In directory ganesh.paneris.org:/tmp/cvs-serv5669
Modified Files:
Download.java FileTransfer.java
Log Message:
Extend ApwServlet rather than TemplateServlet hence don't create out own
ApwUtil
Index: Download.java
===================================================================
RCS file: /usr/cvsroot/apw/src/org/paneris/apw/controller/Download.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** Download.java 2003/06/17 11:26:01 1.4
--- Download.java 2003/06/24 23:51:20 1.5
***************
*** 61,65 ****
/**
* Override PoemServlet's doConfiguredRequest so that only
! * part of the work is done inside a database Session
*/
public void doConfiguredRequest (final Melati melatiIn) throws
--- 61,70 ----
/**
* Override PoemServlet's doConfiguredRequest so that only
! * part of the work is done inside a database Session.
! *
! * @param melatiIn the {@link Melati}
! * @throws ServletException if the template engine fails to create a
! * {@link TemplateContext}
! * @throws IOException if something goes wrong with reading the file
*/
public void doConfiguredRequest (final Melati melatiIn) throws
***************
*** 138,154 ****
return file.getPath();
}
-
- // .51 -> .52 changes
-
- // protected void error(HttpServletResponse response, Exception e )
- // throws IOException {
- // super.error(response, e);
- // }
-
- // FIXME - this now public, is this correct?
- public void error(Melati melati, Exception e )
- throws IOException {
- super.error(melati, e);
- }

protected void _handleException1(Melati melati, Exception exception)
--- 143,146 ----
Index: FileTransfer.java
===================================================================
RCS file: /usr/cvsroot/apw/src/org/paneris/apw/controller/FileTransfer.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** FileTransfer.java 2003/06/19 17:36:20 1.18
--- FileTransfer.java 2003/06/24 23:51:20 1.19
***************
*** 56,63 ****
import org.melati.poem.ValidationPoemException;
import org.melati.servlet.InvalidUsageException;
- import org.melati.servlet.MelatiContext;
import org.melati.servlet.MultipartFormField;
- import org.melati.servlet.PathInfoException;
- import org.melati.servlet.TemplateServlet;
import org.melati.template.TemplateContext;
import org.melati.util.MelatiWriter;
--- 56,60 ----
***************
*** 70,73 ****
--- 67,71 ----
import org.paneris.apw.model.UploadedFileTable;
import org.paneris.apw.model.User;
+ import org.paneris.apw.servlet.ApwServlet;


***************
*** 76,88 ****
* The main servlet for APW.
*/
! public class FileTransfer extends TemplateServlet {

/** The size of the buffer used in downloading files */
protected static int BUFFERSIZE = 2048;

- protected final String apwTemplate(String name) {
- return "apw/view/" + name;
- }
-
/**************
* System actions
--- 74,82 ----
* The main servlet for APW.
*/
! public class FileTransfer extends ApwServlet {

/** The size of the buffer used in downloading files */
protected static int BUFFERSIZE = 2048;

/**************
* System actions
***************
*** 110,114 ****

/**
! * delete all the checked files
*/
protected String batchDelete(Melati melati, TemplateContext context) {
--- 104,108 ----

/**
! * Delete all the checked files
*/
protected String batchDelete(Melati melati, TemplateContext context) {
***************
*** 179,185 ****
/**
* Work out which user account to use.
*/
public User getAccount(Melati melati, TemplateContext context)
! throws AccountNotSetException {
User user = (User)melati.getUser();
if (user.isNormalType())
--- 173,184 ----
/**
* Work out which user account to use.
+ *
+ * @param melati the {@link Melati}
+ * @param context a {@link TemplateContext} to get field values from
+ * @throws AccountNotSetException if the account is not set
+ * @return a {@link User} of the system
*/
public User getAccount(Melati melati, TemplateContext context)
! throws AccountNotSetException {
User user = (User)melati.getUser();
if (user.isNormalType())
***************
*** 225,229 ****

/**
! * download a file
*/
protected String download(Melati melati, TemplateContext context)
--- 224,228 ----

/**
! * Download a file.
*/
protected String download(Melati melati, TemplateContext context)
***************
*** 255,259 ****

/**
! * upload a file
*/
protected String upload(Melati melati, TemplateContext context)
--- 254,258 ----

/**
! * Upload a file.
*/
protected String upload(Melati melati, TemplateContext context)
***************
*** 364,368 ****

/**
! * actually add a new user
*/
protected String addUser_doit(Melati melati, TemplateContext context) {
--- 363,367 ----

/**
! * Actually add a new user.
*/
protected String addUser_doit(Melati melati, TemplateContext context) {
***************
*** 379,383 ****

/**
! * list all users so we can administrate them
*/
protected String adminUsers(Melati melati, TemplateContext context) {
--- 378,382 ----

/**
! * List all users so we can administrate them.
*/
protected String adminUsers(Melati melati, TemplateContext context) {
***************
*** 541,545 ****
* Extract the calling parameters and perform the appropriate task.
*/
! protected String doTemplateRequest(Melati melati, TemplateContext context)
throws Exception {

--- 540,545 ----
* Extract the calling parameters and perform the appropriate task.
*/
! protected String reallyDoTemplateRequest(Melati melati,
! TemplateContext context)
throws Exception {

***************
*** 560,570 ****
return apwTemplate("AccountDeleted");

- context.put("util",
- new ApwUtil( //"https://"+
- //melati.getRequest().getServerName() +
- melati.getRequest().getServletPath(),
- melati));

-
if (melati.getObject() != null) {
if (melati.getContext().table.equals("uploadedfile")) {
--- 560,564 ----
***************
*** 637,652 ****
}

- protected MelatiContext melatiContext(Melati melati)
- throws PathInfoException {
- return melatiContextWithLDB(melati, "apw");
- }
-
- public String getSysAdminName () {
- return "Roger Davies (0845 22 55 805)";
- }
-
- public String getSysAdminEmail () {
- return "roger@impactwp.com
This message has been truncated, the complete message has been stored as an attachment.

Attachments

att00000007.txt (7 K)

APW QA Board

 

Post Follow-up

Search This Board

 



Home -  News -  Reference Sites -  Members -  Partners -  Guidelines -  Philosophy -  Your Details -  Logout