[gatein-commits] gatein SVN: r1658 - components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer.

do-not-reply at jboss.org do-not-reply at jboss.org
Fri Feb 12 04:03:12 EST 2010


Author: chris.laprun at jboss.com
Date: 2010-02-12 04:03:11 -0500 (Fri, 12 Feb 2010)
New Revision: 1658

Modified:
   components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/ProducerInfo.java
   components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/RegistrationInfo.java
Log:
- Started encapsulating fields that might get removed.

Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/ProducerInfo.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/ProducerInfo.java	2010-02-12 09:01:49 UTC (rev 1657)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/ProducerInfo.java	2010-02-12 09:03:11 UTC (rev 1658)
@@ -367,7 +367,7 @@
    {
       ServiceDescription serviceDescription;
 
-      if (isModifyRegistrationRequired)
+      if (isModifyRegistrationRequired())
       {
          return new RefreshResult(RefreshResult.Status.MODIFY_REGISTRATION_REQUIRED);
       }
@@ -427,7 +427,7 @@
                if (registrationResult.hasIssues())
                {
                   // if the registration validation has issues, we need to modify our local information
-                  isModifyRegistrationRequired = true;
+                  setModifyRegistrationRequired(true);
                   setActiveAndSave(false);
                }
                else
@@ -1090,7 +1090,7 @@
             persistentRegistrationInfo.setRegistrationValidInternalState();
 
             // registration is not modified anymore :)
-            isModifyRegistrationRequired = false;
+            setModifyRegistrationRequired(false);
 
             // update state
             persistentRegistrationInfo.setRegistrationState(registrationState.value);

Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/RegistrationInfo.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/RegistrationInfo.java	2010-02-12 09:01:49 UTC (rev 1657)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/RegistrationInfo.java	2010-02-12 09:03:11 UTC (rev 1658)
@@ -317,7 +317,7 @@
          prop = new RegistrationProperty(name, value, WSRPUtils.toString(Locale.getDefault()), this);
          getOrCreateRegistrationPropertiesMap(false).put(name, prop);
          setModifiedSinceLastRefresh(true);
-         modifyRegistrationNeeded = true;
+         setModifyRegistrationNeeded(true);
       }
 
       return prop;
@@ -332,7 +332,7 @@
          throw new IllegalArgumentException("Cannot remove inexistent registration property '" + name + "'");
       }
       setModifiedSinceLastRefresh(true);
-      modifyRegistrationNeeded = true;
+      setModifyRegistrationNeeded(true);
    }
 
    private Map<String, RegistrationProperty> getOrCreateRegistrationPropertiesMap(boolean forceCreate)
@@ -433,7 +433,7 @@
             result.setRegistrationProperties(new HashMap<String, RegistrationProperty>(persistentRegistrationProperties));
          }
          setModifiedSinceLastRefresh(false);
-         modifyRegistrationNeeded = false;
+         setModifyRegistrationNeeded(false);
 
          if (serviceDescription.isRequiresRegistration())
          {
@@ -600,7 +600,7 @@
       if (persistentRegistrationHandle != null)
       {
          result.setStatus(RefreshResult.Status.MODIFY_REGISTRATION_REQUIRED);
-         modifyRegistrationNeeded = true;
+         setModifyRegistrationNeeded(true);
       }
       else
       {
@@ -670,7 +670,7 @@
       consistentWithProducerExpectations = Boolean.TRUE; // since we have a registration context, we're consistent with the Producer
       requiresRegistration = Boolean.TRUE; // we know we require registration
       setModifiedSinceLastRefresh(false); // our state is clean :)
-      modifyRegistrationNeeded = false;
+      setModifyRegistrationNeeded(false);
    }
 
    public RegistrationContext getRegistrationContext()
@@ -706,9 +706,14 @@
    public void propertyValueChanged(RegistrationProperty property, Object oldValue, Object newValue)
    {
       setModifiedSinceLastRefresh(true);
-      modifyRegistrationNeeded = true;
+      setModifyRegistrationNeeded(true);
    }
 
+   private void setModifyRegistrationNeeded(boolean modifyRegistrationNeeded)
+   {
+      this.modifyRegistrationNeeded = modifyRegistrationNeeded;
+   }
+
    public class RegistrationRefreshResult extends RefreshResult
    {
       private Map<String, RegistrationProperty> registrationProperties;



More information about the gatein-commits mailing list