875 |
} |
} |
876 |
|
|
877 |
/** |
/** |
878 |
|
* This task gets a list of all instrument files in the database |
879 |
|
* that that doesn't exist in the filesystem. |
880 |
|
*/ |
881 |
|
public static class FindLostInstrumentFiles extends EnhancedTask<String[]> { |
882 |
|
|
883 |
|
/** |
884 |
|
* Creates a new instance of <code>FindLostInstrumentFiles</code>. |
885 |
|
*/ |
886 |
|
public |
887 |
|
FindLostInstrumentFiles() { |
888 |
|
setTitle("InstrumentsDb.FindLostInstrumentFiles_task"); |
889 |
|
setDescription(i18n.getMessage("InstrumentsDb.FindLostInstrumentFiles.desc")); |
890 |
|
} |
891 |
|
|
892 |
|
/** The entry point of the task. */ |
893 |
|
public void |
894 |
|
run() { |
895 |
|
try { setResult(CC.getClient().findLostDbInstrumentFiles()); } |
896 |
|
catch(Exception x) { |
897 |
|
setErrorMessage(getDescription() + ": " + HF.getErrorMessage(x)); |
898 |
|
CC.getLogger().log(Level.FINE, getErrorMessage(), x); |
899 |
|
} |
900 |
|
} |
901 |
|
} |
902 |
|
|
903 |
|
/** |
904 |
|
* This task substitutes all occurrences of the specified instrument file |
905 |
|
* in the database, with the specified new path. |
906 |
|
*/ |
907 |
|
public static class SetInstrumentFilePath extends EnhancedTask { |
908 |
|
private String oldPath; |
909 |
|
private String newPath; |
910 |
|
|
911 |
|
/** |
912 |
|
* Creates a new instance of <code>SetInstrumentFilePath</code>. |
913 |
|
* @param oldPath The absolute path name of the instrument file to substitute. |
914 |
|
* @param newPath The new absolute path name. |
915 |
|
*/ |
916 |
|
public |
917 |
|
SetInstrumentFilePath(String oldPath, String newPath) { |
918 |
|
setTitle("InstrumentsDb.SetInstrumentFilePath_task"); |
919 |
|
setDescription(i18n.getMessage("InstrumentsDb.SetInstrumentFilePath.desc")); |
920 |
|
this.oldPath = oldPath; |
921 |
|
this.newPath = newPath; |
922 |
|
} |
923 |
|
|
924 |
|
/** The entry point of the task. */ |
925 |
|
public void |
926 |
|
run() { |
927 |
|
try { CC.getClient().setDbInstrumentFilePath(oldPath, newPath); } |
928 |
|
catch(Exception x) { |
929 |
|
setErrorMessage(getDescription() + ": " + HF.getErrorMessage(x)); |
930 |
|
CC.getLogger().log(Level.FINE, getErrorMessage(), x); |
931 |
|
} |
932 |
|
} |
933 |
|
} |
934 |
|
|
935 |
|
/** |
936 |
* This task retrieves information about a scan job. |
* This task retrieves information about a scan job. |
937 |
*/ |
*/ |
938 |
public static class GetScanJobInfo extends EnhancedTask<ScanJobInfo> { |
public static class GetScanJobInfo extends EnhancedTask<ScanJobInfo> { |