Index: dna-jcr/src/main/java/org/jboss/dna/jcr/JcrConfiguration.java =================================================================== --- dna-jcr/src/main/java/org/jboss/dna/jcr/JcrConfiguration.java (revision 906) +++ dna-jcr/src/main/java/org/jboss/dna/jcr/JcrConfiguration.java (working copy) @@ -180,7 +180,7 @@ * @param option the option to be set * @return the interface used to set the value for the property; never null */ - OptionSetter with( JcrRepository.Options option ); + OptionSetter with( JcrRepository.Option option ); } /** @@ -240,7 +240,7 @@ super(path, returnObject); } - public OptionSetter> with( final JcrRepository.Options option ) { + public OptionSetter> with( final JcrRepository.Option option ) { final Path optionsPath = createOrReplaceNode(path(), DnaLexicon.OPTIONS); final JcrRepositoryDetails details = this; Index: dna-jcr/src/main/java/org/jboss/dna/jcr/JcrEngine.java =================================================================== --- dna-jcr/src/main/java/org/jboss/dna/jcr/JcrEngine.java (revision 906) +++ dna-jcr/src/main/java/org/jboss/dna/jcr/JcrEngine.java (working copy) @@ -41,7 +41,7 @@ import org.jboss.dna.graph.property.PathFactory; import org.jboss.dna.graph.property.PathNotFoundException; import org.jboss.dna.graph.property.Property; -import org.jboss.dna.jcr.JcrRepository.Options; +import org.jboss.dna.jcr.JcrRepository.Option; import org.jboss.dna.repository.DnaEngine; import org.jboss.dna.repository.RepositoryService; import org.jboss.dna.repository.observation.ObservationService; @@ -142,7 +142,7 @@ * Extract the JCR options from the configuration graph */ String configurationName = dnaEngine.getRepositoryService().getConfigurationSourceName(); - Map options = new HashMap(); + Map options = new HashMap(); PathFactory pathFactory = getExecutionContext().getValueFactories().getPathFactory(); Graph configuration = Graph.create(connectionFactory.createConnection(configurationName), getExecutionContext()); @@ -167,7 +167,7 @@ Node optionNode = configuration.getNodeAt(optionLocation); Property valueProperty = optionNode.getProperty(DnaLexicon.VALUE); - options.put(Options.valueOf(segment.getName().getLocalName()), + options.put(Option.valueOf(segment.getName().getLocalName()), valueProperty.getFirstValue().toString()); } Index: dna-jcr/src/main/java/org/jboss/dna/jcr/JcrRepository.java =================================================================== --- dna-jcr/src/main/java/org/jboss/dna/jcr/JcrRepository.java (revision 898) +++ dna-jcr/src/main/java/org/jboss/dna/jcr/JcrRepository.java (working copy) @@ -77,7 +77,7 @@ /** * The available options for the {@code JcrRepository}. */ - public enum Options { + public enum Option { /** * Flag that defines whether or not the node types should be exposed as content under the "{@code @@ -96,7 +96,7 @@ /** * The default values for each of the {@link Options}. */ - public static class DefaultOptions { + public static class DefaultOption { /** * The default value for the {@link Options#PROJECT_NODE_TYPES} option is {@value} . */ @@ -111,14 +111,14 @@ /** * The static unmodifiable map of default options, which are initialized in the static initializer. */ - protected static final Map DEFAULT_OPTIONS; + protected static final Map DEFAULT_OPTIONS; static { // Initialize the unmodifiable map of default options ... - EnumMap defaults = new EnumMap(Options.class); - defaults.put(Options.PROJECT_NODE_TYPES, DefaultOptions.PROJECT_NODE_TYPES); - defaults.put(Options.JAAS_LOGIN_CONFIG_NAME, DefaultOptions.JAAS_LOGIN_CONFIG_NAME); - DEFAULT_OPTIONS = Collections.unmodifiableMap(defaults); + EnumMap defaults = new EnumMap(Option.class); + defaults.put(Option.PROJECT_NODE_TYPES, DefaultOption.PROJECT_NODE_TYPES); + defaults.put(Option.JAAS_LOGIN_CONFIG_NAME, DefaultOption.JAAS_LOGIN_CONFIG_NAME); + DEFAULT_OPTIONS = Collections.unmodifiableMap(defaults); } private final String sourceName; @@ -126,7 +126,7 @@ private final ExecutionContext executionContext; private final RepositoryConnectionFactory connectionFactory; private final RepositoryNodeTypeManager repositoryTypeManager; - private final Map options; + private final Map options; /** * Creates a JCR repository that uses the supplied {@link RepositoryConnectionFactory repository connection factory} to @@ -160,7 +160,7 @@ RepositoryConnectionFactory connectionFactory, String repositorySourceName, Map descriptors, - Map options ) { + Map options ) { CheckArg.isNotNull(executionContext, "executionContext"); CheckArg.isNotNull(connectionFactory, "connectionFactory"); CheckArg.isNotNull(repositorySourceName, "repositorySourceName"); @@ -217,7 +217,7 @@ this.options = DEFAULT_OPTIONS; } else { // Initialize with defaults, then add supplied options ... - EnumMap localOptions = new EnumMap(DEFAULT_OPTIONS); + EnumMap localOptions = new EnumMap(DEFAULT_OPTIONS); localOptions.putAll(options); this.options = Collections.unmodifiableMap(localOptions); } @@ -237,7 +237,7 @@ * * @return the unmodifiable options; never null */ - public Map getOptions() { + public Map getOptions() { return options; } @@ -360,7 +360,7 @@ } catch (NoSuchMethodException error2) { if (credentials instanceof SimpleCredentials) { SimpleCredentials simple = (SimpleCredentials)credentials; - execContext = executionContext.with(options.get(Options.JAAS_LOGIN_CONFIG_NAME), + execContext = executionContext.with(options.get(Option.JAAS_LOGIN_CONFIG_NAME), simple.getUserID(), simple.getPassword()); } else { Index: dna-jcr/src/main/java/org/jboss/dna/jcr/JcrWorkspace.java =================================================================== --- dna-jcr/src/main/java/org/jboss/dna/jcr/JcrWorkspace.java (revision 898) +++ dna-jcr/src/main/java/org/jboss/dna/jcr/JcrWorkspace.java (working copy) @@ -59,7 +59,7 @@ import org.jboss.dna.graph.property.basic.GraphNamespaceRegistry; import org.jboss.dna.jcr.JcrContentHandler.EnclosingSAXException; import org.jboss.dna.jcr.JcrContentHandler.SaveMode; -import org.jboss.dna.jcr.JcrRepository.Options; +import org.jboss.dna.jcr.JcrRepository.Option; import org.xml.sax.ContentHandler; import org.xml.sax.InputSource; import org.xml.sax.SAXException; @@ -171,7 +171,7 @@ this.nodeTypeManager = new JcrNodeTypeManager(session.getExecutionContext(), repoTypeManager); this.queryManager = new JcrQueryManager(this.session); - if (Boolean.valueOf(repository.getOptions().get(Options.PROJECT_NODE_TYPES))) { + if (Boolean.valueOf(repository.getOptions().get(Option.PROJECT_NODE_TYPES))) { Path parentOfTypeNodes = context.getValueFactories().getPathFactory().create(systemPath, JcrLexicon.NODE_TYPES); repoTypeManager.projectOnto(this.graph, parentOfTypeNodes); } Index: dna-jcr/src/test/java/org/jboss/dna/jcr/InMemoryRepositoryStub.java =================================================================== --- dna-jcr/src/test/java/org/jboss/dna/jcr/InMemoryRepositoryStub.java (revision 906) +++ dna-jcr/src/test/java/org/jboss/dna/jcr/InMemoryRepositoryStub.java (working copy) @@ -34,7 +34,7 @@ import org.jboss.dna.graph.connector.inmemory.InMemoryRepositorySource; import org.jboss.dna.graph.io.GraphImporter; import org.jboss.dna.graph.property.Path; -import org.jboss.dna.jcr.JcrRepository.Options; +import org.jboss.dna.jcr.JcrRepository.Option; import org.jboss.security.config.IDTrustConfiguration; /** @@ -72,7 +72,7 @@ .addRepository("JCR Repository") .usingClass(InMemoryRepositorySource.class.getName()) .loadedFromClasspath() - .with(Options.PROJECT_NODE_TYPES).setTo(Boolean.FALSE.toString()) + .with(Option.PROJECT_NODE_TYPES).setTo(Boolean.FALSE.toString()) .describedAs("JCR Repository") .with("name").setTo(REPOSITORY_SOURCE_NAME) .and().build(); Index: dna-jcr/src/test/java/org/jboss/dna/jcr/JcrConfigurationTest.java =================================================================== --- dna-jcr/src/test/java/org/jboss/dna/jcr/JcrConfigurationTest.java (revision 906) +++ dna-jcr/src/test/java/org/jboss/dna/jcr/JcrConfigurationTest.java (working copy) @@ -39,7 +39,7 @@ import org.jboss.dna.graph.connector.inmemory.InMemoryRepositorySource; import org.jboss.dna.graph.mimetype.ExtensionBasedMimeTypeDetector; import org.jboss.dna.graph.property.Path; -import org.jboss.dna.jcr.JcrRepository.Options; +import org.jboss.dna.jcr.JcrRepository.Option; import org.jboss.dna.repository.DnaConfiguration; import org.jboss.dna.repository.DnaEngine; import org.jboss.dna.repository.RepositoryLibrary; @@ -265,7 +265,7 @@ .addRepository("Source2") .usingClass(InMemoryRepositorySource.class.getName()) .loadedFromClasspath() - .with(Options.JAAS_LOGIN_CONFIG_NAME).setTo("test") + .with(Option.JAAS_LOGIN_CONFIG_NAME).setTo("test") .describedAs("description") .with("name").setTo("JCR Repository") .and() @@ -282,9 +282,9 @@ JcrRepository repository = engine.getRepository("JCR Repository"); - Map options = new HashMap(); - options.put(Options.JAAS_LOGIN_CONFIG_NAME, "test"); - options.put(Options.PROJECT_NODE_TYPES, "false"); + Map options = new HashMap(); + options.put(Option.JAAS_LOGIN_CONFIG_NAME, "test"); + options.put(Option.PROJECT_NODE_TYPES, "false"); assertThat(repository.getOptions(), is(options)); } Index: dna-jcr/src/test/java/org/jboss/dna/jcr/JcrRepositoryTest.java =================================================================== --- dna-jcr/src/test/java/org/jboss/dna/jcr/JcrRepositoryTest.java (revision 886) +++ dna-jcr/src/test/java/org/jboss/dna/jcr/JcrRepositoryTest.java (working copy) @@ -156,8 +156,8 @@ @Test public void shouldHaveDefaultOptionsWhenNotOverridden() { JcrRepository repository = new JcrRepository(context, connectionFactory, sourceName, descriptors, null); - assertThat(repository.getOptions().get(JcrRepository.Options.PROJECT_NODE_TYPES), - is(JcrRepository.DefaultOptions.PROJECT_NODE_TYPES)); + assertThat(repository.getOptions().get(JcrRepository.Option.PROJECT_NODE_TYPES), + is(JcrRepository.DefaultOption.PROJECT_NODE_TYPES)); } @Test Index: dna-jcr/src/test/java/org/jboss/dna/jcr/MixinTest.java =================================================================== --- dna-jcr/src/test/java/org/jboss/dna/jcr/MixinTest.java (revision 886) +++ dna-jcr/src/test/java/org/jboss/dna/jcr/MixinTest.java (working copy) @@ -93,7 +93,7 @@ private RepositoryConnectionFactory connectionFactory; private RepositoryNodeTypeManager repoTypeManager; private Map sessionAttributes; - private Map options; + private Map options; private NamespaceRegistry registry; @Mock private JcrRepository repository; @@ -152,8 +152,8 @@ stub(repository.getConnectionFactory()).toReturn(connectionFactory); // Stub out the repository options ... - options = new EnumMap(JcrRepository.Options.class); - options.put(JcrRepository.Options.PROJECT_NODE_TYPES, Boolean.FALSE.toString()); + options = new EnumMap(JcrRepository.Option.class); + options.put(JcrRepository.Option.PROJECT_NODE_TYPES, Boolean.FALSE.toString()); stub(repository.getOptions()).toReturn(options); // Set up the session attributes ... Index: dna-jcr/src/test/java/org/jboss/dna/jcr/RepositoryNodeTypeManagerTest.java =================================================================== --- dna-jcr/src/test/java/org/jboss/dna/jcr/RepositoryNodeTypeManagerTest.java (revision 886) +++ dna-jcr/src/test/java/org/jboss/dna/jcr/RepositoryNodeTypeManagerTest.java (working copy) @@ -73,7 +73,7 @@ private RepositoryConnectionFactory connectionFactory; private RepositoryNodeTypeManager repoTypeManager; private Map sessionAttributes; - private Map options; + private Map options; @Mock private JcrRepository repository; @@ -135,8 +135,8 @@ stub(repository.getConnectionFactory()).toReturn(connectionFactory); // Stub out the repository options ... - options = new EnumMap(JcrRepository.Options.class); - options.put(JcrRepository.Options.PROJECT_NODE_TYPES, Boolean.TRUE.toString()); + options = new EnumMap(JcrRepository.Option.class); + options.put(JcrRepository.Option.PROJECT_NODE_TYPES, Boolean.TRUE.toString()); stub(repository.getOptions()).toReturn(options); // Set up the session attributes ...