Author: husted
Date: Sat Sep 10 12:04:14 2005
New Revision: 280025
URL: http://svn.apache.org/viewcvs?rev=280025&view=rev
Log:
OVR-21
* First round of refactorings to move read/bind control functionality from
ViewHelpers to ViewControsl.
Added:
struts/sandbox/trunk/overdrive/Nexus/Core/Helpers/ViewArgs.cs
struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/
struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Agility.Core.dll
(with props)
struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Agility.Core.pdb
(with props)
struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Core.dll (with
props)
struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Core.pdb (with
props)
struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Core.xml
struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Extras.dll
(with props)
struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Extras.pdb
(with props)
struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Extras.xml
struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Test.dll (with
props)
struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Test.pdb (with
props)
struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Test.xml
struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Spring.Core.dll (with
props)
struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Spring.Core.pdb (with
props)
struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Spring.Core.xml
struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/log4net.dll (with
props)
struts/sandbox/trunk/overdrive/Nexus/Web/GridControl.ascx
struts/sandbox/trunk/overdrive/Nexus/Web/GridControl.ascx.cs
struts/sandbox/trunk/overdrive/Nexus/Web/GridControl.ascx.resx
struts/sandbox/trunk/overdrive/Nexus/Web/ViewControl.ascx
struts/sandbox/trunk/overdrive/Nexus/Web/ViewControl.ascx.cs
struts/sandbox/trunk/overdrive/Nexus/Web/ViewControl.ascx.resx
struts/sandbox/trunk/overdrive/Nexus/Web/WebHelper.cs
Modified:
struts/sandbox/trunk/overdrive/Nexus/Core/Core.csproj
struts/sandbox/trunk/overdrive/Nexus/Core/Helpers/IViewHelper.cs
struts/sandbox/trunk/overdrive/Nexus/Core/Helpers/ViewHelper.cs
struts/sandbox/trunk/overdrive/Nexus/Core/IRequestCatalog.cs
struts/sandbox/trunk/overdrive/Nexus/Extras/Extras.csproj
struts/sandbox/trunk/overdrive/Nexus/Extras/Spring/Catalog.cs
struts/sandbox/trunk/overdrive/Nexus/Test/BaseNexusTest.cs
struts/sandbox/trunk/overdrive/Nexus/Test/ControllerTest.cs
struts/sandbox/trunk/overdrive/Nexus/Test/ObjectByKeyTest.cs
struts/sandbox/trunk/overdrive/Nexus/Test/Resources/Command/AppConfig.xml
struts/sandbox/trunk/overdrive/Nexus/Test/Test.csproj
struts/sandbox/trunk/overdrive/Nexus/Web/Web.config
struts/sandbox/trunk/overdrive/Nexus/Web/Web.csproj
Modified: struts/sandbox/trunk/overdrive/Nexus/Core/Core.csproj
URL:
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Core/Core.csproj?rev=280025&r1=280024&r2=280025&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/Nexus/Core/Core.csproj (original)
+++ struts/sandbox/trunk/overdrive/Nexus/Core/Core.csproj Sat Sep 10 12:04:14
2005
@@ -17,7 +17,7 @@
DelaySign = "false"
OutputType = "Library"
PreBuildEvent = ""
- PostBuildEvent = ""
+ PostBuildEvent = "$(SolutionDir)postbuild.bat $(TargetDir)
$(TargetName) $(SolutionName) $(SolutionDir)"
RootNamespace = "Nexus.Core"
RunPostBuildEvent = "OnBuildSuccess"
StartupObject = ""
@@ -80,11 +80,6 @@
HintPath =
"..\..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
/>
<Reference
- Name = "Agility.Core"
- AssemblyName = "Agility.Core"
- HintPath = "..\..\Agility\Core\bin\Debug\Agility.Core.dll"
- />
- <Reference
Name = "System.Drawing"
AssemblyName = "System.Drawing"
HintPath =
"..\..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Drawing.dll"
@@ -94,6 +89,11 @@
AssemblyName = "System.Windows.Forms"
HintPath =
"..\..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Windows.Forms.dll"
/>
+ <Reference
+ Name = "Agility.Core"
+ AssemblyName = "Agility.Core"
+ HintPath = "..\..\local-cache\Agility\Agility.Core.dll"
+ />
</References>
</Build>
<Files>
@@ -170,6 +170,11 @@
/>
<File
RelPath = "Helpers\IViewHelper.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "Helpers\ViewArgs.cs"
SubType = "Code"
BuildAction = "Compile"
/>
Modified: struts/sandbox/trunk/overdrive/Nexus/Core/Helpers/IViewHelper.cs
URL:
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Core/Helpers/IViewHelper.cs?rev=280025&r1=280024&r2=280025&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/Nexus/Core/Helpers/IViewHelper.cs (original)
+++ struts/sandbox/trunk/overdrive/Nexus/Core/Helpers/IViewHelper.cs Sat Sep 10
12:04:14 2005
@@ -33,6 +33,9 @@
///
public interface IViewHelper
{
+
+ #region "Deprecated" in favor of new ViewControl methods
+
/// <summary>
/// Invoke the helper's command and bind the output to
/// controls in the given collection.
@@ -86,6 +89,73 @@
///
void Read(ICollection controls);
+ /// <summary>
+ /// Provide a prefix to trim from the id of a control during
Read and
+ /// Bind.
+ /// </summary>
+ /// <remarks><p>
+ /// The Prefix is needed when a single page uses a control
+ /// more than once often in separate panels.
+ /// </p></remarks>
+ ///
+ string Prefix { get; set; }
+
+
+ /// <summary>
+ /// Provide a suffix to truncate from a list control id
+ /// in order to set a corresponding value field ["_list"].
+ /// </summary>
+ /// <remark><p>
+ /// When processing a single-value list control, if the id ends
with
+ /// the list suffix,
+ /// the suffix is removed, and a field with the remaining name
is set
+ /// to the selected item value.
+ /// </p><P>
+ /// So, the selected item from a list control with the id
+ /// "facility_key_list" will be set to a field named
"facility_key".
+ /// </P></remark>
+ ///
+ string ListSuffix { get; set; }
+
+ /*
+ // TODO:
+ string AlertSuffix {get; set}
+ string HintSuffix {get; set}
+ string LabelSuffix {get; set}
+ */
+
+
+ /// <summary>
+ /// Indicate whether to set the value read from control to null
+ /// if it is an empty string [TRUE].
+ /// </summary>
+ /// <remarks><p>
+ /// If a control is blank, it may still return an empty string.
+ /// In a IDictionary, an empty string is a valid value,
+ /// so the entry for the control will still exist.
+ /// </p></remarks>
+ ///
+ bool NullIfEmpty { get; set; }
+
+
+ /// <summary>
+ /// Provide a string token to insert as item 0 to a list
controls ["--v--"].
+ /// </summary>
+ /// <remarks><p>
+ /// To disable feature, set to a null string.
+ /// </p></remarks>
+ ///
+ string SelectItemPrompt { get; set; }
+
+ #endregion
+
+ /// <summary>
+ /// Read input into the Criteria from a given Dictionary.
+ /// </summary>
+ /// <param name="criteria">Attributes to add to Critiera</param>
+ /// <param name="nullIfEmpty">Set attributes for empty strings
to null</param>
+ ///
+ void Read(IDictionary criteria, bool nullIfEmpty);
/// <summary>
/// Store input and output values.
@@ -201,8 +271,6 @@
///
string HintsText { get; }
- // ----
-
/// <summary>
/// Provide the Field Table for this Helper.
/// </summary>
@@ -216,87 +284,27 @@
///
IFieldTable FieldTable { get; }
-
- /// <summary>
- /// Provide a set of IFieldContext definitions to be used with
this helper.
- /// </summary>
- /// <remarks><p>
- /// The FieldSet is usually set by dependency injection.
- /// Some helpers generate DataGrids or DataForms based on the
- /// FieldDefinitions
- /// </p></remarks>
- ///
- IList FieldSet { get; set; }
-
- /*
- // TODO: Messengers
- string Message(string key);
- string MessageIndex {get;}
- IMessageTable MessageTable {get;}
- */
-
// ----
/// <summary>
- /// Provide a prefix to trim from the id of a control during
Read and
- /// Bind.
+ /// Provide the command (or chain of commands) for this helper
/// </summary>
/// <remarks><p>
- /// The Prefix is needed when a single page uses a control
- /// more than once often in separate panels.
+ /// Setting the Command also sets the internal Context for the
command.
/// </p></remarks>
///
- string Prefix { get; set; }
-
-
- /// <summary>
- /// Provide a suffix to truncate from a list control id
- /// in order to set a corresponding value field ["_list"].
- /// </summary>
- /// <remark><p>
- /// When processing a single-value list control, if the id ends
with
- /// the list suffix,
- /// the suffix is removed, and a field with the remaining name
is set
- /// to the selected item value.
- /// </p><P>
- /// So, the selected item from a list control with the id
- /// "facility_key_list" will be set to a field named
"facility_key".
- /// </P></remark>
- ///
- string ListSuffix { get; set; }
-
- /*
- // TODO:
- string AlertSuffix {get; set}
- string HintSuffix {get; set}
- string LabelSuffix {get; set}
- */
-
-
- /// <summary>
- /// Indicate whether to set the value read from control to null
- /// if it is an empty string [TRUE].
- /// </summary>
- /// <remarks><p>
- /// If a control is blank, it may still return an empty string.
- /// In a IDictionary, an empty string is a valid value,
- /// so the entry for the control will still exist.
- /// </p></remarks>
- ///
- bool NullIfEmpty { get; set; }
-
+ IRequestCommand Command { get; set; }
/// <summary>
- /// Provide a string token to insert as item 0 to a list
controls ["--v--"].
+ /// Provide a set of IFieldContext definitions to be used with
this helper.
/// </summary>
/// <remarks><p>
- /// To disable feature, set to a null string.
+ /// The FieldSet is usually set by dependency injection.
+ /// Some helpers generate DataGrids or DataForms based on the
+ /// FieldDefinitions
/// </p></remarks>
///
- string SelectItemPrompt { get; set; }
-
-
- // ----
+ IList FieldSet { get; set; }
/// <summary>
/// Provide the catalog for this helper,
@@ -304,14 +312,6 @@
/// </summary>
///
IRequestCatalog Catalog { get; set; }
-
-
- /// <summary>
- /// Provide the command (or chain of commands) for this helper,
- /// usually set by dependency injection.
- /// </summary>
- ///
- IRequestCommand Command { get; set; }
}
Added: struts/sandbox/trunk/overdrive/Nexus/Core/Helpers/ViewArgs.cs
URL:
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Core/Helpers/ViewArgs.cs?rev=280025&view=auto
==============================================================================
--- struts/sandbox/trunk/overdrive/Nexus/Core/Helpers/ViewArgs.cs (added)
+++ struts/sandbox/trunk/overdrive/Nexus/Core/Helpers/ViewArgs.cs Sat Sep 10
12:04:14 2005
@@ -0,0 +1,37 @@
+using System;
+
+namespace Nexus.Core.Helpers
+{
+ /// <summary>
+ /// EventArgs type with a IViewHelper property.
+ /// </summary>
+ public class ViewArgs : EventArgs
+ {
+ private IViewHelper _Helper;
+
+ /// <summary>
+ /// Helper instance to encapsulate.
+ /// </summary>
+ public IViewHelper Helper
+ {
+ set { _Helper = value; }
+ get { return _Helper; }
+ }
+
+ /// <summary>
+ /// Default constructor.
+ /// </summary>
+ public ViewArgs()
+ {
+ }
+
+ /// <summary>
+ /// Convenience constructor to set helper.
+ /// </summary>
+ /// <param name="helper"></param>
+ public ViewArgs(IViewHelper helper)
+ {
+ Helper = helper;
+ }
+ }
+}
\ No newline at end of file
Modified: struts/sandbox/trunk/overdrive/Nexus/Core/Helpers/ViewHelper.cs
URL:
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Core/Helpers/ViewHelper.cs?rev=280025&r1=280024&r2=280025&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/Nexus/Core/Helpers/ViewHelper.cs (original)
+++ struts/sandbox/trunk/overdrive/Nexus/Core/Helpers/ViewHelper.cs Sat Sep 10
12:04:14 2005
@@ -26,6 +26,7 @@
///
public abstract class ViewHelper : IViewHelper
{
+
/// <summary>
/// Default setting for ListSuffix ["_list"].
/// </summary>
@@ -73,6 +74,27 @@
#region Read and Bind
+ public void Read(IDictionary input, bool nullIfEmpty)
+ {
+ if (input==null) return;
+ ICollection keys = input.Keys;
+ IDictionary criteria = Criteria;
+ if (nullIfEmpty)
+ foreach (string key in keys)
+ {
+ object value = input[key];
+ string s = value as string;
+ if ((s!=null) && (s.Length==0))
+ criteria.Add(key,null);
+ else
+ criteria.Add(key,value);
+ }
+ else foreach (string key in keys)
+ {
+ criteria.Add(key,input[key]);
+ }
+ }
+
public IDictionary Criteria
{
get { return Context.Criteria; }
@@ -228,7 +250,11 @@
public IRequestCommand Command
{
get { return _Command; }
- set { _Command = value; }
+ set
+ {
+ _Command = value;
+ _Context = Catalog.GetRequestContext(value);
+ }
}
private IRequestContext _Context;
@@ -250,7 +276,7 @@
{
IRequestCommand rc = Command;
if (rc == null) throw new
ArgumentNullException("Command==null", "ViewHelper.Context");
- _Context = Catalog.GetRequest(rc);
+ _Context =
Catalog.GetRequestContext(rc);
}
return _Context;
}
Modified: struts/sandbox/trunk/overdrive/Nexus/Core/IRequestCatalog.cs
URL:
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Core/IRequestCatalog.cs?rev=280025&r1=280024&r2=280025&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/Nexus/Core/IRequestCatalog.cs (original)
+++ struts/sandbox/trunk/overdrive/Nexus/Core/IRequestCatalog.cs Sat Sep 10
12:04:14 2005
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+using System;
using System.Collections;
using Agility.Core;
using Nexus.Core.Helpers;
@@ -55,20 +56,43 @@
///
IRequestCommand PostOp { get; set; }
+ /// <summary>
+ /// Default IViewHelper instance for this Catalog.
+ /// </summary>
+ /// <remarks><p>
+ /// Set in catalogs for applications that use ViewHelpers.
+ /// The object should be a non-singleton instance ("protype").
+ /// Used by GetHelperFor.
+ /// </p></remarks>
+ ///
+ IViewHelper ViewHelper { get; set; }
/// <summary>
- /// Obtains an object for ID.
+ /// Obtain an object for ID.
/// </summary>
/// <param name="name">Our object ID</param>
/// <returns>object for name</returns>
object GetObject(string name);
/// <summary>
- /// Obtains a IViewHelper for helper ID.
+ /// Obtain a default IViewHelper instance,
+ /// configured for the specified command.
/// </summary>
- /// <param name="name">Our helper ID</param>
- /// <returns>IViewHelper for name</returns>
- IViewHelper GetHelper(string name);
+ /// <param name="command">The Command ID</param>
+ /// <returns>Helper instance for command</returns>
+ IViewHelper GetHelperFor(string command);
+
+ /// <summary>
+ /// Obtain Command and verify that instance is a
IRequestCommand.
+ /// </summary>
+ /// <param name="command">Command ID</param>
+ /// <returns>IRequestCommand instance for name</returns>
+ /// <exception cref="Exception">
+ /// Throws Exception if name is null,
+ /// name is not in catalog,
+ /// or if instance for name is not a IRequestCommand
+ /// </exception>
+ IRequestCommand GetRequestCommand(string command);
/// <summary>
/// Obtain a IRequestContext for command ID,
@@ -77,7 +101,7 @@
/// <param name="name">Our command ID</param>
/// <returns>IRequestContext with embedded resources.</returns>
///
- IRequestContext GetRequest(string name);
+ IRequestContext GetRequestContext(string name);
/// <summary>
/// Obtain a IRequestContext for command ID,
@@ -88,7 +112,7 @@
/// <param name="input">Our input values</param>
/// <returns>IRequestContext with embedded resources.</returns>
///
- IRequestContext GetRequest(string name, IDictionary input);
+ IRequestContext GetRequestContext(string name, IDictionary
input);
/// <summary>
/// Obtain a IRequestContext for the command,
@@ -97,7 +121,7 @@
/// <param name="command">Our command</param>
/// <returns>IRequestContext with embedded resources.</returns>
///
- IRequestContext GetRequest(IRequestCommand command);
+ IRequestContext GetRequestContext(IRequestCommand command);
/// <summary>
/// Obtain and execute a IRequestContext.
Modified: struts/sandbox/trunk/overdrive/Nexus/Extras/Extras.csproj
URL:
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Extras/Extras.csproj?rev=280025&r1=280024&r2=280025&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/Nexus/Extras/Extras.csproj (original)
+++ struts/sandbox/trunk/overdrive/Nexus/Extras/Extras.csproj Sat Sep 10
12:04:14 2005
@@ -17,7 +17,7 @@
DelaySign = "false"
OutputType = "Library"
PreBuildEvent = ""
- PostBuildEvent = ""
+ PostBuildEvent = "$(SolutionDir)postbuild.bat $(TargetDir)
$(TargetName) $(SolutionName) $(SolutionDir)"
RootNamespace = "Nexus.Extras"
RunPostBuildEvent = "OnBuildSuccess"
StartupObject = ""
@@ -80,19 +80,19 @@
HintPath =
"..\..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
/>
<Reference
+ Name = "Agility.Core"
+ AssemblyName = "Agility.Core"
+ HintPath = "..\..\local-cache\Agility\Agility.Core.dll"
+ />
+ <Reference
Name = "Spring.Core"
AssemblyName = "Spring.Core"
- HintPath = "..\..\SpringNet.bin\Spring.Core.dll"
+ HintPath = "..\..\local-cache\SpringNet\Spring.Core.dll"
/>
<Reference
Name = "Core"
Project = "{7C8CAFD4-1E45-41B4-9963-F51199B12EA7}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
- />
- <Reference
- Name = "Agility.Core"
- AssemblyName = "Agility.Core"
- HintPath = "..\..\Agility\Core\bin\Debug\Agility.Core.dll"
/>
</References>
</Build>
Modified: struts/sandbox/trunk/overdrive/Nexus/Extras/Spring/Catalog.cs
URL:
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Extras/Spring/Catalog.cs?rev=280025&r1=280024&r2=280025&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/Nexus/Extras/Spring/Catalog.cs (original)
+++ struts/sandbox/trunk/overdrive/Nexus/Extras/Spring/Catalog.cs Sat Sep 10
12:04:14 2005
@@ -36,7 +36,6 @@
private const string msg_MISSING = "Object is not found in
Factory.";
private const string msg_NULL = "Object ID cannot be null.";
private const string msg_TYPE = "Command is not a
IRequestCommand or IRequestChain.";
- private const string msg_TYPE_HELPER = "Object is not a
IViewHelper.";
private const string msg_CATALOG_CONTEXT_NULL = "Catalog:
Context cannot be null!";
private const string msg_CATALOG_COMMAND_NULL = "Catalog:
Command within Context cannot be null! -- Was Context retrieved from Catalog?";
@@ -72,6 +71,14 @@
return o;
}
+ public IViewHelper GetHelperFor(string command)
+ {
+ IViewHelper helper = ViewHelper;
+ helper.Catalog = this;
+ helper.Command = GetRequestCommand(command);
+ return helper;
+ }
+
/// <summary>
/// Not implemented as Catalog is expected to be created by an
IOC framework.
/// </summary>
@@ -82,20 +89,15 @@
throw new NotImplementedException(msg_ADD_COMMAND); //
OK
}
- /// <summary>
- /// Obtain Command and verify that instance is a
IRequestCommand.
- /// </summary>
- /// <param name="name">Command ID</param>
- /// <returns>IRequestCommand instance for name</returns>
- /// <exception cref="Exception">
- /// Throws Exception if name is null,
- /// name is not in catalog,
- /// or if instance for name is not a IRequestCommand
- /// </exception>
public ICommand GetCommand(string name)
{
object o = GetObject(name);
- IRequestCommand command = o as IRequestCommand;
+ return o as ICommand;
+ }
+
+ public IRequestCommand GetRequestCommand(string name) {
+ ICommand c = GetCommand(name);
+ IRequestCommand command = c as IRequestCommand;
if (command == null)
{
Exception e = new Exception(msg_TYPE);
@@ -164,26 +166,22 @@
set { _PostOp = value; }
}
- public IViewHelper GetHelper(string name)
+ private IViewHelper _ViewHelper;
+
+ public IViewHelper ViewHelper
{
- object o = GetObject(name);
- IViewHelper helper = o as IViewHelper;
- if (helper == null)
- {
- Exception e = new Exception(msg_TYPE_HELPER);
- throw(e);
- }
- return helper;
+ get { return _ViewHelper; }
+ set { _ViewHelper = value; }
}
- public IRequestContext GetRequest(string name)
+ public IRequestContext GetRequestContext(string name)
{
ICommand _command = GetCommand(name);
IRequestCommand _rc = _command as IRequestCommand;
- return GetRequest(_rc);
+ return GetRequestContext(_rc);
}
- public IRequestContext GetRequest(IRequestCommand command)
+ public IRequestContext GetRequestContext(IRequestCommand
command)
{
IRequestContext context = null;
try
@@ -204,9 +202,9 @@
}
- public IRequestContext GetRequest(string name, IDictionary
input)
+ public IRequestContext GetRequestContext(string name,
IDictionary input)
{
- IRequestContext context = GetRequest(name);
+ IRequestContext context = GetRequestContext(name);
context.Criteria = input;
return context;
}
@@ -234,7 +232,7 @@
public IRequestContext ExecuteRequest(string name)
{
- IRequestContext context = GetRequest(name);
+ IRequestContext context = GetRequestContext(name);
ExecuteRequest(context);
return context;
}
Modified: struts/sandbox/trunk/overdrive/Nexus/Test/BaseNexusTest.cs
URL:
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Test/BaseNexusTest.cs?rev=280025&r1=280024&r2=280025&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/Nexus/Test/BaseNexusTest.cs (original)
+++ struts/sandbox/trunk/overdrive/Nexus/Test/BaseNexusTest.cs Sat Sep 10
12:04:14 2005
@@ -95,7 +95,6 @@
return found;
}
-
/// <summary>
/// Convenience method to confirm that no Exception was caught.
/// </summary>
@@ -222,7 +221,7 @@
/// <param name="minCount">The minimum number of items</param>
protected IRequestContext AssertList(string id, int minCount)
{
- IRequestContext context = catalog.GetRequest(id);
+ IRequestContext context = catalog.GetRequestContext(id);
catalog.ExecuteRequest(context);
AssertNominal(context);
Assert.IsTrue(context.HasOutcome, "Expected outcome");
@@ -257,7 +256,7 @@
/// <param name="deleteId">The "delete" command name</param>
protected IRequestContext AssertInsertDelete(string insertId,
string keyId, string keyValue, string deleteId)
{
- IRequestContext context = catalog.GetRequest(insertId);
+ IRequestContext context =
catalog.GetRequestContext(insertId);
Populate(context);
context[keyId] = String.Empty;
@@ -273,7 +272,7 @@
protected IRequestContext AssertEdit(string editId, string
keyId, string keyValue, string[] keys)
{
- IRequestContext context = catalog.GetRequest(editId);
+ IRequestContext context =
catalog.GetRequestContext(editId);
context[keyId] = keyValue;
catalog.ExecuteRequest(context);
AssertNominal(context);
@@ -289,7 +288,7 @@
/// <param name="keyValue">The value of the primary key</param>
protected IRequestContext AssertUpdate(string updateId, string
keyId, string keyValue)
{
- IRequestContext context = catalog.GetRequest(updateId);
+ IRequestContext context =
catalog.GetRequestContext(updateId);
Populate(context);
catalog.ExecuteRequest(context);
AssertNominal(context);
Modified: struts/sandbox/trunk/overdrive/Nexus/Test/ControllerTest.cs
URL:
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Test/ControllerTest.cs?rev=280025&r1=280024&r2=280025&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/Nexus/Test/ControllerTest.cs (original)
+++ struts/sandbox/trunk/overdrive/Nexus/Test/ControllerTest.cs Sat Sep 10
12:04:14 2005
@@ -18,6 +18,7 @@
namespace Nexus.Core
{
+
/// <summary>
/// Exercise IRequestCatalog per [OVR-8].
/// </summary>
@@ -37,5 +38,6 @@
Assert.IsTrue(context.IsNominal, "Expected nominal
result.");
Assert.IsTrue(context.HasOutcome, "Expected outcome
from command.");
}
+
}
}
Modified: struts/sandbox/trunk/overdrive/Nexus/Test/ObjectByKeyTest.cs
URL:
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Test/ObjectByKeyTest.cs?rev=280025&r1=280024&r2=280025&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/Nexus/Test/ObjectByKeyTest.cs (original)
+++ struts/sandbox/trunk/overdrive/Nexus/Test/ObjectByKeyTest.cs Sat Sep 10
12:04:14 2005
@@ -38,7 +38,7 @@
[Test]
public void ObjectByKey_Trusted()
{
- IRequestContext context =
catalog.GetRequest(OBJECT_BY_KEY);
+ IRequestContext context =
catalog.GetRequestContext(OBJECT_BY_KEY);
context[PK_SOMETHING] = PK_SOMETHING_VALUE;
catalog.ExecuteRequest(context); // do the actual work
@@ -51,7 +51,7 @@
{
IDictionary fields = new Hashtable();
fields[PK_SOMETHING] = PK_SOMETHING_VALUE;
- IRequestContext context =
catalog.GetRequest(OBJECT_BY_KEY_WITH_REQUIRED, fields);
+ IRequestContext context =
catalog.GetRequestContext(OBJECT_BY_KEY_WITH_REQUIRED, fields);
catalog.ExecuteRequest(context); // do the actual work
@@ -62,7 +62,7 @@
public void ObjectByKey_UnTrusted_Fail()
{
IDictionary fields = new Hashtable();
- IRequestContext context =
catalog.GetRequest(OBJECT_BY_KEY_WITH_REQUIRED, fields);
+ IRequestContext context =
catalog.GetRequestContext(OBJECT_BY_KEY_WITH_REQUIRED, fields);
catalog.ExecuteRequest(context); // do the actual work
@@ -76,7 +76,7 @@
IDictionary fields = new Hashtable();
fields[PK_SOMETHING] = PK_SOMETHING_VALUE;
// fields [PK_SOME_DATE] =
DateTime.Now.ToShortDateString ();
- IRequestContext context =
catalog.GetRequest(OBJECT_BY_KEY_WITH_VALIDATE, fields);
+ IRequestContext context =
catalog.GetRequestContext(OBJECT_BY_KEY_WITH_VALIDATE, fields);
catalog.ExecuteRequest(context); // do the actual work
@@ -109,7 +109,7 @@
IDictionary fields = new Hashtable();
fields[PK_SOMETHING] = PK_SOMETHING_VALUE;
fields[PK_SOME_DATE] = DateTime.Now.ToShortDateString();
- IRequestContext context =
catalog.GetRequest(OBJECT_BY_KEY_WITH_VALIDATE, fields);
+ IRequestContext context =
catalog.GetRequestContext(OBJECT_BY_KEY_WITH_VALIDATE, fields);
catalog.ExecuteRequest(context); // do the actual work
Modified:
struts/sandbox/trunk/overdrive/Nexus/Test/Resources/Command/AppConfig.xml
URL:
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Test/Resources/Command/AppConfig.xml?rev=280025&r1=280024&r2=280025&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/Nexus/Test/Resources/Command/AppConfig.xml
(original)
+++ struts/sandbox/trunk/overdrive/Nexus/Test/Resources/Command/AppConfig.xml
Sat Sep 10 12:04:14 2005
@@ -11,6 +11,12 @@
<property name="PostOp"><ref object="PostOp"/></property>
</object>
+<!-- View Helper-->
+
+ <object id="ViewHelper" type="Nexus.Core.Helpers.ViewHelper"
singleton="false">
+ <property name="ID"><value>ViewHelper</value></property>
+ </object>
+
<!-- Request Processors -->
<object id="ConvertInput" type="Nexus.Core.Validators.ConvertInput">
Modified: struts/sandbox/trunk/overdrive/Nexus/Test/Test.csproj
URL:
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Test/Test.csproj?rev=280025&r1=280024&r2=280025&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/Nexus/Test/Test.csproj (original)
+++ struts/sandbox/trunk/overdrive/Nexus/Test/Test.csproj Sat Sep 10 12:04:14
2005
@@ -17,7 +17,7 @@
DelaySign = "false"
OutputType = "Library"
PreBuildEvent = ""
- PostBuildEvent = ""
+ PostBuildEvent = "$(SolutionDir)postbuild.bat $(TargetDir)
$(TargetName) $(SolutionName) $(SolutionDir)"
RootNamespace = "Nexus.Core"
RunPostBuildEvent = "OnBuildSuccess"
StartupObject = ""
@@ -86,19 +86,19 @@
AssemblyFolderKey = "hklm\dn\nunit.framework"
/>
<Reference
- Name = "Nexus.Core"
- AssemblyName = "Nexus.Core"
- HintPath = "..\Core\bin\Debug\Nexus.Core.dll"
- />
- <Reference
Name = "Agility.Core"
AssemblyName = "Agility.Core"
- HintPath = "..\..\Agility\Core\bin\Debug\Agility.Core.dll"
+ HintPath = "..\..\local-cache\Agility\Agility.Core.dll"
/>
<Reference
Name = "Spring.Core"
AssemblyName = "Spring.Core"
- HintPath = "..\..\SpringNet.bin\Spring.Core.dll"
+ HintPath = "..\..\local-cache\SpringNet\Spring.Core.dll"
+ />
+ <Reference
+ Name = "Core"
+ Project = "{7C8CAFD4-1E45-41B4-9963-F51199B12EA7}"
+ Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
/>
<Reference
Name = "Extras"
@@ -143,6 +143,7 @@
SubType = "Code"
BuildAction = "Compile"
/>
+ <Folder RelPath = "bin\Debug\" />
<File
RelPath = "Commands\ListAll.cs"
SubType = "Code"
Added: struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Agility.Core.dll
URL:
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Agility.Core.dll?rev=280025&view=auto
==============================================================================
Binary file - no diff available.
Propchange: struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Agility.Core.dll
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Agility.Core.pdb
URL:
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Agility.Core.pdb?rev=280025&view=auto
==============================================================================
Binary file - no diff available.
Propchange: struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Agility.Core.pdb
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Core.dll
URL:
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Core.dll?rev=280025&view=auto
==============================================================================
Binary file - no diff available.
Propchange: struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Core.dll
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Core.pdb
URL:
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Core.pdb?rev=280025&view=auto
==============================================================================
Binary file - no diff available.
Propchange: struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Core.pdb
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]