use of org.knime.core.data.filestore.internal.IFileStoreHandler in project knime-core by knime.
the class FileNodePersistor method loadFileStoreHandler.
IFileStoreHandler loadFileStoreHandler(final Node node, final ExecutionMonitor execMon, final NodeSettingsRO settings, final WorkflowDataRepository workflowDataRepository) throws InvalidSettingsException {
if (getLoadVersion().isOlderThan(LoadVersion.V260)) {
return new EmptyFileStoreHandler(workflowDataRepository);
}
NodeSettingsRO fsSettings = settings.getNodeSettings("filestores");
String dirNameInFlow = fsSettings.getString("file_store_location");
if (dirNameInFlow == null) {
return new EmptyFileStoreHandler(workflowDataRepository);
} else {
String uuidS = fsSettings.getString("file_store_id");
UUID uuid = UUID.fromString(uuidS);
ReferencedFile subDirFile = new ReferencedFile(getNodeDirectory(), dirNameInFlow);
IFileStoreHandler fsh = WriteFileStoreHandler.restore(node.getName(), uuid, workflowDataRepository, subDirFile.getFile());
return fsh;
}
}
use of org.knime.core.data.filestore.internal.IFileStoreHandler in project knime-core by knime.
the class WorkflowDataRepository method removeFileStoreHandler.
@Override
public void removeFileStoreHandler(final IWriteFileStoreHandler handler) {
final UUID storeUUID = handler.getStoreUUID();
if (storeUUID != null) {
IFileStoreHandler old = m_handlerMap.remove(storeUUID);
if (old == null) {
throw new IllegalArgumentException("No such file store hander: " + handler);
}
LOGGER.debug("Removing handler " + handler + " - " + m_handlerMap.size() + " remaining");
}
}
use of org.knime.core.data.filestore.internal.IFileStoreHandler in project knime-core by knime.
the class WorkflowDataRepository method printValidFileStoreHandlersToLogDebug.
@Override
public void printValidFileStoreHandlersToLogDebug() {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Valid file store handlers are:");
LOGGER.debug("--------- Start --------------");
for (IFileStoreHandler fsh : m_handlerMap.values()) {
LOGGER.debug(" " + fsh);
}
LOGGER.debug("--------- End ----------------");
}
}
Aggregations