Initial project's source code check-in.

This commit is contained in:
ptsurbeleu 2011-07-13 16:07:32 -07:00
commit b03b0b373f
4573 changed files with 981205 additions and 0 deletions

View file

@ -0,0 +1,97 @@
using System;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Text;
namespace WebsitePanel.Providers.Common
{
sealed class ByteVector
{
# region Public
public ByteVector Add(Byte[] bytes, Int32 offset, Int32 count)
{
Byte [] b = new Byte[ count ];
Array.Copy( bytes, offset, b, 0, count );
_bytes.Add( b );
_size += count;
return this;
}
public ByteVector Add (Byte[] bytes)
{
return Add(bytes, 0, bytes.Length);
}
public ByteVector Add(string s, Encoding encoding)
{
if ( !string.IsNullOrEmpty(s) )
{
Add(encoding.GetBytes(s));
}
return this;
}
public ByteVector Add(string s)
{
return Add(s, Encoding.ASCII);
}
public Byte[] Get()
{
Byte [] result = new Byte[ _size ];
Int32 offset = 0;
foreach ( Byte [] b in _bytes )
{
Array.Copy( b, 0, result, offset, b.Length );
offset += b.Length;
}
return result;
}
public string GetHexString()
{
StringBuilder sb = new StringBuilder();
foreach (byte b in Get())
{
sb.Append(b.ToString("x2"));
}
return sb.ToString();
}
public Byte[] GetMD5Hash()
{
return MD5.Create().ComputeHash(Get());
}
public void Clear()
{
_bytes.Clear();
_size = 0;
}
public Int64 Size
{
get { return _size; }
}
# endregion
# region Private
readonly List<Byte[]> _bytes = new List<Byte[]>();
Int64 _size;
# endregion
}
}

View file

@ -0,0 +1,71 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace WebsitePanel.Providers.Common
{
public class Constants
{
public const string ImportDomainAdmin = "ImportDomainAdmin";
public const string InheritDomainDefaultLimits = "InheritDomainDefaultLimits";
public const string EnableDomainAdministrators = "EnableDomainAdministrators";
public const string RelayAliasedMail = "RelayAliasedMail";
public const string UserName = "UserName";
public const string Password = "Password";
public const string NameServers = "NameServers";
public const string SqlServer = "SqlServer";
public const string ReportingServer = "ReportingServer";
public const string IFDWebApplicationRootDomain = "IFDWebApplicationRootDomain";
public const string CRMWebsiteIP = "CRMWebsiteIP";
public const string UrlSchema = "UrlSchema";
public const string Port = "Port";
public const string AppRootDomain = "AppRootDomain";
public const string UtilityPath = "UtilityPath";
public const string EnterpriseServer = "EnterpriseServer";
public const string AdministrationToolService = "AdministrationToolService";
}
}

View file

@ -0,0 +1,79 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
namespace WebsitePanel.Providers
{
/// <summary>
/// Summary description for DailyStatistics.
/// </summary>
[Serializable]
public class DailyStatistics
{
private int year;
private int month;
private int day;
private long bytesSent;
private long bytesReceived;
public DailyStatistics()
{
}
public int Year
{
get { return year; }
set { year = value; }
}
public int Month
{
get { return month; }
set { month = value; }
}
public int Day
{
get { return day; }
set { day = value; }
}
public long BytesSent
{
get { return bytesSent; }
set { bytesSent = value; }
}
public long BytesReceived
{
get { return bytesReceived; }
set { bytesReceived = value; }
}
}
}

View file

@ -0,0 +1,54 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace WebsitePanel.Providers.Common
{
public class ErrorCodes
{
public const string CANNOT_CREATE_PROVIDER_INSTANCE = "CANNOT_CREATE_PROVIDER_INSTANCE";
public const string PROVIDER_NANE_IS_NOT_SPECIFIED = "PROVIDER_NANE_IS_NOT_SPECIFIED";
public const string CANNOT_CHECK_IF_PROVIDER_SOFTWARE_INSTALLED = "CANNOT_CHECK_IF_PROVIDER_SOFTWARE_INSTALLED";
public const string CANNOT_GET_PROVIDER_INFO = "CANNOT_GET_PROVIDER_INFO";
public const string CANNOT_GET_PASSWORD_COMPLEXITY = "CANNOT_GET_PASSWORD_COMPLEXITY";
public const string CANNOT_GET_ORGANIZATION_PROXY = "CANNOT_GET_ORGANIZATION_PROXY";
public const string CANNOT_GET_ORGANIZATION_BY_ITEM_ID = "CANNOT_GET_ORGANIZATION_BY_ITEM_ID";
public const string CANNOT_GET_ACCOUNT = "CANNOT_GET_ACCOUNT";
public const string CANNOT_GET_DISTRIBUTION_LIST_PERMISSIONS = "CANNOT_GET_DISTRIBUTION_LIST_PERMISSIONS";
public const string CANNOT_SET_DISTRIBUTION_LIST_PERMISSIONS = "CANNOT_SET_DISTRIBUTION_LIST_PERMISSIONS";
}
}

View file

@ -0,0 +1,112 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.IO;
using WebsitePanel.Providers.Common;
namespace WebsitePanel.Providers
{
public abstract class HostingServiceProviderBase : IHostingServiceProvider
{
RemoteServerSettings serverSettings = new RemoteServerSettings();
ServiceProviderSettings providerSettings = new ServiceProviderSettings();
public RemoteServerSettings ServerSettings
{
get { return serverSettings; }
set { serverSettings = value; }
}
public ServiceProviderSettings ProviderSettings
{
get { return providerSettings; }
set { providerSettings = value; }
}
#region IHostingServiceProvider methods
public virtual string[] GetProviderDefaults()
{
return new string[] { };
}
public virtual string[] Install()
{
// install in silence
return new string[] { };
}
public virtual SettingPair[] GetProviderDefaultSettings()
{
return new SettingPair[] { };
}
public virtual void Uninstall()
{
// nothing to do
}
public abstract bool IsInstalled();
public virtual void ChangeServiceItemsState(ServiceProviderItem[] items, bool enabled)
{
// do nothing
}
public virtual void DeleteServiceItems(ServiceProviderItem[] items)
{
// do nothing
}
public virtual ServiceProviderItemDiskSpace[] GetServiceItemsDiskSpace(ServiceProviderItem[] items)
{
// don't calculate disk space
return null;
}
public virtual ServiceProviderItemBandwidth[] GetServiceItemsBandwidth(ServiceProviderItem[] items, DateTime since)
{
// don't calculate bandwidth
return null;
}
#endregion
#region Helper Methods
protected void CheckTempPath(string path)
{
// check path
string tempPath = Path.GetTempPath();
//bug when calling from local machine
//if (!path.ToLower().StartsWith(tempPath.ToLower()))
// throw new Exception("The path is not allowed");
}
#endregion
}
}

View file

@ -0,0 +1,92 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
namespace WebsitePanel.Providers
{
public abstract class HostingServiceProviderWebService : System.Web.Services.WebService
{
public ServiceProviderSettingsSoapHeader settings = new ServiceProviderSettingsSoapHeader();
private RemoteServerSettings serverSettings;
private ServiceProviderSettings providerSettings;
private IHostingServiceProvider provider;
protected IHostingServiceProvider Provider
{
get
{
if (provider == null)
{
// try to create provider class
Type providerType = Type.GetType(ProviderSettings.ProviderType);
try
{
provider = (IHostingServiceProvider)Activator.CreateInstance(providerType);
((HostingServiceProviderBase)provider).ServerSettings = ServerSettings;
((HostingServiceProviderBase)provider).ProviderSettings = ProviderSettings;
}
catch (Exception ex)
{
throw new Exception(String.Format("Can not create '{0}' provider instance with '{1}' type",
ProviderSettings.ProviderName, ProviderSettings.ProviderType), ex);
}
}
return provider;
}
}
protected RemoteServerSettings ServerSettings
{
get
{
if (serverSettings == null)
{
// parse server settings
serverSettings = new RemoteServerSettings(settings.Settings);
}
return serverSettings;
}
}
protected ServiceProviderSettings ProviderSettings
{
get
{
if (providerSettings == null)
{
// parse provider settings
providerSettings = new ServiceProviderSettings(settings.Settings);
}
return providerSettings;
}
}
}
}

View file

@ -0,0 +1,72 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections;
using WebsitePanel.Providers.Common;
namespace WebsitePanel.Providers
{
/// <summary>
/// Summary description for IPanelServiceProvider.
/// </summary>
public interface IHostingServiceProvider
{
/// <summary>
/// Executes each time when the service is being added to some server.
/// Prepare environment for service usage (like setting folder permissions,
/// creating system users, etc.)
/// </summary>
string[] Install();
/// <summary>
/// Returns the list of additional provider properties.
/// </summary>
/// <returns>The array of additional properties.</returns>
SettingPair[] GetProviderDefaultSettings();
/// <summary>
/// Executes when service is being removed from server.
/// Performs any clean up operations.
/// </summary>
void Uninstall();
/// <summary>
/// Checks whether service is installed within the system. This method will be
/// used by server creation wizard for automatic services detection and configuring.
/// </summary>
/// <returns>True if service is installed; otherwise - false.</returns>
bool IsInstalled();
void ChangeServiceItemsState(ServiceProviderItem[] items, bool enabled);
void DeleteServiceItems(ServiceProviderItem[] items);
ServiceProviderItemDiskSpace[] GetServiceItemsDiskSpace(ServiceProviderItem[] items);
ServiceProviderItemBandwidth[] GetServiceItemsBandwidth(ServiceProviderItem[] items, DateTime since);
}
}

View file

@ -0,0 +1,44 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
namespace WebsitePanel.Providers
{
[Flags]
[Serializable]
public enum NTFSPermission : int
{
FullControl = 0x1,// = 0x1F01FF,
Modify = 0x2,// = 0x1301BF,
//Execute = 0x4,// = 0x1200A9,
//ListFolderContents = 0x8,// = 0x1200A9,
Read = 0x10,// = 0x120089,
Write = 0x20// = 0x100116
}
}

View file

@ -0,0 +1,209 @@
using System;
using System.Security.Cryptography;
using System.Text;
namespace WebsitePanel.Providers.Common
{
public class PasswdHelper
{
protected static readonly string MD5_MAGIC_PREFIX = "$apr1$";
protected const int MD5_DIGESTSIZE = 16;
protected static readonly string SHA_MAGIC_PREFIX = "{SHA}";
private static readonly string itoa64 = /* 0 ... 63 => ASCII - 64 */
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
private static Random _random;
static PasswdHelper()
{
_random = new Random();
}
public static string to64(ulong v, int n)
{
StringBuilder sb = new StringBuilder();
while (--n >= 0)
{
sb.Append(itoa64[(int)v & 0x3f]);
v >>= 6;
}
return sb.ToString();
}
public static string ByteArrayToHexString(byte[] ba)
{
StringBuilder sb = new StringBuilder();
foreach (byte b in ba)
{
sb.Append(b.ToString("x2"));
}
return sb.ToString();
}
public static byte[] getMD5HashHex(string s)
{
MD5 md5 = MD5.Create();
return md5.ComputeHash(Encoding.ASCII.GetBytes(s));
}
public static string MD5Encode(string pw, string salt)
{
// äëÿ ïðîâåðêè ïðèõîäèò òàêîå:
// $apr1$Vs5.....$iSQlpTkND9RjL7iAMTjDt.
// äëÿ ãåíåðèðîâàíèÿ ïàðîëÿ ïðèõîäèò ñëó÷àéíàÿ ñòðîêà - ñîëü
string password;
byte[] final;
// íàéä¸ì ñîëü, åñëè â êà÷åñòâå ñîëè ïðèø¸ë óæå õýø
// 1. Óáåð¸ì ìàãè÷åñêèé $apr1$
if (salt.StartsWith(MD5_MAGIC_PREFIX))
{
salt = salt.Substring(MD5_MAGIC_PREFIX.Length);
}
// 2. Íàéä¸ì ñîëü äî ïåðâîãî '$' Èëè 8 ñèìâîëîâ
int sp = salt.IndexOf('$');
if (sp < 0 || sp > 8) sp = 8;
salt = salt.Substring(0, sp);
//Debug.WriteLine(string.Format("salt [{0}]", salt));
ByteVector s = new ByteVector();
ByteVector s1 = new ByteVector();
s.Add(pw);
s.Add(MD5_MAGIC_PREFIX);
s.Add(salt);
s1.Add(pw);
s1.Add(salt);
s1.Add(pw);
final = s1.GetMD5Hash();
for (int i = pw.Length; i > 0; i -= MD5_DIGESTSIZE)
{
s.Add(final, 0, (i > MD5_DIGESTSIZE) ? MD5_DIGESTSIZE : i);
}
for (int i = 0; i < final.Length; i++)
final[i] = 0;
for (int i = pw.Length; i != 0; i >>= 1)
{
// (i & 1) â àïà÷å
if ((i & 0x01) == 1)
{
s.Add(final, 0, 1);
}
else
{
s.Add(pw.Substring(0, 1));
}
}
final = s.GetMD5Hash();
for (int i = 0; i < 1000; i++)
{
s1.Clear();
if ((i & 1) != 0)
{
s1.Add(pw);
}
else
{
s1.Add(final);
}
if ((i % 3) != 0)
{
s1.Add(salt);
}
if ((i % 7) != 0)
{
s1.Add(pw);
}
if ((i & 1) != 0)
{
s1.Add(final);
}
else
{
s1.Add(pw);
}
final = s1.GetMD5Hash();
}
password = "";
ulong l;
l = ((ulong)final[0] << 16) | ((ulong)final[6] << 8) | ((ulong)final[12]);
password += PasswdHelper.to64(l, 4);
l = ((ulong)final[1] << 16) | ((ulong)final[7] << 8) | ((ulong)final[13]);
password += PasswdHelper.to64(l, 4);
l = ((ulong)final[2] << 16) | ((ulong)final[8] << 8) | ((ulong)final[14]);
password += PasswdHelper.to64(l, 4);
l = ((ulong)final[3] << 16) | ((ulong)final[9] << 8) | ((ulong)final[15]);
password += PasswdHelper.to64(l, 4);
l = ((ulong)final[4] << 16) | ((ulong)final[10] << 8) | ((ulong)final[5]);
password += PasswdHelper.to64(l, 4);
l = ((ulong)final[11]);
password += PasswdHelper.to64(l, 2);
password = string.Format("{0}{1}${2}", MD5_MAGIC_PREFIX, salt, password);
return password;
}
public static string SHA1Encode(string clear)
{
if (clear.StartsWith(SHA_MAGIC_PREFIX))
{
clear = clear.Substring(SHA_MAGIC_PREFIX.Length);
}
SHA1 sha = new SHA1CryptoServiceProvider();
string cr = Convert.ToBase64String(
sha.ComputeHash(Encoding.Default.GetBytes(clear))
);
return SHA_MAGIC_PREFIX + cr;
}
public static string GetRandomSalt()
{
return to64((ulong)_random.Next(), 8);
}
public static string DigestEncode(string username, string realm, string passwd)
{
MD5 md5 = MD5.Create();
byte[] b = md5.ComputeHash(Encoding.ASCII.GetBytes(
string.Format("{0}:{1}:{2}", username, realm, passwd)
));
StringBuilder sb = new StringBuilder(b.Length*2);
for (int i = 0; i < b.Length; ++i)
{
sb.Append( String.Format("{0:x2}", b[i]) );
}
return sb.ToString();
}
}
}

View file

@ -0,0 +1,40 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
namespace WebsitePanel.Providers
{
[AttributeUsage(AttributeTargets.Property)]
public class PersistentAttribute : Attribute
{
public PersistentAttribute()
{
}
}
}

View file

@ -0,0 +1,124 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.DirectoryServices;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Providers
{
public class RemoteServerSettings
{
// Active Directory settings
private bool adEnabled;
private AuthenticationTypes adAuthenticationType;
private string adRootDomain;
private string adUsername;
private string adPassword;
// Server settings
private int serverId;
private string serverName;
public RemoteServerSettings()
{
// just do nothing
}
public RemoteServerSettings(string[] settings)
{
// parse settings array
foreach (string setting in settings)
{
int idx = setting.IndexOf('=');
string key = setting.Substring(0, idx);
string val = setting.Substring(idx + 1);
if (key == "AD:Enabled")
ADEnabled = Boolean.Parse(val);
else if (key == "AD:AuthenticationType")
ADAuthenticationType = (AuthenticationTypes)Enum.Parse(typeof(AuthenticationTypes), val, true);
else if (key == "AD:RootDomain")
ADRootDomain = val;
else if (key == "AD:Username")
ADUsername = val;
else if (key == "AD:Password")
ADPassword = val;
else if (key == "Server:ServerId")
ServerId = Int32.Parse(val);
else if (key == "Server:ServerName")
ServerName = val;
}
}
#region Public Properties
public bool ADEnabled
{
get { return this.adEnabled; }
set { this.adEnabled = value; }
}
public AuthenticationTypes ADAuthenticationType
{
get { return this.adAuthenticationType; }
set { this.adAuthenticationType = value; }
}
public string ADRootDomain
{
get { return this.adRootDomain; }
set { this.adRootDomain = value; }
}
public string ADUsername
{
get { return this.adUsername; }
set { this.adUsername = value; }
}
public string ADPassword
{
get { return this.adPassword; }
set { this.adPassword = value; }
}
public int ServerId
{
get { return this.serverId; }
set { this.serverId = value; }
}
public string ServerName
{
get { return this.serverName; }
set { this.serverName = value; }
}
#endregion
}
}

View file

@ -0,0 +1,67 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
namespace WebsitePanel.Providers
{
/// <summary>
/// Summary description for ServerBinding.
/// </summary>
[Serializable]
public class ServerBinding
{
public string Protocol { get; set; }
public string IP { get; set; }
public string Port { get; set; }
public string Host { get; set; }
public ServerBinding()
{
}
public ServerBinding(string ip, string port, string host)
: this("http", ip, port, host)
{
}
public ServerBinding(string protocol, string ip, string port, string host)
{
this.Protocol = protocol;
this.IP = ip;
this.Port = port;
this.Host = host;
}
public override string ToString()
{
return string.Format("{0}:{1}:{2}", this.IP, this.Port, this.Host);
}
}
}

View file

@ -0,0 +1,48 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
namespace WebsitePanel.Providers
{
/// <summary>
/// Summary description for ServerState.
/// </summary>
[Serializable]
public enum ServerState
{
Unknown = 0,
Starting = 1,
Started = 2,
Stopping = 3,
Stopped = 4,
Pausing = 5,
Paused = 6,
Continuing = 7
}
}

