openlsd.web.common.LSDWebCommon Class Reference

Collaboration diagram for openlsd.web.common.LSDWebCommon:

Collaboration graph
[legend]

List of all members.


Detailed Description

Common functions for LSD Support in Web Servlet
Author:
Frederic Bregier LGPL

Static Public Member Functions

static void initialize (String loaderCFile, String cfile, Class classtype)
static void initialize (String cfile, Class classtype)
static LSDDbAdmin initAdmin (ArrayList< String > erreurs)
static LSDDbAdmin initAdmin (Connection connread, Connection connwrite, ArrayList< String > erreurs)
static LSDDbIpPort getIpPort (ArrayList< String > erreurs, LSDDbAdmin admin, long legacy, int typeService)
static void initLSDContext (String filename)

Static Public Attributes

static final ConcurrentHashMap
< Long, LSDWebLegacy
LegacyHMap

Static Private Member Functions

static boolean initLoggerConfig (Class classtype)

Static Private Attributes

static String configfile = null
static String loaderConfigFile = null
static LSDLoadConfig llc = null

Member Function Documentation

static void openlsd.web.common.LSDWebCommon.initialize ( String  loaderCFile,
String  cfile,
Class  classtype 
) [static]

Constructor with a config file to be used in the init part of the servlet. Also initialize the internal status from lsd config files and logger.

Parameters:
loaderCFile 
cfile 
classtype 

static void openlsd.web.common.LSDWebCommon.initialize ( String  cfile,
Class  classtype 
) [static]

Constructor with a config file to be used in the init part of the servlet. Also initialize the internal status from lsd config files and logger.

Parameters:
cfile 
classtype 

static boolean openlsd.web.common.LSDWebCommon.initLoggerConfig ( Class  classtype  )  [static, private]

Init the logger and the internal Configuration from OpenLSD-DB XML config file

Parameters:
classtype 
Returns:
True if OK, else False

static LSDDbAdmin openlsd.web.common.LSDWebCommon.initAdmin ( ArrayList< String >  erreurs  )  [static]

Initialize the DB connection from xml file to be used in doPost or doGet servlet without database pool.

Parameters:
erreurs is an arrayList of Strings that will contains litteral of errors if any
Returns:
the LSDDbAdmin connector

static LSDDbAdmin openlsd.web.common.LSDWebCommon.initAdmin ( Connection  connread,
Connection  connwrite,
ArrayList< String >  erreurs 
) [static]

Initialize the DB connection from given connections (read and or no write) to be used in doPost or doGet servlet from a database pool. Write database access is only usefull in case of import of document, else null can be passed.

Parameters:
connread 
connwrite 
erreurs is an arrayList of Strings that will contains litteral of errors if any
Returns:
the LSDDbAdmin connector

static LSDDbIpPort openlsd.web.common.LSDWebCommon.getIpPort ( ArrayList< String >  erreurs,
LSDDbAdmin  admin,
long  legacy,
int  typeService 
) [static]

Get the IpPort corresponding to the legacy (first one as for now, but can be changed for instance to get the closest one)

Parameters:
erreurs is an arrayList of Strings that will contains litteral of errors if any
admin 
legacy 
typeService where fadmin = 0, fuser = 1, fusercomp= 2, fprotected = 3
Returns:
the IpPort object or null if an error occurs

static void openlsd.web.common.LSDWebCommon.initLSDContext ( String  filename  )  [static]

Init the context of the local LSD Server for Web context (specific since Object are not from Server class)

Parameters:
filename 


Member Data Documentation

String openlsd.web.common.LSDWebCommon.configfile = null [static, private]

Config file

String openlsd.web.common.LSDWebCommon.loaderConfigFile = null [static, private]

Logger config file

LoadConfig object

final ConcurrentHashMap<Long,LSDWebLegacy> openlsd.web.common.LSDWebCommon.LegacyHMap [static]

Initial value:

 
        new ConcurrentHashMap<Long,LSDWebLegacy>()
Map for all Legacy defined in the config file


The documentation for this class was generated from the following file: