/** * Builds a store. * * <p>The workspace of the resulting store is {@link #workspace} if set, else the default * workspace from the catalog. */ void buildStore(StoreInfo info, String name) { info.setName(name); info.setEnabled(true); // set workspace, falling back on default if none specified if (workspace != null) { info.setWorkspace(workspace); } else { info.setWorkspace(catalog.getDefaultWorkspace()); } }
public void add(StoreInfo store) { if (store.getWorkspace() == null) { store.setWorkspace(getDefaultWorkspace()); } validate(store, true); // TODO: remove synchronized block, need transactions StoreInfo added; synchronized (facade) { added = facade.add(resolve(store)); // if there is no default store use this one as the default if (getDefaultDataStore(store.getWorkspace()) == null && store instanceof DataStoreInfo) { setDefaultDataStore(store.getWorkspace(), (DataStoreInfo) store); } } added(added); }
public void reattach(Catalog catalog, boolean lookupByName) { if (data != null) { data.reattach(); } targetWorkspace = resolve(targetWorkspace, catalog, lookupByName); if (targetStore != null) { targetStore.setWorkspace(targetWorkspace); } targetStore = resolve(targetStore, catalog, lookupByName); for (ImportTask task : tasks) { task.setContext(this); task.reattach(catalog, lookupByName); } }
public void reattach(Catalog catalog, boolean lookupByName) { if (data != null) { data.reattach(); } if (targetWorkspace != null) { targetWorkspace = resolve(targetWorkspace, catalog, lookupByName); if (targetStore != null) { targetStore.setWorkspace(targetWorkspace); } } targetStore = resolve(targetStore, catalog, lookupByName); for (ImportTask task : tasks) { task.setContext(this); task.reattach(catalog, lookupByName); } }
final StoreInfo ps = (StoreInfo) prototype; if (parent != null) { ps.setWorkspace((WorkspaceInfo) parent);