|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jalios.jcms.fileprocessor.processingmanagement.ProcessingData
public class ProcessingData
Holder class for Files to be processed and some resulting information.
Nested Class Summary | |
---|---|
static class |
ProcessingData.Type
|
Field Summary | |
---|---|
static String |
REVISION
|
Constructor Summary | |
---|---|
ProcessingData(Repository repository,
DirectoryScanner scanner)
|
|
ProcessingData(Repository repository,
File file,
FileActionComponent.Operation operation)
|
|
ProcessingData(Repository repository,
Set<File> fileSet,
FileActionComponent.Operation operation)
|
Method Summary | |
---|---|
void |
addFile(File file)
Add a file to process |
void |
addFileIgnored(File file)
Add a file that was ignored |
void |
addFileProcessed(File file)
Add a file that was processed |
Date |
getCreationDate()
Retrieve the Date this ProcessingData was created |
File |
getCurrentFile()
Retrieve the current File being processed if any. |
int |
getFileCount()
Retrieve the number of files to be processed. |
int |
getFileIgnoredCount()
Retrieve the number of files that were ignored. |
Set<File> |
getFileIgnoredSet()
Retrieve the Set of files that were ignored |
int |
getFileProcessedCount()
Retrieve the number of files that were processed. |
Set<File> |
getFileProcessedSet()
Retrieve the Set of files that were processed |
Set<File> |
getFileSet()
Retrieve the Set of files to be processed |
FileActionComponent.Operation |
getOperation()
Retrieve the kind of Operation for which the file have been detected (create, update, delete, ... |
Date |
getProcessingEndDate()
Retrieve the date at which the processing of this Data was finished. |
Date |
getProcessingStartDate()
Retrieve the date at which the processing of this Data was started. |
Repository |
getRepository()
Retrieve the repository concerned by this Processing |
ProcessingData.Type |
getType()
Retrieve the type of processing concerned by this Processing |
boolean |
isFinished()
Check if the processing for this ProcessingData is finished. |
boolean |
isInterrupted()
Check if the processing for this ProcessingData was interrupted manually. |
boolean |
isPartialScan()
Check if a new scan of this repository should be invoked after all data of this ProcessingData have been processed. |
boolean |
isStarted()
Check if the processing for this ProcessingData was started. |
void |
setCurrentFile(File currentFile)
|
void |
setFinished()
Indicate that the processing for this ProcessingData is finished. |
void |
setInterrupted()
Indicate that the processing for this ProcessingData was interrupted manually. |
void |
setPartialScan()
Indicate a new scan of this repository should be invoked after all data of this ProcessingData have been processed. |
void |
setStarted()
Indicate that the processing for this ProcessingData has started. |
void |
waitFinished()
Wait for processing of this data to be finished. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String REVISION
Constructor Detail |
---|
public ProcessingData(Repository repository, DirectoryScanner scanner)
public ProcessingData(Repository repository, Set<File> fileSet, FileActionComponent.Operation operation)
public ProcessingData(Repository repository, File file, FileActionComponent.Operation operation)
Method Detail |
---|
public Repository getRepository()
public ProcessingData.Type getType()
public Date getCreationDate()
public FileActionComponent.Operation getOperation()
public void addFile(File file)
file
- any File, must no be nullpublic Set<File> getFileSet()
public int getFileCount()
public void addFileProcessed(File file)
file
- any File, must no be nullpublic Set<File> getFileProcessedSet()
public int getFileProcessedCount()
public void addFileIgnored(File file)
file
- any File, must no be nullpublic Set<File> getFileIgnoredSet()
public int getFileIgnoredCount()
public Date getProcessingStartDate()
public Date getProcessingEndDate()
public File getCurrentFile()
public void setCurrentFile(File currentFile)
public boolean isInterrupted()
public void setInterrupted()
This methods invokes setFinished()
to mark this data as finished and notify all waiters.
public boolean isStarted()
public void setStarted()
Fill the processing start date.
getProcessingStartDate()
public boolean isFinished()
getProcessingEndDate()
public void setFinished()
Also notify all waiters of this object
waitFinished()
public void waitFinished() throws InterruptedException
InterruptedException
Object.wait()
public void setPartialScan()
This methods is invoked if the Directory Scanning which created this processing Data was interrupted because the maximum number of files per scan was reached.
public boolean isPartialScan()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |