[mapguide-commits] r1047 - in trunk/MgDev: Common/Foundation/System Common/MapGuideCommon/Services Common/MapGuideCommon/System Common/PlatformBase/Services Server/src/Common/Manager Server/src/Services/Resource UnitTest/WebTier/MapAgent/MapAgentForms Web/src/HttpHandler

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Sun Jan 14 16:09:06 EST 2007


Author: tonyfang
Date: 2007-01-14 16:09:06 -0500 (Sun, 14 Jan 2007)
New Revision: 1047

Added:
   trunk/MgDev/Server/src/Common/Manager/UnmanagedDataManager.cpp
   trunk/MgDev/Server/src/Common/Manager/UnmanagedDataManager.h
   trunk/MgDev/Server/src/Services/Resource/OpEnumerateUnmanagedData.cpp
   trunk/MgDev/Server/src/Services/Resource/OpEnumerateUnmanagedData.h
   trunk/MgDev/Server/src/Services/Resource/OpEnumerateUnmanagedDataMappings.cpp
   trunk/MgDev/Server/src/Services/Resource/OpEnumerateUnmanagedDataMappings.h
   trunk/MgDev/Web/src/HttpHandler/HttpEnumerateUnmanagedData.cpp
   trunk/MgDev/Web/src/HttpHandler/HttpEnumerateUnmanagedData.h
   trunk/MgDev/Web/src/HttpHandler/HttpEnumerateUnmanagedDataMappings.cpp
   trunk/MgDev/Web/src/HttpHandler/HttpEnumerateUnmanagedDataMappings.h
Modified:
   trunk/MgDev/Common/Foundation/System/FileUtil.cpp
   trunk/MgDev/Common/MapGuideCommon/Services/ProxyResourceService.cpp
   trunk/MgDev/Common/MapGuideCommon/Services/ProxyResourceService.h
   trunk/MgDev/Common/MapGuideCommon/System/ConfigProperties.cpp
   trunk/MgDev/Common/MapGuideCommon/System/ConfigProperties.h
   trunk/MgDev/Common/PlatformBase/Services/ResourceService.cpp
   trunk/MgDev/Common/PlatformBase/Services/ResourceService.h
   trunk/MgDev/Server/src/Common/Manager/Makefile.am
   trunk/MgDev/Server/src/Common/Manager/ServerManager.vcproj
   trunk/MgDev/Server/src/Common/Manager/ServerManagerBuild.cpp
   trunk/MgDev/Server/src/Services/Resource/ApplicationRepositoryManager.cpp
   trunk/MgDev/Server/src/Services/Resource/ApplicationRepositoryManager.h
   trunk/MgDev/Server/src/Services/Resource/Makefile.am
   trunk/MgDev/Server/src/Services/Resource/OperationInfo.cpp
   trunk/MgDev/Server/src/Services/Resource/OperationInfo.h
   trunk/MgDev/Server/src/Services/Resource/ResourceOperationFactory.cpp
   trunk/MgDev/Server/src/Services/Resource/ServerResourceService.cpp
   trunk/MgDev/Server/src/Services/Resource/ServerResourceService.h
   trunk/MgDev/Server/src/Services/Resource/ServerResourceService.vcproj
   trunk/MgDev/Server/src/Services/Resource/ServerResourceServiceBuild.cpp
   trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/resourceserviceapi.html
   trunk/MgDev/Web/src/HttpHandler/HttpHandler.vcproj
   trunk/MgDev/Web/src/HttpHandler/HttpHandlerBuild.cpp
   trunk/MgDev/Web/src/HttpHandler/HttpRequest.cpp
   trunk/MgDev/Web/src/HttpHandler/HttpResourceStrings.cpp
   trunk/MgDev/Web/src/HttpHandler/HttpResourceStrings.h
   trunk/MgDev/Web/src/HttpHandler/Makefile.am
Log:
MapGuide RFC 2 - Unmanaged Data APIs

Modified: trunk/MgDev/Common/Foundation/System/FileUtil.cpp
===================================================================
--- trunk/MgDev/Common/Foundation/System/FileUtil.cpp	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/Common/Foundation/System/FileUtil.cpp	2007-01-14 21:09:06 UTC (rev 1047)
@@ -142,7 +142,7 @@
 
     bool result = false;
     size_t len = extension.length();
-    size_t pos = pathname.find_last_of(L'.');
+    size_t pos = pathname.find_last_of(L'.') + 1;
 
     if (STRING::npos != pos && (pathname.length() == pos + len))
     {
@@ -154,6 +154,7 @@
         }
     }
 
+
     return result;
 }
 

Modified: trunk/MgDev/Common/MapGuideCommon/Services/ProxyResourceService.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/Services/ProxyResourceService.cpp	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/Common/MapGuideCommon/Services/ProxyResourceService.cpp	2007-01-14 21:09:06 UTC (rev 1047)
@@ -1055,3 +1055,52 @@
 {
     return m_connProp->GetUserInfo();
 }
+
+
+///////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Enumerates the unmanaged data files
+/// Resources of all types can be enumerated all at once, or only
+/// resources of a given type.
+///
+MgStringCollection* MgProxyResourceService::EnumerateUnmanagedData(
+    CREFSTRING mappingName, CREFSTRING dataTypeFilter, INT32 depth)
+{
+    MgCommand cmd;
+
+    cmd.ExecuteCommand(m_connProp,
+                        MgCommand::knObject,
+                        MgResourceService::opIdEnumerateUnmanagedData,
+                        3,
+                        Resource_Service,
+                        1,
+                        MgCommand::knString, &mappingName,
+                        MgCommand::knString, &dataTypeFilter,
+                        MgCommand::knInt32, depth,
+                        MgCommand::knNone);
+
+    SetWarning(cmd.GetWarningObject());
+
+    return (MgStringCollection*)cmd.GetReturnValue().val.m_obj;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Enumerates the unmanaged data mappings
+///
+MgStringCollection* MgProxyResourceService::EnumerateUnmanagedDataMappings()
+{
+    MgCommand cmd;
+
+    cmd.ExecuteCommand(m_connProp,
+                        MgCommand::knObject,
+                        MgResourceService::opIdEnumerateUnmanagedDataMappings,
+                        0,
+                        Resource_Service,
+                        1,
+                        MgCommand::knNone);
+
+    SetWarning(cmd.GetWarningObject());
+
+    return (MgStringCollection*)cmd.GetReturnValue().val.m_obj;
+}

Modified: trunk/MgDev/Common/MapGuideCommon/Services/ProxyResourceService.h
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/Services/ProxyResourceService.h	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/Common/MapGuideCommon/Services/ProxyResourceService.h	2007-01-14 21:09:06 UTC (rev 1047)
@@ -666,6 +666,12 @@
     ///
     virtual MgByteReader* EnumerateReferences(MgResourceIdentifier* resource);
 
+
+    virtual MgStringCollection* EnumerateUnmanagedData(CREFSTRING mappingName,
+        CREFSTRING dataTypeFilter, INT32 depth);
+
+    virtual MgStringCollection* EnumerateUnmanagedDataMappings();
+
 protected:
 
     //////////////////////////////////////////////////////////////////

Modified: trunk/MgDev/Common/MapGuideCommon/System/ConfigProperties.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/System/ConfigProperties.cpp	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/Common/MapGuideCommon/System/ConfigProperties.cpp	2007-01-14 21:09:06 UTC (rev 1047)
@@ -260,6 +260,11 @@
 const STRING MgConfigProperties::FontAliasMappingSection                                    = L"FontAliases";
 
 // ******************************************************************
+// Unmanaged Data Mappings section
+// ******************************************************************
+const STRING MgConfigProperties::UnmanagedDataMappingsSection                               = L"UnmanagedDataMappings";
+
+// ******************************************************************
 // Resource Service Properties
 // ******************************************************************
 const STRING MgConfigProperties::ResourceServicePropertiesSection                               = L"ResourceServiceProperties";

Modified: trunk/MgDev/Common/MapGuideCommon/System/ConfigProperties.h
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/System/ConfigProperties.h	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/Common/MapGuideCommon/System/ConfigProperties.h	2007-01-14 21:09:06 UTC (rev 1047)
@@ -314,6 +314,9 @@
     /// font alias mappings
     static const STRING FontAliasMappingSection;                               /// value("FontAliases")
 
+    /// unmanaged data mappings
+    static const STRING UnmanagedDataMappingsSection;                          /// value("UnmanagedDataMappings")
+
     /// RESOURCE SERVICE PROPERTIES SECTION ------------------------------------------------------------------------------
 
     /// Resource Service properties.  Note that in V1.0 this property section is only defined on the Site Server.

Modified: trunk/MgDev/Common/PlatformBase/Services/ResourceService.cpp
===================================================================
--- trunk/MgDev/Common/PlatformBase/Services/ResourceService.cpp	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/Common/PlatformBase/Services/ResourceService.cpp	2007-01-14 21:09:06 UTC (rev 1047)
@@ -191,3 +191,25 @@
 {
     throw new MgNotImplementedException(L"MgResourceService.ResourceExists", __LINE__, __WFILE__, NULL, L"", NULL);
 }
+
+
+//////////////////////////////////////////////////////////////////
+/// \brief
+/// Enumerates the unmanaged data
+/// Resources of all types can be enumerated all at once, or only
+/// resources of a given type.
+///
+MgStringCollection* MgResourceService::EnumerateUnmanagedData(
+    CREFSTRING mappingName, CREFSTRING dataTypeFilter, INT32 depth)
+{
+    throw new MgNotImplementedException(L"MgResourceService.EnumerateUnmanagedData", __LINE__, __WFILE__, NULL, L"", NULL);
+}
+
+//////////////////////////////////////////////////////////////////
+/// \brief
+/// Enumerates the unmanaged data mappings
+///
+MgStringCollection* MgResourceService::EnumerateUnmanagedDataMappings()
+{
+    throw new MgNotImplementedException(L"MgResourceService.EnumerateUnmanagedDataMappings", __LINE__, __WFILE__, NULL, L"", NULL);
+}

Modified: trunk/MgDev/Common/PlatformBase/Services/ResourceService.h
===================================================================
--- trunk/MgDev/Common/PlatformBase/Services/ResourceService.h	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/Common/PlatformBase/Services/ResourceService.h	2007-01-14 21:09:06 UTC (rev 1047)
@@ -1674,6 +1674,25 @@
     virtual MgSerializableCollection* EnumerateParentMapDefinitions(
         MgSerializableCollection* resources) = 0;
 
+    ///////////////////////////////////////////////////////////////////////////
+    /// \brief
+    /// Enumerate unmanaged data
+    ///
+    /// \return
+    /// MgStringCollection list of unmanaged data paths
+    ///
+    virtual MgStringCollection* EnumerateUnmanagedData(
+        CREFSTRING mappingName, CREFSTRING dataTypeFilter, INT32 depth);
+
+    ///////////////////////////////////////////////////////////////////////////
+    /// \brief
+    /// Enumerate unmanaged data mappings
+    ///
+    /// \return
+    /// MgStringCollection list of unmanaged data mappings
+    ///
+    virtual MgStringCollection* EnumerateUnmanagedDataMappings();
+
 protected:
 
     /////////////////////////////////////////////////////////////////
@@ -1729,6 +1748,8 @@
         opIdInheritPermissionsFrom          = 0x1111EF17,
         opIdGetResourceModifiedDate         = 0x1111EF18,
         opIdEnumerateParentMapDefinitions   = 0x1111EF19,
+        opIdEnumerateUnmanagedData          = 0x1111EF1A,
+        opIdEnumerateUnmanagedDataMappings  = 0x1111EF1B,
     };
 };
 

