/** * Get default workspace name. * * @return default name if there are no workspaces defined or there is no workspace present with name "default", otherwise return same name as repository name. */ public static String getDefaultWorkspace(String repositoryId) { RepositoryDefinition mapping = getRepositoryMapping(repositoryId); if (mapping == null) { return DEFAULT_WORKSPACE; } Collection<String> workspaces = mapping.getWorkspaces(); if (workspaces.contains(getMappedWorkspaceName(repositoryId))) { return repositoryId; } return DEFAULT_WORKSPACE; }