namespace.setPrefix((String) entry.getKey()); namespace.setURI((String) entry.getValue()); namespace.setIsolated(isolated); catalog.add(namespace);
/** * Helper method that will make sure that the namespace associated to the provided workspace has * the same isolation. * * <p>If the associated namespace doesn't exists nothing will be done. * * @param workspace a catalog workspace */ private void syncNamespaceIsolation(WorkspaceInfo workspace) { // get the namespace associated to the workspace, may be NULL NamespaceInfo namespace = catalog.getNamespaceByPrefix(workspace.getName()); if (namespace != null && workspace.isIsolated() != namespace.isIsolated()) { // update the namespace isolation namespace.setIsolated(workspace.isIsolated()); catalog.save(namespace); } }
/** * Helper method that updates the isolation state of an workspace and the corresponding * namespace. */ protected void updateWorkspaceIsolationState(String prefix, boolean isolated) { Catalog catalog = getCatalog(); // set the workspace isolation state using the provided one WorkspaceInfo workspace = catalog.getWorkspaceByName(prefix); workspace.setIsolated(isolated); catalog.save(workspace); // set the namespace isolation state using the provided one NamespaceInfo namespace = catalog.getNamespaceByPrefix(prefix); namespace.setIsolated(isolated); catalog.save(namespace); }
ns.setPrefix(name); ns.setURI(uri); ns.setIsolated(isolated); catalog.add(ns); } else { ns.setIsolated(isolated); catalog.save(ns);
namespace.setPrefix(workspace.getName()); namespace.setURI("http://" + workspace.getName()); namespace.setIsolated(workspace.isIsolated()); catalog.add(namespace);
WorkspaceInfo workspaceInfo = (WorkspaceInfo) wsModel.getObject(); namespaceInfo.setIsolated(workspaceInfo.isIsolated());
namespace.setPrefix(workspace.getName()); namespace.setURI(nsUriTextField.getDefaultModelObjectAsString()); namespace.setIsolated(workspace.isIsolated());