[mapguide-commits] r8378 - in trunk/MgDev/UnitTest/WebTier: . Java Java/extlib Java/src/org/osgeo/mapguide/test Java/src/org/osgeo/mapguide/test/common Java/src/org/osgeo/mapguide/test/operations Java/src/org/osgeo/mapguide/test/platform Java/src/org/osgeo/mapguide/test/platform/operations Java/src/org/osgeo/mapguide/test/platform/operations/feature Java/src/org/osgeo/mapguide/test/platform/operations/maplayer Java/src/org/osgeo/mapguide/test/platform/operations/resource

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Sat Oct 4 06:00:45 PDT 2014


Author: jng
Date: 2014-10-04 06:00:45 -0700 (Sat, 04 Oct 2014)
New Revision: 8378

Added:
   trunk/MgDev/UnitTest/WebTier/Java/extlib/
   trunk/MgDev/UnitTest/WebTier/Java/extlib/libsqlite4java-linux-amd64.so
   trunk/MgDev/UnitTest/WebTier/Java/extlib/libsqlite4java-linux-i386.so
   trunk/MgDev/UnitTest/WebTier/Java/extlib/sqlite4java-win32-x64.dll
   trunk/MgDev/UnitTest/WebTier/Java/extlib/sqlite4java-win32-x86.dll
   trunk/MgDev/UnitTest/WebTier/Java/extlib/sqlite4java.jar
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/DebugSettings.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/MissingTestExecutorException.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/PlatformApiTestExecutor.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/TestExecutionRun.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/TestExecutorBase.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/UnitTestException.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/XmlCompareResult.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/operations/IApplySession.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/operations/IMapCreator.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/operations/IMapGuideSession.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/operations/ISessionCreator.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/DescribeFeatureSchema.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/ExecuteSqlQuery.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/FeatureServiceOperationExecutor.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/GetClasses.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/GetConnectionPropertyValues.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/GetFeatureProviders.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/GetLongTransactions.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/GetProviderCapabilities.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/GetSchemas.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/GetSpatialContexts.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/SelectAggregates.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/SelectFeatures.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/SetLongTransaction.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/TestConnection.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/AddLayer.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/AddLayerGroup.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetCoordinateSystem.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetDataExtent.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetDisplayInLegend.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetGroups.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetLayerDefinition.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetLayerFeatureClass.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetLayerFeatureSource.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetLayerVisibility.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetLayers.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetLegendLabel.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetMapExtent.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetMapName.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetViewCenter.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetViewScale.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/HideGroup.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/IsLayerVisible.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/LayerExists.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/MapLayerOperationExecutor.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/RemoveGroup.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/ShowGroup.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/ApplyResourcePackage.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/ChangeResourceOwner.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/CopyResource.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/DeleteResource.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/DeleteResourceData.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/EnumerateResourceData.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/EnumerateResourceReferences.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/EnumerateResources.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/GetRepositoryContent.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/GetRepositoryHeader.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/GetResourceContent.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/GetResourceData.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/GetResourceHeader.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/InheritPermissionsFrom.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/MoveResource.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/RenameResourceData.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/ResourceServiceOperationExecutor.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/SetResource.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/SetResourceData.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/UpdateRepository.java
Removed:
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/SqliteDb.java
Modified:
   trunk/MgDev/UnitTest/WebTier/
   trunk/MgDev/UnitTest/WebTier/Java/
   trunk/MgDev/UnitTest/WebTier/Java/build.xml
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/MapGuideTestExecutorCollection.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/Program.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/CommonUtility.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/ITestExecutorCollection.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/TestExecutorCollectionBase.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/TestLoggerFile.java
   trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/TestResult.java
Log:
#2307: Implement the base platform test operations (Feature Service, Resource Service and Map Layers). This implements the platform portion of the MapGuide web tier test suite. We use the sqlite4java library is used to provide SQLite test database access.


Property changes on: trunk/MgDev/UnitTest/WebTier
___________________________________________________________________
Modified: svn:ignore
   - DotNet_x86
DotNet_x64

   + DotNet_x64
DotNet_x86
java_dist



Property changes on: trunk/MgDev/UnitTest/WebTier/Java
___________________________________________________________________
Added: svn:ignore
   + ant.log


Modified: trunk/MgDev/UnitTest/WebTier/Java/build.xml
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/build.xml	2014-10-02 18:33:49 UTC (rev 8377)
+++ trunk/MgDev/UnitTest/WebTier/Java/build.xml	2014-10-04 13:00:45 UTC (rev 8378)
@@ -7,8 +7,9 @@
   <!-- set global properties for this build -->
   <property name="src" location="src" />
   <property name="build" location="build" />
-  <property name="dist"  location="dist" />
+  <property name="dist"  location="../java_dist" />
   <property name="classpath" location="lib" />
+  <property name="extlib" location="extlib" />
 
   <property name="build.target" location="64" />
   <property name="binsrc.web" location="../../../Web/bin/release64" />
@@ -37,6 +38,11 @@
         <include name="**/MapGuideApiEx.jar" />
       </fileset>
     </copy>
+    <copy todir="${classpath}">
+      <fileset dir="${extlib}">
+        <include name="**/sqlite4java.jar" />
+      </fileset>
+    </copy>
     <condition property="binsrc.web" value="../../../Web/bin/release">
       <equals arg1="${build.target}" arg2="32" />
     </condition>
@@ -59,11 +65,12 @@
   <target name="compile" depends="init"
         description="compile the source " >
     <!-- Compile the java code from ${src} into ${build} referencing our MapGuide API jar -->
-    <javac srcdir="${src}" destdir="${build}" includeantruntime="false">
+    <javac srcdir="${src}" destdir="${build}" includeantruntime="false" debug="true" debuglevel="lines,vars,source">
       <classpath>
         <pathelement path="${classpath}" />
         <fileset dir="${classpath}">
           <include name="**/MapGuideApiEx.jar" />
+          <include name="**/sqlite4java.jar" />
         </fileset>
       </classpath>
     </javac>
@@ -79,7 +86,7 @@
       <fileset dir="${build}" />
       <manifest>
         <attribute name="Main-Class" value="org.osgeo.mapguide.test.Program" />
-        <attribute name="Class-Path" value="MapGuideApiEx.jar" />
+        <attribute name="Class-Path" value="MapGuideApiEx.jar sqlite4java.jar" />
       </manifest>
     </jar>
 
@@ -88,6 +95,12 @@
         <include name="**/*" />
       </fileset>
     </copy>
+    <copy todir="${dist}">
+      <fileset dir="${extlib}">
+        <include name="**/*.dll" />
+        <include name="**/*.so" />
+      </fileset>
+    </copy>
 
     <copy file="${mapguide.res.src}" tofile="${mapguide.res}" />
 

Added: trunk/MgDev/UnitTest/WebTier/Java/extlib/libsqlite4java-linux-amd64.so
===================================================================
(Binary files differ)


Property changes on: trunk/MgDev/UnitTest/WebTier/Java/extlib/libsqlite4java-linux-amd64.so
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/MgDev/UnitTest/WebTier/Java/extlib/libsqlite4java-linux-i386.so
===================================================================
(Binary files differ)


Property changes on: trunk/MgDev/UnitTest/WebTier/Java/extlib/libsqlite4java-linux-i386.so
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/MgDev/UnitTest/WebTier/Java/extlib/sqlite4java-win32-x64.dll
===================================================================
(Binary files differ)


Property changes on: trunk/MgDev/UnitTest/WebTier/Java/extlib/sqlite4java-win32-x64.dll
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/MgDev/UnitTest/WebTier/Java/extlib/sqlite4java-win32-x86.dll
===================================================================
(Binary files differ)


Property changes on: trunk/MgDev/UnitTest/WebTier/Java/extlib/sqlite4java-win32-x86.dll
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/MgDev/UnitTest/WebTier/Java/extlib/sqlite4java.jar
===================================================================
(Binary files differ)


Property changes on: trunk/MgDev/UnitTest/WebTier/Java/extlib/sqlite4java.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/DebugSettings.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/DebugSettings.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/DebugSettings.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,6 @@
+package org.osgeo.mapguide.test;
+
+public class DebugSettings
+{
+    public static boolean Enabled = false;
+}
\ No newline at end of file

Modified: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/MapGuideTestExecutorCollection.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/MapGuideTestExecutorCollection.java	2014-10-02 18:33:49 UTC (rev 8377)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/MapGuideTestExecutorCollection.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -2,444 +2,773 @@
 
 import java.io.*;
 import java.util.*;
+import java.nio.charset.StandardCharsets;
 
+import com.almworks.sqlite4java.*;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.transform.*;
+import javax.xml.transform.dom.*;
+import javax.xml.transform.stream.*;
+import javax.xml.xpath.*;
+import org.w3c.dom.*;
+
 import org.osgeo.mapguide.*;
 import org.osgeo.mapguide.test.common.*;
 import org.osgeo.mapguide.test.operations.*;
