context.setProgress(monitor); context.setState(ImportContext.State.RUNNING);
public void run(ImportContext context, ImportFilter filter, ProgressMonitor monitor) throws IOException { context.setProgress(monitor); context.setState(ImportContext.State.RUNNING);
public ImportContext createContext(ImportData data, WorkspaceInfo targetWorkspace, StoreInfo targetStore, ProgressMonitor monitor) throws IOException { ImportContext context = new ImportContext(); context.setProgress(monitor); context.setData(data); if (targetWorkspace == null && targetStore != null) { targetWorkspace = targetStore.getWorkspace(); } if (targetWorkspace == null) { targetWorkspace = catalog.getDefaultWorkspace(); } context.setTargetWorkspace(targetWorkspace); context.setTargetStore(targetStore); init(context); if (!context.progress().isCanceled()) { contextStore.add(context); } //JD: don't think we really need to maintain these, and they aren't persisted //else { // context.setState(ImportContext.State.CANCELLED); //} return context; }
public ImportContext createContext( ImportData data, WorkspaceInfo targetWorkspace, StoreInfo targetStore, ProgressMonitor monitor) throws IOException { ImportContext context = new ImportContext(); context.setProgress(monitor); context.setData(data); if (targetWorkspace == null && targetStore != null) { targetWorkspace = targetStore.getWorkspace(); } if (targetWorkspace == null) { targetWorkspace = catalog.getDefaultWorkspace(); } context.setTargetWorkspace(targetWorkspace); context.setTargetStore(targetStore); init(context); if (!context.progress().isCanceled()) { contextStore.add(context); } // JD: don't think we really need to maintain these, and they aren't persisted // else { // context.setState(ImportContext.State.CANCELLED); // } return context; }