Exchange archiving part 1

This commit is contained in:
dev_amdtel 2014-03-13 13:59:34 +04:00
parent fac1310362
commit eea7d1ce6a
36 changed files with 3581 additions and 4237 deletions

View file

@ -118,6 +118,9 @@ order by rg.groupOrder
public const string EXCHANGE2007_ALLOWLITIGATIONHOLD = "Exchange2007.AllowLitigationHold"; public const string EXCHANGE2007_ALLOWLITIGATIONHOLD = "Exchange2007.AllowLitigationHold";
public const string EXCHANGE2007_RECOVERABLEITEMSSPACE = "Exchange2007.RecoverableItemsSpace"; public const string EXCHANGE2007_RECOVERABLEITEMSSPACE = "Exchange2007.RecoverableItemsSpace";
public const string EXCHANGE2007_DISCLAIMERSALLOWED = "Exchange2007.DisclaimersAllowed"; public const string EXCHANGE2007_DISCLAIMERSALLOWED = "Exchange2007.DisclaimersAllowed";
public const string EXCHANGE2013_ALLOWARCHIVING = "Exchange2013.AllowArchiving"; // Archiving
public const string EXCHANGE2013_ARCHIVINGSTORAGE = "Exchange2013.ArchivingStorage";
public const string EXCHANGE2013_ARCHIVINGMAILBOXES = "Exchange2013.ArchivingMailboxes";
public const string MSSQL2000_DATABASES = "MsSQL2000.Databases"; // Databases public const string MSSQL2000_DATABASES = "MsSQL2000.Databases"; // Databases
public const string MSSQL2000_USERS = "MsSQL2000.Users"; // Users public const string MSSQL2000_USERS = "MsSQL2000.Users"; // Users
public const string MSSQL2000_MAXDATABASESIZE = "MsSQL2000.MaxDatabaseSize"; // Max Database Size public const string MSSQL2000_MAXDATABASESIZE = "MsSQL2000.MaxDatabaseSize"; // Max Database Size

View file

@ -1,4 +1,4 @@
// Copyright (c) 2012, Outercurve Foundation. // Copyright (c) 2012-2014, Outercurve Foundation.
// All rights reserved. // All rights reserved.
// //
// Redistribution and use in source and binary forms, with or without modification, // Redistribution and use in source and binary forms, with or without modification,
@ -2570,7 +2570,7 @@ namespace WebsitePanel.EnterpriseServer
public static void UpdateExchangeAccount(int accountId, string accountName, ExchangeAccountType accountType, public static void UpdateExchangeAccount(int accountId, string accountName, ExchangeAccountType accountType,
string displayName, string primaryEmailAddress, bool mailEnabledPublicFolder, string displayName, string primaryEmailAddress, bool mailEnabledPublicFolder,
string mailboxManagerActions, string samAccountName, string accountPassword, int mailboxPlanId, string subscriberNumber) string mailboxManagerActions, string samAccountName, string accountPassword, int mailboxPlanId, int archivePlanId, string subscriberNumber)
{ {
SqlHelper.ExecuteNonQuery( SqlHelper.ExecuteNonQuery(
ConnectionString, ConnectionString,
@ -2586,6 +2586,7 @@ namespace WebsitePanel.EnterpriseServer
new SqlParameter("@Password", string.IsNullOrEmpty(accountPassword) ? (object)DBNull.Value : (object)accountPassword), new SqlParameter("@Password", string.IsNullOrEmpty(accountPassword) ? (object)DBNull.Value : (object)accountPassword),
new SqlParameter("@SamAccountName", samAccountName), new SqlParameter("@SamAccountName", samAccountName),
new SqlParameter("@MailboxPlanId", (mailboxPlanId == 0) ? (object)DBNull.Value : (object)mailboxPlanId), new SqlParameter("@MailboxPlanId", (mailboxPlanId == 0) ? (object)DBNull.Value : (object)mailboxPlanId),
new SqlParameter("@ArchivingMailboxPlanId", (archivePlanId < 1) ? (object)DBNull.Value : (object)archivePlanId),
new SqlParameter("@SubscriberNumber", (string.IsNullOrEmpty(subscriberNumber) ? (object)DBNull.Value : (object)subscriberNumber)) new SqlParameter("@SubscriberNumber", (string.IsNullOrEmpty(subscriberNumber) ? (object)DBNull.Value : (object)subscriberNumber))
); );
} }
@ -2709,7 +2710,7 @@ namespace WebsitePanel.EnterpriseServer
} }
public static DataSet GetExchangeAccountsPaged(int actorId, int itemId, string accountTypes, public static DataSet GetExchangeAccountsPaged(int actorId, int itemId, string accountTypes,
string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, bool archiving)
{ {
// check input parameters // check input parameters
string[] types = accountTypes.Split(','); string[] types = accountTypes.Split(',');
@ -2738,7 +2739,8 @@ namespace WebsitePanel.EnterpriseServer
new SqlParameter("@FilterValue", VerifyColumnValue(filterValue)), new SqlParameter("@FilterValue", VerifyColumnValue(filterValue)),
new SqlParameter("@SortColumn", VerifyColumnName(sortColumn)), new SqlParameter("@SortColumn", VerifyColumnName(sortColumn)),
new SqlParameter("@StartRow", startRow), new SqlParameter("@StartRow", startRow),
new SqlParameter("@MaximumRows", maximumRows) new SqlParameter("@MaximumRows", maximumRows),
new SqlParameter("@Archiving", archiving)
); );
} }
@ -2782,7 +2784,8 @@ namespace WebsitePanel.EnterpriseServer
public static int AddExchangeMailboxPlan(int itemID, string mailboxPlan, bool enableActiveSync, bool enableIMAP, bool enableMAPI, bool enableOWA, bool enablePOP, public static int AddExchangeMailboxPlan(int itemID, string mailboxPlan, bool enableActiveSync, bool enableIMAP, bool enableMAPI, bool enableOWA, bool enablePOP,
bool isDefault, int issueWarningPct, int keepDeletedItemsDays, int mailboxSizeMB, int maxReceiveMessageSizeKB, int maxRecipients, bool isDefault, int issueWarningPct, int keepDeletedItemsDays, int mailboxSizeMB, int maxReceiveMessageSizeKB, int maxRecipients,
int maxSendMessageSizeKB, int prohibitSendPct, int prohibitSendReceivePct, bool hideFromAddressBook, int mailboxPlanType, int maxSendMessageSizeKB, int prohibitSendPct, int prohibitSendReceivePct, bool hideFromAddressBook, int mailboxPlanType,
bool enabledLitigationHold, long recoverabelItemsSpace, long recoverabelItemsWarning, string litigationHoldUrl, string litigationHoldMsg) bool enabledLitigationHold, long recoverabelItemsSpace, long recoverabelItemsWarning, string litigationHoldUrl, string litigationHoldMsg,
bool archiving)
{ {
SqlParameter outParam = new SqlParameter("@MailboxPlanId", SqlDbType.Int); SqlParameter outParam = new SqlParameter("@MailboxPlanId", SqlDbType.Int);
outParam.Direction = ParameterDirection.Output; outParam.Direction = ParameterDirection.Output;
@ -2814,7 +2817,8 @@ namespace WebsitePanel.EnterpriseServer
new SqlParameter("@RecoverableItemsWarningPct", recoverabelItemsWarning), new SqlParameter("@RecoverableItemsWarningPct", recoverabelItemsWarning),
new SqlParameter("@RecoverableItemsSpace", recoverabelItemsSpace), new SqlParameter("@RecoverableItemsSpace", recoverabelItemsSpace),
new SqlParameter("@LitigationHoldUrl", litigationHoldUrl), new SqlParameter("@LitigationHoldUrl", litigationHoldUrl),
new SqlParameter("@LitigationHoldMsg", litigationHoldMsg) new SqlParameter("@LitigationHoldMsg", litigationHoldMsg),
new SqlParameter("@Archiving", archiving)
); );
return Convert.ToInt32(outParam.Value); return Convert.ToInt32(outParam.Value);
@ -2881,13 +2885,14 @@ namespace WebsitePanel.EnterpriseServer
); );
} }
public static IDataReader GetExchangeMailboxPlans(int itemId) public static IDataReader GetExchangeMailboxPlans(int itemId, bool archiving)
{ {
return SqlHelper.ExecuteReader( return SqlHelper.ExecuteReader(
ConnectionString, ConnectionString,
CommandType.StoredProcedure, CommandType.StoredProcedure,
"GetExchangeMailboxPlans", "GetExchangeMailboxPlans",
new SqlParameter("@ItemID", itemId) new SqlParameter("@ItemID", itemId),
new SqlParameter("@Archiving", archiving)
); );
} }
@ -2914,14 +2919,15 @@ namespace WebsitePanel.EnterpriseServer
); );
} }
public static void SetExchangeAccountMailboxPlan(int accountId, int mailboxPlanId) public static void SetExchangeAccountMailboxPlan(int accountId, int mailboxPlanId, int archivePlanId)
{ {
SqlHelper.ExecuteNonQuery( SqlHelper.ExecuteNonQuery(
ConnectionString, ConnectionString,
CommandType.StoredProcedure, CommandType.StoredProcedure,
"SetExchangeAccountMailboxplan", "SetExchangeAccountMailboxplan",
new SqlParameter("@AccountID", accountId), new SqlParameter("@AccountID", accountId),
new SqlParameter("@MailboxPlanId", (mailboxPlanId == 0) ? (object)DBNull.Value : (object)mailboxPlanId) new SqlParameter("@MailboxPlanId", (mailboxPlanId == 0) ? (object)DBNull.Value : (object)mailboxPlanId),
new SqlParameter("@ArchivingMailboxPlanId", (archivePlanId < 1) ? (object)DBNull.Value : (object)archivePlanId)
); );
} }

