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

@ -469,7 +469,8 @@
<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="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_mobile" src="WebsitePanel/ExchangeServer/ExchangeMailboxMobile.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="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="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="CRMOrganizationDetails" src="WebsitePanel/CRM/CRMOrganizationDetails.ascx" title="ExchangeActiveSyncSettings" type="View" />

View file

@ -5431,4 +5431,10 @@
<data name="HostedCRM.LicenseProfessional" xml:space="preserve">
<value>Professional</value>
</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>

View file

@ -49,6 +49,19 @@ namespace WebsitePanel.Portal
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
{
get { return GetInt("UserID"); }
@ -195,5 +208,10 @@ namespace WebsitePanel.Portal
{
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;
public int GetExchangeAccountsPagedCount(int itemId, string accountTypes,
string filterColumn, string filterValue)
string filterColumn, string filterValue, bool archiving)
{
return accounts.RecordsCount;
}
public ExchangeAccount[] GetExchangeAccountsPaged(int itemId, string accountTypes,
string filterColumn, string filterValue,
int maximumRows, int startRowIndex, string sortColumn)
int maximumRows, int startRowIndex, string sortColumn, bool archiving)
{
if (!String.IsNullOrEmpty(filterValue))
filterValue = filterValue + "%";
accounts = ES.Services.ExchangeServer.GetAccountsPaged(itemId,
accountTypes, filterColumn, filterValue, sortColumn, startRowIndex, maximumRows);
accounts = ES.Services.ExchangeServer.GetAccountsPaged(itemId,
accountTypes, filterColumn, filterValue, sortColumn, startRowIndex, maximumRows, archiving);
return accounts.PageItems;
}

View file

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

View file

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

View file

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

View file

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

View file

@ -35,6 +35,20 @@ namespace WebsitePanel.Portal.ExchangeServer
{
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)
{
@ -66,27 +80,7 @@ namespace WebsitePanel.Portal.ExchangeServer
txtLitigationHoldMsg.Text = plan.LitigationHoldMsg;
txtLitigationHoldUrl.Text = plan.LitigationHoldUrl;
/*
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;
*/
ArchivingPlan = plan.Archiving;
locTitle.Text = plan.MailboxPlan;
this.DisableControls = true;
@ -156,11 +150,19 @@ namespace WebsitePanel.Portal.ExchangeServer
sizeProhibitSend.ValueKB = 100;
sizeProhibitSendReceive.ValueKB = 100;
recoverableItemsWarning.ValueKB = 95;
ArchivingPlan = PanelRequest.GetBool("archiving", false);
}
}
else
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;
if ((plan.RecoverableItemsWarningPct == 0)) plan.RecoverableItemsWarningPct = 100;
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,
plan);
@ -214,7 +217,7 @@ namespace WebsitePanel.Portal.ExchangeServer
return;
}
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "mailboxplans",
Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), ArchivingPlan ? "archivingmailboxplans" : "mailboxplans",
"SpaceID=" + PanelSecurity.PackageId));
}
catch (Exception ex)

View file

@ -66,6 +66,15 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// </remarks>
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>
/// secMailboxPlan control.
/// </summary>

View file

@ -142,7 +142,15 @@
<asp:Localize ID="locMailboxplanName" runat="server" meta:resourcekey="locMailboxplanName" Text="Mailboxplan Name: *"></asp:Localize>
</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>
</tr>
</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)
btnCreate.Enabled = false;
@ -138,6 +138,7 @@ namespace WebsitePanel.Portal.ExchangeServer
chkSendInstructions.Checked,
sendInstructionEmail.Text,
Convert.ToInt32(mailboxPlanSelector.MailboxPlanId),
Convert.ToInt32(archivingMailboxPlanSelector.MailboxPlanId),
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>
// This code was generated by a tool.
@ -355,6 +327,24 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// </remarks>
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>
/// chkSendInstructions control.
/// </summary>

View file

@ -75,6 +75,28 @@
</asp:UpdatePanel>
</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>
<asp:Panel ID="LitigationHoldSettings" runat="server" Height="0" style="overflow:hidden;">
<asp:UpdatePanel ID="LitigationHoldUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">

View file

