LISTSERV mailing list manager LISTSERV 16.5

Help for HPS-SVN Archives


HPS-SVN Archives

HPS-SVN Archives


HPS-SVN@LISTSERV.SLAC.STANFORD.EDU


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

HPS-SVN Home

HPS-SVN Home

HPS-SVN  April 2015

HPS-SVN April 2015

Subject:

r2740 - in /java/trunk/monitoring-app/src/main/java/org/hps/monitoring/application: ConnectionSettingsPanel.java JobSettingsPanel.java model/ConfigurationModel.java

From:

[log in to unmask]

Reply-To:

Notification of commits to the hps svn repository <[log in to unmask]>

Date:

Fri, 17 Apr 2015 20:18:35 -0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (116 lines)

Author: [log in to unmask]
Date: Fri Apr 17 13:18:28 2015
New Revision: 2740

Log:
Fix enum based property settings which were not being handled correctly.

Modified:
    java/trunk/monitoring-app/src/main/java/org/hps/monitoring/application/ConnectionSettingsPanel.java
    java/trunk/monitoring-app/src/main/java/org/hps/monitoring/application/JobSettingsPanel.java
    java/trunk/monitoring-app/src/main/java/org/hps/monitoring/application/model/ConfigurationModel.java

Modified: java/trunk/monitoring-app/src/main/java/org/hps/monitoring/application/ConnectionSettingsPanel.java
 =============================================================================
--- java/trunk/monitoring-app/src/main/java/org/hps/monitoring/application/ConnectionSettingsPanel.java	(original)
+++ java/trunk/monitoring-app/src/main/java/org/hps/monitoring/application/ConnectionSettingsPanel.java	Fri Apr 17 13:18:28 2015
@@ -189,7 +189,7 @@
     @Override
     public void actionPerformed(final ActionEvent e) {
         if (Commands.WAIT_MODE_CHANGED.equals(e.getActionCommand())) {
-            this.getConfigurationModel().setWaitMode(Mode.valueOf((String) this.waitModeComboBox.getSelectedItem()));
+            this.getConfigurationModel().setWaitMode(this.waitModeComboBox.getSelectedItem().toString());
         } else if (Commands.BLOCKING_CHANGED.equals(e.getActionCommand())) {
             this.getConfigurationModel().setBlocking(this.blockingCheckBox.isSelected());
         } else if (Commands.VERBOSE_CHANGED.equals(e.getActionCommand())) {

Modified: java/trunk/monitoring-app/src/main/java/org/hps/monitoring/application/JobSettingsPanel.java
 =============================================================================
--- java/trunk/monitoring-app/src/main/java/org/hps/monitoring/application/JobSettingsPanel.java	(original)
+++ java/trunk/monitoring-app/src/main/java/org/hps/monitoring/application/JobSettingsPanel.java	Fri Apr 17 13:18:28 2015
@@ -356,11 +356,10 @@
             } else if (Commands.DISCONNECT_ON_END_RUN_CHANGED.equals(command)) {
                 this.getConfigurationModel().setDisconnectOnEndRun(this.disconnectOnEndRunCheckBox.isSelected());
             } else if (Commands.STEERING_TYPE_CHANGED.equals(command)) {
-                this.getConfigurationModel()
-                .setSteeringType((SteeringType) this.steeringTypeComboBox.getSelectedItem());
+                this.getConfigurationModel().setSteeringType(this.steeringTypeComboBox.getSelectedItem().toString());
             } else if (Commands.STEERING_RESOURCE_CHANGED.equals(command)) {
                 this.getConfigurationModel().setSteeringResource(
-                        (String) this.steeringResourcesComboBox.getSelectedItem());
+                        this.steeringResourcesComboBox.getSelectedItem().toString());
             } else if (Commands.LOG_LEVEL_CHANGED.equals(command)) {
                 this.getConfigurationModel().setLogLevel(Level.parse((String) this.logLevelComboBox.getSelectedItem()));
             } else if (Commands.EVENT_BUILDER_CHANGED.equals(command)) {
@@ -386,7 +385,7 @@
                 this.getConfigurationModel().setConditionsTag((String) this.conditionsTagComboBox.getSelectedItem());
             } else if (Commands.PROCESSING_STAGE_CHANGED.equals(command)) {
                 this.getConfigurationModel().setProcessingStage(
-                        (ProcessingStage) this.processingStageComboBox.getSelectedItem());
+                        this.processingStageComboBox.getSelectedItem().toString());
             }
         } finally {
             this.getConfigurationModel().addPropertyChangeListener(this);
@@ -448,7 +447,7 @@
             try {
                 this.checkSteeringFile(file);
                 this.getConfigurationModel().setSteeringFile(file.getCanonicalPath());
-                this.getConfigurationModel().setSteeringType(SteeringType.FILE);
+                this.getConfigurationModel().setSteeringType(SteeringType.FILE.toString());
             } catch (IOException | JDOMException e) {
                 throw new RuntimeException("Error parsing the selected steering file.", e);
             }

Modified: java/trunk/monitoring-app/src/main/java/org/hps/monitoring/application/model/ConfigurationModel.java
 =============================================================================
--- java/trunk/monitoring-app/src/main/java/org/hps/monitoring/application/model/ConfigurationModel.java	(original)
+++ java/trunk/monitoring-app/src/main/java/org/hps/monitoring/application/model/ConfigurationModel.java	Fri Apr 17 13:18:28 2015
@@ -490,6 +490,11 @@
         return CONFIG_PROPERTIES;
     }
 
+    /**
+     * Get the ET queue size.
+     *
+     * @return the ET queue size
+     */
     public Integer getQueueSize() {
         return this.configuration.getInteger(QUEUE_SIZE_PROPERTY);
     }
@@ -920,9 +925,9 @@
      *
      * @param processingStage the processing stage to execute
      */
-    public void setProcessingStage(final ProcessingStage processingStage) {
+    public void setProcessingStage(final String processingStage) {
         final ProcessingStage oldValue = this.getProcessingStage();
-        this.configuration.set(PROCESSING_STAGE_PROPERTY, processingStage);
+        this.configuration.set(PROCESSING_STAGE_PROPERTY, ProcessingStage.valueOf(processingStage));
         this.firePropertyChange(PROCESSING_STAGE_PROPERTY, oldValue, this.getProcessingStage());
     }
 
@@ -1017,9 +1022,9 @@
      * @param steeringType the steering type
      * @see SteeringType
      */
-    public void setSteeringType(final SteeringType steeringType) {
+    public void setSteeringType(final String steeringType) {
         final SteeringType oldValue = this.getSteeringType();
-        this.configuration.set(STEERING_TYPE_PROPERTY, steeringType.name());
+        this.configuration.set(STEERING_TYPE_PROPERTY, SteeringType.valueOf(steeringType));
         this.firePropertyChange(STEERING_TYPE_PROPERTY, oldValue, this.getSteeringType());
     }
 
@@ -1056,9 +1061,9 @@
      *
      * @param waitMode the ET wait mode
      */
-    public void setWaitMode(final Mode waitMode) {
+    public void setWaitMode(final String waitMode) {
         final Mode oldValue = this.getWaitMode();
-        this.configuration.set(WAIT_MODE_PROPERTY, waitMode.name());
+        this.configuration.set(WAIT_MODE_PROPERTY, Mode.valueOf(waitMode));
         this.firePropertyChange(WAIT_MODE_PROPERTY, oldValue, this.getWaitMode());
     }
 

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

November 2017
August 2017
July 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013

ATOM RSS1 RSS2



LISTSERV.SLAC.STANFORD.EDU

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager

Privacy Notice, Security Notice and Terms of Use