geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r694330 - in /geronimo/gshell/trunk: gshell-application/src/main/java/org/apache/geronimo/gshell/application/settings/ gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/ gshell-model/src/main/java/org/apache/geronimo/gshell/model/sett...
Date Thu, 11 Sep 2008 16:05:59 GMT
Author: jdillon
Date: Thu Sep 11 09:05:57 2008
New Revision: 694330

URL: http://svn.apache.org/viewvc?rev=694330&view=rev
Log:
Rename Settings to SettingsModel

Added:
    geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/settings/SettingsModelLocator.java
  (contents, props changed)
      - copied, changed from r694319, geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/settings/SettingsLocator.java
    geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/settings/SettingsModel.java
  (contents, props changed)
      - copied, changed from r694319, geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/settings/Settings.java
    geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/settings/SettingsModelMarshaller.java
  (contents, props changed)
      - copied, changed from r694319, geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/settings/SettingsMarshaller.java
Removed:
    geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/settings/SettingsLocator.java
    geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/settings/Settings.java
    geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/settings/SettingsMarshaller.java
Modified:
    geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/settings/SettingsConfiguration.java
    geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/settings/SettingsManager.java
    geronimo/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/Main.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationManagerImpl.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/SettingsManagerImpl.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/builder/ShellBuilder.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/builder/ShellBuilderImpl.java

Modified: geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/settings/SettingsConfiguration.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/settings/SettingsConfiguration.java?rev=694330&r1=694329&r2=694330&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/settings/SettingsConfiguration.java
(original)
+++ geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/settings/SettingsConfiguration.java
Thu Sep 11 09:05:57 2008
@@ -21,7 +21,7 @@
 
 import org.apache.geronimo.gshell.yarn.ReflectionToStringBuilder;
 import org.apache.geronimo.gshell.yarn.ToStringStyle;