Modified: trunk/MgDev/Server/src/Common/Manager/Makefile.am
===================================================================
--- trunk/MgDev/Server/src/Common/Manager/Makefile.am	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/Server/src/Common/Manager/Makefile.am	2007-01-14 21:09:06 UTC (rev 1047)
@@ -55,9 +55,11 @@
   SessionCache.cpp \
   SessionInfo.cpp \
   SessionManager.cpp \
+  UnmanagedDataManager.cpp \
   UserInfo.cpp \
   WorkerThread.cpp \
   WorkerThreadData.cpp
+  
 
 noinst_HEADERS = $(include_SOURCES) \
   Connection.h \
@@ -86,6 +88,7 @@
   SessionCache.h \
   SessionInfo.h \
   SessionManager.h \
+  UnmanagedDataManager,h \
   UserInfo.h \
   WorkerThread.h \
   WorkerThreadData.h

Modified: trunk/MgDev/Server/src/Common/Manager/ServerManager.vcproj
===================================================================
--- trunk/MgDev/Server/src/Common/Manager/ServerManager.vcproj	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/Server/src/Common/Manager/ServerManager.vcproj	2007-01-14 21:09:06 UTC (rev 1047)
@@ -799,6 +799,22 @@
 			>
 		</File>
 		<File
+			RelativePath=".\UnmanagedDataManager.cpp"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				ExcludedFromBuild="true"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath=".\UnmanagedDataManager.h"
+			>
+		</File>
+		<File
 			RelativePath=".\UserInfo.cpp"
 			>
 			<FileConfiguration

Modified: trunk/MgDev/Server/src/Common/Manager/ServerManagerBuild.cpp
===================================================================
--- trunk/MgDev/Server/src/Common/Manager/ServerManagerBuild.cpp	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/Server/src/Common/Manager/ServerManagerBuild.cpp	2007-01-14 21:09:06 UTC (rev 1047)
@@ -45,3 +45,4 @@
 #include "UserInfo.cpp"
 #include "WorkerThread.cpp"
 #include "WorkerThreadData.cpp"
+#include "UnmanagedDataManager.cpp"

Added: trunk/MgDev/Server/src/Common/Manager/UnmanagedDataManager.cpp
===================================================================
--- trunk/MgDev/Server/src/Common/Manager/UnmanagedDataManager.cpp	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/Server/src/Common/Manager/UnmanagedDataManager.cpp	2007-01-14 21:09:06 UTC (rev 1047)
@@ -0,0 +1,454 @@
+//
+//  Copyright (C) 2004-2006  Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "MapGuideCommon.h"
+#include "ServerManager.h"
+#include "ServerResourceService.h"
+#include "UnmanagedDataManager.h"
+
+
+// Process-wide MgUnmanagedDataManager
+Ptr<MgUnmanagedDataManager> MgUnmanagedDataManager::sm_unmanagedDataManager = (MgUnmanagedDataManager*)NULL;
+
+const STRING MgUnmanagedDataManager::Sdf                  = L"SDF";
+const STRING MgUnmanagedDataManager::Shp                  = L"SHP";
+const STRING MgUnmanagedDataManager::Dwf                  = L"DWF";
+const STRING MgUnmanagedDataManager::Raster               = L"RASTER";
+const STRING MgUnmanagedDataManager::Odbc                 = L"ODBC";
+const STRING MgUnmanagedDataManager::Folder               = L"FOLDER";
+const STRING MgUnmanagedDataManager::Jpg                  = L"JPG";
+const STRING MgUnmanagedDataManager::Jpeg                 = L"JPEG";
+const STRING MgUnmanagedDataManager::Jpe                  = L"JPE";
+const STRING MgUnmanagedDataManager::Png                  = L"PNG";
+const STRING MgUnmanagedDataManager::Bmp                  = L"BMP";
+const STRING MgUnmanagedDataManager::Cal                  = L"CAL";
+const STRING MgUnmanagedDataManager::Tga                  = L"TGA";
+const STRING MgUnmanagedDataManager::Tif                  = L"TIF";
+const STRING MgUnmanagedDataManager::Tiff                 = L"TIFF";
+const STRING MgUnmanagedDataManager::Sid                  = L"SID";
+const STRING MgUnmanagedDataManager::Ecw                  = L"ECW";
+const STRING MgUnmanagedDataManager::Bil                  = L"BIL";
+const STRING MgUnmanagedDataManager::Mdb                  = L"MDB";
+const STRING MgUnmanagedDataManager::OpenSquareBracket    = L"[";
+const STRING MgUnmanagedDataManager::ClosedSquareBracket  = L"]";
+
+
+///////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Constructs the object.
+///
+MgUnmanagedDataManager::MgUnmanagedDataManager(void)
+{
+}
+
+///////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Destructs the object.
+///
+MgUnmanagedDataManager::~MgUnmanagedDataManager(void)
+{
+    ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) MgUnmanagedDataManager::~MgUnmanagedDataManager()\n")));
+}
+
+///////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Disposes the object.
+///
+void MgUnmanagedDataManager::Dispose(void)
+{
+    delete this;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Recursive method that returns all files for a given mapping name
+///
+void MgUnmanagedDataManager::GetFiles(MgStringCollection* files, CREFSTRING mappingName, CREFSTRING rootdir, CREFSTRING subdir, CREFSTRING dataTypeFilter, INT32 depth)
+{
+    STRING fulldir = rootdir;
+    MgFileUtil::AppendSlashToEndOfPath(fulldir);
+    if (!subdir.empty())
+    {
+        fulldir += subdir;
+        MgFileUtil::AppendSlashToEndOfPath(fulldir);
+    }
+
+    // Open the directory
+    ACE_DIR* directory = directory = ACE_OS::opendir(ACE_TEXT_WCHAR_TO_TCHAR(fulldir.c_str()));
+
+    if (directory != NULL)
+    {
+        dirent* direntry = NULL;
+
+        // Go through the directory entries
+        while ((direntry = ACE_OS::readdir(directory)) != NULL)
+        {
+            STRING entryName = MG_TCHAR_TO_WCHAR(direntry->d_name);
+            STRING fullDataPathname = fulldir + entryName;
+
+            if (MgFileUtil::IsFile(fullDataPathname)
+                && IsValidFileType(entryName, dataTypeFilter))
+            {
+                // Add to list of files
+                files->Add(FormatMappingName(mappingName) + FormatSubdir(subdir) + entryName);
+            }
+            else if (MgFileUtil::IsDirectory(fullDataPathname) 
+                && entryName.compare(L"..") != 0 // skip ..
+                && entryName.compare(L".") != 0 // skip .
+                && (depth == -1 || depth > 0))
+            {
+                if (depth > 0)
+                    depth--;
+
+                // recursive call to get files in subdirecories
+                GetFiles(files, mappingName, rootdir, FormatSubdir(subdir) + entryName, dataTypeFilter, depth);
+            }
+        }
+
+        ACE_OS::closedir(directory);
+    }
+}
+ 
+///////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Recursive method that returns all subdirectories for a given mapping name
+///
+void MgUnmanagedDataManager::GetDirectories(MgStringCollection* dirs, CREFSTRING mappingName, CREFSTRING rootdir, CREFSTRING subdir, INT32 depth)
+{
+    STRING fulldir = rootdir;
+    MgFileUtil::AppendSlashToEndOfPath(fulldir);
+    if (!subdir.empty())
+    {
+        fulldir += subdir;
+        MgFileUtil::AppendSlashToEndOfPath(fulldir);
+    }
+
+    // Open the directory
+    ACE_DIR* directory = directory = ACE_OS::opendir(ACE_TEXT_WCHAR_TO_TCHAR(fulldir.c_str()));
+
+    if (directory != NULL)
+    {
+        dirent* direntry = NULL;
+
+        // Go through the directory entries
+        while ((direntry = ACE_OS::readdir(directory)) != NULL)
+        {
+            STRING entryName = MG_TCHAR_TO_WCHAR(direntry->d_name);
+            STRING fullDataPathname = fulldir + entryName;
+
+            if (MgFileUtil::IsDirectory(fullDataPathname) 
+                && entryName.compare(L"..") != 0 // skip ..
+                && entryName.compare(L".") != 0) // skip .
+            {
+                // Add to list of directories
+                dirs->Add(FormatMappingName(mappingName) + FormatSubdir(subdir) + entryName);
+
+                if (depth == -1 || depth > 0)
+                {
+                    if (depth > 0)
+                        depth--;
+
+                    // recursive call to get directories in subdirecories
+                    GetDirectories(dirs, mappingName, rootdir, FormatSubdir(subdir) + entryName, depth);
+                }
+            }
+        }
+
+        ACE_OS::closedir(directory);
+    }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Is valid data type filter
+///
+bool MgUnmanagedDataManager::IsValidDataTypeFilter(CREFSTRING dataTypeFilter)
+{
+    // TODO: other file types?
+    return (dataTypeFilter.empty()
+        || ACE_OS::strcasecmp(dataTypeFilter.c_str(), MgUnmanagedDataManager::Sdf.c_str()) == 0
+        || ACE_OS::strcasecmp(dataTypeFilter.c_str(), MgUnmanagedDataManager::Shp.c_str()) == 0
+        || ACE_OS::strcasecmp(dataTypeFilter.c_str(), MgUnmanagedDataManager::Dwf.c_str()) == 0
+        || ACE_OS::strcasecmp(dataTypeFilter.c_str(), MgUnmanagedDataManager::Raster.c_str()) == 0
+        || ACE_OS::strcasecmp(dataTypeFilter.c_str(), MgUnmanagedDataManager::Odbc.c_str()) == 0
+        || ACE_OS::strcasecmp(dataTypeFilter.c_str(), MgUnmanagedDataManager::Folder.c_str()) == 0);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// checks that a given file is of a specified type
+///
+bool MgUnmanagedDataManager::IsValidFileType(CREFSTRING file, CREFSTRING dataTypeFilter)
+{
+    bool result = false;
+
+    if (ACE_OS::strcasecmp(dataTypeFilter.c_str(), MgUnmanagedDataManager::Sdf.c_str()) == 0)
+        result = IsSdfFile(file);
+    else if (ACE_OS::strcasecmp(dataTypeFilter.c_str(), MgUnmanagedDataManager::Shp.c_str()) == 0)
+        result = IsShpFile(file);
+    else if (ACE_OS::strcasecmp(dataTypeFilter.c_str(), MgUnmanagedDataManager::Dwf.c_str()) == 0)
+        result = IsDwfFile(file);
+    else if (ACE_OS::strcasecmp(dataTypeFilter.c_str(), MgUnmanagedDataManager::Raster.c_str()) == 0)
+        result = IsRasterFile(file);
+    else if (ACE_OS::strcasecmp(dataTypeFilter.c_str(), MgUnmanagedDataManager::Odbc.c_str()) == 0)
+        result = IsOdbcFile(file);
+    else if (dataTypeFilter.empty())
+        result = IsAnyValidFile(file);
+
+    return result;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Is valid sdf data file
+///
+bool MgUnmanagedDataManager::IsSdfFile(CREFSTRING file)
+{
+    return MgFileUtil::EndsWithExtension(file, MgUnmanagedDataManager::Sdf);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Is valid shp data file
+///
+bool MgUnmanagedDataManager::IsShpFile(CREFSTRING file)
+{
+    return MgFileUtil::EndsWithExtension(file, MgUnmanagedDataManager::Shp);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Is valid dwf data file
+///
+bool MgUnmanagedDataManager::IsDwfFile(CREFSTRING file)
+{
+    return MgFileUtil::EndsWithExtension(file, MgUnmanagedDataManager::Dwf);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Is valid raster data file
+///
+bool MgUnmanagedDataManager::IsRasterFile(CREFSTRING file)
+{
+    return MgFileUtil::EndsWithExtension(file, MgUnmanagedDataManager::Jpg)
+        || MgFileUtil::EndsWithExtension(file, MgUnmanagedDataManager::Jpeg)
+        || MgFileUtil::EndsWithExtension(file, MgUnmanagedDataManager::Jpe)
+        || MgFileUtil::EndsWithExtension(file, MgUnmanagedDataManager::Png)
+        || MgFileUtil::EndsWithExtension(file, MgUnmanagedDataManager::Bmp)
+        || MgFileUtil::EndsWithExtension(file, MgUnmanagedDataManager::Cal)
+        || MgFileUtil::EndsWithExtension(file, MgUnmanagedDataManager::Tga)
+        || MgFileUtil::EndsWithExtension(file, MgUnmanagedDataManager::Tif)
+        || MgFileUtil::EndsWithExtension(file, MgUnmanagedDataManager::Tiff)
+        || MgFileUtil::EndsWithExtension(file, MgUnmanagedDataManager::Sid)
+        || MgFileUtil::EndsWithExtension(file, MgUnmanagedDataManager::Ecw)
+        || MgFileUtil::EndsWithExtension(file, MgUnmanagedDataManager::Bil);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Is valid odbc data file
+///
+bool MgUnmanagedDataManager::IsOdbcFile(CREFSTRING file)
+{
+    // TODO: other file types?
+    return MgFileUtil::EndsWithExtension(file, MgUnmanagedDataManager::Mdb);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Is valid unmanaged data file
+///
+bool MgUnmanagedDataManager::IsAnyValidFile(CREFSTRING file)
+{
+    return MgFileUtil::EndsWithExtension(file, MgUnmanagedDataManager::Sdf)
+        || MgFileUtil::EndsWithExtension(file, MgUnmanagedDataManager::Shp)
+        || MgFileUtil::EndsWithExtension(file, MgUnmanagedDataManager::Dwf)
+        || IsRasterFile(file)
+        || IsOdbcFile(file);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Surrounds name with square brackets
+///
+STRING MgUnmanagedDataManager::FormatMappingName(CREFSTRING name)
+{
+    return MgUnmanagedDataManager::OpenSquareBracket + name + MgUnmanagedDataManager::ClosedSquareBracket;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Appends a slash to non-empty string
+///
+STRING MgUnmanagedDataManager::FormatSubdir(CREFSTRING subdir)
+{
+    STRING result = subdir;
+    if (!result.empty())
+    {
+        MgFileUtil::AppendSlashToEndOfPath(result);
+    }
+    
+    return result;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Gets the pointer to a process-wide MgUnmanagedDataManager.
+///
+MgUnmanagedDataManager* MgUnmanagedDataManager::GetInstance()
+{
+    MG_TRY()
+
+    ACE_TRACE("MgUnmanagedDataManager::GetInstance");
+
+    if (MgUnmanagedDataManager::sm_unmanagedDataManager == NULL)
+    {
+        // Perform Double-Checked Locking Optimization.
+        ACE_MT(ACE_GUARD_RETURN(ACE_Recursive_Thread_Mutex, ace_mon, *ACE_Static_Object_Lock::instance(), NULL));
+
+        if (MgUnmanagedDataManager::sm_unmanagedDataManager == NULL)
+        {
+            MgUnmanagedDataManager::sm_unmanagedDataManager = new MgUnmanagedDataManager;
+        }
+    }
+
+    MG_CATCH_AND_THROW(L"MgUnmanagedDataManager.GetInstance")
+
+    // To avoid overheads and maintain thread safety,
+    // do not assign this returned static singleton to a Ptr object.
+    return MgUnmanagedDataManager::sm_unmanagedDataManager;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Returns string collection containing unmanaged data 
+///
+MgStringCollection* MgUnmanagedDataManager::EnumerateUnmanagedData(CREFSTRING mappingName, CREFSTRING dataTypeFilter, INT32 depth)
+{
+    Ptr<MgStringCollection> dataPaths = new MgStringCollection();
+
+    MG_TRY()
+
+    ACE_TRACE("MgUnmanagedDataManager::EnumerateUnmanagedData");
+
+    MgConfiguration* config = MgConfiguration::GetInstance();
+    Ptr<MgPropertyCollection> properties = config->GetProperties(MgConfigProperties::UnmanagedDataMappingsSection);
+
+    if (properties != NULL)
+    {
+        if (!IsValidDataTypeFilter(dataTypeFilter))
+        {
+            MgStringCollection arguments;
+            arguments.Add(L"1");
+            arguments.Add(dataTypeFilter);
+
+            throw new MgInvalidArgumentException(L"MgUnmanagedDataManager::EnumerateUnmanagedData",
+                __LINE__, __WFILE__, &arguments, L"", NULL);
+        }
+
+        // are we looking in a specific mapping?
+        if (!mappingName.empty())
+        {
+            STRING mappingDir = L"";
+
+            // check to make sure it's a valid mapping name
+            if (properties != NULL)
+            {
+                // cycle thru mappings until we have a match
+                for (int i = 0; i < properties->GetCount(); i++)
+                {
+                    Ptr<MgStringProperty> stringProp = (MgStringProperty*)properties->GetItem(i);
+                    if (mappingName.compare(stringProp->GetName()) == 0)
+                    {
+                        // we have a match!
+                        mappingDir = stringProp->GetValue();
+                        break;
+                    }
+                }
+            }
+
+            if (mappingDir.empty())
+            {
+                MgStringCollection arguments;
+                arguments.Add(L"1");
+                arguments.Add(mappingName);
+
+                throw new MgInvalidArgumentException(L"MgUnmanagedDataManager::EnumerateUnmanagedData",
+                    __LINE__, __WFILE__, &arguments, L"", NULL);
+            }
+            else
+            {
+                // get the files from that directory (recursive) --> use another method
+                dataPaths = new MgStringCollection();
+
+                if (ACE_OS::strcasecmp(dataTypeFilter.c_str(), MgUnmanagedDataManager::Folder.c_str()) == 0)
+                    GetDirectories(dataPaths, mappingName, mappingDir, L"", depth);
+                else
+                    GetFiles(dataPaths, mappingName, mappingDir, L"", dataTypeFilter, depth);
+            }
+        }
+        else
+        {
+            // getting files from all available mappings
+
+            // iterate thru mappings
+            for (int i = 0; i < properties->GetCount(); i++)
+            {
+                Ptr<MgStringProperty> stringProp = (MgStringProperty*)properties->GetItem(i);
+
+                STRING mapName = stringProp->GetName();
+                STRING mapDir = stringProp->GetValue();
+
+                if (ACE_OS::strcasecmp(dataTypeFilter.c_str(), MgUnmanagedDataManager::Folder.c_str()) == 0)
+                    GetDirectories(dataPaths, mapName, mapDir, L"", depth);
+                else
+                    GetFiles(dataPaths, mapName, mapDir, L"", dataTypeFilter, depth);
+            }
+        }
+    }
+    MG_CATCH_AND_THROW(L"MgUnmanagedDataManager.EnumerateUnmanagedData")
+
+    return dataPaths.Detach();
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Returns string collection containing unmanaged data mappings
+///
+MgStringCollection* MgUnmanagedDataManager::EnumerateUnmanagedDataMappings()
+{
+    Ptr<MgStringCollection> mappings = new MgStringCollection();
+
+    MgConfiguration* config = MgConfiguration::GetInstance();
+        
+    Ptr<MgPropertyCollection> properties = config->GetProperties(MgConfigProperties::UnmanagedDataMappingsSection);
+    if (properties != NULL)
+    {
+        for (int i = 0; i < properties->GetCount(); i++)
+        {
+            Ptr<MgStringProperty> stringProp = (MgStringProperty*)properties->GetItem(i);
+            STRING name = stringProp->GetName();
+            mappings->Add(name);
+        }
+    }
+
+    return mappings.Detach();
+}
+
+

Added: trunk/MgDev/Server/src/Common/Manager/UnmanagedDataManager.h
===================================================================
--- trunk/MgDev/Server/src/Common/Manager/UnmanagedDataManager.h	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/Server/src/Common/Manager/UnmanagedDataManager.h	2007-01-14 21:09:06 UTC (rev 1047)
@@ -0,0 +1,94 @@
+//
+//  Copyright (C) 2004-2006  Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef MGUNMANAGEDDATAMANAGER_H_
+#define MGUNMANAGEDDATAMANAGER_H_
+
+class MG_SERVER_MANAGER_API MgUnmanagedDataManager : public MgGuardDisposable
+{
+    DECLARE_CLASSNAME(MgUnmanagedDataManager)
+
+/// Constructors/Destructor
+
+public:
+
+    virtual ~MgUnmanagedDataManager();
+
+private:
+
+    // Unimplemented copy constructor and assignment operator.
+
+    MgUnmanagedDataManager();
+    MgUnmanagedDataManager(const MgUnmanagedDataManager&);
+    MgUnmanagedDataManager& operator=(const MgUnmanagedDataManager&);
+
+    void GetFiles(MgStringCollection* files, CREFSTRING mappingName, CREFSTRING rootdir, CREFSTRING subdir, CREFSTRING dataTypeFilter, INT32 depth);
+    void GetDirectories(MgStringCollection* dirs, CREFSTRING mappingName, CREFSTRING rootdir, CREFSTRING subdir, INT32 depth);
+
+    bool IsValidDataTypeFilter(CREFSTRING dataTypeFilter);
+    bool IsValidFileType(CREFSTRING file, CREFSTRING dataTypeFilter);
+
+    bool IsSdfFile(CREFSTRING file);
+    bool IsShpFile(CREFSTRING file);
+    bool IsDwfFile(CREFSTRING file);
+    bool IsRasterFile(CREFSTRING file);
+    bool IsOdbcFile(CREFSTRING file);
+    bool IsAnyValidFile(CREFSTRING file);
+
+    STRING FormatMappingName(CREFSTRING name);
+    STRING FormatSubdir(CREFSTRING subdir);
+
+/// Methods
+
+public:
+
+    static MgUnmanagedDataManager* GetInstance();
+    virtual void Dispose();
+
+    MgStringCollection* EnumerateUnmanagedData(CREFSTRING mappingName, CREFSTRING dataTypeFilter, INT32 depth);
+    MgStringCollection* EnumerateUnmanagedDataMappings();
+
+/// Data Members
+
+private:
+
+    static Ptr<MgUnmanagedDataManager> sm_unmanagedDataManager;
+
+    static const STRING Sdf;
+    static const STRING Shp;
+    static const STRING Dwf;
+    static const STRING Raster;
+    static const STRING Odbc;
+    static const STRING Folder;
+    static const STRING Jpg;
+    static const STRING Jpeg;
+    static const STRING Jpe;
+    static const STRING Png;
+    static const STRING Bmp;
+    static const STRING Cal;
+    static const STRING Tga;
+    static const STRING Tif;
+    static const STRING Tiff;
+    static const STRING Sid;
+    static const STRING Ecw;
+    static const STRING Bil;
+    static const STRING Mdb;
+    static const STRING OpenSquareBracket;
+    static const STRING ClosedSquareBracket;
+};
+
+#endif

Modified: trunk/MgDev/Server/src/Services/Resource/ApplicationRepositoryManager.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Resource/ApplicationRepositoryManager.cpp	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/Server/src/Services/Resource/ApplicationRepositoryManager.cpp	2007-01-14 21:09:06 UTC (rev 1047)
@@ -1468,3 +1468,42 @@
 
     MG_RESOURCE_SERVICE_CATCH_AND_THROW(L"MgApplicationRepositoryManager.CopyResourceData")
 }
+
+/*
+MgStringCollection* MgApplicationRepositoryManager::EnumerateUnmanagedData(
+    CREFSTRING mappingName, CREFSTRING dataTypeFilter, INT32 depth)
+{
+	// TODO:
+    //throw new MgNotImplementedException(L"MgResourceService.EnumerateUnmanagedData", __LINE__, __WFILE__, NULL, L"", NULL);
+    Ptr<MgStringCollection> dataPaths;
+
+	dataPaths = new MgStringCollection();
+	dataPaths->Add(L"Ueto Aya");
+	dataPaths->Add(L"Ito Misaki");
+
+
+    return dataPaths.Detach();
+}
+
+//////////////////////////////////////////////////////////////////
+/// \brief
+/// Enumerates the unmanaged data
+/// Resources of all types can be enumerated all at once, or only
+/// resources of a given type.
+///
+MgStringCollection* MgApplicationRepositoryManager::EnumerateUnmanagedDataMappings()
+{
+	// TODO:
+    //throw new MgNotImplementedException(L"MgResourceService.EnumerateUnmanagedDataMappings", __LINE__, __WFILE__, NULL, L"", NULL);
+
+    Ptr<MgStringCollection> mappings;
+
+	mappings = new MgStringCollection();
+	mappings->Add(L"Song Hye Gyo");
+	mappings->Add(L"Kim Tae Hee");
+	mappings->Add(L"Kim Sun Ah");
+
+
+    return mappings.Detach();
+}
+*/

Modified: trunk/MgDev/Server/src/Services/Resource/ApplicationRepositoryManager.h
===================================================================
--- trunk/MgDev/Server/src/Services/Resource/ApplicationRepositoryManager.h	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/Server/src/Services/Resource/ApplicationRepositoryManager.h	2007-01-14 21:09:06 UTC (rev 1047)
@@ -85,6 +85,12 @@
     MgByteReader* GetResourceData(MgResourceIdentifier* resource,
         CREFSTRING dataName, CREFSTRING preProcessTags);
 
+	// Unmanaged Data APIs
+
+//    virtual MgStringCollection* EnumerateUnmanagedData(CREFSTRING mappingName, 
+//		CREFSTRING dataTypeFilter, UINT32 depth);
+//    virtual MgStringCollection* EnumerateUnmanagedDataMappings();
+
     // Helper Methods
 
     void DeleteResourceData(CREFSTRING resourceTags, MgResourceIdentifier* resource);

Modified: trunk/MgDev/Server/src/Services/Resource/Makefile.am
===================================================================
--- trunk/MgDev/Server/src/Services/Resource/Makefile.am	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/Server/src/Services/Resource/Makefile.am	2007-01-14 21:09:06 UTC (rev 1047)
@@ -56,6 +56,8 @@
   OpEnumerateResourceData.cpp \
   OpEnumerateResourceReferences.cpp \
   OpEnumerateResources.cpp \
+  OpEnumerateUnmanagedData.cpp \
+  OpEnumerateUnmanagedDataMappings.cpp \
   OperationInfo.cpp \
   OperationParameter.cpp \
   OpGetRepositoryContent.cpp \
@@ -132,6 +134,8 @@
   OpEnumerateResourceData.h \
   OpEnumerateResourceReferences.h \
   OpEnumerateResources.h \
+  OpEnumerateUnmanagedData.h \
+  OpEnumerateUnmanagedDataMappings.h \
   OperationInfo.h \
   OperationParameter.h \
   OpGetRepositoryContent.h \

Added: trunk/MgDev/Server/src/Services/Resource/OpEnumerateUnmanagedData.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Resource/OpEnumerateUnmanagedData.cpp	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/Server/src/Services/Resource/OpEnumerateUnmanagedData.cpp	2007-01-14 21:09:06 UTC (rev 1047)
@@ -0,0 +1,124 @@
+//
+//  Copyright (C) 2004-2006  Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "ResourceServiceDefs.h"
+#include "OpEnumerateUnmanagedData.h"
+#include "ServerResourceService.h"
+#include "LogManager.h"
+
+///----------------------------------------------------------------------------
+/// <summary>
+/// Constructs the object.
+/// </summary>
+///----------------------------------------------------------------------------
+
+MgOpEnumerateUnmanagedData::MgOpEnumerateUnmanagedData()
+{
+}
+
+///----------------------------------------------------------------------------
+/// <summary>
+/// Destructs the object.
+/// </summary>
+///----------------------------------------------------------------------------
+
+MgOpEnumerateUnmanagedData::~MgOpEnumerateUnmanagedData()
+{
+}
+
+///----------------------------------------------------------------------------
+/// <summary>
+/// Executes the operation.
+/// </summary>
+///
+/// <exceptions>
+/// MgException
+/// </exceptions>
+///----------------------------------------------------------------------------
+
+void MgOpEnumerateUnmanagedData::Execute()
+{
+    ACE_DEBUG((LM_DEBUG, ACE_TEXT("  (%t) MgOpEnumerateUnmanagedData::Execute()\n")));
+    
+
+
+
+
+
+    MG_LOG_OPERATION_MESSAGE(L"EnumerateUnmanagedData");
+
+    MG_RESOURCE_SERVICE_TRY()
+
+    MG_LOG_OPERATION_MESSAGE_INIT(m_packet.m_OperationVersion, m_packet.m_NumArguments);
+
+    ACE_ASSERT(m_stream != NULL);
+
+    if (3 == m_packet.m_NumArguments)
+    {
+        STRING mappingName, dataTypeFilter;
+        INT32 depth;
+        m_stream->GetString(mappingName);
+        m_stream->GetString(dataTypeFilter);
+        m_stream->GetInt32(depth);
+
+        BeginExecution();
+
+        MG_LOG_OPERATION_MESSAGE_PARAMETERS_START();
+        MG_LOG_OPERATION_MESSAGE_ADD_STRING(mappingName.c_str());
+        MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+        MG_LOG_OPERATION_MESSAGE_ADD_STRING(dataTypeFilter.c_str());
+        MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+        MG_LOG_OPERATION_MESSAGE_ADD_INT32(depth);
+        MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
+        Validate();
+
+        Ptr<MgStringCollection> dataPaths =
+            m_service->EnumerateUnmanagedData(mappingName, dataTypeFilter, depth);
+        
+        EndExecution(dataPaths);
+    }
+    else
+    {
+        MG_LOG_OPERATION_MESSAGE_PARAMETERS_START();
+        MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+    }
+
+    if (!m_argsRead)
+    {
+        throw new MgOperationProcessingException(L"MgOpEnumerateUnmanagedData.Execute",
+            __LINE__, __WFILE__, NULL, L"", NULL);
+    }
+
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
+
+    MG_RESOURCE_SERVICE_CATCH(L"MgOpEnumerateUnmanagedData.Execute")
+
+    if (mgException != NULL)
+    {
+
+
+        // Failed operation
+        MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Failure.c_str());
+    }
+
+    // Add access log entry for operation
+    MG_LOG_OPERATION_MESSAGE_ACCESS_ENTRY();
+
+    MG_RESOURCE_SERVICE_THROW()
+}

Added: trunk/MgDev/Server/src/Services/Resource/OpEnumerateUnmanagedData.h
===================================================================
--- trunk/MgDev/Server/src/Services/Resource/OpEnumerateUnmanagedData.h	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/Server/src/Services/Resource/OpEnumerateUnmanagedData.h	2007-01-14 21:09:06 UTC (rev 1047)
@@ -0,0 +1,33 @@
+//
+//  Copyright (C) 2004-2006  Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef MGOPENUMERATEUNMANAGEDDATA_H
+#define MGOPENUMERATEUNMANAGEDDATA_H
+
+#include "ResourceOperation.h"
+
+class MgOpEnumerateUnmanagedData : public MgResourceOperation
+{
+public:
+
+    MgOpEnumerateUnmanagedData();
+    virtual ~MgOpEnumerateUnmanagedData();
+
+    virtual void Execute();
+};
+
+#endif

Added: trunk/MgDev/Server/src/Services/Resource/OpEnumerateUnmanagedDataMappings.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Resource/OpEnumerateUnmanagedDataMappings.cpp	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/Server/src/Services/Resource/OpEnumerateUnmanagedDataMappings.cpp	2007-01-14 21:09:06 UTC (rev 1047)
@@ -0,0 +1,112 @@
+//
+//  Copyright (C) 2004-2006  Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "ResourceServiceDefs.h"
+#include "OpEnumerateUnmanagedDataMappings.h"
+#include "ServerResourceService.h"
+#include "LogManager.h"
+
+///----------------------------------------------------------------------------
+/// <summary>
+/// Constructs the object.
+/// </summary>
+///----------------------------------------------------------------------------
+
+MgOpEnumerateUnmanagedDataMappings::MgOpEnumerateUnmanagedDataMappings()
+{
+}
+
+///----------------------------------------------------------------------------
+/// <summary>
+/// Destructs the object.
+/// </summary>
+///----------------------------------------------------------------------------
+
+MgOpEnumerateUnmanagedDataMappings::~MgOpEnumerateUnmanagedDataMappings()
+{
+}
+
+///----------------------------------------------------------------------------
+/// <summary>
+/// Executes the operation.
+/// </summary>
+///
+/// <exceptions>
+/// MgException
+/// </exceptions>
+///----------------------------------------------------------------------------
+
+void MgOpEnumerateUnmanagedDataMappings::Execute()
+{
+    ACE_DEBUG((LM_DEBUG, ACE_TEXT("  (%t) MgOpEnumerateUnmanagedDataMappings::Execute()\n")));
+    
+
+
+
+
+
+    MG_LOG_OPERATION_MESSAGE(L"EnumerateUnmanagedDataMappings");
+
+    MG_RESOURCE_SERVICE_TRY()
+
+    MG_LOG_OPERATION_MESSAGE_INIT(m_packet.m_OperationVersion, m_packet.m_NumArguments);
+
+    ACE_ASSERT(m_stream != NULL);
+
+    if (0 == m_packet.m_NumArguments)
+    {
+        BeginExecution();
+
+        MG_LOG_OPERATION_MESSAGE_PARAMETERS_START();
+        MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
+        Validate();
+
+        Ptr<MgStringCollection> mappings = m_service->EnumerateUnmanagedDataMappings();
+
+        EndExecution(mappings);
+    }
+    else
+    {
+        MG_LOG_OPERATION_MESSAGE_PARAMETERS_START();
+        MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+    }
+
+    if (!m_argsRead)
+    {
+        throw new MgOperationProcessingException(L"MgOpEnumerateUnmanagedDataMappings.Execute",
+            __LINE__, __WFILE__, NULL, L"", NULL);
+    }
+
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
+
+    MG_RESOURCE_SERVICE_CATCH(L"MgOpEnumerateUnmanagedDataMappings.Execute")
+
+    if (mgException != NULL)
+    {
+
+
+        // Failed operation
+        MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Failure.c_str());
+    }
+
+    // Add access log entry for operation
+    MG_LOG_OPERATION_MESSAGE_ACCESS_ENTRY();
+
+    MG_RESOURCE_SERVICE_THROW()
+}

Added: trunk/MgDev/Server/src/Services/Resource/OpEnumerateUnmanagedDataMappings.h
===================================================================
--- trunk/MgDev/Server/src/Services/Resource/OpEnumerateUnmanagedDataMappings.h	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/Server/src/Services/Resource/OpEnumerateUnmanagedDataMappings.h	2007-01-14 21:09:06 UTC (rev 1047)
@@ -0,0 +1,33 @@
+//
+//  Copyright (C) 2004-2006  Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef MGOPENUMERATEUNMANAGEDDATAMAPPINGS_H
+#define MGOPENUMERATEUNMANAGEDDATAMAPPINGS_H
+
+#include "ResourceOperation.h"
+
+class MgOpEnumerateUnmanagedDataMappings : public MgResourceOperation
+{
+public:
+
+    MgOpEnumerateUnmanagedDataMappings();
+    virtual ~MgOpEnumerateUnmanagedDataMappings();
+
+    virtual void Execute();
+};
+
+#endif

Modified: trunk/MgDev/Server/src/Services/Resource/OperationInfo.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Resource/OperationInfo.cpp	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/Server/src/Services/Resource/OperationInfo.cpp	2007-01-14 21:09:06 UTC (rev 1047)
@@ -46,6 +46,9 @@
 const STRING MgOperationName::RenameResourceData=L"RENAMERESOURCEDATA";
 const STRING MgOperationName::GetResourceData=L"GETRESOURCEDATA";
 
+const STRING MgOperationName::EnumerateUnmanagedData=L"ENUMERATEUNMANAGEDDATA";
+const STRING MgOperationName::EnumerateUnmanagedDataMappings=L"ENUMERATEUNMANAGEDDATAMAPPINGS";
+
 const STRING MgOperationInfo::sm_currentVersion = L"1.0.0";
 const MgOperationParameter MgOperationInfo::sm_blankParameter;
 

Modified: trunk/MgDev/Server/src/Services/Resource/OperationInfo.h
===================================================================
--- trunk/MgDev/Server/src/Services/Resource/OperationInfo.h	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/Server/src/Services/Resource/OperationInfo.h	2007-01-14 21:09:06 UTC (rev 1047)
@@ -50,6 +50,9 @@
     static const STRING DeleteResourceData;
     static const STRING RenameResourceData;
     static const STRING GetResourceData;
+
+    static const STRING EnumerateUnmanagedData;
+    static const STRING EnumerateUnmanagedDataMappings;
 };
 
 class MgOperationInfo

Modified: trunk/MgDev/Server/src/Services/Resource/ResourceOperationFactory.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Resource/ResourceOperationFactory.cpp	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/Server/src/Services/Resource/ResourceOperationFactory.cpp	2007-01-14 21:09:06 UTC (rev 1047)
@@ -44,6 +44,9 @@
 #include "OpDeleteResourceData.h"
 #include "OpRenameResourceData.h"
 #include "OpGetResourceData.h"
+// Unmanaged Data APIs
+#include "OpEnumerateUnmanagedData.h"
+#include "OpEnumerateUnmanagedDataMappings.h"
 
 ///----------------------------------------------------------------------------
 /// <summary>
@@ -382,6 +385,31 @@
         }
         break;
 
+    case MgResourceService::opIdEnumerateUnmanagedData:
+        switch (operationVersion)
+        {
+        case 1:
+            handler.reset(new MgOpEnumerateUnmanagedData());
+            break;
+        default:
+            throw new MgInvalidOperationVersionException(
+                L"MgResourceOperationFactory.GetOperation", __LINE__, __WFILE__, NULL, L"", NULL);
+        }
+        break;
+
+    case MgResourceService::opIdEnumerateUnmanagedDataMappings:
+        switch (operationVersion)
+        {
+        case 1:
+            handler.reset(new MgOpEnumerateUnmanagedDataMappings());
+            break;
+        default:
+            throw new MgInvalidOperationVersionException(
+                L"MgResourceOperationFactory.GetOperation", __LINE__, __WFILE__, NULL, L"", NULL);
+        }
+        break;
+
+
     default:
         throw new MgInvalidOperationException(
             L"MgResourceOperationFactory.GetOperation", __LINE__, __WFILE__, NULL, L"", NULL);

Modified: trunk/MgDev/Server/src/Services/Resource/ServerResourceService.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Resource/ServerResourceService.cpp	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/Server/src/Services/Resource/ServerResourceService.cpp	2007-01-14 21:09:06 UTC (rev 1047)
@@ -25,6 +25,7 @@
 #include "SessionRepositoryManager.h"
 #include "SiteRepositoryManager.h"
 #include "SiteResourceContentManager.h"
+#include "UnmanagedDataManager.h"
 
 const int MgServerResourceService::sm_maxOpRetries = 3;
 
@@ -1796,6 +1797,60 @@
     return roles.Detach();
 }
 
+///----------------------------------------------------------------------------
+/// <summary>
+/// Gets a list of unmanaged data paths
+/// </summary>
+///
+/// <returns>
+/// Result containing the appropriate list of data paths.
+/// </returns>
+///
+///----------------------------------------------------------------------------
+
+MgStringCollection* MgServerResourceService::EnumerateUnmanagedData(
+	CREFSTRING mappingName, CREFSTRING dataTypeFilter, INT32 depth)
+{
+    Ptr<MgStringCollection> dataPaths;
+
+    MG_RESOURCE_SERVICE_TRY()
+
+    MG_LOG_TRACE_ENTRY(L"MgServerResourceService::EnumerateUnmanagedData()");
+
+    dataPaths = MgUnmanagedDataManager::GetInstance()->EnumerateUnmanagedData(mappingName, dataTypeFilter, depth);
+
+    MG_RESOURCE_SERVICE_CATCH_AND_THROW(L"MgServerResourceService.EnumerateUnmanagedData")
+
+    return dataPaths.Detach();
+}
+
+///----------------------------------------------------------------------------
+/// <summary>
+/// Gets a list of unmanaged data mappings
+/// </summary>
+///
+/// <returns>
+/// Result containing the list of data mappings.
+/// </returns>
+///
+///----------------------------------------------------------------------------
+
+MgStringCollection* MgServerResourceService::EnumerateUnmanagedDataMappings()
+{
+    Ptr<MgStringCollection> mappings;
+
+    MG_RESOURCE_SERVICE_TRY()
+
+    MG_LOG_TRACE_ENTRY(L"MgServerResourceService::EnumerateUnmanagedDataMappings()");
+
+    mappings = MgUnmanagedDataManager::GetInstance()->EnumerateUnmanagedDataMappings();
+
+    MG_RESOURCE_SERVICE_CATCH_AND_THROW(L"MgServerResourceService.EnumerateUnmanagedDataMappings")
+
+    return mappings.Detach();
+}
+
+
 ///////////////////////////////////////////////////////////////////////////////////
 /// <summary>
 /// Grants the specified roles to the specified users.

Modified: trunk/MgDev/Server/src/Services/Resource/ServerResourceService.h
===================================================================
--- trunk/MgDev/Server/src/Services/Resource/ServerResourceService.h	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/Server/src/Services/Resource/ServerResourceService.h	2007-01-14 21:09:06 UTC (rev 1047)
@@ -144,6 +144,11 @@
 
     MgStringCollection* EnumerateRoles(CREFSTRING user, CREFSTRING group);
 
+	// Unmanaged Data APIs
+
+    virtual MgStringCollection* EnumerateUnmanagedData(CREFSTRING mappingName, CREFSTRING dataTypeFilter, INT32 depth);
+    virtual MgStringCollection* EnumerateUnmanagedDataMappings();
+
     // Site Security related methods
 
     MgSecurityCache* CreateSecurityCache();

Modified: trunk/MgDev/Server/src/Services/Resource/ServerResourceService.vcproj
===================================================================
--- trunk/MgDev/Server/src/Services/Resource/ServerResourceService.vcproj	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/Server/src/Services/Resource/ServerResourceService.vcproj	2007-01-14 21:09:06 UTC (rev 1047)
@@ -476,6 +476,38 @@
 				>
 			</File>
 			<File
+				RelativePath=".\OpEnumerateUnmanagedData.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\OpEnumerateUnmanagedData.h"
+				>
+			</File>
+			<File
+				RelativePath=".\OpEnumerateUnmanagedDataMappings.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\OpEnumerateUnmanagedDataMappings.h"
+				>
+			</File>
+			<File
 				RelativePath=".\OperationInfo.cpp"
 				>
 				<FileConfiguration

Modified: trunk/MgDev/Server/src/Services/Resource/ServerResourceServiceBuild.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Resource/ServerResourceServiceBuild.cpp	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/Server/src/Services/Resource/ServerResourceServiceBuild.cpp	2007-01-14 21:09:06 UTC (rev 1047)
@@ -54,6 +54,8 @@
 #include "OpSetResource.cpp"
 #include "OpSetResourceData.cpp"
 #include "OpUpdateRepository.cpp"
+#include "OpEnumerateUnmanagedData.cpp"
+#include "OpEnumerateUnmanagedDataMappings.cpp"
 #include "Repository.cpp"
 #include "RepositoryManager.cpp"
 #include "ResourceContainer.cpp"

Modified: trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/resourceserviceapi.html
===================================================================
--- trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/resourceserviceapi.html	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/UnitTest/WebTier/MapAgent/MapAgentForms/resourceserviceapi.html	2007-01-14 21:09:06 UTC (rev 1047)
@@ -28,6 +28,9 @@
 <li><a href="applyresourcepackageform.html" target="showform">ApplyResourcePackage</a>
 <li><a href="changeresourceownerform.html" target="showform">ChangeResourceOwner</a>
 <li><a href="inheritpermissionsfromform.html" target="showform">InheritPermissionsFrom</a>
+<p>
+<li><a href="enumerateunmanageddatamappingsform.html" target="showform">EnumerateUnmanagedDataMappings</a>
+<li><a href="enumerateunmanageddataform.html" target="showform">EnumerateUnmanagedData</a>
 </ul>
 </body>
 </html>

Added: trunk/MgDev/Web/src/HttpHandler/HttpEnumerateUnmanagedData.cpp
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/HttpEnumerateUnmanagedData.cpp	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/Web/src/HttpHandler/HttpEnumerateUnmanagedData.cpp	2007-01-14 21:09:06 UTC (rev 1047)
@@ -0,0 +1,76 @@
+//
+//  Copyright (C) 2004-2006  Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "HttpHandler.h"
+#include "HttpEnumerateUnmanagedData.h"
+
+HTTP_IMPLEMENT_CREATE_OBJECT(MgHttpEnumerateUnmanagedData)
+
+/// <summary>
+/// Initializes the common parameters and parameters specific to this request.
+/// </summary>
+/// <param name="name">Input
+/// MgHttpRequest
+/// This contains all the parameters of the request.
+/// </param>
+/// <returns>
+/// nothing
+/// </returns>
+MgHttpEnumerateUnmanagedData::MgHttpEnumerateUnmanagedData(MgHttpRequest *hRequest)
+{
+    InitializeCommonParameters(hRequest);
+
+    Ptr<MgHttpRequestParam> hrParam = m_hRequest->GetRequestParam();
+
+    // Get mapping name
+    m_mappingName = hrParam->GetParameterValue(MgHttpResourceStrings::reqMappingName);
+
+    // Get data type filter
+    m_dataTypeFilter = hrParam->GetParameterValue(MgHttpResourceStrings::reqDataTypeFilter);
+
+	// Get depth and convert to integer
+    string depth_str = MgUtil::WideCharToMultiByte(hrParam->GetParameterValue(MgHttpResourceStrings::reqDepth));
+    m_depth = atoi(depth_str.c_str());
+}
+
+/// <summary>
+/// Executes the specific request.
+/// </summary>
+/// <returns>
+/// MgHttpResponse
+/// This contains the response (including MgHttpResult and StatusCode) from the server.
+/// </returns>
+void MgHttpEnumerateUnmanagedData::Execute(MgHttpResponse& hResponse)
+{
+    Ptr<MgHttpResult> hResult;
+
+    MG_HTTP_HANDLER_TRY()
+
+    hResult = hResponse.GetResult();
+
+    // Check common parameters
+    ValidateCommonParameters();
+
+    // Create ProxyResourceService instance
+    Ptr<MgResourceService> mgprService = (MgResourceService*)(CreateService(MgServiceType::ResourceService));
+
+    // call the C++ API
+    Ptr<MgStringCollection> dataPaths = mgprService->EnumerateUnmanagedData(m_mappingName, m_dataTypeFilter, m_depth);
+    hResult->SetResultObject(dataPaths, MgMimeType::Xml);
+
+    MG_HTTP_HANDLER_CATCH_AND_THROW_EX(L"MgHttpEnumerateUnmanagedData.Execute")
+}

Added: trunk/MgDev/Web/src/HttpHandler/HttpEnumerateUnmanagedData.h
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/HttpEnumerateUnmanagedData.h	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/Web/src/HttpHandler/HttpEnumerateUnmanagedData.h	2007-01-14 21:09:06 UTC (rev 1047)
@@ -0,0 +1,52 @@
+//
+//  Copyright (C) 2004-2006  Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _RS_ENUMERATE_UNMANAGED_DATA_H
+#define _RS_ENUMERATE_UNMANAGED_DATA_H
+
+class MgHttpEnumerateUnmanagedData : public MgHttpRequestResponseHandler
+{
+HTTP_DECLARE_CREATE_OBJECT()
+
+public:
+    /// <summary>
+    /// Initializes the common parameters of the request.
+    /// </summary>
+    /// <param name="name">Input
+    /// MgHttpRequest
+    /// This contains all the parameters of the request.
+    /// </param>
+    /// <returns>
+    /// nothing
+    /// </returns>
+    MgHttpEnumerateUnmanagedData(MgHttpRequest *hRequest);
+
+    /// <summary>
+    /// Executes the specific request.
+    /// </summary>
+    /// <param name="hResponse">Input
+    /// This contains the response (including MgHttpResult and StatusCode) from the server.
+    /// </param>
+    void Execute(MgHttpResponse& hResponse);
+
+private:
+    STRING m_mappingName;
+    STRING m_dataTypeFilter;
+    INT32 m_depth;
+};
+
+#endif

Added: trunk/MgDev/Web/src/HttpHandler/HttpEnumerateUnmanagedDataMappings.cpp
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/HttpEnumerateUnmanagedDataMappings.cpp	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/Web/src/HttpHandler/HttpEnumerateUnmanagedDataMappings.cpp	2007-01-14 21:09:06 UTC (rev 1047)
@@ -0,0 +1,64 @@
+//
+//  Copyright (C) 2004-2006  Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "HttpHandler.h"
+#include "HttpEnumerateUnmanagedDataMappings.h"
+
+HTTP_IMPLEMENT_CREATE_OBJECT(MgHttpEnumerateUnmanagedDataMappings)
+
+/// <summary>
+/// Initializes the common parameters and parameters specific to this request.
+/// </summary>
+/// <param name="name">Input
+/// MgHttpRequest
+/// This contains all the parameters of the request.
+/// </param>
+/// <returns>
+/// nothing
+/// </returns>
+MgHttpEnumerateUnmanagedDataMappings::MgHttpEnumerateUnmanagedDataMappings(MgHttpRequest *hRequest)
+{
+    InitializeCommonParameters(hRequest);
+}
+
+/// <summary>
+/// Executes the specific request.
+/// </summary>
+/// <returns>
+/// MgHttpResponse
+/// This contains the response (including MgHttpResult and StatusCode) from the server.
+/// </returns>
+void MgHttpEnumerateUnmanagedDataMappings::Execute(MgHttpResponse& hResponse)
+{
+    Ptr<MgHttpResult> hResult;
+
+    MG_HTTP_HANDLER_TRY()
+
+    hResult = hResponse.GetResult();
+
+    // Check common parameters
+    ValidateCommonParameters();
+
+    // Create ProxyResourceService instance
+    Ptr<MgResourceService> mgprService = (MgResourceService*)(CreateService(MgServiceType::ResourceService));
+
+    // call the C++ API
+    Ptr<MgStringCollection> mappings = mgprService->EnumerateUnmanagedDataMappings();
+    hResult->SetResultObject(mappings, MgMimeType::Xml);
+
+    MG_HTTP_HANDLER_CATCH_AND_THROW_EX(L"MgHttpEnumerateUnmanagedDataMappings.Execute")
+}

Added: trunk/MgDev/Web/src/HttpHandler/HttpEnumerateUnmanagedDataMappings.h
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/HttpEnumerateUnmanagedDataMappings.h	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/Web/src/HttpHandler/HttpEnumerateUnmanagedDataMappings.h	2007-01-14 21:09:06 UTC (rev 1047)
@@ -0,0 +1,47 @@
+//
+//  Copyright (C) 2004-2006  Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _RS_ENUMERATE_UNMANAGED_DATA_MAPPINGS_H
+#define _RS_ENUMERATE_UNMANAGED_DATA_MAPPINGS_H
+
+class MgHttpEnumerateUnmanagedDataMappings : public MgHttpRequestResponseHandler
+{
+HTTP_DECLARE_CREATE_OBJECT()
+
+public:
+    /// <summary>
+    /// Initializes the common parameters of the request.
+    /// </summary>
+    /// <param name="name">Input
+    /// MgHttpRequest
+    /// This contains all the parameters of the request.
+    /// </param>
+    /// <returns>
+    /// nothing
+    /// </returns>
+    MgHttpEnumerateUnmanagedDataMappings(MgHttpRequest *hRequest);
+
+    /// <summary>
+    /// Executes the specific request.
+    /// </summary>
+    /// <param name="hResponse">Input
+    /// This contains the response (including MgHttpResult and StatusCode) from the server.
+    /// </param>
+    void Execute(MgHttpResponse& hResponse);
+};
+
+#endif

Modified: trunk/MgDev/Web/src/HttpHandler/HttpHandler.vcproj
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/HttpHandler.vcproj	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/Web/src/HttpHandler/HttpHandler.vcproj	2007-01-14 21:09:06 UTC (rev 1047)
@@ -450,6 +450,46 @@
 				>
 			</File>
 			<File
+				RelativePath=".\HttpEnumerateUnmanagedData.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\HttpEnumerateUnmanagedData.h"
+				>
+			</File>
+			<File
+				RelativePath=".\HttpEnumerateUnmanagedDataMappings.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\HttpEnumerateUnmanagedDataMappings.h"
+				>
+			</File>
+			<File
 				RelativePath=".\HttpGetRepositoryContent.cpp"
 				>
 				<FileConfiguration

Modified: trunk/MgDev/Web/src/HttpHandler/HttpHandlerBuild.cpp
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/HttpHandlerBuild.cpp	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/Web/src/HttpHandler/HttpHandlerBuild.cpp	2007-01-14 21:09:06 UTC (rev 1047)
@@ -112,6 +112,8 @@
 #include "HttpKmlGetMap.cpp"
 #include "HttpKmlGetLayer.cpp"
 #include "HttpKmlGetFeatures.cpp"
+#include "HttpEnumerateUnmanagedData.cpp"
+#include "HttpEnumerateUnmanagedDataMappings.cpp"
 #include "WmsMapUtil.cpp"
 
 

Modified: trunk/MgDev/Web/src/HttpHandler/HttpRequest.cpp
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/HttpRequest.cpp	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/Web/src/HttpHandler/HttpRequest.cpp	2007-01-14 21:09:06 UTC (rev 1047)
@@ -37,6 +37,8 @@
 #include "HttpGetResourceData.h"
 #include "HttpEnumerateUsers.h"
 #include "HttpEnumerateGroups.h"
+#include "HttpEnumerateUnmanagedData.h"
+#include "HttpEnumerateUnmanagedDataMappings.h"
 
 // Http Drawing Service operations
 #include "HttpGetDrawing.h"
@@ -383,6 +385,8 @@
     httpClassCreators[MgHttpResourceStrings::opCsEnumerateCoordinateSystems] = MgHttpCsEnumerateCoordinateSystems::CreateObject;
     httpClassCreators[MgHttpResourceStrings::opCsGetBaseLibrary] = MgHttpCsGetBaseLibrary::CreateObject;
     httpClassCreators[MgHttpResourceStrings::opCsIsValid] = MgHttpCsIsValid::CreateObject;
+    httpClassCreators[MgHttpResourceStrings::opEnumerateUnmanagedData] = MgHttpEnumerateUnmanagedData::CreateObject;
+    httpClassCreators[MgHttpResourceStrings::opEnumerateUnmanagedDataMappings] = MgHttpEnumerateUnmanagedDataMappings::CreateObject;
 
     httpPostHandlerCreators.push_back(MgHttpWfsGetCapabilities::ProcessPostRequest);
     httpPostHandlerCreators.push_back(MgHttpWfsDescribeFeatureType::ProcessPostRequest);

Modified: trunk/MgDev/Web/src/HttpHandler/HttpResourceStrings.cpp
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/HttpResourceStrings.cpp	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/Web/src/HttpHandler/HttpResourceStrings.cpp	2007-01-14 21:09:06 UTC (rev 1047)
@@ -98,6 +98,8 @@
 const STRING MgHttpResourceStrings::reqPackage = L"PACKAGE";
 const STRING MgHttpResourceStrings::reqOwner = L"OWNER";
 const STRING MgHttpResourceStrings::reqIncludeDescendants = L"INCLUDEDESCENDANTS";
+const STRING MgHttpResourceStrings::reqMappingName = L"MAPPINGNAME";
+const STRING MgHttpResourceStrings::reqDataTypeFilter = L"DATATYPEFILTER";
 
 // Resource Service Operation Requests
 const STRING MgHttpResourceStrings::opEnumerateRepositories = L"ENUMERATEREPOSITORIES";
@@ -125,6 +127,9 @@
 const STRING MgHttpResourceStrings::opRenameResourceData = L"RENAMERESOURCEDATA";
 const STRING MgHttpResourceStrings::opGetResourceData = L"GETRESOURCEDATA";
 
+const STRING MgHttpResourceStrings::opEnumerateUnmanagedData = L"ENUMERATEUNMANAGEDDATA";
+const STRING MgHttpResourceStrings::opEnumerateUnmanagedDataMappings = L"ENUMERATEUNMANAGEDDATAMAPPINGS";
+
 // Predefined Feature Service Request Parameters
 const STRING MgHttpResourceStrings::reqFeatProperty = L"PROPERTY";
 const STRING MgHttpResourceStrings::reqFeatConnectionString = L"CONNECTIONSTRING";

Modified: trunk/MgDev/Web/src/HttpHandler/HttpResourceStrings.h
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/HttpResourceStrings.h	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/Web/src/HttpHandler/HttpResourceStrings.h	2007-01-14 21:09:06 UTC (rev 1047)
@@ -102,6 +102,8 @@
     static const STRING reqPackage;
     static const STRING reqOwner;
     static const STRING reqIncludeDescendants;
+    static const STRING reqMappingName;
+    static const STRING reqDataTypeFilter;
 
     // PREDEFINED FEATURE REQUEST PARAMETERS
     static const STRING reqFeatProperty;
@@ -237,6 +239,9 @@
     static const STRING opRenameResourceData;
     static const STRING opGetResourceData;
 
+    static const STRING opEnumerateUnmanagedData;
+    static const STRING opEnumerateUnmanagedDataMappings;
+
     // Feature services
     static const STRING opGetFeatureProviders;
     static const STRING opGetConnectionPropertyValues;

Modified: trunk/MgDev/Web/src/HttpHandler/Makefile.am
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/Makefile.am	2007-01-12 23:33:56 UTC (rev 1046)
+++ trunk/MgDev/Web/src/HttpHandler/Makefile.am	2007-01-14 21:09:06 UTC (rev 1047)
@@ -44,6 +44,8 @@
   HttpEnumerateResourceData.cpp \
   HttpEnumerateResourceReferences.cpp \
   HttpEnumerateResources.cpp \
+  HttpEnumerateUnmanagedData.cpp \
+  HttpEnumerateUnmanagedDataMappings.cpp \
   HttpEnumerateUsers.cpp \
   HttpExecuteSqlQuery.cpp \
   HttpGetCapabilities.cpp \
@@ -156,6 +158,8 @@
   HttpEnumerateResourceData.h \
   HttpEnumerateResourceReferences.h \
   HttpEnumerateResources.h \
+  HttpEnumerateUnmanagedData.h \
+  HttpEnumerateUnmanagedDataMappings.h \
   HttpEnumerateUsers.h \
   HttpExecuteSqlQuery.h \
   HttpGetCapabilities.h \



More information about the mapguide-commits mailing list