View file

@ -950,7 +950,7 @@ namespace WebsitePanel.EnterpriseServer
public static ExchangeAccountsPaged GetAccountsPaged(int itemId, string accountTypes, public static ExchangeAccountsPaged GetAccountsPaged(int itemId, string accountTypes,
string filterColumn, string filterValue, string sortColumn, string filterColumn, string filterValue, string sortColumn,
int startRow, int maximumRows) int startRow, int maximumRows, bool archiving)
{ {
#region Demo Mode #region Demo Mode
if (IsDemoMode) if (IsDemoMode)
@ -965,7 +965,7 @@ namespace WebsitePanel.EnterpriseServer
#endregion #endregion
DataSet ds = DataProvider.GetExchangeAccountsPaged(SecurityContext.User.UserId, itemId, DataSet ds = DataProvider.GetExchangeAccountsPaged(SecurityContext.User.UserId, itemId,
accountTypes, filterColumn, filterValue, sortColumn, startRow, maximumRows); accountTypes, filterColumn, filterValue, sortColumn, startRow, maximumRows, archiving);
ExchangeAccountsPaged result = new ExchangeAccountsPaged(); ExchangeAccountsPaged result = new ExchangeAccountsPaged();
result.RecordsCount = (int)ds.Tables[0].Rows[0][0]; result.RecordsCount = (int)ds.Tables[0].Rows[0][0];
@ -1223,7 +1223,7 @@ namespace WebsitePanel.EnterpriseServer
{ {
DataProvider.UpdateExchangeAccount(account.AccountId, account.AccountName, account.AccountType, account.DisplayName, DataProvider.UpdateExchangeAccount(account.AccountId, account.AccountName, account.AccountType, account.DisplayName,
account.PrimaryEmailAddress, account.MailEnabledPublicFolder, account.PrimaryEmailAddress, account.MailEnabledPublicFolder,
account.MailboxManagerActions.ToString(), account.SamAccountName, account.AccountPassword, account.MailboxPlanId, account.MailboxManagerActions.ToString(), account.SamAccountName, account.AccountPassword, account.MailboxPlanId, account.ArchivingMailboxPlanId,
(string.IsNullOrEmpty(account.SubscriberNumber) ? null : account.SubscriberNumber.Trim())); (string.IsNullOrEmpty(account.SubscriberNumber) ? null : account.SubscriberNumber.Trim()));
} }
@ -1598,7 +1598,7 @@ namespace WebsitePanel.EnterpriseServer
private static void UpdateExchangeAccount(int accountId, string accountName, ExchangeAccountType accountType, private static void UpdateExchangeAccount(int accountId, string accountName, ExchangeAccountType accountType,
string displayName, string primaryEmailAddress, bool mailEnabledPublicFolder, string displayName, string primaryEmailAddress, bool mailEnabledPublicFolder,
string mailboxManagerActions, string samAccountName, string accountPassword, int mailboxPlanId, string subscriberNumber) string mailboxManagerActions, string samAccountName, string accountPassword, int mailboxPlanId, int archivePlanId, string subscriberNumber)
{ {
DataProvider.UpdateExchangeAccount(accountId, DataProvider.UpdateExchangeAccount(accountId,
accountName, accountName,
@ -1609,13 +1609,13 @@ namespace WebsitePanel.EnterpriseServer
mailboxManagerActions, mailboxManagerActions,
samAccountName, samAccountName,
CryptoUtils.Encrypt(accountPassword), CryptoUtils.Encrypt(accountPassword),
mailboxPlanId, mailboxPlanId, archivePlanId,
(string.IsNullOrEmpty(subscriberNumber) ? null : subscriberNumber.Trim())); (string.IsNullOrEmpty(subscriberNumber) ? null : subscriberNumber.Trim()));
} }
public static int CreateMailbox(int itemId, int accountId, ExchangeAccountType accountType, string accountName, public static int CreateMailbox(int itemId, int accountId, ExchangeAccountType accountType, string accountName,
string displayName, string name, string domain, string password, bool sendSetupInstructions, string setupInstructionMailAddress, int mailboxPlanId, string subscriberNumber) string displayName, string name, string domain, string password, bool sendSetupInstructions, string setupInstructionMailAddress, int mailboxPlanId, int archivedPlanId, string subscriberNumber)
{ {
// check account // check account
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);
@ -1756,7 +1756,7 @@ namespace WebsitePanel.EnterpriseServer
| MailboxManagerActions.EmailAddresses; | MailboxManagerActions.EmailAddresses;
UpdateExchangeAccount(accountId, accountName, accountType, displayName, email, false, pmmActions.ToString(), samAccount, password, mailboxPlanId, subscriberNumber); UpdateExchangeAccount(accountId, accountName, accountType, displayName, email, false, pmmActions.ToString(), samAccount, password, mailboxPlanId, archivedPlanId, subscriberNumber);
@ -2600,7 +2600,7 @@ namespace WebsitePanel.EnterpriseServer
#region Mailbox plan #region Mailbox plan
public static int SetExchangeMailboxPlan(int itemId, int accountId, int mailboxPlanId) public static int SetExchangeMailboxPlan(int itemId, int accountId, int mailboxPlanId, int archivePlanId)
{ {
// check account // check account
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);
@ -2679,6 +2679,7 @@ namespace WebsitePanel.EnterpriseServer
int exchangeServiceId = GetExchangeServiceID(org.PackageId); int exchangeServiceId = GetExchangeServiceID(org.PackageId);
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
//TDMX
exchange.SetMailboxAdvancedSettings( exchange.SetMailboxAdvancedSettings(
org.OrganizationId, org.OrganizationId,
account.UserPrincipalName, account.UserPrincipalName,
@ -2700,7 +2701,7 @@ namespace WebsitePanel.EnterpriseServer
plan.LitigationHoldUrl, plan.LitigationHoldUrl,
plan.LitigationHoldMsg); plan.LitigationHoldMsg);
DataProvider.SetExchangeAccountMailboxPlan(accountId, mailboxPlanId); DataProvider.SetExchangeAccountMailboxPlan(accountId, mailboxPlanId, archivePlanId);
return 0; return 0;
} }
@ -2714,7 +2715,7 @@ namespace WebsitePanel.EnterpriseServer
} }
} }
public static List<ExchangeMailboxPlan> GetExchangeMailboxPlans(int itemId) public static List<ExchangeMailboxPlan> GetExchangeMailboxPlans(int itemId, bool archiving)
{ {
// place log record // place log record
TaskManager.StartTask("EXCHANGE", "GET_EXCHANGE_MAILBOXPLANS", itemId); TaskManager.StartTask("EXCHANGE", "GET_EXCHANGE_MAILBOXPLANS", itemId);
@ -2726,9 +2727,9 @@ namespace WebsitePanel.EnterpriseServer
UserInfo user = ObjectUtils.FillObjectFromDataReader<UserInfo>(DataProvider.GetUserByExchangeOrganizationIdInternally(itemId)); UserInfo user = ObjectUtils.FillObjectFromDataReader<UserInfo>(DataProvider.GetUserByExchangeOrganizationIdInternally(itemId));
if (user.Role == UserRole.User) if (user.Role == UserRole.User)
ExchangeServerController.GetExchangeMailboxPlansByUser(itemId, user, ref mailboxPlans); ExchangeServerController.GetExchangeMailboxPlansByUser(itemId, user, ref mailboxPlans, archiving);
else else
ExchangeServerController.GetExchangeMailboxPlansByUser(0, user, ref mailboxPlans); ExchangeServerController.GetExchangeMailboxPlansByUser(0, user, ref mailboxPlans, archiving);
ExchangeOrganization ExchangeOrg = ObjectUtils.FillObjectFromDataReader<ExchangeOrganization>(DataProvider.GetExchangeOrganization(itemId)); ExchangeOrganization ExchangeOrg = ObjectUtils.FillObjectFromDataReader<ExchangeOrganization>(DataProvider.GetExchangeOrganization(itemId));
@ -2753,7 +2754,7 @@ namespace WebsitePanel.EnterpriseServer
} }
} }
private static void GetExchangeMailboxPlansByUser(int itemId, UserInfo user, ref List<ExchangeMailboxPlan> mailboxPlans) private static void GetExchangeMailboxPlansByUser(int itemId, UserInfo user, ref List<ExchangeMailboxPlan> mailboxPlans, bool archiving)
{ {
if ((user != null)) if ((user != null))
{ {
@ -2780,7 +2781,7 @@ namespace WebsitePanel.EnterpriseServer
if (OrgId != -1) if (OrgId != -1)
{ {
List<ExchangeMailboxPlan> Plans = ObjectUtils.CreateListFromDataReader<ExchangeMailboxPlan>(DataProvider.GetExchangeMailboxPlans(OrgId)); List<ExchangeMailboxPlan> Plans = ObjectUtils.CreateListFromDataReader<ExchangeMailboxPlan>(DataProvider.GetExchangeMailboxPlans(OrgId, archiving));
foreach (ExchangeMailboxPlan p in Plans) foreach (ExchangeMailboxPlan p in Plans)
{ {
@ -2790,7 +2791,7 @@ namespace WebsitePanel.EnterpriseServer
UserInfo owner = UserController.GetUserInternally(user.OwnerId); UserInfo owner = UserController.GetUserInternally(user.OwnerId);
GetExchangeMailboxPlansByUser(0, owner, ref mailboxPlans); GetExchangeMailboxPlansByUser(0, owner, ref mailboxPlans, archiving);
} }
} }
@ -2842,9 +2843,18 @@ namespace WebsitePanel.EnterpriseServer
if (mailboxPlan.KeepDeletedItemsDays > cntx.Quotas[Quotas.EXCHANGE2007_KEEPDELETEDITEMSDAYS].QuotaAllocatedValue) if (mailboxPlan.KeepDeletedItemsDays > cntx.Quotas[Quotas.EXCHANGE2007_KEEPDELETEDITEMSDAYS].QuotaAllocatedValue)
mailboxPlan.KeepDeletedItemsDays = cntx.Quotas[Quotas.EXCHANGE2007_KEEPDELETEDITEMSDAYS].QuotaAllocatedValue; mailboxPlan.KeepDeletedItemsDays = cntx.Quotas[Quotas.EXCHANGE2007_KEEPDELETEDITEMSDAYS].QuotaAllocatedValue;
if (cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue != -1) if (mailboxPlan.Archiving)
if (mailboxPlan.MailboxSizeMB > cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue) {
mailboxPlan.MailboxSizeMB = cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue; if (cntx.Quotas[Quotas.EXCHANGE2013_ARCHIVINGSTORAGE].QuotaAllocatedValue != -1)
if (mailboxPlan.MailboxSizeMB > cntx.Quotas[Quotas.EXCHANGE2013_ARCHIVINGSTORAGE].QuotaAllocatedValue)
mailboxPlan.MailboxSizeMB = cntx.Quotas[Quotas.EXCHANGE2013_ARCHIVINGSTORAGE].QuotaAllocatedValue;
}
else
{
if (cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue != -1)
if (mailboxPlan.MailboxSizeMB > cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue)
mailboxPlan.MailboxSizeMB = cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue;
}
if (cntx.Quotas[Quotas.EXCHANGE2007_MAXRECEIVEMESSAGESIZEKB].QuotaAllocatedValue != -1) if (cntx.Quotas[Quotas.EXCHANGE2007_MAXRECEIVEMESSAGESIZEKB].QuotaAllocatedValue != -1)
if (mailboxPlan.MaxReceiveMessageSizeKB > cntx.Quotas[Quotas.EXCHANGE2007_MAXRECEIVEMESSAGESIZEKB].QuotaAllocatedValue) if (mailboxPlan.MaxReceiveMessageSizeKB > cntx.Quotas[Quotas.EXCHANGE2007_MAXRECEIVEMESSAGESIZEKB].QuotaAllocatedValue)
@ -2871,7 +2881,7 @@ namespace WebsitePanel.EnterpriseServer
mailboxPlan.IsDefault, mailboxPlan.IssueWarningPct, mailboxPlan.KeepDeletedItemsDays, mailboxPlan.MailboxSizeMB, mailboxPlan.MaxReceiveMessageSizeKB, mailboxPlan.MaxRecipients, mailboxPlan.IsDefault, mailboxPlan.IssueWarningPct, mailboxPlan.KeepDeletedItemsDays, mailboxPlan.MailboxSizeMB, mailboxPlan.MaxReceiveMessageSizeKB, mailboxPlan.MaxRecipients,
mailboxPlan.MaxSendMessageSizeKB, mailboxPlan.ProhibitSendPct, mailboxPlan.ProhibitSendReceivePct, mailboxPlan.HideFromAddressBook, mailboxPlan.MailboxPlanType, mailboxPlan.MaxSendMessageSizeKB, mailboxPlan.ProhibitSendPct, mailboxPlan.ProhibitSendReceivePct, mailboxPlan.HideFromAddressBook, mailboxPlan.MailboxPlanType,
mailboxPlan.AllowLitigationHold, mailboxPlan.RecoverableItemsSpace, mailboxPlan.RecoverableItemsWarningPct, mailboxPlan.AllowLitigationHold, mailboxPlan.RecoverableItemsSpace, mailboxPlan.RecoverableItemsWarningPct,
mailboxPlan.LitigationHoldUrl, mailboxPlan.LitigationHoldMsg); mailboxPlan.LitigationHoldUrl, mailboxPlan.LitigationHoldMsg, mailboxPlan.Archiving);
} }
catch (Exception ex) catch (Exception ex)
{ {

View file

@ -1314,7 +1314,7 @@ namespace WebsitePanel.EnterpriseServer
DataSet ds = DataSet ds =
DataProvider.GetExchangeAccountsPaged(SecurityContext.User.UserId, itemId, accountTypes, filterColumn, DataProvider.GetExchangeAccountsPaged(SecurityContext.User.UserId, itemId, accountTypes, filterColumn,
filterValue, sortColumn, startRow, maximumRows); filterValue, sortColumn, startRow, maximumRows, false);
OrganizationUsersPaged result = new OrganizationUsersPaged(); OrganizationUsersPaged result = new OrganizationUsersPaged();
result.RecordsCount = (int)ds.Tables[0].Rows[0][0]; result.RecordsCount = (int)ds.Tables[0].Rows[0][0];
@ -2078,7 +2078,7 @@ namespace WebsitePanel.EnterpriseServer
{ {
DataProvider.UpdateExchangeAccount(account.AccountId, account.AccountName, account.AccountType, account.DisplayName, DataProvider.UpdateExchangeAccount(account.AccountId, account.AccountName, account.AccountType, account.DisplayName,
account.PrimaryEmailAddress, account.MailEnabledPublicFolder, account.PrimaryEmailAddress, account.MailEnabledPublicFolder,
account.MailboxManagerActions.ToString(), account.SamAccountName, account.AccountPassword, account.MailboxPlanId, account.MailboxManagerActions.ToString(), account.SamAccountName, account.AccountPassword, account.MailboxPlanId, account.ArchivingMailboxPlanId,
(string.IsNullOrEmpty(account.SubscriberNumber) ? null : account.SubscriberNumber.Trim())); (string.IsNullOrEmpty(account.SubscriberNumber) ? null : account.SubscriberNumber.Trim()));
} }
@ -2635,7 +2635,7 @@ namespace WebsitePanel.EnterpriseServer
DataSet ds = DataSet ds =
DataProvider.GetExchangeAccountsPaged(SecurityContext.User.UserId, itemId, accountTypes, filterColumn, DataProvider.GetExchangeAccountsPaged(SecurityContext.User.UserId, itemId, accountTypes, filterColumn,
filterValue, sortColumn, startRow, maximumRows); filterValue, sortColumn, startRow, maximumRows, false);
ExchangeAccountsPaged result = new ExchangeAccountsPaged(); ExchangeAccountsPaged result = new ExchangeAccountsPaged();
result.RecordsCount = (int)ds.Tables[0].Rows[0][0]; result.RecordsCount = (int)ds.Tables[0].Rows[0][0];

View file

@ -1,4 +1,4 @@
// Copyright (c) 2012, Outercurve Foundation. // Copyright (c) 2012-2014, Outercurve Foundation.
// All rights reserved. // All rights reserved.
// //
// Redistribution and use in source and binary forms, with or without modification, // Redistribution and use in source and binary forms, with or without modification,
@ -166,11 +166,11 @@ namespace WebsitePanel.EnterpriseServer
[WebMethod] [WebMethod]
public ExchangeAccountsPaged GetAccountsPaged(int itemId, string accountTypes, public ExchangeAccountsPaged GetAccountsPaged(int itemId, string accountTypes,
string filterColumn, string filterValue, string sortColumn, string filterColumn, string filterValue, string sortColumn,
int startRow, int maximumRows) int startRow, int maximumRows, bool archiving)
{ {
return ExchangeServerController.GetAccountsPaged(itemId, accountTypes, return ExchangeServerController.GetAccountsPaged(itemId, accountTypes,
filterColumn, filterValue, sortColumn, filterColumn, filterValue, sortColumn,
startRow, maximumRows); startRow, maximumRows, archiving);
} }
[WebMethod] [WebMethod]
@ -222,9 +222,9 @@ namespace WebsitePanel.EnterpriseServer
#region Mailboxes #region Mailboxes
[WebMethod] [WebMethod]
public int CreateMailbox(int itemId, int accountId, ExchangeAccountType accountType, string accountName, string displayName, public int CreateMailbox(int itemId, int accountId, ExchangeAccountType accountType, string accountName, string displayName,
string name, string domain, string password, bool sendSetupInstructions, string setupInstructionMailAddress, int mailboxPlanId, string subscriberNumber) string name, string domain, string password, bool sendSetupInstructions, string setupInstructionMailAddress, int mailboxPlanId, int archivedPlanId, string subscriberNumber)
{ {
return ExchangeServerController.CreateMailbox(itemId, accountId, accountType, accountName, displayName, name, domain, password, sendSetupInstructions, setupInstructionMailAddress, mailboxPlanId, subscriberNumber); return ExchangeServerController.CreateMailbox(itemId, accountId, accountType, accountName, displayName, name, domain, password, sendSetupInstructions, setupInstructionMailAddress, mailboxPlanId, archivedPlanId, subscriberNumber);
} }
[WebMethod] [WebMethod]
@ -303,9 +303,9 @@ namespace WebsitePanel.EnterpriseServer
[WebMethod] [WebMethod]
public int SetExchangeMailboxPlan(int itemId, int accountId, int mailboxPlanId) public int SetExchangeMailboxPlan(int itemId, int accountId, int mailboxPlanId, int archivePlanId)
{ {
return ExchangeServerController.SetExchangeMailboxPlan(itemId, accountId, mailboxPlanId); return ExchangeServerController.SetExchangeMailboxPlan(itemId, accountId, mailboxPlanId, archivePlanId);
} }
[WebMethod] [WebMethod]
@ -527,9 +527,9 @@ namespace WebsitePanel.EnterpriseServer
#region MailboxPlans #region MailboxPlans
[WebMethod] [WebMethod]
public List<ExchangeMailboxPlan> GetExchangeMailboxPlans(int itemId) public List<ExchangeMailboxPlan> GetExchangeMailboxPlans(int itemId, bool archiving)
{ {
return ExchangeServerController.GetExchangeMailboxPlans(itemId); return ExchangeServerController.GetExchangeMailboxPlans(itemId, archiving);
} }
[WebMethod] [WebMethod]

View file

@ -155,5 +155,21 @@ namespace WebsitePanel.Providers.HostedSolution
get { return this.notes; } get { return this.notes; }
set { this.notes = value; } set { this.notes = value; }
} }
int archivingMailboxPlanId;
public int ArchivingMailboxPlanId
{
get { return this.archivingMailboxPlanId; }
set { this.archivingMailboxPlanId = value; }
}
string archivingMailboxPlan;
public string ArchivingMailboxPlan
{
get { return this.archivingMailboxPlan; }
set { this.archivingMailboxPlan = value; }
}
} }
} }

View file

@ -209,5 +209,12 @@ namespace WebsitePanel.Providers.HostedSolution
get { return this.litigationHoldMsg; } get { return this.litigationHoldMsg; }
set { this.litigationHoldMsg = value; } set { this.litigationHoldMsg = value; }
} }
bool archiving;
public bool Archiving
{
get { return this.archiving; }
set { this.archiving = value; }
}
} }
} }

View file

@ -469,7 +469,8 @@
<Control key="organization_home" src="WebsitePanel/ExchangeServer/OrganizationHome.ascx" title="OrganizationHome" type="View" /> <Control key="organization_home" src="WebsitePanel/ExchangeServer/OrganizationHome.ascx" title="OrganizationHome" type="View" />
<Control key="organization_user_setup" src="WebsitePanel/ExchangeServer/OrganizationUserSetupInstructions.ascx" title="OrganizationUserSetupInstructions" type="View" /> <Control key="organization_user_setup" src="WebsitePanel/ExchangeServer/OrganizationUserSetupInstructions.ascx" title="OrganizationUserSetupInstructions" type="View" />
<Control key="mailboxes" src="WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx" title="ExchangeMailboxes" type="View" /> <Control key="mailboxes" src="WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx" title="ExchangeMailboxes" type="View" />
<Control key="create_mailbox" src="WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx" title="ExchangeCreateMailbox" type="View" /> <Control key="archivingmailboxes" src="WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx" title="ExchangeArchivingMailboxes" type="View" />
<Control key="create_mailbox" src="WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx" title="ExchangeCreateMailbox" type="View" />
<Control key="mailbox_settings" src="WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx" title="ExchangeMailboxGeneralSettings" type="View" /> <Control key="mailbox_settings" src="WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx" title="ExchangeMailboxGeneralSettings" type="View" />
<Control key="mailbox_mobile" src="WebsitePanel/ExchangeServer/ExchangeMailboxMobile.ascx" title="ExchangeMailboxMobile" type="View" /> <Control key="mailbox_mobile" src="WebsitePanel/ExchangeServer/ExchangeMailboxMobile.ascx" title="ExchangeMailboxMobile" type="View" />
<Control key="mailbox_mobile_details" src="WebsitePanel/ExchangeServer/ExchangeMailboxMobileDetails.ascx" title="ExchangeMailboxMobile" type="View" /> <Control key="mailbox_mobile_details" src="WebsitePanel/ExchangeServer/ExchangeMailboxMobileDetails.ascx" title="ExchangeMailboxMobile" type="View" />
@ -512,6 +513,7 @@
<Control key="storage_limits" src="WebsitePanel/ExchangeServer/ExchangeStorageLimits.ascx" title="ExchangeStorageLimits" type="View" /> <Control key="storage_limits" src="WebsitePanel/ExchangeServer/ExchangeStorageLimits.ascx" title="ExchangeStorageLimits" type="View" />
<Control key="activesync_policy" src="WebsitePanel/ExchangeServer/ExchangeActiveSyncSettings.ascx" title="ExchangeActiveSyncSettings" type="View" /> <Control key="activesync_policy" src="WebsitePanel/ExchangeServer/ExchangeActiveSyncSettings.ascx" title="ExchangeActiveSyncSettings" type="View" />
<Control key="mailboxplans" src="WebsitePanel/ExchangeServer/ExchangeMailboxPlans.ascx" title="ExchangeMailboxPlans" type="View" /> <Control key="mailboxplans" src="WebsitePanel/ExchangeServer/ExchangeMailboxPlans.ascx" title="ExchangeMailboxPlans" type="View" />
<Control key="archivingmailboxplans" src="WebsitePanel/ExchangeServer/ExchangeMailboxPlans.ascx" title="ExchangeArchivingMailboxPlans" type="View" />
<Control key="add_mailboxplan" src="WebsitePanel/ExchangeServer/ExchangeAddMailboxPlan.ascx" title="ExchangeAddMailboxPlan" type="View" /> <Control key="add_mailboxplan" src="WebsitePanel/ExchangeServer/ExchangeAddMailboxPlan.ascx" title="ExchangeAddMailboxPlan" type="View" />
<Control key="CRMOrganizationDetails" src="WebsitePanel/CRM/CRMOrganizationDetails.ascx" title="ExchangeActiveSyncSettings" type="View" /> <Control key="CRMOrganizationDetails" src="WebsitePanel/CRM/CRMOrganizationDetails.ascx" title="ExchangeActiveSyncSettings" type="View" />

View file

@ -5431,4 +5431,10 @@
<data name="HostedCRM.LicenseProfessional" xml:space="preserve"> <data name="HostedCRM.LicenseProfessional" xml:space="preserve">
<value>Professional</value> <value>Professional</value>
</data> </data>
<data name="Quota.Exchange2013.AllowArchiving" xml:space="preserve">
<value>Allow Archiving</value>
</data>
<data name="Quota.Exchange2013.ArchivingStorage" xml:space="preserve">
<value>Archiving storage, MB</value>
</data>
</root> </root>

View file

@ -49,6 +49,19 @@ namespace WebsitePanel.Portal
return result; return result;
} }
public static bool GetBool(string key)
{
return GetBool(key, false);
}
public static bool GetBool(string key, bool defaultValue)
{
bool result = defaultValue;
try { result = bool.Parse(HttpContext.Current.Request[key]); }
catch { /* do nothing */ }
return result;
}
public static int UserID public static int UserID
{ {
get { return GetInt("UserID"); } get { return GetInt("UserID"); }
@ -195,5 +208,10 @@ namespace WebsitePanel.Portal
{ {
get { return HttpContext.Current.Request["FolderID"] ?? ""; } get { return HttpContext.Current.Request["FolderID"] ?? ""; }
} }
public static string Ctl
{
get { return HttpContext.Current.Request["ctl"] ?? ""; }
}
} }
} }

