Initial project's source code check-in.
This commit is contained in:
commit
b03b0b373f
4573 changed files with 981205 additions and 0 deletions
|
@ -0,0 +1,357 @@
|
|||
// 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.EnterpriseServer
|
||||
{
|
||||
public class BusinessErrorCodes
|
||||
{
|
||||
#region Servers
|
||||
public const int ERROR_ADD_SERVER_NOT_FOUND = -400;
|
||||
public const int ERROR_ADD_SERVER_BAD_REQUEST = -401;
|
||||
public const int ERROR_ADD_SERVER_INTERNAL_SERVER_ERROR = -403;
|
||||
public const int ERROR_ADD_SERVER_SERVICE_UNAVAILABLE = -404;
|
||||
public const int ERROR_ADD_SERVER_UNAUTHORIZED = -405;
|
||||
public const int ERROR_ADD_SERVER_WRONG_PASSWORD = -406;
|
||||
public const int ERROR_ADD_SERVER_APPLICATION_ERROR = -407;
|
||||
public const int ERROR_USER_SERVER_WRONG_AD_SETTINGS = -402;
|
||||
public const int ERROR_ADD_SERVER_URL_UNAVAILABLE = -409;
|
||||
#endregion
|
||||
|
||||
#region Users
|
||||
public const int ERROR_USER_ALREADY_EXISTS = -100;
|
||||
|
||||
public const int ERROR_USER_NOT_FOUND = -101;
|
||||
public const int ERROR_USER_HAS_USERS = -102;
|
||||
|
||||
public const int ERROR_USER_ACCOUNT_PENDING = -103;
|
||||
public const int ERROR_USER_ACCOUNT_SUSPENDED = -104;
|
||||
public const int ERROR_USER_ACCOUNT_CANCELLED = -105;
|
||||
public const int ERROR_USER_ACCOUNT_DEMO = -106;
|
||||
public const int ERROR_USER_ACCOUNT_SHOULD_BE_ADMINISTRATOR = -107;
|
||||
public const int ERROR_USER_ACCOUNT_SHOULD_BE_RESELLER = -108;
|
||||
|
||||
public const int ERROR_USER_WRONG_USERNAME = -109;
|
||||
public const int ERROR_USER_WRONG_PASSWORD = -110;
|
||||
public const int ERROR_INVALID_USER_NAME = -111;
|
||||
#endregion
|
||||
|
||||
#region Packages
|
||||
public const int ERROR_PACKAGE_NOT_FOUND = -300;
|
||||
public const int ERROR_PACKAGE_HAS_PACKAGES = -301;
|
||||
|
||||
public const int ERROR_PACKAGE_NEW = -302;
|
||||
public const int ERROR_PACKAGE_SUSPENDED = -303;
|
||||
public const int ERROR_PACKAGE_CANCELLED = -304;
|
||||
|
||||
public const int ERROR_PACKAGE_QUOTA_EXCEED = -305;
|
||||
#endregion
|
||||
|
||||
#region Settings
|
||||
public const int ERROR_SETTINGS_ACCOUNT_LETTER_EMPTY_BODY = -200;
|
||||
public const int ERROR_SETTINGS_PACKAGE_LETTER_EMPTY_BODY = -201;
|
||||
public const int ERROR_SETTINGS_PASSWORD_LETTER_EMPTY_BODY = -202;
|
||||
#endregion
|
||||
|
||||
#region Domains
|
||||
public const int ERROR_DOMAIN_QUOTA_LIMIT = -500;
|
||||
public const int ERROR_DOMAINPOINTERS_QUOTA_LIMIT = -510;
|
||||
public const int ERROR_INSTANT_ALIAS_IS_NOT_CONFIGURED = -511;
|
||||
public const int ERROR_SUBDOMAIN_QUOTA_LIMIT = -508;
|
||||
public const int ERROR_RESTRICTED_DOMAIN = -501;
|
||||
public const int ERROR_DOMAIN_ALREADY_EXISTS = -502;
|
||||
public const int ERROR_DOMAIN_STARTS_WWW = -503;
|
||||
|
||||
public const int ERROR_DOMAIN_PACKAGE_ITEM_NOT_FOUND = -504;
|
||||
public const int ERROR_DNS_PACKAGE_ITEM_NOT_FOUND = -505;
|
||||
public const int ERROR_DOMAIN_POINTS_TO_WEB_SITE = -506;
|
||||
public const int ERROR_DOMAIN_POINTS_TO_MAIL_DOMAIN = -507;
|
||||
public const int ERROR_DNS_ZONE_EXISTS = -509;
|
||||
#endregion
|
||||
|
||||
#region Web Sites
|
||||
public const int ERROR_WEB_SITES_QUOTA_LIMIT = -600;
|
||||
public const int ERROR_WEB_SITE_ALREADY_EXISTS = -601;
|
||||
public const int ERROR_WEB_SITE_SERVICE_UNAVAILABLE = -602;
|
||||
public const int ERROR_FP_ACCOUNT_EXISTS = -603;
|
||||
public const int ERROR_FP_CHANGE_PASSWORD = -604;
|
||||
public const int ERROR_VDIR_ALREADY_EXISTS = -605;
|
||||
|
||||
public const int ERROR_WEB_SITE_PACKAGE_ITEM_NOT_FOUND = -606;
|
||||
public const int ERROR_WEB_SITE_IP_ADDRESS_NOT_SPECIFIED = -607;
|
||||
public const int ERROR_WEB_SITE_SHARED_IP_ADDRESS_NOT_SPECIFIED = -608;
|
||||
public const int ERROR_WEB_SHARED_SSL_QUOTA_LIMIT = -609;
|
||||
#endregion
|
||||
|
||||
#region Mail
|
||||
public const int ERROR_MAIL_DOMAIN_EXISTS = -700;
|
||||
public const int ERROR_MAIL_RESOURCE_UNAVAILABLE = -701;
|
||||
public const int ERROR_MAIL_ACCOUNTS_RESOURCE_QUOTA_LIMIT = -702;
|
||||
public const int ERROR_MAIL_ACCOUNTS_PACKAGE_ITEM_EXISTS = -703;
|
||||
public const int ERROR_MAIL_ACCOUNTS_SERVICE_ITEM_EXISTS = -704;
|
||||
|
||||
public const int ERROR_MAIL_FORWARDINGS_RESOURCE_QUOTA_LIMIT = -705;
|
||||
public const int ERROR_MAIL_FORWARDINGS_PACKAGE_ITEM_EXISTS = -706;
|
||||
public const int ERROR_MAIL_FORWARDINGS_SERVICE_ITEM_EXISTS = -707;
|
||||
|
||||
public const int ERROR_MAIL_GROUPS_RESOURCE_QUOTA_LIMIT = -708;
|
||||
public const int ERROR_MAIL_GROUPS_PACKAGE_ITEM_EXISTS = -709;
|
||||
public const int ERROR_MAIL_GROUPS_SERVICE_ITEM_EXISTS = -710;
|
||||
|
||||
public const int ERROR_MAIL_LISTS_RESOURCE_QUOTA_LIMIT = -711;
|
||||
public const int ERROR_MAIL_LISTS_PACKAGE_ITEM_EXISTS = -712;
|
||||
public const int ERROR_MAIL_LISTS_SERVICE_ITEM_EXISTS = -713;
|
||||
|
||||
public const int ERROR_MAIL_ACCOUNTS_PACKAGE_ITEM_NOT_FOUND = -714;
|
||||
public const int ERROR_MAIL_FORWARDINGS_PACKAGE_ITEM_NOT_FOUND = -715;
|
||||
public const int ERROR_MAIL_GROUPS_PACKAGE_ITEM_NOT_FOUND = -716;
|
||||
public const int ERROR_MAIL_LISTS_PACKAGE_ITEM_NOT_FOUND = -717;
|
||||
public const int ERROR_MAIL_DOMAIN_PACKAGE_ITEM_NOT_FOUND = -718;
|
||||
public const int ERROR_MAIL_DOMAIN_SERVICE_ITEM_NOT_FOUND = -719;
|
||||
public const int ERROR_MAIL_DOMAIN_IS_NOT_EMPTY = -720;
|
||||
|
||||
public const int ERROR_MAIL_GROUPS_RECIPIENTS_LIMIT = -721;
|
||||
public const int ERROR_MAIL_LISTS_RECIPIENTS_LIMIT = -722;
|
||||
public const int ERROR_MAIL_LICENSE_DOMAIN_QUOTA = -723;
|
||||
public const int ERROR_MAIL_LICENSE_USERS_QUOTA = -724;
|
||||
|
||||
public const int ERROR_MAIL_ACCOUNT_MAX_MAILBOX_SIZE_LIMIT = -725;
|
||||
#endregion
|
||||
|
||||
#region FTP
|
||||
public const int ERROR_FTP_RESOURCE_UNAVAILABLE = -801;
|
||||
public const int ERROR_FTP_RESOURCE_QUOTA_LIMIT = -802;
|
||||
public const int ERROR_FTP_PACKAGE_ITEM_EXISTS = -803;
|
||||
public const int ERROR_FTP_SERVICE_ITEM_EXISTS = -804;
|
||||
public const int ERROR_FTP_PACKAGE_ITEM_NOT_FOUND = -805;
|
||||
public const int ERROR_FTP_USERNAME_LENGTH = -806;
|
||||
#endregion
|
||||
|
||||
#region MS SQL
|
||||
public const int ERROR_MSSQL_RESOURCE_UNAVAILABLE = -901;
|
||||
public const int ERROR_MSSQL_DATABASES_RESOURCE_QUOTA_LIMIT = -902;
|
||||
public const int ERROR_MSSQL_DATABASES_PACKAGE_ITEM_EXISTS = -903;
|
||||
public const int ERROR_MSSQL_DATABASES_SERVICE_ITEM_EXISTS = -904;
|
||||
|
||||
public const int ERROR_MSSQL_USERS_RESOURCE_QUOTA_LIMIT = -905;
|
||||
public const int ERROR_MSSQL_USERS_PACKAGE_ITEM_EXISTS = -906;
|
||||
public const int ERROR_MSSQL_USERS_SERVICE_ITEM_EXISTS = -907;
|
||||
|
||||
public const int ERROR_MSSQL_DATABASES_PACKAGE_ITEM_NOT_FOUND = -908;
|
||||
public const int ERROR_MSSQL_USERS_PACKAGE_ITEM_NOT_FOUND = -909;
|
||||
#endregion
|
||||
|
||||
#region MySQL
|
||||
public const int ERROR_MYSQL_RESOURCE_UNAVAILABLE = -1001;
|
||||
public const int ERROR_MYSQL_DATABASES_RESOURCE_QUOTA_LIMIT = -1002;
|
||||
public const int ERROR_MYSQL_DATABASES_PACKAGE_ITEM_EXISTS = -1003;
|
||||
public const int ERROR_MYSQL_DATABASES_SERVICE_ITEM_EXISTS = -1004;
|
||||
|
||||
public const int ERROR_MYSQL_USERS_RESOURCE_QUOTA_LIMIT = -1005;
|
||||
public const int ERROR_MYSQL_USERS_PACKAGE_ITEM_EXISTS = -1006;
|
||||
public const int ERROR_MYSQL_USERS_SERVICE_ITEM_EXISTS = -1007;
|
||||
|
||||
public const int ERROR_MYSQL_DATABASES_PACKAGE_ITEM_NOT_FOUND = -1008;
|
||||
public const int ERROR_MYSQL_USERS_PACKAGE_ITEM_NOT_FOUND = -1009;
|
||||
public const int ERROR_MYSQL_INVALID_USER_NAME = -1010;
|
||||
public const int ERROR_MYSQL_INVALID_DATABASE_NAME = -1011;
|
||||
#endregion
|
||||
|
||||
#region Statistics
|
||||
public const int ERROR_STATS_RESOURCE_UNAVAILABLE = -1301;
|
||||
public const int ERROR_STATS_RESOURCE_QUOTA_LIMIT = -1302;
|
||||
public const int ERROR_STATS_PACKAGE_ITEM_EXISTS = -1303;
|
||||
public const int ERROR_STATS_SERVICE_ITEM_EXISTS = -1304;
|
||||
|
||||
public const int ERROR_STATS_PACKAGE_ITEM_NOT_FOUND = -1305;
|
||||
#endregion
|
||||
|
||||
#region Account Creation Wizard
|
||||
public const int ERROR_ACCOUNT_WIZARD_USER_EXISTS = -1100;
|
||||
public const int ERROR_ACCOUNT_WIZARD_FTP_ACCOUNT_EXISTS = -1101;
|
||||
#endregion
|
||||
|
||||
#region Web Apps Installer
|
||||
public const int ERROR_WEB_INSTALLER_WEBSITE_NOT_EXISTS = -1201;
|
||||
public const int ERROR_WEB_INSTALLER_CANT_CONNECT_DATABASE = -1202;
|
||||
|
||||
public const int ERROR_WEB_INSTALLER_TARGET_WEBSITE_UNSUITABLE = -1203;
|
||||
public const int ERROR_WEB_INSTALLER_TARGET_DATABASE_UNSUITABLE = -1204;
|
||||
#endregion
|
||||
|
||||
#region Hosting Plans
|
||||
public const int ERROR_HOSTING_PLAN_USED_IN_PACKAGE = -1501;
|
||||
public const int ERROR_HOSTING_ADDON_USED_IN_PACKAGE = -1502;
|
||||
#endregion
|
||||
|
||||
#region IP Addresses
|
||||
public const int ERROR_IP_USED_IN_NAME_SERVER = -1601;
|
||||
public const int ERROR_IP_USED_BY_PACKAGE_ITEM = -1602;
|
||||
#endregion
|
||||
|
||||
#region Servers
|
||||
public const int ERROR_SERVER_CONTAINS_SERVICES = -1701;
|
||||
public const int ERROR_SERVER_CONTAINS_PACKAGES = -1702;
|
||||
public const int ERROR_SERVER_USED_IN_HOSTING_PLANS = -1703;
|
||||
#endregion
|
||||
|
||||
#region Services
|
||||
public const int ERROR_SERVICE_CONTAINS_SERVICE_ITEMS = -1801;
|
||||
public const int ERROR_SERVICE_USED_IN_VIRTUAL_SERVER = -1802;
|
||||
#endregion
|
||||
|
||||
#region SMTP
|
||||
public const int SMTP_BAD_COMMAND_SEQUENCE = -1901;
|
||||
public const int SMTP_CANNOT_VERIFY_USER_WILL_ATTEMPT_DELIVERY = -1902;
|
||||
public const int SMTP_CLIENT_NOT_PERMITTED = -1903;
|
||||
public const int SMTP_COMMAND_NOT_IMPLEMENTED = -1904;
|
||||
public const int SMTP_COMMAND_PARAMETER_NOT_IMPLEMENTED = -1905;
|
||||
public const int SMTP_COMMAND_UNRECOGNIZED = -1906;
|
||||
public const int SMTP_EXCEEDED_STORAGE_ALLOCATION = -1907;
|
||||
public const int SMTP_GENERAL_FAILURE = -1908;
|
||||
public const int SMTP_INSUFFICIENT_STORAGE = -1909;
|
||||
public const int SMTP_LOCAL_ERROR_IN_PROCESSING = -1910;
|
||||
public const int SMTP_MAILBOX_BUSY = -1911;
|
||||
public const int SMTP_MAILBOX_NAME_NOTALLOWED = -1912;
|
||||
public const int SMTP_MAILBOX_UNAVAILABLE = -1913;
|
||||
public const int SMTP_MUST_ISSUE_START_TLS_FIRST = -1914;
|
||||
public const int SMTP_SERVICE_CLOSING_TRANSMISSION_CHANNEL = -1915;
|
||||
public const int SMTP_SERVICE_NOT_AVAILABLE = -1916;
|
||||
public const int SMTP_SYNTAX_ERROR = -1917;
|
||||
public const int SMTP_TRANSACTION_FAILED = -1918;
|
||||
public const int SMTP_USER_NOT_LOCAL_TRY_ALTERNATE_PATH = -1919;
|
||||
public const int SMTP_USER_NOT_LOCAL_WILL_FORWARD = -1920;
|
||||
public const int SMTP_UNKNOWN_ERROR = -1921;
|
||||
#endregion
|
||||
|
||||
#region SharePoint
|
||||
public const int ERROR_SHAREPOINT_USERS_RESOURCE_QUOTA_LIMIT = -1402;
|
||||
public const int ERROR_SHAREPOINT_USERS_PACKAGE_ITEM_EXISTS = -1403;
|
||||
public const int ERROR_SHAREPOINT_USERS_SERVICE_ITEM_EXISTS = -1404;
|
||||
|
||||
public const int ERROR_SHAREPOINT_GROUPS_RESOURCE_QUOTA_LIMIT = -1405;
|
||||
public const int ERROR_SHAREPOINT_GROUPS_PACKAGE_ITEM_EXISTS = -1406;
|
||||
public const int ERROR_SHAREPOINT_GROUPS_SERVICE_ITEM_EXISTS = -1407;
|
||||
|
||||
public const int ERROR_SHAREPOINT_USERS_PACKAGE_ITEM_NOT_FOUND = -1408;
|
||||
public const int ERROR_SHAREPOINT_GROUPS_PACKAGE_ITEM_NOT_FOUND = -1409;
|
||||
public const int ERROR_SHAREPOINT_RESOURCE_QUOTA_LIMIT = -1410;
|
||||
|
||||
public const int ERROR_SHAREPOINT_RESOURCE_UNAVAILABLE = -2001;
|
||||
|
||||
public const int ERROR_SHAREPOINT_PACKAGE_ITEM_EXISTS = -2003;
|
||||
|
||||
public const int ERROR_SHAREPOINT_PACKAGE_ITEM_NOT_FOUND = -2004;
|
||||
#endregion
|
||||
|
||||
#region Operating System
|
||||
public const int ERROR_OS_RESOURCE_UNAVAILABLE = -2101;
|
||||
public const int ERROR_OS_DSN_RESOURCE_QUOTA_LIMIT = -2102;
|
||||
public const int ERROR_OS_DSN_PACKAGE_ITEM_EXISTS = -2103;
|
||||
public const int ERROR_OS_DSN_SERVICE_ITEM_EXISTS = -2104;
|
||||
public const int ERROR_OS_DSN_PACKAGE_ITEM_NOT_FOUND = -2105;
|
||||
#endregion
|
||||
|
||||
#region Scheduled Tasks
|
||||
public const int ERROR_OS_SCHEDULED_TASK_QUOTA_LIMIT = -2200;
|
||||
#endregion
|
||||
|
||||
#region Backup/Restore
|
||||
public const int ERROR_BACKUP_TEMP_FOLDER_UNAVAILABLE = -2400;
|
||||
public const int ERROR_BACKUP_DEST_FOLDER_UNAVAILABLE = -2401;
|
||||
public const int ERROR_BACKUP_SERVER_FOLDER_UNAVAILABLE = -2402;
|
||||
|
||||
public const int ERROR_RESTORE_INVALID_BACKUP_SET = -2501;
|
||||
public const int ERROR_RESTORE_BACKUP_SOURCE_UNAVAILABLE = -2502;
|
||||
public const int ERROR_RESTORE_BACKUP_SOURCE_NOT_FOUND = -2503;
|
||||
#endregion
|
||||
|
||||
#region Exchange Server
|
||||
|
||||
public const int ERROR_EXCHANGE_EMAIL_EXISTS = -2602;
|
||||
public const int ERROR_EXCHANGE_DELETE_SOME_PROBLEMS = -2606;
|
||||
public const int ERROR_EXCHANGE_MAILBOXES_QUOTA_LIMIT = -2607;
|
||||
public const int ERROR_EXCHANGE_CONTACTS_QUOTA_LIMIT = -2608;
|
||||
public const int ERROR_EXCHANGE_DLISTS_QUOTA_LIMIT = -2609;
|
||||
public const int ERROR_EXCHANGE_PFOLDERS_QUOTA_LIMIT = -2610;
|
||||
public const int ERROR_EXCHANGE_DOMAINS_QUOTA_LIMIT = -2611;
|
||||
public const int ERROR_EXCHANGE_STORAGE_QUOTAS_EXCEED_HOST_VALUES = -2612;
|
||||
#endregion
|
||||
|
||||
#region Organizations
|
||||
|
||||
public const int ERROR_ORG_ID_EXISTS = -2701;
|
||||
public const int ERROR_ORG_EMAIL_EXISTS = -2702;
|
||||
public const int ERROR_ORGS_RESOURCE_QUOTA_LIMIT = -2703;
|
||||
public const int ERROR_ORGANIZATION_TEMP_DOMAIN_IS_NOT_SPECIFIED = -2704;
|
||||
public const int ERROR_ORGANIZATION_DOMAIN_IS_IN_USE = -2705;
|
||||
public const int ERROR_ORGANIZATION_DELETE_SOME_PROBLEMS = -2706;
|
||||
public const int ERROR_USERS_RESOURCE_QUOTA_LIMIT = -2707;
|
||||
public const int CURRENT_USER_IS_CRM_USER = -2708;
|
||||
public const int CURRENT_USER_IS_OCS_USER = -2709;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Generic Error Codes
|
||||
|
||||
public const int FAILED_EXECUTE_SERVICE_OPERATION = -999;
|
||||
|
||||
#endregion
|
||||
|
||||
#region File Error Codes
|
||||
|
||||
public const int ERROR_FILE_GENERIC_LOGGED = -3333;
|
||||
public const int ERROR_FILE_COPY_TO_SELF = -3000;
|
||||
public const int ERROR_FILE_COPY_TO_OWN_SUBFOLDER = -3001;
|
||||
public const int ERROR_FILE_DEST_FOLDER_NONEXISTENT = -3002;
|
||||
public const int ERROR_FILE_CREATE_FILE_WITH_DIR_NAME = -3003;
|
||||
public const int ERROR_FILE_MOVE_PATH_ALREADY_EXISTS = -3004;
|
||||
#endregion
|
||||
|
||||
public static string ToText(int code)
|
||||
{
|
||||
switch (code)
|
||||
{
|
||||
// SecurityContext
|
||||
case BusinessErrorCodes.ERROR_USER_ACCOUNT_DEMO: return "ERROR_USER_ACCOUNT_DEMO";
|
||||
case BusinessErrorCodes.ERROR_USER_ACCOUNT_PENDING: return "ERROR_USER_ACCOUNT_PENDING";
|
||||
case BusinessErrorCodes.ERROR_USER_ACCOUNT_SUSPENDED: return "ERROR_USER_ACCOUNT_SUSPENDED";
|
||||
case BusinessErrorCodes.ERROR_USER_ACCOUNT_CANCELLED: return "ERROR_USER_ACCOUNT_CANCELLED";
|
||||
case BusinessErrorCodes.ERROR_USER_ACCOUNT_SHOULD_BE_ADMINISTRATOR: return "ERROR_USER_ACCOUNT_SHOULD_BE_ADMINISTRATOR";
|
||||
case BusinessErrorCodes.ERROR_USER_ACCOUNT_SHOULD_BE_RESELLER: return "ERROR_USER_ACCOUNT_SHOULD_BE_RESELLER";
|
||||
case BusinessErrorCodes.ERROR_PACKAGE_NOT_FOUND: return "ERROR_PACKAGE_NOT_FOUND";
|
||||
case BusinessErrorCodes.ERROR_PACKAGE_CANCELLED: return "ERROR_PACKAGE_CANCELLED";
|
||||
case BusinessErrorCodes.ERROR_PACKAGE_SUSPENDED: return "ERROR_PACKAGE_SUSPENDED";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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.EnterpriseServer
|
||||
{
|
||||
public class GenericStringResult
|
||||
{
|
||||
int code;
|
||||
string value;
|
||||
|
||||
public int Code
|
||||
{
|
||||
get { return code; }
|
||||
set { code = value; }
|
||||
}
|
||||
|
||||
public string Value
|
||||
{
|
||||
get { return value; }
|
||||
set { this.value = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Net.Mail;
|
||||
|
||||
namespace WebsitePanel.EnterpriseServer
|
||||
{
|
||||
public class MailTemplate
|
||||
{
|
||||
public string From { get; set; }
|
||||
public string Bcc { get; set; }
|
||||
public string Subject { get; set; }
|
||||
public string Body { get; set; }
|
||||
public bool IsHtml { get; set; }
|
||||
public MailPriority Priority { get; set; }
|
||||
}
|
||||
}
|
|
@ -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.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace WebsitePanel.EnterpriseServer
|
||||
{
|
||||
public class DatabaseBrowserConfiguration
|
||||
{
|
||||
bool enabled;
|
||||
string method;
|
||||
string getData;
|
||||
string postData;
|
||||
|
||||
public bool Enabled
|
||||
{
|
||||
get { return this.enabled; }
|
||||
set { this.enabled = value; }
|
||||
}
|
||||
|
||||
public string Method
|
||||
{
|
||||
get { return this.method; }
|
||||
set { this.method = value; }
|
||||
}
|
||||
|
||||
public string GetData
|
||||
{
|
||||
get { return this.getData; }
|
||||
set { this.getData = value; }
|
||||
}
|
||||
|
||||
public string PostData
|
||||
{
|
||||
get { return this.postData; }
|
||||
set { this.postData = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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.Ecommerce.EnterpriseServer
|
||||
{
|
||||
public class BillingCycle
|
||||
{
|
||||
private int cycleId;
|
||||
private int resellerId;
|
||||
private string cycleName;
|
||||
private string billingPeriod;
|
||||
private int periodLength;
|
||||
private DateTime created;
|
||||
|
||||
public int CycleId
|
||||
{
|
||||
get { return this.cycleId; }
|
||||
set { this.cycleId = value; }
|
||||
}
|
||||
|
||||
public int ResellerId
|
||||
{
|
||||
get { return this.resellerId; }
|
||||
set { this.resellerId = value; }
|
||||
}
|
||||
|
||||
public string CycleName
|
||||
{
|
||||
get { return this.cycleName; }
|
||||
set { this.cycleName = value; }
|
||||
}
|
||||
|
||||
public string BillingPeriod
|
||||
{
|
||||
get { return this.billingPeriod; }
|
||||
set { this.billingPeriod = value; }
|
||||
}
|
||||
|
||||
public int PeriodLength
|
||||
{
|
||||
get { return this.periodLength; }
|
||||
set { this.periodLength = value; }
|
||||
}
|
||||
|
||||
public System.DateTime Created
|
||||
{
|
||||
get { return this.created; }
|
||||
set { this.created = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,123 @@
|
|||
// 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.Ecommerce.EnterpriseServer
|
||||
{
|
||||
[Serializable]
|
||||
public class Category
|
||||
{
|
||||
private int categoryId;
|
||||
private string categoryName;
|
||||
private string categorySku;
|
||||
private int parentId;
|
||||
private int level;
|
||||
private string shortDescription;
|
||||
private string fullDescription;
|
||||
private DateTime created;
|
||||
private DateTime modified;
|
||||
private int creatorId;
|
||||
private int modifierId;
|
||||
private int itemOrder;
|
||||
|
||||
public int CategoryId
|
||||
{
|
||||
get { return this.categoryId; }
|
||||
set { this.categoryId = value; }
|
||||
}
|
||||
|
||||
public string CategoryName
|
||||
{
|
||||
get { return this.categoryName; }
|
||||
set { this.categoryName = value; }
|
||||
}
|
||||
|
||||
public string CategorySku
|
||||
{
|
||||
get { return this.categorySku; }
|
||||
set { this.categorySku = value; }
|
||||
}
|
||||
|
||||
public int ParentId
|
||||
{
|
||||
get { return this.parentId; }
|
||||
set { this.parentId = value; }
|
||||
}
|
||||
|
||||
public string ShortDescription
|
||||
{
|
||||
get { return this.shortDescription; }
|
||||
set { this.shortDescription = value; }
|
||||
}
|
||||
|
||||
public string FullDescription
|
||||
{
|
||||
get { return this.fullDescription; }
|
||||
set { this.fullDescription = value; }
|
||||
}
|
||||
|
||||
public System.DateTime Created
|
||||
{
|
||||
get { return this.created; }
|
||||
set { this.created = value; }
|
||||
}
|
||||
|
||||
public System.DateTime Modified
|
||||
{
|
||||
get { return this.modified; }
|
||||
set { this.modified = value; }
|
||||
}
|
||||
|
||||
public int CreatorId
|
||||
{
|
||||
get { return this.creatorId; }
|
||||
set { this.creatorId = value; }
|
||||
}
|
||||
|
||||
public int ModifierId
|
||||
{
|
||||
get { return this.modifierId; }
|
||||
set { this.modifierId = value; }
|
||||
}
|
||||
|
||||
public int Level
|
||||
{
|
||||
get { return this.level; }
|
||||
set { this.level = value; }
|
||||
}
|
||||
|
||||
public int ItemOrder
|
||||
{
|
||||
get { return this.itemOrder; }
|
||||
set { this.itemOrder = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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 System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace WebsitePanel.Ecommerce.EnterpriseServer
|
||||
{
|
||||
[Serializable]
|
||||
public class CheckDomainResult
|
||||
{
|
||||
public const int QUERY_ERROR = -21;
|
||||
public const int DOMAIN_BUSY = -22;
|
||||
public const int UNSPECIFIED_ERROR = -23;
|
||||
|
||||
private string errorMessage;
|
||||
private int resultCode;
|
||||
private bool succeed;
|
||||
|
||||
public string ErrorMessage
|
||||
{
|
||||
get { return errorMessage; }
|
||||
set { errorMessage = value; }
|
||||
}
|
||||
|
||||
public int ResultCode
|
||||
{
|
||||
get { return resultCode; }
|
||||
set { resultCode = value; }
|
||||
}
|
||||
|
||||
public bool Succeed
|
||||
{
|
||||
get { return succeed; }
|
||||
set { succeed = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,117 @@
|
|||
// 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.Xml.Serialization;
|
||||
|
||||
namespace WebsitePanel.Ecommerce.EnterpriseServer
|
||||
{
|
||||
/// <summary>
|
||||
/// Stores all necessary details for the checkout operation.
|
||||
/// </summary>
|
||||
public class CheckoutDetails
|
||||
{
|
||||
private bool persistent;
|
||||
private NameValueCollection hash = null;
|
||||
public string[][] DetailsArray;
|
||||
|
||||
[XmlIgnore]
|
||||
NameValueCollection Details
|
||||
{
|
||||
get
|
||||
{
|
||||
if (hash == null)
|
||||
{
|
||||
// create new dictionary
|
||||
hash = new NameValueCollection();
|
||||
|
||||
// fill dictionary
|
||||
if (DetailsArray != null)
|
||||
{
|
||||
foreach (string[] pair in DetailsArray)
|
||||
hash.Add(pair[0], pair[1]);
|
||||
}
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
}
|
||||
|
||||
[XmlIgnore]
|
||||
public string this[string key]
|
||||
{
|
||||
get
|
||||
{
|
||||
return Details[key];
|
||||
}
|
||||
set
|
||||
{
|
||||
// set details
|
||||
Details[key] = value;
|
||||
|
||||
// rebuild array
|
||||
DetailsArray = new string[Details.Count][];
|
||||
for (int i = 0; i < Details.Count; i++)
|
||||
{
|
||||
DetailsArray[i] = new string[] { Details.Keys[i], Details[Details.Keys[i]] };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool Persistent
|
||||
{
|
||||
get { return persistent; }
|
||||
set { persistent = value; }
|
||||
}
|
||||
|
||||
public string[] GetAllKeys()
|
||||
{
|
||||
return Details.AllKeys;
|
||||
}
|
||||
|
||||
public void Remove(string name)
|
||||
{
|
||||
Details.Remove(name);
|
||||
}
|
||||
|
||||
public int GetInt32(string key)
|
||||
{
|
||||
return Int32.Parse(Details[key]);
|
||||
}
|
||||
|
||||
public long GetInt64(string key)
|
||||
{
|
||||
return Int64.Parse(Details[key]);
|
||||
}
|
||||
|
||||
public bool GetBoolean(string key)
|
||||
{
|
||||
return Boolean.Parse(Details[key]);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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 System.Collections.Specialized;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace WebsitePanel.Ecommerce.EnterpriseServer
|
||||
{
|
||||
public class CheckoutFormParams : KeyValueBunch
|
||||
{
|
||||
public const string POST_METHOD = "POST";
|
||||
public const string GET_METHOD = "GET";
|
||||
public const string TARGET_SITE = "target_site";
|
||||
|
||||
private string method;
|
||||
private string action;
|
||||
|
||||
/// <summary>
|
||||
/// Form action
|
||||
/// </summary>
|
||||
public string Action
|
||||
{
|
||||
get { return action; }
|
||||
set { action = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Form method (GET/POST)
|
||||
/// </summary>
|
||||
public string Method
|
||||
{
|
||||
get { return method; }
|
||||
set { method = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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.Ecommerce.EnterpriseServer
|
||||
{
|
||||
public class CheckoutKeys
|
||||
{
|
||||
public const string PaymentProcessor = "PaymentProcessor";
|
||||
public const string CardNumber = "CardNumber";
|
||||
/// <summary>Visa, MasterCard, Discover, Amex, Switch, Solo</summary>
|
||||
public const string CardType = "CardType";
|
||||
public const string VerificationCode = "VerificationCode";
|
||||
//
|
||||
public const string ExpireYear = "ExpireYear";
|
||||
public const string ExpireMonth = "ExpireMonth";
|
||||
//
|
||||
public const string StartMonth = "StartMonth";
|
||||
public const string StartYear = "StartYear";
|
||||
//
|
||||
public const string IssueNumber = "IssueNumber";
|
||||
public const string Amount = "Amount";
|
||||
public const string Currency = "Currency";
|
||||
public const string ContractNumber = "ContractNumber";
|
||||
public const string InvoiceNumber = "InvoiceNumber";
|
||||
public const string FirstName = "FirstName";
|
||||
public const string LastName = "LastName";
|
||||
public const string CustomerEmail = "CustomerEmail";
|
||||
public const string CompanyName = "CompanyName";
|
||||
public const string Address = "Address";
|
||||
public const string Zip = "Zip";
|
||||
public const string City = "City";
|
||||
public const string State = "State";
|
||||
public const string Country = "Country";
|
||||
public const string Phone = "Phone";
|
||||
public const string Fax = "Fax";
|
||||
public const string CustomerId = "CustomerId";
|
||||
public const string ShipToFirstName = "ShipToFirstName";
|
||||
public const string ShipToLastName = "ShipToLastName";
|
||||
public const string ShipToCompany = "ShipToCompany";
|
||||
public const string ShipToZip = "ShipToZip";
|
||||
public const string ShipToAddress = "ShipToAddress";
|
||||
public const string ShipToCity = "ShipToCity";
|
||||
public const string ShipToState = "ShipToState";
|
||||
public const string ShipToCountry = "ShipToCountry";
|
||||
public const string IPAddress = "IPAddress";
|
||||
|
||||
private CheckoutKeys()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
// 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.Ecommerce.EnterpriseServer
|
||||
{
|
||||
[Serializable]
|
||||
public class CheckoutResult
|
||||
{
|
||||
private bool succeed;
|
||||
private string statusCode;
|
||||
private int paymentId;
|
||||
|
||||
|
||||
public bool Succeed
|
||||
{
|
||||
get { return succeed; }
|
||||
set { succeed = value; }
|
||||
}
|
||||
|
||||
public string StatusCode
|
||||
{
|
||||
get { return this.statusCode; }
|
||||
set { this.statusCode = value; }
|
||||
}
|
||||
|
||||
public int PaymentId
|
||||
{
|
||||
get { return this.paymentId; }
|
||||
set { this.paymentId = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,188 @@
|
|||
// 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.Text;
|
||||
using System.Collections;
|
||||
using System.Xml.Serialization;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
|
||||
namespace WebsitePanel.Ecommerce.EnterpriseServer
|
||||
{
|
||||
public class SystemTasks
|
||||
{
|
||||
public const string TASK_SET_PAYMENT_PROFILE = "SET_PAYMENT_PROFILE";
|
||||
public const string TASK_ADD_INVOICE = "ADD_INVOICE";
|
||||
public const string TASK_ADD_PAYMENT = "ADD_PAYMENT";
|
||||
public const string TASK_ADD_CONTRACT = "ADD_CONTRACT";
|
||||
public const string TASK_UPDATE_PAYMENT = "UPDATE_PAYMENT";
|
||||
public const string TASK_EXEC_SYSTEM_TRIGGER = "EXEC_SYSTEM_TRIGGER";
|
||||
public const string SVC_ACTIVATE = "SVC_ACTIVATE";
|
||||
public const string SVC_SUSPEND = "SVC_SUSPEND";
|
||||
public const string SVC_CANCEL = "SVC_CANCEL";
|
||||
|
||||
public const string SOURCE_ECOMMERCE = "ECOMMERCE";
|
||||
public const string SOURCE_SPF = "SPF";
|
||||
}
|
||||
|
||||
public class SystemTaskParams
|
||||
{
|
||||
public const string PARAM_SERVICE = "Service";
|
||||
public const string PARAM_PAYMENT = "Payment";
|
||||
public const string PARAM_INVOICE = "Invoice";
|
||||
public const string PARAM_CONTRACT = "Contract";
|
||||
public const string PARAM_CUSTOMER_ID = "CustomerId";
|
||||
public const string PARAM_CONTRACT_ACCOUNT = "ContractAccount";
|
||||
public const string PARAM_INVOICE_LINES = "InvoiceLines";
|
||||
public const string PARAM_EXTRA_ARGS = "ExtraArgs";
|
||||
public const string PARAM_SKIP_HANDLERS = "SkipHandlers";
|
||||
public const string PARAM_SEND_EMAIL = "SendEmail";
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class GenericResult : KeyValueBunchBase
|
||||
{
|
||||
private bool succeed;
|
||||
|
||||
public bool Succeed
|
||||
{
|
||||
get { return succeed; }
|
||||
set { succeed = value; }
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public abstract class KeyValueBunchBase : IKeyValueBunch
|
||||
{
|
||||
private string propertyNames;
|
||||
private string propertyValues;
|
||||
|
||||
[XmlIgnore]
|
||||
public string PropertyNames
|
||||
{
|
||||
get { return this.propertyNames; }
|
||||
set { this.propertyNames = value; }
|
||||
}
|
||||
|
||||
[XmlIgnore]
|
||||
public string PropertyValues
|
||||
{
|
||||
get { return this.propertyValues; }
|
||||
set { this.propertyValues = value; }
|
||||
}
|
||||
|
||||
public bool PropertyExists(string name)
|
||||
{
|
||||
string keyValue = Properties.Get(name);
|
||||
return keyValue != null;
|
||||
}
|
||||
|
||||
public T GetProperty<T>(string name)
|
||||
{
|
||||
return (T)Convert.ChangeType(Properties[name], typeof(T));
|
||||
}
|
||||
|
||||
public void SetProperty(string name, object value)
|
||||
{
|
||||
this[name] = Convert.ToString(value);
|
||||
}
|
||||
|
||||
#region IKeyValueBunch Members
|
||||
|
||||
public string this[string settingName]
|
||||
{
|
||||
get
|
||||
{
|
||||
return Properties[settingName];
|
||||
}
|
||||
set
|
||||
{
|
||||
// set setting
|
||||
Properties[settingName] = value;
|
||||
//
|
||||
SyncCollectionsState(false);
|
||||
}
|
||||
}
|
||||
|
||||
public string[] GetAllKeys()
|
||||
{
|
||||
if (Properties != null)
|
||||
return Properties.AllKeys;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private NameValueCollection properties;
|
||||
|
||||
public string[][] KeyValueArray;
|
||||
|
||||
[XmlIgnore]
|
||||
NameValueCollection Properties
|
||||
{
|
||||
get
|
||||
{
|
||||
//
|
||||
SyncCollectionsState(true);
|
||||
//
|
||||
return properties;
|
||||
}
|
||||
}
|
||||
|
||||
private void SyncCollectionsState(bool inputSync)
|
||||
{
|
||||
if (inputSync)
|
||||
{
|
||||
if (properties == null)
|
||||
{
|
||||
// create new dictionary
|
||||
properties = new NameValueCollection();
|
||||
|
||||
// fill dictionary
|
||||
if (KeyValueArray != null)
|
||||
{
|
||||
foreach (string[] pair in KeyValueArray)
|
||||
properties.Add(pair[0], pair[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// rebuild array
|
||||
KeyValueArray = new string[Properties.Count][];
|
||||
//
|
||||
for (int i = 0; i < Properties.Count; i++)
|
||||
{
|
||||
KeyValueArray[i] = new string[] { Properties.Keys[i], Properties[Properties.Keys[i]] };
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,230 @@
|
|||
// 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.Ecommerce.EnterpriseServer
|
||||
{
|
||||
public enum ContractStatus
|
||||
{
|
||||
Pending = 0,
|
||||
Active = 1,
|
||||
Suspended = 2,
|
||||
Closed = 3
|
||||
};
|
||||
|
||||
[Serializable]
|
||||
public class ContractAccount : KeyValueBunchBase
|
||||
{
|
||||
public const string USERNAME = "Username";
|
||||
public const string PASSWORD = "Password";
|
||||
public const string COMPANY_NAME = "CompanyName";
|
||||
public const string FIRST_NAME = "FirstName";
|
||||
public const string LAST_NAME = "LastName";
|
||||
public const string EMAIL = "Email";
|
||||
public const string ADDRESS = "Address";
|
||||
public const string CITY = "City";
|
||||
public const string COUNTRY = "Country";
|
||||
public const string STATE = "State";
|
||||
public const string ZIP = "Zip";
|
||||
public const string PHONE_NUMBER = "PhoneNumber";
|
||||
public const string FAX_NUMBER = "FaxNumber";
|
||||
public const string INSTANT_MESSENGER = "InstantMessenger";
|
||||
public const string MAIL_FORMAT = "MailFormat";
|
||||
public const string CUSTOMER_ID = "CustomerId";
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class Contract
|
||||
{
|
||||
private string accountName;
|
||||
private decimal balance;
|
||||
private DateTime closedDate;
|
||||
private string companyName;
|
||||
private string contractId;
|
||||
private int customerId;
|
||||
private int resellerId;
|
||||
private string email;
|
||||
private string firstName;
|
||||
private string lastName;
|
||||
private DateTime openedDate;
|
||||
private int statusId;
|
||||
|
||||
public string AccountName
|
||||
{
|
||||
get
|
||||
{
|
||||
return accountName;
|
||||
}
|
||||
set
|
||||
{
|
||||
accountName = value;
|
||||
}
|
||||
}
|
||||
|
||||
public decimal Balance
|
||||
{
|
||||
get
|
||||
{
|
||||
return balance;
|
||||
}
|
||||
set
|
||||
{
|
||||
balance = value;
|
||||
}
|
||||
}
|
||||
|
||||
public DateTime ClosedDate
|
||||
{
|
||||
get
|
||||
{
|
||||
return closedDate;
|
||||
}
|
||||
set
|
||||
{
|
||||
closedDate = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string CompanyName
|
||||
{
|
||||
get
|
||||
{
|
||||
return companyName;
|
||||
}
|
||||
set
|
||||
{
|
||||
companyName = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string ContractId
|
||||
{
|
||||
get
|
||||
{
|
||||
return contractId;
|
||||
}
|
||||
set
|
||||
{
|
||||
contractId = value;
|
||||
}
|
||||
}
|
||||
|
||||
public int CustomerId
|
||||
{
|
||||
get
|
||||
{
|
||||
return customerId;
|
||||
}
|
||||
set
|
||||
{
|
||||
customerId = value;
|
||||
}
|
||||
}
|
||||
|
||||
public int ResellerId
|
||||
{
|
||||
get
|
||||
{
|
||||
return resellerId;
|
||||
}
|
||||
set
|
||||
{
|
||||
resellerId = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string Email
|
||||
{
|
||||
get
|
||||
{
|
||||
return email;
|
||||
}
|
||||
set
|
||||
{
|
||||
email = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string FirstName
|
||||
{
|
||||
get
|
||||
{
|
||||
return firstName;
|
||||
}
|
||||
set
|
||||
{
|
||||
firstName = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string LastName
|
||||
{
|
||||
get
|
||||
{
|
||||
return lastName;
|
||||
}
|
||||
set
|
||||
{
|
||||
lastName = value;
|
||||
}
|
||||
}
|
||||
|
||||
public DateTime OpenedDate
|
||||
{
|
||||
get
|
||||
{
|
||||
return openedDate;
|
||||
}
|
||||
set
|
||||
{
|
||||
openedDate = value;
|
||||
}
|
||||
}
|
||||
|
||||
public int StatusId
|
||||
{
|
||||
get
|
||||
{
|
||||
return statusId;
|
||||
}
|
||||
set
|
||||
{
|
||||
statusId = value;
|
||||
}
|
||||
}
|
||||
|
||||
public ContractStatus Status
|
||||
{
|
||||
get { return (ContractStatus)statusId;}
|
||||
set { statusId = (int)value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,95 @@
|
|||
// 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.Ecommerce.EnterpriseServer
|
||||
{
|
||||
[Serializable]
|
||||
public class DomainNameCycle
|
||||
{
|
||||
private int cycleId;
|
||||
private string cycleName;
|
||||
private string billingPeriod;
|
||||
private int periodLength;
|
||||
private decimal setupFee;
|
||||
private decimal recurringFee;
|
||||
private decimal transferFee;
|
||||
private int sortOrder;
|
||||
|
||||
public int CycleId
|
||||
{
|
||||
get { return cycleId; }
|
||||
set { cycleId = value; }
|
||||
}
|
||||
|
||||
public string CycleName
|
||||
{
|
||||
get { return cycleName; }
|
||||
set { cycleName = value; }
|
||||
}
|
||||
|
||||
public string BillingPeriod
|
||||
{
|
||||
get { return billingPeriod; }
|
||||
set { billingPeriod = value; }
|
||||
}
|
||||
|
||||
public int PeriodLength
|
||||
{
|
||||
get { return periodLength; }
|
||||
set { periodLength = value; }
|
||||
}
|
||||
|
||||
public decimal SetupFee
|
||||
{
|
||||
get { return setupFee; }
|
||||
set { setupFee = value; }
|
||||
}
|
||||
|
||||
public decimal RecurringFee
|
||||
{
|
||||
get { return recurringFee; }
|
||||
set { recurringFee = value; }
|
||||
}
|
||||
|
||||
public decimal TransferFee
|
||||
{
|
||||
get { return transferFee; }
|
||||
set { transferFee = value; }
|
||||
}
|
||||
|
||||
public int SortOrder
|
||||
{
|
||||
get { return sortOrder; }
|
||||
set { sortOrder = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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.Specialized;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace WebsitePanel.Ecommerce.EnterpriseServer
|
||||
{
|
||||
public class FormParameters : NameValueCollection
|
||||
{
|
||||
public const string FIRST_NAME = "FirstName";
|
||||
public const string LAST_NAME = "LastName";
|
||||
public const string EMAIL = "Email";
|
||||
public const string ADDRESS = "Address";
|
||||
public const string CITY = "City";
|
||||
public const string STATE = "State";
|
||||
public const string COUNTRY = "Country";
|
||||
public const string ZIP = "Zip";
|
||||
public const string PHONE = "Phone";
|
||||
public const string FAX = "Fax";
|
||||
public const string AMOUNT = "Amount";
|
||||
public const string INVOICE = "Invoice";
|
||||
public const string TAX_AMOUNT = "TaxAmount";
|
||||
public const string CURRENCY = "Currency";
|
||||
public const string CONTRACT = "ContractId";
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace WebsitePanel.Ecommerce.EnterpriseServer
|
||||
{
|
||||
[Serializable]
|
||||
public class GenericSvcResult
|
||||
{
|
||||
private bool succeed;
|
||||
private int resultCode;
|
||||
private string errorCode;
|
||||
private string error;
|
||||
|
||||
public bool Succeed
|
||||
{
|
||||
get { return succeed; }
|
||||
set { succeed = value; }
|
||||
}
|
||||
|
||||
public int ResultCode
|
||||
{
|
||||
get { return resultCode; }
|
||||
set { resultCode = value; }
|
||||
}
|
||||
|
||||
public string ErrorCode
|
||||
{
|
||||
get { return errorCode; }
|
||||
set { errorCode = value; }
|
||||
}
|
||||
|
||||
public string Error
|
||||
{
|
||||
get { return error; }
|
||||
set { error = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,137 @@
|
|||
// 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.Ecommerce.EnterpriseServer
|
||||
{
|
||||
[Serializable]
|
||||
public class HostingAddon
|
||||
{
|
||||
private int productId;
|
||||
private string productName;
|
||||
private string productSku;
|
||||
private string description;
|
||||
private DateTime created;
|
||||
private bool enabled;
|
||||
private int resellerId;
|
||||
private int planId;
|
||||
private bool recurring;
|
||||
private bool dummyAddon;
|
||||
private bool countable;
|
||||
private decimal setupFee;
|
||||
private decimal oneTimeFee;
|
||||
private bool taxInclusive;
|
||||
|
||||
public bool TaxInclusive
|
||||
{
|
||||
get { return this.taxInclusive; }
|
||||
set { this.taxInclusive = value; }
|
||||
}
|
||||
|
||||
public int ProductId
|
||||
{
|
||||
get { return this.productId; }
|
||||
set { this.productId = value; }
|
||||
}
|
||||
|
||||
public string ProductName
|
||||
{
|
||||
get { return this.productName; }
|
||||
set { this.productName = value; }
|
||||
}
|
||||
|
||||
public string ProductSku
|
||||
{
|
||||
get { return this.productSku; }
|
||||
set { this.productSku = value; }
|
||||
}
|
||||
|
||||
public string Description
|
||||
{
|
||||
get { return this.description; }
|
||||
set { this.description = value; }
|
||||
}
|
||||
|
||||
public System.DateTime Created
|
||||
{
|
||||
get { return this.created; }
|
||||
set { this.created = value; }
|
||||
}
|
||||
|
||||
public bool Enabled
|
||||
{
|
||||
get { return this.enabled; }
|
||||
set { this.enabled = value; }
|
||||
}
|
||||
|
||||
public int ResellerId
|
||||
{
|
||||
get { return this.resellerId; }
|
||||
set { this.resellerId = value; }
|
||||
}
|
||||
|
||||
public int PlanId
|
||||
{
|
||||
get { return this.planId; }
|
||||
set { this.planId = value; }
|
||||
}
|
||||
|
||||
public bool Recurring
|
||||
{
|
||||
get { return this.recurring; }
|
||||
set { this.recurring = value; }
|
||||
}
|
||||
|
||||
public bool DummyAddon
|
||||
{
|
||||
get { return this.dummyAddon; }
|
||||
set { this.dummyAddon = value; }
|
||||
}
|
||||
|
||||
public bool Countable
|
||||
{
|
||||
get { return this.countable; }
|
||||
set { this.countable = value; }
|
||||
}
|
||||
|
||||
public decimal SetupFee
|
||||
{
|
||||
get { return this.setupFee; }
|
||||
set { this.setupFee = value; }
|
||||
}
|
||||
|
||||
public decimal OneTimeFee
|
||||
{
|
||||
get { return this.oneTimeFee; }
|
||||
set { this.oneTimeFee = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,131 @@
|
|||
// 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.Ecommerce.EnterpriseServer
|
||||
{
|
||||
[Serializable]
|
||||
public class HostingPlan
|
||||
{
|
||||
#region Constants for DomainOption feature
|
||||
|
||||
public const int DOMAIN_REQUIRED = 1;
|
||||
public const int DOMAIN_OPTIONAL = 2;
|
||||
public const int DOMAIN_HIDE = 3;
|
||||
|
||||
#endregion
|
||||
|
||||
private int productId;
|
||||
private string productName;
|
||||
private string productSku;
|
||||
private string description;
|
||||
private DateTime created;
|
||||
private bool enabled;
|
||||
private int resellerId;
|
||||
private int planId;
|
||||
private int userRole;
|
||||
private int initialStatus;
|
||||
private int domainOption;
|
||||
private bool taxInclusive;
|
||||
|
||||
public bool TaxInclusive
|
||||
{
|
||||
get { return this.taxInclusive; }
|
||||
set { this.taxInclusive = value; }
|
||||
}
|
||||
|
||||
public int ProductId
|
||||
{
|
||||
get { return this.productId; }
|
||||
set { this.productId = value; }
|
||||
}
|
||||
|
||||
public string ProductName
|
||||
{
|
||||
get { return this.productName; }
|
||||
set { this.productName = value; }
|
||||
}
|
||||
|
||||
public string ProductSku
|
||||
{
|
||||
get { return this.productSku; }
|
||||
set { this.productSku = value; }
|
||||
}
|
||||
|
||||
public string Description
|
||||
{
|
||||
get { return this.description; }
|
||||
set { this.description = value; }
|
||||
}
|
||||
|
||||
public System.DateTime Created
|
||||
{
|
||||
get { return this.created; }
|
||||
set { this.created = value; }
|
||||
}
|
||||
|
||||
public bool Enabled
|
||||
{
|
||||
get { return this.enabled; }
|
||||
set { this.enabled = value; }
|
||||
}
|
||||
|
||||
public int ResellerId
|
||||
{
|
||||
get { return this.resellerId; }
|
||||
set { this.resellerId = value; }
|
||||
}
|
||||
|
||||
public int PlanId
|
||||
{
|
||||
get { return this.planId; }
|
||||
set { this.planId = value; }
|
||||
}
|
||||
|
||||
public int UserRole
|
||||
{
|
||||
get { return this.userRole; }
|
||||
set { this.userRole = value; }
|
||||
}
|
||||
|
||||
public int InitialStatus
|
||||
{
|
||||
get { return this.initialStatus; }
|
||||
set { this.initialStatus = value; }
|
||||
}
|
||||
|
||||
public int DomainOption
|
||||
{
|
||||
get { return this.domainOption; }
|
||||
set { this.domainOption = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
// 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.Ecommerce.EnterpriseServer
|
||||
{
|
||||
[Serializable]
|
||||
public class HostingPlanCycle
|
||||
{
|
||||
private int cycleId;
|
||||
private string cycleName;
|
||||
private string billingPeriod;
|
||||
private int periodLength;
|
||||
private decimal setupFee;
|
||||
private decimal recurringFee;
|
||||
|
||||
public int CycleId
|
||||
{
|
||||
get { return this.cycleId; }
|
||||
set { this.cycleId = value; }
|
||||
}
|
||||
|
||||
public string CycleName
|
||||
{
|
||||
get { return this.cycleName; }
|
||||
set { this.cycleName = value; }
|
||||
}
|
||||
|
||||
public string BillingPeriod
|
||||
{
|
||||
get { return this.billingPeriod; }
|
||||
set { this.billingPeriod = value; }
|
||||
}
|
||||
|
||||
public int PeriodLength
|
||||
{
|
||||
get { return this.periodLength; }
|
||||
set { this.periodLength = value; }
|
||||
}
|
||||
|
||||
public decimal SetupFee
|
||||
{
|
||||
get { return this.setupFee; }
|
||||
set { this.setupFee = value; }
|
||||
}
|
||||
|
||||
public decimal RecurringFee
|
||||
{
|
||||
get { return this.recurringFee; }
|
||||
set { this.recurringFee = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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.Specialized;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
|
||||
namespace WebsitePanel.Ecommerce.EnterpriseServer
|
||||
{
|
||||
public interface IDomainRegistrar : ISystemPlugin
|
||||
{
|
||||
//bool SubAccountRequired { get; }
|
||||
|
||||
//bool CheckSubAccountExists(string account, string emailAddress);
|
||||
|
||||
//AccountResult GetSubAccount(string account, string emailAddress);
|
||||
|
||||
//AccountResult CreateSubAccount(CommandParams args);
|
||||
|
||||
//DomainStatus CheckDomain(string domain);
|
||||
|
||||
void RegisterDomain(DomainNameSvc domainSvc, ContractAccount accountInfo, string[] nameServers);
|
||||
|
||||
void RenewDomain(DomainNameSvc domainSvc, ContractAccount accountInfo, string[] nameServers);
|
||||
|
||||
TransferDomainResult TransferDomain(CommandParams args, DomainContacts contacts);
|
||||
|
||||
//DomainContacts GetAccountContacts(CommandParams args);
|
||||
}
|
||||
|
||||
#region Registrar's results
|
||||
|
||||
public abstract class RegistrarResultBase
|
||||
{
|
||||
private bool succeed;
|
||||
private NameValueCollection resultData;
|
||||
|
||||
public const string REGISTRAR = "Registrar";
|
||||
|
||||
public bool Succeed
|
||||
{
|
||||
get { return this.succeed; }
|
||||
set { this.succeed = value; }
|
||||
}
|
||||
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
EnsureResultDataCreated();
|
||||
return resultData.Count;
|
||||
}
|
||||
}
|
||||
|
||||
public string[] AllKeys
|
||||
{
|
||||
get
|
||||
{
|
||||
EnsureResultDataCreated();
|
||||
return resultData.AllKeys;
|
||||
}
|
||||
}
|
||||
|
||||
public string this[string keyName]
|
||||
{
|
||||
get
|
||||
{
|
||||
EnsureResultDataCreated();
|
||||
return resultData[keyName];
|
||||
}
|
||||
set
|
||||
{
|
||||
EnsureResultDataCreated();
|
||||
resultData[keyName] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
EnsureResultDataCreated();
|
||||
return resultData[index];
|
||||
}
|
||||
}
|
||||
|
||||
protected void EnsureResultDataCreated()
|
||||
{
|
||||
if (resultData == null)
|
||||
resultData = new NameValueCollection();
|
||||
}
|
||||
}
|
||||
|
||||
public enum DomainStatus
|
||||
{
|
||||
Registered = 0,
|
||||
NotFound = 1,
|
||||
UnableToCheck = 2
|
||||
};
|
||||
|
||||
public class RegisterDomainResult : RegistrarResultBase
|
||||
{
|
||||
public const string ORDER_NUMBER = "OrderNumber";
|
||||
public const string STATUS_CODE = "StatusCode";
|
||||
public const string STATUS_REASON = "StatusReason";
|
||||
}
|
||||
|
||||
public class RenewDomainResult : RegistrarResultBase
|
||||
{
|
||||
public const string RENEW_ORDER_NUMBER = "RenewOrderNumber";
|
||||
public const string STATUS_CODE = "StatusCode";
|
||||
public const string STATUS_REASON = "StatusReason";
|
||||
}
|
||||
|
||||
public class TransferDomainResult : RegistrarResultBase
|
||||
{
|
||||
public const string TRANSFER_ORDER_NUMBER = "TransferOrderNumber";
|
||||
public const string ERROR_MESSAGE = "ErrorMessage";
|
||||
|
||||
}
|
||||
|
||||
public class AccountResult : RegistrarResultBase
|
||||
{
|
||||
public const string STATUS_CODE = "StatusCode";
|
||||
public const string STATUS_REASON = "StatusReason";
|
||||
public const string DEFAULT_CONTACT_ID = "DefaultContactID";
|
||||
public const string REGISTRAR_ACCOUNT_ID = "RegistrarAccountID";
|
||||
public const string ACCOUNT_LOGIN_ID = "AccountLoginID";
|
||||
public const string ACCOUNT_ID = "AccountID";
|
||||
public const string ACCOUNT_PARTY_ID = "AccountPartyID";
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Registrar's core types
|
||||
|
||||
public class CommandParams : NameValueCollection
|
||||
{
|
||||
public const string USERNAME = "Username";
|
||||
public const string NAME_SERVERS = "NameServers";
|
||||
public const string DOMAIN_NAME = "DomainName";
|
||||
public const string DOMAIN_TLD = "DomainTLD";
|
||||
public const string YEARS = "Years";
|
||||
public const string EMAIL = "Email";
|
||||
public const string PASSWORD = "Password";
|
||||
public const string FIRST_NAME = "FirstName";
|
||||
public const string LAST_NAME = "LastName";
|
||||
public const string ADDRESS = "Address";
|
||||
public const string CITY = "City";
|
||||
public const string STATE = "State";
|
||||
public const string COUNTRY = "Country";
|
||||
public const string ZIP = "Zip";
|
||||
public const string PHONE = "Phone";
|
||||
public const string FAX = "Fax";
|
||||
|
||||
public bool HasKey(string keyName)
|
||||
{
|
||||
return !String.IsNullOrEmpty(
|
||||
this[keyName]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public class DomainContacts : NameObjectCollectionBase
|
||||
{
|
||||
public DomainContact this[string contactType]
|
||||
{
|
||||
get
|
||||
{
|
||||
DomainContact contact = (DomainContact)BaseGet(contactType);
|
||||
|
||||
if (contact == null)
|
||||
{
|
||||
contact = new DomainContact();
|
||||
BaseSet(contactType, contact);
|
||||
}
|
||||
|
||||
return contact;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class DomainContact
|
||||
{
|
||||
private NameValueCollection contactInfo;
|
||||
|
||||
public string this[string keyName]
|
||||
{
|
||||
get { return contactInfo[keyName]; }
|
||||
set { contactInfo[keyName] = value; }
|
||||
}
|
||||
|
||||
public string[] Keys
|
||||
{
|
||||
get { return contactInfo.AllKeys; }
|
||||
}
|
||||
|
||||
public bool HasKey(string keyName)
|
||||
{
|
||||
return !String.IsNullOrEmpty(
|
||||
contactInfo[keyName]
|
||||
);
|
||||
}
|
||||
|
||||
public DomainContact()
|
||||
{
|
||||
contactInfo = new NameValueCollection();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
// 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.Ecommerce.EnterpriseServer
|
||||
{
|
||||
public interface IInteractivePaymentGatewayProvider : IPaymentGatewayProvider
|
||||
{
|
||||
CheckoutFormParams GetCheckoutFormParams(FormParameters formParams, InvoiceItem[] invoiceLines);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
// 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.Ecommerce.EnterpriseServer
|
||||
{
|
||||
public interface IPaymentGatewayProvider
|
||||
{
|
||||
TransactionResult SubmitPaymentTransaction(CheckoutDetails details);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,142 @@
|
|||
// 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.Ecommerce.EnterpriseServer
|
||||
{
|
||||
[Serializable]
|
||||
public class InvoiceResult
|
||||
{
|
||||
public bool Succeed;
|
||||
public int InvoiceId;
|
||||
public bool NotificationSent;
|
||||
public string ErrorMessage;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class Invoice
|
||||
{
|
||||
public const string INVOICE_ITEM_TYPE = "INVOICE";
|
||||
public const int INVOICE_ITEM_SEVERITY = 2;
|
||||
|
||||
private int invoiceId;
|
||||
private string contractId;
|
||||
private DateTime created;
|
||||
private DateTime dueDate;
|
||||
private string invoiceNumber;
|
||||
private decimal total;
|
||||
private decimal subTotal;
|
||||
private int taxationId;
|
||||
private decimal taxAmount;
|
||||
private string currency;
|
||||
private string username;
|
||||
private int customerId;
|
||||
private bool paid;
|
||||
|
||||
public int InvoiceId
|
||||
{
|
||||
get { return this.invoiceId; }
|
||||
set { this.invoiceId = value; }
|
||||
}
|
||||
|
||||
public int CustomerId
|
||||
{
|
||||
get { return this.customerId; }
|
||||
set { this.customerId = value; }
|
||||
}
|
||||
|
||||
public string ContractId
|
||||
{
|
||||
get { return this.contractId; }
|
||||
set { this.contractId = value; }
|
||||
}
|
||||
|
||||
public string Username
|
||||
{
|
||||
get { return this.username; }
|
||||
set { this.username = value; }
|
||||
}
|
||||
|
||||
public System.DateTime Created
|
||||
{
|
||||
get { return this.created; }
|
||||
set { this.created = value; }
|
||||
}
|
||||
|
||||
public System.DateTime DueDate
|
||||
{
|
||||
get { return this.dueDate; }
|
||||
set { this.dueDate = value; }
|
||||
}
|
||||
|
||||
public string InvoiceNumber
|
||||
{
|
||||
get { return this.invoiceNumber; }
|
||||
set { this.invoiceNumber = value; }
|
||||
}
|
||||
|
||||
public decimal Total
|
||||
{
|
||||
get { return this.total; }
|
||||
set { this.total = value; }
|
||||
}
|
||||
|
||||
public decimal SubTotal
|
||||
{
|
||||
get { return this.subTotal; }
|
||||
set { this.subTotal = value; }
|
||||
}
|
||||
|
||||
public int TaxationId
|
||||
{
|
||||
get { return this.taxationId; }
|
||||
set { this.taxationId = value; }
|
||||
}
|
||||
|
||||
public decimal TaxAmount
|
||||
{
|
||||
get { return this.taxAmount; }
|
||||
set { this.taxAmount = value; }
|
||||
}
|
||||
|
||||
public string Currency
|
||||
{
|
||||
get { return this.currency; }
|
||||
set { this.currency = value; }
|
||||
}
|
||||
|
||||
public bool Paid
|
||||
{
|
||||
get { return this.paid; }
|
||||
set { this.paid = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,109 @@
|
|||
// 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.Ecommerce.EnterpriseServer
|
||||
{
|
||||
[Serializable]
|
||||
public class InvoiceItem
|
||||
{
|
||||
private int itemId;
|
||||
private int invoiceId;
|
||||
private int serviceId;
|
||||
private string itemName;
|
||||
private string typeName;
|
||||
private int quantity;
|
||||
private decimal total;
|
||||
private decimal subTotal;
|
||||
private decimal unitPrice;
|
||||
private bool processed;
|
||||
|
||||
public int ItemId
|
||||
{
|
||||
get { return this.itemId; }
|
||||
set { this.itemId = value; }
|
||||
}
|
||||
|
||||
public int InvoiceId
|
||||
{
|
||||
get { return this.invoiceId; }
|
||||
set { this.invoiceId = value; }
|
||||
}
|
||||
|
||||
public int ServiceId
|
||||
{
|
||||
get { return this.serviceId; }
|
||||
set { this.serviceId = value; }
|
||||
}
|
||||
|
||||
public string ItemName
|
||||
{
|
||||
get { return this.itemName; }
|
||||
set { this.itemName = value; }
|
||||
}
|
||||
|
||||
public string TypeName
|
||||
{
|
||||
get { return this.typeName; }
|
||||
set { this.typeName = value; }
|
||||
}
|
||||
|
||||
public int Quantity
|
||||
{
|
||||
get { return this.quantity; }
|
||||
set { this.quantity = value; }
|
||||
}
|
||||
|
||||
public decimal Total
|
||||
{
|
||||
get { return this.total; }
|
||||
set { this.total = value; }
|
||||
}
|
||||
|
||||
public decimal SubTotal
|
||||
{
|
||||
get { return this.subTotal; }
|
||||
set { this.subTotal = value; }
|
||||
}
|
||||
|
||||
public decimal UnitPrice
|
||||
{
|
||||
get { return this.unitPrice; }
|
||||
set { this.unitPrice = value; }
|
||||
}
|
||||
|
||||
public bool Processed
|
||||
{
|
||||
get { return this.processed; }
|
||||
set { this.processed = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,220 @@
|
|||
// 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.Text;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace WebsitePanel.Ecommerce.EnterpriseServer
|
||||
{
|
||||
public interface IKeyValueBunch
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="settingName"></param>
|
||||
/// <returns></returns>
|
||||
[XmlIgnore]
|
||||
string this[string settingName] { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
string[] GetAllKeys();
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class KeyValueBunch : IKeyValueBunch
|
||||
{
|
||||
private NameValueCollection _settings;
|
||||
private bool hasPendingChanges;
|
||||
|
||||
public string[][] KeyValueArray;
|
||||
|
||||
[XmlIgnore]
|
||||
public bool IsEmpty
|
||||
{
|
||||
get { return (KeyValueArray == null || KeyValueArray.Length == 0); }
|
||||
}
|
||||
|
||||
[XmlIgnore]
|
||||
public bool HasPendingChanges
|
||||
{
|
||||
get { return hasPendingChanges; }
|
||||
}
|
||||
|
||||
[XmlIgnore]
|
||||
NameValueCollection Settings
|
||||
{
|
||||
get
|
||||
{
|
||||
//
|
||||
SyncCollectionsState(true);
|
||||
//
|
||||
hasPendingChanges = false;
|
||||
//
|
||||
return _settings;
|
||||
}
|
||||
}
|
||||
|
||||
public string this[string settingName]
|
||||
{
|
||||
get
|
||||
{
|
||||
return Settings[settingName];
|
||||
}
|
||||
set
|
||||
{
|
||||
// check whether changes are really made
|
||||
if (!String.Equals(Settings[settingName], value))
|
||||
hasPendingChanges = true;
|
||||
// set setting
|
||||
Settings[settingName] = value;
|
||||
//
|
||||
SyncCollectionsState(false);
|
||||
}
|
||||
}
|
||||
|
||||
private void SyncCollectionsState(bool inputSync)
|
||||
{
|
||||
if (inputSync)
|
||||
{
|
||||
if (_settings == null)
|
||||
{
|
||||
// create new dictionary
|
||||
_settings = new NameValueCollection();
|
||||
|
||||
// fill dictionary
|
||||
if (KeyValueArray != null)
|
||||
{
|
||||
foreach (string[] pair in KeyValueArray)
|
||||
_settings.Add(pair[0], pair[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// rebuild array
|
||||
KeyValueArray = new string[Settings.Count][];
|
||||
//
|
||||
for (int i = 0; i < Settings.Count; i++)
|
||||
{
|
||||
KeyValueArray[i] = new string[] { Settings.Keys[i], Settings[Settings.Keys[i]] };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string[] GetAllKeys()
|
||||
{
|
||||
if (Settings != null)
|
||||
return Settings.AllKeys;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public void RemoveKey(string name)
|
||||
{
|
||||
Settings.Remove(name);
|
||||
//
|
||||
SyncCollectionsState(false);
|
||||
}
|
||||
}
|
||||
|
||||
/*public class CommonSettings
|
||||
{
|
||||
public const string INTERACTIVE = "interactive";
|
||||
public const string LIVE_MODE = "live_mode";
|
||||
public const string USERNAME = "username";
|
||||
public const string PASSWORD = "password";
|
||||
}*/
|
||||
|
||||
public class ToCheckoutSettings
|
||||
{
|
||||
public const string FIXED_CART = "fixed_cart";
|
||||
public const string SECRET_WORD = "secret_word";
|
||||
public const string ACCOUNT_SID = "account_sid";
|
||||
public const string CURRENCY = "2co_currency";
|
||||
public const string LIVE_MODE = "live_mode";
|
||||
public const string INTERACTIVE = "interactive";
|
||||
public const string CONTINUE_SHOPPING_URL = "continue_shopping_url";
|
||||
}
|
||||
|
||||
public class AuthNetSettings
|
||||
{
|
||||
public const string MD5_HASH = "md5_hash";
|
||||
public const string TRANSACTION_KEY = "trans_key";
|
||||
public const string DEMO_ACCOUNT = "demo_account";
|
||||
public const string SEND_CONFIRMATION = "send_confirm";
|
||||
public const string MERCHANT_EMAIL = "merchant_email";
|
||||
public const string INTERACTIVE = "interactive";
|
||||
public const string LIVE_MODE = "live_mode";
|
||||
public const string USERNAME = "username";
|
||||
}
|
||||
|
||||
public class DirectiSettings
|
||||
{
|
||||
public const string PARENT_ID = "parent_id";
|
||||
public const string LIVE_MODE = "live_mode";
|
||||
public const string USERNAME = "username";
|
||||
public const string PASSWORD = "password";
|
||||
public const string SECURE_CHANNEL = "secure_channel";
|
||||
}
|
||||
|
||||
public class EnomSettings
|
||||
{
|
||||
public const string LIVE_MODE = "live_mode";
|
||||
public const string USERNAME = "username";
|
||||
public const string PASSWORD = "password";
|
||||
}
|
||||
|
||||
public class OffPaymentSettings
|
||||
{
|
||||
public const string AUTO_APPROVE = "auto_approve";
|
||||
public const string TRANSACTION_NUMBER_FORMAT = "transaction_number_format";
|
||||
}
|
||||
|
||||
public class PayPalProSettings
|
||||
{
|
||||
public const string INTERACTIVE = "interactive";
|
||||
public const string USERNAME = "username";
|
||||
public const string PASSWORD = "password";
|
||||
public const string SIGNATURE = "signature";
|
||||
public const string LIVE_MODE = "live_mode";
|
||||
}
|
||||
|
||||
public class PayPalStdSettings
|
||||
{
|
||||
public const string BUSINESS = "business";
|
||||
public const string RETURN_URL = "return_url";
|
||||
public const string CANCEL_RETURN_URL = "cancel_return_url";
|
||||
public const string LIVE_MODE = "live_mode";
|
||||
public const string INTERACTIVE = "interactive";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,168 @@
|
|||
// 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.Text;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace WebsitePanel.Ecommerce.EnterpriseServer
|
||||
{
|
||||
[Serializable]
|
||||
public class OrderItem : KeyValueBunch
|
||||
{
|
||||
private int productId;
|
||||
private int typeId;
|
||||
private bool recurring;
|
||||
private int billingCycle;
|
||||
private string itemName;
|
||||
private int parentIndex = -1;
|
||||
private int parentSvcId;
|
||||
private int quantity;
|
||||
|
||||
public int Quantity
|
||||
{
|
||||
get { return quantity; }
|
||||
set { quantity = value; }
|
||||
}
|
||||
|
||||
public int ProductId
|
||||
{
|
||||
get { return this.productId; }
|
||||
set { this.productId = value; }
|
||||
}
|
||||
|
||||
public int TypeId
|
||||
{
|
||||
get { return this.typeId; }
|
||||
set { this.typeId = value; }
|
||||
}
|
||||
|
||||
public int BillingCycle
|
||||
{
|
||||
get { return this.billingCycle; }
|
||||
set { this.billingCycle = value; }
|
||||
}
|
||||
|
||||
public bool Recurring
|
||||
{
|
||||
get { return this.recurring; }
|
||||
set { this.recurring = value; }
|
||||
}
|
||||
|
||||
public string ItemName
|
||||
{
|
||||
get { return this.itemName; }
|
||||
set { this.itemName = value; }
|
||||
}
|
||||
|
||||
public int ParentIndex
|
||||
{
|
||||
get { return this.parentIndex; }
|
||||
set { this.parentIndex = value; }
|
||||
}
|
||||
|
||||
public int ParentSvcId
|
||||
{
|
||||
get { return this.parentSvcId; }
|
||||
set { this.parentSvcId = value; }
|
||||
}
|
||||
|
||||
public static OrderItem GetHostingPlanItem(int productId, string planName, int cycleId)
|
||||
{
|
||||
OrderItem plan = new OrderItem();
|
||||
plan.productId = productId;
|
||||
plan.billingCycle = cycleId;
|
||||
plan.itemName = planName;
|
||||
plan.recurring = true;
|
||||
plan.quantity = 1;
|
||||
plan.typeId = Product.HOSTING_PLAN;
|
||||
//
|
||||
return plan;
|
||||
}
|
||||
|
||||
public static OrderItem GetTopLevelDomainItem(int productId, int cycleId, string itemName)
|
||||
{
|
||||
OrderItem item = new OrderItem();
|
||||
item.recurring = true;
|
||||
item.typeId = Product.TOP_LEVEL_DOMAIN;
|
||||
item.productId = productId;
|
||||
item.quantity = 1;
|
||||
item.billingCycle = cycleId;
|
||||
item.itemName = itemName;
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
public static OrderItem GetHostingAddonItem(int productId, int cycleId, int quantity, string itemName)
|
||||
{
|
||||
OrderItem item = new OrderItem();
|
||||
item.billingCycle = cycleId;
|
||||
item.recurring = cycleId > 0;
|
||||
item.quantity = quantity;
|
||||
item.productId = productId;
|
||||
item.typeId = Product.HOSTING_ADDON;
|
||||
item.itemName = itemName;
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
public static OrderItem GetHostingAddonItem(int productId, int quantity, string itemName)
|
||||
{
|
||||
return GetHostingAddonItem(productId, quantity, 0, itemName);
|
||||
}
|
||||
}
|
||||
|
||||
public class OrderResult
|
||||
{
|
||||
private bool succeed;
|
||||
private int resultCode;
|
||||
|
||||
private int orderInvoice;
|
||||
|
||||
public bool Succeed
|
||||
{
|
||||
get { return this.succeed; }
|
||||
set { this.succeed = value; }
|
||||
}
|
||||
|
||||
public int ResultCode
|
||||
{
|
||||
get { return this.resultCode; }
|
||||
set { this.resultCode = value; }
|
||||
}
|
||||
|
||||
public int OrderInvoice
|
||||
{
|
||||
get { return this.orderInvoice; }
|
||||
set { this.orderInvoice = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,132 @@
|
|||
// 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.Ecommerce.EnterpriseServer
|
||||
{
|
||||
[Serializable]
|
||||
public class CustomerPayment
|
||||
{
|
||||
public const string PAYMENT_ITEM_TYPE = "PAYMENT";
|
||||
public const int PAYMENT_ITEM_SEVERITY = 2;
|
||||
|
||||
private int paymentId;
|
||||
private int invoiceId;
|
||||
private string contractId;
|
||||
private string transactionId;
|
||||
private decimal total;
|
||||
private string currency;
|
||||
private DateTime created;
|
||||
private string methodName;
|
||||
private int pluginId;
|
||||
private string providerName;
|
||||
private int statusId;
|
||||
private string invoiceNumber;
|
||||
|
||||
public int PaymentId
|
||||
{
|
||||
get { return this.paymentId; }
|
||||
set { this.paymentId = value; }
|
||||
}
|
||||
|
||||
public int InvoiceId
|
||||
{
|
||||
get { return this.invoiceId; }
|
||||
set { this.invoiceId = value; }
|
||||
}
|
||||
|
||||
public string ContractId
|
||||
{
|
||||
get { return this.contractId; }
|
||||
set { this.contractId = value; }
|
||||
}
|
||||
|
||||
public string TransactionId
|
||||
{
|
||||
get { return this.transactionId; }
|
||||
set { this.transactionId = value; }
|
||||
}
|
||||
|
||||
public decimal Total
|
||||
{
|
||||
get { return this.total; }
|
||||
set { this.total = value; }
|
||||
}
|
||||
|
||||
public string Currency
|
||||
{
|
||||
get { return currency; }
|
||||
set { currency = value; }
|
||||
}
|
||||
|
||||
public DateTime Created
|
||||
{
|
||||
get { return this.created; }
|
||||
set { this.created = value; }
|
||||
}
|
||||
|
||||
public string MethodName
|
||||
{
|
||||
get { return methodName; }
|
||||
set { methodName = value; }
|
||||
}
|
||||
|
||||
public int PluginId
|
||||
{
|
||||
get { return this.pluginId; }
|
||||
set { this.pluginId = value; }
|
||||
}
|
||||
|
||||
public string ProviderName
|
||||
{
|
||||
get { return this.providerName; }
|
||||
set { this.providerName = value; }
|
||||
}
|
||||
|
||||
public int StatusId
|
||||
{
|
||||
get { return this.statusId; }
|
||||
set { this.statusId = value; }
|
||||
}
|
||||
|
||||
public TransactionStatus Status
|
||||
{
|
||||
get { return (TransactionStatus)this.statusId; }
|
||||
set { this.statusId = (int)value; }
|
||||
}
|
||||
|
||||
public string InvoiceNumber
|
||||
{
|
||||
get { return this.invoiceNumber; }
|
||||
set { this.invoiceNumber = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace WebsitePanel.Ecommerce.EnterpriseServer
|
||||
{
|
||||
public class PaymentMethod
|
||||
{
|
||||
public const string CREDIT_CARD = "CREDITCARD";
|
||||
public const string TCO = "2CO";
|
||||
public const string PP_ACCOUNT = "PPACCOUNT";
|
||||
public const string OFFLINE = "OFFLINE";
|
||||
|
||||
private int resellerId;
|
||||
private string methodName;
|
||||
private int pluginId;
|
||||
private string displayName;
|
||||
private bool interactive;
|
||||
private string supportedItems;
|
||||
|
||||
public string MethodName
|
||||
{
|
||||
get { return methodName; }
|
||||
set { methodName = value; }
|
||||
}
|
||||
|
||||
public int PluginId
|
||||
{
|
||||
get { return pluginId; }
|
||||
set { pluginId = value; }
|
||||
}
|
||||
|
||||
public string DisplayName
|
||||
{
|
||||
get { return displayName; }
|
||||
set { displayName = value; }
|
||||
}
|
||||
|
||||
public int ResellerId
|
||||
{
|
||||
get { return resellerId; }
|
||||
set { resellerId = value; }
|
||||
}
|
||||
|
||||
public bool Interactive
|
||||
{
|
||||
get { return interactive; }
|
||||
set { interactive = value; }
|
||||
}
|
||||
|
||||
public string SupportedItems
|
||||
{
|
||||
get { return supportedItems; }
|
||||
set { supportedItems = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,110 @@
|
|||
// 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.Ecommerce.EnterpriseServer
|
||||
{
|
||||
[Serializable]
|
||||
public class Product
|
||||
{
|
||||
public const int HOSTING_PLAN = 1;
|
||||
public const int HOSTING_ADDON = 2;
|
||||
public const int TOP_LEVEL_DOMAIN = 3;
|
||||
|
||||
public const string HOSTING_PLAN_NAME = "Hosting Plan";
|
||||
public const string HOSTING_ADDON_NAME = "Hosting Addon";
|
||||
public const string TOP_LEVEL_DOMAIN_NAME = "Domain Name";
|
||||
|
||||
private int productId;
|
||||
private string productName;
|
||||
private string productSku;
|
||||
private int typeId;
|
||||
private string description;
|
||||
private DateTime created;
|
||||
private bool enabled;
|
||||
private bool taxInclusive;
|
||||
private int resellerId;
|
||||
|
||||
public int ProductId
|
||||
{
|
||||
get { return this.productId; }
|
||||
set { this.productId = value; }
|
||||
}
|
||||
|
||||
public string ProductName
|
||||
{
|
||||
get { return this.productName; }
|
||||
set { this.productName = value; }
|
||||
}
|
||||
|
||||
public string ProductSku
|
||||
{
|
||||
get { return this.productSku; }
|
||||
set { this.productSku = value; }
|
||||
}
|
||||
|
||||
public string Description
|
||||
{
|
||||
get { return this.description; }
|
||||
set { this.description = value; }
|
||||
}
|
||||
|
||||
public System.DateTime Created
|
||||
{
|
||||
get { return this.created; }
|
||||
set { this.created = value; }
|
||||
}
|
||||
|
||||
public int TypeId
|
||||
{
|
||||
get { return this.typeId; }
|
||||
set { this.typeId = value; }
|
||||
}
|
||||
|
||||
public bool Enabled
|
||||
{
|
||||
get { return this.enabled; }
|
||||
set { this.enabled = value; }
|
||||
}
|
||||
|
||||
public bool TaxInclusive
|
||||
{
|
||||
get { return this.taxInclusive; }
|
||||
set { this.taxInclusive = value; }
|
||||
}
|
||||
|
||||
public int ResellerId
|
||||
{
|
||||
get { return this.resellerId; }
|
||||
set { this.resellerId = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,88 @@
|
|||
// 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.Ecommerce.EnterpriseServer
|
||||
{
|
||||
public enum ProductTypeEnum
|
||||
{
|
||||
HostingPlan = 1,
|
||||
HostingAddon = 2,
|
||||
DomainName = 3
|
||||
};
|
||||
|
||||
[Serializable]
|
||||
public class ProductType
|
||||
{
|
||||
private int typeId;
|
||||
private string typeName;
|
||||
private string provisioningController;
|
||||
private DateTime created;
|
||||
private string nativeItemType;
|
||||
private string serviceItemType;
|
||||
|
||||
public int TypeId
|
||||
{
|
||||
get { return typeId; }
|
||||
set { typeId = value; }
|
||||
}
|
||||
|
||||
public string TypeName
|
||||
{
|
||||
get { return typeName; }
|
||||
set { typeName = value; }
|
||||
}
|
||||
|
||||
public string ProvisioningController
|
||||
{
|
||||
get { return provisioningController; }
|
||||
set { provisioningController = value; }
|
||||
}
|
||||
|
||||
public DateTime Created
|
||||
{
|
||||
get { return created; }
|
||||
set { created = value; }
|
||||
}
|
||||
|
||||
public string NativeItemType
|
||||
{
|
||||
get { return nativeItemType; }
|
||||
set { nativeItemType = value; }
|
||||
}
|
||||
|
||||
public string ServiceItemType
|
||||
{
|
||||
get { return serviceItemType; }
|
||||
set { serviceItemType = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,84 @@
|
|||
// 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.Ecommerce.EnterpriseServer
|
||||
{
|
||||
public sealed class EcommerceErrorCodes
|
||||
{
|
||||
#region Store Settings
|
||||
|
||||
public const int ERROR_NTFY_SUBJECT_TEMPLATE = -20001;
|
||||
public const int ERROR_NTFY_HTML_TEMPLATE = -20002;
|
||||
public const int ERROR_NTFY_TEXT_TEMPLATE = -20003;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Security Checks
|
||||
|
||||
public const int ERROR_INSUFFICIENT_USER_ROLE = -20200;
|
||||
|
||||
#endregion
|
||||
|
||||
#region SPF
|
||||
|
||||
public const int ERROR_PARENT_SVC_NOT_FOUND = -20100;
|
||||
public const int ERROR_PCKG_ADDON_NOT_FOUND = -20101;
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class RoutineResult
|
||||
{
|
||||
private int resultCode;
|
||||
private bool succeed;
|
||||
private string message;
|
||||
|
||||
public int ResultCode
|
||||
{
|
||||
get { return resultCode; }
|
||||
set { resultCode = value; }
|
||||
}
|
||||
|
||||
public bool Succeed
|
||||
{
|
||||
get { return succeed; }
|
||||
set { succeed = value; }
|
||||
}
|
||||
|
||||
public string Message
|
||||
{
|
||||
get { return message; }
|
||||
set { message = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,579 @@
|
|||
// 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.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
|
||||
namespace WebsitePanel.Ecommerce.EnterpriseServer
|
||||
{
|
||||
[Serializable]
|
||||
public class Service
|
||||
{
|
||||
public const string SERVICE_ITEM_TYPE = "ECSERVICE";
|
||||
public const int SERVICE_ITEM_SEVERITY = 2;
|
||||
|
||||
private int serviceId;
|
||||
private int customerId;
|
||||
private string username;
|
||||
private int resellerId;
|
||||
private string contractId;
|
||||
private int parentId;
|
||||
private string serviceName;
|
||||
private int typeId;
|
||||
private ServiceStatus status;
|
||||
private DateTime created;
|
||||
private DateTime modified;
|
||||
|
||||
public int ServiceId
|
||||
{
|
||||
get { return this.serviceId; }
|
||||
set { this.serviceId = value; }
|
||||
}
|
||||
|
||||
public int CustomerId
|
||||
{
|
||||
get { return this.customerId; }
|
||||
set { this.customerId = value; }
|
||||
}
|
||||
|
||||
public int ResellerId
|
||||
{
|
||||
get { return this.resellerId; }
|
||||
set { this.resellerId = value; }
|
||||
}
|
||||
|
||||
public string ContractId
|
||||
{
|
||||
get { return this.contractId; }
|
||||
set { this.contractId = value; }
|
||||
}
|
||||
|
||||
public string Username
|
||||
{
|
||||
get { return this.username; }
|
||||
set { this.username = value; }
|
||||
}
|
||||
|
||||
public int ParentId
|
||||
{
|
||||
get { return this.parentId; }
|
||||
set { this.parentId = value; }
|
||||
}
|
||||
|
||||
public string ServiceName
|
||||
{
|
||||
get { return this.serviceName; }
|
||||
set { this.serviceName = value; }
|
||||
}
|
||||
|
||||
public int TypeId
|
||||
{
|
||||
get { return this.typeId; }
|
||||
set { this.typeId = value; }
|
||||
}
|
||||
|
||||
public ServiceStatus Status
|
||||
{
|
||||
get { return this.status; }
|
||||
set { this.status = value; }
|
||||
}
|
||||
|
||||
public System.DateTime Created
|
||||
{
|
||||
get { return this.created; }
|
||||
set { this.created = value; }
|
||||
}
|
||||
|
||||
public System.DateTime Modified
|
||||
{
|
||||
get { return this.modified; }
|
||||
set { this.modified = value; }
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class HostingPackageSvc : Service
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private int productId;
|
||||
private int planId;
|
||||
private int packageId;
|
||||
private UserRole userRole;
|
||||
private PackageStatus initialStatus;
|
||||
private int svcCycleId;
|
||||
private string cycleName;
|
||||
private string billingPeriod;
|
||||
private int periodLength;
|
||||
private decimal setupFee;
|
||||
private decimal recurringFee;
|
||||
private string currency;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
public int ProductId
|
||||
{
|
||||
get { return this.productId; }
|
||||
set { this.productId = value; }
|
||||
}
|
||||
|
||||
public int PlanId
|
||||
{
|
||||
get { return this.planId; }
|
||||
set { this.planId = value; }
|
||||
}
|
||||
|
||||
public int PackageId
|
||||
{
|
||||
get { return this.packageId; }
|
||||
set { this.packageId = value; }
|
||||
}
|
||||
|
||||
public WebsitePanel.EnterpriseServer.UserRole UserRole
|
||||
{
|
||||
get { return this.userRole; }
|
||||
set { this.userRole = value; }
|
||||
}
|
||||
|
||||
public WebsitePanel.EnterpriseServer.PackageStatus InitialStatus
|
||||
{
|
||||
get { return this.initialStatus; }
|
||||
set { this.initialStatus = value; }
|
||||
}
|
||||
|
||||
public int SvcCycleId
|
||||
{
|
||||
get { return svcCycleId; }
|
||||
set { svcCycleId = value; }
|
||||
}
|
||||
|
||||
public string CycleName
|
||||
{
|
||||
get { return this.cycleName; }
|
||||
set { this.cycleName = value; }
|
||||
}
|
||||
|
||||
public string BillingPeriod
|
||||
{
|
||||
get { return this.billingPeriod; }
|
||||
set { this.billingPeriod = value; }
|
||||
}
|
||||
|
||||
public int PeriodLength
|
||||
{
|
||||
get { return this.periodLength; }
|
||||
set { this.periodLength = value; }
|
||||
}
|
||||
|
||||
public decimal SetupFee
|
||||
{
|
||||
get { return this.setupFee; }
|
||||
set { this.setupFee = value; }
|
||||
}
|
||||
|
||||
public decimal RecurringFee
|
||||
{
|
||||
get { return this.recurringFee; }
|
||||
set { this.recurringFee = value; }
|
||||
}
|
||||
|
||||
public string Currency
|
||||
{
|
||||
get { return this.currency; }
|
||||
set { this.currency = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class HostingAddonSvc : Service
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private int productId;
|
||||
private int planId;
|
||||
private int packageAddonId;
|
||||
private int quantity;
|
||||
private bool recurring;
|
||||
private bool dummyAddon;
|
||||
private int svcCycleId;
|
||||
private string cycleName;
|
||||
private string billingPeriod;
|
||||
private int periodLength;
|
||||
private decimal setupFee;
|
||||
private decimal cyclePrice;
|
||||
private string currency;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
public int ProductId
|
||||
{
|
||||
get { return this.productId; }
|
||||
set { this.productId = value; }
|
||||
}
|
||||
|
||||
public int PlanId
|
||||
{
|
||||
get { return this.planId; }
|
||||
set { this.planId = value; }
|
||||
}
|
||||
|
||||
public int PackageAddonId
|
||||
{
|
||||
get { return this.packageAddonId; }
|
||||
set { this.packageAddonId = value; }
|
||||
}
|
||||
|
||||
public int Quantity
|
||||
{
|
||||
get { return this.quantity; }
|
||||
set { this.quantity = value; }
|
||||
}
|
||||
|
||||
public bool Recurring
|
||||
{
|
||||
get { return this.recurring; }
|
||||
set { this.recurring = value; }
|
||||
}
|
||||
|
||||
public bool DummyAddon
|
||||
{
|
||||
get { return this.dummyAddon; }
|
||||
set { this.dummyAddon = value; }
|
||||
}
|
||||
|
||||
public int SvcCycleId
|
||||
{
|
||||
get { return this.svcCycleId; }
|
||||
set { this.svcCycleId = value; }
|
||||
}
|
||||
|
||||
public string CycleName
|
||||
{
|
||||
get { return this.cycleName; }
|
||||
set { this.cycleName = value; }
|
||||
}
|
||||
|
||||
public string BillingPeriod
|
||||
{
|
||||
get { return this.billingPeriod; }
|
||||
set { this.billingPeriod = value; }
|
||||
}
|
||||
|
||||
public int PeriodLength
|
||||
{
|
||||
get { return this.periodLength; }
|
||||
set { this.periodLength = value; }
|
||||
}
|
||||
|
||||
public decimal SetupFee
|
||||
{
|
||||
get { return this.setupFee; }
|
||||
set { this.setupFee = value; }
|
||||
}
|
||||
|
||||
public decimal CyclePrice
|
||||
{
|
||||
get { return this.cyclePrice; }
|
||||
set { this.cyclePrice = value; }
|
||||
}
|
||||
|
||||
public string Currency
|
||||
{
|
||||
get { return this.currency; }
|
||||
set { this.currency = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class DomainNameSvc : Service, IKeyValueBunch
|
||||
{
|
||||
public const string SPF_UPDATE_NS_ACTION = "UPDATE_NS";
|
||||
public const string SPF_TRANSFER_ACTION = "TRANSFER";
|
||||
public const string SPF_REGISTER_ACTION = "REGISTER";
|
||||
|
||||
#region Fields
|
||||
|
||||
private int productId;
|
||||
private int domainId;
|
||||
private string providerName;
|
||||
private int pluginId;
|
||||
private string fqdn;
|
||||
private int svcCycleId;
|
||||
private string cycleName;
|
||||
private string billingPeriod;
|
||||
private int periodLength;
|
||||
private decimal setupFee;
|
||||
private decimal recurringFee;
|
||||
private string currency;
|
||||
private string propertyNames;
|
||||
private string propertyValues;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
public int ProductId
|
||||
{
|
||||
get { return this.productId; }
|
||||
set { this.productId = value; }
|
||||
}
|
||||
|
||||
public int DomainId
|
||||
{
|
||||
get { return this.domainId; }
|
||||
set { this.domainId = value; }
|
||||
}
|
||||
|
||||
public string ProviderName
|
||||
{
|
||||
get { return this.providerName; }
|
||||
set { this.providerName = value; }
|
||||
}
|
||||
|
||||
public int PluginId
|
||||
{
|
||||
get { return this.pluginId; }
|
||||
set { this.pluginId = value; }
|
||||
}
|
||||
|
||||
public string Fqdn
|
||||
{
|
||||
get { return this.fqdn; }
|
||||
set { this.fqdn = value; }
|
||||
}
|
||||
|
||||
public int SvcCycleId
|
||||
{
|
||||
get { return this.svcCycleId; }
|
||||
set { this.svcCycleId = value; }
|
||||
}
|
||||
|
||||
public string CycleName
|
||||
{
|
||||
get { return this.cycleName; }
|
||||
set { this.cycleName = value; }
|
||||
}
|
||||
|
||||
public string BillingPeriod
|
||||
{
|
||||
get { return this.billingPeriod; }
|
||||
set { this.billingPeriod = value; }
|
||||
}
|
||||
|
||||
public int PeriodLength
|
||||
{
|
||||
get { return this.periodLength; }
|
||||
set { this.periodLength = value; }
|
||||
}
|
||||
|
||||
public decimal SetupFee
|
||||
{
|
||||
get { return this.setupFee; }
|
||||
set { this.setupFee = value; }
|
||||
}
|
||||
|
||||
public decimal RecurringFee
|
||||
{
|
||||
get { return this.recurringFee; }
|
||||
set { this.recurringFee = value; }
|
||||
}
|
||||
|
||||
public string Currency
|
||||
{
|
||||
get { return this.currency; }
|
||||
set { this.currency = value; }
|
||||
}
|
||||
|
||||
[XmlIgnore]
|
||||
public string PropertyNames
|
||||
{
|
||||
get { return this.propertyNames; }
|
||||
set { this.propertyNames = value; }
|
||||
}
|
||||
|
||||
[XmlIgnore]
|
||||
public string PropertyValues
|
||||
{
|
||||
get { return this.propertyValues; }
|
||||
set { this.propertyValues = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private NameValueCollection properties;
|
||||
|
||||
public string[][] KeyValueArray;
|
||||
|
||||
[XmlIgnore]
|
||||
NameValueCollection Properties
|
||||
{
|
||||
get
|
||||
{
|
||||
//
|
||||
SyncCollectionsState(true);
|
||||
//
|
||||
return properties;
|
||||
}
|
||||
}
|
||||
|
||||
public string this[string settingName]
|
||||
{
|
||||
get
|
||||
{
|
||||
return Properties[settingName];
|
||||
}
|
||||
set
|
||||
{
|
||||
// set setting
|
||||
Properties[settingName] = value;
|
||||
//
|
||||
SyncCollectionsState(false);
|
||||
}
|
||||
}
|
||||
|
||||
private void SyncCollectionsState(bool inputSync)
|
||||
{
|
||||
if (inputSync)
|
||||
{
|
||||
if (properties == null)
|
||||
{
|
||||
// create new dictionary
|
||||
properties = new NameValueCollection();
|
||||
|
||||
// fill dictionary
|
||||
if (KeyValueArray != null)
|
||||
{
|
||||
foreach (string[] pair in KeyValueArray)
|
||||
properties.Add(pair[0], pair[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// rebuild array
|
||||
KeyValueArray = new string[Properties.Count][];
|
||||
//
|
||||
for (int i = 0; i < Properties.Count; i++)
|
||||
{
|
||||
KeyValueArray[i] = new string[] { Properties.Keys[i], Properties[Properties.Keys[i]] };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string[] GetAllKeys()
|
||||
{
|
||||
if (Properties != null)
|
||||
return Properties.AllKeys;
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class ServiceHistoryRecord
|
||||
{
|
||||
private string cycleName;
|
||||
private string billingPeriod;
|
||||
private int periodLength;
|
||||
private decimal setupFee;
|
||||
private decimal recurringFee;
|
||||
private string currency;
|
||||
private DateTime startDate;
|
||||
private DateTime endDate;
|
||||
|
||||
public string CycleName
|
||||
{
|
||||
get { return cycleName; }
|
||||
set { cycleName = value; }
|
||||
}
|
||||
|
||||
public string BillingPeriod
|
||||
{
|
||||
get { return billingPeriod; }
|
||||
set { billingPeriod = value; }
|
||||
}
|
||||
|
||||
public int PeriodLength
|
||||
{
|
||||
get { return periodLength; }
|
||||
set { periodLength = value; }
|
||||
}
|
||||
|
||||
public decimal SetupFee
|
||||
{
|
||||
get { return setupFee; }
|
||||
set { setupFee = value; }
|
||||
}
|
||||
|
||||
public decimal RecurringFee
|
||||
{
|
||||
get { return recurringFee; }
|
||||
set { recurringFee = value; }
|
||||
}
|
||||
|
||||
public string Currency
|
||||
{
|
||||
get { return currency; }
|
||||
set { currency = value; }
|
||||
}
|
||||
|
||||
public DateTime StartDate
|
||||
{
|
||||
get { return startDate; }
|
||||
set { startDate = value; }
|
||||
}
|
||||
|
||||
public DateTime EndDate
|
||||
{
|
||||
get { return endDate; }
|
||||
set { endDate = value; }
|
||||
}
|
||||
}
|
||||
|
||||
public enum ServiceStatus
|
||||
{
|
||||
Ordered = 0,
|
||||
Active = 1,
|
||||
Suspended = 2,
|
||||
Cancelled = 3
|
||||
};
|
||||
}
|
|
@ -0,0 +1,101 @@
|
|||
// 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.Ecommerce.EnterpriseServer
|
||||
{
|
||||
public class HandlerResponse
|
||||
{
|
||||
private int responseId;
|
||||
private string serviceId;
|
||||
private int resellerId;
|
||||
private int invoiceId;
|
||||
private string contractId;
|
||||
private string textResponse;
|
||||
private DateTime received;
|
||||
private string errorMessage;
|
||||
private string methodName;
|
||||
|
||||
public int ResponseId
|
||||
{
|
||||
get { return responseId; }
|
||||
set { responseId = value; }
|
||||
}
|
||||
|
||||
public string ServiceId
|
||||
{
|
||||
get { return serviceId; }
|
||||
set { serviceId = value; }
|
||||
}
|
||||
|
||||
public int ResellerId
|
||||
{
|
||||
get { return resellerId; }
|
||||
set { resellerId = value; }
|
||||
}
|
||||
|
||||
public int InvoiceId
|
||||
{
|
||||
get { return invoiceId; }
|
||||
set { invoiceId = value; }
|
||||
}
|
||||
|
||||
public string ContractId
|
||||
{
|
||||
get { return contractId; }
|
||||
set { contractId = value; }
|
||||
}
|
||||
|
||||
public string TextResponse
|
||||
{
|
||||
get { return textResponse; }
|
||||
set { textResponse = value; }
|
||||
}
|
||||
|
||||
public DateTime Received
|
||||
{
|
||||
get { return received; }
|
||||
set { received = value; }
|
||||
}
|
||||
|
||||
public string ErrorMessage
|
||||
{
|
||||
get { return errorMessage; }
|
||||
set { errorMessage = value; }
|
||||
}
|
||||
|
||||
public string MethodName
|
||||
{
|
||||
get { return methodName; }
|
||||
set { methodName = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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.Collections.Specialized;
|
||||
using System.Text;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace WebsitePanel.Ecommerce.EnterpriseServer
|
||||
{
|
||||
[Serializable]
|
||||
public class StoreSettings : KeyValueBunch
|
||||
{
|
||||
public const string SIGNUP_SETTINGS = "SignupSettings";
|
||||
public const string SYSTEM_SETTINGS = "SystemSettings";
|
||||
|
||||
public const string NEW_INVOICE = "EmitInvoiceTemplate";
|
||||
public const string PAYMENT_RECEIVED = "PaymentReceivedTemplate";
|
||||
public const string SERVICE_CANCELLED = "CancelServicesTemplate";
|
||||
public const string SERVICE_ACTIVATED = "ActivateServicesTemplate";
|
||||
public const string SERVICE_SUSPENDED = "SuspendServicesTemplate";
|
||||
|
||||
public const string TERMS_AND_CONDITIONS = "TermsAndConditions";
|
||||
public const string WELCOME_MESSAGE = "WelcomeMessage";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,104 @@
|
|||
// 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.Ecommerce.EnterpriseServer
|
||||
{
|
||||
public class SupportedPlugin
|
||||
{
|
||||
public const string DOMAIN_REGISTRAR_GROUP = "DOMAIN_REGISTRAR";
|
||||
public const string CC_GATEWAY_GROUP = "CC_GATEWAY";
|
||||
public const string TCO_GROUP = "2CO";
|
||||
public const string PP_ACCOUNT_GROUP = "PP_ACCOUNT";
|
||||
public const string OFFLINE_GROUP = "OFFLINE";
|
||||
|
||||
/*public const string PAYPAL_PRO = "PayPalPro";
|
||||
public const string AUTHORIZE_NET = "AuthorizeNet";
|
||||
public const string OFFLINE_PAYMENT = "OfflinePayment";
|
||||
public const string ENOM = "Enom";
|
||||
public const string DIRECTI = "Directi";
|
||||
public const string TO_CHECKOUT = "2Checkout";
|
||||
public const string PAYPAL_STANDARD = "PayPalStd";*/
|
||||
|
||||
public const int AUTHORIZE_NET = 1;
|
||||
public const int PAYPAL_PRO = 2;
|
||||
public const int TO_CHECKOUT = 3;
|
||||
public const int PAYPAL_STANDARD = 4;
|
||||
public const int OFFLINE_PAYMENTS = 5;
|
||||
public const int ENOM = 6;
|
||||
public const int DIRECTI = 7;
|
||||
public const int OFFLINE_REGISTRAR = 8;
|
||||
|
||||
|
||||
private int pluginId;
|
||||
private string pluginName;
|
||||
private string displayName;
|
||||
private string pluginGroup;
|
||||
private string typeName;
|
||||
private bool interactive;
|
||||
|
||||
public int PluginId
|
||||
{
|
||||
get { return this.pluginId; }
|
||||
set { this.pluginId = value; }
|
||||
}
|
||||
|
||||
public string PluginName
|
||||
{
|
||||
get { return this.pluginName; }
|
||||
set { this.pluginName = value; }
|
||||
}
|
||||
|
||||
public string DisplayName
|
||||
{
|
||||
get { return this.displayName; }
|
||||
set { this.displayName = value; }
|
||||
}
|
||||
|
||||
public string PluginGroup
|
||||
{
|
||||
get { return this.pluginGroup; }
|
||||
set { this.pluginGroup = value; }
|
||||
}
|
||||
|
||||
public string TypeName
|
||||
{
|
||||
get { return this.typeName; }
|
||||
set { this.typeName = value; }
|
||||
}
|
||||
|
||||
public bool Interactive
|
||||
{
|
||||
get { return this.interactive; }
|
||||
set { this.interactive = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
// 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.Ecommerce.EnterpriseServer
|
||||
{
|
||||
public interface ISystemPlugin
|
||||
{
|
||||
int ResellerId { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets Plugin ID
|
||||
/// </summary>
|
||||
int PluginId { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets Plugin Name
|
||||
/// </summary>
|
||||
string PluginName { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets plugin settings
|
||||
/// </summary>
|
||||
KeyValueBunch PluginSettings { get; set; }
|
||||
/// <summary>
|
||||
/// Gets setting keys that should be encrypted when saving to the metabase
|
||||
/// </summary>
|
||||
string[] SecureSettings { get; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,113 @@
|
|||
// 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 System.Collections.Specialized;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace WebsitePanel.Ecommerce.EnterpriseServer
|
||||
{
|
||||
public abstract class SystemPluginBase : ISystemPlugin
|
||||
{
|
||||
private int resellerId;
|
||||
private int pluginId;
|
||||
private string pluginName;
|
||||
private KeyValueBunch pluginSettings;
|
||||
|
||||
public static Hashtable NexusCategories;
|
||||
public static Hashtable AppPurposes;
|
||||
|
||||
static SystemPluginBase()
|
||||
{
|
||||
// setup nexus categories
|
||||
NexusCategories = new Hashtable();
|
||||
NexusCategories.Add("C11", "US Citizen");
|
||||
NexusCategories.Add("C12", "Permanent Resident");
|
||||
NexusCategories.Add("C21", "Business Entity");
|
||||
NexusCategories.Add("C31", "Foreign Entity");
|
||||
NexusCategories.Add("C32", "US Based Office");
|
||||
|
||||
// setup app purposes
|
||||
AppPurposes = new Hashtable();
|
||||
AppPurposes.Add("P1", "For Profit");
|
||||
AppPurposes.Add("P2", "Non-profit");
|
||||
AppPurposes.Add("P3", "Personal");
|
||||
AppPurposes.Add("P4", "Educational");
|
||||
AppPurposes.Add("P5", "Government");
|
||||
}
|
||||
|
||||
#region ISystemPlugin Members
|
||||
|
||||
public int ResellerId
|
||||
{
|
||||
get { return resellerId; }
|
||||
set { resellerId = value; }
|
||||
}
|
||||
|
||||
public int PluginId
|
||||
{
|
||||
get { return pluginId; }
|
||||
set { pluginId = value; }
|
||||
}
|
||||
|
||||
public string PluginName
|
||||
{
|
||||
get { return pluginName; }
|
||||
set { pluginName = value; }
|
||||
}
|
||||
|
||||
public KeyValueBunch PluginSettings
|
||||
{
|
||||
get { return pluginSettings; }
|
||||
set { pluginSettings = value; }
|
||||
}
|
||||
|
||||
public virtual string[] SecureSettings
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected string GetDomainName(string fqdn)
|
||||
{
|
||||
//
|
||||
int indexOf = fqdn.IndexOf('.');
|
||||
return fqdn.Substring(0, indexOf);
|
||||
}
|
||||
|
||||
protected string GetDomainTLD(string fqdn)
|
||||
{
|
||||
//
|
||||
int indexOf = fqdn.IndexOf('.');
|
||||
return fqdn.Substring(indexOf + 1);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
// 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.Ecommerce.EnterpriseServer
|
||||
{
|
||||
public class TLDExtension
|
||||
{
|
||||
private string tld;
|
||||
private int pluginId;
|
||||
private DateTime created;
|
||||
|
||||
public string TLD
|
||||
{
|
||||
get { return tld; }
|
||||
set { tld = value; }
|
||||
}
|
||||
|
||||
public int PluginId
|
||||
{
|
||||
get { return pluginId; }
|
||||
set { pluginId = value; }
|
||||
}
|
||||
|
||||
public DateTime Created
|
||||
{
|
||||
get { return created; }
|
||||
set { created = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
// 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.Ecommerce.EnterpriseServer
|
||||
{
|
||||
[Serializable]
|
||||
public class TaxZone
|
||||
{
|
||||
private int _zoneId;
|
||||
private string _zoneName;
|
||||
private decimal _zoneTax;
|
||||
private string _notes;
|
||||
private Guid _spaceId;
|
||||
|
||||
public int ZoneId
|
||||
{
|
||||
get { return this._zoneId; }
|
||||
set { this._zoneId = value; }
|
||||
}
|
||||
|
||||
public string ZoneName
|
||||
{
|
||||
get { return this._zoneName; }
|
||||
set { this._zoneName = value; }
|
||||
}
|
||||
|
||||
public decimal ZoneTax
|
||||
{
|
||||
get { return this._zoneTax; }
|
||||
set { this._zoneTax = value; }
|
||||
}
|
||||
|
||||
public string Notes
|
||||
{
|
||||
get { return this._notes; }
|
||||
set { this._notes = value; }
|
||||
}
|
||||
|
||||
public System.Guid SpaceId
|
||||
{
|
||||
get { return this._spaceId; }
|
||||
set { this._spaceId = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,108 @@
|
|||
// 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.Ecommerce.EnterpriseServer
|
||||
{
|
||||
public enum TaxationType
|
||||
{
|
||||
Fixed = 1,
|
||||
Percentage = 2,
|
||||
TaxIncluded = 3
|
||||
};
|
||||
|
||||
[Serializable]
|
||||
public class Taxation
|
||||
{
|
||||
private int taxationId;
|
||||
private int resellerId;
|
||||
private string country;
|
||||
private string state;
|
||||
private string description;
|
||||
private int typeId;
|
||||
private decimal amount;
|
||||
private bool active;
|
||||
|
||||
public int TaxationId
|
||||
{
|
||||
get { return this.taxationId; }
|
||||
set { this.taxationId = value; }
|
||||
}
|
||||
|
||||
public int ResellerId
|
||||
{
|
||||
get { return this.resellerId; }
|
||||
set { this.resellerId = value; }
|
||||
}
|
||||
|
||||
public string Country
|
||||
{
|
||||
get { return this.country; }
|
||||
set { this.country = value; }
|
||||
}
|
||||
|
||||
public string State
|
||||
{
|
||||
get { return this.state; }
|
||||
set { this.state = value; }
|
||||
}
|
||||
|
||||
public string Description
|
||||
{
|
||||
get { return this.description; }
|
||||
set { this.description = value; }
|
||||
}
|
||||
|
||||
public int TypeId
|
||||
{
|
||||
get { return this.typeId; }
|
||||
set { this.typeId = value; }
|
||||
}
|
||||
|
||||
public TaxationType Type
|
||||
{
|
||||
get { return (TaxationType)typeId; }
|
||||
set { typeId = (int)value; }
|
||||
}
|
||||
|
||||
public decimal Amount
|
||||
{
|
||||
get { return this.amount; }
|
||||
set { this.amount = value; }
|
||||
}
|
||||
|
||||
public bool Active
|
||||
{
|
||||
get { return this.active; }
|
||||
set { this.active = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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.Ecommerce.EnterpriseServer
|
||||
{
|
||||
public class TopLevelDomain
|
||||
{
|
||||
private int productId;
|
||||
private int resellerId;
|
||||
private string productName;
|
||||
private string productSku;
|
||||
private bool enabled;
|
||||
private bool whoisEnabled;
|
||||
private DateTime created;
|
||||
private int typeId;
|
||||
private int pluginId;
|
||||
private string displayName;
|
||||
private bool taxInclusive;
|
||||
|
||||
public bool TaxInclusive
|
||||
{
|
||||
get { return this.taxInclusive; }
|
||||
set { this.taxInclusive = value; }
|
||||
}
|
||||
|
||||
public int ProductId
|
||||
{
|
||||
get { return this.productId; }
|
||||
set { this.productId = value; }
|
||||
}
|
||||
|
||||
public int ResellerId
|
||||
{
|
||||
get { return this.resellerId; }
|
||||
set { this.resellerId = value; }
|
||||
}
|
||||
|
||||
public string ProductName
|
||||
{
|
||||
get { return this.productName; }
|
||||
set { this.productName = value; }
|
||||
}
|
||||
|
||||
public string ProductSku
|
||||
{
|
||||
get { return this.productSku; }
|
||||
set { this.productSku = value; }
|
||||
}
|
||||
|
||||
public bool Enabled
|
||||
{
|
||||
get { return this.enabled; }
|
||||
set { this.enabled = value; }
|
||||
}
|
||||
|
||||
public bool WhoisEnabled
|
||||
{
|
||||
get { return this.whoisEnabled; }
|
||||
set { this.whoisEnabled = value; }
|
||||
}
|
||||
|
||||
public System.DateTime Created
|
||||
{
|
||||
get { return this.created; }
|
||||
set { this.created = value; }
|
||||
}
|
||||
|
||||
public int TypeId
|
||||
{
|
||||
get { return this.typeId; }
|
||||
set { this.typeId = value; }
|
||||
}
|
||||
|
||||
public int PluginId
|
||||
{
|
||||
get { return this.pluginId; }
|
||||
set { this.pluginId = value; }
|
||||
}
|
||||
|
||||
public string DisplayName
|
||||
{
|
||||
get { return this.displayName; }
|
||||
set { this.displayName = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
// 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.Ecommerce.EnterpriseServer
|
||||
{
|
||||
public enum TransactionStatus
|
||||
{
|
||||
Pending = 0,
|
||||
Approved = 1,
|
||||
Declined = 2,
|
||||
};
|
||||
|
||||
[Serializable]
|
||||
public class TransactionResult
|
||||
{
|
||||
private bool succeed;
|
||||
private string statusCode;
|
||||
private string transactionId;
|
||||
private TransactionStatus transactionStatus;
|
||||
private string rawResponse;
|
||||
|
||||
public bool Succeed
|
||||
{
|
||||
get { return this.succeed; }
|
||||
set { this.succeed = value; }
|
||||
}
|
||||
|
||||
public string StatusCode
|
||||
{
|
||||
get { return this.statusCode; }
|
||||
set { this.statusCode = value; }
|
||||
}
|
||||
|
||||
public TransactionStatus TransactionStatus
|
||||
{
|
||||
get { return this.transactionStatus; }
|
||||
set { this.transactionStatus = value; }
|
||||
}
|
||||
|
||||
public string TransactionId
|
||||
{
|
||||
get { return this.transactionId; }
|
||||
set { this.transactionId = value; }
|
||||
}
|
||||
|
||||
public string RawResponse
|
||||
{
|
||||
get { return this.rawResponse; }
|
||||
set { this.rawResponse = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace WebsitePanel.Ecommerce.EnterpriseServer
|
||||
{
|
||||
public class TriggerEventArgs : KeyValueBunchBase {}
|
||||
|
||||
public abstract class TriggerHandlerBase : ITriggerHandler
|
||||
{
|
||||
private string triggerId;
|
||||
private int ownerId;
|
||||
private string referenceId;
|
||||
private string triggerStatus;
|
||||
|
||||
#region ITriggerHandler Members
|
||||
|
||||
public string TriggerId
|
||||
{
|
||||
get { return triggerId; }
|
||||
set { triggerId = value; }
|
||||
}
|
||||
|
||||
public int OwnerId
|
||||
{
|
||||
get { return ownerId; }
|
||||
set { ownerId = value; }
|
||||
}
|
||||
|
||||
public string FullQualifiedTypeName
|
||||
{
|
||||
get { return GetType().AssemblyQualifiedName; }
|
||||
}
|
||||
|
||||
public abstract string TriggerNamespace { get; }
|
||||
|
||||
public string ReferenceId
|
||||
{
|
||||
get { return referenceId; }
|
||||
set { referenceId = value; }
|
||||
}
|
||||
|
||||
public string TriggerStatus
|
||||
{
|
||||
get { return triggerStatus; }
|
||||
set { triggerStatus = value; }
|
||||
}
|
||||
|
||||
public abstract void ExecuteTrigger(TriggerEventArgs eventArgs);
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
public interface ITriggerHandler
|
||||
{
|
||||
string TriggerId { get; set; }
|
||||
int OwnerId { get; set; }
|
||||
string FullQualifiedTypeName { get; }
|
||||
string TriggerNamespace { get; }
|
||||
string ReferenceId { get; set; }
|
||||
string TriggerStatus { get; set; }
|
||||
void ExecuteTrigger(TriggerEventArgs eventArgs);
|
||||
}
|
||||
}
|
|
@ -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.EnterpriseServer
|
||||
{
|
||||
public class ExchangeEmailAddress
|
||||
{
|
||||
string emailAddress;
|
||||
bool isPrimary;
|
||||
|
||||
public string EmailAddress
|
||||
{
|
||||
get { return this.emailAddress; }
|
||||
set { this.emailAddress = value; }
|
||||
}
|
||||
|
||||
public bool IsPrimary
|
||||
{
|
||||
get { return this.isPrimary; }
|
||||
set { this.isPrimary = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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.EnterpriseServer
|
||||
{
|
||||
public class LogRecord
|
||||
{
|
||||
string recordID;
|
||||
int severityID;
|
||||
int userID;
|
||||
string username;
|
||||
int itemID;
|
||||
string sourceName;
|
||||
DateTime startDate;
|
||||
DateTime finishDate;
|
||||
string taskName;
|
||||
string itemName;
|
||||
string executionLog;
|
||||
|
||||
public string RecordID
|
||||
{
|
||||
get { return this.recordID; }
|
||||
set { this.recordID = value; }
|
||||
}
|
||||
|
||||
public int SeverityID
|
||||
{
|
||||
get { return this.severityID; }
|
||||
set { this.severityID = value; }
|
||||
}
|
||||
|
||||
public int UserID
|
||||
{
|
||||
get { return this.userID; }
|
||||
set { this.userID = value; }
|
||||
}
|
||||
|
||||
public string Username
|
||||
{
|
||||
get { return this.username; }
|
||||
set { this.username = value; }
|
||||
}
|
||||
|
||||
public int ItemID
|
||||
{
|
||||
get { return this.itemID; }
|
||||
set { this.itemID = value; }
|
||||
}
|
||||
|
||||
public string SourceName
|
||||
{
|
||||
get { return this.sourceName; }
|
||||
set { this.sourceName = value; }
|
||||
}
|
||||
|
||||
public System.DateTime StartDate
|
||||
{
|
||||
get { return this.startDate; }
|
||||
set { this.startDate = value; }
|
||||
}
|
||||
|
||||
public System.DateTime FinishDate
|
||||
{
|
||||
get { return this.finishDate; }
|
||||
set { this.finishDate = value; }
|
||||
}
|
||||
|
||||
public string TaskName
|
||||
{
|
||||
get { return this.taskName; }
|
||||
set { this.taskName = value; }
|
||||
}
|
||||
|
||||
public string ItemName
|
||||
{
|
||||
get { return this.itemName; }
|
||||
set { this.itemName = value; }
|
||||
}
|
||||
|
||||
public string ExecutionLog
|
||||
{
|
||||
get { return this.executionLog; }
|
||||
set { this.executionLog = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
// 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 System.Xml.Serialization;
|
||||
|
||||
namespace WebsitePanel.EnterpriseServer
|
||||
{
|
||||
public class HostingPlanContext
|
||||
{
|
||||
private HostingPlanInfo hostingPlan;
|
||||
private HostingPlanGroupInfo[] groupsArray;
|
||||
private QuotaValueInfo[] quotasArray;
|
||||
private Dictionary<string, HostingPlanGroupInfo> groups = new Dictionary<string, HostingPlanGroupInfo>();
|
||||
private Dictionary<string, QuotaValueInfo> quotas = new Dictionary<string, QuotaValueInfo>();
|
||||
|
||||
public HostingPlanInfo HostingPlan
|
||||
{
|
||||
get { return this.hostingPlan; }
|
||||
set { this.hostingPlan = value; }
|
||||
}
|
||||
|
||||
public HostingPlanGroupInfo[] GroupsArray
|
||||
{
|
||||
get { return this.groupsArray; }
|
||||
set { this.groupsArray = value; }
|
||||
}
|
||||
|
||||
public QuotaValueInfo[] QuotasArray
|
||||
{
|
||||
get { return this.quotasArray; }
|
||||
set { this.quotasArray = value; }
|
||||
}
|
||||
|
||||
[XmlIgnore]
|
||||
public Dictionary<string, HostingPlanGroupInfo> Groups
|
||||
{
|
||||
get { return groups; }
|
||||
}
|
||||
|
||||
[XmlIgnore]
|
||||
public Dictionary<string, QuotaValueInfo> Quotas
|
||||
{
|
||||
get { return quotas; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
// 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.EnterpriseServer
|
||||
{
|
||||
[Serializable]
|
||||
public class HostingPlanGroupInfo
|
||||
{
|
||||
int groupId;
|
||||
string groupName;
|
||||
bool enabled;
|
||||
bool calculateDiskSpace;
|
||||
bool calculateBandwidth;
|
||||
|
||||
public int GroupId
|
||||
{
|
||||
get { return groupId; }
|
||||
set { groupId = value; }
|
||||
}
|
||||
|
||||
public bool Enabled
|
||||
{
|
||||
get { return enabled; }
|
||||
set { enabled = value; }
|
||||
}
|
||||
|
||||
public bool CalculateDiskSpace
|
||||
{
|
||||
get { return calculateDiskSpace; }
|
||||
set { calculateDiskSpace = value; }
|
||||
}
|
||||
|
||||
public bool CalculateBandwidth
|
||||
{
|
||||
get { return calculateBandwidth; }
|
||||
set { calculateBandwidth = value; }
|
||||
}
|
||||
|
||||
public string GroupName
|
||||
{
|
||||
get { return this.groupName; }
|
||||
set { this.groupName = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,137 @@
|
|||
// 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.EnterpriseServer
|
||||
{
|
||||
[Serializable]
|
||||
public class HostingPlanInfo
|
||||
{
|
||||
int planId;
|
||||
int userId;
|
||||
int packageId;
|
||||
int serverId;
|
||||
string planName;
|
||||
string planDescription;
|
||||
bool available;
|
||||
bool isAddon;
|
||||
decimal setupPrice;
|
||||
decimal recurringPrice;
|
||||
int recurrenceUnit;
|
||||
int recurrenceLength;
|
||||
HostingPlanGroupInfo[] groups;
|
||||
HostingPlanQuotaInfo[] quotas;
|
||||
|
||||
public int PlanId
|
||||
{
|
||||
get { return planId; }
|
||||
set { planId = value; }
|
||||
}
|
||||
|
||||
public int PackageId
|
||||
{
|
||||
get { return packageId; }
|
||||
set { packageId = value; }
|
||||
}
|
||||
|
||||
public string PlanName
|
||||
{
|
||||
get { return planName; }
|
||||
set { planName = value; }
|
||||
}
|
||||
|
||||
public string PlanDescription
|
||||
{
|
||||
get { return planDescription; }
|
||||
set { planDescription = value; }
|
||||
}
|
||||
|
||||
public bool Available
|
||||
{
|
||||
get { return available; }
|
||||
set { available = value; }
|
||||
}
|
||||
|
||||
public int ServerId
|
||||
{
|
||||
get { return serverId; }
|
||||
set { serverId = value; }
|
||||
}
|
||||
|
||||
public bool IsAddon
|
||||
{
|
||||
get { return isAddon; }
|
||||
set { isAddon = value; }
|
||||
}
|
||||
|
||||
public decimal SetupPrice
|
||||
{
|
||||
get { return this.setupPrice; }
|
||||
set { this.setupPrice = value; }
|
||||
}
|
||||
|
||||
public decimal RecurringPrice
|
||||
{
|
||||
get { return this.recurringPrice; }
|
||||
set { this.recurringPrice = value; }
|
||||
}
|
||||
|
||||
public int RecurrenceUnit
|
||||
{
|
||||
get { return this.recurrenceUnit; }
|
||||
set { this.recurrenceUnit = value; }
|
||||
}
|
||||
|
||||
public int RecurrenceLength
|
||||
{
|
||||
get { return this.recurrenceLength; }
|
||||
set { this.recurrenceLength = value; }
|
||||
}
|
||||
|
||||
public HostingPlanGroupInfo[] Groups
|
||||
{
|
||||
get { return this.groups; }
|
||||
set { this.groups = value; }
|
||||
}
|
||||
|
||||
public HostingPlanQuotaInfo[] Quotas
|
||||
{
|
||||
get { return this.quotas; }
|
||||
set { this.quotas = value; }
|
||||
}
|
||||
|
||||
public int UserId
|
||||
{
|
||||
get { return this.userId; }
|
||||
set { this.userId = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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.EnterpriseServer
|
||||
{
|
||||
public class HostingPlanQuotaInfo
|
||||
{
|
||||
int quotaId;
|
||||
|
||||
public int QuotaId
|
||||
{
|
||||
get { return quotaId; }
|
||||
set { quotaId = value; }
|
||||
}
|
||||
int quotaValue;
|
||||
|
||||
public int QuotaValue
|
||||
{
|
||||
get { return quotaValue; }
|
||||
set { quotaValue = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,94 @@
|
|||
// 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.EnterpriseServer
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for PackageAddonInfo.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class PackageAddonInfo
|
||||
{
|
||||
int packageAddonId;
|
||||
int packageId;
|
||||
int planId;
|
||||
int quantity;
|
||||
int statusId;
|
||||
DateTime purchaseDate;
|
||||
string comments;
|
||||
|
||||
|
||||
public PackageAddonInfo()
|
||||
{
|
||||
}
|
||||
|
||||
public int PackageAddonId
|
||||
{
|
||||
get { return packageAddonId; }
|
||||
set { packageAddonId = value; }
|
||||
}
|
||||
|
||||
public int PackageId
|
||||
{
|
||||
get { return packageId; }
|
||||
set { packageId = value; }
|
||||
}
|
||||
|
||||
public int PlanId
|
||||
{
|
||||
get { return planId; }
|
||||
set { planId = value; }
|
||||
}
|
||||
|
||||
public int Quantity
|
||||
{
|
||||
get { return quantity; }
|
||||
set { quantity = value; }
|
||||
}
|
||||
|
||||
public DateTime PurchaseDate
|
||||
{
|
||||
get { return purchaseDate; }
|
||||
set { purchaseDate = value; }
|
||||
}
|
||||
|
||||
public string Comments
|
||||
{
|
||||
get { return comments; }
|
||||
set { comments = value; }
|
||||
}
|
||||
|
||||
public int StatusId
|
||||
{
|
||||
get { return this.statusId; }
|
||||
set { this.statusId = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
// 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 System.Xml.Serialization;
|
||||
|
||||
namespace WebsitePanel.EnterpriseServer
|
||||
{
|
||||
public class PackageContext
|
||||
{
|
||||
private PackageInfo package;
|
||||
private HostingPlanGroupInfo[] groupsArray;
|
||||
private QuotaValueInfo[] quotasArray;
|
||||
private Dictionary<string, HostingPlanGroupInfo> groups = new Dictionary<string, HostingPlanGroupInfo>();
|
||||
private Dictionary<string, QuotaValueInfo> quotas = new Dictionary<string, QuotaValueInfo>();
|
||||
|
||||
public PackageInfo Package
|
||||
{
|
||||
get { return this.package; }
|
||||
set { this.package = value; }
|
||||
}
|
||||
|
||||
public HostingPlanGroupInfo[] GroupsArray
|
||||
{
|
||||
get { return this.groupsArray; }
|
||||
set { this.groupsArray = value; }
|
||||
}
|
||||
|
||||
public QuotaValueInfo[] QuotasArray
|
||||
{
|
||||
get { return this.quotasArray; }
|
||||
set { this.quotasArray = value; }
|
||||
}
|
||||
|
||||
[XmlIgnore]
|
||||
public Dictionary<string, HostingPlanGroupInfo> Groups
|
||||
{
|
||||
get { return groups; }
|
||||
}
|
||||
|
||||
[XmlIgnore]
|
||||
public Dictionary<string, QuotaValueInfo> Quotas
|
||||
{
|
||||
get { return quotas; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,170 @@
|
|||
// 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.EnterpriseServer
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for PackageInfo.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class PackageInfo
|
||||
{
|
||||
int packageId;
|
||||
int userId;
|
||||
int parentPackageId;
|
||||
int statusId;
|
||||
int planId;
|
||||
int serverId;
|
||||
DateTime purchaseDate;
|
||||
string packageName;
|
||||
string packageComments;
|
||||
int domains;
|
||||
int diskSpace;
|
||||
int bandWidth;
|
||||
int domainsQuota;
|
||||
int diskSpaceQuota;
|
||||
int bandWidthQuota;
|
||||
bool overrideQuotas;
|
||||
HostingPlanGroupInfo[] groups;
|
||||
HostingPlanQuotaInfo[] quotas;
|
||||
|
||||
public PackageInfo()
|
||||
{
|
||||
}
|
||||
|
||||
public int PackageId
|
||||
{
|
||||
get { return packageId; }
|
||||
set { packageId = value; }
|
||||
}
|
||||
|
||||
public int UserId
|
||||
{
|
||||
get { return userId; }
|
||||
set { userId = value; }
|
||||
}
|
||||
|
||||
public int ParentPackageId
|
||||
{
|
||||
get { return parentPackageId; }
|
||||
set { parentPackageId = value; }
|
||||
}
|
||||
|
||||
public int StatusId
|
||||
{
|
||||
get { return statusId; }
|
||||
set { statusId = value; }
|
||||
}
|
||||
|
||||
public int PlanId
|
||||
{
|
||||
get { return planId; }
|
||||
set { planId = value; }
|
||||
}
|
||||
|
||||
public DateTime PurchaseDate
|
||||
{
|
||||
get { return purchaseDate; }
|
||||
set { purchaseDate = value; }
|
||||
}
|
||||
|
||||
public string PackageName
|
||||
{
|
||||
get { return packageName; }
|
||||
set { packageName = value; }
|
||||
}
|
||||
|
||||
public string PackageComments
|
||||
{
|
||||
get { return packageComments; }
|
||||
set { packageComments = value; }
|
||||
}
|
||||
|
||||
public int ServerId
|
||||
{
|
||||
get { return serverId; }
|
||||
set { serverId = value; }
|
||||
}
|
||||
|
||||
public int DiskSpace
|
||||
{
|
||||
get { return diskSpace; }
|
||||
set { diskSpace = value; }
|
||||
}
|
||||
|
||||
public int BandWidth
|
||||
{
|
||||
get { return bandWidth; }
|
||||
set { bandWidth = value; }
|
||||
}
|
||||
|
||||
public int DiskSpaceQuota
|
||||
{
|
||||
get { return this.diskSpaceQuota; }
|
||||
set { this.diskSpaceQuota = value; }
|
||||
}
|
||||
|
||||
public int BandWidthQuota
|
||||
{
|
||||
get { return this.bandWidthQuota; }
|
||||
set { this.bandWidthQuota = value; }
|
||||
}
|
||||
|
||||
public int Domains
|
||||
{
|
||||
get { return this.domains; }
|
||||
set { this.domains = value; }
|
||||
}
|
||||
|
||||
public int DomainsQuota
|
||||
{
|
||||
get { return this.domainsQuota; }
|
||||
set { this.domainsQuota = value; }
|
||||
}
|
||||
|
||||
public bool OverrideQuotas
|
||||
{
|
||||
get { return this.overrideQuotas; }
|
||||
set { this.overrideQuotas = value; }
|
||||
}
|
||||
|
||||
public HostingPlanGroupInfo[] Groups
|
||||
{
|
||||
get { return this.groups; }
|
||||
set { this.groups = value; }
|
||||
}
|
||||
|
||||
public HostingPlanQuotaInfo[] Quotas
|
||||
{
|
||||
get { return this.quotas; }
|
||||
set { this.quotas = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
// 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;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace WebsitePanel.EnterpriseServer
|
||||
{
|
||||
public class PackageResult
|
||||
{
|
||||
private int result;
|
||||
private DataSet exceedingQuotas;
|
||||
|
||||
public int Result
|
||||
{
|
||||
get { return this.result; }
|
||||
set { this.result = value; }
|
||||
}
|
||||
|
||||
public DataSet ExceedingQuotas
|
||||
{
|
||||
get { return this.exceedingQuotas; }
|
||||
set { this.exceedingQuotas = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,113 @@
|
|||
// 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.Xml.Serialization;
|
||||
|
||||
namespace WebsitePanel.EnterpriseServer
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for PackageSettings.
|
||||
/// </summary>
|
||||
public class PackageSettings
|
||||
{
|
||||
public const string INSTANT_ALIAS = "InstantAlias";
|
||||
public const string SPACES_FOLDER = "ChildSpacesFolder";
|
||||
public const string NAME_SERVERS = "NameServers";
|
||||
public const string SHARED_SSL_SITES = "SharedSslSites";
|
||||
public const string EXCHANGE_SERVER = "ExchangeServer";
|
||||
public const string EXCHANGE_HOSTED_EDITION = "ExchangeHostedEdition";
|
||||
public const string HOSTED_SOLLUTION = "HostedSollution";
|
||||
public const string VIRTUAL_PRIVATE_SERVERS = "VirtualPrivateServers";
|
||||
|
||||
public const string VIRTUAL_PRIVATE_SERVERS_FOR_PRIVATE_CLOUD = "VirtualPrivateServersForPrivateCloud";
|
||||
public int PackageId;
|
||||
public string SettingsName;
|
||||
|
||||
private NameValueCollection settingsHash = null;
|
||||
public string[][] SettingsArray;
|
||||
|
||||
[XmlIgnore]
|
||||
NameValueCollection Settings
|
||||
{
|
||||
get
|
||||
{
|
||||
if (settingsHash == null)
|
||||
{
|
||||
// create new dictionary
|
||||
settingsHash = new NameValueCollection();
|
||||
|
||||
// fill dictionary
|
||||
if (SettingsArray != null)
|
||||
{
|
||||
foreach (string[] pair in SettingsArray)
|
||||
settingsHash.Add(pair[0], pair[1]);
|
||||
}
|
||||
}
|
||||
return settingsHash;
|
||||
}
|
||||
}
|
||||
|
||||
[XmlIgnore]
|
||||
public string this[string settingName]
|
||||
{
|
||||
get
|
||||
{
|
||||
return Settings[settingName];
|
||||
}
|
||||
set
|
||||
{
|
||||
// set setting
|
||||
Settings[settingName] = value;
|
||||
|
||||
// rebuild array
|
||||
SettingsArray = new string[Settings.Count][];
|
||||
for (int i = 0; i < Settings.Count; i++)
|
||||
{
|
||||
SettingsArray[i] = new string[] { Settings.Keys[i], Settings[Settings.Keys[i]] };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int GetInt(string settingName)
|
||||
{
|
||||
return Int32.Parse(Settings[settingName]);
|
||||
}
|
||||
|
||||
public long GetLong(string settingName)
|
||||
{
|
||||
return Int64.Parse(Settings[settingName]);
|
||||
}
|
||||
|
||||
public bool GetBool(string settingName)
|
||||
{
|
||||
return Boolean.Parse(Settings[settingName]);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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.EnterpriseServer
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for PackageStatus.
|
||||
/// </summary>
|
||||
public enum PackageStatus
|
||||
{
|
||||
Active = 1,
|
||||
Suspended = 2,
|
||||
Cancelled = 3,
|
||||
New = 4
|
||||
}
|
||||
}
|
|
@ -0,0 +1,89 @@
|
|||
// 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.EnterpriseServer
|
||||
{
|
||||
[Serializable]
|
||||
public class QuotaInfo
|
||||
{
|
||||
#region Quotas types constants
|
||||
|
||||
public const int BooleanQuota = 1;
|
||||
public const int NumericQuota = 2;
|
||||
public const int MaximumValueQuota = 3;
|
||||
|
||||
#endregion
|
||||
|
||||
int quotaId;
|
||||
|
||||
public int QuotaId
|
||||
{
|
||||
get { return quotaId; }
|
||||
set { quotaId = value; }
|
||||
}
|
||||
int groupId;
|
||||
|
||||
public int GroupId
|
||||
{
|
||||
get { return groupId; }
|
||||
set { groupId = value; }
|
||||
}
|
||||
string quotaName;
|
||||
|
||||
public string QuotaName
|
||||
{
|
||||
get { return quotaName; }
|
||||
set { quotaName = value; }
|
||||
}
|
||||
string quotaDescription;
|
||||
|
||||
public string QuotaDescription
|
||||
{
|
||||
get { return quotaDescription; }
|
||||
set { quotaDescription = value; }
|
||||
}
|
||||
int quotaTypeId;
|
||||
|
||||
public int QuotaTypeId
|
||||
{
|
||||
get { return quotaTypeId; }
|
||||
set { quotaTypeId = value; }
|
||||
}
|
||||
int serviceQuota;
|
||||
|
||||
public int ServiceQuota
|
||||
{
|
||||
get { return serviceQuota; }
|
||||
set { serviceQuota = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
// 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.EnterpriseServer
|
||||
{
|
||||
public class QuotaValueInfo
|
||||
{
|
||||
private int quotaId;
|
||||
private int groupId;
|
||||
private string quotaName;
|
||||
private string quotaDescription;
|
||||
private int quotaAllocatedValue;
|
||||
private int quotaTypeId;
|
||||
private int quotaUsedValue;
|
||||
private bool quotaExhausted;
|
||||
|
||||
public QuotaValueInfo()
|
||||
{
|
||||
}
|
||||
|
||||
public int QuotaAllocatedValue
|
||||
{
|
||||
get { return this.quotaAllocatedValue; }
|
||||
set { this.quotaAllocatedValue = value; }
|
||||
}
|
||||
|
||||
public int QuotaUsedValue
|
||||
{
|
||||
get { return this.quotaUsedValue; }
|
||||
set { this.quotaUsedValue = value; }
|
||||
}
|
||||
|
||||
public bool QuotaExhausted
|
||||
{
|
||||
get { return this.quotaExhausted; }
|
||||
set { this.quotaExhausted = value; }
|
||||
}
|
||||
|
||||
public string QuotaName
|
||||
{
|
||||
get { return this.quotaName; }
|
||||
set { this.quotaName = value; }
|
||||
}
|
||||
|
||||
public string QuotaDescription
|
||||
{
|
||||
get { return this.quotaDescription; }
|
||||
set { this.quotaDescription = value; }
|
||||
}
|
||||
|
||||
public int QuotaId
|
||||
{
|
||||
get { return this.quotaId; }
|
||||
set { this.quotaId = value; }
|
||||
}
|
||||
|
||||
public int QuotaTypeId
|
||||
{
|
||||
get { return this.quotaTypeId; }
|
||||
set { this.quotaTypeId = value; }
|
||||
}
|
||||
|
||||
public int GroupId
|
||||
{
|
||||
get { return this.groupId; }
|
||||
set { this.groupId = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,211 @@
|
|||
// 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.EnterpriseServer
|
||||
{
|
||||
public class Quotas
|
||||
{
|
||||
/*
|
||||
select 'public const string ' + UPPER(REPLACE(q.QuotaName, '.', '_')) + ' = "' +
|
||||
q.QuotaName + '"; // ' + q.QuotaDescription
|
||||
from quotas as q
|
||||
inner join ResourceGroups as rg on q.groupid = rg.groupid
|
||||
order by rg.groupOrder
|
||||
* */
|
||||
|
||||
public const string OS_ODBC = "OS.ODBC"; // ODBC DSNs
|
||||
public const string OS_BANDWIDTH = "OS.Bandwidth"; // Bandwidth, MB
|
||||
public const string OS_DISKSPACE = "OS.Diskspace"; // Disk space, MB
|
||||
public const string OS_DOMAINS = "OS.Domains"; // Domains
|
||||
public const string OS_SUBDOMAINS = "OS.SubDomains"; // Sub-Domains
|
||||
public const string OS_DOMAINPOINTERS = "OS.DomainPointers"; // Domain Pointers
|
||||
public const string OS_FILEMANAGER = "OS.FileManager"; // File Manager
|
||||
public const string OS_SCHEDULEDTASKS = "OS.ScheduledTasks"; // Scheduled Tasks
|
||||
public const string OS_SCHEDULEDINTERVALTASKS = "OS.ScheduledIntervalTasks"; // Interval Tasks Allowed
|
||||
public const string OS_MINIMUMTASKINTERVAL = "OS.MinimumTaskInterval"; // Minimum Tasks Interval, minutes
|
||||
public const string OS_APPINSTALLER = "OS.AppInstaller"; // Applications Installer
|
||||
public const string OS_EXTRAAPPLICATIONS = "OS.ExtraApplications"; // Extra Application Packs
|
||||
public const string WEB_SITES = "Web.Sites"; // Web Sites
|
||||
public const string WEB_ASPNET11 = "Web.AspNet11"; // ASP.NET 1.1
|
||||
public const string WEB_ASPNET20 = "Web.AspNet20"; // ASP.NET 2.0
|
||||
public const string WEB_ASPNET40 = "Web.AspNet40"; // ASP.NET 4.0
|
||||
public const string WEB_ASP = "Web.Asp"; // ASP
|
||||
public const string WEB_PHP4 = "Web.Php4"; // PHP 4.x
|
||||
public const string WEB_PHP5 = "Web.Php5"; // PHP 5.x
|
||||
public const string WEB_PERL = "Web.Perl"; // Perl
|
||||
public const string WEB_PYTHON = "Web.Python"; // Python
|
||||
public const string WEB_VIRTUALDIRS = "Web.VirtualDirs"; // Virtual Directories
|
||||
public const string WEB_FRONTPAGE = "Web.FrontPage"; // FrontPage
|
||||
public const string WEB_SECURITY = "Web.Security"; // Custom Security Settings
|
||||
public const string WEB_DEFAULTDOCS = "Web.DefaultDocs"; // Custom Default Documents
|
||||
public const string WEB_APPPOOLS = "Web.AppPools"; // Dedicated Application Pools
|
||||
public const string WEB_HEADERS = "Web.Headers"; // Custom Headers
|
||||
public const string WEB_ERRORS = "Web.Errors"; // Custom Errors
|
||||
public const string WEB_MIME = "Web.Mime"; // Custom MIME Types
|
||||
public const string WEB_CGIBIN = "Web.CgiBin"; // CGI-BIN Folder
|
||||
public const string WEB_SECUREDFOLDERS = "Web.SecuredFolders"; // Secured Folders
|
||||
public const string WEB_HTACCESS = "Web.Htaccess"; // Htaccess
|
||||
public const string WEB_SHAREDSSL = "Web.SharedSSL"; // Shared SSL Folders
|
||||
public const string WEB_REDIRECTIONS = "Web.Redirections"; // Web Sites Redirection
|
||||
public const string WEB_HOMEFOLDERS = "Web.HomeFolders"; // Changing Sites Root Folders
|
||||
public const string WEB_IP_ADDRESSES = "Web.IPAddresses"; // Dedicated IP Addresses
|
||||
public const string WEB_COLDFUSION = "Web.ColdFusion"; // ColdFusion
|
||||
public const string WEB_CFVIRTUALDIRS = "Web.CFVirtualDirectories"; //ColdFusion Virtual Directories
|
||||
public const string WEB_REMOTEMANAGEMENT = "Web.RemoteManagement"; //IIS 7 Remote Management
|
||||
public const string WEB_SSL = "Web.SSL"; //SSL
|
||||
public const string FTP_ACCOUNTS = "FTP.Accounts"; // FTP Accounts
|
||||
public const string MAIL_ACCOUNTS = "Mail.Accounts"; // Mail Accounts
|
||||
public const string MAIL_FORWARDINGS = "Mail.Forwardings"; // Mail Forwardings
|
||||
public const string MAIL_LISTS = "Mail.Lists"; // Mail Lists
|
||||
public const string MAIL_GROUPS = "Mail.Groups"; // Mail Groups
|
||||
public const string MAIL_MAXBOXSIZE = "Mail.MaxBoxSize"; // Max Mailbox Size
|
||||
public const string MAIL_MAXGROUPMEMBERS = "Mail.MaxGroupMembers"; // Max Group Recipients
|
||||
public const string MAIL_MAXLISTMEMBERS = "Mail.MaxListMembers"; // Max List Recipients
|
||||
public const string MAIL_DISABLESIZEEDIT = "Mail.DisableSizeEdit"; // Disable Mailbox Size Edit
|
||||
public const string EXCHANGE2007_ORGANIZATIONS = "Exchange2007.Organizations"; // Exchange 2007 Organizations
|
||||
public const string EXCHANGE2007_DISKSPACE = "Exchange2007.DiskSpace"; // Organization Disk Space, MB
|
||||
public const string EXCHANGE2007_MAILBOXES = "Exchange2007.Mailboxes"; // Mailboxes per Organization
|
||||
public const string EXCHANGE2007_CONTACTS = "Exchange2007.Contacts"; // Contacts per Organization
|
||||
public const string EXCHANGE2007_DISTRIBUTIONLISTS = "Exchange2007.DistributionLists"; // Distribution Lists per Organization
|
||||
public const string EXCHANGE2007_PUBLICFOLDERS = "Exchange2007.PublicFolders"; // Public Folders per Organization
|
||||
public const string EXCHANGE2007_DOMAINS = "Exchange2007.Domains"; // Domains per Organization
|
||||
public const string EXCHANGE2007_POP3ALLOWED = "Exchange2007.POP3Allowed"; // POP3 Access
|
||||
public const string EXCHANGE2007_IMAPALLOWED = "Exchange2007.IMAPAllowed"; // IMAP Access
|
||||
public const string EXCHANGE2007_OWAALLOWED = "Exchange2007.OWAAllowed"; // OWA/HTTP Access
|
||||
public const string EXCHANGE2007_MAPIALLOWED = "Exchange2007.MAPIAllowed"; // MAPI Access
|
||||
public const string EXCHANGE2007_ACTIVESYNCALLOWED = "Exchange2007.ActiveSyncAllowed"; // ActiveSync Access
|
||||
public const string EXCHANGE2007_MAILENABLEDPUBLICFOLDERS = "Exchange2007.MailEnabledPublicFolders"; // Mail Enabled Public Folders Allowed
|
||||
public const string EXCHANGE2007_POP3ENABLED = "Exchange2007.POP3Enabled"; // POP3 Enabled by default
|
||||
public const string EXCHANGE2007_IMAPENABLED = "Exchange2007.IMAPEnabled"; // IMAP Enabled by default
|
||||
public const string EXCHANGE2007_OWAENABLED = "Exchange2007.OWAEnabled"; // OWA Enabled by default
|
||||
public const string EXCHANGE2007_MAPIENABLED = "Exchange2007.MAPIEnabled"; // MAPI Enabled by default
|
||||
public const string EXCHANGE2007_ACTIVESYNCENABLED = "Exchange2007.ActiveSyncEnabled"; // ActiveSync Enabled by default
|
||||
public const string EXCHANGEHOSTEDEDITION_DOMAINS = "ExchangeHostedEdition.Domains";
|
||||
public const string EXCHANGEHOSTEDEDITION_MAILBOXES = "ExchangeHostedEdition.Mailboxes";
|
||||
public const string EXCHANGEHOSTEDEDITION_CONTACTS = "ExchangeHostedEdition.Contacts";
|
||||
public const string EXCHANGEHOSTEDEDITION_DISTRIBUTIONLISTS = "ExchangeHostedEdition.DistributionLists";
|
||||
public const string MSSQL2000_DATABASES = "MsSQL2000.Databases"; // Databases
|
||||
public const string MSSQL2000_USERS = "MsSQL2000.Users"; // Users
|
||||
public const string MSSQL2000_MAXDATABASESIZE = "MsSQL2000.MaxDatabaseSize"; // Max Database Size
|
||||
public const string MSSQL2000_BACKUP = "MsSQL2000.Backup"; // Database Backups
|
||||
public const string MSSQL2000_RESTORE = "MsSQL2000.Restore"; // Database Restores
|
||||
public const string MSSQL2000_TRUNCATE = "MsSQL2000.Truncate"; // Database Truncate
|
||||
public const string MSSQL2005_DATABASES = "MsSQL2005.Databases"; // Databases
|
||||
public const string MSSQL2005_USERS = "MsSQL2005.Users"; // Users
|
||||
public const string MSSQL2005_MAXDATABASESIZE = "MsSQL2005.MaxDatabaseSize"; // Max Database Size
|
||||
public const string MSSQL2005_BACKUP = "MsSQL2005.Backup"; // Database Backups
|
||||
public const string MSSQL2005_RESTORE = "MsSQL2005.Restore"; // Database Restores
|
||||
public const string MSSQL2005_TRUNCATE = "MsSQL2005.Truncate"; // Database Truncate
|
||||
public const string MYSQL4_DATABASES = "MySQL4.Databases"; // Databases
|
||||
public const string MYSQL4_USERS = "MySQL4.Users"; // Users
|
||||
public const string MYSQL4_BACKUP = "MySQL4.Backup"; // Database Backups
|
||||
public const string MYSQL4_RESTORE = "MySQL4.Restore"; // Database Restores
|
||||
public const string MYSQL4_MAXDATABASESIZE = "MySQL4.MaxDatabaseSize"; // Max Database Size
|
||||
public const string MYSQL5_DATABASES = "MySQL5.Databases"; // Databases
|
||||
public const string MYSQL5_USERS = "MySQL5.Users"; // Users
|
||||
public const string MYSQL5_BACKUP = "MySQL5.Backup"; // Database Backups
|
||||
public const string MYSQL5_RESTORE = "MySQL5.Restore"; // Database Restores
|
||||
public const string MYSQL5_MAXDATABASESIZE = "MySQL5.MaxDatabaseSize"; // Max Database Size
|
||||
public const string SHAREPOINT_USERS = "SharePoint.Users"; // SharePoint Users
|
||||
public const string SHAREPOINT_GROUPS = "SharePoint.Groups"; // SharePoint Groups
|
||||
public const string SHAREPOINT_SITES = "SharePoint.Sites"; // SharePoint Sites
|
||||
public const string HOSTED_SHAREPOINT_SITES = "HostedSharePoint.Sites"; // Hosted SharePoint Sites
|
||||
public const string HOSTED_SHAREPOINT_STORAGE_SIZE = "HostedSharePoint.MaxStorage"; // Hosted SharePoint storage size;
|
||||
public const string DNS_EDITOR = "DNS.Editor"; // DNS Editor
|
||||
public const string DNS_ZONES = "DNS.Zones"; // DNS Editor
|
||||
public const string DNS_PRIMARY_ZONES = "DNS.PrimaryZones"; // DNS Editor
|
||||
public const string DNS_SECONDARY_ZONES = "DNS.SecondaryZones"; // DNS Editor
|
||||
public const string STATS_SITES = "Stats.Sites"; // Statistics Sites
|
||||
public const string ORGANIZATIONS = "HostedSolution.Organizations";
|
||||
public const string ORGANIZATION_USERS = "HostedSolution.Users";
|
||||
public const string ORGANIZATION_DOMAINS = "HostedSolution.Domains";
|
||||
public const string CRM_USERS = "HostedCRM.Users";
|
||||
public const string CRM_ORGANIZATION = "HostedCRM.Organization";
|
||||
|
||||
public const string VPS_SERVERS_NUMBER = "VPS.ServersNumber"; // Number of VPS
|
||||
public const string VPS_MANAGING_ALLOWED = "VPS.ManagingAllowed"; // Allow user to create VPS
|
||||
public const string VPS_CPU_NUMBER = "VPS.CpuNumber"; // Number of CPU cores
|
||||
public const string VPS_BOOT_CD_ALLOWED = "VPS.BootCdAllowed"; // Boot from CD allowed
|
||||
public const string VPS_BOOT_CD_ENABLED = "VPS.BootCdEnabled"; // Boot from CD
|
||||
public const string VPS_RAM = "VPS.Ram"; // RAM size, MB
|
||||
public const string VPS_HDD = "VPS.Hdd"; // Hard Drive size, GB
|
||||
public const string VPS_DVD_ENABLED = "VPS.DvdEnabled"; // DVD drive
|
||||
public const string VPS_EXTERNAL_NETWORK_ENABLED = "VPS.ExternalNetworkEnabled"; // External Network
|
||||
public const string VPS_EXTERNAL_IP_ADDRESSES_NUMBER = "VPS.ExternalIPAddressesNumber"; // Number of External IP addresses
|
||||
public const string VPS_PRIVATE_NETWORK_ENABLED = "VPS.PrivateNetworkEnabled"; // Private Network
|
||||
public const string VPS_PRIVATE_IP_ADDRESSES_NUMBER = "VPS.PrivateIPAddressesNumber"; // Number of Private IP addresses per VPS
|
||||
public const string VPS_SNAPSHOTS_NUMBER = "VPS.SnapshotsNumber"; // Number of Snaphots
|
||||
public const string VPS_START_SHUTDOWN_ALLOWED = "VPS.StartShutdownAllowed"; // Allow user to Start, Turn off and Shutdown VPS
|
||||
public const string VPS_PAUSE_RESUME_ALLOWED = "VPS.PauseResumeAllowed"; // Allow user to Pause, Resume VPS
|
||||
public const string VPS_REBOOT_ALLOWED = "VPS.RebootAllowed"; // Allow user to Reboot VPS
|
||||
public const string VPS_RESET_ALOWED = "VPS.ResetAlowed"; // Allow user to Reset VPS
|
||||
public const string VPS_REINSTALL_ALLOWED = "VPS.ReinstallAllowed"; // Allow user to Re-install VPS
|
||||
public const string VPS_BANDWIDTH = "VPS.Bandwidth"; // Monthly bandwidth, GB
|
||||
|
||||
public const string VPSForPC_SERVERS_NUMBER = "VPSForPC.ServersNumber"; // Number of VPS
|
||||
public const string VPSForPC_MANAGING_ALLOWED = "VPSForPC.ManagingAllowed"; // Allow user to create VPS
|
||||
public const string VPSForPC_CPU_NUMBER = "VPSForPC.CpuNumber"; // Number of CPU cores
|
||||
public const string VPSForPC_BOOT_CD_ALLOWED = "VPSForPC.BootCdAllowed"; // Boot from CD allowed
|
||||
public const string VPSForPC_BOOT_CD_ENABLED = "VPSForPC.BootCdEnabled"; // Boot from CD
|
||||
public const string VPSForPC_RAM = "VPSForPC.Ram"; // RAM size, MB
|
||||
public const string VPSForPC_HDD = "VPSForPC.Hdd"; // Hard Drive size, GB
|
||||
public const string VPSForPC_DVD_ENABLED = "VPSForPC.DvdEnabled"; // DVD drive
|
||||
public const string VPSForPC_EXTERNAL_NETWORK_ENABLED = "VPSForPC.ExternalNetworkEnabled"; // External Network
|
||||
public const string VPSForPC_EXTERNAL_IP_ADDRESSES_NUMBER = "VPSForPC.ExternalIPAddressesNumber"; // Number of External IP addresses
|
||||
public const string VPSForPC_PRIVATE_NETWORK_ENABLED = "VPSForPC.PrivateNetworkEnabled"; // Private Network
|
||||
public const string VPSForPC_PRIVATE_IP_ADDRESSES_NUMBER = "VPSForPC.PrivateIPAddressesNumber"; // Number of Private IP addresses per VPS
|
||||
public const string VPSForPC_SNAPSHOTS_NUMBER = "VPSForPC.SnapshotsNumber"; // Number of Snaphots
|
||||
public const string VPSForPC_START_SHUTDOWN_ALLOWED = "VPSForPC.StartShutdownAllowed"; // Allow user to Start, Turn off and Shutdown VPS
|
||||
public const string VPSForPC_PAUSE_RESUME_ALLOWED = "VPSForPC.PauseResumeAllowed"; // Allow user to Pause, Resume VPS
|
||||
public const string VPSForPC_REBOOT_ALLOWED = "VPSForPC.RebootAllowed"; // Allow user to Reboot VPS
|
||||
public const string VPSForPC_RESET_ALOWED = "VPSForPC.ResetAlowed"; // Allow user to Reset VPS
|
||||
public const string VPSForPC_REINSTALL_ALLOWED = "VPSForPC.ReinstallAllowed"; // Allow user to Re-install VPS
|
||||
public const string VPSForPC_BANDWIDTH = "VPSForPC.Bandwidth"; // Monthly bandwidth, GB
|
||||
|
||||
public const string BLACKBERRY_USERS = "BlackBerry.Users";
|
||||
|
||||
public const string OCS_USERS = "OCS.Users";
|
||||
|
||||
public const string OCS_Federation = "OCS.Federation";
|
||||
public const string OCS_FederationByDefault = "OCS.FederationByDefault";
|
||||
|
||||
public const string OCS_PublicIMConnectivity = "OCS.PublicIMConnectivity";
|
||||
public const string OCS_PublicIMConnectivityByDefault = "OCS.PublicIMConnectivityByDefault";
|
||||
|
||||
public const string OCS_ArchiveIMConversation = "OCS.ArchiveIMConversation";
|
||||
public const string OCS_ArchiveIMConversationByDefault = "OCS.ArchiveIMConvervationByDefault";
|
||||
|
||||
public const string OCS_ArchiveFederatedIMConversationByDefault = "OCS.ArchiveFederatedIMConversationByDefault";
|
||||
public const string OCS_ArchiveFederatedIMConversation = "OCS.ArchiveFederatedIMConversation";
|
||||
|
||||
public const string OCS_PresenceAllowed = "OCS.PresenceAllowed";
|
||||
public const string OCS_PresenceAllowedByDefault = "OCS.PresenceAllowedByDefault";
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("WebsitePanel.EnterpriseServer.Base")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyProduct("WebsitePanel.EnterpriseServer.Base")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(true)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("674c7f66-6e55-4cd5-be83-1ac8831539b6")]
|
2784
WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Reports/OverusageReport.Designer.cs
generated
Normal file
2784
WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Reports/OverusageReport.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,437 @@
|
|||
// 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 System.Data;
|
||||
|
||||
namespace WebsitePanel.EnterpriseServer.Base.Reports
|
||||
{
|
||||
public partial class OverusageReport
|
||||
{
|
||||
#region BandwidthOverusageRow Extension Functions
|
||||
public partial class BandwidthOverusageRow
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Creates a <see cref="BandwidthOverusageRow"/> using the <see cref="OverusageReport"/>
|
||||
/// DataSet from a row that contains information about bandwidth usage.
|
||||
/// </summary>
|
||||
/// <param name="report">Instance of <see cref="OverusageReport"/> class.</param>
|
||||
/// <param name="hostingSpaceDataRow">DataRow with bandwidth information.</param>
|
||||
/// <returns><see cref="BandwidthOverusageRow"/>.</returns>
|
||||
/// <exception cref="ArgumentNullException">When <paramref name="report"/> or either <paramref name="hostingSpaceDataRow"/> is <code>null</code>.</exception>
|
||||
public static BandwidthOverusageRow CreateFromHostingSpaceDataRow(OverusageReport report, DataRow hostingSpaceDataRow)
|
||||
{
|
||||
if (report == null)
|
||||
{
|
||||
throw new ArgumentNullException("report");
|
||||
}
|
||||
if (hostingSpaceDataRow == null)
|
||||
{
|
||||
throw new ArgumentNullException("hostingSpaceDataRow");
|
||||
}
|
||||
|
||||
BandwidthOverusageRow row = report.BandwidthOverusage.NewBandwidthOverusageRow();
|
||||
|
||||
row.HostingSpaceId = OverusageReportUtils.GetLongValueOrDefault(hostingSpaceDataRow["PackageID"].ToString(), 0);
|
||||
row.Allocated = OverusageReportUtils.GetLongValueOrDefault(hostingSpaceDataRow["QuotaValue"].ToString(), 0);
|
||||
row.Used = OverusageReportUtils.GetLongValueOrDefault(hostingSpaceDataRow["Bandwidth"].ToString(), 0);
|
||||
row.Usage = (row.Used - row.Allocated);
|
||||
|
||||
return row;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates <see cref="BandwidthOverusageRow"/> using <see cref="PackageInfo"/> as a data source.
|
||||
/// </summary>
|
||||
/// <param name="report">Current <see cref="OverusageReport"/> dataset.</param>
|
||||
/// <param name="packageInfo"><see cref="PackageInfo"/> instance.</param>
|
||||
/// <returns><see cref="BandwidthOverusageRow"/> instance.</returns>
|
||||
/// <exception cref="ArgumentNullException">When <paramref name="report"/> or either <paramref name="packageInfo"/> is <code>null</code>.</exception>
|
||||
public static BandwidthOverusageRow CreateFromPackageInfo(OverusageReport report, PackageInfo packageInfo)
|
||||
{
|
||||
if (report == null)
|
||||
{
|
||||
throw new ArgumentNullException("report");
|
||||
}
|
||||
|
||||
if (packageInfo == null)
|
||||
{
|
||||
throw new ArgumentNullException("packageInfo");
|
||||
}
|
||||
|
||||
BandwidthOverusageRow row = report.BandwidthOverusage.NewBandwidthOverusageRow();
|
||||
|
||||
row.HostingSpaceId = packageInfo.PackageId;
|
||||
row.Allocated = packageInfo.BandWidthQuota;
|
||||
row.Used = packageInfo.BandWidth;
|
||||
row.Usage = (row.Used - row.Allocated);
|
||||
|
||||
return row;
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region OverusageDetailsRow Extension methods
|
||||
public partial class OverusageDetailsRow
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates <see cref="OverusageDetailsRow"/> using the information about Hosting Space disk space.
|
||||
/// </summary>
|
||||
/// <param name="report"><see cref="OverusageReport"/> data set. Current report.</param>
|
||||
/// <param name="packageDiskspaceRow"><see cref="DataRow"/> containing the Hosting Space disk space information.</param>
|
||||
/// <param name="hostingSpaceId">Hosting Space id.</param>
|
||||
/// <param name="overusageType">Type of overusage, can be Diskspace, Bandwidth, etc.</param>
|
||||
/// <returns>An instance of <see cref="OverusageDetailsRow"/>.</returns>
|
||||
/// <exception cref="ArgumentNullException">When <paramref name="report"/>, <paramref name="packageDiskspaceRow"/> or <paramref name="overusageType"/> is null.</exception>
|
||||
/// <exception cref="ArgumentOutOfRangeException">When <paramref name="hostingSpaceId"/> less then 1.</exception>
|
||||
public static OverusageDetailsRow CreateFromPackageDiskspaceRow(OverusageReport report, DataRow packageDiskspaceRow, long hostingSpaceId, string overusageType)
|
||||
{
|
||||
if (report == null)
|
||||
{
|
||||
throw new ArgumentNullException("report");
|
||||
}
|
||||
if (packageDiskspaceRow == null)
|
||||
{
|
||||
throw new ArgumentNullException("packageDiskspaceRow");
|
||||
}
|
||||
if (String.IsNullOrEmpty(overusageType))
|
||||
{
|
||||
throw new ArgumentNullException("overusageType");
|
||||
}
|
||||
|
||||
if (hostingSpaceId < 1)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException(
|
||||
"hostingSpaceId"
|
||||
, String.Format(
|
||||
"Hosting Space Id cannot be less then 1, however it is {0}."
|
||||
, hostingSpaceId
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
OverusageDetailsRow row = report.OverusageDetails.NewOverusageDetailsRow();
|
||||
|
||||
row.HostingSpaceId = hostingSpaceId;
|
||||
row.OverusageType = overusageType;
|
||||
row.ResourceGroupName = OverusageReportUtils.GetStringOrDefault(packageDiskspaceRow, "GroupName", "Files");
|
||||
row.Used = OverusageReportUtils.GetLongValueOrDefault(packageDiskspaceRow["Diskspace"].ToString(), 0);
|
||||
row.Allowed = 0;
|
||||
|
||||
return row;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates <see cref="OverusageDetailsRow"/> using information about Hosting Space bandwidth.
|
||||
/// </summary>
|
||||
/// <param name="report">Current <see cref="OverusageReport"/> instance.</param>
|
||||
/// <param name="bandwidthRow"><see cref="DataRow"/> containing information about Hosting Space bandwidth.</param>
|
||||
/// <param name="hostingSpaceId">Hosting Space Id.</param>
|
||||
/// <param name="overusageType">Type of overusage. Diskspace, Bandwidth, etc.</param>
|
||||
/// <returns><see cref="OverusageDetailsRow"/> filled from <paramref name="bandwidthRow"/>.</returns>
|
||||
/// <exception cref="ArgumentNullException">When <paramref name="report"/>, <paramref name="bandwidthRow"/> or <paramref name="overusageType"/> is null.</exception>
|
||||
/// <exception cref="ArgumentOutOfRangeException">When <paramref name="hostingSpaceId"/> less then 1.</exception>
|
||||
public static OverusageDetailsRow CreateFromBandwidthRow(OverusageReport report, DataRow bandwidthRow, long hostingSpaceId, string overusageType)
|
||||
{
|
||||
if (report == null)
|
||||
{
|
||||
throw new ArgumentNullException("report");
|
||||
}
|
||||
if (bandwidthRow == null)
|
||||
{
|
||||
throw new ArgumentNullException("bandwidthRow");
|
||||
}
|
||||
if (String.IsNullOrEmpty(overusageType))
|
||||
{
|
||||
throw new ArgumentNullException("overusageType");
|
||||
}
|
||||
|
||||
if (hostingSpaceId < 1)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException(
|
||||
"hostingSpaceId"
|
||||
, String.Format(
|
||||
"Hosting Space Id cannot be less then 1, however it is {0}."
|
||||
, hostingSpaceId
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
OverusageDetailsRow row = report.OverusageDetails.NewOverusageDetailsRow();
|
||||
|
||||
row.HostingSpaceId = hostingSpaceId;
|
||||
row.OverusageType = overusageType;
|
||||
row.ResourceGroupName = OverusageReportUtils.GetStringOrDefault(bandwidthRow, "GroupName", "Files");
|
||||
row.Used = OverusageReportUtils.GetLongValueOrDefault(bandwidthRow["MegaBytesSent"].ToString(), 0);
|
||||
row.AdditionalField = OverusageReportUtils.GetLongValueOrDefault(bandwidthRow["MegaBytesReceived"].ToString(), 0);
|
||||
row.Allowed = 0;
|
||||
|
||||
return row;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region HostingSpaceRow Extension functions
|
||||
public partial class HostingSpaceRow
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns a package id
|
||||
/// </summary>
|
||||
/// <param name="hostingSpaceRow"><see cref="DataRow"/> containing information about Hosting Space</param>
|
||||
/// <returns>Hosting space ID.</returns>
|
||||
/// <exception cref="ArgumentOutOfRangeException">When DataRow does not contain PackageID field or this field contains value less then 1.</exception>
|
||||
public static long GetPackageId(DataRow hostingSpaceRow)
|
||||
{
|
||||
long hostingSpaceId = OverusageReportUtils.GetLongValueOrDefault(hostingSpaceRow["PackageID"].ToString(), 0);
|
||||
if (hostingSpaceId < 1)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException(
|
||||
"hostingSpaceId"
|
||||
, String.Format(
|
||||
"PackageID field is either empty or contains incorrect value. Received package ID value: {0}."
|
||||
, hostingSpaceId
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
return hostingSpaceId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates <see cref="HostingSpaceRow"/> using <see cref="PackageInfo"/>.
|
||||
/// </summary>
|
||||
/// <param name="report">Current <see cref="OverusageReport"/>.</param>
|
||||
/// <param name="packageInfo">Information about Hosting Space</param>
|
||||
/// <param name="userInfo">Information about user <paramref name="packageInfo"/> belongs to.</param>
|
||||
/// <param name="serverInfo">Information about server. Physical storage of a hosting space described in <paramref name="packageInfo"/></param>
|
||||
/// <param name="isDiskspaceOverused">Indicates whether disk space is overused.</param>
|
||||
/// <param name="isBandwidthOverused">Indicates whether bandwidht is overused.</param>
|
||||
/// <param name="packageFullTree">File system -like path of the location of a hosting space described in <paramref name="packageInfo"/></param>
|
||||
/// <returns><see cref="HostingSpaceRow"/> instance.</returns>
|
||||
/// <exception cref="ArgumentNullException">When <paramref name="report"/>, <paramref name="packageInfo"/>, <paramref name="userInfo"/> or <paramref name="serverInfo"/> is null.</exception>
|
||||
public static HostingSpaceRow CreateFromPackageInfo(OverusageReport report, PackageInfo packageInfo, UserInfo userInfo, ServerInfo serverInfo,bool isDiskspaceOverused, bool isBandwidthOverused, string packageFullTree)
|
||||
{
|
||||
if (report == null)
|
||||
{
|
||||
throw new ArgumentNullException("report");
|
||||
}
|
||||
if (packageInfo == null)
|
||||
{
|
||||
throw new ArgumentNullException("packageInfo");
|
||||
}
|
||||
if (userInfo == null)
|
||||
{
|
||||
throw new ArgumentNullException("userInfo");
|
||||
}
|
||||
if (serverInfo == null)
|
||||
{
|
||||
throw new ArgumentNullException("serverInfo");
|
||||
}
|
||||
|
||||
|
||||
HostingSpaceRow row = report.HostingSpace.NewHostingSpaceRow();
|
||||
|
||||
row.IsBandwidthOverused = isBandwidthOverused;
|
||||
row.IsDiskspaceOverused = isDiskspaceOverused;
|
||||
|
||||
row.HostingSpaceName = packageInfo.PackageName;
|
||||
row.UserEmail = userInfo.Username;
|
||||
row.UserName = userInfo.Email;
|
||||
row.ChildSpaceQuantity = 1;
|
||||
row.UserId = packageInfo.UserId;
|
||||
row.HostingSpaceId = packageInfo.PackageId;
|
||||
row.Status = packageInfo.StatusId.ToString();
|
||||
row.HostingSpaceFullTreeName = packageFullTree;
|
||||
row.HostingSpaceCreationDate = packageInfo.PurchaseDate;
|
||||
row.Location = serverInfo.ServerName;
|
||||
|
||||
return row;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creating <see cref="HostingSpaceRow"/> from DataRow containing data about Hosting Space
|
||||
/// </summary>
|
||||
/// <param name="report">Current <see cref="OverusageReport"/></param>
|
||||
/// <param name="hostingSpaceRow"><see cref="DataRow"/> containing information about Hosting Space.</param>
|
||||
/// <param name="isDiskspaceOverused">Indicates whether disk space is overused.</param>
|
||||
/// <param name="isBandwidthOverused">Indicates whether bandwidth is overusaed.</param>
|
||||
/// <param name="packageFullTree">File system -like path to hosting space described by <paramref name="hostingSpaceRow"/></param>
|
||||
/// <returns><see cref="HostingSpaceRow"/> instance.</returns>
|
||||
/// <exception cref="ArgumentNullException">When <paramref name="report"/> or <paramref name="hostingSpaceRow"/> is null.</exception>
|
||||
public static HostingSpaceRow CreateFromHostingSpacesRow(OverusageReport report, DataRow hostingSpaceRow, bool isDiskspaceOverused, bool isBandwidthOverused, string packageFullTree)
|
||||
{
|
||||
if (report == null)
|
||||
{
|
||||
throw new ArgumentNullException("report");
|
||||
}
|
||||
if (hostingSpaceRow == null)
|
||||
{
|
||||
throw new ArgumentNullException("hostingSpaceRow");
|
||||
}
|
||||
|
||||
HostingSpaceRow row = report.HostingSpace.NewHostingSpaceRow();
|
||||
|
||||
row.IsBandwidthOverused = isBandwidthOverused;
|
||||
row.IsDiskspaceOverused = isDiskspaceOverused;
|
||||
|
||||
row.HostingSpaceName = OverusageReportUtils.GetStringOrDefault(hostingSpaceRow, "PackageName", String.Empty);
|
||||
row.UserEmail = OverusageReportUtils.GetStringOrDefault(hostingSpaceRow, "Email", String.Empty);
|
||||
row.UserName = OverusageReportUtils.GetStringOrDefault(hostingSpaceRow, "Username", String.Empty);
|
||||
row.UserId = OverusageReportUtils.GetLongValueOrDefault(hostingSpaceRow["UserId"].ToString(), 0);
|
||||
row.HostingSpaceId = OverusageReportUtils.GetLongValueOrDefault(hostingSpaceRow["PackageID"].ToString(), 0);
|
||||
row.ChildSpaceQuantity = (int)OverusageReportUtils.GetLongValueOrDefault(hostingSpaceRow["PackagesNumber"].ToString(), 0);
|
||||
row.Status = hostingSpaceRow["StatusID"].ToString();
|
||||
row.HostingSpaceFullTreeName = packageFullTree;
|
||||
|
||||
return row;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verify whether <paramref name="hostingSpacesRow"/> contains child spaces.
|
||||
/// </summary>
|
||||
/// <param name="hostingSpacesRow"><see cref="DataRow"/> containing information about Hosting Space.</param>
|
||||
/// <returns>True it Hosting space contains child spaces. Otherwise, False.</returns>
|
||||
/// <exception cref="ArgumentNullException">When <paramref name="hostingSpacesRow"/> is null.</exception>
|
||||
public static bool IsContainChildSpaces(DataRow hostingSpacesRow)
|
||||
{
|
||||
if (hostingSpacesRow == null)
|
||||
{
|
||||
throw new ArgumentNullException("hostingSpacesRow");
|
||||
}
|
||||
|
||||
return OverusageReportUtils.GetLongValueOrDefault(hostingSpacesRow["PackagesNumber"].ToString(), 0) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verify is disk space is overused by a Hosting Space.
|
||||
/// </summary>
|
||||
/// <param name="hostingSpacesRow"><see cref="DataRow"/> containing information about Hosting Space.</param>
|
||||
/// <returns>True, if Hosting Space overuses disk space quota. Otherwise, False.</returns>
|
||||
/// <exception cref="ArgumentNullException">When <paramref name="hostingSpacesRow"/> is null.</exception>
|
||||
public static bool VerifyIfDiskspaceOverused(DataRow hostingSpacesRow)
|
||||
{
|
||||
if (hostingSpacesRow == null)
|
||||
{
|
||||
throw new ArgumentNullException("hostingSpacesRow");
|
||||
}
|
||||
|
||||
long
|
||||
allocated = OverusageReportUtils.GetLongValueOrDefault(hostingSpacesRow["QuotaValue"].ToString(), 0),
|
||||
used = OverusageReportUtils.GetLongValueOrDefault(hostingSpacesRow["Diskspace"].ToString(), 0);
|
||||
|
||||
return (used > allocated);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Vefiry if bandwidth is overused by Hosting Space
|
||||
/// </summary>
|
||||
/// <param name="hostingSpacesRow"><see cref="DataRow"/> containing bandwidth information about Hosting Space.</param>
|
||||
/// <returns>True, if bandwidth is overused by a Hosting Space. Otherwise, False.</returns>
|
||||
/// <exception cref="ArgumentNullException">When <paramref name="hostingSpacesRow"/> is null.</exception>
|
||||
public static bool VerifyIfBandwidthOverused(DataRow hostingSpacesRow)
|
||||
{
|
||||
if (hostingSpacesRow == null)
|
||||
{
|
||||
throw new ArgumentNullException("hostingSpacesRow");
|
||||
}
|
||||
|
||||
long
|
||||
allocated = OverusageReportUtils.GetLongValueOrDefault(hostingSpacesRow["QuotaValue"].ToString(), 0),
|
||||
used = OverusageReportUtils.GetLongValueOrDefault(hostingSpacesRow["Bandwidth"].ToString(), 0);
|
||||
|
||||
return (used > allocated);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region DiskspaceOverusageRow extension functions
|
||||
public partial class DiskspaceOverusageRow
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates <see cref="DiskspaceOverusageRow"/> from Hosting Space row.
|
||||
/// </summary>
|
||||
/// <param name="report">Current <paramref name="OverusageReport"/></param>
|
||||
/// <param name="hostingSpaceRow"><see cref="DataRow"/> containing Hosting Space information.</param>
|
||||
/// <returns><see cref="DiskspaceOverusageRow"/> instance.</returns>
|
||||
/// <exception cref="ArgumentNullException">When <paramref name="report"/> or <paramref name="hostingSpaceRow"/> is null.</exception>
|
||||
public static DiskspaceOverusageRow CreateFromHostingSpacesRow(OverusageReport report, DataRow hostingSpaceRow)
|
||||
{
|
||||
if (report == null)
|
||||
{
|
||||
throw new ArgumentNullException("report");
|
||||
}
|
||||
if (hostingSpaceRow == null)
|
||||
{
|
||||
throw new ArgumentNullException("hostingSpaceRow");
|
||||
}
|
||||
|
||||
DiskspaceOverusageRow row = report.DiskspaceOverusage.NewDiskspaceOverusageRow();
|
||||
|
||||
row.HostingSpaceId = OverusageReportUtils.GetLongValueOrDefault(hostingSpaceRow["PackageID"].ToString(), 0);
|
||||
row.Allocated = OverusageReportUtils.GetLongValueOrDefault(hostingSpaceRow["QuotaValue"].ToString(), 0);
|
||||
row.Used = OverusageReportUtils.GetLongValueOrDefault(hostingSpaceRow["Diskspace"].ToString(), 0);
|
||||
row.Usage = (row.Used - row.Allocated);
|
||||
|
||||
return row;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates <see cref="DiskspaceOverusageRow"/> using <see cref="PackageInfo"/> information.
|
||||
/// </summary>
|
||||
/// <param name="report">Current <see cref="OverusageReport"/></param>
|
||||
/// <param name="packageInfo">Hosting Space information.</param>
|
||||
/// <returns><see cref="DiskspaceOverusageRow"/> instance.</returns>
|
||||
/// <exception cref="ArgumentNullException">When <paramref name="report"/> or <paramref name="packageInfo"/> is null.</exception>
|
||||
public static DiskspaceOverusageRow CreateFromPackageInfo(OverusageReport report, PackageInfo packageInfo)
|
||||
{
|
||||
if (report == null)
|
||||
{
|
||||
throw new ArgumentNullException("report");
|
||||
}
|
||||
if (packageInfo == null)
|
||||
{
|
||||
throw new ArgumentNullException("packageInfo");
|
||||
}
|
||||
|
||||
DiskspaceOverusageRow row = report.DiskspaceOverusage.NewDiskspaceOverusageRow();
|
||||
|
||||
row.HostingSpaceId = packageInfo.PackageId;
|
||||
row.Allocated = packageInfo.DiskSpaceQuota;
|
||||
row.Used = packageInfo.DiskSpace;
|
||||
row.Usage = (row.Used - row.Allocated);
|
||||
|
||||
return row;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--<autogenerated>
|
||||
This code was generated by a tool.
|
||||
Changes to this file may cause incorrect behavior and will be lost if
|
||||
the code is regenerated.
|
||||
</autogenerated>-->
|
||||
<DataSetUISetting Version="1.00" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<TableUISettings>
|
||||
</TableUISettings>
|
||||
</DataSetUISetting>
|
|
@ -0,0 +1,99 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema id="OverusageReport" targetNamespace="http://tempuri.org/DataSet1.xsd" xmlns:mstns="http://tempuri.org/DataSet1.xsd" xmlns="http://tempuri.org/DataSet1.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
|
||||
<xs:annotation>
|
||||
<xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<Connections>
|
||||
</Connections>
|
||||
<Tables>
|
||||
</Tables>
|
||||
<Sources>
|
||||
</Sources>
|
||||
</DataSource>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
<xs:element name="OverusageReport" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:Generator_UserDSName="OverusageReport" msprop:Generator_DataSetName="OverusageReport">
|
||||
<xs:complexType>
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="HostingSpace" msprop:Generator_UserTableName="HostingSpace" msprop:Generator_RowDeletedName="HostingSpaceRowDeleted" msprop:Generator_RowChangedName="HostingSpaceRowChanged" msprop:Generator_RowClassName="HostingSpaceRow" msprop:Generator_RowChangingName="HostingSpaceRowChanging" msprop:Generator_RowEvArgName="HostingSpaceRowChangeEvent" msprop:Generator_RowEvHandlerName="HostingSpaceRowChangeEventHandler" msprop:Generator_TableClassName="HostingSpaceDataTable" msprop:Generator_TableVarName="tableHostingSpace" msprop:Generator_RowDeletingName="HostingSpaceRowDeleting" msprop:Generator_TablePropName="HostingSpace">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="HostingSpaceId" msprop:Generator_UserColumnName="HostingSpaceId" msprop:Generator_ColumnPropNameInRow="HostingSpaceId" msprop:Generator_ColumnVarNameInTable="columnHostingSpaceId" msprop:Generator_ColumnPropNameInTable="HostingSpaceIdColumn" type="xs:long" />
|
||||
<xs:element name="HostingSpaceName" msprop:Generator_UserColumnName="HostingSpaceName" msprop:Generator_ColumnPropNameInRow="HostingSpaceName" msprop:Generator_ColumnVarNameInTable="columnHostingSpaceName" msprop:Generator_ColumnPropNameInTable="HostingSpaceNameColumn" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="ChildSpaceQuantity" msprop:Generator_UserColumnName="ChildSpaceQuantity" msprop:Generator_ColumnPropNameInRow="ChildSpaceQuantity" msprop:Generator_ColumnVarNameInTable="columnChildSpaceQuantity" msprop:Generator_ColumnPropNameInTable="ChildSpaceQuantityColumn" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="HostingPlanId" msprop:Generator_UserColumnName="HostingPlanId" msprop:Generator_ColumnPropNameInRow="HostingPlanId" msprop:Generator_ColumnVarNameInTable="columnHostingPlanId" msprop:Generator_ColumnPropNameInTable="HostingPlanIdColumn" type="xs:long" minOccurs="0" />
|
||||
<xs:element name="HostingPlanName" msprop:Generator_UserColumnName="HostingPlanName" msprop:Generator_ColumnPropNameInRow="HostingPlanName" msprop:Generator_ColumnVarNameInTable="columnHostingPlanName" msprop:Generator_ColumnPropNameInTable="HostingPlanNameColumn" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="HostingSpaceFullTreeName" msprop:Generator_UserColumnName="HostingSpaceFullTreeName" msprop:Generator_ColumnPropNameInRow="HostingSpaceFullTreeName" msprop:Generator_ColumnVarNameInTable="columnHostingSpaceFullTreeName" msprop:Generator_ColumnPropNameInTable="HostingSpaceFullTreeNameColumn" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="UserId" msprop:Generator_UserColumnName="UserId" msprop:Generator_ColumnPropNameInRow="UserId" msprop:Generator_ColumnVarNameInTable="columnUserId" msprop:Generator_ColumnPropNameInTable="UserIdColumn" type="xs:long" minOccurs="0" />
|
||||
<xs:element name="UserName" msprop:Generator_UserColumnName="UserName" msprop:Generator_ColumnPropNameInRow="UserName" msprop:Generator_ColumnVarNameInTable="columnUserName" msprop:Generator_ColumnPropNameInTable="UserNameColumn" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="UserEmail" msprop:Generator_UserColumnName="UserEmail" msprop:Generator_ColumnPropNameInRow="UserEmail" msprop:Generator_ColumnVarNameInTable="columnUserEmail" msprop:Generator_ColumnPropNameInTable="UserEmailColumn" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="HostingSpaceCreationDate" msprop:Generator_UserColumnName="HostingSpaceCreationDate" msprop:Generator_ColumnPropNameInRow="HostingSpaceCreationDate" msprop:Generator_ColumnVarNameInTable="columnHostingSpaceCreationDate" msprop:Generator_ColumnPropNameInTable="HostingSpaceCreationDateColumn" type="xs:dateTime" minOccurs="0" />
|
||||
<xs:element name="Status" msprop:Generator_UserColumnName="Status" msprop:Generator_ColumnPropNameInRow="Status" msprop:Generator_ColumnVarNameInTable="columnStatus" msprop:Generator_ColumnPropNameInTable="StatusColumn" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="Location" msprop:Generator_UserColumnName="Location" msprop:Generator_ColumnPropNameInRow="Location" msprop:Generator_ColumnVarNameInTable="columnLocation" msprop:Generator_ColumnPropNameInTable="LocationColumn" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="IsBandwidthOverused" msprop:Generator_UserColumnName="IsBandwidthOverused" msprop:Generator_ColumnPropNameInRow="IsBandwidthOverused" msprop:Generator_ColumnVarNameInTable="columnIsBandwidthOverused" msprop:Generator_ColumnPropNameInTable="IsBandwidthOverusedColumn" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="IsDiskspaceOverused" msprop:Generator_UserColumnName="IsDiskspaceOverused" msprop:Generator_ColumnPropNameInRow="IsDiskspaceOverused" msprop:Generator_ColumnVarNameInTable="columnIsDiskspaceOverused" msprop:Generator_ColumnPropNameInTable="IsDiskspaceOverusedColumn" type="xs:boolean" minOccurs="0" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="BandwidthOverusage" msprop:Generator_UserTableName="BandwidthOverusage" msprop:Generator_RowDeletedName="BandwidthOverusageRowDeleted" msprop:Generator_RowChangedName="BandwidthOverusageRowChanged" msprop:Generator_RowClassName="BandwidthOverusageRow" msprop:Generator_RowChangingName="BandwidthOverusageRowChanging" msprop:Generator_RowEvArgName="BandwidthOverusageRowChangeEvent" msprop:Generator_RowEvHandlerName="BandwidthOverusageRowChangeEventHandler" msprop:Generator_TableClassName="BandwidthOverusageDataTable" msprop:Generator_TableVarName="tableBandwidthOverusage" msprop:Generator_RowDeletingName="BandwidthOverusageRowDeleting" msprop:Generator_TablePropName="BandwidthOverusage">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="HostingSpaceId" msprop:Generator_UserColumnName="HostingSpaceId" msprop:Generator_ColumnPropNameInRow="HostingSpaceId" msprop:Generator_ColumnVarNameInTable="columnHostingSpaceId" msprop:Generator_ColumnPropNameInTable="HostingSpaceIdColumn" type="xs:long" />
|
||||
<xs:element name="Allocated" msprop:Generator_UserColumnName="Allocated" msprop:Generator_ColumnPropNameInRow="Allocated" msprop:Generator_ColumnVarNameInTable="columnAllocated" msprop:Generator_ColumnPropNameInTable="AllocatedColumn" type="xs:long" minOccurs="0" />
|
||||
<xs:element name="Used" msprop:Generator_UserColumnName="Used" msprop:Generator_ColumnPropNameInRow="Used" msprop:Generator_ColumnVarNameInTable="columnUsed" msprop:Generator_ColumnPropNameInTable="UsedColumn" type="xs:long" minOccurs="0" />
|
||||
<xs:element name="Usage" msprop:Generator_UserColumnName="Usage" msprop:Generator_ColumnPropNameInRow="Usage" msprop:Generator_ColumnVarNameInTable="columnUsage" msprop:Generator_ColumnPropNameInTable="UsageColumn" type="xs:long" minOccurs="0" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="DiskspaceOverusage" msprop:Generator_UserTableName="DiskspaceOverusage" msprop:Generator_RowDeletedName="DiskspaceOverusageRowDeleted" msprop:Generator_RowChangedName="DiskspaceOverusageRowChanged" msprop:Generator_RowClassName="DiskspaceOverusageRow" msprop:Generator_RowChangingName="DiskspaceOverusageRowChanging" msprop:Generator_RowEvArgName="DiskspaceOverusageRowChangeEvent" msprop:Generator_RowEvHandlerName="DiskspaceOverusageRowChangeEventHandler" msprop:Generator_TableClassName="DiskspaceOverusageDataTable" msprop:Generator_TableVarName="tableDiskspaceOverusage" msprop:Generator_RowDeletingName="DiskspaceOverusageRowDeleting" msprop:Generator_TablePropName="DiskspaceOverusage">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="HostingSpaceId" msprop:Generator_UserColumnName="HostingSpaceId" msprop:Generator_ColumnPropNameInRow="HostingSpaceId" msprop:Generator_ColumnVarNameInTable="columnHostingSpaceId" msprop:Generator_ColumnPropNameInTable="HostingSpaceIdColumn" type="xs:long" />
|
||||
<xs:element name="Allocated" msprop:Generator_UserColumnName="Allocated" msprop:Generator_ColumnPropNameInRow="Allocated" msprop:Generator_ColumnVarNameInTable="columnAllocated" msprop:Generator_ColumnPropNameInTable="AllocatedColumn" type="xs:long" minOccurs="0" />
|
||||
<xs:element name="Used" msprop:Generator_UserColumnName="Used" msprop:Generator_ColumnPropNameInRow="Used" msprop:Generator_ColumnVarNameInTable="columnUsed" msprop:Generator_ColumnPropNameInTable="UsedColumn" type="xs:long" minOccurs="0" />
|
||||
<xs:element name="Usage" msprop:Generator_UserColumnName="Usage" msprop:Generator_ColumnPropNameInRow="Usage" msprop:Generator_ColumnVarNameInTable="columnUsage" msprop:Generator_ColumnPropNameInTable="UsageColumn" type="xs:long" minOccurs="0" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="OverusageDetails" msprop:Generator_UserTableName="OverusageDetails" msprop:Generator_RowDeletedName="OverusageDetailsRowDeleted" msprop:Generator_RowChangedName="OverusageDetailsRowChanged" msprop:Generator_RowClassName="OverusageDetailsRow" msprop:Generator_RowChangingName="OverusageDetailsRowChanging" msprop:Generator_RowEvArgName="OverusageDetailsRowChangeEvent" msprop:Generator_RowEvHandlerName="OverusageDetailsRowChangeEventHandler" msprop:Generator_TableClassName="OverusageDetailsDataTable" msprop:Generator_TableVarName="tableOverusageDetails" msprop:Generator_RowDeletingName="OverusageDetailsRowDeleting" msprop:Generator_TablePropName="OverusageDetails">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="HostingSpaceId" msprop:Generator_UserColumnName="HostingSpaceId" msprop:Generator_ColumnPropNameInRow="HostingSpaceId" msprop:Generator_ColumnVarNameInTable="columnHostingSpaceId" msprop:Generator_ColumnPropNameInTable="HostingSpaceIdColumn" type="xs:long" />
|
||||
<xs:element name="ResourceGroupName" msprop:Generator_UserColumnName="ResourceGroupName" msprop:Generator_ColumnPropNameInRow="ResourceGroupName" msprop:Generator_ColumnVarNameInTable="columnResourceGroupName" msprop:Generator_ColumnPropNameInTable="ResourceGroupNameColumn" type="xs:string" />
|
||||
<xs:element name="Used" msprop:Generator_UserColumnName="Used" msprop:Generator_ColumnPropNameInRow="Used" msprop:Generator_ColumnVarNameInTable="columnUsed" msprop:Generator_ColumnPropNameInTable="UsedColumn" type="xs:long" minOccurs="0" />
|
||||
<xs:element name="Allowed" msprop:Generator_UserColumnName="Allowed" msprop:Generator_ColumnPropNameInRow="Allowed" msprop:Generator_ColumnVarNameInTable="columnAllowed" msprop:Generator_ColumnPropNameInTable="AllowedColumn" type="xs:long" minOccurs="0" />
|
||||
<xs:element name="OverusageType" msprop:Generator_UserColumnName="OverusageType" msprop:Generator_ColumnPropNameInRow="OverusageType" msprop:Generator_ColumnVarNameInTable="columnOverusageType" msprop:Generator_ColumnPropNameInTable="OverusageTypeColumn" type="xs:string" />
|
||||
<xs:element name="AdditionalField" msprop:Generator_UserColumnName="AdditionalField" msprop:Generator_ColumnPropNameInRow="AdditionalField" msprop:Generator_ColumnVarNameInTable="columnAdditionalField" msprop:Generator_ColumnPropNameInTable="AdditionalFieldColumn" type="xs:long" minOccurs="0" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:choice>
|
||||
</xs:complexType>
|
||||
<xs:unique name="Constraint1" msdata:PrimaryKey="true">
|
||||
<xs:selector xpath=".//mstns:HostingSpace" />
|
||||
<xs:field xpath="mstns:HostingSpaceId" />
|
||||
</xs:unique>
|
||||
<xs:unique name="BandwidthOverusage_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
|
||||
<xs:selector xpath=".//mstns:BandwidthOverusage" />
|
||||
<xs:field xpath="mstns:HostingSpaceId" />
|
||||
</xs:unique>
|
||||
<xs:unique name="DiskspaceOverusage_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
|
||||
<xs:selector xpath=".//mstns:DiskspaceOverusage" />
|
||||
<xs:field xpath="mstns:HostingSpaceId" />
|
||||
</xs:unique>
|
||||
<xs:unique name="OverusageDetails_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
|
||||
<xs:selector xpath=".//mstns:OverusageDetails" />
|
||||
<xs:field xpath="mstns:ResourceGroupName" />
|
||||
<xs:field xpath="mstns:HostingSpaceId" />
|
||||
<xs:field xpath="mstns:OverusageType" />
|
||||
</xs:unique>
|
||||
</xs:element>
|
||||
<xs:annotation>
|
||||
<xs:appinfo>
|
||||
<msdata:Relationship name="HostingSpace_BandwidthOverusage" msdata:parent="HostingSpace" msdata:child="BandwidthOverusage" msdata:parentkey="HostingSpaceId" msdata:childkey="HostingSpaceId" msprop:Generator_UserRelationName="HostingSpace_BandwidthOverusage" msprop:Generator_RelationVarName="relationHostingSpace_BandwidthOverusage" msprop:Generator_UserChildTable="BandwidthOverusage" msprop:Generator_UserParentTable="HostingSpace" msprop:Generator_ParentPropName="HostingSpaceRow" msprop:Generator_ChildPropName="GetBandwidthOverusageRows" />
|
||||
<msdata:Relationship name="HostingSpace_DiskspaceOverusage" msdata:parent="HostingSpace" msdata:child="DiskspaceOverusage" msdata:parentkey="HostingSpaceId" msdata:childkey="HostingSpaceId" msprop:Generator_UserRelationName="HostingSpace_DiskspaceOverusage" msprop:Generator_RelationVarName="relationHostingSpace_DiskspaceOverusage" msprop:Generator_UserChildTable="DiskspaceOverusage" msprop:Generator_UserParentTable="HostingSpace" msprop:Generator_ParentPropName="HostingSpaceRow" msprop:Generator_ChildPropName="GetDiskspaceOverusageRows" />
|
||||
<msdata:Relationship name="BandwidthOverusage_OverusageDetails" msdata:parent="BandwidthOverusage" msdata:child="OverusageDetails" msdata:parentkey="HostingSpaceId" msdata:childkey="HostingSpaceId" msprop:Generator_UserRelationName="BandwidthOverusage_OverusageDetails" msprop:Generator_RelationVarName="relationBandwidthOverusage_OverusageDetails" msprop:Generator_UserChildTable="OverusageDetails" msprop:Generator_UserParentTable="BandwidthOverusage" msprop:Generator_ParentPropName="BandwidthOverusageRow" msprop:Generator_ChildPropName="GetOverusageDetailsRows" />
|
||||
<msdata:Relationship name="DiskspaceOverusage_OverusageDetails" msdata:parent="DiskspaceOverusage" msdata:child="OverusageDetails" msdata:parentkey="HostingSpaceId" msdata:childkey="HostingSpaceId" msprop:Generator_UserRelationName="DiskspaceOverusage_OverusageDetails" msprop:Generator_RelationVarName="relationDiskspaceOverusage_OverusageDetails" msprop:Generator_UserChildTable="OverusageDetails" msprop:Generator_UserParentTable="DiskspaceOverusage" msprop:Generator_ParentPropName="DiskspaceOverusageRow" msprop:Generator_ChildPropName="GetOverusageDetailsRows" />
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:schema>
|
|
@ -0,0 +1,68 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--<autogenerated>
|
||||
This code was generated by a tool to store the dataset designer's layout information.
|
||||
Changes to this file may cause incorrect behavior and will be lost if
|
||||
the code is regenerated.
|
||||
</autogenerated>-->
|
||||
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="-22" ViewPortY="0" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
|
||||
<Shapes>
|
||||
<Shape ID="DesignTable:HostingSpace" ZOrder="8" X="463" Y="30" Height="315" Width="175" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="311" />
|
||||
<Shape ID="DesignTable:BandwidthOverusage" ZOrder="7" X="243" Y="40" Height="105" Width="190" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="101" />
|
||||
<Shape ID="DesignTable:DiskspaceOverusage" ZOrder="6" X="227" Y="216" Height="106" Width="184" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
|
||||
<Shape ID="DesignTable:OverusageDetails" ZOrder="1" X="2" Y="114" Height="143" Width="167" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="139" />
|
||||
</Shapes>
|
||||
<Connectors>
|
||||
<Connector ID="DesignRelation:HostingSpace_BandwidthOverusage" ZOrder="5" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>463</X>
|
||||
<Y>92</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>433</X>
|
||||
<Y>92</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:HostingSpace_DiskspaceOverusage" ZOrder="4" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>463</X>
|
||||
<Y>269</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>411</X>
|
||||
<Y>269</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:BandwidthOverusage_OverusageDetails" ZOrder="3" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>260</X>
|
||||
<Y>145</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>260</X>
|
||||
<Y>185</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>169</X>
|
||||
<Y>185</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:DiskspaceOverusage_OverusageDetails" ZOrder="2" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>227</X>
|
||||
<Y>227</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>169</X>
|
||||
<Y>227</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
</Connectors>
|
||||
</DiagramLayout>
|
|
@ -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;
|
||||
using System.Data;
|
||||
|
||||
namespace WebsitePanel.EnterpriseServer.Base.Reports
|
||||
{
|
||||
public static class OverusageReportUtils
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns a long value from <paramref name="value"/>.
|
||||
/// </summary>
|
||||
/// <param name="value">String representing a number.</param>
|
||||
/// <param name="detaultValue">Default value.</param>
|
||||
/// <returns>Long value.</returns>
|
||||
public static long GetLongValueOrDefault(string value, long detaultValue)
|
||||
{
|
||||
long result = 0;
|
||||
|
||||
if (!long.TryParse(value, out result))
|
||||
{
|
||||
result = detaultValue;
|
||||
}
|
||||
|
||||
if (result == -1)
|
||||
{
|
||||
result = long.MaxValue;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return string value specified by <paramref name="column"/> or <paramref name="defaultValue"/> in case there is no such column in <see cref="DataRow"/>.
|
||||
/// </summary>
|
||||
/// <param name="dr"><see cref="DataRow"/> containing data.</param>
|
||||
/// <param name="column">Columns name to take data from.</param>
|
||||
/// <param name="defaultValue">Default value in case if there is no such <paramref name="column"/></param>
|
||||
/// <returns>String value.</returns>
|
||||
public static string GetStringOrDefault(DataRow dr, string column, string defaultValue)
|
||||
{
|
||||
string result = defaultValue;
|
||||
|
||||
if (dr.Table.Columns.Contains(column))
|
||||
{
|
||||
result = dr[column].ToString();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,186 @@
|
|||
// 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 System.Xml.Serialization;
|
||||
|
||||
namespace WebsitePanel.EnterpriseServer
|
||||
{
|
||||
public class ScheduleInfo
|
||||
{
|
||||
private int scheduleId;
|
||||
private string taskId;
|
||||
private int packageId;
|
||||
private string scheduleName;
|
||||
private string scheduleTypeId;
|
||||
private int interval;
|
||||
private DateTime fromTime;
|
||||
private DateTime toTime;
|
||||
private DateTime startTime;
|
||||
private DateTime lastRun;
|
||||
private DateTime nextRun;
|
||||
private bool enabled;
|
||||
private string statusId;
|
||||
private ScheduleTaskParameterInfo[] parameters;
|
||||
private string priorityId;
|
||||
private int historiesNumber;
|
||||
private int maxExecutionTime;
|
||||
private int weekMonthDay;
|
||||
|
||||
public int ScheduleId
|
||||
{
|
||||
get { return this.scheduleId; }
|
||||
set { this.scheduleId = value; }
|
||||
}
|
||||
|
||||
public string TaskId
|
||||
{
|
||||
get { return this.taskId; }
|
||||
set { this.taskId = value; }
|
||||
}
|
||||
|
||||
public int PackageId
|
||||
{
|
||||
get { return this.packageId; }
|
||||
set { this.packageId = value; }
|
||||
}
|
||||
|
||||
public string ScheduleTypeId
|
||||
{
|
||||
get { return this.scheduleTypeId; }
|
||||
set { this.scheduleTypeId = value; }
|
||||
}
|
||||
|
||||
public string ScheduleName
|
||||
{
|
||||
get { return this.scheduleName; }
|
||||
set { this.scheduleName = value; }
|
||||
}
|
||||
|
||||
[XmlIgnore]
|
||||
public ScheduleType ScheduleType
|
||||
{
|
||||
get { return (ScheduleType)Enum.Parse(typeof(ScheduleType), scheduleTypeId, true); }
|
||||
set { scheduleTypeId = value.ToString(); }
|
||||
}
|
||||
|
||||
public int Interval
|
||||
{
|
||||
get { return this.interval; }
|
||||
set { this.interval = value; }
|
||||
}
|
||||
|
||||
public System.DateTime FromTime
|
||||
{
|
||||
get { return this.fromTime; }
|
||||
set { this.fromTime = value; }
|
||||
}
|
||||
|
||||
public System.DateTime ToTime
|
||||
{
|
||||
get { return this.toTime; }
|
||||
set { this.toTime = value; }
|
||||
}
|
||||
|
||||
public System.DateTime StartTime
|
||||
{
|
||||
get { return this.startTime; }
|
||||
set { this.startTime = value; }
|
||||
}
|
||||
|
||||
public System.DateTime LastRun
|
||||
{
|
||||
get { return this.lastRun; }
|
||||
set { this.lastRun = value; }
|
||||
}
|
||||
|
||||
public System.DateTime NextRun
|
||||
{
|
||||
get { return this.nextRun; }
|
||||
set { this.nextRun = value; }
|
||||
}
|
||||
|
||||
public bool Enabled
|
||||
{
|
||||
get { return this.enabled; }
|
||||
set { this.enabled = value; }
|
||||
}
|
||||
|
||||
public string StatusId
|
||||
{
|
||||
get { return this.statusId; }
|
||||
set { this.statusId = value; }
|
||||
}
|
||||
|
||||
[XmlIgnore]
|
||||
public ScheduleStatus Status
|
||||
{
|
||||
get { return (ScheduleStatus)Enum.Parse(typeof(ScheduleStatus), statusId, true); }
|
||||
set { statusId = value.ToString(); }
|
||||
}
|
||||
|
||||
public ScheduleTaskParameterInfo[] Parameters
|
||||
{
|
||||
get { return this.parameters; }
|
||||
set { this.parameters = value; }
|
||||
}
|
||||
|
||||
public int WeekMonthDay
|
||||
{
|
||||
get { return this.weekMonthDay; }
|
||||
set { this.weekMonthDay = value; }
|
||||
}
|
||||
|
||||
public string PriorityId
|
||||
{
|
||||
get { return this.priorityId; }
|
||||
set { this.priorityId = value; }
|
||||
}
|
||||
|
||||
[XmlIgnore]
|
||||
public SchedulePriority Priority
|
||||
{
|
||||
get { return (SchedulePriority)Enum.Parse(typeof(SchedulePriority), priorityId, true); }
|
||||
set { priorityId = value.ToString(); }
|
||||
}
|
||||
|
||||
public int HistoriesNumber
|
||||
{
|
||||
get { return this.historiesNumber; }
|
||||
set { this.historiesNumber = value; }
|
||||
}
|
||||
|
||||
public int MaxExecutionTime
|
||||
{
|
||||
get { return this.maxExecutionTime; }
|
||||
set { this.maxExecutionTime = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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.EnterpriseServer
|
||||
{
|
||||
public enum SchedulePriority
|
||||
{
|
||||
Highest = 1,
|
||||
AboveNormal = 2,
|
||||
Normal = 3,
|
||||
BelowNormal = 4,
|
||||
Lowest = 5
|
||||
}
|
||||
}
|
|
@ -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.EnterpriseServer
|
||||
{
|
||||
public enum ScheduleStatus
|
||||
{
|
||||
Idle = 1,
|
||||
Running = 2
|
||||
}
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
// 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.EnterpriseServer
|
||||
{
|
||||
public class ScheduleTaskInfo
|
||||
{
|
||||
private string taskId;
|
||||
private string taskType;
|
||||
private int roleId;
|
||||
|
||||
public string TaskId
|
||||
{
|
||||
get { return this.taskId; }
|
||||
set { this.taskId = value; }
|
||||
}
|
||||
|
||||
public string TaskType
|
||||
{
|
||||
get { return this.taskType; }
|
||||
set { this.taskType = value; }
|
||||
}
|
||||
|
||||
public int RoleId
|
||||
{
|
||||
get { return this.roleId; }
|
||||
set { this.roleId = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
// 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 System.Xml.Serialization;
|
||||
|
||||
namespace WebsitePanel.EnterpriseServer
|
||||
{
|
||||
public class ScheduleTaskParameterInfo
|
||||
{
|
||||
private string taskId;
|
||||
private string parameterId;
|
||||
private string dataTypeId;
|
||||
private string defaultValue;
|
||||
private string parameterValue;
|
||||
|
||||
public string TaskId
|
||||
{
|
||||
get { return this.taskId; }
|
||||
set { this.taskId = value; }
|
||||
}
|
||||
|
||||
public string ParameterId
|
||||
{
|
||||
get { return this.parameterId; }
|
||||
set { this.parameterId = value; }
|
||||
}
|
||||
|
||||
public string DataTypeId
|
||||
{
|
||||
get { return this.dataTypeId; }
|
||||
set { this.dataTypeId = value; }
|
||||
}
|
||||
|
||||
[XmlIgnore]
|
||||
public ScheduleTaskParameterType DataType
|
||||
{
|
||||
get { return (ScheduleTaskParameterType)Enum.Parse(typeof(ScheduleTaskParameterType), dataTypeId, true); }
|
||||
set { dataTypeId = value.ToString(); }
|
||||
}
|
||||
|
||||
public string DefaultValue
|
||||
{
|
||||
get { return this.defaultValue; }
|
||||
set { this.defaultValue = value; }
|
||||
}
|
||||
|
||||
public string ParameterValue
|
||||
{
|
||||
get { return this.parameterValue; }
|
||||
set { this.parameterValue = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
// 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.EnterpriseServer
|
||||
{
|
||||
public enum ScheduleTaskParameterType
|
||||
{
|
||||
String,
|
||||
Integer,
|
||||
Boolean,
|
||||
DateTime
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace WebsitePanel.EnterpriseServer
|
||||
{
|
||||
// enumeration for schedule types
|
||||
public enum ScheduleType
|
||||
{
|
||||
OneTime,
|
||||
Interval,
|
||||
Daily,
|
||||
Weekly,
|
||||
Monthly
|
||||
};
|
||||
}
|
|
@ -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.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace WebsitePanel.EnterpriseServer.Base.Scheduling
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents view configuration for a certain hosting environment.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class ScheduleTaskViewConfiguration
|
||||
{
|
||||
private string environment;
|
||||
private string description;
|
||||
private string taskId;
|
||||
private string configurationId;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ScheduleTaskViewConfiguration"/> class.
|
||||
/// </summary>
|
||||
public ScheduleTaskViewConfiguration()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ScheduleTaskViewConfiguration"/> class.
|
||||
/// </summary>
|
||||
/// <param name="environment">Hosting environment for the view.</param>
|
||||
/// <param name="description">Configuration details for the view.</param>
|
||||
public ScheduleTaskViewConfiguration(string environment, string description)
|
||||
{
|
||||
this.environment = environment;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets owner task id.
|
||||
/// </summary>
|
||||
public string TaskId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.taskId;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.taskId = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets configuration's id.
|
||||
/// </summary>
|
||||
public string ConfigurationId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.configurationId;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.configurationId = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets hosting environment for the view.
|
||||
/// </summary>
|
||||
public string Environment
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.environment;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.environment = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets configuration details for the view.
|
||||
/// </summary>
|
||||
public string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.description;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.description = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace WebsitePanel.EnterpriseServer
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for SchedulerException.
|
||||
/// </summary>
|
||||
public class SchedulerException : Exception
|
||||
{
|
||||
public SchedulerException(string msg)
|
||||
: base(msg)
|
||||
{
|
||||
}
|
||||
|
||||
public SchedulerException(string msg, Exception innerException)
|
||||
: base(msg, innerException)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
using System.IO;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace WebsitePanel.EnterpriseServer
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents base class for task objects intended for scheduling.
|
||||
/// </summary>
|
||||
public abstract class SchedulerTask
|
||||
{
|
||||
/// <summary>
|
||||
/// When overridden performs actual action.
|
||||
/// </summary>
|
||||
public abstract void DoWork();
|
||||
}
|
||||
}
|
|
@ -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.EnterpriseServer
|
||||
{
|
||||
public class ThreadStartParameters
|
||||
{
|
||||
private int userId;
|
||||
private object[] parameters;
|
||||
|
||||
public int UserId
|
||||
{
|
||||
get { return this.userId; }
|
||||
set { this.userId = value; }
|
||||
}
|
||||
|
||||
public object[] Parameters
|
||||
{
|
||||
get { return this.parameters; }
|
||||
set { this.parameters = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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.EnterpriseServer
|
||||
{
|
||||
[Flags]
|
||||
public enum DemandAccount
|
||||
{
|
||||
NotDemo = 0x1,
|
||||
IsActive = 0x2,
|
||||
IsAdmin = 0x4,
|
||||
IsReseller = 0x8
|
||||
}
|
||||
}
|
|
@ -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.EnterpriseServer
|
||||
{
|
||||
[Flags]
|
||||
public enum DemandPackage
|
||||
{
|
||||
IsActive = 0x1
|
||||
}
|
||||
}
|
|
@ -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.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace WebsitePanel.EnterpriseServer
|
||||
{
|
||||
[Serializable]
|
||||
public class ClusterInfo
|
||||
{
|
||||
private int clusterId;
|
||||
|
||||
public int ClusterId
|
||||
{
|
||||
get { return clusterId; }
|
||||
set { clusterId = value; }
|
||||
}
|
||||
private string clusterName;
|
||||
|
||||
public string ClusterName
|
||||
{
|
||||
get { return clusterName; }
|
||||
set { clusterName = value; }
|
||||
}
|
||||
|
||||
public ClusterInfo()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,143 @@
|
|||
// 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.EnterpriseServer
|
||||
{
|
||||
[Serializable]
|
||||
public class DomainInfo
|
||||
{
|
||||
private int domainId;
|
||||
private int packageId;
|
||||
private int zoneItemId;
|
||||
private string domainName;
|
||||
private bool hostingAllowed;
|
||||
private int webSiteId;
|
||||
private int mailDomainId;
|
||||
private string webSiteName;
|
||||
private string mailDomainName;
|
||||
private string zoneName;
|
||||
private bool isSubDomain;
|
||||
private bool isInstantAlias;
|
||||
private bool isDomainPointer;
|
||||
private int instantAliasId;
|
||||
private string instantAliasName;
|
||||
|
||||
|
||||
public int DomainId
|
||||
{
|
||||
get { return domainId; }
|
||||
set { domainId = value; }
|
||||
}
|
||||
|
||||
public int PackageId
|
||||
{
|
||||
get { return packageId; }
|
||||
set { packageId = value; }
|
||||
}
|
||||
|
||||
public int ZoneItemId
|
||||
{
|
||||
get { return zoneItemId; }
|
||||
set { zoneItemId = value; }
|
||||
}
|
||||
|
||||
public string DomainName
|
||||
{
|
||||
get { return domainName; }
|
||||
set { domainName = value; }
|
||||
}
|
||||
|
||||
public bool HostingAllowed
|
||||
{
|
||||
get { return hostingAllowed; }
|
||||
set { hostingAllowed = value; }
|
||||
}
|
||||
|
||||
public int WebSiteId
|
||||
{
|
||||
get { return webSiteId; }
|
||||
set { webSiteId = value; }
|
||||
}
|
||||
|
||||
public int MailDomainId
|
||||
{
|
||||
get { return mailDomainId; }
|
||||
set { mailDomainId = value; }
|
||||
}
|
||||
|
||||
public string WebSiteName
|
||||
{
|
||||
get { return this.webSiteName; }
|
||||
set { this.webSiteName = value; }
|
||||
}
|
||||
|
||||
public string MailDomainName
|
||||
{
|
||||
get { return this.mailDomainName; }
|
||||
set { this.mailDomainName = value; }
|
||||
}
|
||||
|
||||
public string ZoneName
|
||||
{
|
||||
get { return this.zoneName; }
|
||||
set { this.zoneName = value; }
|
||||
}
|
||||
|
||||
public bool IsSubDomain
|
||||
{
|
||||
get { return this.isSubDomain; }
|
||||
set { this.isSubDomain = value; }
|
||||
}
|
||||
|
||||
public bool IsInstantAlias
|
||||
{
|
||||
get { return this.isInstantAlias; }
|
||||
set { this.isInstantAlias = value; }
|
||||
}
|
||||
|
||||
public bool IsDomainPointer
|
||||
{
|
||||
get { return this.isDomainPointer; }
|
||||
set { this.isDomainPointer = value; }
|
||||
}
|
||||
|
||||
public int InstantAliasId
|
||||
{
|
||||
get { return this.instantAliasId; }
|
||||
set { this.instantAliasId = value; }
|
||||
}
|
||||
|
||||
public string InstantAliasName
|
||||
{
|
||||
get { return this.instantAliasName; }
|
||||
set { this.instantAliasName = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
// 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.EnterpriseServer
|
||||
{
|
||||
public enum DomainType
|
||||
{
|
||||
Domain,
|
||||
SubDomain,
|
||||
ProviderSubDomain,
|
||||
DomainPointer
|
||||
}
|
||||
}
|
|
@ -0,0 +1,137 @@
|
|||
// 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.EnterpriseServer
|
||||
{
|
||||
[Serializable]
|
||||
public class GlobalDnsRecord
|
||||
{
|
||||
private int recordId;
|
||||
|
||||
public int RecordId
|
||||
{
|
||||
get { return recordId; }
|
||||
set { recordId = value; }
|
||||
}
|
||||
|
||||
private int recordOrder;
|
||||
|
||||
public int RecordOrder
|
||||
{
|
||||
get { return recordOrder; }
|
||||
set { recordOrder = value; }
|
||||
}
|
||||
private int groupId;
|
||||
|
||||
public int GroupId
|
||||
{
|
||||
get { return groupId; }
|
||||
set { groupId = value; }
|
||||
}
|
||||
private int serviceId;
|
||||
|
||||
public int ServiceId
|
||||
{
|
||||
get { return serviceId; }
|
||||
set { serviceId = value; }
|
||||
}
|
||||
private int serverId;
|
||||
|
||||
public int ServerId
|
||||
{
|
||||
get { return serverId; }
|
||||
set { serverId = value; }
|
||||
}
|
||||
private int packageId;
|
||||
|
||||
public int PackageId
|
||||
{
|
||||
get { return packageId; }
|
||||
set { packageId = value; }
|
||||
}
|
||||
private string recordType;
|
||||
|
||||
public string RecordType
|
||||
{
|
||||
get { return recordType; }
|
||||
set { recordType = value; }
|
||||
}
|
||||
private string recordName;
|
||||
|
||||
public string RecordName
|
||||
{
|
||||
get { return recordName; }
|
||||
set { recordName = value; }
|
||||
}
|
||||
private string recordData;
|
||||
|
||||
public string RecordData
|
||||
{
|
||||
get { return recordData; }
|
||||
set { recordData = value; }
|
||||
}
|
||||
private int mxPriority;
|
||||
|
||||
public int MxPriority
|
||||
{
|
||||
get { return mxPriority; }
|
||||
set { mxPriority = value; }
|
||||
}
|
||||
|
||||
private int ipAddressId;
|
||||
|
||||
public int IpAddressId
|
||||
{
|
||||
get { return ipAddressId; }
|
||||
set { ipAddressId = value; }
|
||||
}
|
||||
|
||||
private string internalIP;
|
||||
private string externalIP;
|
||||
|
||||
public GlobalDnsRecord()
|
||||
{
|
||||
}
|
||||
|
||||
public string InternalIP
|
||||
{
|
||||
get { return this.internalIP; }
|
||||
set { this.internalIP = value; }
|
||||
}
|
||||
|
||||
public string ExternalIP
|
||||
{
|
||||
get { return this.externalIP; }
|
||||
set { this.externalIP = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
using System.Net;
|
||||
|
||||
namespace WebsitePanel.EnterpriseServer
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for IpAddressInfo.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class IPAddressInfo
|
||||
{
|
||||
public int AddressId { get; set; }
|
||||
public string ExternalIP { get; set; }
|
||||
public string InternalIP { get; set; }
|
||||
public int PoolId { get; set; }
|
||||
|
||||
public int ServerId { get; set; }
|
||||
public string ServerName { get; set; }
|
||||
|
||||
public int ItemId { get; set; }
|
||||
public string ItemName { get; set; }
|
||||
|
||||
public int UserId { get; set; }
|
||||
public string Username { get; set; }
|
||||
|
||||
public int PackageId { get; set; }
|
||||
public string PackageName { get; set; }
|
||||
|
||||
public string SubnetMask { get; set; }
|
||||
public string DefaultGateway { get; set; }
|
||||
public string Comments { get; set; }
|
||||
|
||||
public IPAddressPool Pool
|
||||
{
|
||||
get { return (IPAddressPool)PoolId; }
|
||||
set { PoolId = (int)value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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.EnterpriseServer
|
||||
{
|
||||
public enum IPAddressPool
|
||||
{
|
||||
None = 0,
|
||||
General = 1,
|
||||
WebSites = 2,
|
||||
VpsExternalNetwork = 3,
|
||||
VpsManagementNetwork = 4
|
||||
}
|
||||
}
|
|
@ -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.EnterpriseServer
|
||||
{
|
||||
public class IPAddressesPaged
|
||||
{
|
||||
public IPAddressInfo[] Items { get; set; }
|
||||
public int Count { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,97 @@
|
|||
// 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.EnterpriseServer
|
||||
{
|
||||
[Serializable]
|
||||
public class ProviderInfo
|
||||
{
|
||||
private int providerId;
|
||||
private int groupId;
|
||||
private string providerName;
|
||||
private string editorControl;
|
||||
private string displayName;
|
||||
private string providerType;
|
||||
private bool installed;
|
||||
|
||||
|
||||
public ProviderInfo()
|
||||
{
|
||||
}
|
||||
|
||||
public string DisplayName
|
||||
{
|
||||
get { return this.displayName; }
|
||||
set { this.displayName = value; }
|
||||
}
|
||||
|
||||
public int ProviderId
|
||||
{
|
||||
get { return this.providerId; }
|
||||
set { this.providerId = value; }
|
||||
}
|
||||
|
||||
public int GroupId
|
||||
{
|
||||
get { return this.groupId; }
|
||||
set { this.groupId = value; }
|
||||
}
|
||||
|
||||
public string ProviderName
|
||||
{
|
||||
get { return this.providerName; }
|
||||
set { this.providerName = value; }
|
||||
}
|
||||
|
||||
public string EditorControl
|
||||
{
|
||||
get { return this.editorControl; }
|
||||
set { this.editorControl = value; }
|
||||
}
|
||||
|
||||
public string ProviderType
|
||||
{
|
||||
get { return this.providerType; }
|
||||
set { this.providerType = value; }
|
||||
}
|
||||
|
||||
public bool Installed
|
||||
{
|
||||
get { return this.installed; }
|
||||
set { this.installed = value; }
|
||||
}
|
||||
|
||||
public bool DisableAutoDiscovery
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
|
||||
namespace WebsitePanel.EnterpriseServer
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for ResourceGroup.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class ResourceGroupInfo
|
||||
{
|
||||
private int groupId;
|
||||
private string groupName;
|
||||
private int groupOrder;
|
||||
private string groupController;
|
||||
|
||||
public ResourceGroupInfo()
|
||||
{
|
||||
}
|
||||
|
||||
public int GroupOrder
|
||||
{
|
||||
get { return this.groupOrder; }
|
||||
set { this.groupOrder = value; }
|
||||
}
|
||||
|
||||
public string GroupName
|
||||
{
|
||||
get { return this.groupName; }
|
||||
set { this.groupName = value; }
|
||||
}
|
||||
|
||||
public int GroupId
|
||||
{
|
||||
get { return this.groupId; }
|
||||
set { this.groupId = value; }
|
||||
}
|
||||
|
||||
public string GroupController
|
||||
{
|
||||
get { return this.groupController; }
|
||||
set { this.groupController = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
// 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.EnterpriseServer
|
||||
{
|
||||
public class ResourceGroups
|
||||
{
|
||||
public const string Os = "OS";
|
||||
public const string Web = "Web";
|
||||
public const string Ftp = "FTP";
|
||||
public const string Mail = "Mail";
|
||||
public const string MsSql2000 = "MsSQL2000";
|
||||
public const string MySql4 = "MySQL4";
|
||||
public const string MsSql2005 = "MsSQL2005";
|
||||
public const string MsSql2008 = "MsSQL2008";
|
||||
public const string MySql5 = "MySQL5";
|
||||
public const string Dns = "DNS";
|
||||
public const string Statistics = "Statistics";
|
||||
public const string SharePoint = "SharePoint";
|
||||
public const string HostedSharePoint = "Hosted SharePoint";
|
||||
public const string Exchange = "Exchange";
|
||||
public const string ExchangeHostedEdition = "ExchangeHostedEdition";
|
||||
public const string HostedOrganizations = "Hosted Organizations";
|
||||
public const string HostedCRM = "Hosted CRM";
|
||||
public const string VPS = "VPS";
|
||||
public const string BlackBerry = "BlackBerry";
|
||||
public const string OCS = "OCS";
|
||||
public const string VPSForPC = "VPSForPC";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,135 @@
|
|||
// 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.EnterpriseServer
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for ServerInfo.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class ServerInfo
|
||||
{
|
||||
private int serverId;
|
||||
private string serverName;
|
||||
private string serverUrl;
|
||||
private String password;
|
||||
private string comments;
|
||||
private bool virtualServer;
|
||||
private string instantDomainAlias;
|
||||
private bool adEnabled;
|
||||
private string adRootDomain;
|
||||
private string adAuthenticationType;
|
||||
private string adUsername;
|
||||
private string adPassword;
|
||||
private int primaryGroupId;
|
||||
|
||||
public ServerInfo()
|
||||
{
|
||||
}
|
||||
|
||||
public int PrimaryGroupId
|
||||
{
|
||||
get { return primaryGroupId; }
|
||||
set { primaryGroupId = value; }
|
||||
}
|
||||
|
||||
public string ADRootDomain
|
||||
{
|
||||
get { return adRootDomain; }
|
||||
set { adRootDomain = value; }
|
||||
}
|
||||
|
||||
public string ADAuthenticationType
|
||||
{
|
||||
get { return this.adAuthenticationType; }
|
||||
set { this.adAuthenticationType = value; }
|
||||
}
|
||||
|
||||
public string ADUsername
|
||||
{
|
||||
get { return adUsername; }
|
||||
set { adUsername = value; }
|
||||
}
|
||||
|
||||
public string ADPassword
|
||||
{
|
||||
get { return adPassword; }
|
||||
set { adPassword = value; }
|
||||
}
|
||||
|
||||
public int ServerId
|
||||
{
|
||||
get { return serverId; }
|
||||
set { serverId = value; }
|
||||
}
|
||||
|
||||
public string ServerName
|
||||
{
|
||||
get { return serverName; }
|
||||
set { serverName = value; }
|
||||
}
|
||||
|
||||
public string ServerUrl
|
||||
{
|
||||
get { return serverUrl; }
|
||||
set { serverUrl = value; }
|
||||
}
|
||||
|
||||
public string Comments
|
||||
{
|
||||
get { return comments; }
|
||||
set { comments = value; }
|
||||
}
|
||||
|
||||
public String Password
|
||||
{
|
||||
get{ return password; }
|
||||
set{ password = value; }
|
||||
}
|
||||
|
||||
public bool VirtualServer
|
||||
{
|
||||
get { return virtualServer; }
|
||||
set { virtualServer = value; }
|
||||
}
|
||||
|
||||
public string InstantDomainAlias
|
||||
{
|
||||
get { return instantDomainAlias; }
|
||||
set { instantDomainAlias = value; }
|
||||
}
|
||||
|
||||
public bool ADEnabled
|
||||
{
|
||||
get { return this.adEnabled; }
|
||||
set { this.adEnabled = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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.EnterpriseServer
|
||||
{
|
||||
[Serializable]
|
||||
public class ServiceInfo
|
||||
{
|
||||
private int serviceId;
|
||||
private int serverId;
|
||||
private int providerId;
|
||||
private string serviceName;
|
||||
private string comments;
|
||||
private int serviceQuotaValue;
|
||||
private int clusterId;
|
||||
|
||||
public ServiceInfo()
|
||||
{
|
||||
}
|
||||
|
||||
public int ServiceId
|
||||
{
|
||||
get { return serviceId; }
|
||||
set { serviceId = value; }
|
||||
}
|
||||
|
||||
public int ServerId
|
||||
{
|
||||
get { return serverId; }
|
||||
set { serverId = value; }
|
||||
}
|
||||
|
||||
public int ProviderId
|
||||
{
|
||||
get { return providerId; }
|
||||
set { providerId = value; }
|
||||
}
|
||||
|
||||
public string ServiceName
|
||||
{
|
||||
get { return serviceName; }
|
||||
set { serviceName = value; }
|
||||
}
|
||||
|
||||
public string Comments
|
||||
{
|
||||
get { return comments; }
|
||||
set { comments = value; }
|
||||
}
|
||||
|
||||
public int ServiceQuotaValue
|
||||
{
|
||||
get { return serviceQuotaValue; }
|
||||
set { serviceQuotaValue = value; }
|
||||
}
|
||||
|
||||
public int ClusterId
|
||||
{
|
||||
get { return clusterId; }
|
||||
set { clusterId = value; }
|
||||
}
|
||||
|
||||
public string ServerName { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
// 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.EnterpriseServer
|
||||
{
|
||||
[Serializable]
|
||||
public class VirtualGroupInfo
|
||||
{
|
||||
private int virtualGroupId;
|
||||
|
||||
public int VirtualGroupId
|
||||
{
|
||||
get { return virtualGroupId; }
|
||||
set { virtualGroupId = value; }
|
||||
}
|
||||
private int serverId;
|
||||
|
||||
public int ServerId
|
||||
{
|
||||
get { return serverId; }
|
||||
set { serverId = value; }
|
||||
}
|
||||
private int groupId;
|
||||
|
||||
public int GroupId
|
||||
{
|
||||
get { return groupId; }
|
||||
set { groupId = value; }
|
||||
}
|
||||
private bool primaryDistribution;
|
||||
|
||||
public bool PrimaryDistribution
|
||||
{
|
||||
get { return primaryDistribution; }
|
||||
set { primaryDistribution = value; }
|
||||
}
|
||||
private int distributionType;
|
||||
|
||||
public int DistributionType
|
||||
{
|
||||
get { return distributionType; }
|
||||
set { distributionType = value; }
|
||||
}
|
||||
private bool bindDistributionToPrimary;
|
||||
|
||||
public bool BindDistributionToPrimary
|
||||
{
|
||||
get { return bindDistributionToPrimary; }
|
||||
set { bindDistributionToPrimary = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,97 @@
|
|||
// 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;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Collections.Specialized;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace WebsitePanel.EnterpriseServer
|
||||
{
|
||||
[Serializable]
|
||||
public class SystemSettings
|
||||
{
|
||||
public const string SMTP_SETTINGS = "SmtpSettings";
|
||||
public const string BACKUP_SETTINGS = "BackupSettings";
|
||||
public const string SETUP_SETTINGS = "SetupSettings";
|
||||
|
||||
public static readonly SystemSettings Empty = new SystemSettings { SettingsArray = new string[][] {} };
|
||||
|
||||
private NameValueCollection settingsHash = null;
|
||||
public string[][] SettingsArray;
|
||||
|
||||
[XmlIgnore]
|
||||
NameValueCollection Settings
|
||||
{
|
||||
get
|
||||
{
|
||||
if (settingsHash == null)
|
||||
{
|
||||
// create new dictionary
|
||||
settingsHash = new NameValueCollection();
|
||||
|
||||
// fill dictionary
|
||||
if (SettingsArray != null)
|
||||
{
|
||||
foreach (string[] pair in SettingsArray)
|
||||
settingsHash.Add(pair[0], pair[1]);
|
||||
}
|
||||
}
|
||||
return settingsHash;
|
||||
}
|
||||
}
|
||||
|
||||
[XmlIgnore]
|
||||
public string this[string settingName]
|
||||
{
|
||||
get
|
||||
{
|
||||
return Settings[settingName];
|
||||
}
|
||||
set
|
||||
{
|
||||
// set setting
|
||||
Settings[settingName] = value;
|
||||
|
||||
// rebuild array
|
||||
SettingsArray = new string[Settings.Count][];
|
||||
for (int i = 0; i < Settings.Count; i++)
|
||||
{
|
||||
SettingsArray[i] = new string[] { Settings.Keys[i], Settings[Settings.Keys[i]] };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int GetInt(string settingName)
|
||||
{
|
||||
return Int32.Parse(Settings[settingName]);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,197 @@
|
|||
// 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 System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace WebsitePanel.EnterpriseServer
|
||||
{
|
||||
public class BackgroundTask
|
||||
{
|
||||
private string taskId;
|
||||
private int userId;
|
||||
private int packageId;
|
||||
private int effectiveUserId;
|
||||
private DateTime startDate = DateTime.MinValue;
|
||||
private DateTime finishDate = DateTime.MinValue;
|
||||
private int maximumExecutionTime = -1; // seconds
|
||||
private string source;
|
||||
private string taskName;
|
||||
private int scheduleId;
|
||||
private string itemName;
|
||||
private int itemId = 0;
|
||||
private int severity = 0; /* 0 - Info, 1 - Warning, 2 - Error */
|
||||
private List<BackgroundTaskLogRecord> logRecords = new List<BackgroundTaskLogRecord>();
|
||||
private List<BackgroundTaskLogRecord> lastLogRecords = new List<BackgroundTaskLogRecord>();
|
||||
private BackgroundTaskLogRecord lastLogRecord;
|
||||
private Hashtable parameters = new Hashtable();
|
||||
private int indicatorMaximum;
|
||||
private int indicatorCurrent;
|
||||
private bool completed;
|
||||
private bool notifyOnComplete;
|
||||
private Thread taskThread;
|
||||
|
||||
public System.DateTime StartDate
|
||||
{
|
||||
get { return this.startDate; }
|
||||
set { this.startDate = value; }
|
||||
}
|
||||
|
||||
public System.DateTime FinishDate
|
||||
{
|
||||
get { return this.finishDate; }
|
||||
set { this.finishDate = value; }
|
||||
}
|
||||
|
||||
public string Source
|
||||
{
|
||||
get { return this.source; }
|
||||
set { this.source = value; }
|
||||
}
|
||||
|
||||
public string TaskName
|
||||
{
|
||||
get { return this.taskName; }
|
||||
set { this.taskName = value; }
|
||||
}
|
||||
|
||||
public int ItemId
|
||||
{
|
||||
get { return this.itemId; }
|
||||
set { this.itemId = value; }
|
||||
}
|
||||
|
||||
public int PackageId
|
||||
{
|
||||
get { return this.packageId; }
|
||||
set { this.packageId = value; }
|
||||
}
|
||||
|
||||
public int Severity
|
||||
{
|
||||
get { return this.severity; }
|
||||
set { this.severity = value; }
|
||||
}
|
||||
|
||||
[XmlIgnore]
|
||||
public List<BackgroundTaskLogRecord> LogRecords
|
||||
{
|
||||
get { return this.logRecords; }
|
||||
set { this.logRecords = value; }
|
||||
}
|
||||
|
||||
public List<BackgroundTaskLogRecord> LastLogRecords
|
||||
{
|
||||
get { return this.lastLogRecords; }
|
||||
}
|
||||
|
||||
public string ItemName
|
||||
{
|
||||
get { return this.itemName; }
|
||||
set { this.itemName = value; }
|
||||
}
|
||||
|
||||
public BackgroundTaskLogRecord LastLogRecord
|
||||
{
|
||||
get { return this.lastLogRecord; }
|
||||
set { this.lastLogRecord = value; }
|
||||
}
|
||||
|
||||
public string TaskId
|
||||
{
|
||||
get { return this.taskId; }
|
||||
set { this.taskId = value; }
|
||||
}
|
||||
|
||||
public int UserId
|
||||
{
|
||||
get { return this.userId; }
|
||||
set { this.userId = value; }
|
||||
}
|
||||
|
||||
[XmlIgnore]
|
||||
public Hashtable Parameters
|
||||
{
|
||||
get { return this.parameters; }
|
||||
}
|
||||
|
||||
public int IndicatorMaximum
|
||||
{
|
||||
get { return this.indicatorMaximum; }
|
||||
set { this.indicatorMaximum = value; }
|
||||
}
|
||||
|
||||
public int IndicatorCurrent
|
||||
{
|
||||
get { return this.indicatorCurrent; }
|
||||
set { this.indicatorCurrent = value; }
|
||||
}
|
||||
|
||||
public bool Completed
|
||||
{
|
||||
get { return this.completed; }
|
||||
set { this.completed = value; }
|
||||
}
|
||||
|
||||
public bool NotifyOnComplete
|
||||
{
|
||||
get { return this.notifyOnComplete; }
|
||||
set { this.notifyOnComplete = value; }
|
||||
}
|
||||
|
||||
public int EffectiveUserId
|
||||
{
|
||||
get { return this.effectiveUserId; }
|
||||
set { this.effectiveUserId = value; }
|
||||
}
|
||||
|
||||
[XmlIgnore]
|
||||
public System.Threading.Thread TaskThread
|
||||
{
|
||||
get { return this.taskThread; }
|
||||
set { this.taskThread = value; }
|
||||
}
|
||||
|
||||
public int ScheduleId
|
||||
{
|
||||
get { return this.scheduleId; }
|
||||
set { this.scheduleId = value; }
|
||||
}
|
||||
|
||||
public int MaximumExecutionTime
|
||||
{
|
||||
get { return this.maximumExecutionTime; }
|
||||
set { this.maximumExecutionTime = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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.EnterpriseServer
|
||||
{
|
||||
public class BackgroundTaskLogRecord
|
||||
{
|
||||
private DateTime date = DateTime.Now;
|
||||
private string text;
|
||||
private int severity; /* 0 - Info, 1 - Warning, 2 - Error */
|
||||
private string[] textParameters;
|
||||
private int textIdent = 0;
|
||||
private bool innerTaskStart;
|
||||
private string exceptionStackTrace;
|
||||
|
||||
public System.DateTime Date
|
||||
{
|
||||
get { return this.date; }
|
||||
set { this.date = value; }
|
||||
}
|
||||
|
||||
public string Text
|
||||
{
|
||||
get { return this.text; }
|
||||
set { this.text = value; }
|
||||
}
|
||||
|
||||
public int Severity
|
||||
{
|
||||
get { return this.severity; }
|
||||
set { this.severity = value; }
|
||||
}
|
||||
|
||||
public string[] TextParameters
|
||||
{
|
||||
get { return this.textParameters; }
|
||||
set { this.textParameters = value; }
|
||||
}
|
||||
|
||||
public int TextIdent
|
||||
{
|
||||
get { return this.textIdent; }
|
||||
set { this.textIdent = value; }
|
||||
}
|
||||
|
||||
public bool InnerTaskStart
|
||||
{
|
||||
get { return this.innerTaskStart; }
|
||||
set { this.innerTaskStart = value; }
|
||||
}
|
||||
|
||||
public string ExceptionStackTrace
|
||||
{
|
||||
get { return this.exceptionStackTrace; }
|
||||
set { this.exceptionStackTrace = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,318 @@
|
|||
// 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.Linq;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace WebsitePanel.EnterpriseServer
|
||||
{
|
||||
/// <summary>
|
||||
/// User account.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class UserInfo
|
||||
{
|
||||
private int userId;
|
||||
private int ownerId;
|
||||
private int roleId;
|
||||
private int statusId;
|
||||
private DateTime created;
|
||||
private DateTime changed;
|
||||
private bool isPeer;
|
||||
private bool isDemo;
|
||||
private string comments;
|
||||
private string username;
|
||||
private string password;
|
||||
private string firstName;
|
||||
private string lastName;
|
||||
private string email;
|
||||
private string secondaryEmail;
|
||||
private string address;
|
||||
private string city;
|
||||
private string country;
|
||||
private string state;
|
||||
private string zip;
|
||||
private string primaryPhone;
|
||||
private string secondaryPhone;
|
||||
private string fax;
|
||||
private string instantMessenger;
|
||||
private bool htmlMail;
|
||||
private string companyName;
|
||||
private bool ecommerceEnabled;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new instance of UserInfo class.
|
||||
/// </summary>
|
||||
public UserInfo()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// User role ID:
|
||||
/// Administrator = 1,
|
||||
/// Reseller = 2,
|
||||
/// User = 3
|
||||
/// </summary>
|
||||
public int RoleId
|
||||
{
|
||||
get { return roleId; }
|
||||
set { roleId = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// User role.
|
||||
/// </summary>
|
||||
public UserRole Role
|
||||
{
|
||||
get { return (UserRole)roleId; }
|
||||
set { roleId = (int)value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// User account status:
|
||||
/// Active = 1,
|
||||
/// Suspended = 2,
|
||||
/// Cancelled = 3,
|
||||
/// Pending = 4
|
||||
/// </summary>
|
||||
public int StatusId
|
||||
{
|
||||
get { return statusId; }
|
||||
set { statusId = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// User account status.
|
||||
/// </summary>
|
||||
public UserStatus Status
|
||||
{
|
||||
get { return (UserStatus)statusId; }
|
||||
set { statusId = (int)value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// User account unique identifier.
|
||||
/// </summary>
|
||||
public int UserId
|
||||
{
|
||||
get { return userId; }
|
||||
set { userId = value; }
|
||||
}
|
||||
|
||||
public int OwnerId
|
||||
{
|
||||
get { return ownerId; }
|
||||
set { ownerId = value; }
|
||||
}
|
||||
|
||||
public bool IsPeer
|
||||
{
|
||||
get { return isPeer; }
|
||||
set { isPeer = value; }
|
||||
}
|
||||
|
||||
public DateTime Created
|
||||
{
|
||||
get { return created; }
|
||||
set { created = value; }
|
||||
}
|
||||
|
||||
public DateTime Changed
|
||||
{
|
||||
get { return changed; }
|
||||
set { changed = value; }
|
||||
}
|
||||
|
||||
public bool IsDemo
|
||||
{
|
||||
get { return isDemo; }
|
||||
set { isDemo = value; }
|
||||
}
|
||||
|
||||
public string Comments
|
||||
{
|
||||
get { return comments; }
|
||||
set { comments = value; }
|
||||
}
|
||||
|
||||
public string LastName
|
||||
{
|
||||
get { return this.lastName; }
|
||||
set { this.lastName = value; }
|
||||
}
|
||||
|
||||
public string Username
|
||||
{
|
||||
get { return this.username; }
|
||||
set { this.username = value; }
|
||||
}
|
||||
|
||||
public string Password
|
||||
{
|
||||
get { return this.password; }
|
||||
set { this.password = value; }
|
||||
}
|
||||
|
||||
public string FirstName
|
||||
{
|
||||
get { return this.firstName; }
|
||||
set { this.firstName = value; }
|
||||
}
|
||||
|
||||
public string Email
|
||||
{
|
||||
get { return this.email; }
|
||||
set { this.email = value; }
|
||||
}
|
||||
|
||||
public string PrimaryPhone
|
||||
{
|
||||
get { return this.primaryPhone; }
|
||||
set { this.primaryPhone = value; }
|
||||
}
|
||||
|
||||
public string Zip
|
||||
{
|
||||
get { return this.zip; }
|
||||
set { this.zip = value; }
|
||||
}
|
||||
|
||||
public string InstantMessenger
|
||||
{
|
||||
get { return this.instantMessenger; }
|
||||
set { this.instantMessenger = value; }
|
||||
}
|
||||
|
||||
public string Fax
|
||||
{
|
||||
get { return this.fax; }
|
||||
set { this.fax = value; }
|
||||
}
|
||||
|
||||
public string SecondaryPhone
|
||||
{
|
||||
get { return this.secondaryPhone; }
|
||||
set { this.secondaryPhone = value; }
|
||||
}
|
||||
|
||||
public string SecondaryEmail
|
||||
{
|
||||
get { return this.secondaryEmail; }
|
||||
set { this.secondaryEmail = value; }
|
||||
}
|
||||
|
||||
public string Country
|
||||
{
|
||||
get { return this.country; }
|
||||
set { this.country = 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 bool HtmlMail
|
||||
{
|
||||
get { return this.htmlMail; }
|
||||
set { this.htmlMail = value; }
|
||||
}
|
||||
|
||||
public string CompanyName
|
||||
{
|
||||
get { return this.companyName; }
|
||||
set { this.companyName = value; }
|
||||
}
|
||||
|
||||
public bool EcommerceEnabled
|
||||
{
|
||||
get { return this.ecommerceEnabled; }
|
||||
set { this.ecommerceEnabled = value; }
|
||||
}
|
||||
|
||||
public string AdditionalParams { get; set; }
|
||||
|
||||
public List<UserVlan> Vlans
|
||||
{
|
||||
get
|
||||
{
|
||||
List<UserVlan> result = new List<UserVlan>();
|
||||
try
|
||||
{
|
||||
|
||||
if (AdditionalParams != null)
|
||||
{
|
||||
XDocument doc = XDocument.Parse(AdditionalParams);
|
||||
if (doc != null && doc.Root != null)
|
||||
{
|
||||
XElement vLansElement = doc.Root.Element("VLans");
|
||||
if (vLansElement != null)
|
||||
{
|
||||
foreach(var item in vLansElement.Elements("VLan"))
|
||||
result.Add(new UserVlan
|
||||
{
|
||||
VLanID = item.Attribute("VLanID") != null ? ushort.Parse(item.Attribute("VLanID").Value) : (ushort) 0,
|
||||
Comment = item.Attribute("Comment") != null ? item.Attribute("Comment").Value : null
|
||||
});
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// User's VLans
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class UserVlan
|
||||
{
|
||||
public ushort VLanID { get; set; }
|
||||
public string Comment { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
// 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.EnterpriseServer
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for AccountRole.
|
||||
/// </summary>
|
||||
public enum UserRole
|
||||
{
|
||||
Administrator = 1,
|
||||
Reseller = 2,
|
||||
User = 3
|
||||
}
|
||||
}
|
|
@ -0,0 +1,125 @@
|
|||
// 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.Xml.Serialization;
|
||||
|
||||
namespace WebsitePanel.EnterpriseServer
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for ServiceProviderSettings.
|
||||
/// </summary>
|
||||
public class UserSettings
|
||||
{
|
||||
public const string ACCOUNT_SUMMARY_LETTER = "AccountSummaryLetter";
|
||||
public const string PACKAGE_SUMMARY_LETTER = "PackageSummaryLetter";
|
||||
public const string PASSWORD_REMINDER_LETTER = "PasswordReminderLetter";
|
||||
public const string EXCHANGE_MAILBOX_SETUP_LETTER = "ExchangeMailboxSetupLetter";
|
||||
public const string EXCHANGE_HOSTED_EDITION_ORGANIZATION_SUMMARY = "ExchangeHostedEditionOrganizationSummary";
|
||||
public const string HOSTED_SOLUTION_REPORT = "HostedSoluitonReportSummaryLetter";
|
||||
public const string ORGANIZATION_USER_SUMMARY_LETTER = "OrganizationUserSummaryLetter";
|
||||
public const string VPS_SUMMARY_LETTER = "VpsSummaryLetter";
|
||||
public const string WEB_POLICY = "WebPolicy";
|
||||
public const string FTP_POLICY = "FtpPolicy";
|
||||
public const string MAIL_POLICY = "MailPolicy";
|
||||
public const string MSSQL_POLICY = "MsSqlPolicy";
|
||||
public const string MYSQL_POLICY = "MySqlPolicy";
|
||||
public const string SHAREPOINT_POLICY = "SharePointPolicy";
|
||||
public const string OS_POLICY = "OsPolicy";
|
||||
public const string EXCHANGE_POLICY = "ExchangePolicy";
|
||||
public const string EXCHANGE_HOSTED_EDITION_POLICY = "ExchangeHostedEditionPolicy";
|
||||
public const string WEBSITEPANEL_POLICY = "WebsitePanelPolicy";
|
||||
public const string VPS_POLICY = "VpsPolicy";
|
||||
public const string DISPLAY_PREFS = "DisplayPreferences";
|
||||
public const string GRID_ITEMS = "GridItems";
|
||||
|
||||
public int UserId;
|
||||
public string SettingsName;
|
||||
|
||||
private NameValueCollection settingsHash = null;
|
||||
public string[][] SettingsArray;
|
||||
|
||||
[XmlIgnore]
|
||||
NameValueCollection Settings
|
||||
{
|
||||
get
|
||||
{
|
||||
if (settingsHash == null)
|
||||
{
|
||||
// create new dictionary
|
||||
settingsHash = new NameValueCollection();
|
||||
|
||||
// fill dictionary
|
||||
if (SettingsArray != null)
|
||||
{
|
||||
foreach (string[] pair in SettingsArray)
|
||||
settingsHash.Add(pair[0], pair[1]);
|
||||
}
|
||||
}
|
||||
return settingsHash;
|
||||
}
|
||||
}
|
||||
|
||||
[XmlIgnore]
|
||||
public string this[string settingName]
|
||||
{
|
||||
get
|
||||
{
|
||||
return Settings[settingName];
|
||||
}
|
||||
set
|
||||
{
|
||||
// set setting
|
||||
Settings[settingName] = value;
|
||||
|
||||
// rebuild array
|
||||
SettingsArray = new string[Settings.Count][];
|
||||
for (int i = 0; i < Settings.Count; i++)
|
||||
{
|
||||
SettingsArray[i] = new string[] { Settings.Keys[i], Settings[Settings.Keys[i]] };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int GetInt(string settingName)
|
||||
{
|
||||
return Int32.Parse(Settings[settingName]);
|
||||
}
|
||||
|
||||
public long GetLong(string settingName)
|
||||
{
|
||||
return Int64.Parse(Settings[settingName]);
|
||||
}
|
||||
|
||||
public bool GetBool(string settingName)
|
||||
{
|
||||
return Boolean.Parse(Settings[settingName]);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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.EnterpriseServer
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for AccountStatus.
|
||||
/// </summary>
|
||||
public enum UserStatus
|
||||
{
|
||||
Active = 1,
|
||||
Suspended = 2,
|
||||
Cancelled = 3,
|
||||
Pending = 4
|
||||
}
|
||||
}
|
|
@ -0,0 +1,100 @@
|
|||
// 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.EnterpriseServer
|
||||
{
|
||||
public class UsernamePolicy
|
||||
{
|
||||
bool enabled = false;
|
||||
string allowedSymbols = "a-zA-Z0-9\\.\\_";
|
||||
int minLength = -1;
|
||||
int maxLength = -1;
|
||||
string prefix = null;
|
||||
string suffix = null;
|
||||
|
||||
public UsernamePolicy(string policyValue)
|
||||
{
|
||||
if (String.IsNullOrEmpty(policyValue))
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
// parse settings
|
||||
string[] parts = policyValue.Split(';');
|
||||
|
||||
enabled = Boolean.Parse(parts[0]);
|
||||
allowedSymbols += parts[1];
|
||||
minLength = Int32.Parse(parts[2]);
|
||||
maxLength = Int32.Parse(parts[3]);
|
||||
prefix = parts[4];
|
||||
suffix = parts[5];
|
||||
}
|
||||
catch { /* skip */ }
|
||||
}
|
||||
|
||||
public bool Enabled
|
||||
{
|
||||
get { return this.enabled; }
|
||||
set { this.enabled = value; }
|
||||
}
|
||||
|
||||
public string AllowedSymbols
|
||||
{
|
||||
get { return this.allowedSymbols; }
|
||||
set { this.allowedSymbols = value; }
|
||||
}
|
||||
|
||||
public int MinLength
|
||||
{
|
||||
get { return this.minLength; }
|
||||
set { this.minLength = value; }
|
||||
}
|
||||
|
||||
public int MaxLength
|
||||
{
|
||||
get { return this.maxLength; }
|
||||
set { this.maxLength = value; }
|
||||
}
|
||||
|
||||
public string Prefix
|
||||
{
|
||||
get { return this.prefix; }
|
||||
set { this.prefix = value; }
|
||||
}
|
||||
|
||||
public string Suffix
|
||||
{
|
||||
get { return this.suffix; }
|
||||
set { this.suffix = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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.EnterpriseServer
|
||||
{
|
||||
public class NetworkAdapterDetails
|
||||
{
|
||||
public string NetworkFormat { get; set; }
|
||||
public bool IsDHCP { get; set; }
|
||||
public string NetworkId { get; set; }
|
||||
public string MacAddress { get; set; }
|
||||
public string SubnetMask { get; set; }
|
||||
public string SubnetMaskCidr { get; set; }
|
||||
public string DefaultGateway { get; set; }
|
||||
public string PreferredNameServer { get; set; }
|
||||
public string AlternateNameServer { get; set; }
|
||||
public NetworkAdapterIPAddress[] IPAddresses { get; set; }
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue