RepositoryConfiguration { public Indexes getIndexes() { return new Indexes(doc.getDocument(FieldName.INDEXES)); } RepositoryConfiguration();  RepositoryConfiguration( String name );  RepositoryConfiguration( Document document,
                                    String documentName );  RepositoryConfiguration( String name,
                                    Environment environment );  RepositoryConfiguration( Document document,
                                    String documentName,
                                    Environment environment ); static RepositoryConfiguration read( URL url ); static RepositoryConfiguration read( File file ); static RepositoryConfiguration read( InputStream stream,
                                                String name ); static RepositoryConfiguration read( String resourcePathOrJsonContentString ); String getName(); Document getDocument(); String getJndiName(); Document getPersistenceConfiguration(); long getLockTimeoutMillis(); TransactionManagerLookup getTransactionManagerLookup(); int getWorkspaceCacheSize(); Clustering getClustering(); BinaryStorage getBinaryStorage(); Journaling getJournaling(); InitialContent getInitialContent(); Reindexing getReindexing(); List<String> getNodeTypes(); static String getBuiltInSequencerClassName( String alias ); static String getBuiltInConnectorClassName( String alias ); static String getBuiltInIndexProviderClassName( String alias ); static String getBuiltInTextExtractorClassName( String alias ); boolean isCreatingWorkspacesAllowed(); int getEventBusSize(); String getDefaultWorkspaceName(); Set<String> getPredefinedWorkspaceNames(); Set<String> getAllWorkspaceNames(); Security getSecurity(); MonitoringSystem getMonitoring(); List<Component> getIndexProviders(); Indexes getIndexes(); TextExtraction getTextExtraction(); Sequencing getSequencing(); Federation getFederation(); GarbageCollection getGarbageCollection(); DocumentOptimization getDocumentOptimization(); @Override String toString(); Editor edit(); Problems validate(); Problems validate( Changes changes ); RepositoryConfiguration with( Environment environment ); RepositoryConfiguration withName( String docName ); static final String ROOT_NODE_ID; static final String SYSTEM_WORKSPACE_NAME; static final String DEFAULT_JNDI_PREFIX_OF_NAME; final static Pattern PROJECTION_PATH_EXPRESSION_PATTERN; final static Pattern INDEX_COLUMN_DEFINITIONS_PATTERN; static final String JSON_SCHEMA_URI; static final String JSON_SCHEMA_RESOURCE_PATH; }
@FixFor( "MODE-2160" ) @Test public void shouldAlwaysReturnNonNullIndexesComponentForNoIndexes() { RepositoryConfiguration config = new RepositoryConfiguration("repoName"); assertThat(config.getIndexes(), is(notNullValue())); }
@FixFor( {"MODE-2160", "MODE-2279"} ) @Test public void shouldAllowValidRepositoryConfigurationWithIndexProvidersAndNotionalIndexes() { RepositoryConfiguration config = assertValid("config/repo-config-local-provider-and-notional-indexes.json"); Indexes indexes = config.getIndexes(); EnumSet<IndexKind> found = EnumSet.noneOf(IndexKind.class); for (String indexName : indexes.getIndexNames()) { IndexDefinition defn = indexes.getIndex(indexName); IndexKind kind = defn.getKind(); found.add(kind); assertThat(kind, is(notNullValue())); } assertThat(found, is(EnumSet.allOf(IndexKind.class))); }
@FixFor( {"MODE-2160", "MODE-2279"} ) @Test public void shouldAllowValidRepositoryConfigurationWithIndexProvidersAndIndexes() { RepositoryConfiguration config = assertValid("config/repo-config-local-provider-and-indexes.json"); Indexes indexes = config.getIndexes(); for (String indexName : indexes.getIndexNames()) { IndexDefinition defn = indexes.getIndex(indexName); assertThat(defn.getKind(), is(notNullValue())); } }