/** * Obtain all of the workspace names specified by this repository, including the {@link #getPredefinedWorkspaceNames() * predefined workspaces} and the {@link #getDefaultWorkspaceName() default workspace}. The result does <i>not</i> contain the * names of any dynamically-created workspaces (e.g., those not specified in the configuration). * * @return the set of all workspace names defined by the configuration; never null */ public Set<String> getAllWorkspaceNames() { Set<String> names = getPredefinedWorkspaceNames(); names.add(getDefaultWorkspaceName()); return names; }
/** * Obtain all of the workspace names specified by this repository, including the {@link #getPredefinedWorkspaceNames() * predefined workspaces} and the {@link #getDefaultWorkspaceName() default workspace}. The result does <i>not</i> contain the * names of any dynamically-created workspaces (e.g., those not specified in the configuration). * * @return the set of all workspace names defined by the configuration; never null */ public Set<String> getAllWorkspaceNames() { Set<String> names = getPredefinedWorkspaceNames(); names.add(getDefaultWorkspaceName()); return names; }
/** * Obtain the names of the workspaces that were listed as being predefined. This includes the name * {@link #getDefaultWorkspaceName() default workspace}. * * @return the set of predefined (non-system) workspace names; never null */ public Set<String> getPredefinedWorkspaceNames() { Set<String> names = new HashSet<String>(); Document workspaces = doc.getDocument(FieldName.WORKSPACES); if (workspaces != null) { List<?> predefined = workspaces.getArray(FieldName.PREDEFINED); if (predefined != null) { for (Object value : predefined) { if (value instanceof String) names.add((String)value); } } } names.add(getDefaultWorkspaceName()); return names; }
/** * Obtain the names of the workspaces that were listed as being predefined. This includes the name * {@link #getDefaultWorkspaceName() default workspace}. * * @return the set of predefined (non-system) workspace names; never null */ public Set<String> getPredefinedWorkspaceNames() { Set<String> names = new HashSet<String>(); Document workspaces = doc.getDocument(FieldName.WORKSPACES); if (workspaces != null) { List<?> predefined = workspaces.getArray(FieldName.PREDEFINED); if (predefined != null) { for (Object value : predefined) { if (value instanceof String) names.add((String)value); } } } names.add(getDefaultWorkspaceName()); return names; }
getName())); if (configuration.getDefaultWorkspaceName().equals(name)) { throw new UnsupportedOperationException(JcrI18n.unableToDestroyDefaultWorkspaceInRepository.text(name, getName()));
getName())); if (configuration.getDefaultWorkspaceName().equals(name)) { throw new UnsupportedOperationException(JcrI18n.unableToDestroyDefaultWorkspaceInRepository.text(name, getName()));
} else { this.defaultWorkspaceName = config.getDefaultWorkspaceName();
} else { this.defaultWorkspaceName = config.getDefaultWorkspaceName();