private final class LoadSourceDataWorkFlow {
private volatile LoadSourceDataInput input;
public void setInput(LoadSourceDataInput input) {
WaitLock wait = page.getWaitService().startWait(50);
try {
if (input instanceof LoadSourceDataFileInput) {
// TODO: We should really add the file to the filestore only if the call succeeds.
// For now we just check that the file exists.
File file = ((LoadSourceDataFileInput) input).getFile();
if (file.isFile()) {
testFileStore.update(file);
}
}
this.input = input;
} finally {
wait.release();
}
}