openlsd.web.appli
Class LSDWebGet

java.lang.Object
  extended by openlsd.web.appli.LSDWebGet
Direct Known Subclasses:
LSMWebGet

public class LSDWebGet
extends java.lang.Object

Get functions for LSD in Web

Author:
Frederic Bregier LGPL

Field Summary
static LSDWebClientGetPool pool
          Pool of WebGet Client
 
Constructor Summary
LSDWebGet()
           
 
Method Summary
static void closeAll()
          Close all connection in Pools
static int getDocument(java.util.ArrayList<java.lang.String> erreurs, LSDDbAdmin admin, long legacy, LSDBusiness lsdb, LSDDbIpPort ipport, javax.servlet.http.HttpServletResponse response)
          Get the document and returns it to the response
static int getDocumentException(java.util.ArrayList<java.lang.String> erreurs, LSDDbAdmin admin, long legacy, LSDBusiness lsdb, LSDDbIpPort ipport, javax.servlet.http.HttpServletResponse response)
          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)
          Get the document and returns it to the response using Pool
static int getPoolDocumentException(java.util.ArrayList<java.lang.String> erreurs, LSDDbAdmin admin, long legacy, LSDBusiness lsdb, LSDDbIpPort ipport, javax.servlet.http.HttpServletResponse response)
          Get the document and returns it to the response using Pool
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pool

public static final LSDWebClientGetPool pool
Pool of WebGet Client

Constructor Detail

LSDWebGet

public LSDWebGet()
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)
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 -
Returns:
0 if OK, else > 0 means an error occurs (1:no connection to OpenLSD Server, 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)
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 -
Returns:
0 if OK, else > 0 means an error occurs (1:no connection to OpenLSD Server, 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))

getDocumentException

public static int getDocumentException(java.util.ArrayList<java.lang.String> erreurs,
                                       LSDDbAdmin admin,
                                       long legacy,
                                       LSDBusiness lsdb,
                                       LSDDbIpPort ipport,
                                       javax.servlet.http.HttpServletResponse response)
                                throws LSDNoConnexionException,
                                       LSDServletOutputStreamException,
                                       LSDBadRequestException,
                                       LSDInternalException,
                                       LSDNotFoundException,
                                       LSDUnknownException
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 -
Returns:
0 if OK, else Throws one of the error Exception
Throws:
LSDNoConnexionException - No connection to OpenIDM Server
LSDServletOutputStreamException - Bad write to HttpServletResponse
LSDBadRequestException - Bad request as data given as argument are erroneous
LSDInternalException - Internal IDM error
LSDNotFoundException - File not found
LSDUnknownException - Unknown error

getPoolDocumentException

public static int getPoolDocumentException(java.util.ArrayList<java.lang.String> erreurs,
                                           LSDDbAdmin admin,
                                           long legacy,
                                           LSDBusiness lsdb,
                                           LSDDbIpPort ipport,
                                           javax.servlet.http.HttpServletResponse response)
                                    throws LSDNoConnexionException,
                                           LSDServletOutputStreamException,
                                           LSDBadRequestException,
                                           LSDInternalException,
                                           LSDNotFoundException,
                                           LSDUnknownException
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 -
Returns:
0 if OK, else Throws one of the error Exception
Throws:
LSDNoConnexionException - No connection to OpenIDM Server
LSDServletOutputStreamException - Bad write to HttpServletResponse
LSDBadRequestException - Bad request as data given as argument are erroneous
LSDInternalException - Internal IDM error
LSDNotFoundException - File not found
LSDUnknownException - Unknown error

closeAll

public static void closeAll()
Close all connection in Pools