View file

@ -0,0 +1,166 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Xml.Serialization;
using WebsitePanel.Providers.Common;
namespace WebsitePanel.Providers
{
/// <summary>
/// Summary description for ServiceProviderItem.
/// </summary>
[Serializable]
public abstract class ServiceProviderItem
{
private int id;
private int typeId = 0;
private int packageId = -1;
private int serviceId = -1;
private string name;
private string[] properties;
private string groupName;
private StringDictionary propsHash = null;
public ServiceProviderItem()
{
}
public int Id
{
get { return id; }
set { id = value; }
}
public int TypeId
{
get { return typeId; }
set { typeId = value; }
}
public int PackageId
{
get { return packageId; }
set { packageId = value; }
}
public int ServiceId
{
get { return serviceId; }
set { serviceId = value; }
}
public virtual string Name
{
get { return name; }
set { name = value; }
}
public string GroupName
{
get { return this.groupName; }
set { this.groupName = value; }
}
public DateTime CreatedDate
{
get;
set;
}
public string[] Properties
{
get
{
if (propsHash == null)
return null;
properties = new string[propsHash.Count];
int i = 0;
foreach (string key in propsHash.Keys)
properties[i++] = key + "=" + propsHash[key];
return properties;
}
set
{
if (value == null)
return;
properties = value;
// fill hash
propsHash = new StringDictionary();
foreach (string pair in value)
{
int idx = pair.IndexOf('=');
string name = pair.Substring(0, idx);
string val = pair.Substring(idx + 1);
propsHash.Add(name, val);
}
}
}
[XmlIgnore]
public string this[string propertyName]
{
get
{
if (propsHash == null)
propsHash = new StringDictionary();
return propsHash[propertyName];
}
set
{
if (propsHash == null)
propsHash = new StringDictionary();
propsHash[propertyName] = value;
}
}
public T GetValue<T>(string propertyName)
{
string strValue = this[propertyName];
//
if (String.IsNullOrEmpty(strValue))
return default(T);
//
return (T)Convert.ChangeType(strValue, typeof(T));
}
public void SetValue<T>(string propertyName, T propertyValue)
{
this[propertyName] = Convert.ToString(propertyValue);
}
}
}

View file

@ -0,0 +1,58 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
namespace WebsitePanel.Providers
{
/// <summary>
/// Summary description for ServiceProviderItemBandwidth.
/// </summary>
[Serializable]
public class ServiceProviderItemBandwidth
{
private int itemId;
private DailyStatistics[] days;
public ServiceProviderItemBandwidth()
{
}
public int ItemId
{
get { return itemId; }
set { itemId = value; }
}
public DailyStatistics[] Days
{
get { return days; }
set { days = value; }
}
}
}

View file

@ -0,0 +1,56 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Providers
{
[Serializable]
public class ServiceProviderItemDiskSpace
{
private int itemId;
public int ItemId
{
get { return itemId; }
set { itemId = value; }
}
private long diskSpace;
public long DiskSpace
{
get { return diskSpace; }
set { diskSpace = value; }
}
public ServiceProviderItemDiskSpace()
{
}
}
}

View file

@ -0,0 +1,122 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Providers
{
public class ServiceProviderItemType
{
private int itemTypeId;
private int groupId;
private string displayName;
private string typeName;
private int typeOrder;
private bool calculateDiskspace;
private bool calculateBandwidth;
private bool suspendable;
private bool disposable;
private bool searchable;
private bool importable;
private bool backupable;
public int ItemTypeId
{
get { return itemTypeId; }
set { itemTypeId = value; }
}
public int GroupId
{
get { return groupId; }
set { groupId = value; }
}
public string DisplayName
{
get { return displayName; }
set { displayName = value; }
}
public string TypeName
{
get { return typeName; }
set { typeName = value; }
}
public int TypeOrder
{
get { return typeOrder; }
set { typeOrder = value; }
}
public bool CalculateDiskspace
{
get { return calculateDiskspace; }
set { calculateDiskspace = value; }
}
public bool CalculateBandwidth
{
get { return calculateBandwidth; }
set { calculateBandwidth = value; }
}
public bool Suspendable
{
get { return suspendable; }
set { suspendable = value; }
}
public bool Disposable
{
get { return disposable; }
set { disposable = value; }
}
public bool Searchable
{
get { return searchable; }
set { searchable = value; }
}
public bool Importable
{
get { return importable; }
set { importable = value; }
}
public bool Backupable
{
get { return backupable; }
set { backupable = value; }
}
}
}

View file

@ -0,0 +1,136 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Specialized;
using System.Text;
namespace WebsitePanel.Providers
{
public class ServiceProviderSettings
{
// settings hash
StringDictionary hash = new StringDictionary();
private int providerGroupID = 0;
private string providerCode = "unknown";
private string providerName = "Unknown";
private string providerType = "";
public ServiceProviderSettings()
{
// just do nothing
}
public ServiceProviderSettings(string[] settings)
{
// parse settings array
foreach (string setting in settings)
{
int idx = setting.IndexOf('=');
string key = setting.Substring(0, idx);
string val = setting.Substring(idx + 1);
if (key.StartsWith("Server:") ||
key.StartsWith("AD:"))
continue;
if (key == "Provider:ProviderGroupID")
ProviderGroupID = Int32.Parse(val);
else if (key == "Provider:ProviderCode")
ProviderCode = val;
else if (key == "Provider:ProviderName")
ProviderName = val;
else if (key == "Provider:ProviderType")
ProviderType = val;
else
hash[key] = val;
}
}
public string this[string settingName]
{
get
{
return hash[settingName];
}
}
public int GetInt(string settingName)
{
int result;
Int32.TryParse(hash[settingName], out result);
return result;
}
public long GetLong(string settingName)
{
long result;
Int64.TryParse(hash[settingName], out result);
return result;
}
public bool GetBool(string settingName)
{
bool result;
Boolean.TryParse(hash[settingName], out result);
return result;
}
#region Public properties
public int ProviderGroupID
{
get { return this.providerGroupID; }
set { this.providerGroupID = value; }
}
public string ProviderCode
{
get { return this.providerCode; }
set { this.providerCode = value; }
}
public string ProviderName
{
get { return this.providerName; }
set { this.providerName = value; }
}
public string ProviderType
{
get { return this.providerType; }
set { this.providerType = value; }
}
public StringDictionary Settings
{
get { return hash; }
}
#endregion
}
}

View file

@ -0,0 +1,49 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Specialized;
using System.Web.Services.Protocols;
using System.Xml.Serialization;
namespace WebsitePanel.Providers
{
/// <summary>
/// Summary description for ServiceProviderSettings.
/// </summary>
public class ServiceProviderSettingsSoapHeader : SoapHeader
{
public string[] Settings;
/// <summary>
/// This property is just a flag telling us that this SOAP header should be encrypted.
/// </summary>
[XmlAttribute("SecureHeader", Namespace = "http://smbsaas/websitepanel/server/")]
public bool SecureHeader;
}
}

View file

@ -0,0 +1,62 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Providers
{
public class SettingPair
{
private string name;
private string value;
public SettingPair()
{
}
public SettingPair(string name, string value)
{
this.name = name;
this.value = value;
}
public string Name
{
get { return name; }
set { name = value; }
}
public string Value
{
get { return value; }
set { this.value = value; }
}
}
}

View file

@ -0,0 +1,206 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Reflection;
using System.Collections;
using System.Collections.Generic;
namespace WebsitePanel.Providers
{
/// <summary>
/// Summary description for SoapObject.
/// </summary>
[Serializable]
public class SoapServiceProviderItem
{
// static fields
private static Hashtable typeProperties = new Hashtable();
private string[] properties;
private string typeName;
public SoapServiceProviderItem()
{
}
public string[] Properties
{
get { return properties; }
set { properties = value; }
}
public string TypeName
{
get { return typeName; }
set { typeName = value; }
}
// static methods
public static SoapServiceProviderItem Wrap(ServiceProviderItem item)
{
if (item == null)
return null;
// wrap only "persistent" properties
SoapServiceProviderItem sobj = new SoapServiceProviderItem();
sobj.TypeName = item.GetType().AssemblyQualifiedName;
// add common properties
Hashtable props = GetObjectProperties(item, true);
props.Add("Id", item.Id.ToString());
props.Add("Name", item.Name);
props.Add("ServiceId", item.ServiceId.ToString());
props.Add("PackageId", item.PackageId.ToString());
List<string> wrProps = new List<string>();
foreach (string key in props.Keys)
{
wrProps.Add(key + "=" + props[key].ToString());
}
sobj.Properties = wrProps.ToArray();
return sobj;
}
public static ServiceProviderItem Unwrap(SoapServiceProviderItem sobj)
{
Type type = Type.GetType(sobj.TypeName);
ServiceProviderItem item = (ServiceProviderItem)Activator.CreateInstance(type);
// get properties
if (sobj.Properties != null)
{
// get type properties and add it to the hash
Dictionary<string, PropertyInfo> hash = new Dictionary<string, PropertyInfo>();
PropertyInfo[] propInfos = GetTypeProperties(type);
foreach (PropertyInfo propInfo in propInfos)
hash.Add(propInfo.Name, propInfo);
// set service item properties
foreach (string pair in sobj.Properties)
{
int idx = pair.IndexOf('=');
string name = pair.Substring(0, idx);
string val = pair.Substring(idx + 1);
if (hash.ContainsKey(name))
{
// set value
PropertyInfo propInfo = hash[name];
propInfo.SetValue(item, Cast(val, propInfo.PropertyType), null);
}
}
}
return item;
}
private static Hashtable GetObjectProperties(object obj, bool persistentOnly)
{
Hashtable hash = new Hashtable();
Type type = obj.GetType();
PropertyInfo[] props = type.GetProperties(BindingFlags.Instance
| BindingFlags.Public);
foreach (PropertyInfo prop in props)
{
// check for persistent attribute
object[] attrs = prop.GetCustomAttributes(typeof(PersistentAttribute), false);
if (!persistentOnly || (persistentOnly && attrs.Length > 0))
{
object val = prop.GetValue(obj, null);
string s = "";
if (val != null)
{
if (prop.PropertyType == typeof(string[]))
s = String.Join(";", (string[])val);
else if (prop.PropertyType == typeof(int[]))
{
int[] ivals = (int[])val;
string[] svals = new string[ivals.Length];
for (int i = 0; i < svals.Length; i++)
svals[i] = ivals[i].ToString();
s = String.Join(";", svals);
}
else
s = val.ToString();
}
// add property to hash
hash.Add(prop.Name, s);
}
}
return hash;
}
private static PropertyInfo[] GetTypeProperties(Type type)
{
string typeName = type.AssemblyQualifiedName;
if (typeProperties[typeName] != null)
return (PropertyInfo[])typeProperties[typeName];
PropertyInfo[] props = type.GetProperties(BindingFlags.Instance | BindingFlags.Public);
typeProperties[typeName] = props;
return props;
}
private static object Cast(string val, Type type)
{
if (type == typeof(string))
return val;
if (type == typeof(Int32))
return Int32.Parse(val);
if (type == typeof(Int64))
return Int64.Parse(val);
if (type == typeof(Boolean))
return Boolean.Parse(val);
if (type == typeof(Decimal))
return Decimal.Parse(val);
if (type == typeof(Guid))
return new Guid(val);
if (type.IsEnum)
return Enum.Parse(type, val, true);
if (type == typeof(string[]) && val != null)
{
return val.Split(';');
}
if (type == typeof(int[]) && val != null)
{
string[] sarr = val.Split(';');
int[] iarr = new int[sarr.Length];
for (int i = 0; i < sarr.Length; i++)
iarr[i] = Int32.Parse(sarr[i]);
return iarr;
}
else
return val;
}
}
}

View file

@ -0,0 +1,239 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Server
{
public class TerminalSession
{
private int sessionId;
private string username;
private string status;
public int SessionId
{
get { return this.sessionId; }
set { this.sessionId = value; }
}
public string Username
{
get { return this.username; }
set { this.username = value; }
}
public string Status
{
get { return this.status; }
set { this.status = value; }
}
}
public class WindowsProcess
{
private int pid;
private string name;
private string username;
private long cpuUsage;
private long memUsage;
public int Pid
{
get { return this.pid; }
set { this.pid = value; }
}
public string Name
{
get { return this.name; }
set { this.name = value; }
}
public string Username
{
get { return this.username; }
set { this.username = value; }
}
public long CpuUsage
{
get { return this.cpuUsage; }
set { this.cpuUsage = value; }
}
public long MemUsage
{
get { return this.memUsage; }
set { this.memUsage = value; }
}
}
public class WindowsService
{
private string id;
private string name;
private WindowsServiceStatus status;
private bool canStop;
private bool canPauseAndContinue;
public WindowsService()
{
}
public string Name
{
get { return this.name; }
set { this.name = value; }
}
public WindowsServiceStatus Status
{
get { return this.status; }
set { this.status = value; }
}
public bool CanStop
{
get { return this.canStop; }
set { this.canStop = value; }
}
public bool CanPauseAndContinue
{
get { return this.canPauseAndContinue; }
set { this.canPauseAndContinue = value; }
}
public string Id
{
get { return this.id; }
set { this.id = value; }
}
}
public enum WindowsServiceStatus
{
ContinuePending = 1,
Paused = 2,
PausePending = 3,
Running = 4,
StartPending = 5,
Stopped = 6,
StopPending = 7
}
public class SystemLogEntriesPaged
{
private int count;
private SystemLogEntry[] entries;
public int Count
{
get { return count; }
set { count = value; }
}
public SystemLogEntry[] Entries
{
get { return entries; }
set { entries = value; }
}
}
public class SystemLogEntry
{
private SystemLogEntryType entryType;
private DateTime created;
private string source;
private string category;
private long eventId;
private string userName;
private string machineName;
private string message;
public SystemLogEntryType EntryType
{
get { return entryType; }
set { entryType = value; }
}
public DateTime Created
{
get { return created; }
set { created = value; }
}
public string Source
{
get { return source; }
set { source = value; }
}
public string Category
{
get { return category; }
set { category = value; }
}
public string UserName
{
get { return userName; }
set { userName = value; }
}
public string MachineName
{
get { return machineName; }
set { machineName = value; }
}
public long EventID
{
get { return eventId; }
set { eventId = value; }
}
public string Message
{
get { return message; }
set { message = value; }
}
}
public enum SystemLogEntryType
{
Information,
Warning,
Error,
SuccessAudit,
FailureAudit
}
}

View file

@ -0,0 +1,73 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Providers.DNS
{
public class DnsRecord
{
private string recordName;
private DnsRecordType recordType;
private string recordData;
private int mxPriority;
private string recordText;
public string RecordName
{
get { return this.recordName; }
set { this.recordName = value; }
}
public DnsRecordType RecordType
{
get { return this.recordType; }
set { this.recordType = value; }
}
public string RecordData
{
get { return this.recordData; }
set { this.recordData = value; }
}
public int MxPriority
{
get { return this.mxPriority; }
set { this.mxPriority = value; }
}
public string RecordText
{
get { return this.recordText; }
set { this.recordText = value; }
}
}
}

View file

@ -0,0 +1,45 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Providers.DNS
{
public enum DnsRecordType
{
A,
NS,
MX,
CNAME,
SOA,
TXT,
Other
}
}

View file

@ -0,0 +1,64 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
namespace WebsitePanel.Providers.DNS
{
/// <summary>
/// Summary description for DnsSOARecord.
/// </summary>
public class DnsSOARecord : DnsRecord
{
private string primaryNsServer;
private string primaryPerson;
private string serialNumber;
public DnsSOARecord()
{
}
public string PrimaryNsServer
{
get { return this.primaryNsServer; }
set { this.primaryNsServer = value; }
}
public string PrimaryPerson
{
get { return this.primaryPerson; }
set { this.primaryPerson = value; }
}
public string SerialNumber
{
get { return this.serialNumber; }
set { this.serialNumber = value; }
}
}
}

View file

@ -0,0 +1,43 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
namespace WebsitePanel.Providers.DNS
{
/// <summary>
/// Summary description for DnsZoneItem.
/// </summary>
[Serializable]
public class DnsZone : ServiceProviderItem
{
public DnsZone()
{
}
}
}

View file

@ -0,0 +1,56 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
namespace WebsitePanel.Providers.DNS
{
/// <summary>
/// Summary description for IDnsServer.
/// </summary>
public interface IDnsServer
{
// Zones
bool ZoneExists(string zoneName);
string[] GetZones();
void AddPrimaryZone(string zoneName, string[] secondaryServers);
void AddSecondaryZone(string zoneName, string[] masterServers);
void DeleteZone(string zoneName);
void UpdateSoaRecord(string zoneName, string host, string primaryNsServer,
string primaryPerson);
// Zone Records
DnsRecord[] GetZoneRecords(string zoneName);
void AddZoneRecord(string zoneName, DnsRecord record);
void AddZoneRecords(string zoneName, DnsRecord[] records);
void DeleteZoneRecord(string zoneName, DnsRecord record);
void DeleteZoneRecords(string zoneName, DnsRecord[] records);
}
}

View file

@ -0,0 +1,37 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
namespace WebsitePanel.Providers.DNS
{
[Serializable]
public class SecondaryDnsZone : DnsZone
{
}
}

View file

@ -0,0 +1,68 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Data;
namespace WebsitePanel.Providers.Database
{
/// <summary>
/// Summary description for IMsSqlProvider.
/// </summary>
public interface IDatabaseServer
{
// databases
bool CheckConnectivity(string databaseName, string username, string password);
DataSet ExecuteSqlQuery(string databaseName, string commandText);
void ExecuteSqlNonQuery(string databaseName, string commandText);
DataSet ExecuteSqlQuerySafe(string databaseName, string username, string password, string commandText);
void ExecuteSqlNonQuerySafe(string databaseName, string username, string password, string commandText);
bool DatabaseExists(string databaseName);
string[] GetDatabases();
SqlDatabase GetDatabase(string databaseName);
void CreateDatabase(SqlDatabase database);
void UpdateDatabase(SqlDatabase database);
void DeleteDatabase(string databaseName);
// database maintenaince
void TruncateDatabase(string databaseName);
byte[] GetTempFileBinaryChunk(string path, int offset, int length);
string AppendTempFileBinaryChunk(string fileName, string path, byte[] chunk);
string BackupDatabase(string databaseName, string backupFileName, bool zipBackupFile);
void RestoreDatabase(string databaseName, string[] fileNames);
// users
bool UserExists(string userName);
string[] GetUsers();
SqlUser GetUser(string username, string[] databases);
void CreateUser(SqlUser user, string password);
void UpdateUser(SqlUser user, string[] databases);
void DeleteUser(string username, string[] databases);
void ChangeUserPassword(string username, string password);
}
}