View file

@ -65,20 +65,20 @@ namespace WebsitePanel.Portal
ExchangeAccountsPaged accounts; ExchangeAccountsPaged accounts;
public int GetExchangeAccountsPagedCount(int itemId, string accountTypes, public int GetExchangeAccountsPagedCount(int itemId, string accountTypes,
string filterColumn, string filterValue) string filterColumn, string filterValue, bool archiving)
{ {
return accounts.RecordsCount; return accounts.RecordsCount;
} }
public ExchangeAccount[] GetExchangeAccountsPaged(int itemId, string accountTypes, public ExchangeAccount[] GetExchangeAccountsPaged(int itemId, string accountTypes,
string filterColumn, string filterValue, string filterColumn, string filterValue,
int maximumRows, int startRowIndex, string sortColumn) int maximumRows, int startRowIndex, string sortColumn, bool archiving)
{ {
if (!String.IsNullOrEmpty(filterValue)) if (!String.IsNullOrEmpty(filterValue))
filterValue = filterValue + "%"; filterValue = filterValue + "%";
accounts = ES.Services.ExchangeServer.GetAccountsPaged(itemId, accounts = ES.Services.ExchangeServer.GetAccountsPaged(itemId,
accountTypes, filterColumn, filterValue, sortColumn, startRowIndex, maximumRows); accountTypes, filterColumn, filterValue, sortColumn, startRowIndex, maximumRows, archiving);
return accounts.PageItems; return accounts.PageItems;
} }

View file

@ -216,4 +216,7 @@
<data name="lblLitigationHoldUrl.Text" xml:space="preserve"> <data name="lblLitigationHoldUrl.Text" xml:space="preserve">
<value>Litigation Hold Url:</value> <value>Litigation Hold Url:</value>
</data> </data>
<data name="locTitleArchiving.Text" xml:space="preserve">
<value>Add Archiving Mailbox plan</value>
</data>
</root> </root>

View file

@ -162,4 +162,7 @@
<data name="Text.PageName" xml:space="preserve"> <data name="Text.PageName" xml:space="preserve">
<value>Mailbox plans</value> <value>Mailbox plans</value>
</data> </data>
<data name="locTitleArchiving.Text" xml:space="preserve">
<value>Archiving Mailbox plans</value>
</data>
</root> </root>

View file

@ -174,4 +174,7 @@
<data name="gvUsersLogin.Header" xml:space="preserve"> <data name="gvUsersLogin.Header" xml:space="preserve">
<value>Login</value> <value>Login</value>
</data> </data>
<data name="locTitleArchiving.Text" xml:space="preserve">
<value>Archiving Mailboxes</value>
</data>
</root> </root>

View file

@ -22,11 +22,13 @@
<div class="Center"> <div class="Center">
<div class="Title"> <div class="Title">
<asp:Image ID="Image1" SkinID="ExchangeDomainNameAdd48" runat="server" /> <asp:Image ID="Image1" SkinID="ExchangeDomainNameAdd48" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Add Mailboxplan"></asp:Localize> <asp:Localize ID="locTitle" runat="server" Text="Add Mailboxplan"></asp:Localize>
</div> </div>
<div class="FormBody"> <div class="FormBody">
<wsp:SimpleMessageBox id="messageBox" runat="server" /> <wsp:SimpleMessageBox id="messageBox" runat="server" />
<asp:HiddenField runat="server" ID="hfArchivingPlan" />
<wsp:CollapsiblePanel id="secMailboxPlan" runat="server" <wsp:CollapsiblePanel id="secMailboxPlan" runat="server"
TargetControlID="MailboxPlan" meta:resourcekey="secMailboxPlan" Text="Mailboxplan"> TargetControlID="MailboxPlan" meta:resourcekey="secMailboxPlan" Text="Mailboxplan">
</wsp:CollapsiblePanel> </wsp:CollapsiblePanel>
@ -165,7 +167,6 @@
</table> </table>
</asp:Panel> </asp:Panel>
<wsp:CollapsiblePanel id="secDeleteRetention" runat="server" <wsp:CollapsiblePanel id="secDeleteRetention" runat="server"
TargetControlID="DeleteRetention" meta:resourcekey="secDeleteRetention" Text="Delete Item Retention"> TargetControlID="DeleteRetention" meta:resourcekey="secDeleteRetention" Text="Delete Item Retention">
</wsp:CollapsiblePanel> </wsp:CollapsiblePanel>

View file

@ -35,6 +35,20 @@ namespace WebsitePanel.Portal.ExchangeServer
{ {
public partial class ExchangeAddMailboxPlan : WebsitePanelModuleBase public partial class ExchangeAddMailboxPlan : WebsitePanelModuleBase
{ {
private bool ArchivingPlan
{
get
{
bool res = false;
bool.TryParse(hfArchivingPlan.Value, out res);
return res;
}
set
{
hfArchivingPlan.Value = value.ToString();
}
}
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
{ {
@ -66,27 +80,7 @@ namespace WebsitePanel.Portal.ExchangeServer
txtLitigationHoldMsg.Text = plan.LitigationHoldMsg; txtLitigationHoldMsg.Text = plan.LitigationHoldMsg;
txtLitigationHoldUrl.Text = plan.LitigationHoldUrl; txtLitigationHoldUrl.Text = plan.LitigationHoldUrl;
ArchivingPlan = plan.Archiving;
/*
txtMailboxPlan.Enabled = false;
mailboxSize.Enabled = false;
maxRecipients.Enabled = false;
maxSendMessageSizeKB.Enabled = false;
maxReceiveMessageSizeKB.Enabled = false;
chkPOP3.Enabled = false;
chkIMAP.Enabled = false;
chkOWA.Enabled = false;
chkMAPI.Enabled = false;
chkActiveSync.Enabled = false;
sizeIssueWarning.Enabled = false;
sizeProhibitSend.Enabled = false;
sizeProhibitSendReceive.Enabled = false;
daysKeepDeletedItems.Enabled = false;
chkHideFromAddressBook.Enabled = false;
btnAdd.Enabled = false;
*/
locTitle.Text = plan.MailboxPlan; locTitle.Text = plan.MailboxPlan;
this.DisableControls = true; this.DisableControls = true;
@ -156,11 +150,19 @@ namespace WebsitePanel.Portal.ExchangeServer
sizeProhibitSend.ValueKB = 100; sizeProhibitSend.ValueKB = 100;
sizeProhibitSendReceive.ValueKB = 100; sizeProhibitSendReceive.ValueKB = 100;
recoverableItemsWarning.ValueKB = 95; recoverableItemsWarning.ValueKB = 95;
ArchivingPlan = PanelRequest.GetBool("archiving", false);
} }
} }
else else
this.DisableControls = true; this.DisableControls = true;
} }
locTitle.Text = ArchivingPlan ? GetLocalizedString("locTitleArchiving.Text") : GetLocalizedString("locTitle.Text");
secMailboxFeatures.Visible = !ArchivingPlan;
secMailboxGeneral.Visible = !ArchivingPlan;
} }
} }
@ -201,8 +203,9 @@ namespace WebsitePanel.Portal.ExchangeServer
plan.RecoverableItemsWarningPct = recoverableItemsWarning.ValueKB; plan.RecoverableItemsWarningPct = recoverableItemsWarning.ValueKB;
if ((plan.RecoverableItemsWarningPct == 0)) plan.RecoverableItemsWarningPct = 100; if ((plan.RecoverableItemsWarningPct == 0)) plan.RecoverableItemsWarningPct = 100;
plan.LitigationHoldMsg = txtLitigationHoldMsg.Text.Trim(); plan.LitigationHoldMsg = txtLitigationHoldMsg.Text.Trim();
plan.LitigationHoldUrl = txtLitigationHoldUrl.Text.Trim(); plan.LitigationHoldUrl = txtLitigationHoldUrl.Text.Trim();
plan.Archiving = ArchivingPlan;
int result = ES.Services.ExchangeServer.AddExchangeMailboxPlan(PanelRequest.ItemID, int result = ES.Services.ExchangeServer.AddExchangeMailboxPlan(PanelRequest.ItemID,
plan); plan);
@ -214,7 +217,7 @@ namespace WebsitePanel.Portal.ExchangeServer
return; return;
} }
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "mailboxplans", Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), ArchivingPlan ? "archivingmailboxplans" : "mailboxplans",
"SpaceID=" + PanelSecurity.PackageId)); "SpaceID=" + PanelSecurity.PackageId));
} }
catch (Exception ex) catch (Exception ex)