@ -53,6 +53,8 @@ namespace WebsitePanel.Portal.ExchangeServer
ddDisclaimer.Visible = false;
}
secArchiving.Visible = Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWARCHIVING, cntx);
BindSettings();
UserInfo user = UsersHelper.GetUser(PanelSecurity.EffectiveUserId);
@ -114,6 +116,15 @@ namespace WebsitePanel.Portal.ExchangeServer
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.QuotaValue = (stats.MaxSize == -1) ? -1 : (int)Math.Round((double)(stats.MaxSize / 1024 / 1024));
@ -163,7 +174,8 @@ namespace WebsitePanel.Portal.ExchangeServer
}
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)
{
messageBox.ShowResultMessage(result);
@ -241,5 +253,10 @@ namespace WebsitePanel.Portal.ExchangeServer
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>
// This code was generated by a tool.
@ -210,6 +183,69 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// </remarks>
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>
/// secLitigationHoldSettings control.
/// </summary>

View file

@ -21,7 +21,7 @@
<div class="Center">
<div class="Title">
<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 class="FormBody">
<wsp:SimpleMessageBox id="messageBox" runat="server" />

View file

@ -35,8 +35,19 @@ namespace WebsitePanel.Portal.ExchangeServer
{
public partial class ExchangeMailboxPlans : WebsitePanelModuleBase
{
private bool ArchivingPlans
{
get
{
return PanelRequest.Ctl.ToLower().Contains("archiving");
}
}
protected void Page_Load(object sender, EventArgs e)
{
locTitle.Text = ArchivingPlans ? GetLocalizedString("locTitleArchiving.Text") : GetLocalizedString("locTitle.Text");
if (!IsPostBack)
{
// bind mailboxplans
@ -71,7 +82,7 @@ namespace WebsitePanel.Portal.ExchangeServer
private void BindMailboxPlans()
{
ExchangeMailboxPlan[] list = ES.Services.ExchangeServer.GetExchangeMailboxPlans(PanelRequest.ItemID);
ExchangeMailboxPlan[] list = ES.Services.ExchangeServer.GetExchangeMailboxPlans(PanelRequest.ItemID, ArchivingPlans);
gvMailboxPlans.DataSource = list;
gvMailboxPlans.DataBind();
@ -94,7 +105,7 @@ namespace WebsitePanel.Portal.ExchangeServer
{
btnSetDefaultMailboxPlan.Enabled = true;
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)
@ -177,7 +188,7 @@ namespace WebsitePanel.Portal.ExchangeServer
foreach (ExchangeAccount a in Accounts)
{
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)
{
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>
// 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.
/// </remarks>
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="Title">
<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 class="FormBody">
<wsp:SimpleMessageBox id="messageBox" runat="server" />
@ -94,12 +94,14 @@
SelectMethod="GetExchangeAccountsPaged"
SortParameterName="sortColumn"
TypeName="WebsitePanel.Portal.ExchangeHelper"
OnSelecting="odsAccountsPaged_Selecting"
OnSelected="odsAccountsPaged_Selected">
<SelectParameters>
<asp:QueryStringParameter Name="itemId" QueryStringField="ItemID" DefaultValue="0" />
<asp:Parameter Name="accountTypes" DefaultValue="1,5,6" />
<asp:ControlParameter Name="filterColumn" ControlID="ddlSearchColumn" PropertyName="SelectedValue" />
<asp:ControlParameter Name="filterValue" ControlID="txtSearchValue" PropertyName="Text" />
<asp:Parameter Name="archiving" Type="Boolean" />
</SelectParameters>
</asp:ObjectDataSource>
<br />

View file

@ -35,8 +35,20 @@ namespace WebsitePanel.Portal.ExchangeServer
{
public partial class ExchangeMailboxes : WebsitePanelModuleBase
{
private bool ArchivingBoxes
{
get
{
return PanelRequest.Ctl.ToLower().Contains("archiving");
}
}
protected void Page_Load(object sender, EventArgs e)
{
locTitle.Text = ArchivingBoxes ? GetLocalizedString("locTitleArchiving.Text") : GetLocalizedString("locTitle.Text");
btnCreateMailbox.Visible = !ArchivingBoxes;
if (!IsPostBack)
{
BindStats();
@ -149,5 +161,10 @@ namespace WebsitePanel.Portal.ExchangeServer
"ItemID=" + PanelRequest.ItemID,
"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">
<value>CRM 2013</value>
</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>

View file

@ -1,4 +1,4 @@
// Copyright (c) 2012, Outercurve Foundation.
// Copyright (c) 2012-2014, Outercurve Foundation.
// All rights reserved.
//
// 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)
{
@ -81,7 +88,16 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
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)
{
@ -92,15 +108,6 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
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))
{

View file

@ -1,4 +1,4 @@
// Copyright (c) 2012, Outercurve Foundation.
// Copyright (c) 2012-2014, Outercurve Foundation.
// All rights reserved.
//
// 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))
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))
exchangeGroup.MenuItems.Add(CreateMenuItem("Contacts", "contacts"));
@ -137,6 +140,10 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
if (Utils.CheckQouta(Quotas.EXCHANGE2007_MAILBOXES, cntx))
exchangeGroup.MenuItems.Add(CreateMenuItem("MailboxPlans", "mailboxplans"));
if (!hideItems)
if (Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWARCHIVING, cntx))
exchangeGroup.MenuItems.Add(CreateMenuItem("ArchivingMailboxPlans", "archivingmailboxplans"));
if (!hideItems)
if (Utils.CheckQouta(Quotas.EXCHANGE2007_MAILBOXES, cntx))
exchangeGroup.MenuItems.Add(CreateMenuItem("ExchangeDomainNames", "domains"));

View file

@ -40,6 +40,17 @@
</td>
</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>
<td class="SubHead">
<asp:Localize ID="locKeepDeletedItems" runat="server" meta:resourcekey="locKeepDeletedItems"

View file

@ -93,6 +93,8 @@ namespace WebsitePanel.Portal.ProviderControls
locMailboxDAG.Visible = false;
powershellUrl1.Visible = powershellUrl2.Visible = false;
archivingGroup.Visible = false;
break;
case EXCHANGE2010SP2_PROVIDER_ID:
@ -104,6 +106,8 @@ namespace WebsitePanel.Portal.ProviderControls
locMailboxDatabase.Visible = false;
powershellUrl1.Visible = powershellUrl2.Visible = false;
archivingGroup.Visible = false;
break;
case EXCHANGE2013_PROVIDER_ID:
@ -115,6 +119,8 @@ namespace WebsitePanel.Portal.ProviderControls
locMailboxDatabase.Visible = false;
powershellUrl1.Visible = powershellUrl2.Visible = true;
archivingGroup.Visible = true;
break;
default:
@ -123,6 +129,8 @@ namespace WebsitePanel.Portal.ProviderControls
clusteredMailboxServer.Visible = true;
txtMailboxClusterName.Text = settings["MailboxCluster"];
locMailboxDAG.Visible = false;
archivingGroup.Visible = false;
break;
}
}
@ -153,6 +161,8 @@ namespace WebsitePanel.Portal.ProviderControls
txtPublicFolderServer.Text = settings["PublicFolderServer"];
txtPowerShellUrl.Text = settings["PowerShellUrl"];
txtArchivingDatabase.Text = settings["ArchivingDatabase"];
UpdateHubTransportsGrid();
UpdateClientAccessGrid();
@ -179,6 +189,9 @@ namespace WebsitePanel.Portal.ProviderControls
settings["StorageGroup"] = txtStorageGroup.Text;
settings["PowerShellUrl"] = txtPowerShellUrl.Text;
settings["ArchivingDatabase"] = txtArchivingDatabase.Text;
}
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>
// This code was generated by a tool.
@ -139,6 +111,33 @@ namespace WebsitePanel.Portal.ProviderControls {
/// </remarks>
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>
/// locKeepDeletedItems control.
/// </summary>

View file

@ -81,7 +81,7 @@ namespace WebsitePanel.Portal
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.DataBind();
@ -470,7 +470,7 @@ namespace WebsitePanel.Portal
foreach (ExchangeAccount a in Accounts)
{
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)
{
BindMailboxPlans();