|
DLESE Tools v1.6.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.dlese.dpc.schemedit.threadedservices.MonitoredTask
org.dlese.dpc.schemedit.threadedservices.ThreadedService
public abstract class ThreadedService
Provides services over collections, such as Validation and Export, that run in their own thread. Also manages reports generated by the services.
| Nested Class Summary | |
|---|---|
class |
ThreadedService.SortReports
NOT YET DOCUMENTED |
| Field Summary | |
|---|---|
protected SimpleDataStore |
dataStore
|
protected DcsDataManager |
dcsDataManager
|
protected DcsSetInfo |
dcsSetInfo
|
protected static boolean |
debug
|
protected SimpleLuceneIndex |
index
|
protected boolean |
indexOnValidation
|
protected boolean |
isProcessing
|
protected static int |
NUM_STATUS_MESSAGES
|
protected ServletContext |
servletContext
|
protected SessionBean |
sessionBean
|
protected String[] |
statuses
|
protected boolean |
stopProcessing
|
protected boolean |
validateFiles
|
| Constructor Summary | |
|---|---|
ThreadedService(ServletContext servletContext,
String threadedServiceDataDir)
Constructor for the ThreadedService object |
|
| Method Summary | |
|---|---|
protected void |
addStatusMessage(String msg)
Adds a feature to the ValidatingMessage attribute of the ThreadedService object |
protected void |
archiveServiceReport(Report report)
NOT YET DOCUMENTED |
protected String |
buildQuery(String collection,
String[] statuses)
Return a query string that will find records for the specified collection. |
void |
clearServiceReport()
NOT YET DOCUMENTED |
protected void |
clearStatusMessages()
Clear status messages |
Report |
getArchivedReport(String collection)
Gets the archivedReport attribute of the ThreadedService object |
List |
getArchivedReports()
Gets the archivedReports attribute of the ThreadedService object |
static String |
getDateStamp()
Return a string for the current time and date, sutiable for display in log files and output to standout: |
protected XMLDocReader |
getDocReader(String id)
convience method to retrieve the docReader given a record id |
protected List |
getIdList(String collection,
String[] statuses)
Build a list of record ids from the results of a query for specified collection and statuses. |
boolean |
getIndexOnValidation()
Gets the indexOnValidation attribute of the ThreadedService object |
boolean |
getIsProcessing()
Gets the isProcessing attribute of the ThreadedService object |
Report |
getServiceReport()
Gets the serviceReport attribute of the ThreadedService object |
String |
getSessionId()
Gets the sessionId attribute of the ThreadedService object |
static String |
getSimpleDateStamp()
Return a string for the current time and date, sutiable for display in log files and output to standout: |
ArrayList |
getStatusMessages()
Gets the statusMessages attribute of the ThreadedService object |
protected String |
list2delimitedString(List list,
String delimiter)
Creates a delimited string from the provided list |
protected void |
setDcsSetInfo(DcsSetInfo setInfo)
Sets the dcsSetInfo attribute of the ThreadedService object |
void |
setIndexOnValidation(boolean indexOnValidation)
Sets the indexOnValidation attribute of the ThreadedService object |
void |
setServiceReport(Report report)
Sets the serviceReport attribute of the ThreadedService object |
protected void |
setStatuses(String[] statuses)
Sets the statuses attribute of the ThreadedService object |
void |
setValidationEnabled(boolean validateFiles)
Sets whether or not to validate the files being indexed. |
void |
stopProcessing()
Halts a threaded service. |
protected void |
validate(XMLDocReader docReader,
DcsDataRecord dcsDataRecord)
NOT YET DOCUMENTED |
protected boolean |
validationIsStale(File sourceFile,
XMLDocReader docReader)
Test to see if record has been modified outside of DCS. |
| Methods inherited from class org.dlese.dpc.schemedit.threadedservices.MonitoredTask |
|---|
getTaskProgress, setTaskProgress |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static boolean debug
protected static final int NUM_STATUS_MESSAGES
protected DcsSetInfo dcsSetInfo
protected SessionBean sessionBean
protected SimpleDataStore dataStore
protected ServletContext servletContext
protected SimpleLuceneIndex index
protected DcsDataManager dcsDataManager
protected boolean validateFiles
protected boolean indexOnValidation
protected String[] statuses
protected boolean isProcessing
protected boolean stopProcessing
| Constructor Detail |
|---|
public ThreadedService(ServletContext servletContext,
String threadedServiceDataDir)
servletContext - NOT YET DOCUMENTEDthreadedServiceDataDir - NOT YET DOCUMENTED| Method Detail |
|---|
public boolean getIsProcessing()
getIsProcessing in class MonitoredTaskpublic boolean getIndexOnValidation()
protected void validate(XMLDocReader docReader,
DcsDataRecord dcsDataRecord)
docReader - NOT YET DOCUMENTEDdcsDataRecord - NOT YET DOCUMENTEDprotected XMLDocReader getDocReader(String id)
id - NOT YET DOCUMENTED
protected boolean validationIsStale(File sourceFile,
XMLDocReader docReader)
sourceFile - file on diskdocReader - the docReader
protected List getIdList(String collection,
String[] statuses)
collection - NOT YET DOCUMENTEDstatuses - NOT YET DOCUMENTED
protected String list2delimitedString(List list,
String delimiter)
list - a list to be coverteddelimiter - delimiter used to separate items
public String getSessionId()
public void stopProcessing()
protected String buildQuery(String collection,
String[] statuses)
collection - collectionKeystatuses - statuses to be included in query
protected void clearStatusMessages()
protected void addStatusMessage(String msg)
msg - The feature to be added to the ValidatingMessage attributepublic ArrayList getStatusMessages()
public Report getServiceReport()
public void setServiceReport(Report report)
report - The new serviceReport value
protected void setDcsSetInfo(DcsSetInfo setInfo)
throws Exception
setInfo - The new dcsSetInfo value
Exception - NOT YET DOCUMENTED
protected void setStatuses(String[] statuses)
throws Exception
statuses - The new statuses value
Exception - NOT YET DOCUMENTEDpublic void clearServiceReport()
protected void archiveServiceReport(Report report)
report - NOT YET DOCUMENTEDpublic Report getArchivedReport(String collection)
collection - NOT YET DOCUMENTED
public List getArchivedReports()
public void setValidationEnabled(boolean validateFiles)
validateFiles - True to validate, else false.FileIndexingServiceWriter.getValidationReport()public void setIndexOnValidation(boolean indexOnValidation)
indexOnValidation - The new indexOnValidation valuepublic static String getSimpleDateStamp()
public static String getDateStamp()
|
DLESE Tools v1.6.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||