View file

@ -0,0 +1,96 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
namespace WebsitePanel.Providers.Database
{
public class SqlDatabase : ServiceProviderItem
{
private string dataName;
private string dataPath;
private int dataSize;
private string logName;
private string logPath;
private int logSize;
private string[] users;
private string location;
public SqlDatabase()
{
}
public string DataName
{
get { return dataName; }
set { dataName = value; }
}
public string DataPath
{
get { return dataPath; }
set { dataPath = value; }
}
public int DataSize
{
get { return dataSize; }
set { dataSize = value; }
}
public string LogName
{
get { return logName; }
set { logName = value; }
}
public string LogPath
{
get { return logPath; }
set { logPath = value; }
}
public int LogSize
{
get { return logSize; }
set { logSize = value; }
}
public string[] Users
{
get { return users; }
set { users = value; }
}
public string Location
{
get { return this.location; }
set { this.location = value; }
}
}
}

View file

@ -0,0 +1,62 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
namespace WebsitePanel.Providers.Database
{
public class SqlUser : ServiceProviderItem
{
private string defaultDatabase;
private string[] databases;
private string password;
public SqlUser()
{
}
public string DefaultDatabase
{
get { return defaultDatabase; }
set { defaultDatabase = value; }
}
public string[] Databases
{
get { return databases; }
set { databases = value; }
}
[Persistent]
public string Password
{
get { return this.password; }
set { this.password = value; }
}
}
}

View file

@ -0,0 +1,43 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Providers.ExchangeHostedEdition
{
public class ExchangeOrganization : ServiceProviderItem
{
// basic props
public string ExchangeControlPanelUrl { get; set; }
public string DistinguishedName { get; set; }
public string ServicePlan { get; set; }
public string ProgramId { get; set; }
public string OfferId { get; set; }
public string AdministratorName { get; set; }
public string AdministratorEmail { get; set; }
// domains
public ExchangeOrganizationDomain[] Domains { get; set; }
// this is real usage
public int MailboxCount { get; set; }
public int ContactCount { get; set; }
public int DistributionListCount { get; set; }
// these quotas are set in Exchange for the organization
public int MailboxCountQuota { get; set; }
public int ContactCountQuota { get; set; }
public int DistributionListCountQuota { get; set; }
// these quotas are set in the hosting plan + add-ons
public int MaxDomainsCountQuota { get; set; }
public int MaxMailboxCountQuota { get; set; }
public int MaxContactCountQuota { get; set; }
public int MaxDistributionListCountQuota { get; set; }
// summary information
public string SummaryInformation { get; set; }
[Persistent]
public string CatchAllAddress { get; set; }
}
}

View file

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Providers.ExchangeHostedEdition
{
public class ExchangeOrganizationDomain
{
public string Identity { get; set; }
public string Name { get; set; }
public bool IsDefault { get; set; }
public bool IsTemp { get; set; }
}
}

View file

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Providers.ExchangeHostedEdition
{
public interface IExchangeHostedEdition
{
void CreateOrganization(string organizationId, string programId, string offerId,
string domain, string adminName, string adminEmail, string adminPassword);
ExchangeOrganization GetOrganizationDetails(string organizationId);
List<ExchangeOrganizationDomain> GetOrganizationDomains(string organizationId);
void AddOrganizationDomain(string organizationId, string domain);
void DeleteOrganizationDomain(string organizationId, string domain);
void UpdateOrganizationQuotas(string organizationId, int mailboxesNumber, int contactsNumber, int distributionListsNumber);
void UpdateOrganizationCatchAllAddress(string organizationId, string catchAllEmail);
void UpdateOrganizationServicePlan(string organizationId, string programId, string offerId);
void DeleteOrganization(string organizationId);
}
}

View file

@ -0,0 +1,93 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Xml.Serialization;
namespace WebsitePanel.Providers.FTP
{
/// <summary>
/// Summary description for FtpDirectoryItem.
/// </summary>
[Serializable]
public class FtpAccount : ServiceProviderItem
{
private bool canRead;
private bool canWrite;
private string folder;
private string password;
private bool enabled;
public FtpAccount()
{
}
[Persistent]
public bool CanRead
{
get { return canRead; }
set { canRead = value; }
}
[Persistent]
public bool CanWrite
{
get { return canWrite; }
set { canWrite = value; }
}
[Persistent]
public string Folder
{
get { return folder; }
set { folder = value; }
}
[Persistent]
public string Password
{
get { return password; }
set { password = value; }
}
public bool Enabled
{
get { return this.enabled; }
set { this.enabled = value; }
}
[XmlIgnore]
public string VirtualPath
{
get
{
return String.Format("/{0}", Name);
}
}
}
}

View file

@ -0,0 +1,144 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Net;
using System.ComponentModel;
using System.Collections;
using System.Collections.Specialized;
using System.Text;
namespace WebsitePanel.Providers.FTP
{
[Serializable]
public class FtpSite : ServiceProviderItem
{
private string siteId;
private ServerBinding[] bindings = new ServerBinding[0];
private bool allowAnonymous;
private bool allowExecuteAccess;
private bool allowScriptAccess;
private bool allowSourceAccess;
private bool allowReadAccess;
private bool allowWriteAccess;
private string anonymousUsername;
private string anonymousUserPassword;
private string contentPath;
private string logFileDirectory;
private bool anonymousOnly;
public const string MSFTP7_SITE_ID = "MsFtp7_SiteId";
public const string MSFTP7_LOG_EXT_FILE_FIELDS = "MsFtp7_LogExtFileFields";
public FtpSite()
{
}
[Persistent]
public string SiteId
{
set { siteId = value; }
get { return siteId; }
}
public ServerBinding[] Bindings
{
set { bindings = value; }
get { return bindings; }
}
public bool AllowScriptAccess
{
get { return allowScriptAccess; }
set { allowScriptAccess = value; }
}
public bool AllowSourceAccess
{
get { return allowSourceAccess; }
set { allowSourceAccess = value; }
}
public bool AllowReadAccess
{
get { return allowReadAccess; }
set { allowReadAccess = value; }
}
public bool AllowWriteAccess
{
get { return allowWriteAccess; }
set { allowWriteAccess = value; }
}
public string LogFileDirectory
{
get { return logFileDirectory; }
set { logFileDirectory = value; }
}
public string AnonymousUsername
{
get { return anonymousUsername; }
set { anonymousUsername = value; }
}
public string AnonymousUserPassword
{
get { return anonymousUserPassword; }
set { anonymousUserPassword = value; }
}
public bool AllowAnonymous
{
get { return allowAnonymous; }
set { allowAnonymous = value; }
}
public bool AllowExecuteAccess
{
get { return allowExecuteAccess; }
set { allowExecuteAccess = value; }
}
public string ContentPath
{
get { return contentPath; }
set { contentPath = value; }
}
public bool AnonymousOnly
{
set { anonymousOnly = value; }
get { return anonymousOnly; }
}
}
}

View file

@ -0,0 +1,57 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections;
namespace WebsitePanel.Providers.FTP
{
/// <summary>
/// Summary description for IFtpServer.
/// </summary>
public interface IFtpServer
{
// sites
void ChangeSiteState(string siteId, ServerState state);
ServerState GetSiteState(string siteId);
bool SiteExists(string siteId);
FtpSite[] GetSites();
FtpSite GetSite(string siteId);
string CreateSite(FtpSite site);
void UpdateSite(FtpSite site);
void DeleteSite(string siteId);
// accounts
bool AccountExists(string accountName);
FtpAccount[] GetAccounts();
FtpAccount GetAccount(string accountName);
void CreateAccount(FtpAccount account);
void UpdateAccount(FtpAccount account);
void DeleteAccount(string accountName);
}
}

View file

@ -0,0 +1,66 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace WebsitePanel.Providers.HostedSolution
{
public class ADAttributes
{
public const string Initials = "initials";
public const string JobTitle = "title";
public const string Company = "company";
public const string Department = "department";
public const string Office = "physicalDeliveryOfficeName";
public const string BusinessPhone = "telephoneNumber";
public const string Fax = "facsimileTelephoneNumber";
public const string HomePhone = "homePhone";
public const string MobilePhone = "mobile";
public const string Pager = "pager";
public const string WebPage = "wWWHomePage";
public const string Address = "streetAddress";
public const string City = "l";
public const string State = "st";
public const string Zip = "postalCode";
public const string Country = "c";
public const string Notes = "info";
public const string FirstName = "givenName";
public const string LastName = "sn";
public const string DisplayName = "displayName";
public const string AccountDisabled = "AccountDisabled";
public const string AccountLocked = "IsAccountLocked";
public const string Manager = "manager";
public const string SetPassword = "SetPassword";
public const string SAMAccountName = "sAMAccountName";
public const string UserPrincipalName = "UserPrincipalName";
public const string GroupType = "GroupType";
public const string Name = "Name";
public const string ExternalEmail = "mail";
public const string CustomAttribute2 = "extensionAttribute2";
public const string DistinguishedName = "distinguishedName";
}
}

View file

@ -0,0 +1,394 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.DirectoryServices;
using System.DirectoryServices.ActiveDirectory;
using System.Globalization;
using System.Text;
namespace WebsitePanel.Providers.HostedSolution
{
public class ActiveDirectoryUtils
{
public static DirectoryEntry GetADObject(string path)
{
DirectoryEntry de = new DirectoryEntry(path);
de.RefreshCache();
return de;
}
public static bool IsUserInGroup(string samAccountName, string group)
{
bool res = false;
DirectorySearcher deSearch = new DirectorySearcher
{
Filter =
("(&(objectClass=user)(samaccountname=" + samAccountName + "))")
};
//get the group result
SearchResult results = deSearch.FindOne();
DirectoryEntry de = results.GetDirectoryEntry();
PropertyValueCollection props = de.Properties["memberOf"];
foreach (string str in props)
{
if (str.IndexOf(group) != -1)
{
res = true;
break;
}
}
return res;
}
public static string CreateOrganizationalUnit(string name, string parentPath)
{
string ret;
DirectoryEntry ou = null;
DirectoryEntry parent = null;
try
{
parent = GetADObject(parentPath);
ou = parent.Children.Add(
string.Format("OU={0}", name),
parent.SchemaClassName);
ret = ou.Path;
ou.CommitChanges();
}
finally
{
if (ou != null)
ou.Close();
if (parent != null)
parent.Close();
}
return ret;
}
public static void DeleteADObject(string path, bool removeChild)
{
DirectoryEntry entry = GetADObject(path);
if (removeChild && entry.Children != null)
foreach (DirectoryEntry child in entry.Children)
{
entry.Children.Remove(child);
}
DirectoryEntry parent = entry.Parent;
if (parent != null)
{
parent.Children.Remove(entry);
parent.CommitChanges();
}
}
public static void DeleteADObject(string path)
{
DirectoryEntry entry = GetADObject(path);
DirectoryEntry parent = entry.Parent;
if (parent != null)
{
parent.Children.Remove(entry);
parent.CommitChanges();
}
}
public static void SetADObjectProperty(DirectoryEntry oDE, string name, string value)
{
if (!string.IsNullOrEmpty(value))
{
if (oDE.Properties.Contains(name))
{
oDE.Properties[name][0] = value;
}
else
{
oDE.Properties[name].Add(value);
}
}
else
{
if (oDE.Properties.Contains(name))
{
oDE.Properties[name].Remove(oDE.Properties[name][0]);
}
}
}
public static void SetADObjectPropertyValue(DirectoryEntry oDE, string name, object value)
{
PropertyValueCollection collection = oDE.Properties[name];
collection.Value = value;
}
public static object GetADObjectProperty(DirectoryEntry entry, string name)
{
return entry.Properties.Contains(name) ? entry.Properties[name][0] : null;
}
public static string GetADObjectStringProperty(DirectoryEntry entry, string name)
{
object ret = GetADObjectProperty(entry, name);
return ret != null ? ret.ToString() : string.Empty;
}
public static string ConvertADPathToCanonicalName(string name)
{
if (string.IsNullOrEmpty(name))
return null;
StringBuilder ret = new StringBuilder();
List<string> cn = new List<string>();
List<string> dc = new List<string>();
name = RemoveADPrefix(name);
string[] parts = name.Split(',');
for (int i = 0; i < parts.Length; i++)
{
if (parts[i].StartsWith("DC="))
{
dc.Add(parts[i].Substring(3));
}
else if (parts[i].StartsWith("OU=") || parts[i].StartsWith("CN="))
{
cn.Add(parts[i].Substring(3));
}
}
for (int i = 0; i < dc.Count; i++)
{
ret.Append(dc[i]);
if (i < dc.Count - 1)
ret.Append(".");
}
for (int i = cn.Count - 1; i != -1; i--)
{
ret.Append("/");
ret.Append(cn[i]);
}
return ret.ToString();
}
public static string ConvertDomainName(string name)
{
if (string.IsNullOrEmpty(name))
return null;
StringBuilder ret = new StringBuilder("LDAP://");
string[] parts = name.Split('.');
for (int i = 0; i < parts.Length; i++)
{
ret.Append("DC=");
ret.Append(parts[i]);
if (i < parts.Length - 1)
ret.Append(",");
}
return ret.ToString();
}
public static string GetNETBIOSDomainName(string rootDomain)
{
string ret = string.Empty;
string path = string.Format("LDAP://{0}/RootDSE", rootDomain);
DirectoryEntry rootDSE = GetADObject(path);
string contextPath = GetADObjectProperty(rootDSE, "ConfigurationNamingContext").ToString();
string defaultContext = GetADObjectProperty(rootDSE, "defaultNamingContext").ToString();
DirectoryEntry partitions = GetADObject("LDAP://cn=Partitions," + contextPath);
DirectorySearcher searcher = new DirectorySearcher();
searcher.SearchRoot = partitions;
searcher.Filter = string.Format("(&(objectCategory=crossRef)(nCName={0}))", defaultContext);
searcher.SearchScope = SearchScope.OneLevel;
//find the first instance
SearchResult result = searcher.FindOne();
if (result != null)
{
DirectoryEntry partition = GetADObject(result.Path);
ret = GetADObjectProperty(partition, "nETBIOSName").ToString();
partition.Close();
}
partitions.Close();
rootDSE.Close();
return ret;
}
public static string CreateUser(string path, string user, string displayName, string password, bool enabled)
{
DirectoryEntry currentADObject = new DirectoryEntry(path);
DirectoryEntry newUserObject = currentADObject.Children.Add("CN=" + user, "User");
newUserObject.Properties[ADAttributes.SAMAccountName].Add(user);
SetADObjectProperty(newUserObject, ADAttributes.DisplayName, displayName);
newUserObject.CommitChanges();
newUserObject.Invoke(ADAttributes.SetPassword, password);
newUserObject.InvokeSet(ADAttributes.AccountDisabled, !enabled);
newUserObject.CommitChanges();
return newUserObject.Path;
}
public static void CreateGroup(string path, string group)
{
DirectoryEntry currentADObject = new DirectoryEntry(path);
DirectoryEntry newGroupObject = currentADObject.Children.Add("CN=" + group, "Group");
newGroupObject.Properties[ADAttributes.SAMAccountName].Add(group);
newGroupObject.Properties[ADAttributes.GroupType].Add(-2147483640);
newGroupObject.CommitChanges();
}
public static void AddUserToGroup(string userPath, string groupPath)
{
DirectoryEntry user = new DirectoryEntry(userPath);
DirectoryEntry group = new DirectoryEntry(groupPath);
group.Invoke("Add", user.Path);
}
public static bool AdObjectExists(string path)
{
return DirectoryEntry.Exists(path);
}
public static string RemoveADPrefix(string path)
{
string dn = path;
if (dn.ToUpper().StartsWith("LDAP://"))
{
dn = dn.Substring(7);
}
int index = dn.IndexOf("/");
if (index != -1)
{
dn = dn.Substring(index + 1);
}
return dn;
}
public static string AddADPrefix(string path, string primaryDomainController)
{
string dn = path;
if (!dn.ToUpper().StartsWith("LDAP://"))
{
if (string.IsNullOrEmpty(primaryDomainController))
{
dn = string.Format("LDAP://{0}", dn);
}
else
dn = string.Format("LDAP://{0}/{1}", primaryDomainController, dn);
}
return dn;
}
public static string AddADPrefix(string path)
{
return AddADPrefix(path, null);
}
private static void AddADObjectProperty(DirectoryEntry oDE, string name, string value)
{
if (!string.IsNullOrEmpty(value))
{
oDE.Properties[name].Add(value);
}
}
public static void AddUPNSuffix(string ouPath, string suffix)
{
//Add UPN Suffix to the OU
DirectoryEntry ou = GetADObject(ouPath);
AddADObjectProperty(ou, "uPNSuffixes", suffix);
ou.CommitChanges();
ou.Close();
}
public static void RemoveUPNSuffix(string ouPath, string suffix)
{
if (DirectoryEntry.Exists(ouPath))
{
DirectoryEntry ou = GetADObject(ouPath);
PropertyValueCollection prop = null;
prop = ou.Properties["uPNSuffixes"];
if (prop != null)
{
if (ou.Properties["uPNSuffixes"].Contains(suffix))
{
ou.Properties["uPNSuffixes"].Remove(suffix);
ou.CommitChanges();
}
ou.Close();
}
}
}
public static string GetDomainName(string userName)
{
string str4;
string filter = string.Format(CultureInfo.InvariantCulture, "(&(objectClass=user)(Name={0}))", new object[] { userName });
using (DirectoryEntry entry = Domain.GetComputerDomain().GetDirectoryEntry())
{
using (DirectorySearcher searcher = new DirectorySearcher(entry, filter))
{
searcher.PropertiesToLoad.Add("sAMAccountName");
string str2 = searcher.FindOne().Properties["sAMAccountName"][0] as string;
str4 = string.Format(CultureInfo.InvariantCulture, @"{0}\{1}", new object[] { entry.Properties["Name"].Value as string, str2 });
}
}
return str4;
}
}
}

View file

@ -0,0 +1,202 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
namespace WebsitePanel.Providers.HostedSolution
{
public abstract class BaseReport<T> where T : BaseStatistics
{
private List<T> items = new List<T>();
public List<T> Items
{
get { return items; }
}
public abstract string ToCSV();
/// <summary>
/// Converts source string into CSV string.
/// </summary>
/// <param name="source">Source string.</param>
/// <returns>CSV string.</returns>
protected static string ToCsvString(string source)
{
string ret = source;
if (!string.IsNullOrEmpty(source))
{
if (source.IndexOf(',') >= 0 || source.IndexOf('"') >= 0)
ret = "\"" + source.Replace("\"", "\"\"") + "\"";
}
return ret;
}
/// <summary>
/// Converts DateTime string into CSV string.
/// </summary>
/// <param name="date">Value.</param>
/// <returns>CSV string.</returns>
protected static string ToCsvString(DateTime date)
{
string ret = string.Empty;
if (date != DateTime.MinValue)
{
ret = date.ToString("G");
}
return ToCsvString(ret);
}
/// <summary>
/// Converts long value into CSV string.
/// </summary>
/// <param name="val">Value.</param>
/// <returns>CSV string.</returns>
protected static string ToCsvString(long val)
{
return ToCsvString(val.ToString());
}
/// <summary>
/// Converts int value into CSV string.
/// </summary>
/// <param name="val">Value.</param>
/// <returns>CSV string.</returns>
protected static string ToCsvString(int val)
{
return ToCsvString(val.ToString());
}
/// <summary>
/// Converts unlimited int value into CSV string.
/// </summary>
/// <param name="val">Value.</param>
/// <returns>CSV string.</returns>
protected static string UnlimitedToCsvString(int val)
{
string ret = string.Empty;
ret = (val == -1) ? "Unlimited" : val.ToString();
return ToCsvString(ret);
}
/// <summary>
/// Converts unlimited long value into CSV string.
/// </summary>
/// <param name="val">Value.</param>
/// <returns>CSV string.</returns>
protected static string UnlimitedToCsvString(long val)
{
string ret = string.Empty;
ret = (val == -1) ? "Unlimited" : val.ToString();
return ToCsvString(ret);
}
/// <summary>
/// Converts unlimited long value into CSV string.
/// </summary>
/// <param name="val">Value.</param>
/// <returns>CSV string.</returns>
protected static string UnlimitedToCsvString(double val)
{
string ret = string.Empty;
ret = (val == -1d) ? ToCsvString("Unlimited") : ToCsvString(val);
return ret;
}
/// <summary>
/// Converts double value into CSV string.
/// </summary>
/// <param name="val">Value.</param>
/// <returns>CSV string.</returns>
protected static string ToCsvString(double val)
{
return ToCsvString(val.ToString("F"));
}
/// <summary>
/// Converts boolean value into CSV string.
/// </summary>
/// <param name="val">Value.</param>
/// <returns>CSV string.</returns>
protected static string ToCsvString(bool val, string trueValue, string falseValue)
{
return ToCsvString(val ? trueValue : falseValue);
}
/// <summary>
/// Converts boolean value into CSV string.
/// </summary>
/// <param name="val">Value.</param>
/// <returns>CSV string.</returns>
protected static string ToCsvString(bool val)
{
return ToCsvString(val, "Enabled", "Disabled");
}
/// <summary>
/// Converts value into CSV string.
/// </summary>
/// <param name="val">Value.</param>
/// <returns>CSV string.</returns>
protected static string ToCsvString(ExchangeAccountType val)
{
string ret = string.Empty;
switch (val)
{
case ExchangeAccountType.Contact:
ret = "Contact";
break;
case ExchangeAccountType.DistributionList:
ret = "Distribution List";
break;
case ExchangeAccountType.Equipment:
ret = "Equipment Mailbox";
break;
case ExchangeAccountType.Mailbox:
ret = "User Mailbox";
break;
case ExchangeAccountType.PublicFolder:
ret = "Public Folder";
break;
case ExchangeAccountType.Room:
ret = "Room Mailbox";
break;
case ExchangeAccountType.User:
ret = "User";
break;
default:
ret = "Undefined";
break;
}
return ToCsvString(ret);
}
}
}

View file

@ -0,0 +1,50 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
namespace WebsitePanel.Providers.HostedSolution
{
public class BaseStatistics
{
public string TopResellerName { get; set; }
public string ResellerName { get; set; }
public string CustomerName { get; set; }
public DateTime CustomerCreated { get; set; }
public string HostingSpace { get; set; }
public string OrganizationName { get; set; }
public DateTime OrganizationCreated { get; set; }
public string OrganizationID { get; set; }
public DateTime HostingSpaceCreated
{
get;
set;
}
}
}

View file

@ -0,0 +1,85 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace WebsitePanel.Providers.HostedSolution
{
public class BlackBerryErrorsCodes
{
public const string ACCOUNT_TYPE_IS_NOT_MAILBOX = "ACCOUNT_TYPE_IS_NOT_MAILBOX";
public const string CANNOT_ADD_BLACKBERRY_USER_TO_DATABASE = "CANNOT_ADD_BLACKBERRY_USER_TO_DATABASE";
public const string USER_IS_ALREADY_BLAKBERRY_USER = "USER_IS_ALREADY_BLAKBERRY_USER";
public const string CANNOT_CHECK_IF_BLACKBERRY_USER_EXISTS = "CANNOT_CHECK_IF_BLACKBERRY_USER_EXISTS";
public const string FILE_PATH_IS_INVALID = "FILE_PATH_IS_INVALID";
public const string CANNOT_EXECUTE_COMMAND = "CANNOT_EXECUTE_COMMAND";
public const string CANNOT_GET_BLACKBERRY_PROXY = "CANNOT_GET_BLACKBERRY_PROXY";
public const string CANNOT_ADD_BLACKBERRY_USER = "CANNOT_ADD_BLACKBERRY_USER";
public const string CANNOT_DELETE_BLACKBERRY_USER = "CANNOT_DELETE_BLACKBERRY_USER";
public const string CANNOT_DELETE_BLACKBERRY_USER_FROM_METADATA = "CANNOT_DELETE_BLACKBERRY_USER_FROM_METADATA";
public const string USER_LAST_NAME_IS_NOT_SPECIFIED = "USER_LAST_NAME_IS_NOT_SPECIFIED";
public const string USER_FIRST_NAME_IS_NOT_SPECIFIED = "USER_FIRST_NAME_IS_NOT_SPECIFIED";
public const string CANNOT_CHECK_QUOTA = "CANNOT_CHECK_QUOTA";
public const string USER_QUOTA_HAS_BEEN_REACHED = "USER_QUOTA_HAS_BEEN_REACHED";
public const string CANNOT_POPULATE_STATS = "CANNOT_POPULATE_STATS";
public const string CANNOT_GET_USER_STATS = "CANNOT_GET_USER_STATS";
public const string CANNOT_DELETE_DATA_FROM_BLACKBERRY_DEVICE = "CANNOT_DELETE_DATA_FROM_BLACKBERRY_DEVICE";
public const string CANNOT_SET_EMAIL_ACTIVATION_PASSWORD = "CANNOT_SET_EMAIL_ACTIVATION_PASSWORD";
public const string CANNOT_SET_ACTIVATION_PASSWORD = "CANNOT_SET_ACTIVATION_PASSWORD";
public const string BLACKBERRY_LICENSE_NOT_FOUND = "BLACKBERRY_LICENSE_NOT_FOUND";
public const string BLACKBERRY_LICENSE_BLOCKED = "BLACKBERRY_LICENSE_BLOCKED";
public const string CANNOT_CHECK_BLACKBERRY_LICENSE = "CANNOT_CHECK_BLACKBERRY_LICENSE";
public const string CANNOT_GET_USER_GENERAL_SETTINGS = "CANNOT_GET_USER_GENERAL_SETTINGS";
public const string CANNOT_SPLIT_STATS = "CANNOT_SPLIT_STATS";
public const string ADMINISTRATION_TOOL_SERVICE_IS_INVALID = "ADMINISTRATION_TOOL_SERVICE_IS_INVALID";
}
}

View file

@ -0,0 +1,38 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

namespace WebsitePanel.Providers.HostedSolution
{
public class BlackBerryStatsItem
{
public string Name { get; set; }
public string Value { get; set; }
}
}

View file

@ -0,0 +1,36 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace WebsitePanel.Providers.HostedSolution
{
public enum BlackBerryUserDeleteState
{
Pending,
None
}
}

View file

@ -0,0 +1,51 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
namespace WebsitePanel.Providers.HostedSolution
{
public class CRMBusinessUnit
{
private Guid businessUnitId;
private string businessUnitName;
public Guid BusinessUnitId
{
get { return businessUnitId; }
set { businessUnitId = value; }
}
public string BusinessUnitName
{
get { return businessUnitName; }
set { businessUnitName = value; }
}
}
}

View file

@ -0,0 +1,40 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
namespace WebsitePanel.Providers.HostedSolution
{
public class CRMOrganizationStatistics : BaseStatistics
{
public Guid CRMOrganizationId { get; set; }
public string CRMUserName { get; set; }
public CRMUserAccessMode ClientAccessMode { get; set; }
public bool CRMDisabled { get; set; }
}
}

View file

@ -0,0 +1,67 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System.Text;
namespace WebsitePanel.Providers.HostedSolution
{
public class CRMStatisticsReport : BaseReport<CRMOrganizationStatistics>
{
public override string ToCSV()
{
StringBuilder mainBuilder = new StringBuilder();
AddCSVHeader(mainBuilder);
foreach (CRMOrganizationStatistics item in Items)
{
StringBuilder sb = new StringBuilder();
sb.Append("\n");
sb.AppendFormat("{0},", ToCsvString(item.TopResellerName));
sb.AppendFormat("{0},", ToCsvString(item.ResellerName));
sb.AppendFormat("{0},", ToCsvString(item.CustomerName));
sb.AppendFormat("{0},", ToCsvString(item.CustomerCreated));
sb.AppendFormat("{0},", ToCsvString(item.HostingSpace));
sb.AppendFormat("{0},", ToCsvString(item.HostingSpaceCreated));
sb.AppendFormat("{0},", ToCsvString(item.OrganizationName));
sb.AppendFormat("{0},", ToCsvString(item.OrganizationCreated));
sb.AppendFormat("{0},", ToCsvString(item.OrganizationID));
sb.AppendFormat("{0},", ToCsvString(item.CRMOrganizationId.ToString()));
sb.AppendFormat("{0},", ToCsvString(item.CRMUserName));
sb.AppendFormat("{0},", ToCsvString(item.ClientAccessMode.ToString()));
sb.AppendFormat("{0}", ToCsvString(!item.CRMDisabled));
mainBuilder.Append(sb.ToString());
}
return mainBuilder.ToString();
}
private static void AddCSVHeader(StringBuilder sb)
{
sb.Append("Top Reseller,Reseller,Customer,Customer Created,Hosting Space,Hosting Space Created,Ogranization Name,Ogranization Created,Organization ID, CRM Organization ID, User Name, CAL, User State" );
}
}
}

View file

@ -0,0 +1,37 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace WebsitePanel.Providers.HostedSolution
{
public enum CRMUserAccessMode
{
Full,
Administrative,
ReadOnly
}
}

View file

@ -0,0 +1,175 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace WebsitePanel.Providers.HostedSolution
{
public class CrmErrorCodes
{
public const string CRM_SQL_SERVER_ERROR = "CRM_SQL_SERVER_ERROR";
public const string CRM_ORGANIZATION_ALREADY_EXISTS = "CRM_ORGANIZATION_ALREADY_EXISTS";
public const string CRM_REPORT_SERVER_ERROR = "CRM_REPORT_SERVER_ERROR";
public const string CRM_PERMISSIONS_ERROR = "CRM_PERMISSIONS_ERROR";
public const string CANNOT_CREATE_CRM_ORGANIZATION = "CANNOT_CREATE_CRM_ORGANIZATION";
public const string DNS_SERVER_IS_NOT_SELECTED_IN_HOSTIN_PLAN = "DNS_SERVER_IS_NOT_SELECTED_IN_HOSTIN_PLAN";
public const string CANNOT_CREATE_CRM_ORGANIZATION_DOMAIN = "CANNOT_CREATE_CRM_ORGANIZATION_DOMAIN";
public const string CANNOT_CREATE_DNS_ZONE = "CANNOT_CREATE_DNS_ZONE";
public const string CREATE_CRM_ORGANIZATION_DOMAIN_GENERAL_ERROR = "CREATE_CRM_ORGANIZATION_DOMAIN_GENERAL_ERROR";
public const string CREATE_CRM_ORGANIZATION_GENERAL_ERROR = "CREATE_CRM_ORGANIZATION_GENERAL_ERROR";
public const string CANNOT_CHANGE_CRM_ORGANIZATION_STATE = "CANNOT_CHANGE_CRM_ORGANIZATION_STATE";
public const string CANNOT_DELETE_CRM_ORGANIZATION = "CANNOT_DELETE_CRM_ORGANIZATION";
public const string DELETE_CRM_ORGANIZATION_GENERAL_ERROR = "DELETE_CRM_ORGANIZATION_GENERAL_ERROR";
public const string CRM_LICENSE_NOT_FOUND = "CRM_LICENSE_NOT_FOUND";
public const string CRM_LICENSE_BLOCKED = "CRM_LICENSE_BLOCKED";
public const string DELETE_DNS_RECORD_ERROR = "DELETE_DNS_RECORD_ERROR";
public const string CANNOT_DELETE_DNS_RECORD = "CANNOT_DELETE_DNS_RECORD";
public const string CANNOT_DELETE_CRM_ORGANIZATIO_DOMAIN = "CANNOT_DELETE_CRM_ORGANIZATIO_DOMAIN";
public const string DELETE_CRM_ORGANIZATION_DOMAIN_GENERAL_ERROR = "DELETE_CRM_ORGANIZATION_DOMAIN_GENERAL_ERROR";
public const string CANNOT_GET_CRM_ORGANIZATION_DOMAIN = "CANNOT_GET_CRM_ORGANIZATION_DOMAIN";
public const string QUOTA_HAS_BEEN_REACHED = "QUOTA_HAS_BEEN_REACHED";
public const string CANNOT_SET_DATABASE_COLLATION = "CANNOT_SET_DATABASE_COLLATION";
public const string CANNOT_DELETE_CRM_ORGANIZATION_DATABASE = "CANNOT_DELETE_CRM_ORGANIZATION_DATABASE";
public const string CANNOT_CONFIGURE_CRM_ORGANIZATION = "CANNOT_CONFIGURE_CRM_ORGANIZATION";
public const string CANNOT_SET_ORGANIZATION_CURRENCY = "CANNOT_SET_ORGANIZATION_CURRENCY";
public const string CANNOT_CREATE_CRM_REPORT = "CANNOT_CREATE_CRM_REPORT";
public const string CANNOT_APPLY_CRM_UPDATES = "CANNOT_APPLY_CRM_UPDATES";
public const string CANNOT_ENABLE_CRM_ORGANIZATION = "CANNOT_ENABLE_CRM_ORGANIZATION";
public const string CANNOT_CREATE_CRM_ORGANIZATION_DATABASE = "CANNOT_CREATE_CRM_ORGANIZATION_DATABASE";
public const string CANNOT_CHECK_QUOTAS = "CANNOT_CHECK_QUOTAS";
public const string CRM_IS_NOT_SELECTED_IN_HOSTING_PLAN = "CRM_IS_NOT_SELECTED_IN_HOSTING_PLAN";
public const string CANNOT_GET_COLLATION_NAMES = "CANNOT_GET_COLLATION_NAMES";
public const string CANNOT_GET_CURRENCY_LIST = "CANNOT_GET_CURRENCY_LIST";
public const string GET_CRM_USERS = "GET_CRM_USERS";
public const string GET_CRM_USER_COUNT = "GET_CRM_USER_COUNT";
public const string CANNOT_CREATE_CRM_USER = "CANNOT_CREATE_CRM_USER";
public const string CANNOT_CREATE_CRM_USER_GENERAL_ERROR = "CANNOT_CREATE_CRM_USER_GENERAL_ERROR";
public const string CANNOT_CREATE_CRM_USER_IN_DATABASE = "CANNOT_CREATE_CRM_USER_IN_DATABASE";
public const string CANNOT_GET_CRM_SERVICE = "CANNOT_GET_CRM_SERVICE";
public const string CANNOT_GET_CRM_BUSINESS_UNITS = "CANNOT_GET_CRM_BUSINESS_UNITS";
public const string CANNOT_FILL_BASE_UNITS_COLLECTION = "CANNOT_FILL_BASE_UNITS_COLLECTION";
public const string CANNOT_GET_BUSINESS_UNITS_GENERAL_ERROR = "CANNOT_GET_BUSINESS_UNITS_GENERAL_ERROR";
public const string CANNOT_GET_CRM_ORGANIZATION = "CANNOT_GET_CRM_ORGANIZATION";
public const string CANNOT_GET_ALL_CRM_ROLES = "CANNOT_GET_ALL_CRM_ROLES";
public const string CANNOT_FILL_ROLES_COLLECTION = "CANNOT_FILL_ROLES_COLLECTION";
public const string CANNOT_GET_CRM_USER_ROLES = "CANNOT_GET_CRM_USER_ROLES";
public const string GET_ORGANIZATION_BUSINESS_UNITS_GENERAL_ERROR = "GET_ORGANIZATION_BUSINESS_UNITS_GENERAL_ERROR";
public const string GET_ALL_CRM_ROLES_GENERAL_ERROR = "GET_ALL_CRM_ROLES_GENERAL_ERROR";
public const string GET_CRM_USER_ROLE_GENERAL_ERROR = "GET_CRM_USER_ROLE_GENERAL_ERROR";
public const string CANNOT_REMOVE_CRM_USER_ROLES = "CANNOT_REMOVE_CRM_USER_ROLES";
public const string CANNOT_ASSIGN_CRM_USER_ROLES = "CANNOT_ASSIGN_CRM_USER_ROLES";
public const string CANNOT_SET_CRM_USER_ROLES_GENERAL_ERROR = "CANNOT_SET_CRM_USER_ROLES_GENERAL_ERROR";
public const string CREATE_CRM_USER_GENERAL_ERROR = "CREATE_CRM_USER_GENERAL_ERROR";
public const string FIRST_NAME_IS_NOT_SPECIFIED = "FIRST_NAME_IS_NOT_SPECIFIED";
public const string LAST_NAME_IS_NOT_SPECIFIED = "LAST_NAME_IS_NOT_SPECIFIED";
public const string CRM_USER_ALREADY_EXISTS = "CRM_USER_ALREADY_EXISTS";
public const string CANNOT_GET_CRM_ROLES_GENERAL_ERROR = "CANNOT_GET_CRM_ROLES_GENERAL_ERROR";
public const string CHECK_QUOTA = "CHECK_QUOTA";
public const string USER_QUOTA_HAS_BEEN_REACHED = "USER_QUOTA_HAS_BEEN_REACHED";
public const string CANNOT_ADD_ORGANIZATION_OWNER_TO_ORGANIZATIO_USER =
"CANNOT_ADD_ORGANIZATION_OWNER_TO_ORGANIZATIO_USER";
public const string CANONT_GET_CRM_USER_BY_DOMAIN_NAME = "CANONT_GET_CRM_USER_BY_DOMAIN_NAME";
public const string CANNOT_DISABLE_USER_FEATURES = "CANNOT_DISABLE_USER_FEATURES";
public const string CANNOT_DELETE_CRM_ORGANIZATION_METADATA = "CANNOT_DELETE_CRM_ORGANIZATION_METADATA";
public const string CANONT_GET_CRM_USER_BY_ID = "CANONT_GET_CRM_USER_BY_ID";
public const string CRM_WEB_SERVICE_ERROR = "CRM_WEB_SERVICE_ERROR";
public const string CANNOT_CHANGE_USER_STATE = "CANNOT_CHANGE_USER_STATE";
public const string CANNOT_CHANGE_USER_STATE_GENERAL_ERROR = "CANNOT_CHANGE_USER_STATE_GENERAL_ERROR";
public const string CANONT_GET_CRM_USER_FROM_METADATA = "CANONT_GET_CRM_USER_FROM_METADATA";
public const string CANONT_GET_CRM_USER_GENERAL_ERROR = "CANONT_GET_CRM_USER_GENERAL_ERROR";
}
}