View file

@ -66,6 +66,15 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox; protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
/// <summary>
/// hfArchivingPlan control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfArchivingPlan;
/// <summary> /// <summary>
/// secMailboxPlan control. /// secMailboxPlan control.
/// </summary> /// </summary>

View file

@ -142,7 +142,15 @@
<asp:Localize ID="locMailboxplanName" runat="server" meta:resourcekey="locMailboxplanName" Text="Mailboxplan Name: *"></asp:Localize> <asp:Localize ID="locMailboxplanName" runat="server" meta:resourcekey="locMailboxplanName" Text="Mailboxplan Name: *"></asp:Localize>
</td> </td>
<td> <td>
<wsp:MailboxPlanSelector ID="mailboxPlanSelector" runat="server" /> <wsp:MailboxPlanSelector ID="mailboxPlanSelector" runat="server" Archiving="false" />
</td>
</tr>
<tr>
<td class="FormLabel150">
<asp:Localize ID="locArchivingMailboxplanName" runat="server" meta:resourcekey="locArchivingMailboxplanName" Text="Archiving Mailboxplan Name: "></asp:Localize>
</td>
<td>
<wsp:MailboxPlanSelector ID="archivingMailboxPlanSelector" runat="server" Archiving="true" AddNone="true" />
</td> </td>
</tr> </tr>
</table> </table>

View file

@ -84,7 +84,7 @@ namespace WebsitePanel.Portal.ExchangeServer
WebsitePanel.Providers.HostedSolution.ExchangeMailboxPlan[] plans = ES.Services.ExchangeServer.GetExchangeMailboxPlans(PanelRequest.ItemID); WebsitePanel.Providers.HostedSolution.ExchangeMailboxPlan[] plans = ES.Services.ExchangeServer.GetExchangeMailboxPlans(PanelRequest.ItemID, false);
if (plans.Length == 0) if (plans.Length == 0)
btnCreate.Enabled = false; btnCreate.Enabled = false;
@ -138,6 +138,7 @@ namespace WebsitePanel.Portal.ExchangeServer
chkSendInstructions.Checked, chkSendInstructions.Checked,
sendInstructionEmail.Text, sendInstructionEmail.Text,
Convert.ToInt32(mailboxPlanSelector.MailboxPlanId), Convert.ToInt32(mailboxPlanSelector.MailboxPlanId),
Convert.ToInt32(archivingMailboxPlanSelector.MailboxPlanId),
subscriberNumber); subscriberNumber);

View file

@ -1,31 +1,3 @@
// Copyright (c) 2012, 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.
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
@ -355,6 +327,24 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.MailboxPlanSelector mailboxPlanSelector; protected global::WebsitePanel.Portal.ExchangeServer.UserControls.MailboxPlanSelector mailboxPlanSelector;
/// <summary>
/// locArchivingMailboxplanName control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locArchivingMailboxplanName;
/// <summary>
/// archivingMailboxPlanSelector control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.MailboxPlanSelector archivingMailboxPlanSelector;
/// <summary> /// <summary>
/// chkSendInstructions control. /// chkSendInstructions control.
/// </summary> /// </summary>

View file

@ -75,6 +75,28 @@
</asp:UpdatePanel> </asp:UpdatePanel>
</asp:Panel> </asp:Panel>
<wsp:CollapsiblePanel id="secArchiving" runat="server" TargetControlID="Archiving" meta:resourcekey="secArchiving" Text="Archiving"></wsp:CollapsiblePanel>
<asp:Panel ID="Archiving" runat="server" Height="0" style="overflow:hidden;">
<asp:UpdatePanel ID="ArchivingUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
<ContentTemplate>
<table>
<tr>
<td class="FormLabel150"></td>
<td>
<asp:CheckBox ID="chkArchiving" runat="server" meta:resourcekey ="chkArchiving" Text ="Enable Archiving" AutoPostBack="true" OnCheckedChanged="chkArchiving_CheckedChanged"></asp:CheckBox>
</td>
</tr>
<tr runat="server" id="mailboxArchivePlan">
<td class="FormLabel150"><asp:Localize ID="locArchiveMailboxplanName" runat="server" meta:resourcekey="locArchiveMailboxplanName" Text="Archive Mailbox plan: "></asp:Localize></td>
<td>
<wsp:MailboxPlanSelector ID="mailboxArchivePlanSelector" runat="server" Archiving="true" AddNone="true" />
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
<wsp:CollapsiblePanel id="secLitigationHoldSettings" runat="server" TargetControlID="LitigationHoldSettings" meta:resourcekey="secLitigationHoldSettings" Text="Litigation Hold"></wsp:CollapsiblePanel> <wsp:CollapsiblePanel id="secLitigationHoldSettings" runat="server" TargetControlID="LitigationHoldSettings" meta:resourcekey="secLitigationHoldSettings" Text="Litigation Hold"></wsp:CollapsiblePanel>
<asp:Panel ID="LitigationHoldSettings" runat="server" Height="0" style="overflow:hidden;"> <asp:Panel ID="LitigationHoldSettings" runat="server" Height="0" style="overflow:hidden;">
<asp:UpdatePanel ID="LitigationHoldUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true"> <asp:UpdatePanel ID="LitigationHoldUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">

View file

@ -53,6 +53,8 @@ namespace WebsitePanel.Portal.ExchangeServer
ddDisclaimer.Visible = false; ddDisclaimer.Visible = false;
} }
secArchiving.Visible = Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWARCHIVING, cntx);
BindSettings(); BindSettings();
UserInfo user = UsersHelper.GetUser(PanelSecurity.EffectiveUserId); UserInfo user = UsersHelper.GetUser(PanelSecurity.EffectiveUserId);
@ -114,6 +116,15 @@ namespace WebsitePanel.Portal.ExchangeServer
mailboxPlanSelector.MailboxPlanId = account.MailboxPlanId.ToString(); mailboxPlanSelector.MailboxPlanId = account.MailboxPlanId.ToString();
} }
if (account.ArchivingMailboxPlanId<1)
{
mailboxArchivePlanSelector.MailboxPlanId = "-1";
}
else
{
mailboxArchivePlanSelector.MailboxPlanId = account.ArchivingMailboxPlanId.ToString();
}
mailboxSize.QuotaUsedValue = Convert.ToInt32(stats.TotalSize / 1024 / 1024); mailboxSize.QuotaUsedValue = Convert.ToInt32(stats.TotalSize / 1024 / 1024);
mailboxSize.QuotaValue = (stats.MaxSize == -1) ? -1 : (int)Math.Round((double)(stats.MaxSize / 1024 / 1024)); mailboxSize.QuotaValue = (stats.MaxSize == -1) ? -1 : (int)Math.Round((double)(stats.MaxSize / 1024 / 1024));
@ -163,7 +174,8 @@ namespace WebsitePanel.Portal.ExchangeServer
} }
else else
{ {
result = ES.Services.ExchangeServer.SetExchangeMailboxPlan(PanelRequest.ItemID, PanelRequest.AccountID, Convert.ToInt32(mailboxPlanSelector.MailboxPlanId)); result = ES.Services.ExchangeServer.SetExchangeMailboxPlan(PanelRequest.ItemID, PanelRequest.AccountID, Convert.ToInt32(mailboxPlanSelector.MailboxPlanId),
Convert.ToInt32(mailboxArchivePlanSelector.MailboxPlanId) );
if (result < 0) if (result < 0)
{ {
messageBox.ShowResultMessage(result); messageBox.ShowResultMessage(result);
@ -241,5 +253,10 @@ namespace WebsitePanel.Portal.ExchangeServer
return result; return result;
} }
protected void chkArchiving_CheckedChanged(object sender, EventArgs e)
{
mailboxArchivePlan.Visible = chkArchiving.Checked;
}
} }
} }

View file

@ -1,30 +1,3 @@
// Copyright (c) 2012, 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.
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
@ -210,6 +183,69 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.QuotaViewer mailboxSize; protected global::WebsitePanel.Portal.QuotaViewer mailboxSize;
/// <summary>
/// secArchiving control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secArchiving;
/// <summary>
/// Archiving control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel Archiving;
/// <summary>
/// ArchivingUpdatePanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel ArchivingUpdatePanel;
/// <summary>
/// chkArchiving control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox chkArchiving;
/// <summary>
/// mailboxArchivePlan control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow mailboxArchivePlan;
/// <summary>
/// locArchiveMailboxplanName control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locArchiveMailboxplanName;
/// <summary>
/// mailboxArchivePlanSelector control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.MailboxPlanSelector mailboxArchivePlanSelector;
/// <summary> /// <summary>
/// secLitigationHoldSettings control. /// secLitigationHoldSettings control.
/// </summary> /// </summary>