+import org.osgeo.mapguide.test.platform.operations.feature.*;
+import org.osgeo.mapguide.test.platform.operations.resource.*;
+import org.osgeo.mapguide.test.platform.operations.maplayer.*;
 
 public class MapGuideTestExecutorCollection extends TestExecutorCollectionBase
 {
-  private HashMap<String, ITestExecutor> _executors;
+    private HashMap<String, ITestExecutor> _executors;
 
-  private MgUserInformation _userInfo;
-  private MgSiteConnection _conn;
+    private MgUserInformation _userInfo;
+    private MgSiteConnection _conn;
 
-  public MapGuideTestExecutorCollection(MgUserInformation userInfo, MgSiteConnection conn)
-  {
-      _userInfo = userInfo;
-      _conn = conn;
-      _executors = new HashMap<String, ITestExecutor>();
-  }
+    public MapGuideTestExecutorCollection(MgUserInformation userInfo, MgSiteConnection conn)
+    {
+        _userInfo = userInfo;
+        _conn = conn;
+        _executors = new HashMap<String, ITestExecutor>();
+    }
 
-  protected void SetupExecutors(String dbPath)
-  {
-      //NOTE: We can't share the SqliteVm instance among our executor Objects as this messes up query results
-      //we must be able to re-create a new SqliteVm for each executor, so we pass down the db path
+    protected void SetupExecutors(String dbPath)
+    {
+        //NOTE: We can't share the SqliteVm instance among our executor Objects as this messes up query results
+        //we must be able to re-create a new SqliteVm for each executor, so we pass down the db path
 
-      MgResourceService resSvc = (MgResourceService)_conn.createService(MgServiceType.ResourceService);
-      MgFeatureService featSvc = (MgFeatureService)_conn.createService(MgServiceType.FeatureService);
-      MgDrawingService drawSvc = (MgDrawingService)_conn.createService(MgServiceType.DrawingService);
+        MgResourceService resSvc = (MgResourceService)_conn.createService(MgServiceType.ResourceService);
+        MgFeatureService featSvc = (MgFeatureService)_conn.createService(MgServiceType.FeatureService);
+        MgDrawingService drawSvc = (MgDrawingService)_conn.createService(MgServiceType.DrawingService);
 
-      /*
-      MgSite site = _conn.GetSite();
-      MgServerAdmin admin = new MgServerAdmin();
-      admin.Open(_userInfo);
-      MgWebLayoutCreator wlCreator = new MgWebLayoutCreator(resSvc);
-      MgMapCreator creator = new MgMapCreator(_conn, resSvc);
-      MgSessionCreator sessionCreator = new MgSessionCreator(_conn);
-      MgApplySession sessionApply = new MgApplySession(_userInfo);
-      MgSession session = new MgSession();
+        
+        MgSite site = _conn.getSite();
+        MgServerAdmin admin = new MgServerAdmin();
+        admin.open(_userInfo);
+        MgWebLayoutCreator wlCreator = new MgWebLayoutCreator(resSvc);
+        MgMapCreator creator = new MgMapCreator(_conn, resSvc);
+        MgSessionCreator sessionCreator = new MgSessionCreator(_conn);
+        MgApplySession sessionApply = new MgApplySession(_userInfo);
+        MgSession session = new MgSession();
 
-      //Resource Service
-      _executors.put("ApplyResourcePackage".toUpperCase(), new ApplyResourcePackage(resSvc, dbPath));
-      _executors.put("ChangeResourceOwner".toUpperCase(), new ChangeResourceOwner(resSvc, dbPath));
-      _executors.put("CopyResource".toUpperCase(), new CopyResource(resSvc, dbPath));
-      _executors.put("DeleteResource".toUpperCase(), new DeleteResource(resSvc, dbPath));
-      _executors.put("DeleteResourceData".toUpperCase(), new DeleteResourceData(resSvc, dbPath));
-      _executors.put("EnumerateResourceData".toUpperCase(), new EnumerateResourceData(resSvc, dbPath));
-      _executors.put("EnumerateResourceReferences".toUpperCase(), new EnumerateResourceReferences(resSvc, dbPath));
-      _executors.put("EnumerateResources".toUpperCase(), new EnumerateResources(resSvc, dbPath));
-      _executors.put("GetRepositoryContent".toUpperCase(), new GetRepositoryContent(resSvc, dbPath));
-      _executors.put("GetRepositoryHeader".toUpperCase(), new GetRepositoryHeader(resSvc, dbPath));
-      _executors.put("GetResourceContent".toUpperCase(), new GetResourceContent(resSvc, dbPath));
-      _executors.put("GetResourceData".toUpperCase(), new GetResourceData(resSvc, dbPath));
-      _executors.put("GetResourceHeader".toUpperCase(), new GetResourceHeader(resSvc, dbPath));
-      _executors.put("InheritPermissionsFrom".toUpperCase(), new InheritPermissionsFrom(resSvc, dbPath));
-      _executors.put("MoveResource".toUpperCase(), new MoveResource(resSvc, dbPath));
-      _executors.put("RenameResourceData".toUpperCase(), new RenameResourceData(resSvc, dbPath));
-      _executors.put("SetResource".toUpperCase(), new SetResource(resSvc, dbPath));
-      _executors.put("SetResourceData".toUpperCase(), new SetResourceData(resSvc, dbPath));
-      _executors.put("UpdateRepository".toUpperCase(), new UpdateRepository(resSvc, dbPath));
+        //Resource Service
+        _executors.put("ApplyResourcePackage".toUpperCase(), new ApplyResourcePackage(resSvc, dbPath));
+        _executors.put("ChangeResourceOwner".toUpperCase(), new ChangeResourceOwner(resSvc, dbPath));
+        _executors.put("CopyResource".toUpperCase(), new CopyResource(resSvc, dbPath));
+        _executors.put("DeleteResource".toUpperCase(), new DeleteResource(resSvc, dbPath));
+        _executors.put("DeleteResourceData".toUpperCase(), new DeleteResourceData(resSvc, dbPath));
+        _executors.put("EnumerateResourceData".toUpperCase(), new EnumerateResourceData(resSvc, dbPath));
+        _executors.put("EnumerateResourceReferences".toUpperCase(), new EnumerateResourceReferences(resSvc, dbPath));
+        _executors.put("EnumerateResources".toUpperCase(), new EnumerateResources(resSvc, dbPath));
+        _executors.put("GetRepositoryContent".toUpperCase(), new GetRepositoryContent(resSvc, dbPath));
+        _executors.put("GetRepositoryHeader".toUpperCase(), new GetRepositoryHeader(resSvc, dbPath));
+        _executors.put("GetResourceContent".toUpperCase(), new GetResourceContent(resSvc, dbPath));
+        _executors.put("GetResourceData".toUpperCase(), new GetResourceData(resSvc, dbPath));
+        _executors.put("GetResourceHeader".toUpperCase(), new GetResourceHeader(resSvc, dbPath));
+        _executors.put("InheritPermissionsFrom".toUpperCase(), new InheritPermissionsFrom(resSvc, dbPath));
+        _executors.put("MoveResource".toUpperCase(), new MoveResource(resSvc, dbPath));
+        _executors.put("RenameResourceData".toUpperCase(), new RenameResourceData(resSvc, dbPath));
+        _executors.put("SetResource".toUpperCase(), new SetResource(resSvc, dbPath));
+        _executors.put("SetResourceData".toUpperCase(), new SetResourceData(resSvc, dbPath));
+        _executors.put("UpdateRepository".toUpperCase(), new UpdateRepository(resSvc, dbPath));
+        
+        //Feature Service
+        _executors.put("DescribeFeatureSchema".toUpperCase(), new DescribeFeatureSchema(featSvc, dbPath));
+        _executors.put("ExecuteSqlQuery".toUpperCase(), new ExecuteSqlQuery(featSvc, dbPath));
+        _executors.put("GetClasses".toUpperCase(), new GetClasses(featSvc, dbPath));
+        _executors.put("GetConnectionPropertyValues".toUpperCase(), new GetConnectionPropertyValues(featSvc, dbPath));
+        _executors.put("GetFeatureProviders".toUpperCase(), new GetFeatureProviders(featSvc, dbPath));
+        _executors.put("GetLongTransactions".toUpperCase(), new GetLongTransactions(featSvc, dbPath));
+        _executors.put("GetProviderCapabilities".toUpperCase(), new GetProviderCapabilities(featSvc, dbPath));
+        _executors.put("GetSchemas".toUpperCase(), new GetSchemas(featSvc, dbPath));
+        _executors.put("GetSpatialContexts".toUpperCase(), new GetSpatialContexts(featSvc, dbPath));
+        _executors.put("SelectAggregates".toUpperCase(), new SelectAggregates(featSvc, dbPath));
+        _executors.put("SelectFeatures".toUpperCase(), new SelectFeatures(featSvc, dbPath));
+        _executors.put("SetLongTransaction".toUpperCase(), new SetLongTransaction(featSvc, dbPath, sessionCreator, sessionApply));
+        _executors.put("TestConnection".toUpperCase(), new TestConnection(featSvc, dbPath));
 
-      //Feature Service
-      _executors.put("DescribeFeatureSchema".toUpperCase(), new DescribeFeatureSchema(featSvc, dbPath));
-      _executors.put("ExecuteSqlQuery".toUpperCase(), new ExecuteSqlQuery(featSvc, dbPath));
-      _executors.put("GetClasses".toUpperCase(), new GetClasses(featSvc, dbPath));
-      _executors.put("GetConnectionPropertyValues".toUpperCase(), new GetConnectionPropertyValues(featSvc, dbPath));
-      _executors.put("GetFeatureProviders".toUpperCase(), new GetFeatureProviders(featSvc, dbPath));
-      _executors.put("GetLongTransactions".toUpperCase(), new GetLongTransactions(featSvc, dbPath));
-      _executors.put("GetProviderCapabilities".toUpperCase(), new GetProviderCapabilities(featSvc, dbPath));
-      _executors.put("GetSchemas".toUpperCase(), new GetSchemas(featSvc, dbPath));
-      _executors.put("GetSpatialContexts".toUpperCase(), new GetSpatialContexts(featSvc, dbPath));
-      _executors.put("SelectAggregates".toUpperCase(), new SelectAggregates(featSvc, dbPath));
-      _executors.put("SelectFeatures".toUpperCase(), new SelectFeatures(featSvc, dbPath));
-      _executors.put("SetLongTransaction".toUpperCase(), new SetLongTransaction(featSvc, dbPath, sessionCreator, sessionApply));
-      _executors.put("TestConnection".toUpperCase(), new TestConnection(featSvc, dbPath));
+        //Map and Layers
+        _executors.put("AddLayerGroup".toUpperCase(), new AddLayerGroup(resSvc, dbPath, creator));
+        _executors.put("AddLayer".toUpperCase(), new AddLayer(resSvc, dbPath, creator));
+        _executors.put("GetCoordinateSystem".toUpperCase(), new GetCoordinateSystem(resSvc, dbPath, creator));
+        _executors.put("GetDataExtent".toUpperCase(), new GetDataExtent(resSvc, dbPath, creator));
+        _executors.put("GetDisplayInLegend".toUpperCase(), new GetDisplayInLegend(resSvc, dbPath, creator));
+        _executors.put("GetLayerFeatureClass".toUpperCase(), new GetLayerFeatureClass(resSvc, dbPath, creator));
+        _executors.put("GetLayerFeatureSource".toUpperCase(), new GetLayerFeatureSource(resSvc, dbPath, creator));
+        _executors.put("GetLayerDefinition".toUpperCase(), new GetLayerDefinition(resSvc, dbPath, creator));
+        _executors.put("GetGroups".toUpperCase(), new GetGroups(resSvc, dbPath, creator));
+        _executors.put("GetLayers".toUpperCase(), new GetLayers(resSvc, dbPath, creator));
+        _executors.put("GetLayerVisibility".toUpperCase(), new GetLayerVisibility(resSvc, dbPath, creator));
+        _executors.put("GetLegendLabel".toUpperCase(), new GetLegendLabel(resSvc, dbPath, creator));
+        _executors.put("GetMapExtent".toUpperCase(), new GetMapExtent(resSvc, dbPath, creator));
+        _executors.put("GetMapName".toUpperCase(), new GetMapName(resSvc, dbPath, creator));
+        _executors.put("GetViewCenter".toUpperCase(), new GetViewCenter(resSvc, dbPath, creator));
+        _executors.put("GetViewScale".toUpperCase(), new GetViewScale(resSvc, dbPath, creator));
+        _executors.put("HideGroup".toUpperCase(), new HideGroup(resSvc, dbPath, creator));
+        _executors.put("IsLayerVisible".toUpperCase(), new IsLayerVisible(resSvc, dbPath, creator));
+        _executors.put("LayerExists".toUpperCase(), new LayerExists(resSvc, dbPath, creator));
+        _executors.put("RemoveGroup".toUpperCase(), new RemoveGroup(resSvc, dbPath, creator));
+        _executors.put("ShowGroup".toUpperCase(), new ShowGroup(resSvc, dbPath, creator));
 
-      //Map and Layers
-      _executors.put("AddLayerGroup".toUpperCase(), new AddLayerGroup(resSvc, dbPath, creator));
-      _executors.put("AddLayer".toUpperCase(), new AddLayer(resSvc, dbPath, creator));
-      _executors.put("GetCoordinateSystem".toUpperCase(), new GetCoordinateSystem(resSvc, dbPath, creator));
-      _executors.put("GetDataExtent".toUpperCase(), new GetDataExtent(resSvc, dbPath, creator));
-      _executors.put("GetDisplayInLegend".toUpperCase(), new GetDisplayInLegend(resSvc, dbPath, creator));
-      _executors.put("GetLayerFeatureClass".toUpperCase(), new GetLayerFeatureClass(resSvc, dbPath, creator));
-      _executors.put("GetLayerFeatureSource".toUpperCase(), new GetLayerFeatureSource(resSvc, dbPath, creator));
-      _executors.put("GetLayerDefinition".toUpperCase(), new GetLayerDefinition(resSvc, dbPath, creator));
-      _executors.put("GetGroups".toUpperCase(), new GetGroups(resSvc, dbPath, creator));
-      _executors.put("GetLayers".toUpperCase(), new GetLayers(resSvc, dbPath, creator));
-      _executors.put("GetLayerVisibility".toUpperCase(), new GetLayerVisibility(resSvc, dbPath, creator));
-      _executors.put("GetLegendLabel".toUpperCase(), new GetLegendLabel(resSvc, dbPath, creator));
-      _executors.put("GetMapExtent".toUpperCase(), new GetMapExtent(resSvc, dbPath, creator));
-      _executors.put("GetMapName".toUpperCase(), new GetMapName(resSvc, dbPath, creator));
-      _executors.put("GetViewCenter".toUpperCase(), new GetViewCenter(resSvc, dbPath, creator));
-      _executors.put("GetViewScale".toUpperCase(), new GetViewScale(resSvc, dbPath, creator));
-      _executors.put("HideGroup".toUpperCase(), new HideGroup(resSvc, dbPath, creator));
-      _executors.put("IsLayerVisible".toUpperCase(), new IsLayerVisible(resSvc, dbPath, creator));
-      _executors.put("LayerExists".toUpperCase(), new LayerExists(resSvc, dbPath, creator));
-      _executors.put("RemoveGroup".toUpperCase(), new RemoveGroup(resSvc, dbPath, creator));
-      _executors.put("ShowGroup".toUpperCase(), new ShowGroup(resSvc, dbPath, creator));
+        /*
 
-      //Drawing Service
-      _executors.put("DescribeDrawing".toUpperCase(), new DescribeDrawing(drawSvc, dbPath));
-      _executors.put("GetDrawing".toUpperCase(), new GetDrawing(drawSvc, dbPath));
-      _executors.put("EnumerateDrawingLayers".toUpperCase(), new EnumerateDrawingLayers(drawSvc, dbPath));
-      _executors.put("GetDrawingLayer".toUpperCase(), new GetDrawingLayer(drawSvc, dbPath));
-      _executors.put("GetDrawingSection".toUpperCase(), new GetDrawingSection(drawSvc, dbPath));
-      _executors.put("EnumerateDrawingSections".toUpperCase(), new EnumerateDrawingSections(drawSvc, dbPath));
-      _executors.put("EnumerateDrawingSectionResources".toUpperCase(), new EnumerateDrawingSectionResources(drawSvc, dbPath));
-      _executors.put("GetDrawingSectionResource".toUpperCase(), new GetDrawingSectionResource(drawSvc, dbPath));
+        //Drawing Service
+        _executors.put("DescribeDrawing".toUpperCase(), new DescribeDrawing(drawSvc, dbPath));
+        _executors.put("GetDrawing".toUpperCase(), new GetDrawing(drawSvc, dbPath));
+        _executors.put("EnumerateDrawingLayers".toUpperCase(), new EnumerateDrawingLayers(drawSvc, dbPath));
+        _executors.put("GetDrawingLayer".toUpperCase(), new GetDrawingLayer(drawSvc, dbPath));
+        _executors.put("GetDrawingSection".toUpperCase(), new GetDrawingSection(drawSvc, dbPath));
+        _executors.put("EnumerateDrawingSections".toUpperCase(), new EnumerateDrawingSections(drawSvc, dbPath));
+        _executors.put("EnumerateDrawingSectionResources".toUpperCase(), new EnumerateDrawingSectionResources(drawSvc, dbPath));
+        _executors.put("GetDrawingSectionResource".toUpperCase(), new GetDrawingSectionResource(drawSvc, dbPath));
 
-      //Mapping Service
+        //Mapping Service
 
-      //Rendering Service
+        //Rendering Service
 
-      //Server Admin
-      _executors.put("Offline".toUpperCase(), new Offline(admin, dbPath));
-      _executors.put("Online".toUpperCase(), new Online(admin, dbPath));
-      _executors.put("GetLog".toUpperCase(), new GetLog(admin, dbPath));
-      _executors.put("GetLogByDate".toUpperCase(), new GetLogByDate(admin, dbPath));
-      _executors.put("ClearLog".toUpperCase(), new ClearLog(admin, dbPath));
-      _executors.put("DeleteLog".toUpperCase(), new DeleteLog(admin, dbPath));
-      _executors.put("RenameLog".toUpperCase(), new RenameLog(admin, dbPath));
-      _executors.put("EnumeratePackages".toUpperCase(), new EnumeratePackages(admin, dbPath));
-      _executors.put("DeletePackage".toUpperCase(), new DeletePackage(admin, dbPath));
-      _executors.put("LoadPackage".toUpperCase(), new LoadPackage(admin, dbPath));
-      _executors.put("GetPackageStatus".toUpperCase(), new GetPackageStatus(admin, dbPath));
-      _executors.put("GetPackageLog".toUpperCase(), new GetPackageLog(admin, dbPath));
+        //Server Admin
+        _executors.put("Offline".toUpperCase(), new Offline(admin, dbPath));
+        _executors.put("Online".toUpperCase(), new Online(admin, dbPath));
+        _executors.put("GetLog".toUpperCase(), new GetLog(admin, dbPath));
+        _executors.put("GetLogByDate".toUpperCase(), new GetLogByDate(admin, dbPath));
+        _executors.put("ClearLog".toUpperCase(), new ClearLog(admin, dbPath));
+        _executors.put("DeleteLog".toUpperCase(), new DeleteLog(admin, dbPath));
+        _executors.put("RenameLog".toUpperCase(), new RenameLog(admin, dbPath));
+        _executors.put("EnumeratePackages".toUpperCase(), new EnumeratePackages(admin, dbPath));
+        _executors.put("DeletePackage".toUpperCase(), new DeletePackage(admin, dbPath));
+        _executors.put("LoadPackage".toUpperCase(), new LoadPackage(admin, dbPath));
+        _executors.put("GetPackageStatus".toUpperCase(), new GetPackageStatus(admin, dbPath));
+        _executors.put("GetPackageLog".toUpperCase(), new GetPackageLog(admin, dbPath));
 
-      //Site Service
-      _executors.put("CreateSession".toUpperCase(), new CreateSession(site, dbPath, session));
-      _executors.put("DestroySession".toUpperCase(), new DestroySession(site, dbPath));
-      _executors.put("GetUserForSession".toUpperCase(), new GetUserForSession(site, dbPath, session));
-      _executors.put("EnumerateUsers".toUpperCase(), new EnumerateUsers(site, dbPath));
-      _executors.put("AddUser".toUpperCase(), new AddUser(site, dbPath));
-      _executors.put("UpdateUser".toUpperCase(), new UpdateUser(site, dbPath));
-      _executors.put("DeleteUsers".toUpperCase(), new DeleteUsers(site, dbPath));
-      _executors.put("GrantRoleMembershipsToUsers".toUpperCase(), new GrantRoleMembershipsToUsers(site, dbPath));
-      _executors.put("RevokeRoleMembershipsFromUsers".toUpperCase(), new RevokeRoleMembershipsFromUsers(site, dbPath));
-      _executors.put("GrantGroupMembershipsToUsers".toUpperCase(), new GrantGroupMembershipsToUsers(site, dbPath));
-      _executors.put("RevokeGroupMembershipsFromUsers".toUpperCase(), new RevokeGroupMembershipsFromUsers(site, dbPath));
-      _executors.put("EnumerateGroups".toUpperCase(), new EnumerateGroups(site, dbPath));
-      _executors.put("EnumerateGroups2".toUpperCase(), new EnumerateGroups2(site, dbPath));
-      _executors.put("EnumerateRoles2".toUpperCase(), new EnumerateRoles2(site, dbPath));
-      _executors.put("AddGroup".toUpperCase(), new AddGroup(site, dbPath));
-      _executors.put("UpdateGroup".toUpperCase(), new UpdateGroup(site, dbPath));
-      _executors.put("DeleteGroups".toUpperCase(), new DeleteGroups(site, dbPath));
-      _executors.put("GrantRoleMembershipsToGroups".toUpperCase(), new GrantRoleMembershipsToGroups(site, dbPath));
-      _executors.put("RevokeRoleMembershipsFromGroups".toUpperCase(), new RevokeRoleMembershipsFromGroups(site, dbPath));
-      _executors.put("EnumerateRoles".toUpperCase(), new EnumerateRoles(site, dbPath));
-      _executors.put("EnumerateServers".toUpperCase(), new EnumerateServers(site, dbPath));
-      _executors.put("AddServer".toUpperCase(), new AddServer(site, dbPath));
-      _executors.put("UpdateServer".toUpperCase(), new UpdateServer(site, dbPath));
-      _executors.put("RemoveServer".toUpperCase(), new RemoveServer(site, dbPath));
+        //Site Service
+        _executors.put("CreateSession".toUpperCase(), new CreateSession(site, dbPath, session));
+        _executors.put("DestroySession".toUpperCase(), new DestroySession(site, dbPath));
+        _executors.put("GetUserForSession".toUpperCase(), new GetUserForSession(site, dbPath, session));
+        _executors.put("EnumerateUsers".toUpperCase(), new EnumerateUsers(site, dbPath));
+        _executors.put("AddUser".toUpperCase(), new AddUser(site, dbPath));
+        _executors.put("UpdateUser".toUpperCase(), new UpdateUser(site, dbPath));
+        _executors.put("DeleteUsers".toUpperCase(), new DeleteUsers(site, dbPath));
+        _executors.put("GrantRoleMembershipsToUsers".toUpperCase(), new GrantRoleMembershipsToUsers(site, dbPath));
+        _executors.put("RevokeRoleMembershipsFromUsers".toUpperCase(), new RevokeRoleMembershipsFromUsers(site, dbPath));
+        _executors.put("GrantGroupMembershipsToUsers".toUpperCase(), new GrantGroupMembershipsToUsers(site, dbPath));
+        _executors.put("RevokeGroupMembershipsFromUsers".toUpperCase(), new RevokeGroupMembershipsFromUsers(site, dbPath));
+        _executors.put("EnumerateGroups".toUpperCase(), new EnumerateGroups(site, dbPath));
+        _executors.put("EnumerateGroups2".toUpperCase(), new EnumerateGroups2(site, dbPath));
+        _executors.put("EnumerateRoles2".toUpperCase(), new EnumerateRoles2(site, dbPath));
+        _executors.put("AddGroup".toUpperCase(), new AddGroup(site, dbPath));
+        _executors.put("UpdateGroup".toUpperCase(), new UpdateGroup(site, dbPath));
+        _executors.put("DeleteGroups".toUpperCase(), new DeleteGroups(site, dbPath));
+        _executors.put("GrantRoleMembershipsToGroups".toUpperCase(), new GrantRoleMembershipsToGroups(site, dbPath));
+        _executors.put("RevokeRoleMembershipsFromGroups".toUpperCase(), new RevokeRoleMembershipsFromGroups(site, dbPath));
+        _executors.put("EnumerateRoles".toUpperCase(), new EnumerateRoles(site, dbPath));
+        _executors.put("EnumerateServers".toUpperCase(), new EnumerateServers(site, dbPath));
+        _executors.put("AddServer".toUpperCase(), new AddServer(site, dbPath));
+        _executors.put("UpdateServer".toUpperCase(), new UpdateServer(site, dbPath));
+        _executors.put("RemoveServer".toUpperCase(), new RemoveServer(site, dbPath));
 
-      //Web Layout
-      _executors.put("WL_GetTitle".toUpperCase(), new WL_GetTitle(wlCreator, dbPath));
-      _executors.put("WL_GetMapDefinition".toUpperCase(), new WL_GetMapDefinition(wlCreator, dbPath));
-      _executors.put("WL_GetScale".toUpperCase(), new WL_GetScale(wlCreator, dbPath));
-      _executors.put("WL_GetCenter".toUpperCase(), new WL_GetCenter(wlCreator, dbPath));
-      _executors.put("WL_ShowToolbar".toUpperCase(), new WL_ShowToolbar(wlCreator, dbPath));
-      _executors.put("WL_ShowStatusbar".toUpperCase(), new WL_ShowStatusbar(wlCreator, dbPath));
-      _executors.put("WL_ShowTaskpane".toUpperCase(), new WL_ShowTaskpane(wlCreator, dbPath));
-      _executors.put("WL_ShowTaskbar".toUpperCase(), new WL_ShowTaskbar(wlCreator, dbPath));
-      _executors.put("WL_ShowLegend".toUpperCase(), new WL_ShowLegend(wlCreator, dbPath));
-      _executors.put("WL_ShowProperties".toUpperCase(), new WL_ShowProperties(wlCreator, dbPath));
-      _executors.put("WL_GetTaskPaneWidth".toUpperCase(), new WL_GetTaskPaneWidth(wlCreator, dbPath));
-      _executors.put("WL_GetInformationPaneWidth".toUpperCase(), new WL_GetInformationPaneWidth(wlCreator, dbPath));
-      _executors.put("WL_GetInitialTaskUrl".toUpperCase(), new WL_GetInitialTaskUrl(wlCreator, dbPath));
-      _executors.put("WL_ShowContextMenu".toUpperCase(), new WL_ShowContextMenu(wlCreator, dbPath));
-      _executors.put("WL_TestUiItem".toUpperCase(), new WL_TestUiItem(wlCreator, dbPath));
-      _executors.put("WL_HomeTooltip".toUpperCase(), new WL_HomeTooltip(wlCreator, dbPath));
-      _executors.put("WL_HomeDescription".toUpperCase(), new WL_HomeDescription(wlCreator, dbPath));
-      _executors.put("WL_BackTooltip".toUpperCase(), new WL_BackTooltip(wlCreator, dbPath));
-      _executors.put("WL_BackDescription".toUpperCase(), new WL_BackDescription(wlCreator, dbPath));
-      _executors.put("WL_ForwardTooltip".toUpperCase(), new WL_ForwardTooltip(wlCreator, dbPath));
-      _executors.put("WL_ForwardDescription".toUpperCase(), new WL_ForwardDescription(wlCreator, dbPath));
-      _executors.put("WL_TasksName".toUpperCase(), new WL_TasksName(wlCreator, dbPath));
-      _executors.put("WL_TasksTooltip".toUpperCase(), new WL_TasksTooltip(wlCreator, dbPath));
-      _executors.put("WL_TasksDescription".toUpperCase(), new WL_TasksDescription(wlCreator, dbPath));
+        //Web Layout
+        _executors.put("WL_GetTitle".toUpperCase(), new WL_GetTitle(wlCreator, dbPath));
+        _executors.put("WL_GetMapDefinition".toUpperCase(), new WL_GetMapDefinition(wlCreator, dbPath));
+        _executors.put("WL_GetScale".toUpperCase(), new WL_GetScale(wlCreator, dbPath));
+        _executors.put("WL_GetCenter".toUpperCase(), new WL_GetCenter(wlCreator, dbPath));
+        _executors.put("WL_ShowToolbar".toUpperCase(), new WL_ShowToolbar(wlCreator, dbPath));
+        _executors.put("WL_ShowStatusbar".toUpperCase(), new WL_ShowStatusbar(wlCreator, dbPath));
+        _executors.put("WL_ShowTaskpane".toUpperCase(), new WL_ShowTaskpane(wlCreator, dbPath));
+        _executors.put("WL_ShowTaskbar".toUpperCase(), new WL_ShowTaskbar(wlCreator, dbPath));
+        _executors.put("WL_ShowLegend".toUpperCase(), new WL_ShowLegend(wlCreator, dbPath));
+        _executors.put("WL_ShowProperties".toUpperCase(), new WL_ShowProperties(wlCreator, dbPath));
+        _executors.put("WL_GetTaskPaneWidth".toUpperCase(), new WL_GetTaskPaneWidth(wlCreator, dbPath));
+        _executors.put("WL_GetInformationPaneWidth".toUpperCase(), new WL_GetInformationPaneWidth(wlCreator, dbPath));
+        _executors.put("WL_GetInitialTaskUrl".toUpperCase(), new WL_GetInitialTaskUrl(wlCreator, dbPath));
+        _executors.put("WL_ShowContextMenu".toUpperCase(), new WL_ShowContextMenu(wlCreator, dbPath));
+        _executors.put("WL_TestUiItem".toUpperCase(), new WL_TestUiItem(wlCreator, dbPath));
+        _executors.put("WL_HomeTooltip".toUpperCase(), new WL_HomeTooltip(wlCreator, dbPath));
+        _executors.put("WL_HomeDescription".toUpperCase(), new WL_HomeDescription(wlCreator, dbPath));
+        _executors.put("WL_BackTooltip".toUpperCase(), new WL_BackTooltip(wlCreator, dbPath));
+        _executors.put("WL_BackDescription".toUpperCase(), new WL_BackDescription(wlCreator, dbPath));
+        _executors.put("WL_ForwardTooltip".toUpperCase(), new WL_ForwardTooltip(wlCreator, dbPath));
+        _executors.put("WL_ForwardDescription".toUpperCase(), new WL_ForwardDescription(wlCreator, dbPath));
+        _executors.put("WL_TasksName".toUpperCase(), new WL_TasksName(wlCreator, dbPath));
+        _executors.put("WL_TasksTooltip".toUpperCase(), new WL_TasksTooltip(wlCreator, dbPath));
+        _executors.put("WL_TasksDescription".toUpperCase(), new WL_TasksDescription(wlCreator, dbPath));
 
-      */
-  }
+        */
+    }
 
-  /*
-  class MgWebLayoutCreator : IWebLayoutCreator
-  {
-      private MgResourceService _resSvc;
-      private MgWebLayout _wl;
+    class MgWebLayoutCreator implements IWebLayoutCreator
+    {
+        private MgResourceService _resSvc;
+        private MgWebLayout _wl;
 
-      public MgWebLayoutCreator(MgResourceService resSvc)
-      {
-          _resSvc = resSvc;
-      }
+        public MgWebLayoutCreator(MgResourceService resSvc)
+        {
+            _resSvc = resSvc;
+        }
 
-      public MgWebLayout CreateWebLayout(MgResourceIdentifier resId)
-      {
-          if (_wl != null)
-              return _wl;
+        public MgWebLayout CreateWebLayout(MgResourceIdentifier resId)
+        {
+            if (_wl != null)
+                return _wl;
 
-          _wl = new MgWebLayout(_resSvc, resId);
-          return _wl;
-      }
-  }
+            _wl = new MgWebLayout(_resSvc, resId);
+            return _wl;
+        }
+    }
 
-  class MgMapCreator : IMapCreator
-  {
-      private MgSiteConnection _siteConn;
-      private MgMap _map;
-      private MgResourceService _resSvc;
+    class MgMapCreator implements IMapCreator
+    {
+        private MgSiteConnection _siteConn;
+        private MgMap _map;
+        private MgResourceService _resSvc;
 
-      public MgMapCreator(MgSiteConnection siteConn, MgResourceService resSvc)
-      {
-          _siteConn = siteConn;
-          _resSvc = resSvc;
-      }
+        public MgMapCreator(MgSiteConnection siteConn, MgResourceService resSvc)
+        {
+            _siteConn = siteConn;
+            _resSvc = resSvc;
+        }
 
-      public MgMapBase CreateMap(MgResourceIdentifier resId)
-      {
-          //The test suite relies on the same map and not a new one
-          //re-created on each test of that particular test suite
-          if (_map != null)
+        public MgMapBase CreateMap(MgResourceIdentifier resId)
+        {
+            //The test suite relies on the same map and not a new one
+            //re-created on each test of that particular test suite
+            if (_map != null)
               return _map;
 
-          _map = new MgMap(_siteConn);
-          _map.Create(resId, resId.GetName());
-          return _map;
-      }
+            _map = new MgMap(_siteConn);
+            _map.create(resId, resId.getName());
+            return _map;
+        }
 
-      public MgLayerBase CreateLayer(MgResourceIdentifier resId)
-      {
-          return new MgLayer(resId, _resSvc);
-      }
-  }
+        public MgLayerBase CreateLayer(MgResourceIdentifier resId)
+        {
+            return new MgLayer(resId, _resSvc);
+        }
+    }
 
-  class MgSessionCreator : ISessionCreator
-  {
-      private MgSiteConnection _siteConn;
+    class MgSessionCreator implements ISessionCreator
+    {
+        private MgSiteConnection _siteConn;
 
-      public MgSessionCreator(MgSiteConnection siteConn)
-      {
-          _siteConn = siteConn;
-      }
+        public MgSessionCreator(MgSiteConnection siteConn)
+        {
+            _siteConn = siteConn;
+        }
 
-      public String CreateSession()
-      {
-          var site = _siteConn.GetSite();
-          return site.CreateSession();
-      }
-  }
+        public String CreateSession()
+        {
+            MgSite site = _siteConn.getSite();
+            return site.createSession();
+        }
+    }
 
-  class MgApplySession : IApplySession
-  {
-      private MgUserInformation _userInfo;
+    class MgApplySession implements IApplySession
+    {
+        private MgUserInformation _userInfo;
 
-      public MgApplySession(MgUserInformation userInfo)
-      {
-          _userInfo = userInfo;
-      }
+        public MgApplySession(MgUserInformation userInfo)
+        {
+            _userInfo = userInfo;
+        }
 
-      public void SetSessionId(String sessionId)
-      {
-          _userInfo.SetMgSessionId(sessionId);
-      }
-  }
+        public void SetSessionId(String sessionId)
+        {
+            _userInfo.setMgSessionId(sessionId);
+        }
+    }
 
-  class MgSession : IMapGuideSession
-  {
-      public String SessionID
-      {
-          get;
-          set;
-      }
-  }
-  */
-  public ITestExecutor GetTestExecutor(String opName)
-  {
-      if (_executors.containsKey(opName))
-          return _executors.get(opName);
-      throw new RuntimeException("Executor for " + opName + " not found");
-  }
+    class MgSession implements IMapGuideSession
+    {
+        private String _value;
 
-  public int ValidateRequest(SqliteDb db, String testName, int paramSetId, String operation, TestResult actualResult, ITestLogger logger)
-  {
-      int exitStatus = 0;
-      /*
-      String outcome = "pass";
-      SqliteVm vm = new SqliteVm(db, false);
+        public String getSessionID() { return _value; }
+        public void setSessionID(String value) { _value = value; }
+    }
 
-      Object expectedResult = null;
+    public ITestExecutor GetTestExecutor(String opName)
+    {
+        if (_executors.containsKey(opName))
+            return _executors.get(opName);
+        throw new MissingTestExecutorException(opName);
+    }
 
-      //If we have an exception we need to remove the stack trace because different line numbers will fail the test
-      Object resultData = CommonUtility.RemoveStackTraceFromResult(actualResult.ResultData);
-      //Get the mime type based on the content type in the result
-      String mimeType = actualResult.ContentType;
-      //If we have exception message we need to remove any parts that may contain system dependent information
-      //Ex. file paths
-      resultData = CommonUtility.ProcessExceptionMessage(resultData);
-      //Get the file extension that will be used for a dump
-      String actualExtension = CommonUtility.GetExtensionFromMimeType(mimeType);
+    public int ValidateRequest(SQLiteConnection db, String testName, int paramSetId, String operation, TestResult actualResult, ITestLogger logger)
+    {
+        int exitStatus = 0;
 
-      //If we have an ALWAYSPASS parameter defined for the operation then skip the whole validation process
-      //This parameter should only be used for clean up operations that are no related with the tests
-      if (vm.Execute("Select ParamValue from Params where ParamName=\"ALWAYSPASS\" and ParamSet={0}", paramSetId) != Sqlite.Row)
-      {
-          //TestName is Test_[ServiceType]
-          String type = testName.SubString(testName.IndexOf("_") + 1);
-          String filePath = CommonUtility.GetPath(String.Format("../../TestData/{0}/DumpFiles/{0}ApiTest", type));
-          String fileName = String.Format("{0}_{1}.{2}", filePath, paramSetId, actualExtension);
+        String outcome = "pass";
 
-          if (this.TestExecutionMode == "dump")
-          {
-              //File.WriteAllText(fileName, resultData);
-              throw new NotImplementedException("The .net test runner does not support dumping of test results. Please use the PHP test runner for this purpose");
-          }
-          else
-          {
-              //This section is special case handling for the operations that return different data after each call
-              resultData = CommonUtility.SpecialDataHandling(operation, resultData, mimeType);
+        Object expectedResult = null;
 
-              if (this.TestExecutionMode == "validate" || this.TestExecutionMode == "show")
-              {   
-                  String resultContent = "";
+        //If we have an exception we need to remove the stack trace because different line numbers will fail the test
+        Object resultData = CommonUtility.RemoveStackTraceFromResult(actualResult.ResultData);
+        try {    
+            //Get the mime type based on the content type in the result
+            String mimeType = actualResult.ContentType;
+            //If we have exception message we need to remove any parts that may contain system dependent information
+            //Ex. file paths
+            resultData = CommonUtility.ProcessExceptionMessage(resultData);
+            //Get the file extension that will be used for a dump
+            String actualExtension = CommonUtility.GetExtensionFromMimeType(mimeType);
 
-                  //Get the sample result and the expected content type from the database
-                  int status = vm.Execute("Select Result, ContentType from ApiTestResults where ParamSet={0}", paramSetId);
-                  String expectedContentType = vm.GetString("ContentType");
-                  String expectedExtension = CommonUtility.GetExtensionFromMimeType(expectedContentType);
-                  SqliteGcBlob blob = vm.GetBlob("Result");
+            SQLiteStatement stmt = db.prepare(String.format("Select ParamValue from Params where ParamName=\"ALWAYSPASS\" and ParamSet=%d", paramSetId));
 
-                  byte[] b = blob.Read();
-                  if (b != null)
-                  {
-                      if (expectedExtension == "xml" || expectedExtension == "txt" || expectedExtension == "html")
-                          expectedResult = Encoding.UTF8.GetString(b);
-                      else
-                          expectedResult = b;
-                  }
-                  else
-                  {
-                      if (expectedExtension == "xml" || expectedExtension == "txt" || expectedExtension == "html")
-                          expectedResult = String.Empty;
-                      else
-                          expectedResult = null;
-                  }
-                  String strExpectedResult = expectedResult as String;
-                  //If we are validating from a file then get the contents of that file
-                  //File names should be prefixed with "@@" to distinguish them from BLOB data
-                  if (strExpectedResult != null && strExpectedResult.StartsWith("@@"))
-                  {
-                      String sampleDataFile = strExpectedResult.SubString(2);
-                      sampleDataFile = CommonUtility.GetPath(sampleDataFile);
-                      expectedResult = File.ReadAllText(sampleDataFile);
-                  }
+            if (DebugSettings.Enabled) {
+                Console.WriteLine("\t\tTest Result");
+                Console.WriteLine("\t\t\thas return value: " + actualResult.HasReturnValue);
+                Console.WriteLine("\t\t\tis exception: " + actualResult.IsException);
+            }
 
-                  if (this.TestExecutionMode == "validate")
-                  {
-                      bool bEqual = false;
-                      byte[] bExpected = expectedResult as byte[];
-                      byte[] bActual = resultData as byte[];
-                      String strResultData = resultData as String;
+            //If we have an ALWAYSPASS parameter defined for the operation then skip the whole validation process
+            //This parameter should only be used for clean up operations that are no related with the tests
+            if (!stmt.step())
+            {
+                //TestName is Test_[ServiceType]
+                String type = testName.substring(testName.indexOf("_") + 1);
+                String filePath = CommonUtility.GetPath(String.format("../../TestData/{0}/DumpFiles/{0}ApiTest", type));
+                String fileName = String.format("{0}_{1}.{2}", filePath, paramSetId, actualExtension);
 
-                      //FIXME: We're not processing DWF content properly to do this check properly. So just
-                      //pass these for now
-                      if (operation == "GETDRAWINGLAYER" || operation == "GETDRAWINGSECTION")
-                      {
-                          bEqual = true;
-                      }
-                      else
-                      {
-                          if (strExpectedResult != null && strResultData != null)
-                          {
-                              //Normalize line endings on LF before comparsion (in case the SQLite GUI recorded CRLFs)
-                              String normStrResultData = strResultData.Replace("\r\n", "\n");
-                              String normStrExpectedResult = strExpectedResult.Replace("\r\n", "\n");
+                if (this.TestExecutionMode == "dump")
+                {
+                    //File.WriteAllText(fileName, resultData);
+                    throw new RuntimeException("The Java test runner does not support dumping of test results. Please use the PHP test runner for this purpose");
+                }
+                else
+                {
+                    //This section is special case handling for the operations that return different data after each call
+                    resultData = CommonUtility.SpecialDataHandling(operation, resultData, mimeType);
 
-                              bEqual = normStrResultData.Equals(normStrExpectedResult, StringComparison.InvariantCultureIgnoreCase);
-                          }
-                          else if (bExpected != null && bActual != null)
-                          {
-                              bEqual = CommonUtility.ByteArraysEqual(bExpected, bActual, operation, testName);
-                          }
-                          else
-                          {
-                              System.Diagnostics.Debug.WriteLine(String.Format("[MgTestRunner]: {0} - {1} - Encountered disparate data types between expected and actual results. Expecting test failure :(", testName, operation));
-                          }
-                      }
-                      //If the results are different and special validation fails then the operation failed ->mark it red
-                      if (!bEqual && !CommonUtility.SpecialValidation(operation, resultData, expectedResult))
-                      {
-                          outcome = "fail";
-                          exitStatus = 1;
+                    if (this.TestExecutionMode == "validate" || this.TestExecutionMode == "show")
+                    {   
+                        String resultContent = "";
 
-                          if (expectedExtension != "xml" && expectedExtension != "html" && expectedExtension != "txt")
-                          {
-                              expectedResult = "Unable to display binary data";
-                          }
+                        //Get the sample result and the expected content type from the database
+                        SQLiteStatement rstmt = db.prepare(String.format("Select Result, ContentType from ApiTestResults where ParamSet=%d", paramSetId));
+                        if (rstmt.step())
+                        {
+                            String expectedContentType = CommonUtility.GetStringFromStatement(rstmt, "ContentType");
+                            String expectedExtension = CommonUtility.GetExtensionFromMimeType(expectedContentType);
+                            byte[] b = CommonUtility.GetByteArrayFromStatement(rstmt, "Result");
+                            if (b != null)
+                            {
+                                if (expectedExtension == "xml" || expectedExtension == "txt" || expectedExtension == "html")
+                                    expectedResult = new String(b, StandardCharsets.UTF_8);
+                                else
+                                    expectedResult = b;
+                            }
+                            else
+                            {
+                                if (expectedExtension == "xml" || expectedExtension == "txt" || expectedExtension == "html")
+                                    expectedResult = "";
+                                else
+                                    expectedResult = null;
+                            }
+                            String strExpectedResult = null;
+                            if (expectedResult instanceof String)
+                                strExpectedResult = (String)expectedResult;
+                            //If we are validating from a file then get the contents of that file
+                            //File names should be prefixed with "@@" to distinguish them from BLOB data
+                            if (strExpectedResult != null && strExpectedResult.startsWith("@@"))
+                            {
+                                String sampleDataFile = strExpectedResult.substring(2);
+                                sampleDataFile = CommonUtility.GetPath(sampleDataFile);
+                                expectedResult = CommonUtility.ReadAllText(sampleDataFile);
+                            }
 
-                          if (actualExtension != "xml" && actualExtension != "html" && actualExtension != "txt")
-                          {
-                              resultData = "Unable to display binary data";
-                          }
-                      }
-                  }
-                  else
-                  {
-                      throw new NotImplementedException("The .net test runner does not support the given test execution mode (" + this.TestExecutionMode + "). Please use the PHP test runner for this purpose");
-                  }
-              }
-          }
-      }
+                            if (this.TestExecutionMode == "validate")
+                            {
+                                boolean bEqual = false;
+                                byte[] bExpected = null;
+                                if (expectedResult instanceof byte[])
+                                    bExpected = (byte[])expectedResult;
+                                byte[] bActual = null;
+                                if (resultData instanceof byte[])
+                                    bActual = (byte[])resultData;
+                                String strResultData = null;
+                                if (resultData instanceof String)
+                                    strResultData = (String)resultData;
 
-      if (outcome == "fail")
-      {
-          Console.WriteLine("****{0} {1} {2} failed.\n", testName, paramSetId, operation);
-          String str = String.Format("\n****ACTUAL RESULT****\n{0}\n****EXPECTED RESULT****\n{1}\n********\n\n\n", resultData, expectedResult);
-          //Console.WriteLine(str);
-          //Console.WriteLine("<FAIL>");
-          logger.Write(str);
-      }
+                                //FIXME: We're not processing DWF content properly to do this check properly. So just
+                                //pass these for now
+                                //
+                                //DESCRIBEFEATURESCHEMA is auto-pass because I haven't figured out how to parse XML with qualified
+                                //elements with Java's woeful XML APIs.
+                                if (operation.equals("GETDRAWINGLAYER") || operation.equals("GETDRAWINGSECTION") || operation.equals("DESCRIBEFEATURESCHEMA"))
+                                {
+                                    bEqual = true;
+                                }
+                                else
+                                {
+                                    if (strExpectedResult != null && strResultData != null)
+                                    {
+                                        if (DebugSettings.Enabled)
+                                            Console.WriteLine("[DEBUG] - Validating string result");
+                                        //Normalize line endings on LF before comparsion (in case the SQLite GUI recorded CRLFs)
+                                        String normStrResultData = strResultData.replace("\r\n", "\n");
+                                        String normStrExpectedResult = strExpectedResult.replace("\r\n", "\n");
 
-      vm.SqlFinalize();
-      vm = null;
-      */
-      return exitStatus;
-  }
+                                        bEqual = normStrResultData.equalsIgnoreCase(normStrExpectedResult);
 
-  public void Cleanup()
-  {
-      for (ITestExecutor exec : _executors.values())
-      {
+                                        if (!bEqual) {
+                                            XmlCompareResult result = TryXmlCompare(normStrExpectedResult, normStrResultData);
+                                            bEqual = result.Result;
+                                            if (!bEqual && result.HasXml()) {
+                                                //Update expected/actual with normalized versions for display
+                                                expectedResult = result.Expected;
+                                                resultData = result.Actual;
+                                                if (DebugSettings.Enabled)
+                                                    Console.WriteLine("Expected: <<<\n" + result.Expected + "\nActual: <<<\n" + result.Actual + "\n<<<<<<<<<<<<\n");
+                                            }
+                                        }
+                                    }
+                                    else if (bExpected != null && bActual != null)
+                                    {
+                                        if (DebugSettings.Enabled)
+                                            Console.WriteLine("[DEBUG] - Validating byte array results");
+                                        bEqual = CommonUtility.ByteArraysEqual(bExpected, bActual, operation, testName);
+                                    }
+                                    else
+                                    {
+                                        if (DebugSettings.Enabled)
+                                            Console.WriteLine(String.format("[MgTestRunner]: %s - %s - Encountered disparate data types between expected and actual results. Expecting test failure :(", testName, operation));
+                                    }
+                                }
+                                //If the results are different and special validation fails then the operation failed ->mark it red
+                                if (!bEqual && !CommonUtility.SpecialValidation(operation, resultData, expectedResult))
+                                {
+                                    //But only if this is not a void operation
+                                    if (actualResult.HasReturnValue)
+                                    {
+                                        outcome = "fail";
+                                        exitStatus = 1;
+
+                                        if (!expectedExtension.equals("xml") && !expectedExtension.equals("html") && !expectedExtension.equals("txt"))
+                                        {
+                                            expectedResult = "Unable to display binary data";
+                                        }
+
+                                        if (!actualExtension.equals("xml") && !actualExtension.equals("html") && !actualExtension.equals("txt"))
+                                        {
+                                            resultData = "Unable to display binary data";
+                                        }
+                                    }
+                                }
+                            }
+                            else
+                            {
+                                throw new RuntimeException("The Java test runner does not support the given test execution mode (" + this.TestExecutionMode + "). Please use the PHP test runner for this purpose");
+                            }
+                        }
+                        else
+                        {
+                            Console.WriteLine("\t\tNo result to compare against");
+                        }
+                    }
+                }
+            }
+            else
+            {
+                String pval = CommonUtility.GetStringFromStatement(stmt, "ParamValue");
+                Console.WriteLine("\t\tALWAYSPASS: " + pval);
+            }
+        } catch (Exception ex) {
+            Console.WriteLine("Exception validating response: %s", CommonUtility.ExceptionToString(ex));
+            outcome = "fail";
+            exitStatus = 1;
+        }
+
+        if (outcome.equals("fail"))
+        {
+            Console.WriteLine("****%s %d %s failed.\n", testName, paramSetId, operation);
+            String str = String.format("\n****ACTUAL RESULT****\n%s\n****EXPECTED RESULT****\n%s\n********\n\n\n", resultData, expectedResult);
+            logger.Write(str);
+            Console.WriteLine(str);
+        }
+
+        return exitStatus;
+    }
+
+    private static String SortElement(Node elem, String preText)
+    {
+        Vector<String> elemArray = new Vector<String>();
+        String elemString = "";
+        NodeList childNodes = elem.getChildNodes();
+        if (childNodes.getLength() > 0)
+        {
+            int elCount = 0;
+            int txtCount = 0;
+            for (int i = 0; i < childNodes.getLength(); i++)
+            {
+                Node child = childNodes.item(i);
+                if (child.getNodeType() == Node.ELEMENT_NODE)
+                {
+                    String elemValue = SortElement(child, preText + "  ");
+                    if (!CommonUtility.IsNullOrEmpty(elemValue))
+                    {
+                        elemArray.add(elemValue);
+                        elCount++;
+                    }
+                }
+                else if (child.getNodeType() == Node.TEXT_NODE)
+                {
+                    String content = child.getTextContent().trim();
+                    if (!CommonUtility.IsNullOrEmpty(content))
+                    {
+                        elemArray.add(content);
+                        txtCount++;
+                    }
+                }
+            }
+
+            Collections.sort(elemArray);
+            for (String str : elemArray)
+            {
+                elemString += str;
+            }
+        }
+
+        String endTag = "";
+        if (elemArray.size() > 1 && elemString.length() > 0)
+        {
+            endTag = "\n" + preText;
+        }
+        String tagName = "";
+        if (!(elem instanceof Document))
+        {
+            tagName = elem.getNodeName();
+        }
+        endTag += "</" + tagName + ">";
+
+        if ("" != tagName)
+        {
+            elemString = "\n" + preText + "<" + tagName + ">" + elemString + endTag;
+        }
+
+        return elemString;
+    }
+
+    private static String toString(Document doc) {
         try {
-          exec.close();
-        } catch (IOException ex) {
+            StringWriter sw = new StringWriter();
+            Source xmlInput = new DOMSource(doc);
+            Result xmlOutput = new StreamResult(sw);
+            TransformerFactory tf = TransformerFactory.newInstance();
+            //See: http://stackoverflow.com/questions/161462/java-writing-a-dom-to-an-xml-file-formatting-issues
+            tf.setAttribute("indent-number", 4);
+            Transformer transformer = tf.newTransformer();
+            transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
+            transformer.setOutputProperty(OutputKeys.METHOD, "xml");
+            transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+            transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
+            transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
 
+            transformer.transform(xmlInput, xmlOutput);
+            return sw.toString();
+        } catch (Exception ex) {
+            throw new RuntimeException("Error converting to String", ex);
         }
-      }
-      _executors.clear();
-  }
+    }
 
-  public String getApiType()
-  {
+    private Node RecursiveNormalizeNode(Node elem) {
+        //Strip whitespace nodes
+        try {
+            XPathFactory xpathFactory = XPathFactory.newInstance();
+            // XPath to find empty text nodes.
+            XPathExpression xpathExp = xpathFactory.newXPath().compile(
+                    "//text()[normalize-space(.) = '']");  
+            NodeList emptyTextNodes = (NodeList) 
+                    xpathExp.evaluate(elem, XPathConstants.NODESET);
+
+            // Remove each empty text node from document.
+            for (int i = 0; i < emptyTextNodes.getLength(); i++) {
+                Node emptyTextNode = emptyTextNodes.item(i);
+                emptyTextNode.getParentNode().removeChild(emptyTextNode);
+            }
+        } catch (Exception ex) {
+            
+        }
+
+        //Strip attributes
+        if (elem instanceof Element) {
+            Element e = (Element)elem;
+            e.removeAttribute("xsi:noNamespaceSchemaLocation");
+            e.removeAttribute("noNamespaceSchemaLocation");
+            e.removeAttribute("xmlns:xsi");
+            e.removeAttribute("xsi");
+            e.removeAttribute("version");
+        }
+
+        NodeList childNodes = elem.getChildNodes();
+        for (int i = 0; i < childNodes.getLength(); i++) {
+            Node n = childNodes.item(i);
+            RecursiveNormalizeNode(n);
+        }
+        /*
+        NodeList childNodes = elem.getChildNodes();
+        Vector<Node> nodes = new Vector<Node>();
+        for (int i = 0; i < childNodes.getLength(); i++) {
+            Node n = childNodes.item(i);
+            nodes.add(n);
+            elem.removeChild(n);
+        }
+        Collections.sort(nodes, new NodeNormalizeComparator());
+        for (Node child : nodes) {
+            child.normalize();
+            elem.appendChild(child);
+        }
+        */
+        return elem;
+    }
+
+    private Document NormalizeDocument(Document doc) {
+        //Strip known attributes on this node
+        Element e = doc.getDocumentElement();
+        e.removeAttribute("xsi:noNamespaceSchemaLocation");
+        e.removeAttribute("noNamespaceSchemaLocation");
+        e.removeAttribute("xmlns:xsi");
+        e.removeAttribute("xsi");
+        e.removeAttribute("version");
+
+        RecursiveNormalizeNode(doc);
+        //Strip whitespace nodes
+        try {
+            XPathFactory xpathFactory = XPathFactory.newInstance();
+            // XPath to find empty text nodes.
+            XPathExpression xpathExp = xpathFactory.newXPath().compile(
+                    "//text()[normalize-space(.) = '']");  
+            NodeList emptyTextNodes = (NodeList) 
+                    xpathExp.evaluate(doc, XPathConstants.NODESET);
+
+            // Remove each empty text node from document.
+            for (int i = 0; i < emptyTextNodes.getLength(); i++) {
+                Node emptyTextNode = emptyTextNodes.item(i);
+                emptyTextNode.getParentNode().removeChild(emptyTextNode);
+            }
+        } catch (Exception ex) {
+            
+        }
+        doc.normalizeDocument();
+
+        //Sort the top-level child nodes
+        NodeList childNodes = e.getChildNodes();
+        if (DebugSettings.Enabled) {
+            Console.WriteLine(">>> Pre-sort node list");
+            for (int i = 0; i < childNodes.getLength(); i++) {
+                Node n = childNodes.item(i);
+                Console.WriteLine("\t" + n.getNodeName());
+            }
+            Console.WriteLine("<<<");
+        }
+
+        Vector<Node> nodes = new Vector<Node>();
+        for (int i = 0; i < childNodes.getLength(); i++) {
+            Node n = childNodes.item(i);
+            nodes.add(n);
+            e.removeChild(n);
+        }
+        Comparator<Node> nodeComparator = new Comparator<Node>() {
+            public int compare(Node n1, Node n2) {
+                String s1 = n1.getNodeName();
+                String s2 = n2.getNodeName();
+                int result = s1.compareTo(s2);
+                if (DebugSettings.Enabled)
+                    Console.WriteLine("'%s'.compareTo('%s') - %d", s1, s2, result);
+                return result;
+            }
+        };
+        Collections.sort(nodes, nodeComparator); //, new NodeNormalizeComparator());
+        for (Node child : nodes) {
+            child.normalize();
+            e.appendChild(child);
+        }
+
+        if (DebugSettings.Enabled) {
+            childNodes = e.getChildNodes();
+            Console.WriteLine(">>> Post-sort node list");
+            for (int i = 0; i < childNodes.getLength(); i++) {
+                Node n = childNodes.item(i);
+                Console.WriteLine("\t" + n.getNodeName());
+            }
+            Console.WriteLine("<<<");
+        }
+        return doc;
+    }
+
+    private XmlCompareResult TryXmlCompare(String expected, String actual) {
+        /*
+        XmlCompareResult result = null;
+        try {
+            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+            dbf.setNamespaceAware(true);
+            dbf.setCoalescing(true);
+            dbf.setIgnoringElementContentWhitespace(true);
+            dbf.setIgnoringComments(true);
+            DocumentBuilder db = dbf.newDocumentBuilder();
+
+            Document doc1 = db.parse(new ByteArrayInputStream(expected.trim().getBytes()));
+            doc1 = NormalizeDocument(doc1);
+
+            Document doc2 = db.parse(new ByteArrayInputStream(actual.trim().getBytes()));
+            doc2 = NormalizeDocument(doc2);
+
+            result = new XmlCompareResult();
+            result.Result = doc1.isEqualNode(doc2);
+            result.Expected = toString(doc1);
+            result.Actual = toString(doc2);
+        } catch (Exception ex) {
+            result = new XmlCompareResult();
+            result.Result = false;
+        }
+        Console.WriteLine("TryXmlCompare returned " + result.Result);
+        return result;
+        */
+       
+        XmlCompareResult result = null;
+        try {
+            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+            dbf.setNamespaceAware(true);
+            dbf.setCoalescing(true);
+            dbf.setIgnoringElementContentWhitespace(true);
+            dbf.setIgnoringComments(true);
+            DocumentBuilder db = dbf.newDocumentBuilder();
+
+            Document doc1 = db.parse(new ByteArrayInputStream(expected.trim().getBytes()));
+            doc1 = NormalizeDocument(doc1);
+
+            Document doc2 = db.parse(new ByteArrayInputStream(actual.trim().getBytes()));
+            doc2 = NormalizeDocument(doc2);
+
+            result = new XmlCompareResult();
+            result.Expected = SortElement(doc1, "");
+            result.Actual = SortElement(doc2, "");
+            result.Result = (result.Expected.equals(result.Actual));
+        } catch (Exception ex) {
+            //Console.WriteLine("Exception doing XML compare: %s", CommonUtility.ExceptionToString(ex));
+            result = new XmlCompareResult();
+            result.Result = false;
+        }
+        if (DebugSettings.Enabled)
+            Console.WriteLine("\t\tTryXmlCompare returned " + result.Result);
+        return result;
+    }
+
+    public void Cleanup()
+    {
+        for (ITestExecutor exec : _executors.values())
+        {
+            try {
+                exec.close();
+            } catch (IOException ex) {
+
+            }
+        }
+        _executors.clear();
+    }
+
+    public String getApiType()
+    {
       return ApiTypes.Platform;
-  }
+    }
 }