-import org.apache.geronimo.gshell.model.settings.Settings;
+import org.apache.geronimo.gshell.model.settings.SettingsModel;
 
 /**
  * Container for settings configuration.
@@ -30,14 +30,14 @@
  */
 public class SettingsConfiguration
 {
-    private Settings settings;
+    private SettingsModel model;
 
-    public Settings getSettings() {
-        return settings;
+    public SettingsModel getModel() {
+        return model;
     }
 
-    public void setSettings(final Settings settings) {
-        this.settings = settings;
+    public void setModel(final SettingsModel model) {
+        this.model = model;
     }
 
     public void validate() {

Modified: geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/settings/SettingsManager.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/settings/SettingsManager.java?rev=694330&r1=694329&r2=694330&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/settings/SettingsManager.java
(original)
+++ geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/settings/SettingsManager.java
Thu Sep 11 09:05:57 2008
@@ -19,7 +19,7 @@
 
 package org.apache.geronimo.gshell.application.settings;
 
-import org.apache.geronimo.gshell.model.settings.Settings;
+import org.apache.geronimo.gshell.model.settings.SettingsModel;
 
 /**
  * Provides the interface to manage settings.
@@ -28,7 +28,7 @@
  */
 public interface SettingsManager
 {
-    Settings getSettings();
+    SettingsModel getModel();
 
     void configure(SettingsConfiguration config) throws Exception;
 }
\ No newline at end of file

Copied: geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/settings/SettingsModelLocator.java
(from r694319, geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/settings/SettingsLocator.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/settings/SettingsModelLocator.java?p2=geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/settings/SettingsModelLocator.java&p1=geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/settings/SettingsLocator.java&r1=694319&r2=694330&rev=694330&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/settings/SettingsLocator.java
(original)
+++ geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/settings/SettingsModelLocator.java
Thu Sep 11 09:05:57 2008
@@ -19,21 +19,21 @@
 
 package org.apache.geronimo.gshell.application.settings;
 
-import org.apache.geronimo.gshell.model.settings.Settings;
-import org.apache.geronimo.gshell.model.settings.SettingsMarshaller;
+import org.apache.geronimo.gshell.model.settings.SettingsModel;
+import org.apache.geronimo.gshell.model.settings.SettingsModelMarshaller;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Locates {@link Settings} instances.
+ * Locates {@link SettingsModel} instances.
  *
  * @version $Rev$ $Date$
  */
-public class SettingsLocator
+public class SettingsModelLocator
 {
     private final Logger log = LoggerFactory.getLogger(getClass());
 
-    private final SettingsMarshaller marshaller = new SettingsMarshaller();
+    private final SettingsModelMarshaller marshaller = new SettingsModelMarshaller();
 
     //
     // FIXME: Need to make this more robust, allow a file override/hint look in META-INF/gshell,
user.home, etc.
@@ -43,8 +43,8 @@
     // TODO: Use builder pattern to add additonal bits to help location
     //
 
-    public Settings locate() throws Exception {
-        log.debug("Locating settings descriptor");
+    public SettingsModel locate() throws Exception {
+        log.debug("Locating settings model descriptor");
 
         //
         // TODO: For now we just ignore user settings, but should try to locate a descriptor
and unmarshal

Propchange: geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/settings/SettingsModelLocator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/settings/SettingsModelLocator.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/settings/SettingsModelLocator.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/Main.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/Main.java?rev=694330&r1=694329&r2=694330&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/Main.java
(original)
+++ geronimo/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/Main.java
Thu Sep 11 09:05:57 2008
@@ -29,8 +29,8 @@
 import org.apache.geronimo.gshell.clp.Printer;
 import org.apache.geronimo.gshell.io.IO;
 import org.apache.geronimo.gshell.model.application.Application;
-import org.apache.geronimo.gshell.model.settings.Settings;
-import org.apache.geronimo.gshell.application.settings.SettingsLocator;
+import org.apache.geronimo.gshell.model.settings.SettingsModel;
+import org.apache.geronimo.gshell.application.settings.SettingsModelLocator;
 import org.apache.geronimo.gshell.wisdom.builder.ShellBuilder;
 import org.apache.geronimo.gshell.wisdom.builder.ShellBuilderImpl;
 
@@ -200,8 +200,8 @@
             builder.setIo(io);
 
             // Find our settings descriptor
-            Settings settings = new SettingsLocator().locate();
-            builder.setSettings(settings);
+            SettingsModel settingsModel = new SettingsModelLocator().locate();
+            builder.setSettingsModel(settingsModel);
 
             // Find our application descriptor
             Application application = new ApplicationLocator().locate();

Copied: geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/settings/SettingsModel.java
(from r694319, geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/settings/Settings.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/settings/SettingsModel.java?p2=geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/settings/SettingsModel.java&p1=geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/settings/Settings.java&r1=694319&r2=694330&rev=694330&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/settings/Settings.java
(original)
+++ geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/settings/SettingsModel.java
Thu Sep 11 09:05:57 2008
@@ -33,7 +33,7 @@
  * @version $Rev$ $Date$
  */
 @XStreamAlias("settings")
-public class Settings
+public class SettingsModel
     extends Model
 {
     private Properties properties;

Propchange: geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/settings/SettingsModel.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/settings/SettingsModel.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/settings/SettingsModel.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/settings/SettingsModelMarshaller.java
(from r694319, geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/settings/SettingsMarshaller.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/settings/SettingsModelMarshaller.java?p2=geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/settings/SettingsModelMarshaller.java&p1=geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/settings/SettingsMarshaller.java&r1=694319&r2=694330&rev=694330&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/settings/SettingsMarshaller.java
(original)
+++ geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/settings/SettingsModelMarshaller.java
Thu Sep 11 09:05:57 2008
@@ -22,14 +22,14 @@
 import org.apache.geronimo.gshell.model.marshal.MarshallerSupport;
 
 /**
- * Marshaller for {@link Settings} models.
+ * Marshaller for {@link SettingsModel} models.
  *
  * @version $Rev$ $Date$
  */
-public class SettingsMarshaller
-    extends MarshallerSupport<Settings>
+public class SettingsModelMarshaller
+    extends MarshallerSupport<SettingsModel>
 {
-    public SettingsMarshaller() {
-        super(Settings.class);
+    public SettingsModelMarshaller() {
+        super(SettingsModel.class);
     }
 }
\ No newline at end of file

Propchange: geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/settings/SettingsModelMarshaller.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/settings/SettingsModelMarshaller.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/settings/SettingsModelMarshaller.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationManagerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationManagerImpl.java?rev=694330&r1=694329&r2=694330&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationManagerImpl.java
(original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationManagerImpl.java
Thu Sep 11 09:05:57 2008
@@ -33,7 +33,7 @@
 import org.apache.geronimo.gshell.model.common.RemoteRepository;
 import org.apache.geronimo.gshell.model.interpolate.Interpolator;
 import org.apache.geronimo.gshell.model.interpolate.InterpolatorSupport;
-import org.apache.geronimo.gshell.model.settings.Settings;
+import org.apache.geronimo.gshell.model.settings.SettingsModel;
 import org.apache.geronimo.gshell.shell.Shell;
 import org.apache.geronimo.gshell.spring.BeanContainer;
 import org.apache.geronimo.gshell.spring.BeanContainerAware;
@@ -142,9 +142,9 @@
 
         // User settings should override the applications
         assert settingsManager != null;
-        Settings settings = settingsManager.getSettings();
-        if (settings != null) {
-            interp.addValueSource(new PropertiesBasedValueSource(settings.getProperties()));
+        SettingsModel settingsModel = settingsManager.getModel();
+        if (settingsModel != null) {
+            interp.addValueSource(new PropertiesBasedValueSource(settingsModel.getProperties()));
         }
 
         // Add application settings

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/SettingsManagerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/SettingsManagerImpl.java?rev=694330&r1=694329&r2=694330&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/SettingsManagerImpl.java
(original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/SettingsManagerImpl.java
Thu Sep 11 09:05:57 2008
@@ -25,7 +25,7 @@
 import org.apache.geronimo.gshell.model.common.RemoteRepository;
 import org.apache.geronimo.gshell.model.interpolate.Interpolator;
 import org.apache.geronimo.gshell.model.interpolate.InterpolatorSupport;
-import org.apache.geronimo.gshell.model.settings.Settings;
+import org.apache.geronimo.gshell.model.settings.SettingsModel;
 import org.apache.geronimo.gshell.spring.BeanContainerAware;
 import org.apache.geronimo.gshell.spring.BeanContainer;
 import org.apache.geronimo.gshell.wisdom.application.event.SettingsConfiguredEvent;
@@ -57,12 +57,12 @@
         this.container = container;
     }
 
-    public Settings getSettings() {
+    public SettingsModel getModel() {
         if (settingsConfiguration == null) {
             throw new IllegalStateException("Not configured");
         }
 
-        return settingsConfiguration.getSettings();
+        return settingsConfiguration.getModel();
     }
 
     public void configure(final SettingsConfiguration config) throws Exception {
@@ -73,12 +73,12 @@
         // Validate the configuration
         config.validate();
 
-        if (config.getSettings() != null) {
+        if (config.getModel() != null) {
 	        // Interpolate the model
 	        interpolate(config);
 
 	        // Configure settings
-            configure(config.getSettings());
+            configure(config.getModel());
         }
 
         // TODO: Merge in some default settings or something?
@@ -93,26 +93,26 @@
     private void interpolate(final SettingsConfiguration config) throws Exception {
     	assert config != null;
 
-    	Settings settings = config.getSettings();
-        Interpolator<Settings> interp = new InterpolatorSupport<Settings>();
+    	SettingsModel model = config.getModel();
+        Interpolator<SettingsModel> interp = new InterpolatorSupport<SettingsModel>();
 
         // Add value sources to resolve muck
         interp.addValueSource(new PropertiesBasedValueSource(System.getProperties()));
-        interp.addValueSource(new PropertiesBasedValueSource(settings.getProperties()));
+        interp.addValueSource(new PropertiesBasedValueSource(model.getProperties()));
 
-        settings = interp.interpolate(settings);
+        model = interp.interpolate(model);
 
         // Update the configuration with the new model
-        config.setSettings(settings);
+        config.setModel(model);
     }
 
-    private void configure(final Settings settings) throws Exception {
-        assert settings != null;
+    private void configure(final SettingsModel settingsModel) throws Exception {
+        assert settingsModel != null;
 
         // TODO: Add settings interpolation here
 
         // Setup remote repositories
-        for (RemoteRepository repo : settings.remoteRepositories()) {
+        for (RemoteRepository repo : settingsModel.remoteRepositories()) {
             artifactManager.getRepositoryManager().addRemoteRepository(repo.getId(), repo.getLocationUri());
         }
 

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/builder/ShellBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/builder/ShellBuilder.java?rev=694330&r1=694329&r2=694330&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/builder/ShellBuilder.java
(original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/builder/ShellBuilder.java
Thu Sep 11 09:05:57 2008
@@ -25,7 +25,7 @@
 import org.apache.geronimo.gshell.application.settings.SettingsManager;
 import org.apache.geronimo.gshell.application.ApplicationManager;
 import org.apache.geronimo.gshell.model.application.Application;
-import org.apache.geronimo.gshell.model.settings.Settings;
+import org.apache.geronimo.gshell.model.settings.SettingsModel;
 import org.apache.geronimo.gshell.artifact.ArtifactManager;
 
 /**
@@ -48,9 +48,9 @@
 
     void setVariables(Variables variables);
 
-    Settings getSettings();
+    SettingsModel getSettingsModel();
 
-    void setSettings(Settings settings);
+    void setSettingsModel(SettingsModel settingsModel);
 
     SettingsManager getSettingsManager();
 

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/builder/ShellBuilderImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/builder/ShellBuilderImpl.java?rev=694330&r1=694329&r2=694330&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/builder/ShellBuilderImpl.java
(original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/builder/ShellBuilderImpl.java
Thu Sep 11 09:05:57 2008
@@ -29,7 +29,7 @@
 import org.apache.geronimo.gshell.io.IO;
 import org.apache.geronimo.gshell.io.SystemOutputHijacker;
 import org.apache.geronimo.gshell.model.application.Application;
-import org.apache.geronimo.gshell.model.settings.Settings;
+import org.apache.geronimo.gshell.model.settings.SettingsModel;
 import org.apache.geronimo.gshell.shell.Shell;
 import org.apache.geronimo.gshell.spring.BeanContainer;
 import org.apache.geronimo.gshell.spring.BeanContainerImpl;
@@ -100,12 +100,12 @@
         applicationConfig.setVariables(variables);
     }
 
-    public Settings getSettings() {
-        return settingsConfig.getSettings();
+    public SettingsModel getSettingsModel() {
+        return settingsConfig.getModel();
     }
 
-    public void setSettings(final Settings settings) {
-        settingsConfig.setSettings(settings);
+    public void setSettingsModel(final SettingsModel settingsModel) {
+        settingsConfig.setModel(settingsModel);
     }
 
     private SettingsManager createSettingsManager() {



Mime
View raw message