View file

@ -21,7 +21,7 @@
<div class="Center"> <div class="Center">
<div class="Title"> <div class="Title">
<asp:Image ID="Image1" SkinID="ExchangeDomainName48" runat="server" /> <asp:Image ID="Image1" SkinID="ExchangeDomainName48" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Domain Names"></asp:Localize> <asp:Localize ID="locTitle" runat="server"></asp:Localize>
</div> </div>
<div class="FormBody"> <div class="FormBody">
<wsp:SimpleMessageBox id="messageBox" runat="server" /> <wsp:SimpleMessageBox id="messageBox" runat="server" />

View file

@ -35,8 +35,19 @@ namespace WebsitePanel.Portal.ExchangeServer
{ {
public partial class ExchangeMailboxPlans : WebsitePanelModuleBase public partial class ExchangeMailboxPlans : WebsitePanelModuleBase
{ {
private bool ArchivingPlans
{
get
{
return PanelRequest.Ctl.ToLower().Contains("archiving");
}
}
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
{ {
locTitle.Text = ArchivingPlans ? GetLocalizedString("locTitleArchiving.Text") : GetLocalizedString("locTitle.Text");
if (!IsPostBack) if (!IsPostBack)
{ {
// bind mailboxplans // bind mailboxplans
@ -71,7 +82,7 @@ namespace WebsitePanel.Portal.ExchangeServer
private void BindMailboxPlans() private void BindMailboxPlans()
{ {
ExchangeMailboxPlan[] list = ES.Services.ExchangeServer.GetExchangeMailboxPlans(PanelRequest.ItemID); ExchangeMailboxPlan[] list = ES.Services.ExchangeServer.GetExchangeMailboxPlans(PanelRequest.ItemID, ArchivingPlans);
gvMailboxPlans.DataSource = list; gvMailboxPlans.DataSource = list;
gvMailboxPlans.DataBind(); gvMailboxPlans.DataBind();
@ -94,7 +105,7 @@ namespace WebsitePanel.Portal.ExchangeServer
{ {
btnSetDefaultMailboxPlan.Enabled = true; btnSetDefaultMailboxPlan.Enabled = true;
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "add_mailboxplan", Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "add_mailboxplan",
"SpaceID=" + PanelSecurity.PackageId)); "SpaceID=" + PanelSecurity.PackageId, "archiving="+ArchivingPlans));
} }
protected void gvMailboxPlan_RowCommand(object sender, GridViewCommandEventArgs e) protected void gvMailboxPlan_RowCommand(object sender, GridViewCommandEventArgs e)
@ -177,7 +188,7 @@ namespace WebsitePanel.Portal.ExchangeServer
foreach (ExchangeAccount a in Accounts) foreach (ExchangeAccount a in Accounts)
{ {
txtStatus.Text = "Completed"; txtStatus.Text = "Completed";
int result = ES.Services.ExchangeServer.SetExchangeMailboxPlan(PanelRequest.ItemID, a.AccountId, Convert.ToInt32(mailboxPlanSelectorTarget.MailboxPlanId)); int result = ES.Services.ExchangeServer.SetExchangeMailboxPlan(PanelRequest.ItemID, a.AccountId, Convert.ToInt32(mailboxPlanSelectorTarget.MailboxPlanId), a.ArchivingMailboxPlanId);
if (result < 0) if (result < 0)
{ {
BindMailboxPlans(); BindMailboxPlans();

View file

@ -1,33 +1,4 @@
// Copyright (c) 2012, 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.
//------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// //
@ -202,14 +173,5 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Button btnSave; protected global::System.Web.UI.WebControls.Button btnSave;
/// <summary>
/// FormComments control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize FormComments;
} }
} }

View file

@ -19,7 +19,7 @@
<div class="Center"> <div class="Center">
<div class="Title"> <div class="Title">
<asp:Image ID="Image1" SkinID="ExchangeMailbox48" runat="server" /> <asp:Image ID="Image1" SkinID="ExchangeMailbox48" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Mailboxes"></asp:Localize> <asp:Localize ID="locTitle" runat="server" Text="Mailboxes"></asp:Localize>
</div> </div>
<div class="FormBody"> <div class="FormBody">
<wsp:SimpleMessageBox id="messageBox" runat="server" /> <wsp:SimpleMessageBox id="messageBox" runat="server" />
@ -94,12 +94,14 @@
SelectMethod="GetExchangeAccountsPaged" SelectMethod="GetExchangeAccountsPaged"
SortParameterName="sortColumn" SortParameterName="sortColumn"
TypeName="WebsitePanel.Portal.ExchangeHelper" TypeName="WebsitePanel.Portal.ExchangeHelper"
OnSelecting="odsAccountsPaged_Selecting"
OnSelected="odsAccountsPaged_Selected"> OnSelected="odsAccountsPaged_Selected">
<SelectParameters> <SelectParameters>
<asp:QueryStringParameter Name="itemId" QueryStringField="ItemID" DefaultValue="0" /> <asp:QueryStringParameter Name="itemId" QueryStringField="ItemID" DefaultValue="0" />
<asp:Parameter Name="accountTypes" DefaultValue="1,5,6" /> <asp:Parameter Name="accountTypes" DefaultValue="1,5,6" />
<asp:ControlParameter Name="filterColumn" ControlID="ddlSearchColumn" PropertyName="SelectedValue" /> <asp:ControlParameter Name="filterColumn" ControlID="ddlSearchColumn" PropertyName="SelectedValue" />
<asp:ControlParameter Name="filterValue" ControlID="txtSearchValue" PropertyName="Text" /> <asp:ControlParameter Name="filterValue" ControlID="txtSearchValue" PropertyName="Text" />
<asp:Parameter Name="archiving" Type="Boolean" />
</SelectParameters> </SelectParameters>
</asp:ObjectDataSource> </asp:ObjectDataSource>
<br /> <br />

View file

@ -35,8 +35,20 @@ namespace WebsitePanel.Portal.ExchangeServer
{ {
public partial class ExchangeMailboxes : WebsitePanelModuleBase public partial class ExchangeMailboxes : WebsitePanelModuleBase
{ {
private bool ArchivingBoxes
{
get
{
return PanelRequest.Ctl.ToLower().Contains("archiving");
}
}
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
{ {
locTitle.Text = ArchivingBoxes ? GetLocalizedString("locTitleArchiving.Text") : GetLocalizedString("locTitle.Text");
btnCreateMailbox.Visible = !ArchivingBoxes;
if (!IsPostBack) if (!IsPostBack)
{ {
BindStats(); BindStats();
@ -149,5 +161,10 @@ namespace WebsitePanel.Portal.ExchangeServer
"ItemID=" + PanelRequest.ItemID, "ItemID=" + PanelRequest.ItemID,
"Context=User"); "Context=User");
} }
protected void odsAccountsPaged_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
{
e.InputParameters["archiving"] = ArchivingBoxes;
}
} }
} }

View file

@ -216,4 +216,10 @@
<data name="Text.CRMGroup2013" xml:space="preserve"> <data name="Text.CRMGroup2013" xml:space="preserve">
<value>CRM 2013</value> <value>CRM 2013</value>
</data> </data>
<data name="Text.ArchivingMailboxes" xml:space="preserve">
<value>Archiving Mailboxes</value>
</data>
<data name="Text.ArchivingMailboxPlans" xml:space="preserve">
<value>Archiving Mailbox Plans</value>
</data>
</root> </root>

View file

@ -1,4 +1,4 @@
// Copyright (c) 2012, Outercurve Foundation. // Copyright (c) 2012-2014, Outercurve Foundation.
// All rights reserved. // All rights reserved.
// //
// Redistribution and use in source and binary forms, with or without modification, // Redistribution and use in source and binary forms, with or without modification,
@ -70,6 +70,13 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
} }
} }
private bool archiving = false;
public bool Archiving
{
get { return archiving; }
set { archiving = value; }
}
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
{ {
@ -81,7 +88,16 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
private void BindMailboxPlans() private void BindMailboxPlans()
{ {
WebsitePanel.Providers.HostedSolution.ExchangeMailboxPlan[] plans = ES.Services.ExchangeServer.GetExchangeMailboxPlans(PanelRequest.ItemID); WebsitePanel.Providers.HostedSolution.ExchangeMailboxPlan[] plans = ES.Services.ExchangeServer.GetExchangeMailboxPlans(PanelRequest.ItemID, Archiving);
if (AddNone)
{
ListItem li = new ListItem();
li.Text = "None";
li.Value = "-1";
li.Selected = false;
ddlMailboxPlan.Items.Add(li);
}
foreach (WebsitePanel.Providers.HostedSolution.ExchangeMailboxPlan plan in plans) foreach (WebsitePanel.Providers.HostedSolution.ExchangeMailboxPlan plan in plans)
{ {
@ -92,15 +108,6 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
ddlMailboxPlan.Items.Add(li); ddlMailboxPlan.Items.Add(li);
} }
if (AddNone)
{
ListItem li = new ListItem();
li.Text = "[None]";
li.Value = "-1";
li.Selected = false;
ddlMailboxPlan.Items.Add(li);
}
if (!string.IsNullOrEmpty(mailboxPlanToSelect)) if (!string.IsNullOrEmpty(mailboxPlanToSelect))
{ {

View file

@ -1,4 +1,4 @@
// Copyright (c) 2012, Outercurve Foundation. // Copyright (c) 2012-2014, Outercurve Foundation.
// All rights reserved. // All rights reserved.
// //
// Redistribution and use in source and binary forms, with or without modification, // Redistribution and use in source and binary forms, with or without modification,
@ -120,6 +120,9 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
if (Utils.CheckQouta(Quotas.EXCHANGE2007_MAILBOXES, cntx)) if (Utils.CheckQouta(Quotas.EXCHANGE2007_MAILBOXES, cntx))
exchangeGroup.MenuItems.Add(CreateMenuItem("Mailboxes", "mailboxes")); exchangeGroup.MenuItems.Add(CreateMenuItem("Mailboxes", "mailboxes"));
if (Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWARCHIVING, cntx))
exchangeGroup.MenuItems.Add(CreateMenuItem("ArchivingMailboxes", "archivingmailboxes"));
if (Utils.CheckQouta(Quotas.EXCHANGE2007_CONTACTS, cntx)) if (Utils.CheckQouta(Quotas.EXCHANGE2007_CONTACTS, cntx))
exchangeGroup.MenuItems.Add(CreateMenuItem("Contacts", "contacts")); exchangeGroup.MenuItems.Add(CreateMenuItem("Contacts", "contacts"));
@ -137,6 +140,10 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
if (Utils.CheckQouta(Quotas.EXCHANGE2007_MAILBOXES, cntx)) if (Utils.CheckQouta(Quotas.EXCHANGE2007_MAILBOXES, cntx))
exchangeGroup.MenuItems.Add(CreateMenuItem("MailboxPlans", "mailboxplans")); exchangeGroup.MenuItems.Add(CreateMenuItem("MailboxPlans", "mailboxplans"));
if (!hideItems)
if (Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWARCHIVING, cntx))
exchangeGroup.MenuItems.Add(CreateMenuItem("ArchivingMailboxPlans", "archivingmailboxplans"));
if (!hideItems) if (!hideItems)
if (Utils.CheckQouta(Quotas.EXCHANGE2007_MAILBOXES, cntx)) if (Utils.CheckQouta(Quotas.EXCHANGE2007_MAILBOXES, cntx))
exchangeGroup.MenuItems.Add(CreateMenuItem("ExchangeDomainNames", "domains")); exchangeGroup.MenuItems.Add(CreateMenuItem("ExchangeDomainNames", "domains"));

View file

@ -40,6 +40,17 @@
</td> </td>
</tr> </tr>
<tr>
<td class="SubHead" runat="server" id="archivingGroup" width="200" nowrap>
<asp:Localize ID="locArchivingDatabase" runat="server" meta:resourcekey="locArchivingDatabase"
Text="Archiving Database Name:"></asp:Localize>
</td>
<td>
<asp:TextBox ID="txtArchivingDatabase" runat="server" Width="200px"></asp:TextBox>
</td>
</tr>
<tr> <tr>
<td class="SubHead"> <td class="SubHead">
<asp:Localize ID="locKeepDeletedItems" runat="server" meta:resourcekey="locKeepDeletedItems" <asp:Localize ID="locKeepDeletedItems" runat="server" meta:resourcekey="locKeepDeletedItems"

View file

@ -93,6 +93,8 @@ namespace WebsitePanel.Portal.ProviderControls
locMailboxDAG.Visible = false; locMailboxDAG.Visible = false;
powershellUrl1.Visible = powershellUrl2.Visible = false; powershellUrl1.Visible = powershellUrl2.Visible = false;
archivingGroup.Visible = false;
break; break;
case EXCHANGE2010SP2_PROVIDER_ID: case EXCHANGE2010SP2_PROVIDER_ID:
@ -104,6 +106,8 @@ namespace WebsitePanel.Portal.ProviderControls
locMailboxDatabase.Visible = false; locMailboxDatabase.Visible = false;
powershellUrl1.Visible = powershellUrl2.Visible = false; powershellUrl1.Visible = powershellUrl2.Visible = false;
archivingGroup.Visible = false;
break; break;
case EXCHANGE2013_PROVIDER_ID: case EXCHANGE2013_PROVIDER_ID:
@ -115,6 +119,8 @@ namespace WebsitePanel.Portal.ProviderControls
locMailboxDatabase.Visible = false; locMailboxDatabase.Visible = false;
powershellUrl1.Visible = powershellUrl2.Visible = true; powershellUrl1.Visible = powershellUrl2.Visible = true;
archivingGroup.Visible = true;
break; break;
default: default:
@ -123,6 +129,8 @@ namespace WebsitePanel.Portal.ProviderControls
clusteredMailboxServer.Visible = true; clusteredMailboxServer.Visible = true;
txtMailboxClusterName.Text = settings["MailboxCluster"]; txtMailboxClusterName.Text = settings["MailboxCluster"];
locMailboxDAG.Visible = false; locMailboxDAG.Visible = false;
archivingGroup.Visible = false;
break; break;
} }
} }
@ -153,6 +161,8 @@ namespace WebsitePanel.Portal.ProviderControls
txtPublicFolderServer.Text = settings["PublicFolderServer"]; txtPublicFolderServer.Text = settings["PublicFolderServer"];
txtPowerShellUrl.Text = settings["PowerShellUrl"]; txtPowerShellUrl.Text = settings["PowerShellUrl"];
txtArchivingDatabase.Text = settings["ArchivingDatabase"];
UpdateHubTransportsGrid(); UpdateHubTransportsGrid();
UpdateClientAccessGrid(); UpdateClientAccessGrid();
@ -179,6 +189,9 @@ namespace WebsitePanel.Portal.ProviderControls
settings["StorageGroup"] = txtStorageGroup.Text; settings["StorageGroup"] = txtStorageGroup.Text;
settings["PowerShellUrl"] = txtPowerShellUrl.Text; settings["PowerShellUrl"] = txtPowerShellUrl.Text;
settings["ArchivingDatabase"] = txtArchivingDatabase.Text;
} }
public void BindExchangeServices(DropDownList ddl, bool isHubservice) public void BindExchangeServices(DropDownList ddl, bool isHubservice)