View file

@ -0,0 +1,70 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
namespace WebsitePanel.Providers.HostedSolution
{
public class CrmRole
{
private string roleName;
private Guid roleId;
private bool isCurrentUserRole;
public bool IsCurrentUserRole
{
get { return isCurrentUserRole; }
set { isCurrentUserRole = value; }
}
public string RoleName
{
get
{
return roleName;
}
set
{
roleName = value;
}
}
public Guid RoleId
{
get
{
return roleId;
}
set
{
roleId = value;
}
}
}
}

View file

@ -0,0 +1,39 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace WebsitePanel.Providers.HostedSolution
{
public enum CrmOrganizationState
{
Disabled,
Enabled,
Pending,
Failed,
Maintenance
}
}

View file

@ -0,0 +1,41 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
namespace WebsitePanel.Providers.HostedSolution
{
public class CrmUser
{
public Guid CRMUserId { get; set; }
public Guid BusinessUnitId { get; set; }
public CRMUserAccessMode ClientAccessMode { get; set; }
public bool IsDisabled { get; set; }
}
}

View file

@ -0,0 +1,63 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace WebsitePanel.Providers.HostedSolution
{
public class Currency
{
private string currencyName;
private string regionName;
private string currencyCode;
private string currencySymbol;
public string CurrencyName
{
get { return currencyName; }
set { currencyName = value; }
}
public string RegionName
{
get { return regionName; }
set { regionName = value; }
}
public string CurrencyCode
{
get { return currencyCode; }
set { currencyCode = value; }
}
public string CurrencySymbol
{
get { return currencySymbol; }
set { currencySymbol = value; }
}
}
}

View file

@ -0,0 +1,39 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace WebsitePanel.Providers.HostedSolution
{
public class EnterpriseSolutionStatisticsReport
{
public ExchangeStatisticsReport ExchangeReport { get; set; }
public SharePointStatisticsReport SharePointReport { get; set; }
public CRMStatisticsReport CRMReport { get; set; }
public OrganizationStatisticsReport OrganizationReport { get; set; }
}
}

View file

@ -0,0 +1,36 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace WebsitePanel.Providers.HostedSolution
{
public class Errors
{
public const int OK = 0;
public const int AD_OBJECT_ALREADY_EXISTS = -1;
}
}

View file

@ -0,0 +1,115 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Providers.HostedSolution
{
public class ExchangeAccount
{
int accountId;
int itemId;
int packageId;
ExchangeAccountType accountType;
string accountName;
string displayName;
string primaryEmailAddress;
bool mailEnabledPublicFolder;
MailboxManagerActions mailboxManagerActions;
string accountPassword;
string samAccountName;
public int AccountId
{
get { return this.accountId; }
set { this.accountId = value; }
}
public int ItemId
{
get { return this.itemId; }
set { this.itemId = value; }
}
public int PackageId
{
get { return this.packageId; }
set { this.packageId = value; }
}
public ExchangeAccountType AccountType
{
get { return this.accountType; }
set { this.accountType = value; }
}
public string AccountName
{
get { return this.accountName; }
set { this.accountName = value; }
}
public string SamAccountName
{
get { return this.samAccountName; }
set { this.samAccountName = value; }
}
public string DisplayName
{
get { return this.displayName; }
set { this.displayName = value; }
}
public string PrimaryEmailAddress
{
get { return this.primaryEmailAddress; }
set { this.primaryEmailAddress = value; }
}
public bool MailEnabledPublicFolder
{
get { return this.mailEnabledPublicFolder; }
set { this.mailEnabledPublicFolder = value; }
}
public string AccountPassword
{
get { return this.accountPassword; }
set { this.accountPassword = value; }
}
public MailboxManagerActions MailboxManagerActions
{
get { return this.mailboxManagerActions; }
set { this.mailboxManagerActions = value; }
}
}
}

View file

@ -0,0 +1,43 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace WebsitePanel.Providers.HostedSolution
{
public enum ExchangeAccountType
{
Undefined = 0,
Mailbox = 1,
Contact = 2,
DistributionList = 3,
PublicFolder = 4,
Room = 5,
Equipment = 6,
User = 7
}
}

View file

@ -0,0 +1,52 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Providers.HostedSolution
{
public class ExchangeAccountsPaged
{
int recordsCount;
ExchangeAccount[] pageItems;
public int RecordsCount
{
get { return this.recordsCount; }
set { this.recordsCount = value; }
}
public ExchangeAccount[] PageItems
{
get { return this.pageItems; }
set { this.pageItems = value; }
}
}
}

View file

@ -0,0 +1,162 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Providers.HostedSolution
{
public class ExchangeActiveSyncPolicy
{
//general
private bool allowNonProvisionableDevices;
private bool attachmentsEnabled;
private int maxAttachmentSizeKB;
private bool uncAccessEnabled;
private bool wssAccessEnabled;
//password
private bool devicePasswordEnabled;
private bool alphanumericPasswordRequired;
private bool passwordRecoveryEnabled;
private bool deviceEncryptionEnabled;
private bool allowSimplePassword;
private int maxPasswordFailedAttempts;
private int minPasswordLength;
private int inactivityLockMin;
private int passwordExpirationDays;
private int passwordHistory;
private int refreshInterval;
public int RefreshInterval
{
get
{
return refreshInterval;
}
set
{
refreshInterval = value;
}
}
public bool AllowNonProvisionableDevices
{
get { return allowNonProvisionableDevices; }
set { allowNonProvisionableDevices = value; }
}
public bool AttachmentsEnabled
{
get { return attachmentsEnabled; }
set { attachmentsEnabled = value; }
}
public int MaxAttachmentSizeKB
{
get { return maxAttachmentSizeKB; }
set { maxAttachmentSizeKB = value; }
}
public bool UNCAccessEnabled
{
get { return uncAccessEnabled; }
set { uncAccessEnabled = value; }
}
public bool WSSAccessEnabled
{
get { return wssAccessEnabled; }
set { wssAccessEnabled = value; }
}
public bool DevicePasswordEnabled
{
get { return devicePasswordEnabled; }
set { devicePasswordEnabled = value; }
}
public bool AlphanumericPasswordRequired
{
get { return alphanumericPasswordRequired; }
set { alphanumericPasswordRequired = value; }
}
public bool PasswordRecoveryEnabled
{
get { return passwordRecoveryEnabled; }
set { passwordRecoveryEnabled = value; }
}
public bool DeviceEncryptionEnabled
{
get { return deviceEncryptionEnabled; }
set { deviceEncryptionEnabled = value; }
}
public bool AllowSimplePassword
{
get { return allowSimplePassword; }
set { allowSimplePassword = value; }
}
public int MaxPasswordFailedAttempts
{
get { return maxPasswordFailedAttempts; }
set { maxPasswordFailedAttempts = value; }
}
public int MinPasswordLength
{
get { return minPasswordLength; }
set { minPasswordLength = value; }
}
public int InactivityLockMin
{
get { return inactivityLockMin; }
set { inactivityLockMin = value; }
}
public int PasswordExpirationDays
{
get { return passwordExpirationDays; }
set { passwordExpirationDays = value; }
}
public int PasswordHistory
{
get { return passwordHistory; }
set { passwordHistory = value; }
}
}
}

View file

@ -0,0 +1,240 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Providers.HostedSolution
{
public class ExchangeContact
{
string displayName;
string accountName;
string emailAddress;
bool hideFromAddressBook;
string firstName;
string initials;
string lastName;
string jobTitle;
string company;
string department;
string office;
ExchangeAccount managerAccount;
string businessPhone;
string fax;
string homePhone;
string mobilePhone;
string pager;
string webPage;
string address;
string city;
string state;
string zip;
string country;
string notes;
private int useMapiRichTextFormat;
ExchangeAccount[] acceptAccounts;
ExchangeAccount[] rejectAccounts;
bool requireSenderAuthentication;
public string DisplayName
{
get { return this.displayName; }
set { this.displayName = value; }
}
public string AccountName
{
get { return this.accountName; }
set { this.accountName = value; }
}
public string EmailAddress
{
get { return this.emailAddress; }
set { this.emailAddress = value; }
}
public bool HideFromAddressBook
{
get { return this.hideFromAddressBook; }
set { this.hideFromAddressBook = value; }
}
public string FirstName
{
get { return this.firstName; }
set { this.firstName = value; }
}
public string Initials
{
get { return this.initials; }
set { this.initials = value; }
}
public string LastName
{
get { return this.lastName; }
set { this.lastName = value; }
}
public string JobTitle
{
get { return this.jobTitle; }
set { this.jobTitle = value; }
}
public string Company
{
get { return this.company; }
set { this.company = value; }
}
public string Department
{
get { return this.department; }
set { this.department = value; }
}
public string Office
{
get { return this.office; }
set { this.office = value; }
}
public ExchangeAccount ManagerAccount
{
get { return this.managerAccount; }
set { this.managerAccount = value; }
}
public string BusinessPhone
{
get { return this.businessPhone; }
set { this.businessPhone = value; }
}
public string Fax
{
get { return this.fax; }
set { this.fax = value; }
}
public string HomePhone
{
get { return this.homePhone; }
set { this.homePhone = value; }
}
public string MobilePhone
{
get { return this.mobilePhone; }
set { this.mobilePhone = value; }
}
public string Pager
{
get { return this.pager; }
set { this.pager = value; }
}
public string WebPage
{
get { return this.webPage; }
set { this.webPage = value; }
}
public string Address
{
get { return this.address; }
set { this.address = value; }
}
public string City
{
get { return this.city; }
set { this.city = value; }
}
public string State
{
get { return this.state; }
set { this.state = value; }
}
public string Zip
{
get { return this.zip; }
set { this.zip = value; }
}
public string Country
{
get { return this.country; }
set { this.country = value; }
}
public string Notes
{
get { return this.notes; }
set { this.notes = value; }
}
public ExchangeAccount[] AcceptAccounts
{
get { return this.acceptAccounts; }
set { this.acceptAccounts = value; }
}
public ExchangeAccount[] RejectAccounts
{
get { return this.rejectAccounts; }
set { this.rejectAccounts = value; }
}
public bool RequireSenderAuthentication
{
get { return requireSenderAuthentication; }
set { requireSenderAuthentication = value; }
}
public int UseMapiRichTextFormat
{
get { return useMapiRichTextFormat; }
set { useMapiRichTextFormat = value; }
}
}
}

View file

@ -0,0 +1,103 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Providers.HostedSolution
{
public class ExchangeDistributionList
{
public string DisplayName
{
get;
set;
}
public string AccountName
{
get;
set;
}
public bool HideFromAddressBook
{
get;
set;
}
public ExchangeAccount[] MembersAccounts
{
get;
set;
}
public ExchangeAccount ManagerAccount
{
get;
set;
}
public string Notes
{
get;
set;
}
public ExchangeAccount[] AcceptAccounts
{
get;
set;
}
public ExchangeAccount[] RejectAccounts
{
get;
set;
}
public bool RequireSenderAuthentication
{
get;
set;
}
public ExchangeAccount[] SendAsAccounts
{
get;
set;
}
public ExchangeAccount[] SendOnBehalfAccounts
{
get;
set;
}
}
}

View file

@ -0,0 +1,40 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
using WebsitePanel.Providers;
namespace WebsitePanel.Providers.HostedSolution
{
public class ExchangeDomain : ServiceProviderItem
{
}
}

View file

@ -0,0 +1,80 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Providers.HostedSolution
{
public class ExchangeDomainName
{
int organizationDomainId;
int itemId;
int domainId;
string domainName;
bool isHost;
bool isDefault;
public bool IsHost
{
get { return this.isHost; }
set { this.isHost = value; }
}
public bool IsDefault
{
get { return this.isDefault; }
set { this.isDefault = value; }
}
public int DomainId
{
get { return this.domainId; }
set { this.domainId = value; }
}
public int OrganizationDomainId
{
get { return this.organizationDomainId; }
set { this.organizationDomainId = value; }
}
public int ItemId
{
get { return this.itemId; }
set { this.itemId = value; }
}
public string DomainName
{
get { return this.domainName; }
set { this.domainName = value; }
}
}
}

View file

@ -0,0 +1,62 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Providers.HostedSolution
{
public class ExchangeEmailAddress
{
public ExchangeEmailAddress()
{
}
public ExchangeEmailAddress(string email, bool primary)
{
this.Email = email;
this.Primary = primary;
}
private string email;
private bool primary;
public string Email
{
get { return email; }
set { email = value; }
}
public bool Primary
{
get { return primary; }
set { primary = value; }
}
}
}

View file

@ -0,0 +1,87 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Providers.HostedSolution
{
public class ExchangeItemStatistics
{
private string itemName;
private int totalItems;
private int totalSizeMB;
private DateTime lastLogon;
private DateTime lastLogoff;
private DateTime lastAccessTime;
private DateTime lastModificationTime;
public string ItemName
{
get { return this.itemName; }
set { this.itemName = value; }
}
public int TotalItems
{
get { return this.totalItems; }
set { this.totalItems = value; }
}
public int TotalSizeMB
{
get { return this.totalSizeMB; }
set { this.totalSizeMB = value; }
}
public DateTime LastLogon
{
get { return this.lastLogon; }
set { this.lastLogon = value; }
}
public DateTime LastLogoff
{
get { return this.lastLogoff; }
set { this.lastLogoff = value; }
}
public DateTime LastAccessTime
{
get { return lastAccessTime; }
set { lastAccessTime = value; }
}
public DateTime LastModificationTime
{
get { return lastModificationTime; }
set { lastModificationTime = value; }
}
}
}

View file

@ -0,0 +1,403 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Providers.HostedSolution
{
public class ExchangeMailbox
{
string displayName;
string accountName;
bool hideFromAddressBook;
bool disabled;
string firstName;
string initials;
string lastName;
string jobTitle;
string company;
string department;
string office;
ExchangeAccount managerAccount;
string businessPhone;
string fax;
string homePhone;
string mobilePhone;
string pager;
string webPage;
string address;
string city;
string state;
string zip;
string country;
string notes;
bool enableForwarding;
ExchangeAccount forwardingAccount;
bool doNotDeleteOnForward;
ExchangeAccount[] sendOnBehalfAccounts;
ExchangeAccount[] acceptAccounts;
ExchangeAccount[] rejectAccounts;
ExchangeAccount[] fullAccessAccounts;
ExchangeAccount[] sendAsAccounts;
bool requireSenderAuthentication;
int maxRecipients;
int maxSendMessageSizeKB;
int maxReceiveMessageSizeKB;
bool enablePOP;
bool enableIMAP;
bool enableOWA;
bool enableMAPI;
bool enableActiveSync;
int issueWarningKB;
int prohibitSendKB;
int prohibitSendReceiveKB;
int keepDeletedItemsDays;
private string domain;
int totalItems;
int totalSizeMB;
DateTime lastLogon;
DateTime lastLogoff;
public string DisplayName
{
get { return this.displayName; }
set { this.displayName = value; }
}
public string AccountName
{
get { return this.accountName; }
set { this.accountName = value; }
}
public bool HideFromAddressBook
{
get { return this.hideFromAddressBook; }
set { this.hideFromAddressBook = value; }
}
public bool Disabled
{
get { return this.disabled; }
set { this.disabled = value; }
}
public string FirstName
{
get { return this.firstName; }
set { this.firstName = value; }
}
public string Initials
{
get { return this.initials; }
set { this.initials = value; }
}
public string LastName
{
get { return this.lastName; }
set { this.lastName = value; }
}
public string JobTitle
{
get { return this.jobTitle; }
set { this.jobTitle = value; }
}
public string Company
{
get { return this.company; }
set { this.company = value; }
}
public string Department
{
get { return this.department; }
set { this.department = value; }
}
public string Office
{
get { return this.office; }
set { this.office = value; }
}
public ExchangeAccount ManagerAccount
{
get { return this.managerAccount; }
set { this.managerAccount = value; }
}
public string BusinessPhone
{
get { return this.businessPhone; }
set { this.businessPhone = value; }
}
public string Fax
{
get { return this.fax; }
set { this.fax = value; }
}
public string HomePhone
{
get { return this.homePhone; }
set { this.homePhone = value; }
}
public string MobilePhone
{
get { return this.mobilePhone; }
set { this.mobilePhone = value; }
}
public string Pager
{
get { return this.pager; }
set { this.pager = value; }
}
public string WebPage
{
get { return this.webPage; }
set { this.webPage = value; }
}
public string Address
{
get { return this.address; }
set { this.address = value; }
}
public string City
{
get { return this.city; }
set { this.city = value; }
}
public string State
{
get { return this.state; }
set { this.state = value; }
}
public string Zip
{
get { return this.zip; }
set { this.zip = value; }
}
public string Country
{
get { return this.country; }
set { this.country = value; }
}
public string Notes
{
get { return this.notes; }
set { this.notes = value; }
}
public bool EnableForwarding
{
get { return this.enableForwarding; }
set { this.enableForwarding = value; }
}
public ExchangeAccount ForwardingAccount
{
get { return this.forwardingAccount; }
set { this.forwardingAccount = value; }
}
public bool DoNotDeleteOnForward
{
get { return this.doNotDeleteOnForward; }
set { this.doNotDeleteOnForward = value; }
}
public ExchangeAccount[] SendOnBehalfAccounts
{
get { return this.sendOnBehalfAccounts; }
set { this.sendOnBehalfAccounts = value; }
}
public ExchangeAccount[] AcceptAccounts
{
get { return this.acceptAccounts; }
set { this.acceptAccounts = value; }
}
public ExchangeAccount[] RejectAccounts
{
get { return this.rejectAccounts; }
set { this.rejectAccounts = value; }
}
public int MaxRecipients
{
get { return this.maxRecipients; }
set { this.maxRecipients = value; }
}
public int MaxSendMessageSizeKB
{
get { return this.maxSendMessageSizeKB; }
set { this.maxSendMessageSizeKB = value; }
}
public int MaxReceiveMessageSizeKB
{
get { return this.maxReceiveMessageSizeKB; }
set { this.maxReceiveMessageSizeKB = value; }
}
public bool EnablePOP
{
get { return this.enablePOP; }
set { this.enablePOP = value; }
}
public bool EnableIMAP
{
get { return this.enableIMAP; }
set { this.enableIMAP = value; }
}
public bool EnableOWA
{
get { return this.enableOWA; }
set { this.enableOWA = value; }
}
public bool EnableMAPI
{
get { return this.enableMAPI; }
set { this.enableMAPI = value; }
}
public bool EnableActiveSync
{
get { return this.enableActiveSync; }
set { this.enableActiveSync = value; }
}
public int IssueWarningKB
{
get { return this.issueWarningKB; }
set { this.issueWarningKB = value; }
}
public int ProhibitSendKB
{
get { return this.prohibitSendKB; }
set { this.prohibitSendKB = value; }
}
public int ProhibitSendReceiveKB
{
get { return this.prohibitSendReceiveKB; }
set { this.prohibitSendReceiveKB = value; }
}
public int KeepDeletedItemsDays
{
get { return this.keepDeletedItemsDays; }
set { this.keepDeletedItemsDays = value; }
}
public string Domain
{
get { return domain; }
set { domain = value; }
}
public int TotalItems
{
get { return this.totalItems; }
set { this.totalItems = value; }
}
public int TotalSizeMB
{
get { return this.totalSizeMB; }
set { this.totalSizeMB = value; }
}
public DateTime LastLogon
{
get { return this.lastLogon; }
set { this.lastLogon = value; }
}
public DateTime LastLogoff
{
get { return this.lastLogoff; }
set { this.lastLogoff = value; }
}
public bool RequireSenderAuthentication
{
get { return requireSenderAuthentication; }
set { requireSenderAuthentication = value; }
}
public ExchangeAccount[] SendAsAccounts
{
get { return sendAsAccounts; }
set { sendAsAccounts = value; }
}
public ExchangeAccount[] FullAccessAccounts
{
get { return fullAccessAccounts; }
set { fullAccessAccounts = value; }
}
}
}