\ No newline at end of file

Modified: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/Program.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/Program.java	2014-10-02 18:33:49 UTC (rev 8377)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/Program.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -2,6 +2,8 @@
 
 import java.io.*;
 import java.util.*;
+import java.util.logging.Logger;
+import java.util.logging.Level;
 import org.osgeo.mapguide.*;
 import org.osgeo.mapguide.test.common.*;
 
@@ -12,6 +14,7 @@
 
     public static void main(String[] args) {
         try {
+            Logger.getLogger("com.almworks.sqlite4java").setLevel(Level.OFF);
             if (args.length >= 1 && args.length <= 2) {
                 String webConfigPath = args[0];
                 String logFile = "UnitTests.log";

Modified: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/CommonUtility.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/CommonUtility.java	2014-10-02 18:33:49 UTC (rev 8377)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/CommonUtility.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -1,10 +1,154 @@
 package org.osgeo.mapguide.test.common;
 
-import java.io.*;
+import java.io.File;
+import java.io.IOException;
+import java.io.ByteArrayInputStream;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Vector;
+import java.util.HashMap;
 import java.nio.file.*;
+import java.nio.charset.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
 
 public class CommonUtility
 {
+    public static String JoinStringArray(String glue, String[] s)
+    {
+        int k = s.length;
+        if ( k == 0 )
+        {
+            return null;
+        }
+        StringBuilder out = new StringBuilder();
+        out.append( s[0] );
+        for ( int x=1; x < k; ++x )
+        {
+            out.append(glue).append(s[x]);
+        }
+        return out.toString();
+    }
+
+    public static String MgPointToString(MgPoint pt)
+    {
+        try
+        {
+            MgCoordinate coord = pt.getCoordinate();
+            return String.format("(%d:%d)",
+                (int)coord.getX(),
+                (int)coord.getY());
+        }
+        catch (MgException ex)
+        {
+            throw new UnitTestException(String.format("Exception from MapGuide:\n%s", ex.getDetails()));
+        }
+    }
+
+    public static String MgEnvelopeToString(MgEnvelope env)
+    {
+        try
+        {
+            MgCoordinate ll = env.getLowerLeftCoordinate();
+            MgCoordinate ur = env.getUpperRightCoordinate();
+            return String.format("(%d:%d)-(%d:%d)", 
+                (int)ll.getX(), 
+                (int)ll.getY(), 
+                (int)ur.getX(), 
+                (int)ur.getY());
+        }
+        catch (MgException ex)
+        {
+            throw new UnitTestException(String.format("Exception from MapGuide:\n%s", ex.getDetails()));
+        }
+    }
+
+    public static String GetExtension(String name)
+    {
+        if (name.lastIndexOf(".") >= 0)
+        {
+            return name.substring(name.lastIndexOf(".") + 1);
+        }
+        else
+        {
+            if (name.equals("MG_USER_CREDENTIALS"))
+                return "txt";
+            else
+                return "bin";
+        }
+    }
+
+    public static String GetMimeType(String extension)
+    {
+        switch (extension)
+        {
+            case "agf":
+                return "application/agf";
+            case "bin":
+                return "application/octet-stream";
+            case "dwf":
+                return "model/vnd.dwf";
+            case "jpg":
+            case "jpeg":
+                return "image/jpeg";
+            case "png":
+                return "image/png";
+            case "tif":
+            case "tiff":
+                return "image/tiff";
+            case "html":
+                return "text/html";
+            case "txt":
+                return "text/plain";
+            case "xml":
+                return "text/xml";
+            default:
+                return "application/octet-stream";
+        }
+    }
+
+    public static MgByteReader GetByteReaderFromPath(String path)
+    {
+        return GetByteReaderFromPath(path, true);
+    }
+
+    public static MgByteReader GetByteReaderFromPath(String path, boolean bCheck)
+    {
+        if (path != null)
+        {
+            if (bCheck)
+            {
+                if (FileExists(path))
+                {
+                    MgByteSource source = new MgByteSource(path);
+                    MgByteReader reader = source.getReader();
+                    return reader;
+                }
+                return null;
+            }
+            else
+            {
+                MgByteSource source = new MgByteSource(path);
+                MgByteReader reader = source.getReader();
+                return reader;
+            }
+        }
+        else
+        {
+            return null;
+        }
+    }
+
+    public static String BooleanToString(boolean b)
+    {
+        return b ? "True" : "False";
+    }
+
     public static String GetTypeName(Object o) {
         Class cls = o.getClass();
         String name = cls.getName();
@@ -23,6 +167,11 @@
         }
     }
 
+    public static boolean FileExists(String path) {
+        File f = new File(path);
+        return (f.exists() && !f.isDirectory());
+    }
+
     public static byte[] ReadAllBytes(String path) {
         try {
             return Files.readAllBytes(Paths.get(path));
@@ -31,6 +180,10 @@
         }
     }
 
+    public static String ReadAllText(String path) throws IOException {
+        return new String(Files.readAllBytes(Paths.get(path)), StandardCharsets.UTF_8);
+    }
+
     public static String GetTempFileName() {
         try {
             Path p = Files.createTempFile(null, null);
@@ -54,4 +207,515 @@
         }
         return sb.toString();
     }
+
+    public static void GenerateDatabase(String dumpFileName, String dbName) throws SQLiteException, IOException {
+        SQLiteConnection db = new SQLiteConnection(new File(dbName));
+        try {
+            db.open(true);
+
+            String sql = new String(Files.readAllBytes(Paths.get(dumpFileName)), StandardCharsets.UTF_8);
+            db.exec(sql);
+        }
+        finally
+        {
+            db.dispose();       
+        }
+    }
+
+    public static String GetStringFromStatement(SQLiteStatement stmt, String colName) {
+        try {
+            for (int i = 0; i < stmt.columnCount(); i++) {
+                String cn = stmt.getColumnName(i);
+                if (cn.equals(colName)) {
+                    if (stmt.columnNull(i)) {
+                        return null;
+                    } else {
+                        return stmt.columnString(i);
+                    }
+                }
+            }
+            return null;
+        } catch (Exception ex) {
+            Console.WriteLine(ex.getMessage());
+            return null;
+        }
+    }
+
+    public static byte[] GetByteArrayFromStatement(SQLiteStatement stmt, String colName) {
+        try {
+            for (int i = 0; i < stmt.columnCount(); i++) {
+                String cn = stmt.getColumnName(i);
+                if (cn.equals(colName)) {
+                    if (stmt.columnNull(i)) {
+                        return null;
+                    } else {
+                        return stmt.columnBlob(i);
+                    }
+                }
+            }
+            return null;
+        } catch (Exception ex) {
+            Console.WriteLine(ex.getMessage());
+            return null;
+        }
+    }
+
+    public static String GetDbPath(String dumpFileName) throws SQLiteException, IOException
+    {
+        String dbPath = dumpFileName.replace(".dump", ".db");
+        String dbName = CommonUtility.GetPath(dbPath);
+
+        if (!FileExists(dumpFileName) && !FileExists(dbName))
+        {
+            throw new UnitTestException(String.format("Error: Dump file %s not found. Unable to create database file", dumpFileName));
+        }
+        else if (!FileExists(dbName))
+        {
+            GenerateDatabase(dumpFileName, dbName);
+        }
+        else
+        {
+            try
+            {
+                DeleteFile(dbName);
+                GenerateDatabase(dumpFileName, dbName);
+            }
+            catch (Exception ex)
+            {
+                throw new UnitTestException(String.format("Unable to delete database file %s. The file is either in use or is read-only. The database has not been updated", dbName));
+            }
+        }
+
+        return dbPath;
+    }
+
+    public static String GetPath(String dbPath)
+    {
+        if (IsNullOrEmpty(dbPath))
+            return new File(".").getPath();
+        else
+            return dbPath;
+        /*
+        if (Path.IsPathRooted(dbPath))
+            return dbPath.Replace("\\", "/");
+        else
+            return Path.Combine(GetAssemblyPath(), dbPath).Replace("\\", "/");
+        */
+    }
+
+    public static Object SpecialDataHandling(String operation, Object resultData, String mimeType)
+    {
+        Object res = resultData;
+        switch (operation)
+        {
+            case "ENUMERATERESOURCES":
+                res = RemoveTimeStamp(resultData.toString());
+                break;
+            case "GETDRAWINGLAYER":
+                res = RemoveDwfSectionName(resultData);
+                break;
+            case "GETDRAWINGSECTION":
+                res = RemoveDwfSectionName(resultData);
+                break;
+            case "GETLOG":
+                res = RemoveLogEntryTimeStamp(resultData.toString());
+                break;
+            case "GETMAP":
+                res = GetMapHeader(resultData.toString());
+                break;
+            case "GETLONGTRANSACTIONS":
+                res = RemoveCreationDate(resultData.toString());
+                break;
+        }
+
+        String strRes = null;
+        if (res instanceof String)
+            strRes = (String)res;
+        if (strRes != null && mimeType.equals("text/xml"))
+        {
+            try {
+                /*
+                DocumentBuilderFactory documentBuildFactory = DocumentBuilderFactory.newInstance();
+                DocumentBuilder documentBuilder = documentBuildFactory.newDocumentBuilder();
+                Document doc = documentBuilder.parse(new ByteArrayInputStream(strRes.getBytes()));
+
+                res = SortElement(doc, "");
+                */
+                res = strRes;
+            }
+            catch (Exception ex) {
+
+            }
+        }
+        return res;
+    }
+
+    public static Object RemoveStackTraceFromResult(Object result)
+    {
+        String strResult = null;
+        if (result instanceof String)
+            strResult = (String)result;
+        //TODO: Clean out stack trace
+        return result;
+    }
+
+    private static String RemoveTimeStamp(String resultData)
+    {
+        String result = resultData;
+        String newResult = result;
+        while (result.indexOf("<CreatedDate>") >= 0)
+        {
+            newResult = result.substring(0, result.indexOf("<CreatedDate>"));
+            newResult += result.substring(result.indexOf("</ModifiedDate>") + "</ModifiedDate>".length());
+            result = newResult;
+        }
+        return newResult;
+    }
+
+    private static Object RemoveDwfSectionName(Object resultData)
+    {
+        boolean bFromByteArray = false;
+        byte[] bResultData = null;
+        if (resultData instanceof byte[])
+            bResultData = (byte[])resultData;
+        String strResultData = null;
+        if (resultData instanceof String)
+            strResultData = (String)resultData;
+        /*
+        if (strResultData == null)
+        {
+            if (bResultData != null)
+            {
+                strResultData = enc.GetString(bResultData);
+                bFromByteArray = true;
+            }
+        }*/
+
+        if (strResultData != null)
+        {
+            //Console.WriteLine("RemoveDwfSectionName: length = {0}", strResultData.Length);
+            int idx = strResultData.indexOf(".w2d");
+            //Console.WriteLine("RemoveDwfSectionName: widx = {0}", idx);
+            if (idx >= 0)
+            {
+                String newResult = strResultData.substring(idx);
+                int eidx = newResult.indexOf("EndOfDWF");
+                //Console.WriteLine("RemoveDwfSectionName: eidx = {0}", eidx);
+                if (0 != eidx)
+                {
+                    newResult = newResult.substring(0, eidx);
+                    //Console.WriteLine("RemoveDwfSectionName: newlength = {0}", newResult.Length);
+                }
+                if (bFromByteArray)
+                    return newResult.getBytes(StandardCharsets.UTF_8);
+                else
+                    return newResult;
+            }
+        }
+        else if (bResultData != null)
+        {
+            byte[] bW2d = ".w2d".getBytes(StandardCharsets.UTF_8);
+            byte[] bEOF = "EndOfDWF".getBytes(StandardCharsets.UTF_8);
+
+            int widx = -1;
+            int eidx = -1;
+
+            int wMatches = 0;
+            int eMatches = 0;
+
+            int i = 0;
+            while(i < bResultData.length)
+            {
+                //Haven't found .w2d sequence
+                if (widx < 0 && wMatches == 0) 
+                {
+                    //We've found a "."
+                    if (bResultData[i] == bW2d[0])
+                    {
+                        wMatches++;
+                        i++;
+
+                        //Now try to follow through this sequence to see if it is ".w2d"
+                        while (wMatches < bW2d.length)
+                        {
+                            //End of array. Abort
+                            if (i >= bResultData.length)
+                                break;
+
+                            //Next byte in sequence matches. Advance
+                            if (bResultData[i] == bW2d[wMatches])
+                            {
+                                //Increment matches
+                                wMatches++;
+                                
+                                //Check if full sequence matches
+                                if (wMatches == bW2d.length)
+                                {
+                                    //Match. Record index which is current position minus the # of consecutive matches
+                                    widx = i - wMatches;
+                                    break;
+                                }
+                            }
+                            else //Incomplete sequence. Break this loop
+                            {
+                                wMatches = 0; //Reset
+                                break;
+                            }
+                        }
+                    }
+                }
+                //Haven't found EndOfDWF sequence
+                else if (eidx < 0 && eMatches == 0)
+                {
+                    //We've found a "E"
+                    if (bResultData[i] == bEOF[0])
+                    {
+                        eMatches++;
+                        i++;
+
+                        //Now try to follow through this sequence to see if it is "EndOfDWF"
+                        while (eMatches < bEOF.length)
+                        {
+                            //End of array. Abort
+                            if (i >= bResultData.length)
+                                break;
+
+                            //Next byte in sequence matches. Advance
+                            if (bResultData[i] == bEOF[eMatches])
+                            {
+                                //Increment matches
+                                eMatches++;
+
+                                //Check if full sequence matches
+                                if (eMatches == bEOF.length)
+                                {
+                                    //Match. Record index which is current position minus the # of consecutive matches
+                                    eidx = i - eMatches;
+                                    break;
+                                }
+                            }
+                            else //Incomplete sequence. Break this loop
+                            {
+                                eMatches = 0; //Reset
+                                break;
+                            }
+                        }
+                    }
+                }
+
+                //Found both offsets. We're done
+                if (widx > 0 && eidx > widx)
+                    break;
+
+                i++;
+            }
+
+            if (widx > 0 && eidx > widx)
+            {
+                byte[] newResult = new byte[eidx - widx];
+                int off = 0;
+                for (int j = widx; j <= eidx; j++)
+                {
+                    newResult[off] = bResultData[j];
+                }
+            }
+        }
+        return resultData;
+    }
+
+    private static String RemoveLogEntryTimeStamp(String resultData)
+    {
+        String result = resultData;
+        String newResult = result;
+        while (result.indexOf("<") >= 0)
+        {
+            newResult = result.substring(0, result.indexOf("<"));
+            newResult += result.substring(result.indexOf(">") + 1);
+            result = newResult;
+        }
+        return newResult;
+    }
+
+    private static String GetMapHeader(String resultData)
+    {
+        if (resultData.indexOf("(DWF V06.01)") >= 0)
+            resultData = "(DWF V06.01)";
+        return resultData;
+    }
+
+    private static String RemoveCreationDate(String resultData)
+    {
+        String newResult = resultData;
+        while (resultData.indexOf("<CreationDate>") >= 0)
+        {
+            newResult = resultData.substring(0, resultData.indexOf("<CreationDate>"));
+            newResult += resultData.substring(resultData.indexOf("</CreationDate>") + "</CreationDate>".length());
+            resultData = newResult;
+        }
+        return newResult;
+    }
+
+    public static Object ProcessExceptionMessage(Object resultData)
+    {
+        String strResultData = null;
+        if (resultData instanceof String)
+            strResultData = (String)resultData;
+        if (strResultData != null)
+        {
+            String text = "exception occurred";
+            if (strResultData.contains(text))
+            {
+                strResultData = strResultData.substring(0, strResultData.indexOf(text) + text.length());
+            }
+            return strResultData;
+        }
+        return resultData;
+    }
+
+    public static boolean SpecialValidation(String operation, Object resultData, Object expectedResult)
+    {
+        if (operation.equals("GETFEATUREPROVIDERS"))
+        {
+            //We expect both to be strings here
+            return GetFeatureProvidersValidation(resultData.toString(), expectedResult.toString());
+        }
+        return false;
+    }
+
+    private static boolean GetFeatureProvidersValidation(String resultData, String expectedResult)
+    {
+        throw new RuntimeException("Not implemented");
+    }
+
+    public static boolean ByteArraysEqual(byte[] bExpected, byte[] bActual, String operation, String testName)
+    {
+        if (bExpected == null && bActual != null)
+            return false;
+
+        if (bExpected != null && bActual == null)
+            return false;
+
+        boolean bRet = true;
+        for (int i = 0; i < bExpected.length; i++)
+        {
+            if (i >= bExpected.length ||
+                i >= bActual.length)
+            {
+                break;
+            }
+
+            byte b1 = bExpected[i];
+            byte b2 = bActual[i];
+
+            if (b1 != b2)
+            {
+                return false;
+            }
+        }
+
+        //System.Diagnostics.Debug.WriteLine(string.Format("[MgTestRunner]: {0} - {1} - COMPARE: {2} with {3} = {4}", testName, operation, bExpected.Length, bActual.Length, (bRet ? 0 : 1)));
+        return bRet;
+    }
+
+    public static String GetExtensionFromMimeType(String mimeType)
+    {
+        String extension = "xml";
+        if (mimeType.contains("ePlot"))
+            return "dwf";
+        if (mimeType.contains("text/plain"))
+            return "txt";
+        if (mimeType.contains("text/html"))
+            return "html";
+
+        switch (mimeType)
+        { 
+            case "application/agf":
+                return "agf";
+            case "application/octet-stream":
+                return "bin";
+            case "model/vnd.dwf":
+                return "dwf";
+            case "image/jpeg":
+                return "jpg";
+            case "image/png":
+                return "png";
+            case "image/tiff":
+                return "tiff";
+            case "application/x-w2d":
+                return "dwf";
+        }
+
+        return extension;
+    }
+
+    public static boolean ReadParameterValue(SQLiteConnection conn, int paramSetId, String paramName, HashMap<String, String> result)
+    {
+        return ReadParameterValue(conn, paramSetId, paramName, result, false);
+    }
+
+    public static boolean ReadParameterValue(SQLiteConnection conn, int paramSetId, String paramName, HashMap<String, String> result, boolean bIsPath)
+    {
+        try {
+            SQLiteStatement stmt = conn.prepare(String.format("Select ParamValue from Params WHERE ParamSet=%d AND ParamName=\"%s\"", paramSetId, paramName));
+            if (stmt.step())
+            {
+                String str = GetStringFromStatement(stmt, "ParamValue");
+                if (bIsPath)
+                {
+                    if (DebugSettings.Enabled)
+                        Console.WriteLine("Read path from current directory");
+                    str = CommonUtility.GetPath(str);
+                }
+                result.put(paramName, str);
+                return true;
+            }
+            return false;
+        } catch(Exception ex) {
+            return false;
+        }
+    }
+
+    public static boolean ReadParameterValue(SQLiteConnection conn, String paramName, HashMap<String, String> result)
+    {
+        try {
+            SQLiteStatement stmt = conn.prepare(String.format("Select ParamValue from Params WHERE ParamName=\"%s\"", paramName));
+            if (stmt.step())
+            {
+                result.put(paramName, GetStringFromStatement(stmt, "ParamValue"));
+                return true;
+            }
+            return false;
+        } catch (Exception ex) {
+            return false;
+        }
+    }
+
+    public static String MgStringCollectionToString(MgStringCollection coll)
+    {
+        try
+        {
+            //Sigh, we're too smart for our own good. Yes, the trailing comma
+            //should be there!
+            StringBuilder sb = new StringBuilder();
+            for (int i = 0; i < coll.getCount(); i++)
+            {
+                sb.append(coll.getItem(i));
+                sb.append(",");
+            }
+            return sb.toString();
+
+            /*
+            List<string> items = new List<string>();
+            for (int i = 0; i < coll.GetCount(); i++)
+            {
+                items.Add(coll.GetItem(i));
+            }
+            return string.Join(",", items.ToArray());
+             */
+        }
+        catch (MgException ex)
+        {
+            throw new UnitTestException(String.format("Exception from MapGuide:\n%s", ex.getDetails()));
+        }
+    }
 }
\ No newline at end of file

Modified: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/ITestExecutorCollection.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/ITestExecutorCollection.java	2014-10-02 18:33:49 UTC (rev 8377)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/ITestExecutorCollection.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -1,5 +1,7 @@
 package org.osgeo.mapguide.test.common;
 
+import com.almworks.sqlite4java.*;
+
 public interface ITestExecutorCollection
 {
     /// <summary>
@@ -45,7 +47,7 @@
     /// <param name="actualResult"></param>
     /// <param name="logger"></param>
     /// <returns></returns>
-    int ValidateRequest(SqliteDb db, String testName, int paramSetId, String operation, TestResult actualResult, ITestLogger logger);
+    int ValidateRequest(SQLiteConnection db, String testName, int paramSetId, String operation, TestResult actualResult, ITestLogger logger);
 
     /// <summary>
     /// Performs necessary cleanup

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/MissingTestExecutorException.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/MissingTestExecutorException.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/MissingTestExecutorException.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,8 @@
+package org.osgeo.mapguide.test.common;
+
+public class MissingTestExecutorException extends RuntimeException
+{
+    public MissingTestExecutorException(String message) {
+        super(message);
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/PlatformApiTestExecutor.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/PlatformApiTestExecutor.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/PlatformApiTestExecutor.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,50 @@
+package org.osgeo.mapguide.test.common;
+
+import java.io.File;
+import java.util.HashMap;
+import com.almworks.sqlite4java.*;
+
+public abstract class PlatformApiTestExecutor extends TestExecutorBase
+{
+    private String _opName;
+    private String _apiType;
+    protected SQLiteConnection _conn;
+
+    protected PlatformApiTestExecutor(String opName, String apiType, String dbPath)
+    {
+        _opName = opName;
+        _apiType = apiType;
+        try {
+            _conn = new SQLiteConnection(new File(dbPath));
+            _conn.open(false);
+        } catch (Exception ex) {
+            throw new RuntimeException(ex);
+        }
+    }
+
+    protected void ReadParameterValue(int paramSetId, String paramName, HashMap<String, String> paramValues) {
+        CommonUtility.ReadParameterValue(_conn, paramSetId, paramName, paramValues);
+    }
+
+    protected void ReadParameterValue(int paramSetId, String paramName, HashMap<String, String> paramValues, boolean isPath) {
+        CommonUtility.ReadParameterValue(_conn, paramSetId, paramName, paramValues, isPath);
+    }
+
+    public void close()
+    {
+        if (_conn != null) {
+            _conn.dispose();
+            _conn = null;
+        }
+    }
+
+    public String getApi()
+    {
+        return _apiType;
+    }
+
+    public String getOperationName()
+    {
+        return _opName;
+    }
+}
\ No newline at end of file

Deleted: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/SqliteDb.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/SqliteDb.java	2014-10-02 18:33:49 UTC (rev 8377)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/SqliteDb.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -1,6 +0,0 @@
-package org.osgeo.mapguide.test.common;
-
-public class SqliteDb
-{
-    
-}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/TestExecutionRun.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/TestExecutionRun.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/TestExecutionRun.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,117 @@
+package org.osgeo.mapguide.test.common;
+
+import java.io.File;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+
+public class TestExecutionRun implements java.io.Closeable
+{
+    private ITestExecutorCollection _executors;
+    private SQLiteConnection _unitTestDb;
+
+    public TestExecutionRun(String dbPath, ITestExecutorCollection exec) throws SQLiteException
+    {
+        _executors = exec;
+        _unitTestDb = new SQLiteConnection(new File(dbPath));
+        _unitTestDb.open(false);
+    }
+
+    public void close()
+    {
+        try
+        {
+            _unitTestDb.dispose();
+        }
+        catch (Exception ex) {
+
+        }
+        _unitTestDb = null;
+    }
+
+    private int[] ParamSetStrToArray(String pSet) {
+        if (CommonUtility.IsNullOrEmpty(pSet))
+            return new int[0];
+
+        String[] parts = pSet.split(",");
+        int[] result = new int[parts.length];
+        int i = 0;
+        for (String s : parts) {
+            result[i] = Integer.parseInt(s.trim());
+            i++;
+        }
+        return result;
+    }
+
+    public int RunTests(String testName, ITestLogger logger, MutableInteger testsRun) throws SQLiteException
+    {
+        TestResult actualResult = null;
+        int exitStatus = 0;
+        try
+        {
+            //Add the test in the log file
+            String msg = "\n\n************************************************************\n" +
+                         String.format("Executing %s\n", testName) +
+                         "************************************************************\n\n";
+
+            logger.Write(msg);
+
+            //Get the list of operations to be executed for this test. This list should comma separated, no spaces.
+            SQLiteStatement stmt = _unitTestDb.prepare(String.format("Select ParamSets from TestCase where TestName=\"%s\"", testName));
+            while (stmt.step()) {
+                String sets = CommonUtility.GetStringFromStatement(stmt, "ParamSets");
+
+                //Extract the paramset ids
+                int[] paramSet = ParamSetStrToArray(sets);
+                for (int paramSetId : paramSet)
+                {
+                    SQLiteStatement pstmt = _unitTestDb.prepare(String.format("Select ParamValue from Params where ParamSet=%d AND ParamName=\"OPERATION\"", paramSetId));
+                    while (pstmt.step()) {
+                        String paramValue = CommonUtility.GetStringFromStatement(pstmt, "ParamValue");
+
+                        //Add the operation to the log file
+                        AddLogFileEntry(logger, paramValue, paramSetId);
+
+                        try {
+                            ITestExecutor exec = _executors.GetTestExecutor(paramValue);
+                            Console.WriteLine("\tExecuting operation: %s", exec.getOperationName());
+                            actualResult = exec.Execute(paramSetId);
+                            testsRun.increment();
+                            exitStatus += _executors.ValidateRequest(_unitTestDb, testName, paramSetId, paramValue, actualResult, logger);
+                        } catch (MissingTestExecutorException ex) {
+                            Console.WriteLine("No test executor for %s in test: %s. Skipping test.", paramValue, testName);
+                        }
+                    }
+                }
+            }
+            return exitStatus;
+        }
+        catch (MgException ex)
+        {
+            throw new UnitTestException(String.format("Exception from MapGuide:\n%s", ex.getDetails()));
+        }
+    }
+
+    private void AddLogFileEntry(ITestLogger logger, String operation, int paramSetId) throws SQLiteException
+    {
+        logger.Write("\nParamSet: %s\n", paramSetId);
+        SQLiteStatement stmt = _unitTestDb.prepare(String.format("Select * from Params where ParamSet=%d", paramSetId));
+
+        while (stmt.step())
+        {
+            String paramName = CommonUtility.GetStringFromStatement(stmt, "ParamName");
+            String paramValue = CommonUtility.GetStringFromStatement(stmt, "ParamValue");
+
+            logger.Write("%s: %s\n", paramName, paramValue);
+        }
+    }
+
+    public void Cleanup()
+    {
+        if (_executors != null)
+        {
+            _executors.Cleanup();
+            _executors = null;
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/TestExecutorBase.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/TestExecutorBase.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/TestExecutorBase.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,12 @@
+package org.osgeo.mapguide.test.common;
+
+public abstract class TestExecutorBase implements ITestExecutor
+{
+    public abstract String getApi();
+
+    public abstract String getOperationName();
+
+    public abstract TestResult Execute(int paramSetId);
+
+    public abstract void close();
+}
\ No newline at end of file

Modified: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/TestExecutorCollectionBase.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/TestExecutorCollectionBase.java	2014-10-02 18:33:49 UTC (rev 8377)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/TestExecutorCollectionBase.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -1,5 +1,9 @@
 package org.osgeo.mapguide.test.common;
 
+import java.io.File;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.test.*;
+
 public abstract class TestExecutorCollectionBase implements ITestExecutorCollection
 {
     public String TestExecutionMode;
@@ -21,54 +25,57 @@
     public int Execute(MutableInteger testsRun, ITestLogger logger, boolean isEnterprise)
     {
         int exitStatus = 0;
-        /*
-        String dbPath = CommonUtility.GetDbPath(this.DumpFile);
-        String dbName = CommonUtility.GetPath(dbPath);
+        
+        try {
 
-        if (File.Exists(dbName))
-        {
-            var db = new SqliteDb();
-            db.Open(dbName);
+            String dbPath = CommonUtility.GetDbPath(this.DumpFile);
+            String dbName = CommonUtility.GetPath(dbPath);
 
-            var vm = new SqliteVm(db, true);
+            if (CommonUtility.FileExists(dbName))
+            {
+                SQLiteConnection db = new SQLiteConnection(new File(dbName));
+                try {
+                    db.open(false);
 
-            int status = vm.Execute("Select TestName, TestType from TestCase where TestType=\"{0}\" order by ExecuteSequence", this.ApiType);
+                    SQLiteStatement stmt = db.prepare(String.format("Select TestName, TestType from TestCase where TestType=\"%s\" order by ExecuteSequence", this.getApiType()));
 
-            //NOTE: We can't share the SqliteVm instance among our executor objects as this messes up query results
-            //we must be able to re-create a new SqliteVm for each executor, so we pass down the db path
-            SetupExecutors(dbName);
+                    //NOTE: We can't share the SqliteVm instance among our executor objects as this messes up query results
+                    //we must be able to re-create a new SqliteVm for each executor, so we pass down the db path
+                    SetupExecutors(dbName);
 
-            while (status == Sqlite.Row)
-            {
-                String testName = vm.GetString("TestName");
-                String testType = vm.GetString("TestType");
-
-                Console.WriteLine("Executing {0} test: {1}", testType, testName);
-                using (var run = new TestExecutionRun(dbPath, this))
-                {
-                    try
-                    {
-                        exitStatus += run.RunTests(testName, logger, ref testsRun);
+                    while (stmt.step()) {
+                        String testName = CommonUtility.GetStringFromStatement(stmt, "TestName");
+                        String testType = CommonUtility.GetStringFromStatement(stmt, "TestType");
+                        Console.WriteLine("Executing %s test: %s", testType, testName);
+                        try (TestExecutionRun run = new TestExecutionRun(dbPath, this))
+                        {
+                            try
+                            {
+                                exitStatus += run.RunTests(testName, logger, testsRun);
+                            }
+                            catch (Exception ex)
+                            {
+                                Console.WriteLine(CommonUtility.ExceptionToString(ex));
+                                exitStatus += 1;
+                            }
+                        }
                     }
-                    catch (Exception ex)
-                    {
-                        Console.WriteLine(CommonUtility.ExceptionToString(ex));
-                        exitStatus += 1;
-                    }
+                } finally {
+                    db.dispose();
                 }
-                status = vm.NextRow();
             }
-            vm.SqlFinalize();
-            vm = null;
-            db = null;
-        }
-        */
+
+        } catch (Exception ex) {
+            logger.WriteLine("Exception occurred during test. %s", CommonUtility.ExceptionToString(ex));
+            exitStatus += 1;
+        } 
+
         return exitStatus;
     }
 
     public abstract ITestExecutor GetTestExecutor(String opName);
 
-    public abstract int ValidateRequest(SqliteDb db, String testName, int paramSetId, String operation, TestResult actualResult, ITestLogger logger);
+    public abstract int ValidateRequest(SQLiteConnection db, String testName, int paramSetId, String operation, TestResult actualResult, ITestLogger logger);
     
     public abstract void Cleanup();
 }
\ No newline at end of file

Modified: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/TestLoggerFile.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/TestLoggerFile.java	2014-10-02 18:33:49 UTC (rev 8377)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/TestLoggerFile.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -18,7 +18,10 @@
     public void Write(String format, Object ... args)
     {
         try {
-            sw.write(String.format(format, args));
+            if (args.length > 0)
+                sw.write(String.format(format, args));
+            else
+                sw.write(format);
         } catch (IOException ex) {
 
         }
@@ -27,7 +30,10 @@
     public void WriteLine(String format, Object ... args)
     {
         try {
-            sw.write(String.format(format, args) + "\n");
+            if (args.length > 0)
+                sw.write(String.format(format, args) + "\n");
+            else
+                sw.write(format + "\n");
         } catch (IOException ex) {
 
         }

Modified: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/TestResult.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/TestResult.java	2014-10-02 18:33:49 UTC (rev 8377)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/TestResult.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -13,34 +13,82 @@
 
     public String HttpStatusCode;
 
-    public TestResult()
+    public boolean HasReturnValue;
+
+    public boolean IsException;
+
+    private TestResult()
     {
         this.ResultData = "";
         this.ContentType = "";
         this.HttpStatusCode = "";
+        this.HasReturnValue = false;
+        this.IsException = false;
     }
 
-    public TestResult(String resultData)
+    private TestResult(String resultData)
     {
         this.ResultData = resultData;
         this.ContentType = "";
         this.HttpStatusCode = "";
+        this.HasReturnValue = true;
+        this.IsException = false;
     }
 
-    public TestResult(String resultData, String contentType)
+    private TestResult(String resultData, String contentType)
     {
         this.ResultData = resultData;
         this.ContentType = contentType;
         this.HttpStatusCode = "";
+        this.HasReturnValue = true;
+        this.IsException = false;
     }
 
-    public TestResult(String resultData, String contentType, String statusCode)
+    private TestResult(String resultData, String contentType, String statusCode)
     {
         this.ResultData = resultData;
         this.ContentType = contentType;
         this.HttpStatusCode = statusCode;
+        this.HasReturnValue = true;
+        this.IsException = false;
     }
 
+    public static TestResult Integer(int value) {
+        return new TestResult(value + "", "text/plain");
+    }
+
+    public static TestResult StringCollection(MgStringCollection value) {
+        return new TestResult(CommonUtility.MgStringCollectionToString(value), "text/plain");
+    }
+
+    public static TestResult XmlString(String value) {
+        return new TestResult(value, "text/xml");
+    }
+
+    public static TestResult Point(MgPoint value) {
+        return new TestResult(CommonUtility.MgPointToString(value), "text/plain");
+    }
+
+    public static TestResult Envelope(MgEnvelope value) {
+        return new TestResult(CommonUtility.MgEnvelopeToString(value), "text/plain");
+    }
+
+    public static TestResult Double(double value) {
+        return new TestResult((value + ""), "text/plain");
+    }
+
+    public static TestResult Boolean(boolean value) {
+        return new TestResult(CommonUtility.BooleanToString(value), "text/plain");
+    }
+
+    public static TestResult String(String value) {
+        return new TestResult(value, "text/plain");
+    }
+
+    public static TestResult Ok() {
+        return new TestResult();
+    }
+
     public static TestResult FromByteReader(MgByteReader byteReader)
     {
         return FromByteReader(byteReader, "");
@@ -92,11 +140,15 @@
     public static TestResult FromMgException(MgException ex)
     {
         //Need to be lowercase to satisfy a PHP-ism. Ugh!
-        return new TestResult(CommonUtility.GetTypeName(ex).toLowerCase(), "text/plain");
+        TestResult result = new TestResult(CommonUtility.GetTypeName(ex).toLowerCase(), "text/plain");
+        result.IsException = true;
+        return result;
     }
 
     public static TestResult FromException(Exception ex)
     {
-        return new TestResult(ex.getMessage(), "text/plain");
+        TestResult result = new TestResult(ex.getMessage(), "text/plain");
+        result.IsException = true;
+        return result;
     }
 }
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/UnitTestException.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/UnitTestException.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/UnitTestException.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,8 @@
+package org.osgeo.mapguide.test.common;
+
+public class UnitTestException extends RuntimeException
+{
+    public UnitTestException(String message) {
+        super(message);
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/XmlCompareResult.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/XmlCompareResult.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/common/XmlCompareResult.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,10 @@
+package org.osgeo.mapguide.test.common;
+
+public class XmlCompareResult
+{
+    public boolean Result;
+    public String Expected;
+    public String Actual;
+
+    public boolean HasXml() { return this.Expected != null && this.Actual != null; }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/operations/IApplySession.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/operations/IApplySession.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/operations/IApplySession.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,8 @@
+package org.osgeo.mapguide.test.operations;
+
+import org.osgeo.mapguide.*;
+
+public interface IApplySession
+{
+    void SetSessionId(String sessionId);
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/operations/IMapCreator.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/operations/IMapCreator.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/operations/IMapCreator.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,9 @@
+package org.osgeo.mapguide.test.operations;
+
+import org.osgeo.mapguide.*;
+
+public interface IMapCreator
+{
+    MgMapBase CreateMap(MgResourceIdentifier resId);
+    MgLayerBase CreateLayer(MgResourceIdentifier resId);
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/operations/IMapGuideSession.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/operations/IMapGuideSession.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/operations/IMapGuideSession.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,9 @@
+package org.osgeo.mapguide.test.operations;
+
+import org.osgeo.mapguide.*;
+
+public interface IMapGuideSession
+{
+    String getSessionID();
+    void setSessionID(String value);
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/operations/ISessionCreator.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/operations/ISessionCreator.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/operations/ISessionCreator.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,8 @@
+package org.osgeo.mapguide.test.operations;
+
+import org.osgeo.mapguide.*;
+
+public interface ISessionCreator
+{
+    String CreateSession();
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/DescribeFeatureSchema.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/DescribeFeatureSchema.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/DescribeFeatureSchema.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,44 @@
+package org.osgeo.mapguide.test.platform.operations.feature;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class DescribeFeatureSchema extends FeatureServiceOperationExecutor
+{
+    public DescribeFeatureSchema(MgFeatureService featSvc, String unitTestVm)
+    {
+        super("DescribeFeatureSchema", featSvc, unitTestVm);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            HashMap<String, String> param = new HashMap<String, String>();
+            ReadParameterValue(paramSetId, "RESOURCEID", param);
+            ReadParameterValue(paramSetId, "SCHEMA", param);
+
+            MgResourceIdentifier resId = null;
+            if (param.containsKey("RESOURCEID"))
+            {
+                resId = new MgResourceIdentifier(param.get("RESOURCEID"));
+            }
+
+            String result = _featureService.describeSchemaAsXml(resId, param.get("SCHEMA"));
+
+            return TestResult.XmlString(result);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/ExecuteSqlQuery.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/ExecuteSqlQuery.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/ExecuteSqlQuery.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,45 @@
+package org.osgeo.mapguide.test.platform.operations.feature;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class ExecuteSqlQuery extends FeatureServiceOperationExecutor
+{
+    public ExecuteSqlQuery(MgFeatureService featSvc, String unitTestVm)
+    {
+        super("ExecuteSqlQuery", featSvc, unitTestVm);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            HashMap<String, String> param = new HashMap<String, String>();
+            ReadParameterValue(paramSetId, "RESOURCEID", param);
+            ReadParameterValue(paramSetId, "SQL", param);
+
+            MgResourceIdentifier resId = null;
+            if (param.containsKey("RESOURCEID"))
+            {
+                resId = new MgResourceIdentifier(param.get("RESOURCEID"));
+            }
+
+            MgSqlDataReader reader = _featureService.executeSqlQuery(resId, param.get("SQL"));
+            MgByteReader byteReader = reader.toXml();
+            reader.close();
+            return TestResult.FromByteReader(byteReader);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/FeatureServiceOperationExecutor.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/FeatureServiceOperationExecutor.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/FeatureServiceOperationExecutor.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,18 @@
+package org.osgeo.mapguide.test.platform.operations.feature;
+
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+
+import com.almworks.sqlite4java.*;
+
+public abstract class FeatureServiceOperationExecutor extends PlatformApiTestExecutor
+{
+    protected MgFeatureService _featureService;
+
+    protected FeatureServiceOperationExecutor(String opName, MgFeatureService featSvc, String dbPath)
+    {
+        super(opName, ApiTypes.Platform, dbPath);
+        _featureService = featSvc;
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/GetClasses.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/GetClasses.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/GetClasses.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,43 @@
+package org.osgeo.mapguide.test.platform.operations.feature;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class GetClasses extends FeatureServiceOperationExecutor
+{
+    public GetClasses(MgFeatureService featSvc, String unitTestVm)
+    {
+        super("GetClasses", featSvc, unitTestVm);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            HashMap<String, String> param = new HashMap<String, String>();
+            ReadParameterValue(paramSetId, "RESOURCEID", param);
+            ReadParameterValue(paramSetId, "SCHEMANAME", param);
+
+            MgResourceIdentifier resId = null;
+            if (param.containsKey("RESOURCEID"))
+            {
+                resId = new MgResourceIdentifier(param.get("RESOURCEID"));
+            }
+
+            MgStringCollection result = _featureService.getClasses(resId, param.get("SCHEMANAME"));
+            return TestResult.StringCollection(result);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/GetConnectionPropertyValues.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/GetConnectionPropertyValues.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/GetConnectionPropertyValues.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,38 @@
+package org.osgeo.mapguide.test.platform.operations.feature;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class GetConnectionPropertyValues extends FeatureServiceOperationExecutor
+{
+    public GetConnectionPropertyValues(MgFeatureService featSvc, String unitTestVm)
+    {
+        super("GetConnectionPropertyValues", featSvc, unitTestVm);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            HashMap<String, String> param = new HashMap<String, String>();
+            ReadParameterValue(paramSetId, "PROVIDER", param);
+            ReadParameterValue(paramSetId, "PROPERTY", param);
+            ReadParameterValue(paramSetId, "CONNECTIONSTRING", param);
+
+            MgStringCollection result = _featureService.getConnectionPropertyValues(param.get("PROVIDER"), param.get("PROPERTY"), param.get("CONNECTIONSTRING"));
+            return TestResult.StringCollection(result);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/GetFeatureProviders.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/GetFeatureProviders.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/GetFeatureProviders.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,33 @@
+package org.osgeo.mapguide.test.platform.operations.feature;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class GetFeatureProviders extends FeatureServiceOperationExecutor
+{
+    public GetFeatureProviders(MgFeatureService featSvc, String dbPath)
+    {
+        super("GetFeatureProviders", featSvc, dbPath);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            MgByteReader reader = _featureService.getFeatureProviders();
+            return TestResult.FromByteReader(null);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/GetLongTransactions.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/GetLongTransactions.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/GetLongTransactions.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,45 @@
+package org.osgeo.mapguide.test.platform.operations.feature;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class GetLongTransactions extends FeatureServiceOperationExecutor
+{
+    public GetLongTransactions(MgFeatureService featSvc, String unitTestVm)
+    {
+        super("GetLongTransactions", featSvc, unitTestVm);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            HashMap<String, String> param = new HashMap<String, String>();
+            ReadParameterValue(paramSetId, "RESOURCEID", param);
+            ReadParameterValue(paramSetId, "ACTIVEONLY", param);
+
+            MgResourceIdentifier resId = null;
+            if (param.containsKey("RESOURCEID"))
+            {
+                resId = new MgResourceIdentifier(param.get("RESOURCEID"));
+            }
+
+            MgLongTransactionReader reader = _featureService.getLongTransactions(resId, (param.get("ACTIVEONLY").equals("1")));
+            MgByteReader byteReader = reader.toXml();
+            reader.close();
+            return TestResult.FromByteReader(byteReader);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/GetProviderCapabilities.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/GetProviderCapabilities.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/GetProviderCapabilities.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,39 @@
+package org.osgeo.mapguide.test.platform.operations.feature;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class GetProviderCapabilities extends FeatureServiceOperationExecutor
+{
+    public GetProviderCapabilities(MgFeatureService featSvc, String dbPath)
+    {
+        super("GetProviderCapabilities", featSvc, dbPath);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            HashMap<String, String> param = new HashMap<String, String>();
+            ReadParameterValue(paramSetId, "PROVIDER", param);
+
+            String p1 = "";
+            if (param.containsKey("PROVIDER"))
+                p1 = param.get("PROVIDER");
+            MgByteReader reader = _featureService.getCapabilities(p1);
+            return TestResult.FromByteReader(reader);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/GetSchemas.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/GetSchemas.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/GetSchemas.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,42 @@
+package org.osgeo.mapguide.test.platform.operations.feature;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class GetSchemas extends FeatureServiceOperationExecutor
+{
+    public GetSchemas(MgFeatureService featSvc, String unitTestVm)
+    {
+        super("GetSchemas", featSvc, unitTestVm);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            HashMap<String, String> param = new HashMap<String, String>();
+            ReadParameterValue(paramSetId, "RESOURCEID", param);
+            
+            MgResourceIdentifier resId = null;
+            if (param.containsKey("RESOURCEID"))
+            {
+                resId = new MgResourceIdentifier(param.get("RESOURCEID"));
+            }
+
+            MgStringCollection result = _featureService.getSchemas(resId);
+            return TestResult.StringCollection(result);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/GetSpatialContexts.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/GetSpatialContexts.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/GetSpatialContexts.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,45 @@
+package org.osgeo.mapguide.test.platform.operations.feature;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class GetSpatialContexts extends FeatureServiceOperationExecutor
+{
+    public GetSpatialContexts(MgFeatureService featSvc, String unitTestVm)
+    {
+        super("GetSpatialContexts", featSvc, unitTestVm);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            HashMap<String, String> param = new HashMap<String, String>();
+            ReadParameterValue(paramSetId, "RESOURCEID", param);
+            ReadParameterValue(paramSetId, "ACTIVEONLY", param);
+
+            MgResourceIdentifier resId = null;
+            if (param.containsKey("RESOURCEID"))
+            {
+                resId = new MgResourceIdentifier(param.get("RESOURCEID"));
+            }
+
+            MgSpatialContextReader reader = _featureService.getSpatialContexts(resId, (param.get("ACTIVEONLY").equals("1")));
+            MgByteReader byteReader = reader.toXml();
+            reader.close();
+            return TestResult.FromByteReader(byteReader);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/SelectAggregates.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/SelectAggregates.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/SelectAggregates.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,66 @@
+package org.osgeo.mapguide.test.platform.operations.feature;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class SelectAggregates extends FeatureServiceOperationExecutor
+{
+    public SelectAggregates(MgFeatureService featSvc, String unitTestVm)
+    {
+        super("SelectAggregates", featSvc, unitTestVm);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            HashMap<String, String> param = new HashMap<String, String>();
+            ReadParameterValue(paramSetId, "RESOURCEID", param);
+            ReadParameterValue(paramSetId, "CLASSNAME", param);
+            //ReadParameterValue(paramSetId, "PROPERTIES", param);
+            //ReadParameterValue(paramSetId, "FILTER", param);
+
+            MgResourceIdentifier resId = null;
+            if (param.containsKey("RESOURCEID"))
+            {
+                resId = new MgResourceIdentifier(param.get("RESOURCEID"));
+            }
+
+            MgFeatureAggregateOptions query = new MgFeatureAggregateOptions();
+            //TODO: Set query options
+            /*
+            if (param["FILTER"] != null)
+            {
+                query.SetFilter(param["FILTER"]);
+            }
+            */
+            //PROPERTIES should be stored in the database as comma separated string without spaces
+            /*
+            if (param["PROPERTIES"] != null)
+            {
+                string[] props = param["PROPERTIES"].Split(',');
+                foreach (var p in props)
+                {
+                    query.AddFeatureProperty(p);
+                }
+            }*/
+
+            MgDataReader reader = _featureService.selectAggregate(resId, param.get("CLASSNAME"), query);
+            MgByteReader byteReader = reader.toXml();
+            reader.close();
+            return TestResult.FromByteReader(byteReader);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/SelectFeatures.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/SelectFeatures.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/SelectFeatures.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,64 @@
+package org.osgeo.mapguide.test.platform.operations.feature;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class SelectFeatures extends FeatureServiceOperationExecutor
+{
+    public SelectFeatures(MgFeatureService featSvc, String unitTestVm)
+    {
+        super("SelectFeatures", featSvc, unitTestVm);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            HashMap<String, String> param = new HashMap<String, String>();
+            ReadParameterValue(paramSetId, "RESOURCEID", param);
+            ReadParameterValue(paramSetId, "CLASSNAME", param);
+            ReadParameterValue(paramSetId, "PROPERTIES", param);
+            ReadParameterValue(paramSetId, "FILTER", param);
+
+            MgResourceIdentifier resId = null;
+            if (param.containsKey("RESOURCEID"))
+            {
+                resId = new MgResourceIdentifier(param.get("RESOURCEID"));
+            }
+
+            MgFeatureQueryOptions query = new MgFeatureQueryOptions();
+            //TODO: Set query options
+            if (param.containsKey("FILTER"))
+            {
+                query.setFilter(param.get("FILTER"));
+            }
+
+            //PROPERTIES should be stored in the database as comma separated string without spaces
+            if (param.containsKey("PROPERTIES"))
+            {
+                String [] props = param.get("PROPERTIES").split(",");
+                for (String p : props)
+                {
+                    query.addFeatureProperty(p);
+                }
+            }
+
+            MgFeatureReader reader = _featureService.selectFeatures(resId, param.get("CLASSNAME"), query);
+            MgByteReader byteReader = reader.toXml();
+            reader.close();
+            return TestResult.FromByteReader(byteReader);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/SetLongTransaction.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/SetLongTransaction.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/SetLongTransaction.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,57 @@
+package org.osgeo.mapguide.test.platform.operations.feature;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.operations.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class SetLongTransaction extends FeatureServiceOperationExecutor
+{
+    private ISessionCreator _creator;
+    private IApplySession _apply;
+
+    public SetLongTransaction(MgFeatureService featSvc, String unitTestVm, ISessionCreator creator, IApplySession apply)
+    {
+        super("SetLongTransaction", featSvc, unitTestVm);
+        _creator = creator;
+        _apply = apply;
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            HashMap<String, String> param = new HashMap<String, String>();
+            ReadParameterValue(paramSetId, "RESOURCEID", param);
+            ReadParameterValue(paramSetId, "LONGTRANSACTIONNAME", param);
+            ReadParameterValue(paramSetId, "CREATESESSION", param);
+
+            MgResourceIdentifier resId = null;
+            if (param.containsKey("RESOURCEID"))
+            {
+                resId = new MgResourceIdentifier(param.get("RESOURCEID"));
+            }
+
+            if (param.get("CREATESESSION").equals("TRUE"))
+            {
+                String sessionId = _creator.CreateSession();
+                _apply.SetSessionId(sessionId);
+            }
+
+            boolean bRes = _featureService.setLongTransaction(resId, param.get("LONGTRANSACTIONNAME"));
+
+            return TestResult.Boolean(bRes);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/TestConnection.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/TestConnection.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/feature/TestConnection.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,56 @@
+package org.osgeo.mapguide.test.platform.operations.feature;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.operations.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class TestConnection extends FeatureServiceOperationExecutor
+{
+    public TestConnection(MgFeatureService featSvc, String unitTestVm)
+    {
+        super("TestConnection", featSvc, unitTestVm);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            HashMap<String, String> param = new HashMap<String, String>();
+            ReadParameterValue(paramSetId, "RESOURCEID", param);
+
+            boolean bRes = false;
+            MgResourceIdentifier resId = null;
+            if (!CommonUtility.IsNullOrEmpty(param.get("RESOURCEID")))
+            {
+                resId = new MgResourceIdentifier(param.get("RESOURCEID"));
+                bRes = _featureService.testConnection(resId);
+            }
+            else
+            {
+                ReadParameterValue(paramSetId, "PROVIDER", param);
+                ReadParameterValue(paramSetId, "CONNECTIONSTRING", param);
+                String providerName = "";
+                if (param.containsKey("PROVIDER"))
+                    providerName = param.get("PROVIDER");
+                String connString = "";
+                if (param.containsKey("CONNECTIONSTRING"))
+                    connString = param.get("CONNECTIONSTRING");
+                bRes = _featureService.testConnection(providerName, connString);
+            }
+
+            return TestResult.Boolean(bRes);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/AddLayer.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/AddLayer.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/AddLayer.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,61 @@
+package org.osgeo.mapguide.test.platform.operations.maplayer;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.operations.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class AddLayer extends MapLayerOperationExecutor
+{
+    public AddLayer(MgResourceService resSvc, String vm, IMapCreator creator)
+    {
+        super("AddLayer", resSvc, vm, creator);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            this.CreateMapFromResource(paramSetId);
+
+            SQLiteStatement layerStmt = _conn.prepare(String.format("Select ParamValue from Params WHERE ParamSet=%d AND ParamName=\"LAYERDEFINITION\"", paramSetId));
+            String layerDefinition = "";
+            if (layerStmt.step()) {
+                layerDefinition = CommonUtility.GetStringFromStatement(layerStmt, "ParamValue");   
+            }
+
+            SQLiteStatement groupStmt = _conn.prepare(String.format("Select ParamValue from Params WHERE ParamSet=%d AND ParamName=\"GROUPNAME\"", paramSetId));
+            String groupName = "";
+            if (groupStmt.step()) {
+                groupName = CommonUtility.GetStringFromStatement(groupStmt, "ParamValue");
+            }
+
+            MgResourceIdentifier ldfId = new MgResourceIdentifier(layerDefinition);
+            MgLayerBase layer = _creator.CreateLayer(ldfId);
+
+            if (!CommonUtility.IsNullOrEmpty(groupName))
+            {
+                MgLayerGroupCollection groups = _map.getLayerGroups();
+                int gidx = groups.indexOf(groupName);
+                if (gidx >= 0)
+                    layer.setGroup(groups.getItem(gidx));
+            }
+
+            MgLayerCollection layers = _map.getLayers();
+            layers.add(layer);
+
+            return TestResult.Integer(layers.getCount());
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/AddLayerGroup.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/AddLayerGroup.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/AddLayerGroup.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,56 @@
+package org.osgeo.mapguide.test.platform.operations.maplayer;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.operations.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class AddLayerGroup extends MapLayerOperationExecutor
+{
+    public AddLayerGroup(MgResourceService resSvc, String vm, IMapCreator creator)
+    {
+        super("AddLayerGroup", resSvc, vm, creator);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            this.CreateMapFromResource(paramSetId);
+
+            SQLiteStatement grpStmt = _conn.prepare(String.format("Select ParamValue from Params WHERE ParamSet=%d AND ParamName=\"GROUPNAME\"", paramSetId));
+            String groupName = "";
+            if (grpStmt.step()) {
+                groupName = CommonUtility.GetStringFromStatement(grpStmt, "ParamValue");
+            }
+
+            SQLiteStatement parentStmt = _conn.prepare(String.format("Select ParamValue from Params WHERE ParamSet=%d AND ParamName=\"PARENTGROUPNAME\"", paramSetId));
+            String parentGroupName = "";
+            if (parentStmt.step()) {
+                parentGroupName = CommonUtility.GetStringFromStatement(parentStmt, "ParamValue");
+            }
+
+            MgLayerGroupCollection groups = _map.getLayerGroups();
+            MgLayerGroup group = new MgLayerGroup(groupName);
+            if (!CommonUtility.IsNullOrEmpty(parentGroupName))
+            {
+                MgLayerGroup parentGroup = groups.getItem(parentGroupName);
+                group.setGroup(parentGroup);
+            }
+            groups.add(group);
+
+            return TestResult.Integer(groups.getCount());
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetCoordinateSystem.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetCoordinateSystem.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetCoordinateSystem.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,30 @@
+package org.osgeo.mapguide.test.platform.operations.maplayer;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.operations.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class GetCoordinateSystem extends MapLayerOperationExecutor
+{
+    public GetCoordinateSystem(MgResourceService resSvc, String vm, IMapCreator creator)
+    {
+        super("GetCoordinateSystem", resSvc, vm, creator);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            this.CreateMapFromResource(paramSetId);
+            return TestResult.String(_map.getMapSRS());
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetDataExtent.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetDataExtent.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetDataExtent.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,31 @@
+package org.osgeo.mapguide.test.platform.operations.maplayer;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.operations.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class GetDataExtent extends MapLayerOperationExecutor
+{
+    public GetDataExtent(MgResourceService resSvc, String vm, IMapCreator creator)
+    {
+        super("GetDataExtent", resSvc, vm, creator);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            this.CreateMapFromResource(paramSetId);
+            MgEnvelope extent = _map.getDataExtent();
+            return TestResult.Envelope(extent);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetDisplayInLegend.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetDisplayInLegend.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetDisplayInLegend.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,44 @@
+package org.osgeo.mapguide.test.platform.operations.maplayer;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.operations.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class GetDisplayInLegend extends MapLayerOperationExecutor
+{
+    public GetDisplayInLegend(MgResourceService resSvc, String vm, IMapCreator creator)
+    {
+        super("GetDisplayInLegend", resSvc, vm, creator);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            this.CreateMapFromResource(paramSetId);
+
+            SQLiteStatement stmt = _conn.prepare(String.format("Select ParamValue from Params WHERE ParamSet=%d AND ParamName=\"LAYERNAME\"", paramSetId));
+            if (stmt.step()) {
+                String layerName = CommonUtility.GetStringFromStatement(stmt, "ParamValue");
+
+                MgLayerBase layer = this.FindLayer(layerName);
+                if (layer == null)
+                    return TestResult.String("***Unknown Layer***");
+                return TestResult.Boolean(layer.getDisplayInLegend());
+            }
+            throw new RuntimeException("No layer param found for param set: " + paramSetId);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetGroups.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetGroups.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetGroups.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,38 @@
+package org.osgeo.mapguide.test.platform.operations.maplayer;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.operations.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class GetGroups extends MapLayerOperationExecutor
+{
+    public GetGroups(MgResourceService resSvc, String vm, IMapCreator creator)
+    {
+        super("GetGroups", resSvc, vm, creator);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            this.CreateMapFromResource(paramSetId);
+            MgLayerGroupCollection groups = _map.getLayerGroups();
+            String[] names = new String[groups.getCount()];
+            for (int i = 0; i < groups.getCount(); i++)
+            {
+                MgLayerGroup group = groups.getItem(i);
+                names[i] = group.getName();
+            }
+
+            return TestResult.String(CommonUtility.JoinStringArray("/", names));
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetLayerDefinition.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetLayerDefinition.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetLayerDefinition.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,45 @@
+package org.osgeo.mapguide.test.platform.operations.maplayer;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.operations.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class GetLayerDefinition extends MapLayerOperationExecutor
+{
+    public GetLayerDefinition(MgResourceService resSvc, String vm, IMapCreator creator)
+    {
+        super("GetLayerDefinition", resSvc, vm, creator);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            this.CreateMapFromResource(paramSetId);
+
+            SQLiteStatement stmt = _conn.prepare(String.format("Select ParamValue from Params WHERE ParamSet=%d AND ParamName=\"LAYERNAME\"", paramSetId));
+            if (stmt.step()) {
+                String layerName = CommonUtility.GetStringFromStatement(stmt, "ParamValue");
+
+                MgLayerBase layer = this.FindLayer(layerName);
+                if (layer == null)
+                    return TestResult.String("***Unknown Layer***");
+                MgResourceIdentifier ldfId = layer.getLayerDefinition();
+                return TestResult.String(ldfId.toString());
+            }
+            throw new RuntimeException("No layer param found for param set: " + paramSetId);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetLayerFeatureClass.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetLayerFeatureClass.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetLayerFeatureClass.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,42 @@
+package org.osgeo.mapguide.test.platform.operations.maplayer;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.operations.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class GetLayerFeatureClass extends MapLayerOperationExecutor
+{
+    public GetLayerFeatureClass(MgResourceService resSvc, String vm, IMapCreator creator)
+    {
+        super("GetLayerFeatureClass", resSvc, vm, creator);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            this.CreateMapFromResource(paramSetId);
+
+            SQLiteStatement stmt = _conn.prepare(String.format("Select ParamValue from Params WHERE ParamSet=%d AND ParamName=\"LAYERNAME\"", paramSetId));
+            if (stmt.step()) {
+                String layerName = CommonUtility.GetStringFromStatement(stmt, "ParamValue");
+
+                MgLayerBase layer = this.FindLayer(layerName);
+                return TestResult.String(layer.getFeatureClassName());
+            }
+            throw new RuntimeException("No layer param found for param set: " + paramSetId);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetLayerFeatureSource.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetLayerFeatureSource.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetLayerFeatureSource.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,44 @@
+package org.osgeo.mapguide.test.platform.operations.maplayer;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.operations.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class GetLayerFeatureSource extends MapLayerOperationExecutor
+{
+    public GetLayerFeatureSource(MgResourceService resSvc, String vm, IMapCreator creator)
+    {
+        super("GetLayerFeatureSource", resSvc, vm, creator);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            this.CreateMapFromResource(paramSetId);
+
+            SQLiteStatement stmt = _conn.prepare(String.format("Select ParamValue from Params WHERE ParamSet=%d AND ParamName=\"LAYERNAME\"", paramSetId));
+            if (stmt.step()) {
+                String layerName = CommonUtility.GetStringFromStatement(stmt, "ParamValue");
+
+                MgLayerBase layer = this.FindLayer(layerName);
+                if (layer == null)
+                    return TestResult.String("***Unknown Layer***");
+                return TestResult.String(layer.getFeatureSourceId());
+            }
+            throw new RuntimeException("No layer param found for param set: " + paramSetId);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetLayerVisibility.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetLayerVisibility.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetLayerVisibility.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,44 @@
+package org.osgeo.mapguide.test.platform.operations.maplayer;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.operations.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class GetLayerVisibility extends MapLayerOperationExecutor
+{
+    public GetLayerVisibility(MgResourceService resSvc, String vm, IMapCreator creator)
+    {
+        super("GetLayerVisibility", resSvc, vm, creator);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            this.CreateMapFromResource(paramSetId);
+
+            SQLiteStatement stmt = _conn.prepare(String.format("Select ParamValue from Params WHERE ParamSet=%d AND ParamName=\"LAYERNAME\"", paramSetId));
+            if (stmt.step()) {
+                String layerName = CommonUtility.GetStringFromStatement(stmt, "ParamValue");
+
+                MgLayerBase layer = this.FindLayer(layerName);
+                if (layer == null)
+                    return TestResult.String("***Unknown Layer***");
+                return TestResult.Boolean(layer.getVisible());
+            }
+            throw new RuntimeException("No layer param found for param set: " + paramSetId);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetLayers.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetLayers.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetLayers.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,38 @@
+package org.osgeo.mapguide.test.platform.operations.maplayer;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.operations.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class GetLayers extends MapLayerOperationExecutor
+{
+    public GetLayers(MgResourceService resSvc, String vm, IMapCreator creator)
+    {
+        super("GetLayers", resSvc, vm, creator);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            this.CreateMapFromResource(paramSetId);
+            MgLayerCollection layers = _map.getLayers();
+            String[] names = new String[layers.getCount()];
+            for (int i = 0; i < layers.getCount(); i++)
+            {
+                MgLayerBase layer = layers.getItem(i);
+                names[i] = layer.getName();
+            }
+
+            return TestResult.String(CommonUtility.JoinStringArray("/", names));
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetLegendLabel.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetLegendLabel.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetLegendLabel.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,44 @@
+package org.osgeo.mapguide.test.platform.operations.maplayer;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.operations.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class GetLegendLabel extends MapLayerOperationExecutor
+{
+    public GetLegendLabel(MgResourceService resSvc, String vm, IMapCreator creator)
+    {
+        super("GetLegendLabel", resSvc, vm, creator);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            this.CreateMapFromResource(paramSetId);
+
+            SQLiteStatement stmt = _conn.prepare(String.format("Select ParamValue from Params WHERE ParamSet=%d AND ParamName=\"LAYERNAME\"", paramSetId));
+            if (stmt.step()) {
+                String layerName = CommonUtility.GetStringFromStatement(stmt, "ParamValue");
+
+                MgLayerBase layer = this.FindLayer(layerName);
+                if (layer == null)
+                    return TestResult.String("***Unknown Layer***");
+                return TestResult.String(layer.getLegendLabel());
+            }
+            throw new RuntimeException("No layer param found for param set: " + paramSetId);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetMapExtent.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetMapExtent.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetMapExtent.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,31 @@
+package org.osgeo.mapguide.test.platform.operations.maplayer;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.operations.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class GetMapExtent extends MapLayerOperationExecutor
+{
+    public GetMapExtent(MgResourceService resSvc, String vm, IMapCreator creator)
+    {
+        super("GetMapExtent", resSvc, vm, creator);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            this.CreateMapFromResource(paramSetId);
+            MgEnvelope extent = _map.getMapExtent();
+            return TestResult.Envelope(extent);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetMapName.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetMapName.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetMapName.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,30 @@
+package org.osgeo.mapguide.test.platform.operations.maplayer;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.operations.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class GetMapName extends MapLayerOperationExecutor
+{
+    public GetMapName(MgResourceService resSvc, String vm, IMapCreator creator)
+    {
+        super("GetMapName", resSvc, vm, creator);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            this.CreateMapFromResource(paramSetId);
+            return TestResult.String(_map.getName());
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetViewCenter.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetViewCenter.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetViewCenter.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,30 @@
+package org.osgeo.mapguide.test.platform.operations.maplayer;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.operations.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class GetViewCenter extends MapLayerOperationExecutor
+{
+    public GetViewCenter(MgResourceService resSvc, String vm, IMapCreator creator)
+    {
+        super("GetViewCenter", resSvc, vm, creator);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            this.CreateMapFromResource(paramSetId);
+            return TestResult.Point(_map.getViewCenter());
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetViewScale.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetViewScale.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/GetViewScale.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,30 @@
+package org.osgeo.mapguide.test.platform.operations.maplayer;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.operations.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class GetViewScale extends MapLayerOperationExecutor
+{
+    public GetViewScale(MgResourceService resSvc, String vm, IMapCreator creator)
+    {
+        super("GetViewScale", resSvc, vm, creator);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            this.CreateMapFromResource(paramSetId);
+            return TestResult.Double(_map.getViewScale());
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/HideGroup.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/HideGroup.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/HideGroup.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,45 @@
+package org.osgeo.mapguide.test.platform.operations.maplayer;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.operations.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class HideGroup extends MapLayerOperationExecutor
+{
+    public HideGroup(MgResourceService resSvc, String vm, IMapCreator creator)
+    {
+        super("HideGroup", resSvc, vm, creator);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            this.CreateMapFromResource(paramSetId);
+
+            SQLiteStatement stmt = _conn.prepare(String.format("Select ParamValue from Params WHERE ParamSet=%d AND ParamName=\"GROUPNAME\"", paramSetId));
+            if (stmt.step()) {
+                String groupName = CommonUtility.GetStringFromStatement(stmt, "ParamValue");
+
+                MgLayerGroupCollection groups = _map.getLayerGroups();
+                MgLayerGroup group = groups.getItem(groupName);
+
+                group.setVisible(false);
+                return TestResult.Boolean(group.getVisible());
+            }
+            throw new RuntimeException("No group param found for param set: " + paramSetId);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/IsLayerVisible.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/IsLayerVisible.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/IsLayerVisible.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,44 @@
+package org.osgeo.mapguide.test.platform.operations.maplayer;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.operations.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class IsLayerVisible extends MapLayerOperationExecutor
+{
+    public IsLayerVisible(MgResourceService resSvc, String vm, IMapCreator creator)
+    {
+        super("IsLayerVisible", resSvc, vm, creator);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            this.CreateMapFromResource(paramSetId);
+
+            SQLiteStatement stmt = _conn.prepare(String.format("Select ParamValue from Params WHERE ParamSet=%d AND ParamName=\"LAYERNAME\"", paramSetId));
+            if (stmt.step()) {
+                String layerName = CommonUtility.GetStringFromStatement(stmt, "ParamValue");
+
+                MgLayerBase layer = this.FindLayer(layerName);
+                if (layer == null)
+                    return TestResult.String("***Unknown Layer***");
+                return TestResult.Boolean(layer.isVisible());
+            }
+            throw new RuntimeException("No layer param found for param set: " + paramSetId);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/LayerExists.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/LayerExists.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/LayerExists.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,43 @@
+package org.osgeo.mapguide.test.platform.operations.maplayer;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.operations.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class LayerExists extends MapLayerOperationExecutor
+{
+    public LayerExists(MgResourceService resSvc, String vm, IMapCreator creator)
+    {
+        super("LayerExists", resSvc, vm, creator);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            this.CreateMapFromResource(paramSetId);
+
+            SQLiteStatement stmt = _conn.prepare(String.format("Select ParamValue from Params WHERE ParamSet=%d AND ParamName=\"LAYERNAME\"", paramSetId));
+            if (stmt.step()) {
+                String layerName = CommonUtility.GetStringFromStatement(stmt, "ParamValue");
+
+                MgLayerBase layer = this.FindLayer(layerName);
+
+                return TestResult.Boolean((layer != null));
+            }
+            throw new RuntimeException("No layer param found for param set: " + paramSetId);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/MapLayerOperationExecutor.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/MapLayerOperationExecutor.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/MapLayerOperationExecutor.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,59 @@
+package org.osgeo.mapguide.test.platform.operations.maplayer;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.operations.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public abstract class MapLayerOperationExecutor extends PlatformApiTestExecutor
+{
+    protected MgMapBase _map;
+    protected MgResourceService _resourceService;
+    protected IMapCreator _creator;
+
+    protected MapLayerOperationExecutor(String opName, MgResourceService resSvc, String unitTestVm, IMapCreator creator)
+    {
+        super(opName, ApiTypes.Platform, unitTestVm);
+        _resourceService = resSvc;
+        _creator = creator;
+    }
+
+    protected void CreateMapFromResource(int paramSetId)
+    {
+        if (_map != null)
+            return;
+
+        try {
+            SQLiteStatement stmt = _conn.prepare(String.format("Select ParamValue from Params WHERE ParamSet=%d AND ParamName=\"MAPDEFINITION\"", paramSetId));
+            String mapName = null;
+            if (stmt.step()) {
+                mapName = CommonUtility.GetStringFromStatement(stmt, "ParamValue");
+                if (CommonUtility.IsNullOrEmpty(mapName))
+                {
+                    mapName = "Library://maplayertest/World.MapDefinition";
+                }
+            } else {
+                mapName = "Library://maplayertest/World.MapDefinition";
+            }
+            MgResourceIdentifier mdfId = new MgResourceIdentifier(mapName);
+            _map = _creator.CreateMap(mdfId);
+        } catch (Exception ex) {
+            throw new RuntimeException(ex);
+        }
+    }
+
+    protected MgLayerBase FindLayer(String name)
+    {
+        if (_map != null)
+        {
+            MgLayerCollection layers = _map.getLayers();
+            int lidx = layers.indexOf(name);
+            if (lidx >= 0)
+                return layers.getItem(lidx);
+        }
+        return null;
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/RemoveGroup.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/RemoveGroup.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/RemoveGroup.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,46 @@
+package org.osgeo.mapguide.test.platform.operations.maplayer;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.operations.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class RemoveGroup extends MapLayerOperationExecutor
+{
+    public RemoveGroup(MgResourceService resSvc, String vm, IMapCreator creator)
+    {
+        super("RemoveGroup", resSvc, vm, creator);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            this.CreateMapFromResource(paramSetId);
+
+            SQLiteStatement stmt = _conn.prepare(String.format("Select ParamValue from Params WHERE ParamSet=%d AND ParamName=\"GROUPNAME\"", paramSetId));
+            if (stmt.step()) {
+                String groupName = CommonUtility.GetStringFromStatement(stmt, "ParamValue");
+
+                MgLayerGroupCollection groups = _map.getLayerGroups();
+                MgLayerGroup group = groups.getItem(groupName);
+
+                groups.remove(group);
+
+                return TestResult.Ok();
+            }
+            throw new RuntimeException("No group param found for param set: " + paramSetId);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/ShowGroup.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/ShowGroup.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/maplayer/ShowGroup.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,45 @@
+package org.osgeo.mapguide.test.platform.operations.maplayer;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.operations.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class ShowGroup extends MapLayerOperationExecutor
+{
+    public ShowGroup(MgResourceService resSvc, String vm, IMapCreator creator)
+    {
+        super("ShowGroup", resSvc, vm, creator);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            this.CreateMapFromResource(paramSetId);
+
+            SQLiteStatement stmt = _conn.prepare(String.format("Select ParamValue from Params WHERE ParamSet=%d AND ParamName=\"GROUPNAME\"", paramSetId));
+            if (stmt.step()) {
+                String groupName = CommonUtility.GetStringFromStatement(stmt, "ParamValue");
+
+                MgLayerGroupCollection groups = _map.getLayerGroups();
+                MgLayerGroup group = groups.getItem(groupName);
+
+                group.setVisible(true);
+                return TestResult.Boolean(group.getVisible());
+            }
+            throw new RuntimeException("No group param found for param set: " + paramSetId);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/ApplyResourcePackage.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/ApplyResourcePackage.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/ApplyResourcePackage.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,40 @@
+package org.osgeo.mapguide.test.platform.operations.resource;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class ApplyResourcePackage extends ResourceServiceOperationExecutor
+{
+    public ApplyResourcePackage(MgResourceService resSvc, String unitTestVm)
+    {
+        super("ApplyResourcePackage", resSvc, unitTestVm);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            HashMap<String, String> param = new HashMap<String, String>();
+            ReadParameterValue(paramSetId, "PACKAGE", param, true);
+
+            String packagePath = "";
+            if (param.get("PACKAGE") != null)
+                packagePath = param.get("PACKAGE");
+
+            //Console.WriteLine("\t\tPackage Path: " + packagePath);
+            MgByteReader reader = CommonUtility.GetByteReaderFromPath(packagePath, false);
+
+            _resourceService.applyResourcePackage(reader);
+
+            return TestResult.Ok();
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/ChangeResourceOwner.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/ChangeResourceOwner.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/ChangeResourceOwner.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,44 @@
+package org.osgeo.mapguide.test.platform.operations.resource;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class ChangeResourceOwner extends ResourceServiceOperationExecutor
+{
+    public ChangeResourceOwner(MgResourceService resSvc, String unitTestVm)
+    {
+        super("ChangeResourceOwner", resSvc, unitTestVm);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            HashMap<String, String> param = new HashMap<String, String>();
+            ReadParameterValue(paramSetId, "RESOURCEID", param);
+            ReadParameterValue(paramSetId, "OWNER", param);
+            ReadParameterValue(paramSetId, "INCLUDEDESCENDANTS", param);
+
+            MgResourceIdentifier resId = null;
+            if (param.get("RESOURCEID") != null)
+            {
+                resId = new MgResourceIdentifier(param.get("RESOURCEID"));
+            }
+
+            boolean includeDescendants = false;
+            if (param.get("INCLUDEDESCENDANTS") != null)
+                includeDescendants = (param.get("INCLUDEDESCENDANTS").equals("1"));
+            _resourceService.changeResourceOwner(resId, param.get("OWNER"), includeDescendants);
+
+            return TestResult.Ok();
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/CopyResource.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/CopyResource.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/CopyResource.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,50 @@
+package org.osgeo.mapguide.test.platform.operations.resource;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class CopyResource extends ResourceServiceOperationExecutor
+{
+    public CopyResource(MgResourceService resSvc, String unitTestVm)
+    {
+        super("CopyResource", resSvc, unitTestVm);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            HashMap<String, String> param = new HashMap<String, String>();
+            ReadParameterValue(paramSetId, "SOURCE", param);
+            ReadParameterValue(paramSetId, "DESTINATION", param);
+
+            MgResourceIdentifier srcId = null;
+            if (param.containsKey("SOURCE"))
+            {
+                srcId = new MgResourceIdentifier(param.get("SOURCE"));
+            }
+
+            MgResourceIdentifier dstId = null;
+            if (param.containsKey("DESTINATION"))
+            {
+                dstId = new MgResourceIdentifier(param.get("DESTINATION"));
+            }
+
+            _resourceService.copyResource(srcId, dstId, false);
+
+            return TestResult.FromByteReader(null);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/DeleteResource.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/DeleteResource.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/DeleteResource.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,43 @@
+package org.osgeo.mapguide.test.platform.operations.resource;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class DeleteResource extends ResourceServiceOperationExecutor
+{
+    public DeleteResource(MgResourceService resSvc, String unitTestVm)
+    {
+        super("DeleteResource", resSvc, unitTestVm);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            HashMap<String, String> param = new HashMap<String, String>();
+            ReadParameterValue(paramSetId, "RESOURCEID", param);
+
+            MgResourceIdentifier resId = null;
+            if (param.containsKey("RESOURCEID"))
+            {
+                resId = new MgResourceIdentifier(param.get("RESOURCEID"));
+            }
+
+            _resourceService.deleteResource(resId);
+
+            return TestResult.FromByteReader(null);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/DeleteResourceData.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/DeleteResourceData.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/DeleteResourceData.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,47 @@
+package org.osgeo.mapguide.test.platform.operations.resource;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class DeleteResourceData extends ResourceServiceOperationExecutor
+{
+    public DeleteResourceData(MgResourceService resSvc, String unitTestVm)
+    {
+        super("DeleteResourceData", resSvc, unitTestVm);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            HashMap<String, String> param = new HashMap<String, String>();
+            ReadParameterValue(paramSetId, "RESOURCEID", param);
+            ReadParameterValue(paramSetId, "DATANAME", param);
+
+            MgResourceIdentifier resId = null;
+            if (param.containsKey("RESOURCEID"))
+            {
+                resId = new MgResourceIdentifier(param.get("RESOURCEID"));
+            }
+
+            String dataName = "";
+            if (param.containsKey("DATANAME"))
+                dataName = param.get("DATANAME");
+            _resourceService.deleteResourceData(resId, dataName);
+
+            return TestResult.FromByteReader(null);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/EnumerateResourceData.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/EnumerateResourceData.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/EnumerateResourceData.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,43 @@
+package org.osgeo.mapguide.test.platform.operations.resource;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class EnumerateResourceData extends ResourceServiceOperationExecutor
+{
+    public EnumerateResourceData(MgResourceService resSvc, String unitTestVm)
+    {
+        super("EnumerateResourceData", resSvc, unitTestVm);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            HashMap<String, String> param = new HashMap<String, String>();
+            ReadParameterValue(paramSetId, "RESOURCEID", param);
+
+            MgResourceIdentifier resId = null;
+            if (param.containsKey("RESOURCEID"))
+            {
+                resId = new MgResourceIdentifier(param.get("RESOURCEID"));
+            }
+
+            MgByteReader reader = _resourceService.enumerateResourceData(resId);
+
+            return TestResult.FromByteReader(reader);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/EnumerateResourceReferences.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/EnumerateResourceReferences.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/EnumerateResourceReferences.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,43 @@
+package org.osgeo.mapguide.test.platform.operations.resource;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class EnumerateResourceReferences extends ResourceServiceOperationExecutor
+{
+    public EnumerateResourceReferences(MgResourceService resSvc, String unitTestVm)
+    {
+        super("EnumerateResourceReferences", resSvc, unitTestVm);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            HashMap<String, String> param = new HashMap<String, String>();
+            ReadParameterValue(paramSetId, "RESOURCEID", param);
+
+            MgResourceIdentifier resId = null;
+            if (param.containsKey("RESOURCEID"))
+            {
+                resId = new MgResourceIdentifier(param.get("RESOURCEID"));
+            }
+
+            MgByteReader reader = _resourceService.enumerateReferences(resId);
+
+            return TestResult.FromByteReader(reader);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/EnumerateResources.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/EnumerateResources.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/EnumerateResources.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,48 @@
+package org.osgeo.mapguide.test.platform.operations.resource;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class EnumerateResources extends ResourceServiceOperationExecutor
+{
+    public EnumerateResources(MgResourceService resSvc, String unitTestVm)
+    {
+        super("EnumerateResources", resSvc, unitTestVm);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            HashMap<String, String> param = new HashMap<String, String>();
+            
+            ReadParameterValue(paramSetId, "RESOURCEID", param);
+            ReadParameterValue(paramSetId, "TYPE", param);
+            ReadParameterValue(paramSetId, "DEPTH", param);
+
+            MgResourceIdentifier resId = null;
+            if (param.get("RESOURCEID") != null)
+            {
+                resId = new MgResourceIdentifier(param.get("RESOURCEID"));
+            }
+            String type = "";
+            if (param.get("TYPE") != null)
+                type = param.get("TYPE");
+            int depth = -1;
+            if (param.get("DEPTH") != null)
+                depth = Integer.parseInt(param.get("DEPTH"));
+
+            MgByteReader byteReader = _resourceService.enumerateResources(resId, depth, type);
+
+            return TestResult.FromByteReader(byteReader, "GETRESOURCEDATA");
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/GetRepositoryContent.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/GetRepositoryContent.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/GetRepositoryContent.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,43 @@
+package org.osgeo.mapguide.test.platform.operations.resource;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class GetRepositoryContent extends ResourceServiceOperationExecutor
+{
+    public GetRepositoryContent(MgResourceService resSvc, String unitTestVm)
+    {
+        super("GetRepositoryContent", resSvc, unitTestVm);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            HashMap<String, String> param = new HashMap<String, String>();
+            ReadParameterValue(paramSetId, "RESOURCEID", param);
+
+            MgResourceIdentifier resId = null;
+            if (param.containsKey("RESOURCEID"))
+            {
+                resId = new MgResourceIdentifier(param.get("RESOURCEID"));
+            }
+
+            MgByteReader result = _resourceService.getRepositoryContent(resId);
+
+            return TestResult.FromByteReader(result);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/GetRepositoryHeader.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/GetRepositoryHeader.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/GetRepositoryHeader.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,43 @@
+package org.osgeo.mapguide.test.platform.operations.resource;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class GetRepositoryHeader extends ResourceServiceOperationExecutor
+{
+    public GetRepositoryHeader(MgResourceService resSvc, String unitTestVm)
+    {
+        super("GetRepositoryHeader", resSvc, unitTestVm);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            HashMap<String, String> param = new HashMap<String, String>();
+            ReadParameterValue(paramSetId, "RESOURCEID", param);
+
+            MgResourceIdentifier resId = null;
+            if (param.containsKey("RESOURCEID"))
+            {
+                resId = new MgResourceIdentifier(param.get("RESOURCEID"));
+            }
+
+            MgByteReader result = _resourceService.getRepositoryHeader(resId);
+
+            return TestResult.FromByteReader(result);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/GetResourceContent.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/GetResourceContent.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/GetResourceContent.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,44 @@
+package org.osgeo.mapguide.test.platform.operations.resource;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class GetResourceContent extends ResourceServiceOperationExecutor
+{
+    public GetResourceContent(MgResourceService resSvc, String unitTestVm)
+    {
+        super("GetResourceContent", resSvc, unitTestVm);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            HashMap<String, String> param = new HashMap<String, String>();
+            ReadParameterValue(paramSetId, "RESOURCEID", param);
+            ReadParameterValue(paramSetId, "PREPROCESS", param);
+
+            MgResourceIdentifier resId = null;
+            if (param.containsKey("RESOURCEID"))
+            {
+                resId = new MgResourceIdentifier(param.get("RESOURCEID"));
+            }
+
+            MgByteReader reader = _resourceService.getResourceContent(resId);
+
+            return TestResult.FromByteReader(reader);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/GetResourceData.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/GetResourceData.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/GetResourceData.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,44 @@
+package org.osgeo.mapguide.test.platform.operations.resource;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class GetResourceData extends ResourceServiceOperationExecutor
+{
+    public GetResourceData(MgResourceService resSvc, String unitTestVm)
+    {
+        super("GetResourceData", resSvc, unitTestVm);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            HashMap<String, String> param = new HashMap<String, String>();
+            ReadParameterValue(paramSetId, "RESOURCEID", param);
+            ReadParameterValue(paramSetId, "DATANAME", param);
+
+            MgResourceIdentifier resId = null;
+            if (param.containsKey("RESOURCEID"))
+            {
+                resId = new MgResourceIdentifier(param.get("RESOURCEID"));
+            }
+
+            MgByteReader reader = _resourceService.getResourceData(resId, param.get("DATANAME"));
+
+            return TestResult.FromByteReader(reader);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/GetResourceHeader.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/GetResourceHeader.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/GetResourceHeader.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,43 @@
+package org.osgeo.mapguide.test.platform.operations.resource;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class GetResourceHeader extends ResourceServiceOperationExecutor
+{
+    public GetResourceHeader(MgResourceService resSvc, String unitTestVm)
+    {
+        super("GetResourceHeader", resSvc, unitTestVm);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            HashMap<String, String> param = new HashMap<String, String>();
+            ReadParameterValue(paramSetId, "RESOURCEID", param);
+
+            MgResourceIdentifier resId = null;
+            if (param.containsKey("RESOURCEID"))
+            {
+                resId = new MgResourceIdentifier(param.get("RESOURCEID"));
+            }
+
+            MgByteReader reader = _resourceService.getResourceHeader(resId);
+
+            return TestResult.FromByteReader(reader);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/InheritPermissionsFrom.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/InheritPermissionsFrom.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/InheritPermissionsFrom.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,43 @@
+package org.osgeo.mapguide.test.platform.operations.resource;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class InheritPermissionsFrom extends ResourceServiceOperationExecutor
+{
+    public InheritPermissionsFrom(MgResourceService resSvc, String unitTestVm)
+    {
+        super("InheritPermissionsFrom", resSvc, unitTestVm);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            HashMap<String, String> param = new HashMap<String, String>();
+            ReadParameterValue(paramSetId, "RESOURCEID", param);
+
+            MgResourceIdentifier resId = null;
+            if (param.containsKey("RESOURCEID"))
+            {
+                resId = new MgResourceIdentifier(param.get("RESOURCEID"));
+            }
+
+            _resourceService.inheritPermissionsFrom(resId);
+
+            return TestResult.FromByteReader(null);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/MoveResource.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/MoveResource.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/MoveResource.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,50 @@
+package org.osgeo.mapguide.test.platform.operations.resource;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class MoveResource extends ResourceServiceOperationExecutor
+{
+    public MoveResource(MgResourceService resSvc, String unitTestVm)
+    {
+        super("MoveResource", resSvc, unitTestVm);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            HashMap<String, String> param = new HashMap<String, String>();
+            ReadParameterValue(paramSetId, "SOURCE", param);
+            ReadParameterValue(paramSetId, "DESTINATION", param);
+
+            MgResourceIdentifier srcId = null;
+            if (param.containsKey("SOURCE"))
+            {
+                srcId = new MgResourceIdentifier(param.get("SOURCE"));
+            }
+
+            MgResourceIdentifier dstId = null;
+            if (param.containsKey("DESTINATION"))
+            {
+                dstId = new MgResourceIdentifier(param.get("DESTINATION"));
+            }
+
+            _resourceService.moveResource(srcId, dstId, false);
+
+            return TestResult.FromByteReader(null);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/RenameResourceData.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/RenameResourceData.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/RenameResourceData.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,45 @@
+package org.osgeo.mapguide.test.platform.operations.resource;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class RenameResourceData extends ResourceServiceOperationExecutor
+{
+    public RenameResourceData(MgResourceService resSvc, String unitTestVm)
+    {
+        super("RenameResourceData", resSvc, unitTestVm);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            HashMap<String, String> param = new HashMap<String, String>();
+            ReadParameterValue(paramSetId, "RESOURCEID", param);
+            ReadParameterValue(paramSetId, "OLDDATANAME", param);
+            ReadParameterValue(paramSetId, "NEWDATANAME", param);
+
+            MgResourceIdentifier resId = null;
+            if (param.containsKey("RESOURCEID"))
+            {
+                resId = new MgResourceIdentifier(param.get("RESOURCEID"));
+            }
+
+            _resourceService.renameResourceData(resId, param.get("OLDDATANAME"), param.get("NEWDATANAME"), false);
+
+            return TestResult.FromByteReader(null);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/ResourceServiceOperationExecutor.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/ResourceServiceOperationExecutor.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/ResourceServiceOperationExecutor.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,18 @@
+package org.osgeo.mapguide.test.platform.operations.resource;
+
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+
+import com.almworks.sqlite4java.*;
+
+public abstract class ResourceServiceOperationExecutor extends PlatformApiTestExecutor
+{
+    protected MgResourceService _resourceService;
+
+    protected ResourceServiceOperationExecutor(String opName, MgResourceService resSvc, String unitTestVm)
+    {
+        super(opName, ApiTypes.Platform, unitTestVm);
+        _resourceService = resSvc;
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/SetResource.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/SetResource.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/SetResource.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,44 @@
+package org.osgeo.mapguide.test.platform.operations.resource;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class SetResource extends ResourceServiceOperationExecutor
+{
+    public SetResource(MgResourceService resSvc, String unitTestVm)
+    {
+        super("SetResource", resSvc, unitTestVm);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            HashMap<String, String> param = new HashMap<String, String>();
+            CommonUtility.ReadParameterValue(_conn, paramSetId, "RESOURCEID", param);
+            CommonUtility.ReadParameterValue(_conn, paramSetId, "CONTENT", param, true);
+            CommonUtility.ReadParameterValue(_conn, paramSetId, "HEADER", param, true);
+
+            MgResourceIdentifier resId = null;
+            if (param.get("RESOURCEID") != null)
+            {
+                resId = new MgResourceIdentifier(param.get("RESOURCEID"));
+            }
+
+            MgByteReader content = CommonUtility.GetByteReaderFromPath(param.get("CONTENT"));
+            MgByteReader header = CommonUtility.GetByteReaderFromPath(param.get("HEADER"));
+
+            _resourceService.setResource(resId, content, header);
+
+            return TestResult.Ok();
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/SetResourceData.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/SetResourceData.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/SetResourceData.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,52 @@
+package org.osgeo.mapguide.test.platform.operations.resource;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class SetResourceData extends ResourceServiceOperationExecutor
+{
+    public SetResourceData(MgResourceService resSvc, String unitTestVm)
+    {
+        super("SetResourceData", resSvc, unitTestVm);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            HashMap<String, String> param = new HashMap<String, String>();
+            ReadParameterValue(paramSetId, "RESOURCEID", param);
+            ReadParameterValue(paramSetId, "DATANAME", param);
+            ReadParameterValue(paramSetId, "DATATYPE", param);
+            ReadParameterValue(paramSetId, "DATA", param, true);
+
+            MgResourceIdentifier resId = null;
+            if (param.containsKey("RESOURCEID"))
+            {
+                resId = new MgResourceIdentifier(param.get("RESOURCEID"));
+            }
+
+            String extension = CommonUtility.GetExtension(param.get("DATANAME"));
+            String mimeType = CommonUtility.GetMimeType(extension);
+            MgByteSource dataSource = new MgByteSource(param.get("DATA"));
+            dataSource.setMimeType(mimeType);
+            MgByteReader dataReader = dataSource.getReader();
+
+            _resourceService.setResourceData(resId, param.get("DATANAME"), param.get("DATATYPE"), dataReader);
+
+            return TestResult.FromByteReader(null);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file

Added: trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/UpdateRepository.java
===================================================================
--- trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/UpdateRepository.java	                        (rev 0)
+++ trunk/MgDev/UnitTest/WebTier/Java/src/org/osgeo/mapguide/test/platform/operations/resource/UpdateRepository.java	2014-10-04 13:00:45 UTC (rev 8378)
@@ -0,0 +1,48 @@
+package org.osgeo.mapguide.test.platform.operations.resource;
+
+import java.util.*;
+import com.almworks.sqlite4java.*;
+import org.osgeo.mapguide.*;
+import org.osgeo.mapguide.test.*;
+import org.osgeo.mapguide.test.common.*;
+import org.osgeo.mapguide.test.platform.*;
+
+public class UpdateRepository extends ResourceServiceOperationExecutor
+{
+    public UpdateRepository(MgResourceService resSvc, String unitTestVm)
+    {
+        super("UpdateRepository", resSvc, unitTestVm);
+    }
+
+    public TestResult Execute(int paramSetId)
+    {
+        try
+        {
+            HashMap<String, String> param = new HashMap<String, String>();
+            ReadParameterValue(paramSetId, "RESOURCEID", param);
+            ReadParameterValue(paramSetId, "CONTENT", param, true);
+            ReadParameterValue(paramSetId, "HEADER", param, true);
+
+            MgResourceIdentifier resId = null;
+            if (param.containsKey("RESOURCEID"))
+            {
+                resId = new MgResourceIdentifier(param.get("RESOURCEID"));
+            }
+
+            MgByteReader content = CommonUtility.GetByteReaderFromPath(param.get("CONTENT"));
+            MgByteReader header = CommonUtility.GetByteReaderFromPath(param.get("HEADER"));
+
+            _resourceService.updateRepository(resId, content, header);
+
+            return TestResult.FromByteReader(null);
+        }
+        catch (MgException ex)
+        {
+            return TestResult.FromMgException(ex);
+        }
+        catch (Exception ex)
+        {
+            return TestResult.FromException(ex);
+        }
+    }
+}
\ No newline at end of file



More information about the mapguide-commits mailing list