diff --git a/build/Build.bat b/build/Build.bat
index e6ba87af00..25cf8ba4c5 100644
--- a/build/Build.bat
+++ b/build/Build.bat
@@ -1,5 +1,5 @@
@ECHO OFF
-set version=4.11.7
+set version=4.11.8
%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe "Build.proj" /p:BUILD_RELEASE=%version%
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\App_Code\dummy.txt
diff --git a/build/Build.proj b/build/Build.proj
index 70f38d9368..0a0342bec6 100644
--- a/build/Build.proj
+++ b/build/Build.proj
@@ -172,7 +172,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/build/NuSpecs/UmbracoCms.Core.nuspec b/build/NuSpecs/UmbracoCms.Core.nuspec
index 68329aa06c..819119bdb1 100644
--- a/build/NuSpecs/UmbracoCms.Core.nuspec
+++ b/build/NuSpecs/UmbracoCms.Core.nuspec
@@ -51,7 +51,6 @@
-
diff --git a/src/Umbraco.Core/Configuration/GlobalSettings.cs b/src/Umbraco.Core/Configuration/GlobalSettings.cs
index 07af7b3916..2280289242 100644
--- a/src/Umbraco.Core/Configuration/GlobalSettings.cs
+++ b/src/Umbraco.Core/Configuration/GlobalSettings.cs
@@ -28,7 +28,7 @@ namespace Umbraco.Core.Configuration
#region Private static fields
// CURRENT UMBRACO VERSION ID
- private const string CurrentUmbracoVersion = "4.11.7";
+ private const string CurrentUmbracoVersion = "4.11.8";
private static readonly object Locker = new object();
//make this volatile so that we can ensure thread safety with a double check lock
diff --git a/src/Umbraco.Core/Properties/AssemblyInfo.cs b/src/Umbraco.Core/Properties/AssemblyInfo.cs
index bb4871ad7f..6446f1221f 100644
--- a/src/Umbraco.Core/Properties/AssemblyInfo.cs
+++ b/src/Umbraco.Core/Properties/AssemblyInfo.cs
@@ -29,7 +29,6 @@ using System.Runtime.InteropServices;
[assembly: InternalsVisibleTo("umbraco.MacroEngines")]
[assembly: InternalsVisibleTo("umbraco.editorControls")]
-[assembly: InternalsVisibleTo("umbraco.webservices")]
[assembly: InternalsVisibleTo("Umbraco.Tests")]
[assembly: InternalsVisibleTo("Umbraco.Core")]
diff --git a/src/Umbraco.Core/TypeFinder.cs b/src/Umbraco.Core/TypeFinder.cs
index 5178cce95d..d87f22b7cc 100644
--- a/src/Umbraco.Core/TypeFinder.cs
+++ b/src/Umbraco.Core/TypeFinder.cs
@@ -237,7 +237,6 @@ namespace Umbraco.Core
"umbraco.interfaces,",
"umbraco.providers,",
"Umbraco.Web.UI,",
- "umbraco.webservices",
"Lucene.",
"Examine,",
"Examine."
diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
index 22d4393e0c..55fb49c302 100644
--- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
+++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
@@ -252,10 +252,6 @@
{511F6D8D-7717-440A-9A57-A507E9A8B27F}
{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
-
- {CBDB56AC-FF02-4421-9FD4-ED82E339D8E2}
- umbraco.webservices
-
{651E1350-91B6-44B7-BD60-7207006D7003}
Umbraco.Web
@@ -509,13 +505,6 @@
-
-
-
-
-
-
-
diff --git a/src/Umbraco.Web.UI/umbraco/webservices/api/DocumentService.asmx b/src/Umbraco.Web.UI/umbraco/webservices/api/DocumentService.asmx
deleted file mode 100644
index c10ccdeaa6..0000000000
--- a/src/Umbraco.Web.UI/umbraco/webservices/api/DocumentService.asmx
+++ /dev/null
@@ -1 +0,0 @@
-<%@ WebService Language="C#" CodeBehind="DocumentService.asmx.cs" Class="umbraco.webservices.documents.documentService" %>
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/umbraco/webservices/api/FileService.asmx b/src/Umbraco.Web.UI/umbraco/webservices/api/FileService.asmx
deleted file mode 100644
index e8a68ff354..0000000000
--- a/src/Umbraco.Web.UI/umbraco/webservices/api/FileService.asmx
+++ /dev/null
@@ -1 +0,0 @@
-<%@ WebService Language="C#" CodeBehind="FileService.asmx.cs" Class="umbraco.webservices.files.fileService" %>
diff --git a/src/Umbraco.Web.UI/umbraco/webservices/api/MaintanceService.asmx b/src/Umbraco.Web.UI/umbraco/webservices/api/MaintanceService.asmx
deleted file mode 100644
index fc9f8aba21..0000000000
--- a/src/Umbraco.Web.UI/umbraco/webservices/api/MaintanceService.asmx
+++ /dev/null
@@ -1 +0,0 @@
-<%@ WebService Language="C#" CodeBehind="MaintanceService.asmx.cs" Class="umbraco.webservices.maintenance.maintenanceService" %>
diff --git a/src/Umbraco.Web.UI/umbraco/webservices/api/MediaService.asmx b/src/Umbraco.Web.UI/umbraco/webservices/api/MediaService.asmx
deleted file mode 100644
index cfaded1cb1..0000000000
--- a/src/Umbraco.Web.UI/umbraco/webservices/api/MediaService.asmx
+++ /dev/null
@@ -1 +0,0 @@
-<%@ WebService Language="C#" CodeBehind="MediaService.asmx.cs" Class="umbraco.webservices.media.mediaService" %>
diff --git a/src/Umbraco.Web.UI/umbraco/webservices/api/MemberService.asmx b/src/Umbraco.Web.UI/umbraco/webservices/api/MemberService.asmx
deleted file mode 100644
index f65beb00c6..0000000000
--- a/src/Umbraco.Web.UI/umbraco/webservices/api/MemberService.asmx
+++ /dev/null
@@ -1 +0,0 @@
-<%@ WebService Language="C#" CodeBehind="MemberService.asmx.cs" Class="umbraco.webservices.members.memberService" %>
diff --git a/src/Umbraco.Web.UI/umbraco/webservices/api/StylesheetService.asmx b/src/Umbraco.Web.UI/umbraco/webservices/api/StylesheetService.asmx
deleted file mode 100644
index 4d98082f6c..0000000000
--- a/src/Umbraco.Web.UI/umbraco/webservices/api/StylesheetService.asmx
+++ /dev/null
@@ -1 +0,0 @@
-<%@ WebService Language="C#" CodeBehind="StylesheetService.asmx.cs" Class="umbraco.webservices.stylesheets.stylesheetService" %>
diff --git a/src/Umbraco.Web.UI/umbraco/webservices/api/TemplateService.asmx b/src/Umbraco.Web.UI/umbraco/webservices/api/TemplateService.asmx
deleted file mode 100644
index 8af78e62dd..0000000000
--- a/src/Umbraco.Web.UI/umbraco/webservices/api/TemplateService.asmx
+++ /dev/null
@@ -1 +0,0 @@
-<%@ WebService Language="C#" CodeBehind="TemplateService.asmx.cs" Class="umbraco.webservices.templates.templateService" %>
diff --git a/src/Umbraco.Web/Properties/AssemblyInfo.cs b/src/Umbraco.Web/Properties/AssemblyInfo.cs
index 03623505f9..138deb7329 100644
--- a/src/Umbraco.Web/Properties/AssemblyInfo.cs
+++ b/src/Umbraco.Web/Properties/AssemblyInfo.cs
@@ -29,5 +29,4 @@ using System.Security;
[assembly: InternalsVisibleTo("Umbraco.Tests")]
[assembly: InternalsVisibleTo("umbraco.MacroEngines")]
-[assembly: InternalsVisibleTo("umbraco.webservices")]
[assembly: InternalsVisibleTo("Umbraco.Web.UI")]
diff --git a/src/umbraco.sln b/src/umbraco.sln
index d7e72cbebd..224b714f68 100644
--- a/src/umbraco.sln
+++ b/src/umbraco.sln
@@ -34,8 +34,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "umbraco.datalayer", "umbrac
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "umbraco.controls", "umbraco.controls\umbraco.controls.csproj", "{6EDD2061-82F2-461B-BB6E-879245A832DE}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "umbraco.webservices", "umbraco.webservices\umbraco.webservices.csproj", "{CBDB56AC-FF02-4421-9FD4-ED82E339D8E2}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SqlCE4Umbraco", "SQLCE4Umbraco\SqlCE4Umbraco.csproj", "{5BA5425F-27A7-4677-865E-82246498AA2E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "umbraco.MacroEngines", "umbraco.MacroEngines\umbraco.MacroEngines.csproj", "{89C09045-1064-466B-B94A-DB3AFE2A5853}"
diff --git a/src/umbraco.webservices/BaseWebService.cs b/src/umbraco.webservices/BaseWebService.cs
deleted file mode 100644
index 7e8132c5cf..0000000000
--- a/src/umbraco.webservices/BaseWebService.cs
+++ /dev/null
@@ -1,194 +0,0 @@
-using System;
-using System.Data;
-using System.Configuration;
-using System.Web;
-using System.Web.Security;
-using System.Web.UI;
-using System.Web.UI.WebControls;
-using System.Web.UI.WebControls.WebParts;
-using System.Web.UI.HtmlControls;
-using System.Web.Services;
-using System.Web.Services.Protocols;
-using umbraco.BusinessLogic;
-using System.IO;
-
-namespace umbraco.webservices
-{
- ///
- /// The base-class all webservices should inherit from
- ///
- ///
- /// This class contains all basic methods for authenticating requests. Do not implement these functions yourself.
- ///
- public abstract class BaseWebService : System.Web.Services.WebService
- {
- public abstract Services Service
- {
- get;
- }
-
- ///
- /// Enum of services available
- ///
- public enum Services
- {
- DocumentService,
- FileService,
- StylesheetService,
- MemberService,
- MaintenanceService,
- TemplateService,
- MediaService
- };
-
-
- ///
- /// Gets the umbraco-user from username and password
- ///
- public umbraco.BusinessLogic.User GetUser(string username, string password)
- {
-
- User u = new User(username);
- if(!HttpContext.Current.Request.Url.Scheme.Equals("https"))
- BusinessLogic.Log.Add(BusinessLogic.LogTypes.Debug, u, -1, "Webservices login attempted without https");
-
- try
- {
- if (Membership.Providers[UmbracoSettings.DefaultBackofficeProvider].ValidateUser(username, password))
- {
- BusinessLogic.Log.Add(BusinessLogic.LogTypes.Login, u, -1,"Webservices");
- return u;
- }
- }
- catch
- {
-
- }
- return null;
- }
-
-
-
-
- ///
- /// Standart user-validation. All services must perform this
- ///
- public void Authenticate(string username, string password)
- {
- if (!WebservicesEnabled()) throw new Exception("Webservices not enabled");
- if (!UserAuthenticates(username, password)) throw new Exception("The user does not authenticate");
- if (!UserHasAccess(username)) throw new Exception("The user (" + username + ") does not have access to this service");
- }
-
- [WebMethod]
- public bool WebservicesEnabled()
- {
- return umbraco.UmbracoSettings.Webservices.Enabled;
- }
-
- [WebMethod]
- public bool UserAuthenticates(string username, string password)
- {
- if (!WebservicesEnabled()) throw new Exception("Webservices not enabled");
- return GetUser(username, password) != null;
- }
-
- ///
- /// Checks if a user has access to a specific webservice
- ///
- [WebMethod]
- public bool UserHasAccess(string username)
- {
- switch (Service)
- {
- case Services.DocumentService:
- return -1 < Array.IndexOf(umbraco.UmbracoSettings.Webservices.documentServiceUsers, username);
- case Services.FileService:
- return -1 < Array.IndexOf(umbraco.UmbracoSettings.Webservices.fileServiceUsers, username);
- case Services.StylesheetService:
- return -1 < Array.IndexOf(umbraco.UmbracoSettings.Webservices.stylesheetServiceUsers, username);
- case Services.MemberService:
- return -1 < Array.IndexOf(umbraco.UmbracoSettings.Webservices.memberServiceUsers, username);
- case Services.MaintenanceService:
- return -1 < Array.IndexOf(umbraco.UmbracoSettings.Webservices.maintenanceServiceUsers, username);
- case Services.TemplateService:
- return -1 < Array.IndexOf(umbraco.UmbracoSettings.Webservices.templateServiceUsers, username);
- case Services.MediaService:
- return -1 < Array.IndexOf(umbraco.UmbracoSettings.Webservices.mediaServiceUsers, username);
- default:
- return false;
- }
- }
-
-
-
- public class FileIO
- {
- ///
- /// Validates a filename. Must be used when user inputs a filename
- ///
- public static bool ValidFileName(string fileName)
- {
- // Check if a "levelup" string is included, so they dont move out of the folder
- // Dont know if its necesary?
- if (fileName.IndexOf("..") > -1)
- return false;
- return true;
- }
-
- ///
- /// Checks if user has access to a specific folder
- ///
- public static bool FolderAccess(String folderName)
- {
- // Check if the folder is in "fileServiceFolders"
- if (Array.IndexOf(umbraco.UmbracoSettings.Webservices.fileServiceFolders, folderName) > -1)
- {
- return true;
- }
- else
- {
- return false;
- }
- }
-
- ///
- /// Gets the webservers path for a file
- ///
- public static string GetFilePath(string folderName, string fileName)
- {
- string FullPath = GetFolderPath(folderName) + fileName;
- return FullPath;
- }
-
- ///
- /// Gets the webservers path for a folder
- ///
- public static string GetFolderPath(string folderName)
- {
- if (string.IsNullOrEmpty(folderName))
- {
- return AppRoot;
- }
- else
- {
- return AppRoot + folderName + @"\";
- }
- }
-
- ///
- /// Gets the webservers path for the application
- ///
- public static string AppRoot
- {
- get
- {
- return System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath;
- }
- }
-
- }
-
- }
-
-}
diff --git a/src/umbraco.webservices/Common.cs b/src/umbraco.webservices/Common.cs
deleted file mode 100644
index cdd51f6762..0000000000
--- a/src/umbraco.webservices/Common.cs
+++ /dev/null
@@ -1,108 +0,0 @@
-//using System;
-//using System.Data;
-//using System.Configuration;
-//using System.Web;
-//using System.Web.Security;
-//using System.Web.UI;
-//using System.Web.UI.WebControls;
-//using System.Web.UI.WebControls.WebParts;
-//using System.Web.UI.HtmlControls;
-//using System.Xml.Serialization;
-//using System.Xml;
-
-//namespace umbraco.webservices
-//{
-// public class authentication
-// {
-
-
-// ///
-// /// Standart user-validation. All services must perform this
-// ///
-// ///
-// ///
-// ///
-// /// First checks if the webservices are enabled. Then checks if the user is valid
-// /// (username and password). Finally it checks if the user has access to the specific service
-// ///
-// public static void StandartRequestCheck(string username, string password, authentication.EService service)
-// {
-// // We check if services are enabled and user has access
-// if (!umbraco.UmbracoSettings.Webservices.Enabled)
-// throw new Exception("webservices not enabled");
-
-// // Validating the user
-// GetUser(username, password);
-
-// // Checking if user can use that specific service
-// if (!authentication.UserHasAccess(username, service))
-// throw new Exception("user has not access to this service");
-// }
-
-// ///
-// /// Gets the umbraco-user from username and password
-// ///
-// ///
-// ///
-// ///
-// public static umbraco.BusinessLogic.User GetUser(string username, string password)
-// {
-// umbraco.BusinessLogic.User user;
-// try
-// {
-// user = new umbraco.BusinessLogic.User(username, password);
-
-// if (user == null)
-// throw new Exception("Incorrect credentials. No user found. Call aborted");
-// }
-// catch (Exception ex)
-// {
-// throw new Exception("Incorrect credentials. Call aborted (error: " + ex.Message + Environment.NewLine + Environment.NewLine + ex.StackTrace + ")");
-// }
-// return user;
-// }
-
-
-// ///
-// /// List of accesible the services
-// ///
-// public enum EService
-// {
-// DocumentService,
-// FileService,
-// StylesheetService,
-// MemberService,
-// MaintenanceService,
-// TemplateService
-// };
-
-// ///
-// /// Checks if a user has access to a specific webservice
-// ///
-// /// user to check
-// /// the webservice to check for
-// /// true, if user has access otherwise false
-// public static bool UserHasAccess(string username, EService service)
-// {
-// switch (service)
-// {
-// case EService.DocumentService:
-// return -1 < Array.IndexOf(umbraco.UmbracoSettings.Webservices.documentServiceUsers, username);
-// case EService.FileService:
-// return -1 < Array.IndexOf(umbraco.UmbracoSettings.Webservices.fileServiceUsers, username);
-// case EService.StylesheetService:
-// return -1 < Array.IndexOf(umbraco.UmbracoSettings.Webservices.stylesheetServiceUsers, username);
-// case EService.MemberService :
-// return -1 < Array.IndexOf(umbraco.UmbracoSettings.Webservices.memberServiceUsers, username);
-// case EService.MaintenanceService:
-// return -1 < Array.IndexOf(umbraco.UmbracoSettings.Webservices.maintenanceServiceUsers, username);
-// case EService.TemplateService :
-// return -1 < Array.IndexOf(umbraco.UmbracoSettings.Webservices.templateServiceUsers, username);
-// default:
-// return false;
-// }
-// }
-
-
-// }
-//}
diff --git a/src/umbraco.webservices/Properties/AssemblyInfo.cs b/src/umbraco.webservices/Properties/AssemblyInfo.cs
deleted file mode 100644
index 2dbcc08e7a..0000000000
--- a/src/umbraco.webservices/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("umbraco.webservices")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyProduct("umbraco.webservices")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("58e13174-1338-40a8-b864-f47c7678a976")]
diff --git a/src/umbraco.webservices/documents/documentCarrier.cs b/src/umbraco.webservices/documents/documentCarrier.cs
deleted file mode 100644
index 29774c056d..0000000000
--- a/src/umbraco.webservices/documents/documentCarrier.cs
+++ /dev/null
@@ -1,105 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Xml.Serialization;
-
-namespace umbraco.webservices.documents
-{
- [Serializable]
- [XmlType(Namespace = "http://umbraco.org/webservices/")]
- public class documentCarrier
- {
-
- public enum EPublishAction
- {
- Ignore,
- Publish,
- Unpublish
- };
-
- public enum EPublishStatus
- {
- Published,
- NotPublished
- };
-
- public documentCarrier()
- {
- DocumentProperties = new List();
- }
-
- private int id;
- private string name;
- private List documentProperties;
- private int documentTypeID;
- private int parentID;
- private bool hasChildren;
-
- private EPublishAction publishAction;
- private bool published;
- private DateTime releaseDate;
- private DateTime expireDate;
-
- public int Id
- {
- get { return id; }
- set { id = value; }
- }
-
- public string Name
- {
- get { return name; }
- set { name = value; }
- }
-
- public List DocumentProperties
- {
- get { return documentProperties; }
- set { documentProperties = value; }
- }
-
- public int DocumentTypeID
- {
- get { return documentTypeID; }
- set { documentTypeID = value; }
- }
-
- public int ParentID
- {
- get { return parentID; }
- set { parentID = value; }
- }
-
- public bool HasChildren
- {
- get { return hasChildren; }
- set { hasChildren = value; }
- }
-
- public EPublishAction PublishAction
- {
- get { return publishAction; }
- set { publishAction = value; }
- }
-
- public bool Published
- {
- get { return published; }
- set { published = value; }
- }
-
- public DateTime ReleaseDate
- {
- get { return releaseDate; }
- set { releaseDate = value; }
- }
-
- public DateTime ExpireDate
- {
- get { return expireDate; }
- set { expireDate = value; }
- }
-
-
-
- }
-}
\ No newline at end of file
diff --git a/src/umbraco.webservices/documents/documentProperty.cs b/src/umbraco.webservices/documents/documentProperty.cs
deleted file mode 100644
index be2d8d7d78..0000000000
--- a/src/umbraco.webservices/documents/documentProperty.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-using System;
-using System.Xml.Serialization;
-
-namespace umbraco.webservices.documents
-{
- [Serializable]
- [XmlType(Namespace = "http://umbraco.org/webservices/")]
- public class documentProperty
- {
- private string key;
- private object propertyValue;
-
- public documentProperty()
- {
- }
-
- public object PropertyValue
- {
- get { return propertyValue; }
- set { propertyValue = value; }
- }
-
- public string Key
- {
- get { return key; }
- set { key = value; }
- }
- }
-}
\ No newline at end of file
diff --git a/src/umbraco.webservices/documents/documentService.cs b/src/umbraco.webservices/documents/documentService.cs
deleted file mode 100644
index cea5a61d7e..0000000000
--- a/src/umbraco.webservices/documents/documentService.cs
+++ /dev/null
@@ -1,318 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Linq;
-using System.Text;
-using System.Web.Services;
-using umbraco.cms.businesslogic.web;
-
-namespace umbraco.webservices.documents
-{
-
- ///
- /// Service managing documents in umbraco
- ///
- [WebService(Namespace = "http://umbraco.org/webservices/")]
- [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
- [ToolboxItem(false)]
- public class documentService : BaseWebService
- {
-
- override public Services Service
- {
- get
- {
- return Services.DocumentService;
- }
- }
-
- [WebMethod]
- public int create(documentCarrier carrier, string username, string password)
- {
- Authenticate(username, password);
-
- // Some validation
- if (carrier == null) throw new Exception("No carrier specified");
- if (carrier.ParentID == 0) throw new Exception("Document needs a parent");
- if (carrier.DocumentTypeID == 0) throw new Exception("Documenttype must be specified");
- if (carrier.Id != 0) throw new Exception("ID cannot be specifed when creating. Must be 0");
- if (carrier.Name == null || carrier.Name.Length == 0) carrier.Name = "unnamed";
-
- umbraco.BusinessLogic.User user = GetUser(username, password);
-
- // We get the documenttype
- umbraco.cms.businesslogic.web.DocumentType docType = new umbraco.cms.businesslogic.web.DocumentType(carrier.DocumentTypeID);
- if (docType == null) throw new Exception("DocumenttypeID " + carrier.DocumentTypeID + " not found");
-
- // We create the document
- Document newDoc = Document.MakeNew(carrier.Name, docType, user, carrier.ParentID);
- newDoc.ReleaseDate = carrier.ReleaseDate;
- newDoc.ExpireDate = carrier.ExpireDate;
-
- // We iterate the properties in the carrier
- if (carrier.DocumentProperties != null)
- {
- foreach (documentProperty updatedproperty in carrier.DocumentProperties)
- {
- umbraco.cms.businesslogic.property.Property property = newDoc.getProperty(updatedproperty.Key);
- if (property == null) throw new Exception("property " + updatedproperty.Key + " was not found");
- property.Value = updatedproperty.PropertyValue;
- }
- }
-
- // We check the publishaction and do the appropiate
- handlePublishing(newDoc, carrier, user);
-
- // We return the ID of the document..65
- return newDoc.Id;
- }
-
- [WebMethod]
- public documentCarrier read(int id, string username, string password)
- {
- Authenticate(username, password);
-
- umbraco.cms.businesslogic.web.Document doc = null;
-
- try
- {
- doc = new umbraco.cms.businesslogic.web.Document(id);
- }
- catch
- { }
-
- if (doc == null)
- throw new Exception("Could not load Document with ID: " + id);
-
- documentCarrier carrier = createCarrier(doc);
- return carrier;
- }
-
- [WebMethod]
- public documentCarrier ReadPublished(int id, string username, string password)
- {
- Authenticate(username, password);
-
- var doc = new Document(id, true);
-
- var publishedDoc = doc.GetPublishedVersion();
-
- doc = publishedDoc == null ? new Document(id) : new Document(id, publishedDoc.Version);
-
- if (doc == null)
- throw new Exception("Could not load Document with ID: " + id);
-
- return createCarrier(doc);
- }
-
- [WebMethod]
- public List readList(int parentid, string username, string password)
- {
- Authenticate(username, password);
-
- umbraco.cms.businesslogic.web.Document[] docList;
- umbraco.cms.businesslogic.web.Document doc = null;
- List carriers = new List();
-
- if (parentid == 0)
- {
- docList = Document.GetRootDocuments();
- }
- else
- {
- try
- {
- doc = new umbraco.cms.businesslogic.web.Document(parentid);
- }
- catch
- { }
-
- if (doc == null)
- throw new Exception("Parent document with ID " + parentid + " not found");
-
- try
- {
- if (!doc.HasChildren)
- return carriers;
-
- docList = doc.Children;
- }
- catch (Exception exception)
- {
- throw new Exception("Could not load children: " + exception.Message);
- }
- }
-
- // Loop the nodes in docList
- foreach (Document childdoc in docList)
- {
- carriers.Add(createCarrier(childdoc));
- }
- return carriers;
- }
-
-
- [WebMethod]
- public void update(documentCarrier carrier, string username, string password)
- {
- Authenticate(username, password);
-
- if (carrier.Id == 0) throw new Exception("ID must be specifed when updating");
- if (carrier == null) throw new Exception("No carrier specified");
-
- umbraco.BusinessLogic.User user = GetUser(username, password);
-
- Document doc = null;
- try
- {
- doc = new Document(carrier.Id);
- }
- catch { }
- if (doc == null)
-
-
-
- // We assign the new values:
- doc.ReleaseDate = carrier.ReleaseDate;
- doc.ExpireDate = carrier.ExpireDate;
- if (carrier.ParentID != 0)
- {
- doc.Move(carrier.ParentID);
- }
-
- if (carrier.Name.Length != 0)
- {
- doc.Text = carrier.Name;
- }
-
- // We iterate the properties in the carrier
- if (carrier.DocumentProperties != null)
- {
- foreach (documentProperty updatedproperty in carrier.DocumentProperties)
- {
- umbraco.cms.businesslogic.property.Property property = doc.getProperty(updatedproperty.Key);
-
- if (property == null)
- {
- }
- else
- {
- property.Value = updatedproperty.PropertyValue;
- }
- }
- }
- handlePublishing(doc, carrier, user);
- }
-
-
- [WebMethod]
- public void delete(int id, string username, string password)
- {
- Authenticate(username, password);
-
- // Some validation, to prevent deletion of system-documents.. (nessecary?)
- if (id < 0)
- {
- throw new Exception("Cannot delete documents with id lower than 1");
- }
-
- // We load the document
- Document doc = null;
- try
- {
- doc = new Document(id);
- }
- catch
- { }
-
- if (doc == null)
- throw new Exception("Document not found");
-
- try
- {
- doc.delete();
- }
- catch (Exception ex)
- {
- throw new Exception("Document could not be deleted" + ex.Message);
- }
- }
-
-
- private void handlePublishing(Document doc, documentCarrier carrier, umbraco.BusinessLogic.User user)
- {
- switch (carrier.PublishAction)
- {
- case documentCarrier.EPublishAction.Publish:
- if (doc.PublishWithResult(user))
- {
- umbraco.library.UpdateDocumentCache(doc);
- }
- break;
- case documentCarrier.EPublishAction.Unpublish:
- if (doc.PublishWithResult(user))
- {
- umbraco.library.UnPublishSingleNode(doc);
- }
- break;
- case documentCarrier.EPublishAction.Ignore:
- if (doc.Published)
- {
- if (doc.PublishWithResult(user))
- {
- umbraco.library.UpdateDocumentCache(doc);
- }
- }
- else
- {
- if (doc.PublishWithResult(user))
- {
- umbraco.library.UpdateDocumentCache(doc);
- }
- }
- break;
- }
- }
-
-
- private documentCarrier createCarrier(Document doc)
- {
- documentCarrier carrier = new documentCarrier();
- carrier.ExpireDate = doc.ExpireDate;
- carrier.ReleaseDate = doc.ReleaseDate;
- carrier.Id = doc.Id;
- carrier.Name = doc.Text;
-
- try
- {
- carrier.ParentID = doc.Parent.Id;
- }
- catch
- {
- }
-
- carrier.Published = doc.Published;
- carrier.HasChildren = doc.HasChildren;
- var props = doc.getProperties;
- foreach (umbraco.cms.businesslogic.property.Property prop in props)
- {
- documentProperty carrierprop = new documentProperty();
-
- if (prop.Value == System.DBNull.Value)
- {
- carrierprop.PropertyValue = null;
- }
- else
- {
- carrierprop.PropertyValue = prop.Value;
- }
-
- carrierprop.Key = prop.PropertyType.Alias;
- carrier.DocumentProperties.Add(carrierprop);
- }
- return carrier;
-
- }
-
- }
-}
diff --git a/src/umbraco.webservices/files/fileService.cs b/src/umbraco.webservices/files/fileService.cs
deleted file mode 100644
index 179a9db993..0000000000
--- a/src/umbraco.webservices/files/fileService.cs
+++ /dev/null
@@ -1,190 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.IO;
-using System.Web.Services;
-
-namespace umbraco.webservices.files
-{
- ///
- /// Summary description for FileService
- ///
- [WebService(Namespace = "http://umbraco.org/webservices/")]
- [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
- [ToolboxItem(false)]
- public class fileService : BaseWebService
- {
-
- override public Services Service
- {
- get
- {
- return Services.FileService;
- }
- }
-
- [WebMethod]
- public void DeleteFile(String folderName, string fileName, string username, string password)
- {
-
- Authenticate(username, password);
-
- // Check if folder is accessible
- if (FileIO.FolderAccess(folderName))
- {
- // Check if the filename is valid
- if (!FileIO.ValidFileName(fileName))
- throw new ArgumentException(String.Format("Filename {0} not valid", fileName));
-
- // Check if the file exists. If it does, we delete it
- if (System.IO.File.Exists(FileIO.GetFilePath(folderName, fileName)))
- {
- System.IO.File.Delete(FileIO.GetFilePath(folderName, fileName));
- }
- else
- {
- throw new FileNotFoundException();
- }
- }
- else
- {
- throw new ArgumentException("no access to specified folder");
- }
- }
- [WebMethod]
- public Byte[] DownloadFile(String folderName, string fileName, string username, string password)
- {
-
- Authenticate(username, password);
-
- // Check if folder is accessible
- if (FileIO.FolderAccess(folderName))
- {
- // Check if the filename is valid
- if (!FileIO.ValidFileName(fileName))
- throw new ArgumentException(String.Format("Filename {0} not valid", fileName));
-
- // Check if the file even exists
- if (!System.IO.File.Exists(FileIO.GetFilePath(folderName, fileName)))
- {
- throw new FileNotFoundException("Could not find file to delete");
- }
-
- // Create a stream, and send it to the client
- FileStream objfilestream = new FileStream(FileIO.GetFilePath(folderName, fileName), FileMode.Open, FileAccess.Read);
- int len = (int)objfilestream.Length;
- Byte[] documentcontents = new Byte[len];
- objfilestream.Read(documentcontents, 0, len);
- objfilestream.Close();
- return documentcontents;
- }
- else
- {
- throw new ArgumentException("no access to specified folder");
- }
- }
-
- [WebMethod]
- public void UploadFile(Byte[] docbinaryarray, String folderName, string fileName, string username, string password, bool deleteOld)
- {
- Authenticate(username, password);
-
- // Check if folder is accessible
- if (FileIO.FolderAccess(folderName))
- {
- // Check if the filename is valid
- if (FileIO.ValidFileName(fileName))
- throw new ArgumentException(String.Format("Filename {0} not valid", fileName));
-
- // Check if the file exists. If it does, we delete it first ..
- // TODO: Maybe we should have "deleted files, folder for this?
- if (System.IO.File.Exists(FileIO.GetFilePath(folderName, fileName)))
- {
- if (deleteOld)
- {
- System.IO.File.Delete(FileIO.GetFilePath(folderName, fileName));
- }
- else
- {
- throw new ArgumentException("Cannot save. File allready exist");
- }
- }
-
- // Open a filestream, and write the data from the client to it
- FileStream objfilestream = new FileStream(FileIO.GetFilePath(folderName, fileName), FileMode.Create, FileAccess.ReadWrite);
- objfilestream.Write(docbinaryarray, 0, docbinaryarray.Length);
- objfilestream.Close();
- }
- else
- {
- throw new ArgumentException("no access to specified folder");
- }
- }
-
-
- ///
- /// To download a file, we need to know how big its going to be
- ///
- [WebMethod]
- public int GetFileSize(String folderName, string fileName, string username, string password)
- {
- Authenticate(username, password);
-
- // Check if folder is accessible
- if (FileIO.FolderAccess(folderName))
- {
-
- // Check if the filename is valid
- if (!FileIO.ValidFileName(fileName))
- throw new ArgumentException(String.Format("Filename {0} not valid", fileName));
-
- string strdocPath;
- strdocPath = FileIO.GetFilePath(folderName, fileName);
-
- // Load file into stream
- FileStream objfilestream = new FileStream(strdocPath, FileMode.Open, FileAccess.Read);
-
- // Find and return the lenght of the stream
- int len = (int)objfilestream.Length;
- objfilestream.Close();
- return len;
- }
- else
- {
- throw new ArgumentException("no access to specified folder");
- }
- }
-
-
- ///
- /// Get all files in a specific folder
- ///
- ///
- [WebMethod]
- public string[] GetFilesList(String folderName, string username, string password)
- {
- Authenticate(username, password);
-
- if (FileIO.FolderAccess(folderName))
- {
- string fullPath = FileIO.GetFolderPath(folderName);
-
- DirectoryInfo folder = new DirectoryInfo(fullPath);
- FileInfo[] files = folder.GetFiles();
- List shortNames = new List();
-
- foreach (FileInfo file in files)
- {
- shortNames.Add(file.Name);
- }
- return shortNames.ToArray();
-
- }
- else
- {
- throw new ArgumentException("no access to specified folder");
- }
- }
-
- }
-}
\ No newline at end of file
diff --git a/src/umbraco.webservices/maintenance/maintenanceService.cs b/src/umbraco.webservices/maintenance/maintenanceService.cs
deleted file mode 100644
index fd620b9e12..0000000000
--- a/src/umbraco.webservices/maintenance/maintenanceService.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-using System;
-using System.ComponentModel;
-using System.Web.Services;
-
-namespace umbraco.webservices.maintenance
-{
- [WebService(Namespace = "http://umbraco.org/webservices/")]
- [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
- [ToolboxItem(false)]
- public class maintenanceService : BaseWebService
- {
- override public Services Service
- {
- get
- {
- return Services.MaintenanceService;
- }
- }
-
- [WebMethod]
- public string getWebservicesVersion(string username, string password)
- {
- // We check if services are enabled and user has access
- Authenticate(username, password);
-
- var thisVersion = new Version(0, 10);
- return Convert.ToString(thisVersion);
- }
-
- [WebMethod]
- public void restartApplication(string username, string password)
- {
- // We check if services are enabled and user has access
- Authenticate(username, password);
-
- System.Web.HttpRuntime.UnloadAppDomain();
- }
- }
-}
\ No newline at end of file
diff --git a/src/umbraco.webservices/media/mediaCarrier.cs b/src/umbraco.webservices/media/mediaCarrier.cs
deleted file mode 100644
index 89750e1aa6..0000000000
--- a/src/umbraco.webservices/media/mediaCarrier.cs
+++ /dev/null
@@ -1,84 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Xml.Serialization;
-
-namespace umbraco.webservices.media
-{
- [Serializable]
- [XmlType(Namespace = "http://umbraco.org/webservices/")]
- public class mediaCarrier
- {
-
- public int Id
- {
- get;
- set;
- }
- public string Text
- {
- get;
- set;
-
- }
-
- public string TypeAlias
- {
- get;
- set;
- }
-
- public int TypeId
- {
- get;
- set;
- }
-
- public DateTime CreateDateTime
- {
- get;
- set;
- }
-
- public Boolean HasChildren
- {
- get;
- set;
- }
-
- public int Level
- {
- get;
- set;
- }
-
- public int ParentId
- {
- get;
- set;
-
- }
-
- public string Path
- {
- get;
- set;
- }
-
- public int SortOrder
- {
- get;
- set;
- }
-
- public List MediaProperties
- {
- get;
- set;
- }
-
- public mediaCarrier()
- {
- MediaProperties = new List();
- }
- }
-}
\ No newline at end of file
diff --git a/src/umbraco.webservices/media/mediaProperty.cs b/src/umbraco.webservices/media/mediaProperty.cs
deleted file mode 100644
index 3e3fe85947..0000000000
--- a/src/umbraco.webservices/media/mediaProperty.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System.Xml.Serialization;
-
-namespace umbraco.webservices.media
-{
- [XmlType(Namespace = "http://umbraco.org/webservices/")]
- public class mediaProperty
- {
- public mediaProperty()
- {
- }
-
- public object PropertyValue
- {
- get;
- set;
- }
-
- public string Key
- {
- get;
- set;
- }
- }
-}
\ No newline at end of file
diff --git a/src/umbraco.webservices/media/mediaService.cs b/src/umbraco.webservices/media/mediaService.cs
deleted file mode 100644
index 1d62141bf5..0000000000
--- a/src/umbraco.webservices/media/mediaService.cs
+++ /dev/null
@@ -1,304 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.IO;
-using System.Reflection;
-using System.Web.Services;
-using Umbraco.Core.Media;
-using umbraco.IO;
-using umbraco.cms.businesslogic.media;
-using umbraco.cms.businesslogic.property;
-using Umbraco.Core.IO;
-using System.Xml;
-using System.Web;
-using System.Text.RegularExpressions;
-using System.Linq;
-using System.Web.Script.Services;
-
-namespace umbraco.webservices.media
-{
- [WebService(Namespace = "http://umbraco.org/webservices/")]
- [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
- [ToolboxItem(false)]
- [ScriptService]
- public class mediaService : BaseWebService
- {
- internal MediaFileSystem _fs;
-
- public mediaService()
- {
- _fs = FileSystemProviderManager.Current.GetFileSystemProvider();
- }
-
- override public Services Service
- {
- get
- {
- return Services.MediaService;
- }
- }
-
- [WebMethod]
- public void update(mediaCarrier carrier, string username, string password)
- {
-
- Authenticate(username, password);
-
- if (carrier == null) throw new Exception("No carrier specified");
-
- Media m = new Media(carrier.Id);
-
- if (carrier.MediaProperties != null)
- {
- foreach (mediaProperty updatedproperty in carrier.MediaProperties)
- {
- if (!(updatedproperty.Key.ToLower().Equals("umbracofile")))
- {
- Property property = m.getProperty(updatedproperty.Key);
- if (property == null)
- throw new Exception("property " + updatedproperty.Key + " was not found");
- property.Value = updatedproperty.PropertyValue;
- }
- }
- }
-
- m.Save();
- }
-
- [WebMethod]
- public int create(mediaCarrier carrier, string username, string password)
- {
-
- Authenticate(username, password);
-
- if (carrier == null) throw new Exception("No carrier specified");
- if (carrier.ParentId == 0) throw new Exception("Media needs a parent");
- if (carrier.TypeId == 0) throw new Exception("Type must be specified");
- if (carrier.Text == null || carrier.Text.Length == 0) carrier.Text = "unnamed";
-
- umbraco.BusinessLogic.User user = GetUser(username, password);
-
-
- MediaType mt = new MediaType(carrier.TypeId);
-
- Media m = Media.MakeNew(carrier.Text, mt, user, carrier.ParentId);
-
- if (carrier.MediaProperties != null)
- {
- foreach (mediaProperty updatedproperty in carrier.MediaProperties)
- {
- if (!(updatedproperty.Key.ToLower().Equals("umbracofile")))
- {
- Property property = m.getProperty(updatedproperty.Key);
- if (property == null)
- throw new Exception("property " + updatedproperty.Key + " was not found");
- property.Value = updatedproperty.PropertyValue;
- }
- }
- }
-
- return m.Id;
- }
-
- [WebMethod]
- public void delete(int id, string username, string password)
- {
- Authenticate(username, password);
-
- Media m = new Media(id);
-
- if (m.HasChildren)
- throw new Exception("Cannot delete Media " + id + " as it has child nodes");
-
- Property p = m.getProperty("umbracoFile");
- if (p != null)
- {
- if (!(p.Value == System.DBNull.Value))
- {
- var path = _fs.GetRelativePath(p.Value.ToString());
- if(_fs.FileExists(path))
- _fs.DeleteFile(path, true);
- }
- }
-
- m.delete();
-
- }
-
- [WebMethod]
- public void writeContents(int id, string filename, Byte[] contents, string username, string password)
- {
- Authenticate(username, password);
-
- filename = filename.Replace("/", global::Umbraco.Core.IO.IOHelper.DirSepChar.ToString());
- filename = filename.Replace(@"\", global::Umbraco.Core.IO.IOHelper.DirSepChar.ToString());
- filename = filename.Substring(filename.LastIndexOf(global::Umbraco.Core.IO.IOHelper.DirSepChar) + 1, filename.Length - filename.LastIndexOf(global::Umbraco.Core.IO.IOHelper.DirSepChar) - 1).ToLower();
-
- Media m = new Media(id);
-
- var path = _fs.GetRelativePath(m.getProperty("umbracoFile").Id, filename);
-
- var stream = new MemoryStream();
- stream.Write(contents, 0, contents.Length);
- stream.Seek(0, 0);
-
- _fs.AddFile(path, stream);
-
- m.getProperty("umbracoFile").Value = _fs.GetUrl(path);
- m.getProperty("umbracoExtension").Value = Path.GetExtension(filename).Substring(1);
- m.getProperty("umbracoBytes").Value = _fs.GetSize(path);
-
-
- }
-
- [WebMethod]
- public mediaCarrier read(int id, string username, string password)
- {
- Authenticate(username, password);
-
-
- Media m = new Media(id);
-
-
- return createCarrier(m);
- }
-
- [WebMethod]
- public List readList(int parentId, string username, string password)
- {
- Authenticate(username, password);
-
- List carriers = new List();
- Media[] mediaList;
-
- if (parentId < 1)
- {
- mediaList = Media.GetRootMedias();
- }
- else
- {
- Media m = new Media(parentId);
- mediaList = m.Children;
- }
-
- foreach (Media child in mediaList)
- {
- carriers.Add(createCarrier(child));
- }
-
- return carriers;
- }
-
-
-
- [WebMethod]
- [ScriptMethod(ResponseFormat = ResponseFormat.Json)]
- public Result Embed(string url, int width, int height)
- {
- Result r = new Result();
-
- //todo cache embed doc
- var xmlConfig = new XmlDocument();
- xmlConfig.Load(GlobalSettings.FullpathToRoot + Path.DirectorySeparatorChar + "config" + Path.DirectorySeparatorChar + "EmbeddedMedia.config");
-
- foreach (XmlNode node in xmlConfig.SelectNodes("//provider"))
- {
- var regexPattern = new Regex(node.SelectSingleNode("./urlShemeRegex").InnerText, RegexOptions.IgnoreCase);
- if (regexPattern.IsMatch(url))
- {
- var type = node.Attributes["type"].Value;
-
- var prov = (IEmbedProvider)Activator.CreateInstance(Type.GetType(node.Attributes["type"].Value));
-
- if (node.Attributes["supportsDimensions"] != null)
- r.SupportsDimensions = node.Attributes["supportsDimensions"].Value == "True";
- else
- r.SupportsDimensions = prov.SupportsDimensions;
-
- var settings = node.ChildNodes.Cast().ToDictionary(settingNode => settingNode.Name);
-
- foreach (var prop in prov.GetType().GetProperties().Where(prop => prop.IsDefined(typeof(ProviderSetting), true)))
- {
-
- if (settings.Any(s => s.Key.ToLower() == prop.Name.ToLower()))
- {
- XmlNode setting = settings.FirstOrDefault(s => s.Key.ToLower() == prop.Name.ToLower()).Value;
- var settingType = typeof(Umbraco.Web.Media.EmbedProviders.Settings.String);
-
- if (setting.Attributes["type"] != null)
- settingType = Type.GetType(setting.Attributes["type"].Value);
-
- var settingProv = (IEmbedSettingProvider)Activator.CreateInstance(settingType);
- prop.SetValue(prov, settingProv.GetSetting(settings.FirstOrDefault(s => s.Key.ToLower() == prop.Name.ToLower()).Value), null);
-
- }
-
-
- }
- try
- {
- r.Markup = prov.GetMarkup(url, width, height);
- r.Status = Status.Success;
- }
- catch
- {
- r.Status = Status.Error;
- }
- return r;
- }
- }
-
- r.Status = Status.NotSupported;
- return r;
- }
-
-
- private mediaCarrier createCarrier(Media m)
- {
- mediaCarrier carrier = new mediaCarrier();
- carrier.Id = m.Id;
- carrier.Text = m.Text;
-
- carrier.TypeAlias = m.ContentType.Alias;
- carrier.TypeId = m.ContentType.Id;
-
- carrier.CreateDateTime = m.CreateDateTime;
- carrier.HasChildren = m.HasChildren;
- carrier.Level = m.Level;
-
- carrier.Path = m.Path;
- carrier.SortOrder = m.sortOrder;
-
- try
- {
- carrier.ParentId = m.Parent.Id;
- }
- catch
- {
- carrier.ParentId = -1;
- }
-
- foreach (Property p in m.getProperties)
- {
-
- mediaProperty carrierprop = new mediaProperty();
-
- if (p.Value == System.DBNull.Value)
- {
- carrierprop.PropertyValue = "";
- }
- else
- {
- carrierprop.PropertyValue = p.Value;
- }
-
- carrierprop.Key = p.PropertyType.Alias;
- carrier.MediaProperties.Add(carrierprop);
-
- }
-
- return carrier;
- }
-
- }
-}
\ No newline at end of file
diff --git a/src/umbraco.webservices/members/memberCarrier.cs b/src/umbraco.webservices/members/memberCarrier.cs
deleted file mode 100644
index 53407c0c0b..0000000000
--- a/src/umbraco.webservices/members/memberCarrier.cs
+++ /dev/null
@@ -1,92 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Xml.Serialization;
-
-namespace umbraco.webservices.members
-{
- [Serializable]
- [XmlType(Namespace = "http://umbraco.org/webservices/")]
- public class memberCarrier
- {
-
- public memberCarrier()
- {
- memberProperties = new List();
- groups = new List();
- }
-
- #region Fields
- private int id;
-
- private string password;
- private string email;
- private string displayedName;
- private string loginName;
-
- private int membertypeId;
- private string membertypeName;
-
- private List groups;
- private List memberProperties;
- #endregion
-
- #region Properties
-
- public int Id
- {
- get { return id; }
- set { id = value; }
- }
-
- public string DisplayedName
- {
- get { return displayedName; }
- set { displayedName = value; }
- }
-
- public string Password
- {
- get { return password; }
- set { password = value; }
- }
-
- public string Email
- {
- get { return email; }
- set { email = value; }
- }
-
- public string LoginName
- {
- get { return loginName; }
- set { loginName = value; }
- }
-
- public int MembertypeId
- {
- get { return membertypeId; }
- set { membertypeId = value; }
- }
-
-
- public string MembertypeName
- {
- get { return membertypeName; }
- set { membertypeName = value; }
- }
-
- public List Groups
- {
- get { return groups; }
- set { groups = value; }
- }
-
- public List MemberProperties
- {
- get { return memberProperties; }
- set { memberProperties = value; }
- }
-
- #endregion
- }
-}
\ No newline at end of file
diff --git a/src/umbraco.webservices/members/memberGroup.cs b/src/umbraco.webservices/members/memberGroup.cs
deleted file mode 100644
index 8d57f2782f..0000000000
--- a/src/umbraco.webservices/members/memberGroup.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-using System;
-
-namespace umbraco.webservices.members
-{
- [Serializable]
- public class memberGroup
- {
- int groupID;
- string groupName;
-
- public memberGroup()
- {
- }
-
- public memberGroup(int groupID, string groupName)
- {
- GroupID = groupID;
- GroupName = groupName;
- }
-
- public int GroupID
- {
- get { return groupID; }
- set { groupID = value; }
- }
-
- public string GroupName
- {
- get { return groupName; }
- set { groupName = value; }
- }
-
- }
-}
\ No newline at end of file
diff --git a/src/umbraco.webservices/members/memberProperty.cs b/src/umbraco.webservices/members/memberProperty.cs
deleted file mode 100644
index 20dd72e240..0000000000
--- a/src/umbraco.webservices/members/memberProperty.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-using System;
-using System.Xml.Serialization;
-
-namespace umbraco.webservices.members
-{
- [Serializable]
- [XmlType(Namespace = "http://umbraco.org/webservices/")]
- public class memberProperty
- {
- private string key;
- private object propertyValue;
-
- public memberProperty()
- {
- }
-
- public object PropertyValue
- {
- get { return propertyValue; }
- set { propertyValue = value; }
- }
-
- public string Key
- {
- get { return key; }
- set { key = value; }
- }
- }
-}
\ No newline at end of file
diff --git a/src/umbraco.webservices/members/memberService.cs b/src/umbraco.webservices/members/memberService.cs
deleted file mode 100644
index 48fd0748d9..0000000000
--- a/src/umbraco.webservices/members/memberService.cs
+++ /dev/null
@@ -1,240 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Web.Services;
-using umbraco.cms.businesslogic.member;
-
-namespace umbraco.webservices.members
-{
- [WebService(Namespace = "http://umbraco.org/webservices/")]
- [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
- [ToolboxItem(false)]
- public class memberService : BaseWebService
- {
-
- override public Services Service
- {
- get
- {
- return Services.MemberService;
- }
- }
-
-
- ///
- /// Reads the user with the specified memberId
- ///
- ///
- [WebMethod]
- public memberCarrier readByLogin(string memberLoginName, string memberPassword, string username, string password)
- {
- Authenticate(username, password);
-
- umbraco.cms.businesslogic.member.Member foundMember = umbraco.cms.businesslogic.member.Member.GetMemberFromLoginNameAndPassword(memberLoginName, memberPassword);
- if (foundMember == null)
- return null;
-
- return CreateMemberCarrier(foundMember);
- }
-
- ///
- /// Reads the user with the specified memberId
- ///
- ///
- [WebMethod]
- public memberCarrier readById(int memberId, string username, string password)
- {
- Authenticate(username, password);
-
- umbraco.cms.businesslogic.member.Member foundMember = new umbraco.cms.businesslogic.member.Member(memberId);
- if (foundMember == null)
- return null;
-
- return CreateMemberCarrier(foundMember);
- }
-
- ///
- /// Reads the full list of members
- ///
- ///
- [WebMethod]
- public List readList(string username, string password)
- {
- Authenticate(username, password);
-
- Member[] members = Member.GetAll;
- List Members = new List();
-
- foreach (umbraco.cms.businesslogic.member.Member member in members)
- {
- Members.Add(CreateMemberCarrier(member));
- }
-
- return Members;
- }
-
-
- [WebMethod]
- public void update(memberCarrier carrier, string username, string password)
- {
- Authenticate(username, password);
-
- // Some validation
- if (carrier.Id == 0) throw new Exception("ID must be specifed when updating");
- if (carrier == null) throw new Exception("No carrier specified");
-
- // Get the user
- umbraco.BusinessLogic.User user = GetUser(username, password);
-
- // We load the member
- Member member = new Member(carrier.Id);
-
- // We assign the new values:
- member.LoginName = carrier.LoginName;
- member.Text = carrier.DisplayedName;
- member.Email = carrier.Email;
- member.Password = carrier.Password;
-
- // We iterate the properties in the carrier
- if (carrier.MemberProperties != null)
- {
- foreach (memberProperty updatedproperty in carrier.MemberProperties)
- {
- umbraco.cms.businesslogic.property.Property property = member.getProperty(updatedproperty.Key);
- if (property != null)
- {
- property.Value = updatedproperty.PropertyValue;
- }
- }
- }
- }
-
-
- [WebMethod]
- public int create(memberCarrier carrier, int memberTypeId, string username, string password)
- {
- Authenticate(username, password);
-
- // Some validation
- if (carrier == null) throw new Exception("No carrier specified");
- if (carrier.Id != 0) throw new Exception("ID cannot be specifed when creating. Must be 0");
- if (string.IsNullOrEmpty(carrier.DisplayedName)) carrier.DisplayedName = "unnamed";
-
- // we fetch the membertype
- umbraco.cms.businesslogic.member.MemberType mtype = new umbraco.cms.businesslogic.member.MemberType(memberTypeId);
-
- // Check if the membertype exists
- if (mtype == null) throw new Exception("Membertype " + memberTypeId + " not found");
-
- // Get the user that creates
- umbraco.BusinessLogic.User user = GetUser(username, password);
-
- // Create the new member
- umbraco.cms.businesslogic.member.Member newMember = umbraco.cms.businesslogic.member.Member.MakeNew(carrier.DisplayedName, mtype, user);
-
- // We iterate the properties in the carrier
- if (carrier.MemberProperties != null)
- {
- foreach (memberProperty updatedproperty in carrier.MemberProperties)
- {
- umbraco.cms.businesslogic.property.Property property = newMember.getProperty(updatedproperty.Key);
- if (property != null)
- {
- property.Value = updatedproperty.PropertyValue;
- }
- }
- }
- return newMember.Id;
- }
-
-
-
-
- ///
- /// Deletes the document with the specified ID
- ///
- ///
- ///
- ///
- [WebMethod]
- public void delete(int id, string username, string password)
- {
-
- Authenticate(username, password);
-
- // We load the member
- umbraco.cms.businesslogic.member.Member deleteMember;
- try
- {
- deleteMember = new umbraco.cms.businesslogic.member.Member(id);
- }
- catch (Exception ex)
- {
- throw new Exception("Member not found" + ex.Message);
- }
-
- // We delete him (cruel world)
- try
- {
- deleteMember.delete();
- }
- catch (Exception ex)
- {
- throw new Exception("Member could not be deleted" + ex.Message);
- }
- }
-
-
-
- ///
- /// Creates container-object for member
- ///
- ///
- ///
- private memberCarrier CreateMemberCarrier(umbraco.cms.businesslogic.member.Member member)
- {
- memberCarrier carrier = new memberCarrier();
-
- carrier.Id = member.Id;
-
- carrier.LoginName = member.LoginName;
- carrier.DisplayedName = member.Text;
- carrier.Email = member.Email;
- carrier.Password = member.Password;
-
- carrier.MembertypeId = member.ContentType.Id;
- carrier.MembertypeName = member.ContentType.Text;
-
- // Adding groups to member-carrier
- IDictionaryEnumerator Enumerator;
- Enumerator = member.Groups.GetEnumerator();
- while (Enumerator.MoveNext())
- {
- memberGroup group = new memberGroup(Convert.ToInt32(Enumerator.Key), ((umbraco.cms.businesslogic.member.MemberGroup)Enumerator.Value).Text);
- carrier.Groups.Add(group);
- }
-
- // Loading properties to carrier
- var props = member.getProperties;
- foreach (umbraco.cms.businesslogic.property.Property prop in props)
- {
- memberProperty carrierprop = new memberProperty();
-
- if (prop.Value == System.DBNull.Value)
- {
- carrierprop.PropertyValue = null;
- }
- else
- {
- carrierprop.PropertyValue = prop.Value;
- }
-
- carrierprop.Key = prop.PropertyType.Alias;
- carrier.MemberProperties.Add(carrierprop);
- }
- return carrier;
- }
-
- }
-}
\ No newline at end of file
diff --git a/src/umbraco.webservices/stylesheets/stylesheetService.cs b/src/umbraco.webservices/stylesheets/stylesheetService.cs
deleted file mode 100644
index 75b5746c93..0000000000
--- a/src/umbraco.webservices/stylesheets/stylesheetService.cs
+++ /dev/null
@@ -1,137 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Web.Services;
-using umbraco.cms.businesslogic.web;
-
-namespace umbraco.webservices.stylesheets
-{
- ///
- /// Summary description for StylesheetService
- ///
- [WebService(Namespace = "http://umbraco.org/webservices/")]
- [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
- [ToolboxItem(false)]
- public class stylesheetService : BaseWebService
- {
-
- override public Services Service
- {
- get
- {
- return Services.StylesheetService;
- }
- }
-
-
- [WebMethod]
- public int create(stylesheetCarrier carrier, string username, string password)
- {
- Authenticate(username, password);
- umbraco.BusinessLogic.User user = GetUser(username, password);
-
- StyleSheet stylesheet = StyleSheet.MakeNew(user, carrier.Name, (carrier.Name + ".css"), carrier.Content);
- stylesheet.saveCssToFile();
-
- return stylesheet.Id;
- }
-
-
- [WebMethod]
- public stylesheetCarrier read(int id, string username, string password)
- {
- Authenticate(username, password);
-
- StyleSheet stylesheet;
- try
- {
- stylesheet = new StyleSheet(id);
- }
- catch (Exception)
- {
- throw new Exception("Could not load stylesheet with id: " + id + ", not found");
- }
-
- if (stylesheet == null)
- throw new Exception("Could not load stylesheet with id: " + id + ", not found");
-
- return createCarrier(stylesheet);
- }
-
-
- [WebMethod]
- public List readList(string username, string password)
- {
- Authenticate(username, password);
-
- List stylesheets = new List();
-
- StyleSheet[] foundstylesheets = StyleSheet.GetAll();
-
- foreach (StyleSheet stylesheet in foundstylesheets)
- {
- stylesheets.Add(createCarrier(stylesheet));
- }
-
- return stylesheets;
- }
-
-
- [WebMethod]
- public void update(stylesheetCarrier carrier, string username, string password)
- {
- Authenticate(username, password);
-
- StyleSheet stylesheet = null;
- try
- {
- stylesheet = new StyleSheet(carrier.Id);
- }
- catch
- { }
-
- if (stylesheet == null)
- throw new Exception("Could not load stylesheet with id: " + carrier.Id);
-
- stylesheet.Content = carrier.Content;
- stylesheet.saveCssToFile();
- }
-
-
- private stylesheetCarrier createCarrier(StyleSheet stylesheet)
- {
- stylesheetCarrier carrier = new stylesheetCarrier();
- carrier.Id = stylesheet.Id;
- carrier.Name = stylesheet.Text;
- carrier.Content = stylesheet.Content;
- return carrier;
- }
-
-
-
- public class stylesheetCarrier
- {
- private int id;
- private string name;
- private string content;
-
- public int Id
- {
- get { return id; }
- set { id = value; }
- }
-
- public string Name
- {
- get { return name; }
- set { name = value; }
- }
-
- public string Content
- {
- get { return content; }
- set { content = value; }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/src/umbraco.webservices/templates/templateService.cs b/src/umbraco.webservices/templates/templateService.cs
deleted file mode 100644
index 1acd4fca8b..0000000000
--- a/src/umbraco.webservices/templates/templateService.cs
+++ /dev/null
@@ -1,184 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Linq;
-using System.Web.Services;
-
-namespace umbraco.webservices.templates
-{
- ///
- /// Summary description for TemplateService
- ///
- [WebService(Namespace = "http://umbraco.org/webservices/")]
- [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
- [ToolboxItem(false)]
- public class templateService : BaseWebService
- {
-
- override public Services Service
- {
- get
- {
- return Services.TemplateService;
- }
- }
-
- [WebMethod]
- public int readIdFromAlias(string alias, string username, string password)
- {
- Authenticate(username, password);
-
- cms.businesslogic.template.Template template;
-
- try
- {
- template = cms.businesslogic.template.Template.GetByAlias(alias, true);
- }
- catch (Exception)
- {
- throw new Exception("Could not load template from alias: " + alias);
- }
-
- if (template == null)
- {
- throw new Exception("Could not load template from alias: " + alias);
- }
-
- return template.Id;
- }
-
-
- [WebMethod]
- public List readList(string username, string password)
- {
- Authenticate(username, password);
-
- return cms.businesslogic.template.Template.GetAllAsList().Select(createTemplateCarrier).ToList();
- }
-
-
-
- [WebMethod]
- public void delete(int id, string username, string password)
- {
- Authenticate(username, password);
-
- if (id == 0)
- throw new Exception("ID must be specifed when updating");
-
- var template = new cms.businesslogic.template.Template(id);
-
- template.delete();
- }
-
- [WebMethod]
- public int create(templateCarrier carrier, string username, string password)
- {
- Authenticate(username, password);
-
- if (carrier.Id != 0) throw new Exception("ID may not be specified when creating");
- if (carrier == null) throw new Exception("No carrier specified");
-
- // Get the user
- BusinessLogic.User user = GetUser(username, password);
-
- // Create template
- var template = cms.businesslogic.template.Template.MakeNew(carrier.Name, user);
-
- template.MasterTemplate = carrier.MastertemplateId;
- template.Alias = carrier.Alias;
- template.Text = carrier.Name;
- template.Design = carrier.Design;
- template.Save();
- ClearCachedTemplate(template);
-
- return template.Id;
- }
-
- [WebMethod]
- public void update(templateCarrier carrier, string username, string password)
- {
- Authenticate(username, password);
-
- if (carrier.Id == 0) throw new Exception("ID must be specifed when updating");
- if (carrier == null) throw new Exception("No carrier specified");
-
- cms.businesslogic.template.Template template;
-
- try
- {
- template = new cms.businesslogic.template.Template(carrier.Id);
- }
- catch (Exception)
- {
- throw new Exception("Template with ID " + carrier.Id + " not found");
- }
-
- template.MasterTemplate = carrier.MastertemplateId;
- template.Alias = carrier.Alias;
- template.Text = carrier.Name;
- template.Design = carrier.Design;
- template.Save();
-
-
- ClearCachedTemplate(template);
- }
-
- [WebMethod]
- public templateCarrier read(int id, string username, string password)
- {
- Authenticate(username, password);
-
- cms.businesslogic.template.Template template;
-
- try
- {
- template = new cms.businesslogic.template.Template(id);
- }
- catch (Exception)
- {
- throw new Exception("Template with ID " + id + " not found");
- }
-
- if (template == null)
- throw new Exception("Template with ID " + id + " not found");
-
- return createTemplateCarrier(template);
- }
-
- public templateCarrier createTemplateCarrier(cms.businesslogic.template.Template template)
- {
- var carrier = new templateCarrier
- {
- Id = template.Id,
- MastertemplateId = template.MasterTemplate,
- Alias = template.Alias,
- Name = template.Text,
- Design = template.Design,
- MasterPageFile = template.MasterPageFile
- };
- return carrier;
- }
-
-
- public class templateCarrier
- {
- public int Id { get; set; }
- public int MastertemplateId { get; set; }
- public string MasterPageFile { get; set; }
- public string Name { get; set; }
- public string Alias { get; set; }
- public string Design { get; set; }
- }
-
- private static void ClearCachedTemplate(cms.businesslogic.template.Template cachedTemplate)
- {
- // Clear cache in rutime
- if (UmbracoSettings.UseDistributedCalls)
- presentation.cache.dispatcher.Refresh(new Guid("dd12b6a0-14b9-46e8-8800-c154f74047c8"), cachedTemplate.Id);
- else
- template.ClearCachedTemplate(cachedTemplate.Id);
- }
-
- }
-}
\ No newline at end of file
diff --git a/src/umbraco.webservices/umbraco.webservices.csproj b/src/umbraco.webservices/umbraco.webservices.csproj
deleted file mode 100644
index f8a2c8f3f9..0000000000
--- a/src/umbraco.webservices/umbraco.webservices.csproj
+++ /dev/null
@@ -1,162 +0,0 @@
-
-
-
- Debug
- AnyCPU
- 9.0.30729
- 2.0
- {CBDB56AC-FF02-4421-9FD4-ED82E339D8E2}
- Library
- Properties
- umbraco.webservices
- umbraco.webservices
- v4.0
- 512
-
-
-
-
-
-
-
-
-
-
- 3.5
-
- publish\
- true
- Disk
- false
- Foreground
- 7
- Days
- false
- false
- true
- 0
- 1.0.0.%2a
- false
- false
- true
-
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
- AllRules.ruleset
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
- bin\Release\umbraco.webservices.XML
- AllRules.ruleset
-
-
-
-
-
- 3.5
-
-
-
-
-
-
-
-
-
-
- Properties\SolutionInfo.cs
-
-
- Component
-
-
-
-
-
- Component
-
-
- Component
-
-
-
-
- Component
-
-
-
-
-
- Component
-
-
-
- Component
-
-
- Component
-
-
- Component
-
-
-
-
- {E469A9CE-1BEC-423F-AC44-713CD72457EA}
- umbraco.businesslogic
-
-
- {CCD75EC3-63DB-4184-B49D-51C1DD337230}
- umbraco.cms
-
-
- {31785BC3-256C-4613-B2F5-A1B0BDDED8C1}
- Umbraco.Core
-
-
- {651E1350-91B6-44B7-BD60-7207006D7003}
- umbraco.presentation
-
-
-
-
- False
- .NET Framework 3.5 SP1 Client Profile
- false
-
-
- False
- .NET Framework 3.5 SP1
- true
-
-
- False
- Windows Installer 3.1
- true
-
-
-
-
-
-
-
-
-
\ No newline at end of file