Author: husted
Date: Wed Sep 27 08:55:14 2006
New Revision: 450487

URL: http://svn.apache.org/viewvc?view=rev&rev=450487
Log:
OVR-13 Amend notion of RelatedIDs to always include the instant command. The 
protocol is to store the outcome under the Command ID, so any command that 
returns an outcome is related to itself (has an output field by that name).

Modified:
    struts/sandbox/trunk/overdrive/Nexus/Core/RequestChain.cs
    struts/sandbox/trunk/overdrive/Nexus/Core/Validators/ProcessorCommand.cs

Modified: struts/sandbox/trunk/overdrive/Nexus/Core/RequestChain.cs
URL: 
http://svn.apache.org/viewvc/struts/sandbox/trunk/overdrive/Nexus/Core/RequestChain.cs?view=diff&rev=450487&r1=450486&r2=450487
==============================================================================
--- struts/sandbox/trunk/overdrive/Nexus/Core/RequestChain.cs (original)
+++ struts/sandbox/trunk/overdrive/Nexus/Core/RequestChain.cs Wed Sep 27 
08:55:14 2006
@@ -21,10 +21,10 @@
 

                        // Composite Required and Related

                        IList _RequiredIDs = command.RequiredIDs;

-                       if (null != _RequiredIDs) this.AddRequiredIDs = 
_RequiredIDs;

+                       if (null != _RequiredIDs) AddRequiredIDs = _RequiredIDs;

 

                        IList _RelatedIDs = command.RelatedIDs;

-                       if (null != _RelatedIDs) this.AddRelatedIDs = 
_RelatedIDs;

+                       if (null != _RelatedIDs) AddRelatedIDs = _RelatedIDs;

                }

 

                public IList AddCommands


Modified: 
struts/sandbox/trunk/overdrive/Nexus/Core/Validators/ProcessorCommand.cs
URL: 
http://svn.apache.org/viewvc/struts/sandbox/trunk/overdrive/Nexus/Core/Validators/ProcessorCommand.cs?view=diff&rev=450487&r1=450486&r2=450487
==============================================================================
--- struts/sandbox/trunk/overdrive/Nexus/Core/Validators/ProcessorCommand.cs 
(original)
+++ struts/sandbox/trunk/overdrive/Nexus/Core/Validators/ProcessorCommand.cs 
Wed Sep 27 08:55:14 2006
@@ -190,7 +190,11 @@
                private ICollection CombinedIDs(IRequestContext context)

                {

                        IDictionary combined = new Hashtable();

-                       IList relatedIDs = context.CommandBin.RelatedIDs; // 
outer list

+                       IList relatedIDs = context.CommandBin.RelatedIDs; // 
outer list                 

+                               // Add Command ID to related list (since we 
store outcome under our own ID)

+                               string id = context.CommandBin.ID;

+                               bool found_self = relatedIDs.Contains(id);

+                               if (!found_self) relatedIDs.Add(id);

                        if (relatedIDs != null) foreach (string i in 
relatedIDs) combined[i] = i;

                        IList requiredIDs = context.CommandBin.RequiredIDs; // 
inner list

                        if (requiredIDs != null) foreach (string i in 
requiredIDs) combined[i] = i;



Reply via email to