View file

@ -0,0 +1,54 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Providers.HostedSolution
{
public class ExchangeMailboxStatistics : BaseStatistics
{
public string DisplayName{ get; set; }
public DateTime AccountCreated { get; set; }
public string PrimaryEmailAddress { get; set; }
public bool POPEnabled { get; set; }
public bool IMAPEnabled { get; set; }
public bool OWAEnabled { get; set; }
public bool MAPIEnabled { get; set; }
public bool ActiveSyncEnabled { get; set; }
public int TotalItems { get; set; }
public long TotalSize { get; set; }
public long MaxSize { get; set; }
public DateTime LastLogon { get; set; }
public DateTime LastLogoff { get; set; }
public bool Enabled { get; set; }
public ExchangeAccountType MailboxType { get; set; }
public bool BlackberryEnabled { get; set; }
}
}

View file

@ -0,0 +1,58 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Providers.HostedSolution
{
public class ExchangeMobileDevice
{
public MobileDeviceStatus Status { get; set; }
public DateTime FirstSyncTime { get; set; }
public DateTime LastPolicyUpdateTime { get; set; }
public DateTime LastSyncAttemptTime { get; set; }
public DateTime LastSuccessSync { get; set; }
public string DeviceType { get; set; }
public string DeviceID { get; set; }
public string DeviceUserAgent { get; set; }
public DateTime DeviceWipeSentTime { get; set; }
public DateTime DeviceWipeRequestTime { get; set; }
public DateTime DeviceWipeAckTime { get; set; }
public int LastPingHeartbeat { get; set; }
public string RecoveryPassword { get; set; }
public string DeviceModel { get; set; }
public string DeviceIMEI { get; set; }
public string DeviceFriendlyName { get; set; }
public string DeviceOS { get; set; }
public string DeviceOSLanguage { get; set; }
public string DevicePhoneNumber { get; set; }
public string Id { get; set; }
}
}

View file

@ -0,0 +1,127 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Providers.HostedSolution
{
public class ExchangeOrganizationStatistics
{
private int allocatedMailboxes;
private int createdMailboxes;
private int allocatedContacts;
private int createdContacts;
private int allocatedDistributionLists;
private int createdDistributionLists;
private int allocatedPublicFolders;
private int createdPublicFolders;
private int allocatedDomains;
private int createdDomains;
private int allocatedDiskSpace;
private int usedDiskSpace;
public int AllocatedMailboxes
{
get { return this.allocatedMailboxes; }
set { this.allocatedMailboxes = value; }
}
public int CreatedMailboxes
{
get { return this.createdMailboxes; }
set { this.createdMailboxes = value; }
}
public int AllocatedContacts
{
get { return this.allocatedContacts; }
set { this.allocatedContacts = value; }
}
public int CreatedContacts
{
get { return this.createdContacts; }
set { this.createdContacts = value; }
}
public int AllocatedDistributionLists
{
get { return this.allocatedDistributionLists; }
set { this.allocatedDistributionLists = value; }
}
public int CreatedDistributionLists
{
get { return this.createdDistributionLists; }
set { this.createdDistributionLists = value; }
}
public int AllocatedPublicFolders
{
get { return this.allocatedPublicFolders; }
set { this.allocatedPublicFolders = value; }
}
public int CreatedPublicFolders
{
get { return this.createdPublicFolders; }
set { this.createdPublicFolders = value; }
}
public int AllocatedDomains
{
get { return this.allocatedDomains; }
set { this.allocatedDomains = value; }
}
public int CreatedDomains
{
get { return this.createdDomains; }
set { this.createdDomains = value; }
}
public int AllocatedDiskSpace
{
get { return this.allocatedDiskSpace; }
set { this.allocatedDiskSpace = value; }
}
public int UsedDiskSpace
{
get { return this.usedDiskSpace; }
set { this.usedDiskSpace = value; }
}
}
}

View file

@ -0,0 +1,52 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Providers.Exchange
{
/*public class ExchangeOrganizationsPaged
{
int recordsCount;
ExchangeOrganization[] pageItems;
public int RecordsCount
{
get { return this.recordsCount; }
set { this.recordsCount = value; }
}
public ExchangeOrganization[] PageItems
{
get { return this.pageItems; }
set { this.pageItems = value; }
}
}*/
}

View file

@ -0,0 +1,92 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace WebsitePanel.Providers.HostedSolution
{
public class ExchangePublicFolder
{
string name;
string displayName;
bool hideFromAddressBook;
bool mailEnabled;
ExchangeAccount[] authorsAccounts;
ExchangeAccount[] acceptAccounts;
ExchangeAccount[] rejectAccounts;
bool requireSenderAuthentication;
public string Name
{
get { return this.name; }
set { this.name = value; }
}
public bool HideFromAddressBook
{
get { return this.hideFromAddressBook; }
set { this.hideFromAddressBook = value; }
}
public bool MailEnabled
{
get { return this.mailEnabled; }
set { this.mailEnabled = value; }
}
public WebsitePanel.Providers.HostedSolution.ExchangeAccount[] AuthorsAccounts
{
get { return this.authorsAccounts; }
set { this.authorsAccounts = value; }
}
public WebsitePanel.Providers.HostedSolution.ExchangeAccount[] AcceptAccounts
{
get { return this.acceptAccounts; }
set { this.acceptAccounts = value; }
}
public WebsitePanel.Providers.HostedSolution.ExchangeAccount[] RejectAccounts
{
get { return this.rejectAccounts; }
set { this.rejectAccounts = value; }
}
public string DisplayName
{
get { return this.displayName; }
set { this.displayName = value; }
}
public bool RequireSenderAuthentication
{
get { return requireSenderAuthentication; }
set { requireSenderAuthentication = value; }
}
}
}

View file

@ -0,0 +1,80 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Providers.HostedSolution
{
public class ExchangeStatisticsReport : BaseReport<ExchangeMailboxStatistics>
{
public override string ToCSV()
{
StringBuilder mainBuilder = new StringBuilder();
StringBuilder sb = null;
AddCSVHeader(mainBuilder);
foreach(ExchangeMailboxStatistics item in Items)
{
sb = new StringBuilder();
sb.Append("\n");
sb.AppendFormat("{0},", ToCsvString(item.TopResellerName));
sb.AppendFormat("{0},", ToCsvString(item.ResellerName));
sb.AppendFormat("{0},", ToCsvString(item.CustomerName));
sb.AppendFormat("{0},", ToCsvString(item.CustomerCreated));
sb.AppendFormat("{0},", ToCsvString(item.HostingSpace));
sb.AppendFormat("{0},", ToCsvString(item.HostingSpaceCreated));
sb.AppendFormat("{0},", ToCsvString(item.OrganizationName));
sb.AppendFormat("{0},", ToCsvString(item.OrganizationCreated));
sb.AppendFormat("{0},", ToCsvString(item.OrganizationID));
sb.AppendFormat("{0},", ToCsvString(item.DisplayName));
sb.AppendFormat("{0},", ToCsvString(item.AccountCreated));
sb.AppendFormat("{0},", ToCsvString(item.PrimaryEmailAddress));
sb.AppendFormat("{0},", ToCsvString(item.MAPIEnabled));
sb.AppendFormat("{0},", ToCsvString(item.OWAEnabled));
sb.AppendFormat("{0},", ToCsvString(item.ActiveSyncEnabled));
sb.AppendFormat("{0},", ToCsvString(item.POPEnabled));
sb.AppendFormat("{0},", ToCsvString(item.IMAPEnabled));
sb.AppendFormat("{0},", ToCsvString(item.TotalSize / 1024.0 / 1024.0));
sb.AppendFormat("{0},", UnlimitedToCsvString(item.MaxSize == -1 ? (double)item.MaxSize : item.MaxSize / 1024.0 / 1024.0));
sb.AppendFormat("{0},", ToCsvString(item.LastLogon));
sb.AppendFormat("{0},", ToCsvString(item.Enabled, "Enabled", "Disabled"));
sb.AppendFormat("{0},", ToCsvString(item.MailboxType));
sb.AppendFormat("{0}", ToCsvString(item.BlackberryEnabled));
mainBuilder.Append(sb.ToString());
}
return mainBuilder.ToString();
}
private void AddCSVHeader(StringBuilder sb)
{
sb.Append("Top Reseller,Reseller,Customer,Customer Created,Hosting Space,Hosting Space Created,Ogranization Name,Ogranization Created,Organization ID,Mailbox Display Name,Account Created,Primary E-mail Address,MAPI,OWA,ActiveSync,POP 3,IMAP,Mailbox Size (Mb),Max Mailbox Size (Mb),Last Logon,Enabled,Mailbox Type, BlackBerry");
}
}
}

View file

@ -0,0 +1,49 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using WebsitePanel.Providers.Common;
using WebsitePanel.Providers.ResultObjects;
namespace WebsitePanel.Providers.HostedSolution
{
public interface IBlackBerry
{
ResultObject CreateBlackBerryUser(string primaryEmailAddress);
ResultObject DeleteBlackBerryUser(string primaryEmailAddress);
BlackBerryUserStatsResult GetBlackBerryUserStats(string primaryEmailAddress);
ResultObject SetActivationPasswordWithExpirationTime(string primaryEmailAddress, string password, int time);
ResultObject SetEmailActivationPassword(string primaryEmailAddress);
ResultObject DeleteDataFromBlackBerryDevice(string primaryEmailAddress);
}
}

View file

@ -0,0 +1,64 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using WebsitePanel.Providers.Common;
using WebsitePanel.Providers.ResultObjects;
namespace WebsitePanel.Providers.HostedSolution
{
public interface ICRM
{
OrganizationResult CreateOrganization(Guid organizationId, string organizationUniqueName, string organizationFriendlyName,
string baseCurrencyCode, string baseCurrencyName, string baseCurrencySymbol,
string initialUserDomainName, string initialUserFirstName, string initialUserLastName, string initialUserPrimaryEmail,
string organizationCollation);
string[] GetSupportedCollationNames();
Currency[] GetCurrencyList();
ResultObject DeleteOrganization(Guid orgId);
UserResult CreateCRMUser(OrganizationUser user, string orgName, Guid organizationId, Guid baseUnitId);
CRMBusinessUnitsResult GetOrganizationBusinessUnits(Guid organizationId, string orgName);
CrmRolesResult GetAllCrmRoles(string orgName, Guid businessUnitId);
CrmRolesResult GetCrmUserRoles(string orgName, Guid userId);
ResultObject SetUserRoles(string orgName, Guid userId, Guid[] roles);
CrmUserResult GetCrmUserByDomainName(string domainName, string orgName);
CrmUserResult GetCrmUserById(Guid crmUserId, string orgName);
ResultObject ChangeUserState(bool disable, string orgName, Guid crmUserId);
}
}

View file

@ -0,0 +1,130 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace WebsitePanel.Providers.HostedSolution
{
public interface IExchangeServer
{
bool CheckAccountCredentials(string username, string password);
// Organizations
string CreateMailEnableUser(string upn, string organizationId, string organizationDistinguishedName, ExchangeAccountType accountType,
string mailboxDatabase, string offlineAddressBook,
string accountName, bool enablePOP, bool enableIMAP,
bool enableOWA, bool enableMAPI, bool enableActiveSync,
int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB,
int keepDeletedItemsDays);
Organization ExtendToExchangeOrganization(string organizationId, string securityGroup);
string GetOABVirtualDirectory();
Organization CreateOrganizationOfflineAddressBook(string organizationId, string securityGroup, string oabVirtualDir);
void UpdateOrganizationOfflineAddressBook(string id);
bool DeleteOrganization(string organizationId, string distinguishedName, string globalAddressList, string addressList, string offlineAddressBook, string securityGroup);
void SetOrganizationStorageLimits(string organizationDistinguishedName, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays);
ExchangeItemStatistics[] GetMailboxesStatistics(string organizationDistinguishedName);
// Domains
void AddAuthoritativeDomain(string domain);
void DeleteAuthoritativeDomain(string domain);
string[] GetAuthoritativeDomains();
// Mailboxes
string CreateMailbox(string organizationId, string organizationDistinguishedName, string mailboxDatabase, string securityGroup, string offlineAddressBook, ExchangeAccountType accountType, string displayName, string accountName, string name, string domain, string password, bool enablePOP, bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync,
int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays);
void DeleteMailbox(string accountName);
void DisableMailbox(string id);
ExchangeMailbox GetMailboxGeneralSettings(string accountName);
void SetMailboxGeneralSettings(string accountName, string displayName, string password, bool hideFromAddressBook, bool disabled, string firstName, string initials, string lastName, string address, string city, string state, string zip, string country, string jobTitle, string company, string department, string office, string managerAccountName, string businessPhone, string fax, string homePhone, string mobilePhone, string pager, string webPage, string notes);
ExchangeMailbox GetMailboxMailFlowSettings(string accountName);
void SetMailboxMailFlowSettings(string accountName, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, int maxRecipients, int maxSendMessageSizeKB, int maxReceiveMessageSizeKB, bool requireSenderAuthentication);
ExchangeMailbox GetMailboxAdvancedSettings(string accountName);
void SetMailboxAdvancedSettings(string organizationId, string accountName, bool enablePOP, bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays);
ExchangeEmailAddress[] GetMailboxEmailAddresses(string accountName);
void SetMailboxEmailAddresses(string accountName, string[] emailAddresses);
void SetMailboxPrimaryEmailAddress(string accountName, string emailAddress);
void SetMailboxPermissions(string organizationId, string accountName, string[] sendAsAccounts, string[] fullAccessAccounts);
ExchangeMailbox GetMailboxPermissions(string organizationId, string accountName);
ExchangeMailboxStatistics GetMailboxStatistics(string accountName);
// Contacts
void CreateContact(string organizationId, string organizationDistinguishedName, string contactDisplayName, string contactAccountName, string contactEmail, string defaultOrganizationDomain);
void DeleteContact(string accountName);
ExchangeContact GetContactGeneralSettings(string accountName);
void SetContactGeneralSettings(string accountName, string displayName, string email, bool hideFromAddressBook, string firstName, string initials, string lastName, string address, string city, string state, string zip, string country, string jobTitle, string company, string department, string office, string managerAccountName, string businessPhone, string fax, string homePhone, string mobilePhone, string pager, string webPage, string notes, int useMapiRichTextFormat, string defaultDomain);
ExchangeContact GetContactMailFlowSettings(string accountName);
void SetContactMailFlowSettings(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication);
// Distribution Lists
void CreateDistributionList(string organizationId, string organizationDistinguishedName, string displayName, string accountName, string name, string domain, string managedBy);
void DeleteDistributionList(string accountName);
ExchangeDistributionList GetDistributionListGeneralSettings(string accountName);
void SetDistributionListGeneralSettings(string accountName, string displayName, bool hideFromAddressBook, string managedBy, string[] memebers, string notes);
void AddDistributionListMembers(string accountName, string[] memberAccounts);
void RemoveDistributionListMembers(string accountName, string[] memberAccounts);
ExchangeDistributionList GetDistributionListMailFlowSettings(string accountName);
void SetDistributionListMailFlowSettings(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication);
ExchangeEmailAddress[] GetDistributionListEmailAddresses(string accountName);
void SetDistributionListEmailAddresses(string accountName, string[] emailAddresses);
void SetDistributionListPrimaryEmailAddress(string accountName, string emailAddress);
ExchangeDistributionList GetDistributionListPermissions(string organizationId, string accountName);
void SetDistributionListPermissions(string organizationId, string accountName, string[] sendAsAccounts, string[] sendOnBehalfAccounts);
// Public Folders
void CreatePublicFolder(string organizationId, string securityGroup, string parentFolder, string folderName, bool mailEnabled, string accountName, string name, string domain);
void DeletePublicFolder(string folder);
void EnableMailPublicFolder(string organizationId, string folder, string accountName, string name, string domain);
void DisableMailPublicFolder(string folder);
ExchangePublicFolder GetPublicFolderGeneralSettings(string folder);
void SetPublicFolderGeneralSettings(string folder, string newFolderName, string[] authorAccounts, bool hideFromAddressBook);
ExchangePublicFolder GetPublicFolderMailFlowSettings(string folder);
void SetPublicFolderMailFlowSettings(string folder, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication);
ExchangeEmailAddress[] GetPublicFolderEmailAddresses(string folder);
void SetPublicFolderEmailAddresses(string folder, string[] emailAddresses);
void SetPublicFolderPrimaryEmailAddress(string folder, string emailAddress);
ExchangeItemStatistics[] GetPublicFoldersStatistics(string[] folders);
string[] GetPublicFoldersRecursive(string parent);
long GetPublicFolderSize(string folder);
//ActiveSync
void CreateOrganizationActiveSyncPolicy(string organizationId);
ExchangeActiveSyncPolicy GetActiveSyncPolicy(string organizationId);
void SetActiveSyncPolicy(string organizationId, bool allowNonProvisionableDevices, bool attachmentsEnabled,
int maxAttachmentSizeKB, bool uncAccessEnabled, bool wssAccessEnabled, bool devicePasswordEnabled,
bool alphanumericPasswordRequired, bool passwordRecoveryEnabled, bool deviceEncryptionEnabled,
bool allowSimplePassword, int maxPasswordFailedAttempts, int minPasswordLength, int inactivityLockMin,
int passwordExpirationDays, int passwordHistory, int refreshInterval);
//Mobile Devices
ExchangeMobileDevice[] GetMobileDevices(string accountName);
ExchangeMobileDevice GetMobileDevice(string id);
void WipeDataFromDevice(string id);
void CancelRemoteWipeRequest(string id);
void RemoveDevice(string id);
}
}

