public ScriptRepositoryI(ObjectAdapter oa, Registry reg, Executor ex, Principal p, ScriptRepoHelper helper, ReadOnlyStatus readOnly, PublicRepositoryI servant, Set<String> scriptRepoUuids) { super(oa, reg, ex, p, helper.getScriptDir(), readOnly, servant); this.helper = helper; scriptRepoUuids.add(helper.getUuid()); }
@SuppressWarnings("unchecked") public LutProviderImpl( ScriptRepoHelper scriptRepoHelper, ScriptFileType lutType) { File root = new File(scriptRepoHelper.getScriptDir()); Iterator<File> scripts = FileUtils.iterateFiles( root, lutType.getFileFilter(), TrueFileFilter.TRUE); while (scripts.hasNext()) { RepoFile script = new RepoFile(root, scripts.next()); String basename = script.basename(); try { lutReaders.put( basename, LutReaderFactory.read(script.file())); log.debug("Successfully added LUT '{}'", basename); } catch (Exception e) { log.warn("Cannot read lookup table: '{}'", script.fullname(), e); } } log.info("Successfully added {} LUTs", lutReaders.size()); }