add functionallity enterprise storage

This commit is contained in:
vfedosevich 2013-11-04 18:07:47 +03:00
parent cdf761d3ec
commit 922009d402
54 changed files with 4427 additions and 563 deletions

View file

@ -29,6 +29,7 @@
using System;
using System.Collections;
using WebsitePanel.Providers.OS;
using WebsitePanel.Providers.Web;
namespace WebsitePanel.Providers.EnterpriseStorage
{
@ -38,10 +39,11 @@ namespace WebsitePanel.Providers.EnterpriseStorage
public interface IEnterpriseStorage
{
SystemFile[] GetFolders(string organizationId);
SystemFile GetFolder(string organizationId, string folder);
SystemFile GetFolder(string organizationId, string folderName);
void CreateFolder(string organizationId, string folder);
void DeleteFolder(string organizationId, string folder);
void SetFolderQuota(string organizationId, string folder, long quota);
bool SetFolderWebDavRules(string organizationId, string folder, WebDavFolderRule[] rules);
WebDavFolderRule[] GetFolderWebDavRules(string organizationId, string folder);
bool CheckFileServicesInstallation();
}
}

View file

@ -27,7 +27,7 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using WebsitePanel.Providers.Web;
namespace WebsitePanel.Providers.OS
{
/// <summary>
@ -44,6 +44,8 @@ namespace WebsitePanel.Providers.OS
private long quota;
private bool isEmpty;
private bool isPublished;
private WebDavFolderRule[] rules;
private string url;
public SystemFile()
{
@ -108,5 +110,16 @@ namespace WebsitePanel.Providers.OS
set { this.isPublished = value; }
}
public WebDavFolderRule[] Rules
{
get { return this.rules; }
set { this.rules = value; }
}
public string Url
{
get { return this.url; }
set { this.url = value; }
}
}
}

View file

@ -0,0 +1,20 @@
namespace WebsitePanel.Providers.OS
{
public class SystemFilesPaged
{
int recordsCount;
SystemFile[] pageItems;
public int RecordsCount
{
get { return this.recordsCount; }
set { this.recordsCount = value; }
}
public SystemFile[] PageItems
{
get { return this.pageItems; }
set { this.pageItems = value; }
}
}
}

View file

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WebsitePanel.Providers.HostedSolution;
namespace WebsitePanel.Providers.Web
{
public interface IWebDav
{
void CreateWebDavRule(string organizationId, string folder, WebDavFolderRule rule);
bool DeleteWebDavRule(string organizationId, string folder, WebDavFolderRule rule);
bool DeleteAllWebDavRules(string organizationId, string folder);
bool SetFolderWebDavRules(string organizationId, string folder, WebDavFolderRule[] newRules);
WebDavFolderRule[] GetFolderWebDavRules(string organizationId, string folder);
}
}

View file

@ -0,0 +1,60 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WebsitePanel.Providers.HostedSolution;
namespace WebsitePanel.Providers.Web
{
public enum WebDavAccess
{
Read = 1,
Source = 16,
Write = 2
}
[Serializable]
public class WebDavFolderRule
{
public List<string> Pathes { get; set; }
public List<string> Users { get; set; }
public List<string> Roles { get; set; }
public int AccessRights
{
get
{
int result = 0;
if (Read)
{
result |= (int)WebDavAccess.Read;
}
if (Write)
{
result |= (int)WebDavAccess.Write;
}
if (Source)
{
result |= (int)WebDavAccess.Source;
}
return result;
}
}
public bool Read { get; set; }
public bool Write { get; set; }
public bool Source { get; set; }
public WebDavFolderRule()
{
Pathes = new List<string>();
Users = new List<string>();
Roles = new List<string>();
}
}
}

View file

@ -105,6 +105,7 @@
<Compile Include="HostedSolution\LyncVoicePolicyType.cs" />
<Compile Include="HostedSolution\OrganizationSecurityGroup.cs" />
<Compile Include="HostedSolution\TransactionAction.cs" />
<Compile Include="OS\SystemFilesPaged.cs" />
<Compile Include="RemoteDesktopServices\IRemoteDesktopServices.cs" />
<Compile Include="ResultObjects\HeliconApe.cs" />
<Compile Include="HostedSolution\ExchangeMobileDevice.cs" />
@ -315,10 +316,12 @@
<Compile Include="Web\HtaccessFolder.cs" />
<Compile Include="Web\HttpError.cs" />
<Compile Include="Web\HttpHeader.cs" />
<Compile Include="Web\IWebDav.cs" />
<Compile Include="Web\IWebServer.cs" />
<Compile Include="Web\MimeMap.cs" />
<Compile Include="Web\SharedSSLFolder.cs" />
<Compile Include="Web\SSLCertificate.cs" />
<Compile Include="Web\WebDavFolderRule.cs" />
<Compile Include="Web\WebFolder.cs" />
<Compile Include="Web\WebGroup.cs" />
<Compile Include="Web\WebSite.cs" />