View file

@ -0,0 +1,40 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Providers.HostedSolution
{
public interface IOCSEdgeServer
{
void AddDomain(string domainName);
void DeleteDomain(string domainName);
}
}

View file

@ -0,0 +1,43 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Providers.HostedSolution
{
public interface IOCSServer
{
string CreateUser(string userUpn, string userDistinguishedName);
OCSUser GetUserGeneralSettings(string instanceId);
void SetUserGeneralSettings(string instanceId, bool enabledForFederation, bool enabledForPublicIMConectivity, bool archiveInternalCommunications, bool archiveFederatedCommunications, bool enabledForEnhancedPresence);
void DeleteUser(string instanceId);
void SetUserPrimaryUri(string instanceId, string userUpn);
}
}

View file

@ -0,0 +1,62 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using WebsitePanel.Providers.ResultObjects;
namespace WebsitePanel.Providers.HostedSolution
{
public interface IOrganization
{
Organization CreateOrganization(string organizationId);
void DeleteOrganization(string organizationId);
void CreateUser(string organizationId, string loginName, string displayName, string upn, string password, bool enabled);
void DeleteUser(string loginName, string organizationId);
OrganizationUser GetUserGeneralSettings(string loginName, string organizationId);
void SetUserGeneralSettings(string organizationId, string accountName, string displayName, string password,
bool hideFromAddressBook, bool disabled, bool locked, string firstName, string initials,
string lastName,
string address, string city, string state, string zip, string country,
string jobTitle,
string company, string department, string office, string managerAccountName,
string businessPhone, string fax, string homePhone, string mobilePhone, string pager,
string webPage, string notes, string externalEmail);
bool OrganizationExists(string organizationId);
void DeleteOrganizationDomain(string organizationDistinguishedName, string domain);
void CreateOrganizationDomain(string organizationDistinguishedName, string domain);
PasswordPolicyResult GetPasswordPolicy();
}
}

View file

@ -0,0 +1,41 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
namespace WebsitePanel.Providers.HostedSolution
{
[Flags]
public enum MailboxManagerActions
{
GeneralSettings = 0x01,
MailFlowSettings = 0x02,
AdvancedSettings = 0x04,
EmailAddresses = 0x08
}
}

View file

@ -0,0 +1,41 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Providers.HostedSolution
{
public enum MobileDeviceStatus
{
OK,
PendingWipe,
WipeSuccessful
}
}

View file

@ -0,0 +1,39 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace WebsitePanel.Providers.HostedSolution
{
public class OCSConstants
{
public const string ProviderName = "OCSEdge";
public const string EDGEServicesData = "EDGEServicesData";
public const string PoolFQDN = "PoolFQDN";
}
}

View file

@ -0,0 +1,64 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace WebsitePanel.Providers.HostedSolution
{
public class OCSErrorCodes
{
public const string CANNOT_CHECK_IF_OCS_USER_EXISTS = "CANNOT_CHECK_IF_OCS_USER_EXISTS";
public const string USER_IS_ALREADY_OCS_USER = "USER_IS_ALREADY_OCS_USER";
public const string USER_FIRST_NAME_IS_NOT_SPECIFIED = "USER_FIRST_NAME_IS_NOT_SPECIFIED";
public const string USER_LAST_NAME_IS_NOT_SPECIFIED = "USER_LAST_NAME_IS_NOT_SPECIFIED";
public const string CANNOT_GET_USER_GENERAL_SETTINGS = "CANNOT_GET_USER_GENERAL_SETTINGS";
public const string CANNOT_ADD_OCS_USER_TO_DATABASE = "CANNOT_ADD_OCS_USER_TO_DATABASE";
public const string GET_OCS_USER_COUNT = "GET_OCS_USER_COUNT";
public const string GET_OCS_USERS = "GET_OCS_USERS";
public const string CANNOT_DELETE_OCS_USER_FROM_METADATA = "CANNOT_DELETE_OCS_USER_FROM_METADATA";
public const string CANNOT_DELETE_OCS_USER = "CANNOT_DELETE_OCS_USER";
public const string CANNOT_GET_OCS_PROXY = "CANNOT_GET_OCS_PROXY";
public const string USER_QUOTA_HAS_BEEN_REACHED = "USER_QUOTA_HAS_BEEN_REACHED";
public const string CANNOT_CHECK_QUOTA = "CANNOT_CHECK_QUOTA";
public const string CANNOT_SET_DEFAULT_SETTINGS = "CANNOT_SET_DEFAULT_SETTINGS";
public const string CANNOT_ADD_OCS_USER = "CANNOT_ADD_OCS_USER";
}
}

View file

@ -0,0 +1,48 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Providers.HostedSolution
{
public class OCSUser
{
public string InstanceId { get; set; }
public string PrimaryUri { get; set; }
public string DisplayName { get; set; }
public string PrimaryEmailAddress { get; set; }
public int AccountID { get; set; }
public bool EnabledForFederation { get; set; }
public bool EnabledForPublicIMConectivity { get; set; }
public bool ArchiveFederatedCommunications { get; set; }
public bool ArchiveInternalCommunications { get; set; }
public bool EnabledForEnhancedPresence { get; set; }
}
}

View file

@ -0,0 +1,50 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

namespace WebsitePanel.Providers.HostedSolution
{
public class OCSUsersPaged
{
int recordsCount;
OCSUser[] pageUsers;
public int RecordsCount
{
get { return recordsCount; }
set { recordsCount = value; }
}
public OCSUser[] PageUsers
{
get { return pageUsers; }
set { pageUsers = value; }
}
}
}

View file

@ -0,0 +1,229 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
namespace WebsitePanel.Providers.HostedSolution
{
public class Organization : ServiceProviderItem
{
#region Fields
private string distinguishedName;
private string organizationId;
private string defaultDomain;
private string offlineAddressBook;
private string addressList;
private string globalAddressList;
private string database;
private string securityGroup;
private int diskSpace;
private int issueWarningKB;
private int prohibitSendKB;
private int prohibitSendReceiveKB;
private int keepDeletedItemsDays;
private Guid crmOrganizationId;
private int crmOrgState;
private int crmAdministratorId;
private string crmLanguadgeCode;
private string crmCollation;
private string crmCurrency;
private string crmUrl;
private int maxSharePointStorage;
private int warningSharePointStorage;
#endregion
[Persistent]
public int MaxSharePointStorage
{
get { return maxSharePointStorage; }
set { maxSharePointStorage = value; }
}
[Persistent]
public int WarningSharePointStorage
{
get { return warningSharePointStorage; }
set { warningSharePointStorage = value; }
}
[Persistent]
public string CrmUrl
{
get { return crmUrl; }
set { crmUrl = value; }
}
[Persistent]
public Guid CrmOrganizationId
{
get { return crmOrganizationId; }
set { crmOrganizationId = value; }
}
[Persistent]
public int CrmOrgState
{
get { return crmOrgState; }
set { crmOrgState = value; }
}
[Persistent]
public int CrmAdministratorId
{
get { return crmAdministratorId; }
set { crmAdministratorId = value; }
}
[Persistent]
public string CrmLanguadgeCode
{
get { return crmLanguadgeCode; }
set { crmLanguadgeCode = value; }
}
[Persistent]
public string CrmCollation
{
get { return crmCollation; }
set { crmCollation = value; }
}
[Persistent]
public string CrmCurrency
{
get { return crmCurrency; }
set { crmCurrency = value; }
}
[Persistent]
public string DistinguishedName
{
get { return distinguishedName; }
set { distinguishedName = value; }
}
[Persistent]
public string OrganizationId
{
get { return organizationId; }
set { organizationId = value; }
}
[Persistent]
public string DefaultDomain
{
set
{
defaultDomain = value;
}
get
{
return defaultDomain;
}
}
[Persistent]
public string OfflineAddressBook
{
get { return offlineAddressBook; }
set { offlineAddressBook = value; }
}
[Persistent]
public string AddressList
{
get { return addressList; }
set { addressList = value; }
}
[Persistent]
public string GlobalAddressList
{
get { return globalAddressList; }
set { globalAddressList = value; }
}
[Persistent]
public string Database
{
get { return database; }
set { database = value; }
}
[Persistent]
public string SecurityGroup
{
get { return securityGroup; }
set { securityGroup = value; }
}
[Persistent]
public int DiskSpace
{
get { return diskSpace; }
set { diskSpace = value; }
}
[Persistent]
public int IssueWarningKB
{
get { return issueWarningKB; }
set { issueWarningKB = value; }
}
[Persistent]
public int ProhibitSendKB
{
get { return prohibitSendKB; }
set { prohibitSendKB = value; }
}
[Persistent]
public int ProhibitSendReceiveKB
{
get { return prohibitSendReceiveKB; }
set { prohibitSendReceiveKB = value; }
}
[Persistent]
public int KeepDeletedItemsDays
{
get { return keepDeletedItemsDays; }
set { keepDeletedItemsDays = value; }
}
[Persistent]
public bool IsOCSOrganization { get; set; }
}
}

View file

@ -0,0 +1,34 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace WebsitePanel.Providers.HostedSolution
{
public class OrganizationDomain : ServiceProviderItem
{
}
}

View file

@ -0,0 +1,76 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace WebsitePanel.Providers.HostedSolution
{
public class OrganizationDomainName
{
int organizationDomainId;
int itemId;
int domainId;
string domainName;
bool isHost;
bool isDefault;
public bool IsHost
{
get { return isHost; }
set { isHost = value; }
}
public bool IsDefault
{
get { return isDefault; }
set { isDefault = value; }
}
public int DomainId
{
get { return domainId; }
set { domainId = value; }
}
public int OrganizationDomainId
{
get { return organizationDomainId; }
set { organizationDomainId = value; }
}
public int ItemId
{
get { return itemId; }
set { itemId = value; }
}
public string DomainName
{
get { return domainName; }
set { domainName = value; }
}
}
}

View file

@ -0,0 +1,48 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace WebsitePanel.Providers.HostedSolution
{
public class OrganizationsPaged
{
int recordsCount;
Organization[] pageItems;
public int RecordsCount
{
get { return this.recordsCount; }
set { this.recordsCount = value; }
}
public Organization[] PageItems
{
get { return this.pageItems; }
set { this.pageItems = value; }
}
}
}

View file

@ -0,0 +1,178 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace WebsitePanel.Providers.HostedSolution
{
public class OrganizationStatistics
{
private int allocatedUsers;
private int createdUsers;
private int allocatedDomains;
private int createdDomains;
private int allocatedMailboxes;
private int createdMailboxes;
private int allocatedContacts;
private int createdContacts;
private int allocatedDistributionLists;
private int createdDistributionLists;
private int allocatedPublicFolders;
private int createdPublicFolders;
private int allocatedDiskSpace;
private int usedDiskSpace;
private int allocatedSharePointSiteCollections;
private int createdSharePointSiteCollections;
private int createdCRMUsers;
private int allocatedCRMUsers;
public int CreatedCRMUsers
{
get { return createdCRMUsers; }
set { createdCRMUsers = value; }
}
public int AllocatedCRMUsers
{
get { return allocatedCRMUsers; }
set { allocatedCRMUsers = value; }
}
public int AllocatedUsers
{
get { return allocatedUsers; }
set { allocatedUsers = value; }
}
public int CreatedUsers
{
get { return createdUsers; }
set { createdUsers = value; }
}
public int AllocatedMailboxes
{
get { return allocatedMailboxes; }
set { allocatedMailboxes = value; }
}
public int CreatedMailboxes
{
get { return createdMailboxes; }
set { createdMailboxes = value; }
}
public int AllocatedContacts
{
get { return allocatedContacts; }
set { allocatedContacts = value; }
}
public int CreatedContacts
{
get { return createdContacts; }
set { createdContacts = value; }
}
public int AllocatedDistributionLists
{
get { return allocatedDistributionLists; }
set { allocatedDistributionLists = value; }
}
public int CreatedDistributionLists
{
get { return createdDistributionLists; }
set { createdDistributionLists = value; }
}
public int AllocatedPublicFolders
{
get { return allocatedPublicFolders; }
set { allocatedPublicFolders = value; }
}
public int CreatedPublicFolders
{
get { return createdPublicFolders; }
set { createdPublicFolders = value; }
}
public int AllocatedDomains
{
get { return allocatedDomains; }
set { allocatedDomains = value; }
}
public int CreatedDomains
{
get { return createdDomains; }
set { createdDomains = value; }
}
public int AllocatedDiskSpace
{
get { return allocatedDiskSpace; }
set { allocatedDiskSpace = value; }
}
public int UsedDiskSpace
{
get { return usedDiskSpace; }
set { usedDiskSpace = value; }
}
public int AllocatedSharePointSiteCollections
{
get { return allocatedSharePointSiteCollections; }
set { allocatedSharePointSiteCollections = value; }
}
public int CreatedSharePointSiteCollections
{
get { return createdSharePointSiteCollections; }
set { createdSharePointSiteCollections = value; }
}
public int CreatedBlackBerryUsers { get; set; }
public int AllocatedBlackBerryUsers { get; set; }
public int CreatedOCSUsers { get; set; }
public int AllocatedOCSUsers { get; set; }
}
}

View file

@ -0,0 +1,71 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System.Text;
namespace WebsitePanel.Providers.HostedSolution
{
public class OrganizationStatisticsReport : BaseReport<OrganizationStatisticsRepotItem>
{
public override string ToCSV()
{
StringBuilder mainBuilder = new StringBuilder();
AddCSVHeader(mainBuilder);
foreach (OrganizationStatisticsRepotItem item in Items)
{
StringBuilder sb = new StringBuilder();
sb.Append("\n");
sb.AppendFormat("{0},", ToCsvString(item.TopResellerName));
sb.AppendFormat("{0},", ToCsvString(item.ResellerName));
sb.AppendFormat("{0},", ToCsvString(item.CustomerName));
sb.AppendFormat("{0},", ToCsvString(item.CustomerCreated));
sb.AppendFormat("{0},", ToCsvString(item.HostingSpace));
sb.AppendFormat("{0},", ToCsvString(item.HostingSpaceCreated));
sb.AppendFormat("{0},", ToCsvString(item.OrganizationName));
sb.AppendFormat("{0},", ToCsvString(item.OrganizationCreated));
sb.AppendFormat("{0},", ToCsvString(item.OrganizationID));
sb.AppendFormat("{0},", ToCsvString(item.TotalMailboxes));
sb.AppendFormat("{0},", ToCsvString(item.TotalMailboxesSize / 1024.0 / 1024.0));
sb.AppendFormat("{0},", ToCsvString(item.TotalPublicFoldersSize / 1024.0 / 1024.0));
sb.AppendFormat("{0},", ToCsvString(item.TotalSharePointSiteCollections));
sb.AppendFormat("{0},", ToCsvString(item.TotalSharePointSiteCollectionsSize / 1024.0 / 1024.0));
sb.AppendFormat("{0}", ToCsvString(item.TotalCRMUsers));
mainBuilder.Append(sb.ToString());
}
return mainBuilder.ToString();
}
private static void AddCSVHeader(StringBuilder sb)
{
sb.Append("Top Reseller,Reseller,Customer,Customer Created,Hosting Space,Hosting Space Created,Ogranization Name,Ogranization Created,Organization ID,Total mailboxes,Total mailboxes size(Mb),Total Public Folders size(Mb),Total SharePoint site collections,Total SharePoint site collections size(Mb),Total CRM users");
}
}
}

View file

@ -0,0 +1,70 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace WebsitePanel.Providers.HostedSolution
{
public class OrganizationStatisticsRepotItem : BaseStatistics
{
public int TotalMailboxes
{
get;
set;
}
public long TotalMailboxesSize
{
get;
set;
}
public long TotalPublicFoldersSize
{
get;
set;
}
public int TotalSharePointSiteCollections
{
get;
set;
}
public long TotalSharePointSiteCollectionsSize
{
get;
set;
}
public int TotalCRMUsers
{
get;
set;
}
}
}

View file

