add webdav folder quota
This commit is contained in:
parent
0611d7bf8f
commit
4514eb02e9
18 changed files with 223 additions and 200 deletions
|
@ -455,7 +455,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
// check if it's not root folder
|
// check if it's not root folder
|
||||||
if (!string.IsNullOrEmpty(folderName))
|
if (!string.IsNullOrEmpty(folderName))
|
||||||
{
|
{
|
||||||
UpdateESHardQuota(org.PackageId, org.OrganizationId, folderName, quota);
|
SetFolderQuota(org.PackageId, org.OrganizationId, folderName, quota);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -870,33 +870,64 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void UpdateESHardQuota(int packageId, string orgId, string folderName, int quotaSize)
|
private static void SetFolderQuota(int packageId, string orgId, string folderName, int quotaSize)
|
||||||
{
|
{
|
||||||
|
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);
|
||||||
|
if (accountCheck < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
int packageCheck = SecurityContext.CheckPackage(packageId, DemandPackage.IsActive);
|
||||||
|
if (packageCheck < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
int esServiceId = PackageController.GetPackageServiceId(packageId, ResourceGroups.EnterpriseStorage);
|
int esServiceId = PackageController.GetPackageServiceId(packageId, ResourceGroups.EnterpriseStorage);
|
||||||
|
|
||||||
if (esServiceId != 0)
|
if (esServiceId != 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
StringDictionary esSesstings = ServerController.GetServiceSettings(esServiceId);
|
StringDictionary esSesstings = ServerController.GetServiceSettings(esServiceId);
|
||||||
|
|
||||||
string usersHome = esSesstings["UsersHome"];
|
string usersHome = esSesstings["UsersHome"];
|
||||||
string usersDomain = esSesstings["UsersDomain"];
|
string usersDomain = esSesstings["UsersDomain"];
|
||||||
string locationDrive = esSesstings["LocationDrive"];
|
string locationDrive = esSesstings["LocationDrive"];
|
||||||
|
|
||||||
var orgRootFolder = Path.Combine(usersHome, orgId);
|
|
||||||
var orgFolder = Path.Combine(usersHome, orgId, folderName);
|
var orgFolder = Path.Combine(usersHome, orgId, folderName);
|
||||||
|
|
||||||
bool enableHardQuota = (esSesstings["enablehardquota"] != null)
|
FSRMQuotaType quotaType = (esSesstings["enablehardquota"] != null)
|
||||||
? bool.Parse(esSesstings["enablehardquota"])
|
? bool.Parse(esSesstings["enablehardquota"]) == true ? FSRMQuotaType.Hard : FSRMQuotaType.Soft
|
||||||
: false;
|
: FSRMQuotaType.Soft;
|
||||||
if (enableHardQuota)
|
|
||||||
{
|
|
||||||
var os = GetOS(packageId);
|
|
||||||
|
|
||||||
if (os != null && os.CheckFileServicesInstallation())
|
var os = GetOS(packageId);
|
||||||
|
|
||||||
|
if (os != null && os.CheckFileServicesInstallation())
|
||||||
|
{
|
||||||
|
TaskManager.StartTask("FILES", "SET_QUOTA_ON_FOLDER", orgFolder, packageId);
|
||||||
|
|
||||||
|
try
|
||||||
{
|
{
|
||||||
SetFolderQuotaByQuotaName(packageId, os, orgRootFolder, locationDrive, Quotas.ENTERPRISESTORAGE_DISKSTORAGESPACE);
|
QuotaValueInfo diskSpaceQuota = PackageController.GetPackageQuota(packageId, Quotas.ENTERPRISESTORAGE_DISKSTORAGESPACE);
|
||||||
SetFolderQuotaByQuotaSize(packageId, os, orgFolder, locationDrive, quotaSize, "MB");
|
|
||||||
|
#region figure Quota Unit
|
||||||
|
|
||||||
|
// Quota Unit
|
||||||
|
string unit = string.Empty;
|
||||||
|
if (diskSpaceQuota.QuotaDescription.ToLower().Contains("gb"))
|
||||||
|
unit = "GB";
|
||||||
|
else if (diskSpaceQuota.QuotaDescription.ToLower().Contains("mb"))
|
||||||
|
unit = "MB";
|
||||||
|
else
|
||||||
|
unit = "KB";
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
os.SetQuotaLimitOnFolder(orgFolder, locationDrive, quotaType, quotaSize.ToString() + unit, 0, String.Empty, String.Empty);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
TaskManager.WriteError(ex);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
TaskManager.CompleteTask();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -947,88 +978,6 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int SetFolderQuotaByQuotaName(int packageId, WebsitePanel.Providers.OS.OperatingSystem os, string path, string driveName, string quotaName)
|
|
||||||
{
|
|
||||||
|
|
||||||
// check account
|
|
||||||
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);
|
|
||||||
if (accountCheck < 0) return accountCheck;
|
|
||||||
|
|
||||||
// check package
|
|
||||||
int packageCheck = SecurityContext.CheckPackage(packageId, DemandPackage.IsActive);
|
|
||||||
if (packageCheck < 0) return packageCheck;
|
|
||||||
|
|
||||||
// place log record
|
|
||||||
TaskManager.StartTask("FILES", "SET_QUOTA_ON_FOLDER", path, packageId);
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
// disk space quota
|
|
||||||
// This gets all the disk space allocated for a specific customer
|
|
||||||
// It includes the package Add Ons * Quatity + Hosting Plan System disk space value. //Quotas.OS_DISKSPACE
|
|
||||||
QuotaValueInfo diskSpaceQuota = PackageController.GetPackageQuota(packageId, quotaName);
|
|
||||||
|
|
||||||
#region figure Quota Unit
|
|
||||||
|
|
||||||
// Quota Unit
|
|
||||||
string unit = string.Empty;
|
|
||||||
if (diskSpaceQuota.QuotaDescription.ToLower().Contains("gb"))
|
|
||||||
unit = "GB";
|
|
||||||
else if (diskSpaceQuota.QuotaDescription.ToLower().Contains("mb"))
|
|
||||||
unit = "MB";
|
|
||||||
else
|
|
||||||
unit = "KB";
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
os.SetQuotaLimitOnFolder(path, driveName, diskSpaceQuota.QuotaAllocatedValue.ToString() + unit, 0, String.Empty, String.Empty);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
//Log and return a generic error rather than throwing an exception
|
|
||||||
TaskManager.WriteError(ex);
|
|
||||||
return BusinessErrorCodes.ERROR_FILE_GENERIC_LOGGED;
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
TaskManager.CompleteTask();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static int SetFolderQuotaByQuotaSize(int packageId,WebsitePanel.Providers.OS.OperatingSystem os, string path, string driveName, int quotaSize ,string unit)
|
|
||||||
{
|
|
||||||
|
|
||||||
// check account
|
|
||||||
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);
|
|
||||||
if (accountCheck < 0) return accountCheck;
|
|
||||||
|
|
||||||
// check package
|
|
||||||
int packageCheck = SecurityContext.CheckPackage(packageId, DemandPackage.IsActive);
|
|
||||||
if (packageCheck < 0) return packageCheck;
|
|
||||||
|
|
||||||
// place log record
|
|
||||||
TaskManager.StartTask("FILES", "SET_QUOTA_ON_FOLDER", path, packageId);
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
os.SetQuotaLimitOnFolder(path, driveName, quotaSize.ToString() + unit, 0, String.Empty, String.Empty);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
//Log and return a generic error rather than throwing an exception
|
|
||||||
TaskManager.WriteError(ex);
|
|
||||||
return BusinessErrorCodes.ERROR_FILE_GENERIC_LOGGED;
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
TaskManager.CompleteTask();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static WebsitePanel.Providers.OS.OperatingSystem GetOS(int packageId)
|
private static WebsitePanel.Providers.OS.OperatingSystem GetOS(int packageId)
|
||||||
{
|
{
|
||||||
var esServiceInfo = ServerController.GetServiceInfo(GetEnterpriseStorageServiceID(packageId));
|
var esServiceInfo = ServerController.GetServiceInfo(GetEnterpriseStorageServiceID(packageId));
|
||||||
|
@ -1037,7 +986,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
var osGroups = ServerController.GetResourceGroupByName(ResourceGroups.Os);
|
var osGroups = ServerController.GetResourceGroupByName(ResourceGroups.Os);
|
||||||
var osProviders = ServerController.GetProvidersByGroupID(osGroups.GroupId);
|
var osProviders = ServerController.GetProvidersByGroupID(osGroups.GroupId);
|
||||||
|
|
||||||
var regexResult = Regex.Match(esProviderInfo.ProviderType,"Windows([0-9]+)");
|
var regexResult = Regex.Match(esProviderInfo.ProviderType, "Windows([0-9]+)");
|
||||||
|
|
||||||
if(regexResult.Success)
|
if(regexResult.Success)
|
||||||
{
|
{
|
||||||
|
@ -1054,12 +1003,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
cnfg.ProviderSettings.ProviderCode = osProvider.ProviderName;
|
cnfg.ProviderSettings.ProviderCode = osProvider.ProviderName;
|
||||||
cnfg.ProviderSettings.ProviderName = osProvider.DisplayName;
|
cnfg.ProviderSettings.ProviderName = osProvider.DisplayName;
|
||||||
cnfg.ProviderSettings.ProviderType = osProvider.ProviderType;
|
cnfg.ProviderSettings.ProviderType = osProvider.ProviderType;
|
||||||
|
|
||||||
//// set service settings
|
|
||||||
//StringDictionary serviceSettings = ServerController.GetServiceSettings(serviceId);
|
|
||||||
//foreach (string key in serviceSettings.Keys)
|
|
||||||
// cnfg.ProviderSettings.Settings[key] = serviceSettings[key];
|
|
||||||
|
|
||||||
ServiceProviderProxy.ServerInit(os, cnfg, esServiceInfo.ServerId);
|
ServiceProviderProxy.ServerInit(os, cnfg, esServiceInfo.ServerId);
|
||||||
|
|
||||||
return os;
|
return os;
|
||||||
|
|
|
@ -948,7 +948,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
OS.OperatingSystem os = GetOS(packageId);
|
OS.OperatingSystem os = GetOS(packageId);
|
||||||
|
|
||||||
os.SetQuotaLimitOnFolder(path, driveName, diskSpaceQuota.QuotaAllocatedValue.ToString() + unit, 0, String.Empty, String.Empty);
|
os.SetQuotaLimitOnFolder(path, driveName, FSRMQuotaType.Hard, diskSpaceQuota.QuotaAllocatedValue.ToString() + unit, 0, String.Empty, String.Empty);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -150,7 +150,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
}
|
}
|
||||||
|
|
||||||
[WebMethod]
|
[WebMethod]
|
||||||
public void SetEnterpriseFolderSettings(int itemId, SystemFile folder, ESPermission[] permissions, bool directoyBrowsingEnabled,int quota)
|
public void SetEnterpriseFolderSettings(int itemId, SystemFile folder, ESPermission[] permissions, bool directoyBrowsingEnabled, int quota)
|
||||||
{
|
{
|
||||||
EnterpriseStorageController.SetDirectoryBrowseEnabled(itemId, folder.Url, directoyBrowsingEnabled);
|
EnterpriseStorageController.SetDirectoryBrowseEnabled(itemId, folder.Url, directoyBrowsingEnabled);
|
||||||
EnterpriseStorageController.SetFolderPermission(itemId, folder.Name, permissions);
|
EnterpriseStorageController.SetFolderPermission(itemId, folder.Name, permissions);
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace WebsitePanel.Providers.OS
|
||||||
|
{
|
||||||
|
public enum FSRMQuotaType
|
||||||
|
{
|
||||||
|
Soft = 1,
|
||||||
|
Hard = 2
|
||||||
|
}
|
||||||
|
}
|
|
@ -82,7 +82,7 @@ namespace WebsitePanel.Providers.OS
|
||||||
FolderGraph GetFolderGraph(string path);
|
FolderGraph GetFolderGraph(string path);
|
||||||
void ExecuteSyncActions(FileSyncAction[] actions);
|
void ExecuteSyncActions(FileSyncAction[] actions);
|
||||||
|
|
||||||
void SetQuotaLimitOnFolder(string folderPath, string shareNameDrive, string quotaLimit, int mode, string wmiUserName, string wmiPassword);
|
void SetQuotaLimitOnFolder(string folderPath, string shareNameDrive, FSRMQuotaType quotaType, string quotaLimit, int mode, string wmiUserName, string wmiPassword);
|
||||||
int GetQuotaLimitOnFolder(string folderPath, string wmiUserName, string wmiPassword);
|
int GetQuotaLimitOnFolder(string folderPath, string wmiUserName, string wmiPassword);
|
||||||
void DeleteDirectoryRecursive(string rootPath);
|
void DeleteDirectoryRecursive(string rootPath);
|
||||||
|
|
||||||
|
|
|
@ -113,6 +113,7 @@
|
||||||
<Compile Include="HostedSolution\LyncVoicePolicyType.cs" />
|
<Compile Include="HostedSolution\LyncVoicePolicyType.cs" />
|
||||||
<Compile Include="HostedSolution\OrganizationSecurityGroup.cs" />
|
<Compile Include="HostedSolution\OrganizationSecurityGroup.cs" />
|
||||||
<Compile Include="HostedSolution\TransactionAction.cs" />
|
<Compile Include="HostedSolution\TransactionAction.cs" />
|
||||||
|
<Compile Include="OS\FSRMQuotaType.cs" />
|
||||||
<Compile Include="OS\SystemFilesPaged.cs" />
|
<Compile Include="OS\SystemFilesPaged.cs" />
|
||||||
<Compile Include="RemoteDesktopServices\IRemoteDesktopServices.cs" />
|
<Compile Include="RemoteDesktopServices\IRemoteDesktopServices.cs" />
|
||||||
<Compile Include="ResultObjects\HeliconApe.cs" />
|
<Compile Include="ResultObjects\HeliconApe.cs" />
|
||||||
|
|
|
@ -80,17 +80,23 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
||||||
{
|
{
|
||||||
string fullName = System.IO.Path.Combine(rootPath, dir.Name);
|
string fullName = System.IO.Path.Combine(rootPath, dir.Name);
|
||||||
|
|
||||||
SystemFile folder = new SystemFile(dir.Name, fullName, true,
|
SystemFile folder = new SystemFile();
|
||||||
FileUtils.BytesToMb(FileUtils.CalculateFolderSize(dir.FullName)), dir.CreationTime, dir.LastWriteTime);
|
|
||||||
|
folder.Name = dir.Name;
|
||||||
|
folder.FullName = dir.FullName;
|
||||||
|
folder.IsDirectory = true;
|
||||||
|
|
||||||
|
folder.Size = windows.GetUsageOnFolder(fullName);
|
||||||
|
if (folder.Size == -1)
|
||||||
|
{
|
||||||
|
folder.Size = FileUtils.BytesToMb(FileUtils.CalculateFolderSize(dir.FullName));
|
||||||
|
}
|
||||||
|
|
||||||
folder.Url = string.Format("https://{0}/{1}/{2}", UsersDomain, organizationId, dir.Name);
|
folder.Url = string.Format("https://{0}/{1}/{2}", UsersDomain, organizationId, dir.Name);
|
||||||
folder.Rules = webdav.GetFolderWebDavRules(organizationId, dir.Name);
|
folder.Rules = webdav.GetFolderWebDavRules(organizationId, dir.Name);
|
||||||
folder.FRSMQuotaMB = windows.GetQuotaLimitOnFolder(fullName, string.Empty, string.Empty);
|
folder.FRSMQuotaMB = windows.GetQuotaLimitOnFolder(fullName, string.Empty, string.Empty);
|
||||||
|
|
||||||
items.Add(folder);
|
items.Add(folder);
|
||||||
|
|
||||||
// check if the directory is empty
|
|
||||||
folder.IsEmpty = (Directory.GetFileSystemEntries(fullName).Length == 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,14 +114,23 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
||||||
{
|
{
|
||||||
DirectoryInfo root = new DirectoryInfo(fullName);
|
DirectoryInfo root = new DirectoryInfo(fullName);
|
||||||
|
|
||||||
folder = new SystemFile(root.Name, fullName, true,
|
folder = new SystemFile();
|
||||||
FileUtils.BytesToMb(FileUtils.CalculateFolderSize(root.FullName)), root.CreationTime, root.LastWriteTime);
|
|
||||||
|
folder.Name = root.Name;
|
||||||
|
folder.FullName = root.FullName;
|
||||||
|
folder.IsDirectory = true;
|
||||||
|
|
||||||
|
folder.Size = windows.GetUsageOnFolder(fullName);
|
||||||
|
if (folder.Size == -1)
|
||||||
|
{
|
||||||
|
folder.Size = FileUtils.BytesToMb(FileUtils.CalculateFolderSize(root.FullName));
|
||||||
|
}
|
||||||
|
|
||||||
folder.Url = string.Format("https://{0}/{1}/{2}", UsersDomain, organizationId, folderName);
|
folder.Url = string.Format("https://{0}/{1}/{2}", UsersDomain, organizationId, folderName);
|
||||||
folder.Rules = GetFolderWebDavRules(organizationId, folderName);
|
folder.Rules = GetFolderWebDavRules(organizationId, folderName);
|
||||||
|
|
||||||
folder.FRSMQuotaMB = windows.GetQuotaLimitOnFolder(fullName, string.Empty, string.Empty);
|
folder.FRSMQuotaMB = windows.GetQuotaLimitOnFolder(fullName, string.Empty, string.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
return folder;
|
return folder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -209,8 +209,8 @@ namespace WebsitePanel.Providers.OS
|
||||||
SecurityUtils.GrantGroupNtfsPermissions(path, users, resetChildPermissions,
|
SecurityUtils.GrantGroupNtfsPermissions(path, users, resetChildPermissions,
|
||||||
ServerSettings, usersOU, null);
|
ServerSettings, usersOU, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void SetQuotaLimitOnFolder(string folderPath, string shareNameDrive, string quotaLimit, int mode, string wmiUserName, string wmiPassword)
|
public virtual void SetQuotaLimitOnFolder(string folderPath, string shareNameDrive, FSRMQuotaType quotaType, string quotaLimit, int mode, string wmiUserName, string wmiPassword)
|
||||||
{
|
{
|
||||||
FileUtils.SetQuotaLimitOnFolder(folderPath, shareNameDrive, quotaLimit, mode, wmiUserName, wmiPassword);
|
FileUtils.SetQuotaLimitOnFolder(folderPath, shareNameDrive, quotaLimit, mode, wmiUserName, wmiPassword);
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,7 +74,7 @@ namespace WebsitePanel.Providers.OS
|
||||||
|| version == WebsitePanel.Server.Utils.OS.WindowsVersion.Windows81;
|
|| version == WebsitePanel.Server.Utils.OS.WindowsVersion.Windows81;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void SetQuotaLimitOnFolder(string folderPath, string shareNameDrive, string quotaLimit, int mode, string wmiUserName, string wmiPassword)
|
public override void SetQuotaLimitOnFolder(string folderPath, string shareNameDrive, FSRMQuotaType quotaType, string quotaLimit, int mode, string wmiUserName, string wmiPassword)
|
||||||
{
|
{
|
||||||
Log.WriteStart("SetQuotaLimitOnFolder");
|
Log.WriteStart("SetQuotaLimitOnFolder");
|
||||||
Log.WriteInfo("FolderPath : {0}", folderPath);
|
Log.WriteInfo("FolderPath : {0}", folderPath);
|
||||||
|
@ -82,7 +82,6 @@ namespace WebsitePanel.Providers.OS
|
||||||
Log.WriteInfo("QuotaLimit : {0}", quotaLimit);
|
Log.WriteInfo("QuotaLimit : {0}", quotaLimit);
|
||||||
|
|
||||||
string path = Path.Combine(shareNameDrive + @":\", folderPath);
|
string path = Path.Combine(shareNameDrive + @":\", folderPath);
|
||||||
var quota = CalculateQuota(quotaLimit);
|
|
||||||
|
|
||||||
Runspace runSpace = null;
|
Runspace runSpace = null;
|
||||||
try
|
try
|
||||||
|
@ -94,21 +93,30 @@ namespace WebsitePanel.Providers.OS
|
||||||
if (!FileUtils.DirectoryExists(path))
|
if (!FileUtils.DirectoryExists(path))
|
||||||
FileUtils.CreateDirectory(path);
|
FileUtils.CreateDirectory(path);
|
||||||
|
|
||||||
switch (mode)
|
if (quotaLimit.Contains("-"))
|
||||||
{
|
{
|
||||||
|
RemoveOldQuotaOnFolder(runSpace, path);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var quota = CalculateQuota(quotaLimit);
|
||||||
|
|
||||||
|
switch (mode)
|
||||||
|
{
|
||||||
//deleting old quota and creating new one
|
//deleting old quota and creating new one
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
RemoveOldQuotaOnFolder(runSpace, path);
|
RemoveOldQuotaOnFolder(runSpace, path);
|
||||||
ChangeQuotaOnFolder(runSpace, "New-FsrmQuota", path, quota);
|
ChangeQuotaOnFolder(runSpace, "New-FsrmQuota", path, quotaType, quota);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
//modifying folder quota
|
//modifying folder quota
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
ChangeQuotaOnFolder(runSpace, "Set-FsrmQuota", path, quota);
|
ChangeQuotaOnFolder(runSpace, "Set-FsrmQuota", path, quotaType, quota);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -132,7 +140,7 @@ namespace WebsitePanel.Providers.OS
|
||||||
|
|
||||||
|
|
||||||
Runspace runSpace = null;
|
Runspace runSpace = null;
|
||||||
int quota = 0;
|
int quota = -1;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -165,6 +173,45 @@ namespace WebsitePanel.Providers.OS
|
||||||
return quota;
|
return quota;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int GetUsageOnFolder(string folderPath)
|
||||||
|
{
|
||||||
|
Log.WriteStart("GetUsageOnFolder");
|
||||||
|
Log.WriteInfo("FolderPath : {0}", folderPath);
|
||||||
|
|
||||||
|
|
||||||
|
Runspace runSpace = null;
|
||||||
|
int size = -1;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
runSpace = OpenRunspace();
|
||||||
|
|
||||||
|
if (folderPath.IndexOfAny(Path.GetInvalidPathChars()) == -1)
|
||||||
|
{
|
||||||
|
Command cmd = new Command("Get-FsrmQuota");
|
||||||
|
cmd.Parameters.Add("Path", folderPath);
|
||||||
|
var result = ExecuteShellCommand(runSpace, cmd, false);
|
||||||
|
|
||||||
|
if (result.Count > 0)
|
||||||
|
{
|
||||||
|
size = ConvertBytesToMB(Convert.ToInt64(GetPSObjectProperty(result[0], "usage")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Log.WriteError("GetUsageOnFolder", ex);
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
CloseRunspace(runSpace);
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.WriteEnd("GetUsageOnFolder");
|
||||||
|
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
public UInt64 CalculateQuota(string quota)
|
public UInt64 CalculateQuota(string quota)
|
||||||
{
|
{
|
||||||
|
@ -217,11 +264,17 @@ namespace WebsitePanel.Providers.OS
|
||||||
catch { /* do nothing */ }
|
catch { /* do nothing */ }
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ChangeQuotaOnFolder(Runspace runSpace, string command, string path, UInt64 quota)
|
public void ChangeQuotaOnFolder(Runspace runSpace, string command, string path, FSRMQuotaType quotaType, UInt64 quota)
|
||||||
{
|
{
|
||||||
Command cmd = new Command(command);
|
Command cmd = new Command(command);
|
||||||
cmd.Parameters.Add("Path", path);
|
cmd.Parameters.Add("Path", path);
|
||||||
cmd.Parameters.Add("Size", quota);
|
cmd.Parameters.Add("Size", quota);
|
||||||
|
|
||||||
|
if (quotaType == FSRMQuotaType.Soft)
|
||||||
|
{
|
||||||
|
cmd.Parameters.Add("SoftLimit", true);
|
||||||
|
}
|
||||||
|
|
||||||
ExecuteShellCommand(runSpace, cmd, false);
|
ExecuteShellCommand(runSpace, cmd, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1741,11 +1741,12 @@ namespace WebsitePanel.Providers.OS
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
||||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetQuotaLimitOnFolder", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetQuotaLimitOnFolder", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||||
public void SetQuotaLimitOnFolder(string folderPath, string shareNameDrive, string quotaLimit, int mode, string wmiUserName, string wmiPassword)
|
public void SetQuotaLimitOnFolder(string folderPath, string shareNameDrive, FSRMQuotaType quotaType, string quotaLimit, int mode, string wmiUserName, string wmiPassword)
|
||||||
{
|
{
|
||||||
this.Invoke("SetQuotaLimitOnFolder", new object[] {
|
this.Invoke("SetQuotaLimitOnFolder", new object[] {
|
||||||
folderPath,
|
folderPath,
|
||||||
shareNameDrive,
|
shareNameDrive,
|
||||||
|
quotaType,
|
||||||
quotaLimit,
|
quotaLimit,
|
||||||
mode,
|
mode,
|
||||||
wmiUserName,
|
wmiUserName,
|
||||||
|
@ -1753,11 +1754,12 @@ namespace WebsitePanel.Providers.OS
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public System.IAsyncResult BeginSetQuotaLimitOnFolder(string folderPath, string shareNameDrive, string quotaLimit, int mode, string wmiUserName, string wmiPassword, System.AsyncCallback callback, object asyncState)
|
public System.IAsyncResult BeginSetQuotaLimitOnFolder(string folderPath, string shareNameDrive, FSRMQuotaType quotaType, string quotaLimit, int mode, string wmiUserName, string wmiPassword, System.AsyncCallback callback, object asyncState)
|
||||||
{
|
{
|
||||||
return this.BeginInvoke("SetQuotaLimitOnFolder", new object[] {
|
return this.BeginInvoke("SetQuotaLimitOnFolder", new object[] {
|
||||||
folderPath,
|
folderPath,
|
||||||
shareNameDrive,
|
shareNameDrive,
|
||||||
|
quotaType,
|
||||||
quotaLimit,
|
quotaLimit,
|
||||||
mode,
|
mode,
|
||||||
wmiUserName,
|
wmiUserName,
|
||||||
|
@ -1771,13 +1773,13 @@ namespace WebsitePanel.Providers.OS
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public void SetQuotaLimitOnFolderAsync(string folderPath, string shareNameDrive, string quotaLimit, int mode, string wmiUserName, string wmiPassword)
|
public void SetQuotaLimitOnFolderAsync(string folderPath, string shareNameDrive, FSRMQuotaType quotaType, string quotaLimit, int mode, string wmiUserName, string wmiPassword)
|
||||||
{
|
{
|
||||||
this.SetQuotaLimitOnFolderAsync(folderPath, shareNameDrive, quotaLimit, mode, wmiUserName, wmiPassword, null);
|
this.SetQuotaLimitOnFolderAsync(folderPath, shareNameDrive, quotaType, quotaLimit, mode, wmiUserName, wmiPassword, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public void SetQuotaLimitOnFolderAsync(string folderPath, string shareNameDrive, string quotaLimit, int mode, string wmiUserName, string wmiPassword, object userState)
|
public void SetQuotaLimitOnFolderAsync(string folderPath, string shareNameDrive, FSRMQuotaType quotaType, string quotaLimit, int mode, string wmiUserName, string wmiPassword, object userState)
|
||||||
{
|
{
|
||||||
if ((this.SetQuotaLimitOnFolderOperationCompleted == null))
|
if ((this.SetQuotaLimitOnFolderOperationCompleted == null))
|
||||||
{
|
{
|
||||||
|
@ -1786,6 +1788,7 @@ namespace WebsitePanel.Providers.OS
|
||||||
this.InvokeAsync("SetQuotaLimitOnFolder", new object[] {
|
this.InvokeAsync("SetQuotaLimitOnFolder", new object[] {
|
||||||
folderPath,
|
folderPath,
|
||||||
shareNameDrive,
|
shareNameDrive,
|
||||||
|
quotaType,
|
||||||
quotaLimit,
|
quotaLimit,
|
||||||
mode,
|
mode,
|
||||||
wmiUserName,
|
wmiUserName,
|
||||||
|
|
|
@ -536,12 +536,12 @@ namespace WebsitePanel.Server
|
||||||
|
|
||||||
|
|
||||||
[WebMethod, SoapHeader("settings")]
|
[WebMethod, SoapHeader("settings")]
|
||||||
public void SetQuotaLimitOnFolder(string folderPath, string shareNameDrive, string quotaLimit, int mode, string wmiUserName, string wmiPassword)
|
public void SetQuotaLimitOnFolder(string folderPath, string shareNameDrive, FSRMQuotaType quotaType, string quotaLimit, int mode, string wmiUserName, string wmiPassword)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Log.WriteStart("'{0}' SetQuotaLimitOnFolder", ProviderSettings.ProviderName);
|
Log.WriteStart("'{0}' SetQuotaLimitOnFolder", ProviderSettings.ProviderName);
|
||||||
OsProvider.SetQuotaLimitOnFolder(folderPath, shareNameDrive, quotaLimit, mode, wmiUserName, wmiPassword);
|
OsProvider.SetQuotaLimitOnFolder(folderPath, shareNameDrive, quotaType, quotaLimit, mode, wmiUserName, wmiPassword);
|
||||||
Log.WriteEnd("'{0}' SetQuotaLimitOnFolder", ProviderSettings.ProviderName);
|
Log.WriteEnd("'{0}' SetQuotaLimitOnFolder", ProviderSettings.ProviderName);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
|
@ -147,4 +147,13 @@
|
||||||
<data name="locFolderUrl.Text" xml:space="preserve">
|
<data name="locFolderUrl.Text" xml:space="preserve">
|
||||||
<value>Folder Url:</value>
|
<value>Folder Url:</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="locFolderSize" xml:space="preserve">
|
||||||
|
<value>Folder Limit Size (Mb):</value>
|
||||||
|
</data>
|
||||||
|
<data name="valNumericFolderSize" xml:space="preserve">
|
||||||
|
<value>*</value>
|
||||||
|
</data>
|
||||||
|
<data name="valNumericFolderSize.ErrorMessage" xml:space="preserve">
|
||||||
|
<value>Enter Folder Size</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -30,13 +30,23 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td class="FormLabel150"><asp:Localize ID="locFolderName" runat="server" meta:resourcekey="locFolderName" Text="Folder Name:"></asp:Localize></td>
|
<td class="FormLabel150"><asp:Localize ID="locFolderName" runat="server" meta:resourcekey="locFolderName" Text="Folder Name:"></asp:Localize></td>
|
||||||
<td>
|
<td>
|
||||||
<asp:TextBox ID="txtFolderName" runat="server" CssClass="HugeTextBox200"></asp:TextBox>
|
<asp:TextBox ID="txtFolderName" runat="server" CssClass="HugeTextBox200" ></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="valRequireFolderName" runat="server" meta:resourcekey="valRequireFolderName" ControlToValidate="txtFolderName"
|
<asp:RequiredFieldValidator ID="valRequireFolderName" runat="server" meta:resourcekey="valRequireFolderName" ControlToValidate="txtFolderName"
|
||||||
ErrorMessage="Enter Folder Name" ValidationGroup="EditFolder" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
|
ErrorMessage="Enter Folder Name" ValidationGroup="EditFolder" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="FormLabel150"><asp:Localize ID="locFolderSize" runat="server" meta:resourcekey="locFolderSize" Text="Folder Limit Size (Mb):"></asp:Localize></td>
|
||||||
|
<td>
|
||||||
|
<asp:TextBox ID="txtFolderSize" runat="server" CssClass="HugeTextBox200"></asp:TextBox>
|
||||||
|
<asp:CompareValidator ID="valNumericFolderSize" runat="server" meta:resourcekey="valNumericFolderSize" ControlToValidate="txtFolderSize"
|
||||||
|
Type="Integer" Operator="DataTypeCheck" ValidationGroup="EditFolder" Display="Dynamic" Text="*" SetFocusOnError="True"
|
||||||
|
ErrorMessage="Enter Folder Size" />
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="FormLabel150"><asp:Localize ID="locFolderUrl" runat="server" meta:resourcekey="locFolderUrl" Text="Folder Url:"></asp:Localize></td>
|
<td class="FormLabel150"><asp:Localize ID="locFolderUrl" runat="server" meta:resourcekey="locFolderUrl" Text="Folder Url:"></asp:Localize></td>
|
||||||
<td><asp:Label runat="server" ID="lblFolderUrl" /></td>
|
<td><asp:Label runat="server" ID="lblFolderUrl" /></td>
|
||||||
|
|
|
@ -75,6 +75,11 @@ namespace WebsitePanel.Portal.ExchangeServer
|
||||||
// bind form
|
// bind form
|
||||||
txtFolderName.Text = folder.Name;
|
txtFolderName.Text = folder.Name;
|
||||||
lblFolderUrl.Text = folder.Url;
|
lblFolderUrl.Text = folder.Url;
|
||||||
|
|
||||||
|
if (folder.FRSMQuotaMB != -1)
|
||||||
|
{
|
||||||
|
txtFolderSize.Text = folder.FRSMQuotaMB.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
var esPermissions = ES.Services.EnterpriseStorage.GetEnterpriseFolderPermissions(PanelRequest.ItemID,folder.Name);
|
var esPermissions = ES.Services.EnterpriseStorage.GetEnterpriseFolderPermissions(PanelRequest.ItemID,folder.Name);
|
||||||
|
|
||||||
|
@ -122,7 +127,8 @@ namespace WebsitePanel.Portal.ExchangeServer
|
||||||
folder = ES.Services.EnterpriseStorage.RenameEnterpriseFolder(PanelRequest.ItemID, PanelRequest.FolderID, txtFolderName.Text);
|
folder = ES.Services.EnterpriseStorage.RenameEnterpriseFolder(PanelRequest.ItemID, PanelRequest.FolderID, txtFolderName.Text);
|
||||||
}
|
}
|
||||||
|
|
||||||
ES.Services.EnterpriseStorage.SetEnterpriseFolderSettings(PanelRequest.ItemID, folder, permissions.GetPemissions(), chkDirectoryBrowsing.Checked, 100);
|
ES.Services.EnterpriseStorage.SetEnterpriseFolderSettings(PanelRequest.ItemID, folder, permissions.GetPemissions(),
|
||||||
|
chkDirectoryBrowsing.Checked, txtFolderSize.Text.Length == 0 ? -1 : int.Parse(txtFolderSize.Text));
|
||||||
|
|
||||||
|
|
||||||
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "enterprisestorage_folders",
|
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "enterprisestorage_folders",
|
||||||
|
|
|
@ -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.
|
||||||
|
@ -130,6 +102,33 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::System.Web.UI.WebControls.RequiredFieldValidator valRequireFolderName;
|
protected global::System.Web.UI.WebControls.RequiredFieldValidator valRequireFolderName;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// locFolderSize 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 locFolderSize;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtFolderSize 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 txtFolderSize;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// valNumericFolderSize 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.CompareValidator valNumericFolderSize;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// locFolderUrl control.
|
/// locFolderUrl control.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -251,7 +251,7 @@
|
||||||
<asp:HyperLink ID="lnkEnterpriseStorageSpace" runat="server" meta:resourcekey="lnkEnterpriseStorageSpace" />
|
<asp:HyperLink ID="lnkEnterpriseStorageSpace" runat="server" meta:resourcekey="lnkEnterpriseStorageSpace" />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<wsp:QuotaViewer ID="enterpriseStorageSpaceStats" QuotaTypeId="2" runat="server" DisplayGauge="true" />
|
<wsp:QuotaViewer ID="enterpriseStorageSpaceStats" QuotaTypeId="3" runat="server" DisplayGauge="true" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="OrgStatsRow">
|
<tr class="OrgStatsRow">
|
||||||
|
|
|
@ -300,9 +300,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
||||||
|
|
||||||
private void BindEnterpriseStorageStats(OrganizationStatistics stats, OrganizationStatistics tenantStats)
|
private void BindEnterpriseStorageStats(OrganizationStatistics stats, OrganizationStatistics tenantStats)
|
||||||
{
|
{
|
||||||
enterpriseStorageSpaceStats.QuotaValue = stats.AllocatedEnterpriseStorageSpace;
|
enterpriseStorageSpaceStats.QuotaValue = stats.UsedEnterpriseStorageSpace;
|
||||||
enterpriseStorageSpaceStats.QuotaUsedValue = stats.UsedEnterpriseStorageSpace;
|
|
||||||
if (stats.AllocatedEnterpriseStorageSpace != -1) enterpriseStorageSpaceStats.QuotaAvailable = tenantStats.AllocatedEnterpriseStorageSpace - tenantStats.UsedEnterpriseStorageSpace;
|
|
||||||
|
|
||||||
lnkBESUsers.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "enterprisestorage_folders",
|
lnkBESUsers.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "enterprisestorage_folders",
|
||||||
"SpaceID=" + PanelSecurity.PackageId.ToString());
|
"SpaceID=" + PanelSecurity.PackageId.ToString());
|
||||||
|
|
|
@ -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.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue