[mapguide-commits] r5217 - in sandbox/maestro-3.0: Maestro Maestro.Base Maestro.ResourceValidation

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Wed Sep 29 22:04:22 EDT 2010


Author: jng
Date: 2010-09-30 02:04:22 +0000 (Thu, 30 Sep 2010)
New Revision: 5217

Added:
   sandbox/maestro-3.0/Maestro.ResourceValidation/PrintLayoutValidator.cs
   sandbox/maestro-3.0/Maestro.ResourceValidation/SymbolDefinitionValidator.cs
   sandbox/maestro-3.0/Maestro.ResourceValidation/SymbolLibraryValidator.cs
Modified:
   sandbox/maestro-3.0/Maestro.Base/
   sandbox/maestro-3.0/Maestro.ResourceValidation/Maestro.ResourceValidation.csproj
   sandbox/maestro-3.0/Maestro.ResourceValidation/ResourceValidatorLoader.cs
   sandbox/maestro-3.0/Maestro/
Log:
Add stub validators for other resource types.


Property changes on: sandbox/maestro-3.0/Maestro
___________________________________________________________________
Modified: svn:ignore
   - Maestro.suo
obj
*.user

   + Maestro.suo
obj
*.user
*.cache



Property changes on: sandbox/maestro-3.0/Maestro.Base
___________________________________________________________________
Modified: svn:ignore
   - obj

   + obj
*.user


Modified: sandbox/maestro-3.0/Maestro.ResourceValidation/Maestro.ResourceValidation.csproj
===================================================================
--- sandbox/maestro-3.0/Maestro.ResourceValidation/Maestro.ResourceValidation.csproj	2010-09-29 16:08:47 UTC (rev 5216)
+++ sandbox/maestro-3.0/Maestro.ResourceValidation/Maestro.ResourceValidation.csproj	2010-09-30 02:04:22 UTC (rev 5217)
@@ -41,6 +41,7 @@
     <Compile Include="LayerDefinitionValidator.cs" />
     <Compile Include="LoadProcedureValidator.cs" />
     <Compile Include="MapDefinitionValidator.cs" />
+    <Compile Include="PrintLayoutValidator.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Properties\Resources.Designer.cs">
       <AutoGen>True</AutoGen>
@@ -48,6 +49,8 @@
       <DependentUpon>Resources.resx</DependentUpon>
     </Compile>
     <Compile Include="ResourceValidatorLoader.cs" />
+    <Compile Include="SymbolDefinitionValidator.cs" />
+    <Compile Include="SymbolLibraryValidator.cs" />
     <Compile Include="WebLayoutValidator.cs" />
   </ItemGroup>
   <ItemGroup>

Added: sandbox/maestro-3.0/Maestro.ResourceValidation/PrintLayoutValidator.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.ResourceValidation/PrintLayoutValidator.cs	                        (rev 0)
+++ sandbox/maestro-3.0/Maestro.ResourceValidation/PrintLayoutValidator.cs	2010-09-30 02:04:22 UTC (rev 5217)
@@ -0,0 +1,46 @@
+#region Disclaimer / License
+// Copyright (C) 2010, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// 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 Street, Fifth Floor, Boston, MA  02110-1301  USA
+// 
+#endregion
+using System;
+using System.Collections.Generic;
+using System.Text;
+using OSGeo.MapGuide.MaestroAPI.Resource;
+using OSGeo.MapGuide.MaestroAPI;
+using OSGeo.MapGuide.ObjectModels.PrintLayout;
+
+namespace Maestro.ResourceValidation
+{
+    public class PrintLayoutValidator : IResourceValidator
+    {
+        public ResourceTypeDescriptor SupportedResourceAndVersion
+        {
+            get { return ResourceTypeDescriptor.PrintLayout; }
+        }
+
+        public ValidationIssue[] Validate(IResource resource, bool recurse)
+        {
+            if (resource.ResourceType != ResourceTypes.PrintLayout)
+                return null;
+
+            //TODO: What problems could there possibly be?
+
+            return new ValidationIssue[0];
+        }
+    }
+}

Modified: sandbox/maestro-3.0/Maestro.ResourceValidation/ResourceValidatorLoader.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.ResourceValidation/ResourceValidatorLoader.cs	2010-09-29 16:08:47 UTC (rev 5216)
+++ sandbox/maestro-3.0/Maestro.ResourceValidation/ResourceValidatorLoader.cs	2010-09-30 02:04:22 UTC (rev 5217)
@@ -42,6 +42,9 @@
             ResourceValidatorSet.RegisterValidator(new WebLayoutValidator());
             ResourceValidatorSet.RegisterValidator(new ApplicationDefinitionValidator());
             ResourceValidatorSet.RegisterValidator(new LoadProcedureValidator());
+            ResourceValidatorSet.RegisterValidator(new SymbolDefinitionValidator());
+            ResourceValidatorSet.RegisterValidator(new SymbolLibraryValidator());
+            ResourceValidatorSet.RegisterValidator(new PrintLayoutValidator());
 
             m_initialized = true;
         }

Added: sandbox/maestro-3.0/Maestro.ResourceValidation/SymbolDefinitionValidator.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.ResourceValidation/SymbolDefinitionValidator.cs	                        (rev 0)
+++ sandbox/maestro-3.0/Maestro.ResourceValidation/SymbolDefinitionValidator.cs	2010-09-30 02:04:22 UTC (rev 5217)
@@ -0,0 +1,45 @@
+#region Disclaimer / License
+// Copyright (C) 2010, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// 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 Street, Fifth Floor, Boston, MA  02110-1301  USA
+// 
+#endregion
+using System;
+using System.Collections.Generic;
+using System.Text;
+using OSGeo.MapGuide.MaestroAPI.Resource;
+using OSGeo.MapGuide.MaestroAPI;
+
+namespace Maestro.ResourceValidation
+{
+    public class SymbolDefinitionValidator : IResourceValidator
+    {
+        public ResourceTypeDescriptor SupportedResourceAndVersion
+        {
+            get { return ResourceTypeDescriptor.SymbolDefinition; }
+        }
+
+        public ValidationIssue[] Validate(IResource resource, bool recurse)
+        {
+            if (resource.ResourceType != ResourceTypes.SymbolDefinition)
+                return null;
+
+            //TODO: What problems could there possibly be?
+
+            return new ValidationIssue[0];
+        }
+    }
+}

Added: sandbox/maestro-3.0/Maestro.ResourceValidation/SymbolLibraryValidator.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.ResourceValidation/SymbolLibraryValidator.cs	                        (rev 0)
+++ sandbox/maestro-3.0/Maestro.ResourceValidation/SymbolLibraryValidator.cs	2010-09-30 02:04:22 UTC (rev 5217)
@@ -0,0 +1,45 @@
+#region Disclaimer / License
+// Copyright (C) 2010, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// 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 Street, Fifth Floor, Boston, MA  02110-1301  USA
+// 
+#endregion
+using System;
+using System.Collections.Generic;
+using System.Text;
+using OSGeo.MapGuide.MaestroAPI.Resource;
+using OSGeo.MapGuide.MaestroAPI;
+
+namespace Maestro.ResourceValidation
+{
+    public class SymbolLibraryValidator : IResourceValidator
+    {
+        public ResourceTypeDescriptor SupportedResourceAndVersion
+        {
+            get { return ResourceTypeDescriptor.SymbolLibrary; }
+        }
+
+        public ValidationIssue[] Validate(IResource resource, bool recurse)
+        {
+            if (resource.ResourceType != ResourceTypes.SymbolLibrary)
+                return null;
+
+            //TODO: What problems could there possibly be?
+
+            return new ValidationIssue[0];
+        }
+    }
+}



More information about the mapguide-commits mailing list