openlsm.web.client
Class LSMWebGet

java.lang.Object
  extended by openlsd.web.appli.LSDWebGet
      extended by openlsm.web.client.LSMWebGet

public class LSMWebGet
extends LSDWebGet

Get functions for LSD in Web

Author:
Frederic Bregier LGPL

Field Summary
 
Fields inherited from class openlsd.web.appli.LSDWebGet
pool
 
Constructor Summary
LSMWebGet()
           
 
Method Summary
static int getDocument(java.util.ArrayList<java.lang.String> erreurs, LSDDbAdmin admin, long legacy, LSDBusiness lsdb, LSDDbIpPort ipport, javax.servlet.http.HttpServletResponse response, boolean inline, java.lang.String name)
          Get the document and returns it to the response
static int getPoolDocument(java.util.ArrayList<java.lang.String> erreurs, LSDDbAdmin admin, long legacy, LSDBusiness lsdb, LSDDbIpPort ipport, javax.servlet.http.HttpServletResponse response, boolean inline, java.lang.String name)
          Get the document and returns it to the response using Pool
 
Methods inherited from class openlsd.web.appli.LSDWebGet
closeAll, getDocument, getDocumentException, getPoolDocument, getPoolDocumentException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LSMWebGet

public LSMWebGet()
Method Detail

getDocument

public static int getDocument(java.util.ArrayList<java.lang.String> erreurs,
                              LSDDbAdmin admin,
                              long legacy,
                              LSDBusiness lsdb,
                              LSDDbIpPort ipport,
                              javax.servlet.http.HttpServletResponse response,
                              boolean inline,
                              java.lang.String name)
Get the document and returns it to the response

Parameters:
erreurs - is an arrayList of Strings that will contains litteral of errors if any
admin -
legacy -
lsdb -
ipport -
response -
inline - Set to True if the response should be opened inside the Browser (no header, no attachment available) or set Open to False if the response should be opened in the email client.
name - Name for the email (without extension)
Returns:
0 if OK, else > 0 means an error occurs (1:no connection to OpenLSD Server, 2:document is not found in database, 3:cannot get ServletOutputStream, 4-9:no document in OpenLSD Server is returned and ServletOutputStream is not closed (client must close it by getting it again through response.getOutputStream() and then response.close()) 4: bad write to HttpServletResponse so no message could be returned to the user, 5: bad request (data given as argument are erroneous), 6: no connection (same as 1), 7: system internal error, 8: no file found (at least not in this Legacy server), 9: unknown error (as 7))

getPoolDocument

public static int getPoolDocument(java.util.ArrayList<java.lang.String> erreurs,
                                  LSDDbAdmin admin,
                                  long legacy,
                                  LSDBusiness lsdb,
                                  LSDDbIpPort ipport,
                                  javax.servlet.http.HttpServletResponse response,
                                  boolean inline,
                                  java.lang.String name)
Get the document and returns it to the response using Pool

Parameters:
erreurs - is an arrayList of Strings that will contains litteral of errors if any
admin -
legacy -
lsdb -
ipport -
response -
inline - Set to True if the response should be opened inside the Browser (no header, no attachment available) or set Open to False if the response should be opened in the email client.
name - Name for the email (without extension)
Returns:
0 if OK, else > 0 means an error occurs (1:no connection to OpenLSD Server, 2:document is not found in database, 3:cannot get ServletOutputStream, 4-9:no document in OpenLSD Server is returned and ServletOutputStream is not closed (client must close it by getting it again through response.getOutputStream() and then response.close()) 4: bad write to HttpServletResponse so no message could be returned to the user, 5: bad request (data given as argument are erroneous), 6: no connection (same as 1), 7: system internal error, 8: no file found (at least not in this Legacy server), 9: unknown error (as 7))