code: public String[] getWorkspaceNames()
     {
  
        List<ComponentAdapter<WorkspaceContainer>> adapters = repositoryContainer.getComponentAdaptersOfType(WorkspaceContainer.class);
        List<String> workspaceNames = new ArrayList<String>();
        for (int i = 0, length = adapters.size(); i < length; i++)
        {
           ComponentAdapter<WorkspaceContainer> adapter = adapters.get(i);
           String workspaceName = (String)adapter.getComponentKey();
  
           try
           {
              if (repositoryContainer.getWorkspaceContainer(workspaceName).getWorkspaceInitializer()
                 .isWorkspaceInitialized())
                 workspaceNames.add(workspaceName);
           }
           catch (Exception e)
           {
              LOG.warn(e.getLocalizedMessage());
           }
  
        }
        return workspaceNames.toArray(new String[workspaceNames.size()]);
     }
docs: {@inheritDoc}