View file

@ -1,31 +1,3 @@
// Copyright (c) 2012, 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.
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
@ -139,6 +111,33 @@ namespace WebsitePanel.Portal.ProviderControls {
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtMailboxDatabase; protected global::System.Web.UI.WebControls.TextBox txtMailboxDatabase;
/// <summary>
/// archivingGroup control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableCell archivingGroup;
/// <summary>
/// locArchivingDatabase control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locArchivingDatabase;
/// <summary>
/// txtArchivingDatabase control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtArchivingDatabase;
/// <summary> /// <summary>
/// locKeepDeletedItems control. /// locKeepDeletedItems control.
/// </summary> /// </summary>

View file

@ -81,7 +81,7 @@ namespace WebsitePanel.Portal
if ((orgs != null) & (orgs.GetLength(0) > 0)) if ((orgs != null) & (orgs.GetLength(0) > 0))
{ {
ExchangeMailboxPlan[] list = ES.Services.ExchangeServer.GetExchangeMailboxPlans(orgs[0].Id); ExchangeMailboxPlan[] list = ES.Services.ExchangeServer.GetExchangeMailboxPlans(orgs[0].Id, false);
gvMailboxPlans.DataSource = list; gvMailboxPlans.DataSource = list;
gvMailboxPlans.DataBind(); gvMailboxPlans.DataBind();
@ -470,7 +470,7 @@ namespace WebsitePanel.Portal
foreach (ExchangeAccount a in Accounts) foreach (ExchangeAccount a in Accounts)
{ {
txtStatus.Text = "Completed"; txtStatus.Text = "Completed";
int result = ES.Services.ExchangeServer.SetExchangeMailboxPlan(org.Id, a.AccountId, destinationMailboxPlanId); int result = ES.Services.ExchangeServer.SetExchangeMailboxPlan(org.Id, a.AccountId, destinationMailboxPlanId, a.ArchivingMailboxPlanId);
if (result < 0) if (result < 0)
{ {
BindMailboxPlans(); BindMailboxPlans();