@ -0,0 +1,274 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
namespace WebsitePanel.Providers.HostedSolution
{
public class OrganizationUser
{
private int accountId;
private int itemId;
private int packageId;
private string primaryEmailAddress;
private string accountPassword;
private string samAccountName;
private string displayName;
private string accountName;
private string firstName;
private string initials;
private string lastName;
private string jobTitle;
private string company;
private string department;
private string office;
private string businessPhone;
private string fax;
private string homePhone;
private string mobilePhone;
private string pager;
private string webPage;
private string address;
private string city;
private string state;
private string zip;
private string country;
private string notes;
private string domainUserName;
private bool disabled;
ExchangeAccountType accountType;
private OrganizationUser manager;
private Guid crmUserId;
public Guid CrmUserId
{
get { return crmUserId; }
set { crmUserId = value; }
}
public string DomainUserName
{
get { return domainUserName; }
set { domainUserName = value; }
}
public ExchangeAccountType AccountType
{
get { return accountType; }
set { accountType = value; }
}
public OrganizationUser Manager
{
get { return manager; }
set { manager = value; }
}
public bool Disabled
{
get { return disabled;}
set { disabled = value;}
}
public string FirstName
{
get { return firstName; }
set { firstName = value; }
}
public string Initials
{
get { return initials; }
set { initials = value; }
}
public string LastName
{
get { return lastName; }
set { lastName = value; }
}
public string JobTitle
{
get { return jobTitle; }
set { jobTitle = value; }
}
public string Company
{
get { return company; }
set { company = value; }
}
public string Department
{
get { return department; }
set { department = value; }
}
public string Office
{
get { return office; }
set { office = value; }
}
public string BusinessPhone
{
get { return businessPhone; }
set { businessPhone = value; }
}
public string Fax
{
get { return fax; }
set { fax = value; }
}
public string HomePhone
{
get { return homePhone; }
set { homePhone = value; }
}
public string MobilePhone
{
get { return mobilePhone; }
set { mobilePhone = value; }
}
public string Pager
{
get { return pager; }
set { pager = value; }
}
public string WebPage
{
get { return webPage; }
set { webPage = value; }
}
public string Address
{
get { return address; }
set { address = value; }
}
public string City
{
get { return city; }
set { city = value; }
}
public string State
{
get { return state; }
set { state = value; }
}
public string Zip
{
get { return zip; }
set { zip = value; }
}
public string Country
{
get { return country; }
set { country = value; }
}
public string Notes
{
get { return notes; }
set { notes = value; }
}
public int AccountId
{
get { return accountId; }
set { accountId = value; }
}
public int ItemId
{
get { return itemId; }
set { itemId = value; }
}
public int PackageId
{
get { return packageId; }
set { packageId = value; }
}
public string AccountName
{
get { return accountName; }
set { accountName = value; }
}
public string SamAccountName
{
get { return samAccountName; }
set { samAccountName = value; }
}
public string DisplayName
{
get { return displayName; }
set { displayName = value; }
}
public string PrimaryEmailAddress
{
get { return primaryEmailAddress; }
set { primaryEmailAddress = value; }
}
public string AccountPassword
{
get { return accountPassword; }
set { accountPassword = value; }
}
public string ExternalEmail { get; set; }
public string DistinguishedName { get; set; }
public bool Locked { get; set; }
}
}

View file

@ -0,0 +1,48 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace WebsitePanel.Providers.HostedSolution
{
public class OrganizationUsersPaged
{
int recordsCount;
OrganizationUser[] pageUsers;
public int RecordsCount
{
get { return recordsCount; }
set { recordsCount = value; }
}
public OrganizationUser[] PageUsers
{
get { return pageUsers; }
set { pageUsers = value; }
}
}
}

View file

@ -0,0 +1,36 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace WebsitePanel.Providers.HostedSolution
{
public class PasswordPolicy
{
public int MinLength { get; set; }
public bool IsComplexityEnable { get; set; }
}
}

View file

@ -0,0 +1,67 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
namespace WebsitePanel.Providers.HostedSolution
{
public class SharePointStatistics : BaseStatistics
{
public string SiteCollectionUrl
{
get;
set;
}
public string SiteCollectionOwner
{
get;
set;
}
public DateTime SiteCollectionCreated
{
get;
set;
}
public long SiteCollectionQuota
{
get;
set;
}
public long SiteCollectionSize
{
get;
set;
}
}
}

View file

@ -0,0 +1,71 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System.Text;
namespace WebsitePanel.Providers.HostedSolution
{
public class SharePointStatisticsReport : BaseReport<SharePointStatistics>
{
public override string ToCSV()
{
StringBuilder mainBuilder = new StringBuilder();
AddCSVHeader(mainBuilder);
foreach (SharePointStatistics item in Items)
{
StringBuilder sb = new StringBuilder();
sb.Append("\n");
sb.AppendFormat("{0},", ToCsvString(item.TopResellerName));
sb.AppendFormat("{0},", ToCsvString(item.ResellerName));
sb.AppendFormat("{0},", ToCsvString(item.CustomerName));
sb.AppendFormat("{0},", ToCsvString(item.CustomerCreated));
sb.AppendFormat("{0},", ToCsvString(item.HostingSpace));
sb.AppendFormat("{0},", ToCsvString(item.HostingSpaceCreated));
sb.AppendFormat("{0},", ToCsvString(item.OrganizationName));
sb.AppendFormat("{0},", ToCsvString(item.OrganizationCreated));
sb.AppendFormat("{0},", ToCsvString(item.OrganizationID));
sb.AppendFormat("{0},", ToCsvString(item.SiteCollectionUrl));
sb.AppendFormat("{0},", ToCsvString(item.SiteCollectionOwner));
sb.AppendFormat("{0},", ToCsvString(item.SiteCollectionCreated));
sb.AppendFormat("{0},", item.SiteCollectionQuota != 0 && item.SiteCollectionQuota != -1 ? ToCsvString(item.SiteCollectionQuota): "Unlimited");
sb.AppendFormat("{0}", ToCsvString(item.SiteCollectionSize / 1024.0 / 1024.0));
mainBuilder.Append(sb.ToString());
}
return mainBuilder.ToString();
}
private static void AddCSVHeader(StringBuilder sb)
{
sb.Append("Top Reseller,Reseller,Customer,Customer Created,Hosting Space,Hosting Space Created,Ogranization Name,Ogranization Created,Organization ID,Site Collection URL,Site collection owner,Site collection created,Site collection quota(Mb),Site collection size(Mb)");
}
}
}

View file

@ -0,0 +1,83 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections;
namespace WebsitePanel.Providers.Mail
{
public interface IMailServer
{
// mail domains
bool DomainExists(string domainName);
string[] GetDomains();
MailDomain GetDomain(string domainName);
void CreateDomain(MailDomain domain);
void UpdateDomain(MailDomain domain);
void DeleteDomain(string domainName);
// mail aliases
bool DomainAliasExists(string domainName, string aliasName);
string[] GetDomainAliases(string domainName);
void AddDomainAlias(string domainName, string aliasName);
void DeleteDomainAlias(string domainName, string aliasName);
// mailboxes
bool AccountExists(string mailboxName);
MailAccount[] GetAccounts(string domainName);
MailAccount GetAccount(string mailboxName);
void CreateAccount(MailAccount mailbox);
void UpdateAccount(MailAccount mailbox);
void DeleteAccount(string mailboxName);
//forwardings (mail aliases)
bool MailAliasExists(string mailAliasName);
MailAlias[] GetMailAliases(string domainName);
MailAlias GetMailAlias(string mailAliasName);
void CreateMailAlias(MailAlias mailAlias);
void UpdateMailAlias(MailAlias mailAlias);
void DeleteMailAlias(string mailAliasName);
// groups
bool GroupExists(string groupName);
MailGroup[] GetGroups(string domainName);
MailGroup GetGroup(string groupName);
void CreateGroup(MailGroup group);
void UpdateGroup(MailGroup group);
void DeleteGroup(string groupName);
// mailing lists
bool ListExists(string maillistName);
MailList[] GetLists(string domainName);
MailList GetList(string maillistName);
void CreateList(MailList maillist);
void UpdateList(MailList maillist);
void DeleteList(string maillistName);
}
}

View file

@ -0,0 +1,202 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
namespace WebsitePanel.Providers.Mail
{
[Serializable]
public class MailAccount : ServiceProviderItem
{
private bool enabled;
private string password;
private string replyTo;
private bool responderEnabled;
private string responderSubject;
private string responderMessage;
private string firstName; // SM
private string lastName; // SM
private bool deleteOnForward;
private string[] forwardingAddresses;
private string signature;
private bool passwordLocked;
private int maxMailboxSize;
private bool changePassword;
private bool isDomainAdmin;
private bool isDomainAdminEnabled;
private bool retainLocalCopy;
private bool signatureEnabled;
private string signatureHTML;
/// <summary>
///
/// </summary>
public bool UnlimitedSize
{
get
{
return (maxMailboxSize < 0);
}
}
public string ReplyTo
{
get { return this.replyTo; }
set { this.replyTo = value; }
}
public string ResponderSubject
{
get { return this.responderSubject; }
set { this.responderSubject = value; }
}
public string ResponderMessage
{
get { return this.responderMessage; }
set { this.responderMessage = value; }
}
public bool ResponderEnabled
{
get { return this.responderEnabled; }
set { this.responderEnabled = value; }
}
public bool Enabled
{
get { return this.enabled; }
set { this.enabled = value; }
}
[Persistent]
public string Password
{
get { return this.password; }
set { this.password = value; }
}
#region SmarterMail
/// <summary>
/// First Name
/// </summary>
public string FirstName
{
get { return firstName; }
set { firstName = value; }
}
/// <summary>
/// Last name
/// </summary>
public string LastName
{
get { return lastName; }
set { lastName = value; }
}
public bool DeleteOnForward
{
get { return deleteOnForward; }
set { deleteOnForward = value; }
}
public string[] ForwardingAddresses
{
get { return forwardingAddresses; }
set { forwardingAddresses = value; }
}
public string Signature
{
get { return signature; }
set { signature = value; }
}
public bool IsDomainAdminEnabled
{
get { return isDomainAdminEnabled; }
set { isDomainAdminEnabled = value; }
}
public bool IsDomainAdmin
{
get { return isDomainAdmin; }
set { isDomainAdmin = value; }
}
public bool PasswordLocked
{
get { return passwordLocked; }
set { passwordLocked = value; }
}
public int MaxMailboxSize
{
get { return maxMailboxSize; }
set { maxMailboxSize = value; }
}
public bool ChangePassword
{
get { return changePassword; }
set { changePassword = value; }
}
#endregion
#region MDaemon
public bool RetainLocalCopy
{
get { return retainLocalCopy; }
set { retainLocalCopy = value; }
}
#endregion
#region hMail
public bool SignatureEnabled
{
get { return signatureEnabled; }
set { signatureEnabled = value; }
}
public string SignatureHTML
{
get { return signatureHTML; }
set { signatureHTML = value; }
}
#endregion
}
}

View file

@ -0,0 +1,47 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
namespace WebsitePanel.Providers.Mail
{
/// <summary>
/// Summary description for MailForwardingItem.
/// </summary>
[Serializable]
public class MailAlias : MailAccount
{
private string forwardTo;
public string ForwardTo
{
get { return this.forwardTo; }
set { this.forwardTo = value; }
}
}
}

View file

@ -0,0 +1,369 @@
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
namespace WebsitePanel.Providers.Mail
{
[Serializable]
public class MailDomain : ServiceProviderItem
{
#region Smarter Mail 5.x String Constants
//Domain Features
public const string SMARTERMAIL5_SHOW_DOMAIN_REPORTS = "ShowDomainReports";
public const string SMARTERMAIL5_SHOW_CALENDAR = "ShowCalendar";
public const string SMARTERMAIL5_SHOW_CONTACTS = "ShowContacts";
public const string SMARTERMAIL5_SHOW_TASKS = "ShowTasks";
public const string SMARTERMAIL5_SHOW_NOTES = "ShowNotes";
public const string SMARTERMAIL5_POP_RETRIEVAL = "ShowCalendar";
public const string SMARTERMAIL5_POP_RETREIVAL_ENABLED = "EnablePopRetreival";
public const string SMARTERMAIL5_CATCHALLS_ENABLED = "EnableCatchAlls";
//Domain Throttling
public const string SMARTERMAIL5_MESSAGES_PER_HOUR = "MessagesPerHour";
public const string SMARTERMAIL5_MESSAGES_PER_HOUR_ENABLED = "MessagesPerHourEnabled";
public const string SMARTERMAIL5_BANDWIDTH_PER_HOUR = "BandwidthPerHour";
public const string SMARTERMAIL5_BANDWIDTH_PER_HOUR_ENABLED = "BandwidthPerHourEnabled";
public const string SMARTERMAIL5_BOUNCES_PER_HOUR = "BouncesReceivedPerHour";
public const string SMARTERMAIL5_BOUNCES_PER_HOUR_ENABLED = "BouncesPerHourEnabled";
//Domain Limits
public const string SMARTERMAIL5_POP_RETREIVAL_ACCOUNTS = "PopRetreivalAccounts";
#endregion
#region Smarter Mail 6.x String Constants
//Domain Features
public const string SMARTERMAIL6_IMAP_RETREIVAL_ENABLED = "EnableImapRetreival";
public const string SMARTERMAIL6_MAIL_SIGNING_ENABLED = "EnableMailSigning";
public const string SMARTERMAIL6_EMAIL_REPORTS_ENABLED = "EnableEmailReports";
public const string SMARTERMAIL6_SYNCML_ENABLED = "EnableSyncML";
#endregion
//license type
public const string SMARTERMAIL_LICENSE_TYPE = "LicenseType";
private string[] blackList = new string[0];
private string redirectionHosts;
private bool redirectionActive;
private bool enabled;
private string postmasterAccount;
private string catchAllAccount;
private string abuseAccount;
private int maxPopRetrievalAccounts;
public string RedirectionHosts
{
get { return this.redirectionHosts; }
set { this.redirectionHosts = value; }
}
public string[] BlackList
{
get { return this.blackList; }
set { this.blackList = value; }
}
public string CatchAllAccount
{
get { return this.catchAllAccount; }
set { this.catchAllAccount = value; }
}
public string AbuseAccount
{
get { return this.abuseAccount; }
set { this.abuseAccount = value; }
}
public bool RedirectionActive
{
get { return this.redirectionActive; }
set { this.redirectionActive = value; }
}
public bool Enabled
{
get { return this.enabled; }
set { this.enabled = value; }
}
public string PostmasterAccount
{
get { return this.postmasterAccount; }
set { this.postmasterAccount = value; }
}
#region SmarterMail
private string primaryDomainAdminUserName;
private string primaryDomainAdminPassword;
private string primaryDomainAdminFirstName;
private string primaryDomainAdminLastName;
private string serverIP;
private string path;
private int imapPort = 143;
private int popPort = 110;
private int smtpPort = 25;
private int smtpPortAlt;
private int ldapPort;
private int maxAliases;
private int maxDomainAliases;
private int maxLists;
private int maxDomainSizeInMB;
private int maxDomainUsers;
private int maxMailboxSizeInMB;
private int maxMessageSize;
private int maxRecipients;
private bool requireSmtpAuthentication;
private string listCommandAddress = "";
private bool isGlobalAddressList;
private bool sharedContacts;
private bool sharedNotes;
private bool sharedCalendars;
private bool sharedFolders;
private bool sharedTasks;
private bool bypassForwardBlackList;
private bool showstatsmenu;
private bool showspammenu;
private bool showlistmenu;
private bool showdomainaliasmenu;
private bool showcontentfilteringmenu;
public bool ShowsStatsMenu
{
get { return showstatsmenu; }
set { showstatsmenu = value; }
}
public bool ShowSpamMenu
{
get { return showspammenu; }
set { showspammenu = value; }
}
public bool ShowListMenu
{
get { return showlistmenu; }
set { showlistmenu = value; }
}
public bool ShowDomainAliasMenu
{
get { return showdomainaliasmenu; }
set { showdomainaliasmenu = value; }
}
public bool ShowContentFilteringMenu
{
get { return showcontentfilteringmenu; }
set { showcontentfilteringmenu = value; }
}
public bool BypassForwardBlackList
{
get { return bypassForwardBlackList; }
set { bypassForwardBlackList = value; }
}
public bool IsGlobalAddressList
{
get { return isGlobalAddressList; }
set { isGlobalAddressList = value; }
}
public bool SharedContacts
{
get { return sharedContacts; }
set { sharedContacts = value; }
}
public bool SharedNotes
{
get { return sharedNotes; }
set { sharedNotes = value; }
}
public bool SharedCalendars
{
get { return sharedCalendars; }
set { sharedCalendars = value; }
}
public bool SharedFolders
{
get { return sharedFolders; }
set { sharedFolders = value; }
}
public bool SharedTasks
{
get { return sharedTasks; }
set { sharedTasks = value; }
}
public string PrimaryDomainAdminUserName
{
get { return primaryDomainAdminUserName; }
set { primaryDomainAdminUserName = value; }
}
public string PrimaryDomainAdminPassword
{
get { return primaryDomainAdminPassword; }
set { primaryDomainAdminPassword = value; }
}
public string PrimaryDomainAdminFirstName
{
get { return primaryDomainAdminFirstName; }
set { primaryDomainAdminFirstName = value; }
}
public string PrimaryDomainAdminLastName
{
get { return primaryDomainAdminLastName; }
set { primaryDomainAdminLastName = value; }
}
public string ServerIP
{
get { return serverIP; }
set { serverIP = value; }
}
public string Path
{
get { return path; }
set { path = value; }
}
public int SmtpPortAlt
{
get { return smtpPortAlt; }
set { smtpPortAlt = value; }
}
public int LdapPort
{
get { return ldapPort; }
set { ldapPort = value; }
}
public int ImapPort
{
get { return imapPort; }
set { imapPort = value; }
}
public int PopPort
{
get { return popPort; }
set { popPort = value; }
}
public int SmtpPort
{
get { return smtpPort; }
set { smtpPort = value; }
}
public int MaxAliases
{
get { return maxAliases; }
set { maxAliases = value; }
}
public int MaxDomainAliases
{
get { return maxDomainAliases; }
set { maxDomainAliases = value; }
}
public int MaxLists
{
get { return maxLists; }
set { maxLists = value; }
}
public int MaxDomainSizeInMB
{
get { return maxDomainSizeInMB; }
set { maxDomainSizeInMB = value; }
}
public int MaxDomainUsers
{
get { return maxDomainUsers; }
set { maxDomainUsers = value; }
}
public int MaxMailboxSizeInMB
{
get { return maxMailboxSizeInMB; }
set { maxMailboxSizeInMB = value; }
}
public int MaxMessageSize
{
get { return maxMessageSize; }
set { maxMessageSize = value; }
}
public int MaxRecipients
{
get { return maxRecipients; }
set { maxRecipients = value; }
}
public int MaxPopRetrievalAccounts
{
get { return maxPopRetrievalAccounts; }
set { maxPopRetrievalAccounts = value; }
}
public bool RequireSmtpAuthentication
{
get { return requireSmtpAuthentication; }
set { requireSmtpAuthentication = value; }
}
public string ListCommandAddress
{
get { return listCommandAddress; }
set { listCommandAddress = value; }
}
#endregion
}
}

Some files were not shown because too many files have changed in this diff Show more