openlsd.server.admin.commoncheck.LSDCheckSimilarAbstract Class Reference

Inheritance diagram for openlsd.server.admin.commoncheck.LSDCheckSimilarAbstract:

Inheritance graph
[legend]
Collaboration diagram for openlsd.server.admin.commoncheck.LSDCheckSimilarAbstract:

Collaboration graph
[legend]

List of all members.


Detailed Description

This abstract class is about to check if a specific file is already inserted in one specific Legacy of OpenLSD. It checks first the existence of one file with same length and MD5, then, if there is at least one, it checks if the files are really the same.
WARNING: This function is only compatible with not crypted Legacy!

WARNING: This function needs (for efficiency) to add the index IDX_DOC_LIDSIZEDOCMD5 in the database.

Author:
Frederic BREGIER LGPL 2008

Public Member Functions

LSDExtDbDocument getIfExists (String filepath)
LSDExtDbDocument getIfExists (File file)
void clean ()

Protected Attributes

LSDDbAdmin admin = null
LSDLegacy lsdlegacy = null

Static Private Member Functions

static boolean compareFile (File fileSrc, String fileLSD)

Member Function Documentation

LSDExtDbDocument openlsd.server.admin.commoncheck.LSDCheckSimilarAbstract.getIfExists ( String  filepath  ) 

Returns the Document if it exists, else null

Parameters:
filepath 
Returns:
the Document if it exists, else null

LSDExtDbDocument openlsd.server.admin.commoncheck.LSDCheckSimilarAbstract.getIfExists ( File  file  ) 

Returns the Document if it exists, else null

Parameters:
file to check if it exists
Returns:
the Document if it exists, else null

static boolean openlsd.server.admin.commoncheck.LSDCheckSimilarAbstract.compareFile ( File  fileSrc,
String  fileLSD 
) [static, private]

Compares two files (one File, one path to the LSD File)

Parameters:
fileSrc 
fileLSD 
Returns:
True if both files are similar

void openlsd.server.admin.commoncheck.LSDCheckSimilarAbstract.clean (  ) 

Clean object

Reimplemented in openlsd.server.admin.LSDCheckSimilar.


Member Data Documentation

The DBAdmin connector

The LSD Legacy object


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