Public Member Functions | |
LSDWebImport (LSDDbAdmin admin) | |
int | putFileFromWebLocal (ArrayList< String > erreurs, long legacy, LSDDbIpPort userOrComp, LSDDbIpPort prot, LSDBusiness lsdb, File file) |
boolean | initRegisterFile () |
Static Public Member Functions | |
static int | putFileFromWeb (ArrayList< String > erreurs, LSDDbAdmin admin, long legacy, LSDDbIpPort userOrComp, LSDDbIpPort prot, LSDBusiness lsdb, File file) |
static void | main (String[] args) |
static void | registerFalseFile (LSDExtQueueMember member, String message) |
static void | registerFalseFile (String filename, String message) |
static void | registerTrueFile (LSDExtQueueMember member, boolean createOKFile) |
Public Attributes | |
long | targetIdip = LSDConstants.invalide_idx |
Static Public Attributes | |
static final String | extOK = ".ok" |
static final String | extKO = ".ko" |
Protected Member Functions | |
int | privateInitializeArgs (String[] args, int curargs) |
int | initializeArgs (String[] args, int curargs) |
boolean | getIndexFromString (String line) |
boolean | initOptions (String[]args, int curargs) |
boolean | initOneFileOption (int curargs, String[]args) |
boolean | initOptionsAuto (String[]args, int curargs) |
boolean | initConnection () |
boolean | prepareImportQueue () |
boolean | joinConnection () |
boolean | errorFromPrepareImportQueue () |
boolean | finalizeAfterImport () |
boolean | finishAfterAutoImport () |
boolean | finalizeAfterAutoImport () |
boolean | finalizeConnection () |
void | finalizeRegisterFile () |
boolean | getClientPutInfo (LSDDbLegacy legacy, boolean compressedClient, boolean keepalived) |
boolean | getClientPutInfoFromIpPort (LSDDbLegacy legacy, LSDDbIpPort ipportUser1, LSDDbIpPort ipportProt1, boolean keepalived) |
LSDDbLegacy | getLegacy (long lid) |
LSDDbIpPort | getIpPortC (LSDDbLegacy legacy) |
LSDDbIpPort | getIpPortP (LSDDbLegacy legacy) |
Protected Attributes | |
LSDDbAdmin | admin = null |
LSDLoadConfig | llc = null |
boolean | isSameLid = false |
long | sameLid = LSDConstants.invalide_idx |
LSDDbLegacy | sameLegacy = null |
boolean | todelete = true |
int | option = -1 |
String | file0 = null |
long | lid0 = LSDConstants.invalide_idx |
LSDBusiness | lsdb = null |
LSDExtClientInfo | lci = null |
LSDClientPut | lcp = null |
LSDClientDelete | lcd = null |
String | passwd = null |
String | dir1 = null |
String | ext1 = null |
String | source2 = null |
boolean | blockmode = false |
ConcurrentLinkedQueue < LSDExtQueueMember > | todoQueue = null |
ConcurrentLinkedQueue < LSDExtQueueMembers > | todoQueueB = null |
ConcurrentLinkedQueue < LSDExtQueueMember > | doneQueue = null |
int | nbFile = 1 |
int | nbthread = 1 |
String | extidb = null |
boolean | sameDbConnMyltithread = false |
boolean | async = false |
boolean | isCompressed = false |
LSDClientPut[] | lcps = null |
LSDDbAdmin[] | dbconns = null |
File[] | listFiles = null |
LinkedList< String > | listline = null |
ConcurrentLinkedQueue < LSDExtQueueMember >[] | todoQueues = null |
ConcurrentLinkedQueue < LSDExtQueueMembers >[] | todoQueuesB = null |
ConcurrentLinkedQueue < LSDExtQueueMember > | todoQueueLocal = null |
ConcurrentLinkedQueue < LSDExtQueueMembers > | todoQueueBLocal = null |
LinkedList< String > | errorList = null |
String | extStop = null |
String | filename2Out = null |
Static Protected Attributes | |
static long | KO = 0 |
static boolean | istesting = false |
static Date | date_debut = null |
static boolean | use2Out = false |
static FileWriter | fileOK = null |
static FileWriter | fileKO = null |
static long | countKO = 0 |
static long | countOK = 0 |
openlsd.web.appli.LSDWebImport.LSDWebImport | ( | LSDDbAdmin | admin | ) |
Create a LSDCheck from args
admin |
static int openlsd.web.appli.LSDWebImport.putFileFromWeb | ( | ArrayList< String > | erreurs, | |
LSDDbAdmin | admin, | |||
long | legacy, | |||
LSDDbIpPort | userOrComp, | |||
LSDDbIpPort | prot, | |||
LSDBusiness | lsdb, | |||
File | file | |||
) | [static] |
Put a file from the web (File from multipart-data)
erreurs | is an arrayList of Strings that will contains litteral of errors if any | |
admin | ||
legacy | ||
userOrComp | User (not compressed) or Compressed LSD Server entry | |
prot | Protected LSD Server entry | |
lsdb | ||
file |
int openlsd.web.appli.LSDWebImport.putFileFromWebLocal | ( | ArrayList< String > | erreurs, | |
long | legacy, | |||
LSDDbIpPort | userOrComp, | |||
LSDDbIpPort | prot, | |||
LSDBusiness | lsdb, | |||
File | file | |||
) |
Put a file from the web (File from multipart-data)
erreurs | is an arrayList of Strings that will contains litteral of errors if any | |
legacy | ||
userOrComp | User (not compressed) or Compressed LSD Server entry | |
prot | Protected LSD Server entry | |
lsdb | ||
file |
static void openlsd.appli.autoimport.LSDImport.main | ( | String[] | args | ) | [static, inherited] |
Run 1 file local import
args | with the config filename as first arg. As second group of args: -testing set the import as testing mode for simple test where idmetier get the curdate added: not for use in production -nbthread nbthread (set the number of threads) -async set the connection mode to OpenLSD Server as asynchrone (first launch connection, then do other stuff, then join the connection -dbconn set that each thread will have its own db connexion, less efficient solution but less database connection -nodelete set no delete file after import but save one file with same name and extension=".ok" or ".ko" according to the import status. Only one option can be set between -delete and -nodelete. -delete (default option) delete file when correctly imported or save one file with the same name and extension=".ko". Only one option can be set between -delete and -nodelete. -2out set the out status to 2 files in the import source directory, one ".ok", another one ".ko" according to the import status -compressed set the connection mode to OpenLSD Server as using a compressed mode (useful only in Net mode where files can be compressed) -samelid lid where it specifies that it will be the same lid for all files (optimization) (by default, if not specified, not the same lid) As third group of args where one only of those can be set: -dir directory extension (each file has one file with same name and the extension containing "lid idb") -file file lid idb -source sourcefile (containing a list of "file lid idb" where lid is not there if -samelid is set) |
int openlsd.appli.autoimport.commonimport.LSDImportAbstract.privateInitializeArgs | ( | String[] | args, | |
int | curargs | |||
) | [protected, inherited] |
Function to override for specific initialization values
args | ||
curargs |
Reimplemented in openlsd.appli.autoimport.LSDAutoImport, and openlsd.appli.autoimport.LSDAutoImportBlock.
int openlsd.appli.autoimport.commonimport.LSDImportAbstract.initializeArgs | ( | String[] | args, | |
int | curargs | |||
) | [protected, inherited] |
Get arguments
args | ||
curargs |
Reimplemented in openlsm.autoimport.commonimport.LSMImportAbstract.
boolean openlsd.appli.autoimport.commonimport.LSDImportAbstract.getIndexFromString | ( | String | line | ) | [protected, inherited] |
Get file, lid and idb from the String line where a blank character is a separator. Should be override to explicitly specify how to use the correct business implementation.
line |
Reimplemented in openlsm.autoimport.commonimport.LSMImportAbstract.
boolean openlsd.appli.autoimport.commonimport.LSDImportAbstract.initOptions | ( | String[] | args, | |
int | curargs | |||
) | [protected, inherited] |
Finalize Init options from args
args | ||
curargs |
Reimplemented in openlsm.autoimport.commonimport.LSMImportAbstract.
boolean openlsd.appli.autoimport.commonimport.LSDImportAbstract.initOneFileOption | ( | int | curargs, | |
String[] | args | |||
) | [protected, inherited] |
Init one File option form args and current position (must be override)
curargs | ||
args |
boolean openlsd.appli.autoimport.commonimport.LSDImportAbstract.initRegisterFile | ( | ) | [inherited] |
Create OK and KO files
static void openlsd.appli.autoimport.commonimport.LSDImportAbstract.registerFalseFile | ( | LSDExtQueueMember | member, | |
String | message | |||
) | [static, inherited] |
Register a File as member as False import
member | ||
message |
static void openlsd.appli.autoimport.commonimport.LSDImportAbstract.registerFalseFile | ( | String | filename, | |
String | message | |||
) | [static, inherited] |
Register a File as filename as False import
filename | ||
message |
static void openlsd.appli.autoimport.commonimport.LSDImportAbstract.registerTrueFile | ( | LSDExtQueueMember | member, | |
boolean | createOKFile | |||
) | [static, inherited] |
Register a File as True import
member | ||
createOKFile |
boolean openlsd.appli.autoimport.commonimport.LSDImportAbstract.initOptionsAuto | ( | String[] | args, | |
int | curargs | |||
) | [protected, inherited] |
Finalize Init options from args for AutoImport
args | ||
curargs |
boolean openlsd.appli.autoimport.commonimport.LSDImportAbstract.initConnection | ( | ) | [protected, inherited] |
InitConnection. Must be followed later on by joinConnection()
Reimplemented in openlsm.autoimport.commonimport.LSMImportAbstract.
boolean openlsd.appli.autoimport.commonimport.LSDImportAbstract.prepareImportQueue | ( | ) | [protected, inherited] |
Prepare the Import Queue
Reimplemented in openlsd.server.autoimport.commonimport.LSDServerImportAbstract, and openlsm.autoimport.commonimport.LSMImportAbstract.
boolean openlsd.appli.autoimport.commonimport.LSDImportAbstract.joinConnection | ( | ) | [protected, inherited] |
Finalize connection if they are pending
boolean openlsd.appli.autoimport.commonimport.LSDImportAbstract.errorFromPrepareImportQueue | ( | ) | [protected, inherited] |
Set the error status from prepareImportQueue
boolean openlsd.appli.autoimport.commonimport.LSDImportAbstract.finalizeAfterImport | ( | ) | [protected, inherited] |
Finalize status and object after import and close LSD connections
Reimplemented in openlsm.autoimport.commonimport.LSMImportAbstract.
boolean openlsd.appli.autoimport.commonimport.LSDImportAbstract.finishAfterAutoImport | ( | ) | [protected, inherited] |
Finalize status and object after import for AutoImport
Reimplemented in openlsm.autoimport.commonimport.LSMImportAbstract.
boolean openlsd.appli.autoimport.commonimport.LSDImportAbstract.finalizeAfterAutoImport | ( | ) | [protected, inherited] |
Finalize and close LSD connections for AutoImport
boolean openlsd.appli.autoimport.commonimport.LSDImportAbstract.finalizeConnection | ( | ) | [protected, inherited] |
Finalize connection (database)
Reimplemented in openlsm.autoimport.commonimport.LSMImportAbstract.
void openlsd.appli.autoimport.commonimport.LSDImportAbstract.finalizeRegisterFile | ( | ) | [protected, inherited] |
Finalize registered files for OK and KO
boolean openlsd.appli.autoimport.commonimport.LSDImportAbstract.getClientPutInfo | ( | LSDDbLegacy | legacy, | |
boolean | compressedClient, | |||
boolean | keepalived | |||
) | [protected, inherited] |
Get a LSDClientPut and LSDClientInfo and LSDClientDelete for the Legacy and using the extension of PutSessionHandler and InfoSessionHandler.
legacy | ||
compressedClient | ||
keepalived |
boolean openlsd.appli.autoimport.commonimport.LSDImportAbstract.getClientPutInfoFromIpPort | ( | LSDDbLegacy | legacy, | |
LSDDbIpPort | ipportUser1, | |||
LSDDbIpPort | ipportProt1, | |||
boolean | keepalived | |||
) | [protected, inherited] |
Get a LSDClientPut and LSDClientInfo and LSDClientDelete for the Legacy and using the extension of PutSessionHandler and InfoSessionHandler.
legacy | ||
ipportUser1 | ||
ipportProt1 | ||
keepalived |
LSDDbLegacy openlsd.appli.autoimport.commonimport.LSDImportAbstract.getLegacy | ( | long | lid | ) | [protected, inherited] |
Get the Legacy corresponding to the Legacy lid
lid |
LSDDbIpPort openlsd.appli.autoimport.commonimport.LSDImportAbstract.getIpPortC | ( | LSDDbLegacy | legacy | ) | [protected, inherited] |
Get the IpPort correspondig to the Legacy for Compress
legacy |
LSDDbIpPort openlsd.appli.autoimport.commonimport.LSDImportAbstract.getIpPortP | ( | LSDDbLegacy | legacy | ) | [protected, inherited] |
Get the IpPort correspondig to the Legacy for Protected
legacy |
LSDDbAdmin openlsd.appli.autoimport.commonimport.LSDImportAbstract.admin = null [protected, inherited] |
DB Admin object
LSDLoadConfig openlsd.appli.autoimport.commonimport.LSDImportAbstract.llc = null [protected, inherited] |
LoadConfig from file
boolean openlsd.appli.autoimport.commonimport.LSDImportAbstract.isSameLid = false [protected, inherited] |
Does this Import using the same Legacy for all files
long openlsd.appli.autoimport.commonimport.LSDImportAbstract.sameLid = LSDConstants.invalide_idx [protected, inherited] |
If Same Legacy, which Legacy Id
LSDDbLegacy openlsd.appli.autoimport.commonimport.LSDImportAbstract.sameLegacy = null [protected, inherited] |
If Same Legacy, which Legacy Object
boolean openlsd.appli.autoimport.commonimport.LSDImportAbstract.todelete = true [protected, inherited] |
Does the file after successful import should be deleted
int openlsd.appli.autoimport.commonimport.LSDImportAbstract.option = -1 [protected, inherited] |
Which mode: 0 = file lid idb, 1 = dir extension, 2 = sourcefile
String openlsd.appli.autoimport.commonimport.LSDImportAbstract.file0 = null [protected, inherited] |
Mode 0: the file
long openlsd.appli.autoimport.commonimport.LSDImportAbstract.lid0 = LSDConstants.invalide_idx [protected, inherited] |
Mode 0: the Legacy Id
LSDBusiness openlsd.appli.autoimport.commonimport.LSDImportAbstract.lsdb = null [protected, inherited] |
Mode 0: the ID Business
LSDExtClientInfo openlsd.appli.autoimport.commonimport.LSDImportAbstract.lci = null [protected, inherited] |
Info Client
LSDClientPut openlsd.appli.autoimport.commonimport.LSDImportAbstract.lcp = null [protected, inherited] |
Put Client
LSDClientDelete openlsd.appli.autoimport.commonimport.LSDImportAbstract.lcd = null [protected, inherited] |
Delete Client
String openlsd.appli.autoimport.commonimport.LSDImportAbstract.passwd = null [protected, inherited] |
Password for Delete Client
String openlsd.appli.autoimport.commonimport.LSDImportAbstract.dir1 = null [protected, inherited] |
Mode 1: Directory
String openlsd.appli.autoimport.commonimport.LSDImportAbstract.ext1 = null [protected, inherited] |
Mode 1: Extension
String openlsd.appli.autoimport.commonimport.LSDImportAbstract.source2 = null [protected, inherited] |
Mode 2: Source filename
boolean openlsd.appli.autoimport.commonimport.LSDImportAbstract.blockmode = false [protected, inherited] |
Mode block
ConcurrentLinkedQueue<LSDExtQueueMember> openlsd.appli.autoimport.commonimport.LSDImportAbstract.todoQueue = null [protected, inherited] |
Queue of files to import in non block mode
ConcurrentLinkedQueue<LSDExtQueueMembers> openlsd.appli.autoimport.commonimport.LSDImportAbstract.todoQueueB = null [protected, inherited] |
Queue of files to import in block mode
ConcurrentLinkedQueue<LSDExtQueueMember> openlsd.appli.autoimport.commonimport.LSDImportAbstract.doneQueue = null [protected, inherited] |
Queue of imported files
int openlsd.appli.autoimport.commonimport.LSDImportAbstract.nbFile = 1 [protected, inherited] |
Number of Files
long openlsd.appli.autoimport.commonimport.LSDImportAbstract.KO = 0 [static, protected, inherited] |
Number of KO files
int openlsd.appli.autoimport.commonimport.LSDImportAbstract.nbthread = 1 [protected, inherited] |
Number of threads
boolean openlsd.appli.autoimport.commonimport.LSDImportAbstract.istesting = false [static, protected, inherited] |
test only
String openlsd.appli.autoimport.commonimport.LSDImportAbstract.extidb = null [protected, inherited] |
test only
Date openlsd.appli.autoimport.commonimport.LSDImportAbstract.date_debut = null [static, protected, inherited] |
test only
boolean openlsd.appli.autoimport.commonimport.LSDImportAbstract.sameDbConnMyltithread = false [protected, inherited] |
Is DB Conn using thread shared connection
boolean openlsd.appli.autoimport.commonimport.LSDImportAbstract.async = false [protected, inherited] |
Should the connection done as async (join with a future)
boolean openlsd.appli.autoimport.commonimport.LSDImportAbstract.isCompressed = false [protected, inherited] |
Using compression
LSDClientPut [] openlsd.appli.autoimport.commonimport.LSDImportAbstract.lcps = null [protected, inherited] |
Client connections
LSDDbAdmin [] openlsd.appli.autoimport.commonimport.LSDImportAbstract.dbconns = null [protected, inherited] |
Database connections
File [] openlsd.appli.autoimport.commonimport.LSDImportAbstract.listFiles = null [protected, inherited] |
List of files from -dir option
LinkedList<String> openlsd.appli.autoimport.commonimport.LSDImportAbstract.listline = null [protected, inherited] |
List of line from -source option
ConcurrentLinkedQueue<LSDExtQueueMember> [] openlsd.appli.autoimport.commonimport.LSDImportAbstract.todoQueues = null [protected, inherited] |
todo Queues for non block mode
ConcurrentLinkedQueue<LSDExtQueueMembers> [] openlsd.appli.autoimport.commonimport.LSDImportAbstract.todoQueuesB = null [protected, inherited] |
todo Queues for block mode
ConcurrentLinkedQueue<LSDExtQueueMember> openlsd.appli.autoimport.commonimport.LSDImportAbstract.todoQueueLocal = null [protected, inherited] |
todo local Queue for non block mode
ConcurrentLinkedQueue<LSDExtQueueMembers> openlsd.appli.autoimport.commonimport.LSDImportAbstract.todoQueueBLocal = null [protected, inherited] |
todo local Queue for block mode
LinkedList<String> openlsd.appli.autoimport.commonimport.LSDImportAbstract.errorList = null [protected, inherited] |
List of files in error from init part
String openlsd.appli.autoimport.commonimport.LSDImportAbstract.extStop = null [protected, inherited] |
File that stops the process when it exists for AutoImport
boolean openlsd.appli.autoimport.commonimport.LSDImportAbstract.use2Out = false [static, protected, inherited] |
Should we use two files as exit (OK and KO) or one KO by file
String openlsd.appli.autoimport.commonimport.LSDImportAbstract.filename2Out = null [protected, inherited] |
Basename for 2out files
FileWriter openlsd.appli.autoimport.commonimport.LSDImportAbstract.fileOK = null [static, protected, inherited] |
FileWriter for OK status if use2Out is true
FileWriter openlsd.appli.autoimport.commonimport.LSDImportAbstract.fileKO = null [static, protected, inherited] |
FileWriter for KO status if use2Out is true
long openlsd.appli.autoimport.commonimport.LSDImportAbstract.countKO = 0 [static, protected, inherited] |
Number of KO files
long openlsd.appli.autoimport.commonimport.LSDImportAbstract.countOK = 0 [static, protected, inherited] |
Number of OK files
long openlsd.appli.autoimport.commonimport.LSDImportAbstract.targetIdip = LSDConstants.invalide_idx [inherited] |
Target if any by default (implies the use of -samelid option) (ML Support)
final String openlsd.appli.autoimport.commonimport.LSDImportAbstract.extOK = ".ok" [static, inherited] |
Extension for OK files
final String openlsd.appli.autoimport.commonimport.LSDImportAbstract.extKO = ".ko" [static, inherited] |
Extension for KO files