webdav portal search added
This commit is contained in:
parent
cc16aca8d0
commit
82a9151241
24 changed files with 807 additions and 413 deletions
|
@ -73,6 +73,8 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
|
||||
private System.Threading.SendOrPostCallback UpdateWebDavPortalUserSettingsOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback SearchFilesOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback GetDirectoryBrowseEnabledOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback SetDirectoryBrowseEnabledOperationCompleted;
|
||||
|
@ -155,6 +157,9 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
/// <remarks/>
|
||||
public event UpdateWebDavPortalUserSettingsCompletedEventHandler UpdateWebDavPortalUserSettingsCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event SearchFilesCompletedEventHandler SearchFilesCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event GetDirectoryBrowseEnabledCompletedEventHandler GetDirectoryBrowseEnabledCompleted;
|
||||
|
||||
|
@ -1022,6 +1027,59 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SearchFiles", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public SystemFile[] SearchFiles(int itemId, string searchPath, string searchText, string userPrincipalName, bool recursive) {
|
||||
object[] results = this.Invoke("SearchFiles", new object[] {
|
||||
itemId,
|
||||
searchPath,
|
||||
searchText,
|
||||
userPrincipalName,
|
||||
recursive});
|
||||
return ((SystemFile[])(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginSearchFiles(int itemId, string searchPath, string searchText, string userPrincipalName, bool recursive, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("SearchFiles", new object[] {
|
||||
itemId,
|
||||
searchPath,
|
||||
searchText,
|
||||
userPrincipalName,
|
||||
recursive}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public SystemFile[] EndSearchFiles(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((SystemFile[])(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void SearchFilesAsync(int itemId, string searchPath, string searchText, string userPrincipalName, bool recursive) {
|
||||
this.SearchFilesAsync(itemId, searchPath, searchText, userPrincipalName, recursive, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void SearchFilesAsync(int itemId, string searchPath, string searchText, string userPrincipalName, bool recursive, object userState) {
|
||||
if ((this.SearchFilesOperationCompleted == null)) {
|
||||
this.SearchFilesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSearchFilesOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("SearchFiles", new object[] {
|
||||
itemId,
|
||||
searchPath,
|
||||
searchText,
|
||||
userPrincipalName,
|
||||
recursive}, this.SearchFilesOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnSearchFilesOperationCompleted(object arg) {
|
||||
if ((this.SearchFilesCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.SearchFilesCompleted(this, new SearchFilesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDirectoryBrowseEnabled", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public bool GetDirectoryBrowseEnabled(int itemId, string site) {
|
||||
|
@ -1935,6 +1993,32 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
public delegate void UpdateWebDavPortalUserSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
public delegate void SearchFilesCompletedEventHandler(object sender, SearchFilesCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class SearchFilesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal SearchFilesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public SystemFile[] Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((SystemFile[])(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
public delegate void GetDirectoryBrowseEnabledCompletedEventHandler(object sender, GetDirectoryBrowseEnabledCompletedEventArgs e);
|
||||
|
|
|
@ -172,6 +172,50 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return ObjectUtils.FillObjectFromDataReader<WebDavAccessToken>(DataProvider.GetWebDavAccessTokenByAccessToken(accessToken));
|
||||
}
|
||||
|
||||
public static SystemFile[] SearchFiles(int itemId, string searchPath, string searchText, string userPrincipalName, bool recursive)
|
||||
{
|
||||
try
|
||||
{
|
||||
// load organization
|
||||
Organization org = OrganizationController.GetOrganization(itemId);
|
||||
if (org == null)
|
||||
{
|
||||
return new SystemFile[0];
|
||||
}
|
||||
|
||||
int serviceId = GetEnterpriseStorageServiceID(org.PackageId);
|
||||
|
||||
if (serviceId == 0)
|
||||
{
|
||||
return new SystemFile[0];
|
||||
}
|
||||
|
||||
EnterpriseStorage es = GetEnterpriseStorage(serviceId);
|
||||
|
||||
var rootFolders = GetRootFolders(userPrincipalName).ToList();
|
||||
|
||||
var searchResult = es.Search(Path.Combine(org.OrganizationId, searchPath ?? string.Empty), searchText, userPrincipalName, recursive);
|
||||
|
||||
var result = new List<SystemFile>();
|
||||
|
||||
foreach (var systemFile in searchResult)
|
||||
{
|
||||
if (rootFolders.All(x => !systemFile.FullName.Contains(x.FullName)))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
result.Add(systemFile);
|
||||
}
|
||||
|
||||
return result.ToArray();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
#region Directory Browsing
|
||||
|
||||
public static bool GetDirectoryBrowseEnabled(int itemId, string siteId)
|
||||
|
@ -202,6 +246,33 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
#endregion
|
||||
|
||||
private static IEnumerable<SystemFile> GetRootFolders(string userPrincipalName)
|
||||
{
|
||||
var rootFolders = new List<SystemFile>();
|
||||
|
||||
var account = ExchangeServerController.GetAccountByAccountName(userPrincipalName);
|
||||
|
||||
var userGroups = OrganizationController.GetSecurityGroupsByMember(account.ItemId, account.AccountId);
|
||||
|
||||
foreach (var folder in GetFolders(account.ItemId))
|
||||
{
|
||||
var permissions = GetFolderPermission(account.ItemId, folder.Name);
|
||||
|
||||
foreach (var permission in permissions)
|
||||
{
|
||||
if ((!permission.IsGroup
|
||||
&& (permission.DisplayName == account.UserPrincipalName || permission.DisplayName == account.DisplayName))
|
||||
|| (permission.IsGroup && userGroups.Any(x => x.DisplayName == permission.DisplayName)))
|
||||
{
|
||||
rootFolders.Add(folder);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return rootFolders;
|
||||
}
|
||||
|
||||
protected static void StartESBackgroundTaskInternal(string taskName, int itemId, SystemFile folder, ESPermission[] permissions, bool directoyBrowsingEnabled, int quota, QuotaType quotaType)
|
||||
{
|
||||
// load organization
|
||||
|
|
|
@ -170,6 +170,12 @@ namespace WebsitePanel.EnterpriseServer
|
|||
EnterpriseStorageController.UpdateUserSettings(accountId,settings);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public SystemFile[] SearchFiles(int itemId, string searchPath, string searchText, string userPrincipalName, bool recursive)
|
||||
{
|
||||
return EnterpriseStorageController.SearchFiles(itemId, searchPath, searchText, userPrincipalName, recursive);
|
||||
}
|
||||
|
||||
#region Directory Browsing
|
||||
|
||||
[WebMethod]
|
||||
|
|
|
@ -46,6 +46,6 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
bool SetFolderWebDavRules(string organizationId, string folder, WebDavSetting setting, WebDavFolderRule[] rules);
|
||||
WebDavFolderRule[] GetFolderWebDavRules(string organizationId, string folder, WebDavSetting setting);
|
||||
bool CheckFileServicesInstallation();
|
||||
|
||||
SystemFile[] Search(string searchPath, string searchText, string userPrincipalName, bool recursive);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -144,6 +144,8 @@ namespace WebsitePanel.Providers.OS
|
|||
set { this.url = value; }
|
||||
}
|
||||
|
||||
public string RelativeUrl { get; set; }
|
||||
|
||||
public string DriveLetter
|
||||
{
|
||||
get { return this.driveLetter; }
|
||||
|
|
|
@ -27,9 +27,12 @@
|
|||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System;
|
||||
using System.Data.OleDb;
|
||||
using System.IO;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Principal;
|
||||
using System.Text;
|
||||
using Microsoft.Win32;
|
||||
|
||||
|
@ -62,6 +65,7 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
#endregion
|
||||
|
||||
#region Folders
|
||||
|
||||
public SystemFile[] GetFolders(string organizationId, WebDavSetting[] settings)
|
||||
{
|
||||
ArrayList items = new ArrayList();
|
||||
|
@ -70,7 +74,8 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
|
||||
foreach (var setting in webDavSettings)
|
||||
{
|
||||
string rootPath = string.Format("{0}:\\{1}\\{2}", setting.LocationDrive, setting.HomeFolder, organizationId);
|
||||
string rootPath = string.Format("{0}:\\{1}\\{2}", setting.LocationDrive, setting.HomeFolder,
|
||||
organizationId);
|
||||
|
||||
var windows = new WebsitePanel.Providers.OS.Windows2012();
|
||||
|
||||
|
@ -114,14 +119,15 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
}
|
||||
}
|
||||
|
||||
return (SystemFile[])items.ToArray(typeof(SystemFile));
|
||||
return (SystemFile[]) items.ToArray(typeof (SystemFile));
|
||||
}
|
||||
|
||||
public SystemFile GetFolder(string organizationId, string folderName, WebDavSetting setting)
|
||||
{
|
||||
var webDavSetting = GetWebDavSetting(setting);
|
||||
|
||||
string fullName = string.Format("{0}:\\{1}\\{2}\\{3}", webDavSetting.LocationDrive, webDavSetting.HomeFolder, organizationId, folderName);
|
||||
string fullName = string.Format("{0}:\\{1}\\{2}\\{3}", webDavSetting.LocationDrive, webDavSetting.HomeFolder,
|
||||
organizationId, folderName);
|
||||
SystemFile folder = null;
|
||||
|
||||
var windows = new WebsitePanel.Providers.OS.Windows2012();
|
||||
|
@ -159,17 +165,21 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
{
|
||||
var webDavSetting = GetWebDavSetting(setting);
|
||||
|
||||
FileUtils.CreateDirectory(string.Format("{0}:\\{1}\\{2}\\{3}", webDavSetting.LocationDrive, webDavSetting.HomeFolder, organizationId, folder));
|
||||
FileUtils.CreateDirectory(string.Format("{0}:\\{1}\\{2}\\{3}", webDavSetting.LocationDrive,
|
||||
webDavSetting.HomeFolder, organizationId, folder));
|
||||
}
|
||||
|
||||
public SystemFile RenameFolder(string organizationId, string originalFolder, string newFolder, WebDavSetting setting)
|
||||
public SystemFile RenameFolder(string organizationId, string originalFolder, string newFolder,
|
||||
WebDavSetting setting)
|
||||
{
|
||||
var webDavSetting = GetWebDavSetting(setting);
|
||||
|
||||
var oldPath = string.Format("{0}:\\{1}\\{2}\\{3}", webDavSetting.LocationDrive, webDavSetting.HomeFolder, organizationId, originalFolder);
|
||||
var newPath = string.Format("{0}:\\{1}\\{2}\\{3}", webDavSetting.LocationDrive, webDavSetting.HomeFolder, organizationId, newFolder);
|
||||
var oldPath = string.Format("{0}:\\{1}\\{2}\\{3}", webDavSetting.LocationDrive, webDavSetting.HomeFolder,
|
||||
organizationId, originalFolder);
|
||||
var newPath = string.Format("{0}:\\{1}\\{2}\\{3}", webDavSetting.LocationDrive, webDavSetting.HomeFolder,
|
||||
organizationId, newFolder);
|
||||
|
||||
FileUtils.MoveFile(oldPath,newPath);
|
||||
FileUtils.MoveFile(oldPath, newPath);
|
||||
|
||||
IWebDav webdav = new WebDav(webDavSetting);
|
||||
|
||||
|
@ -183,7 +193,8 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
{
|
||||
var webDavSetting = GetWebDavSetting(setting);
|
||||
|
||||
string rootPath = string.Format("{0}:\\{1}\\{2}\\{3}", webDavSetting.LocationDrive, webDavSetting.HomeFolder, organizationId, folder);
|
||||
string rootPath = string.Format("{0}:\\{1}\\{2}\\{3}", webDavSetting.LocationDrive, webDavSetting.HomeFolder,
|
||||
organizationId, folder);
|
||||
|
||||
DirectoryInfo treeRoot = new DirectoryInfo(rootPath);
|
||||
|
||||
|
@ -193,7 +204,9 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
while (dirs.Length > 0)
|
||||
{
|
||||
foreach (DirectoryInfo dir in dirs)
|
||||
DeleteFolder(organizationId, folder != string.Empty ? string.Format("{0}\\{1}", folder, dir.Name) : dir.Name, webDavSetting);
|
||||
DeleteFolder(organizationId,
|
||||
folder != string.Empty ? string.Format("{0}\\{1}", folder, dir.Name) : dir.Name,
|
||||
webDavSetting);
|
||||
|
||||
dirs = treeRoot.GetDirectories();
|
||||
}
|
||||
|
@ -214,7 +227,8 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
}
|
||||
}
|
||||
|
||||
public bool SetFolderWebDavRules(string organizationId, string folder, WebDavSetting setting, WebDavFolderRule[] rules)
|
||||
public bool SetFolderWebDavRules(string organizationId, string folder, WebDavSetting setting,
|
||||
WebDavFolderRule[] rules)
|
||||
{
|
||||
var users = new List<UserPermission>();
|
||||
|
||||
|
@ -243,7 +257,8 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
|
||||
var webDavSetting = GetWebDavSetting(setting);
|
||||
|
||||
string path = string.Format("{0}:\\{1}\\{2}\\{3}", webDavSetting.LocationDrive, webDavSetting.HomeFolder, organizationId, folder);
|
||||
string path = string.Format("{0}:\\{1}\\{2}\\{3}", webDavSetting.LocationDrive, webDavSetting.HomeFolder,
|
||||
organizationId, folder);
|
||||
|
||||
SecurityUtils.ResetNtfsPermissions(path);
|
||||
|
||||
|
@ -270,6 +285,58 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
|
||||
#endregion
|
||||
|
||||
public SystemFile[] Search(string searchPath, string searchText, string userPrincipalName, bool recursive)
|
||||
{
|
||||
var settings = GetWebDavSetting(null);
|
||||
var result = new List<SystemFile>();
|
||||
|
||||
using (new WindowsIdentity(userPrincipalName).Impersonate())
|
||||
{
|
||||
using (var conn = new OleDbConnection("Provider=Search.CollatorDSO;Extended Properties='Application=Windows';"))
|
||||
{
|
||||
var searchDirectory = Path.Combine(settings.LocationDrive + ":\\", settings.HomeFolder);
|
||||
searchDirectory = Path.Combine(searchDirectory, searchPath);
|
||||
|
||||
var searchDirectoryUrl = new Uri(searchDirectory).AbsoluteUri;
|
||||
|
||||
var wsSql = string.Format(@"SELECT System.FileName, System.DateModified, System.Size, System.Kind, System.ItemPathDisplay, System.ItemType FROM SYSTEMINDEX WHERE System.FileName LIKE '%{0}%' AND {1} = '{2}'",
|
||||
searchText, recursive ? "SCOPE" : "DIRECTORY", searchDirectoryUrl);
|
||||
|
||||
|
||||
conn.Open();
|
||||
|
||||
var cmd = new OleDbCommand(wsSql, conn);
|
||||
|
||||
using (OleDbDataReader reader = cmd.ExecuteReader())
|
||||
{
|
||||
while (reader!= null && reader.Read())
|
||||
{
|
||||
var file = new SystemFile {Name = reader[0] as string};
|
||||
|
||||
file.Changed = file.CreatedDate = reader[1] is DateTime ? (DateTime)reader[1] : new DateTime();
|
||||
file.Size = reader[2] is long ? (long) reader[2] : 0;
|
||||
|
||||
var kind = reader[3] is IEnumerable ? ((IEnumerable)reader[3]).Cast<string>().ToList() : null;
|
||||
var itemType = reader[5] as string ?? string.Empty;
|
||||
|
||||
if (kind != null && kind.Any() && itemType.ToLowerInvariant() != ".zip")
|
||||
{
|
||||
file.IsDirectory = kind.Any(x => x == "folder");
|
||||
}
|
||||
|
||||
file.FullName = (reader[4] as string ?? string.Empty);
|
||||
file.RelativeUrl = file.FullName.Replace(searchDirectory, string.Empty).Trim('\\');
|
||||
|
||||
result.Add(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result.ToArray();
|
||||
}
|
||||
|
||||
|
||||
#region HostingServiceProvider methods
|
||||
|
||||
public override string[] Install()
|
||||
|
|
|
@ -1,40 +1,21 @@
|
|||
// Copyright (c) 2015, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.7905
|
||||
//
|
||||
// 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.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
//
|
||||
// This source code was auto-generated by wsdl, Version=2.0.50727.42.
|
||||
// This source code was auto-generated by wsdl, Version=2.0.50727.3038.
|
||||
//
|
||||
|
||||
using WebsitePanel.Providers.OS;
|
||||
using WebsitePanel.Providers.Web;
|
||||
|
||||
namespace WebsitePanel.Providers.EnterpriseStorage
|
||||
{
|
||||
namespace WebsitePanel.Providers.EnterpriseStorage {
|
||||
using System.Xml.Serialization;
|
||||
using System.Web.Services;
|
||||
using System.ComponentModel;
|
||||
|
@ -44,13 +25,12 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
[System.Web.Services.WebServiceBindingAttribute(Name = "EnterpriseStorageSoap", Namespace = "http://smbsaas/websitepanel/server/")]
|
||||
[System.Web.Services.WebServiceBindingAttribute(Name="EnterpriseStorageSoap", Namespace="http://smbsaas/websitepanel/server/")]
|
||||
[System.Xml.Serialization.XmlIncludeAttribute(typeof(ServiceProviderItem))]
|
||||
public partial class EnterpriseStorage : Microsoft.Web.Services3.WebServicesClientProtocol
|
||||
{
|
||||
public partial class EnterpriseStorage : Microsoft.Web.Services3.WebServicesClientProtocol {
|
||||
|
||||
public ServiceProviderSettingsSoapHeader ServiceProviderSettingsSoapHeaderValue;
|
||||
|
||||
|
@ -68,12 +48,13 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
|
||||
private System.Threading.SendOrPostCallback CheckFileServicesInstallationOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback SearchOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback RenameFolderOperationCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public EnterpriseStorage()
|
||||
{
|
||||
this.Url = "http://localhost:9004/EnterpriseStorage.asmx";
|
||||
public EnterpriseStorage() {
|
||||
this.Url = "http://localhost:9003/EnterpriseStorage.asmx";
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
|
@ -97,14 +78,16 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
/// <remarks/>
|
||||
public event CheckFileServicesInstallationCompletedEventHandler CheckFileServicesInstallationCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event SearchCompletedEventHandler SearchCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event RenameFolderCompletedEventHandler RenameFolderCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetFolders", 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 SystemFile[] GetFolders(string organizationId, WebDavSetting[] settings)
|
||||
{
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetFolders", 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 SystemFile[] GetFolders(string organizationId, WebDavSetting[] settings) {
|
||||
object[] results = this.Invoke("GetFolders", new object[] {
|
||||
organizationId,
|
||||
settings});
|
||||
|
@ -112,31 +95,26 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginGetFolders(string organizationId, WebDavSetting[] settings, System.AsyncCallback callback, object asyncState)
|
||||
{
|
||||
public System.IAsyncResult BeginGetFolders(string organizationId, WebDavSetting[] settings, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("GetFolders", new object[] {
|
||||
organizationId,
|
||||
settings}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public SystemFile[] EndGetFolders(System.IAsyncResult asyncResult)
|
||||
{
|
||||
public SystemFile[] EndGetFolders(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((SystemFile[])(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetFoldersAsync(string organizationId, WebDavSetting[] settings)
|
||||
{
|
||||
public void GetFoldersAsync(string organizationId, WebDavSetting[] settings) {
|
||||
this.GetFoldersAsync(organizationId, settings, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetFoldersAsync(string organizationId, WebDavSetting[] settings, object userState)
|
||||
{
|
||||
if ((this.GetFoldersOperationCompleted == null))
|
||||
{
|
||||
public void GetFoldersAsync(string organizationId, WebDavSetting[] settings, object userState) {
|
||||
if ((this.GetFoldersOperationCompleted == null)) {
|
||||
this.GetFoldersOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetFoldersOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("GetFolders", new object[] {
|
||||
|
@ -144,10 +122,8 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
settings}, this.GetFoldersOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnGetFoldersOperationCompleted(object arg)
|
||||
{
|
||||
if ((this.GetFoldersCompleted != null))
|
||||
{
|
||||
private void OnGetFoldersOperationCompleted(object arg) {
|
||||
if ((this.GetFoldersCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.GetFoldersCompleted(this, new GetFoldersCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
|
@ -155,9 +131,8 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetFolder", 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 SystemFile GetFolder(string organizationId, string folder, WebDavSetting setting)
|
||||
{
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetFolder", 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 SystemFile GetFolder(string organizationId, string folder, WebDavSetting setting) {
|
||||
object[] results = this.Invoke("GetFolder", new object[] {
|
||||
organizationId,
|
||||
folder,
|
||||
|
@ -166,8 +141,7 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginGetFolder(string organizationId, string folder, WebDavSetting setting, System.AsyncCallback callback, object asyncState)
|
||||
{
|
||||
public System.IAsyncResult BeginGetFolder(string organizationId, string folder, WebDavSetting setting, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("GetFolder", new object[] {
|
||||
organizationId,
|
||||
folder,
|
||||
|
@ -175,23 +149,19 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
}
|
||||
|
||||
/// <remarks/>
|
||||
public SystemFile EndGetFolder(System.IAsyncResult asyncResult)
|
||||
{
|
||||
public SystemFile EndGetFolder(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((SystemFile)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetFolderAsync(string organizationId, string folder, WebDavSetting setting)
|
||||
{
|
||||
public void GetFolderAsync(string organizationId, string folder, WebDavSetting setting) {
|
||||
this.GetFolderAsync(organizationId, folder, setting, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetFolderAsync(string organizationId, string folder, WebDavSetting setting, object userState)
|
||||
{
|
||||
if ((this.GetFolderOperationCompleted == null))
|
||||
{
|
||||
public void GetFolderAsync(string organizationId, string folder, WebDavSetting setting, object userState) {
|
||||
if ((this.GetFolderOperationCompleted == null)) {
|
||||
this.GetFolderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetFolderOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("GetFolder", new object[] {
|
||||
|
@ -200,10 +170,8 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
setting}, this.GetFolderOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnGetFolderOperationCompleted(object arg)
|
||||
{
|
||||
if ((this.GetFolderCompleted != null))
|
||||
{
|
||||
private void OnGetFolderOperationCompleted(object arg) {
|
||||
if ((this.GetFolderCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.GetFolderCompleted(this, new GetFolderCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
|
@ -211,9 +179,8 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateFolder", 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 CreateFolder(string organizationId, string folder, WebDavSetting setting)
|
||||
{
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateFolder", 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 CreateFolder(string organizationId, string folder, WebDavSetting setting) {
|
||||
this.Invoke("CreateFolder", new object[] {
|
||||
organizationId,
|
||||
folder,
|
||||
|
@ -221,8 +188,7 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginCreateFolder(string organizationId, string folder, WebDavSetting setting, System.AsyncCallback callback, object asyncState)
|
||||
{
|
||||
public System.IAsyncResult BeginCreateFolder(string organizationId, string folder, WebDavSetting setting, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("CreateFolder", new object[] {
|
||||
organizationId,
|
||||
folder,
|
||||
|
@ -230,22 +196,18 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void EndCreateFolder(System.IAsyncResult asyncResult)
|
||||
{
|
||||
public void EndCreateFolder(System.IAsyncResult asyncResult) {
|
||||
this.EndInvoke(asyncResult);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void CreateFolderAsync(string organizationId, string folder, WebDavSetting setting)
|
||||
{
|
||||
public void CreateFolderAsync(string organizationId, string folder, WebDavSetting setting) {
|
||||
this.CreateFolderAsync(organizationId, folder, setting, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void CreateFolderAsync(string organizationId, string folder, WebDavSetting setting, object userState)
|
||||
{
|
||||
if ((this.CreateFolderOperationCompleted == null))
|
||||
{
|
||||
public void CreateFolderAsync(string organizationId, string folder, WebDavSetting setting, object userState) {
|
||||
if ((this.CreateFolderOperationCompleted == null)) {
|
||||
this.CreateFolderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateFolderOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("CreateFolder", new object[] {
|
||||
|
@ -254,10 +216,8 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
setting}, this.CreateFolderOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnCreateFolderOperationCompleted(object arg)
|
||||
{
|
||||
if ((this.CreateFolderCompleted != null))
|
||||
{
|
||||
private void OnCreateFolderOperationCompleted(object arg) {
|
||||
if ((this.CreateFolderCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.CreateFolderCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
|
@ -265,9 +225,8 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteFolder", 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 DeleteFolder(string organizationId, string folder, WebDavSetting setting)
|
||||
{
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteFolder", 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 DeleteFolder(string organizationId, string folder, WebDavSetting setting) {
|
||||
this.Invoke("DeleteFolder", new object[] {
|
||||
organizationId,
|
||||
folder,
|
||||
|
@ -275,8 +234,7 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginDeleteFolder(string organizationId, string folder, WebDavSetting setting, System.AsyncCallback callback, object asyncState)
|
||||
{
|
||||
public System.IAsyncResult BeginDeleteFolder(string organizationId, string folder, WebDavSetting setting, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("DeleteFolder", new object[] {
|
||||
organizationId,
|
||||
folder,
|
||||
|
@ -284,22 +242,18 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void EndDeleteFolder(System.IAsyncResult asyncResult)
|
||||
{
|
||||
public void EndDeleteFolder(System.IAsyncResult asyncResult) {
|
||||
this.EndInvoke(asyncResult);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void DeleteFolderAsync(string organizationId, string folder, WebDavSetting setting)
|
||||
{
|
||||
public void DeleteFolderAsync(string organizationId, string folder, WebDavSetting setting) {
|
||||
this.DeleteFolderAsync(organizationId, folder, setting, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void DeleteFolderAsync(string organizationId, string folder, WebDavSetting setting, object userState)
|
||||
{
|
||||
if ((this.DeleteFolderOperationCompleted == null))
|
||||
{
|
||||
public void DeleteFolderAsync(string organizationId, string folder, WebDavSetting setting, object userState) {
|
||||
if ((this.DeleteFolderOperationCompleted == null)) {
|
||||
this.DeleteFolderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteFolderOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("DeleteFolder", new object[] {
|
||||
|
@ -308,10 +262,8 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
setting}, this.DeleteFolderOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnDeleteFolderOperationCompleted(object arg)
|
||||
{
|
||||
if ((this.DeleteFolderCompleted != null))
|
||||
{
|
||||
private void OnDeleteFolderOperationCompleted(object arg) {
|
||||
if ((this.DeleteFolderCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.DeleteFolderCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
|
@ -319,9 +271,8 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetFolderWebDavRules", 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 bool SetFolderWebDavRules(string organizationId, string folder, WebDavSetting setting, WebDavFolderRule[] rules)
|
||||
{
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetFolderWebDavRules", 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 bool SetFolderWebDavRules(string organizationId, string folder, WebDavSetting setting, WebDavFolderRule[] rules) {
|
||||
object[] results = this.Invoke("SetFolderWebDavRules", new object[] {
|
||||
organizationId,
|
||||
folder,
|
||||
|
@ -331,8 +282,7 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginSetFolderWebDavRules(string organizationId, string folder, WebDavSetting setting, WebDavFolderRule[] rules, System.AsyncCallback callback, object asyncState)
|
||||
{
|
||||
public System.IAsyncResult BeginSetFolderWebDavRules(string organizationId, string folder, WebDavSetting setting, WebDavFolderRule[] rules, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("SetFolderWebDavRules", new object[] {
|
||||
organizationId,
|
||||
folder,
|
||||
|
@ -341,23 +291,19 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
}
|
||||
|
||||
/// <remarks/>
|
||||
public bool EndSetFolderWebDavRules(System.IAsyncResult asyncResult)
|
||||
{
|
||||
public bool EndSetFolderWebDavRules(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((bool)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void SetFolderWebDavRulesAsync(string organizationId, string folder, WebDavSetting setting, WebDavFolderRule[] rules)
|
||||
{
|
||||
public void SetFolderWebDavRulesAsync(string organizationId, string folder, WebDavSetting setting, WebDavFolderRule[] rules) {
|
||||
this.SetFolderWebDavRulesAsync(organizationId, folder, setting, rules, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void SetFolderWebDavRulesAsync(string organizationId, string folder, WebDavSetting setting, WebDavFolderRule[] rules, object userState)
|
||||
{
|
||||
if ((this.SetFolderWebDavRulesOperationCompleted == null))
|
||||
{
|
||||
public void SetFolderWebDavRulesAsync(string organizationId, string folder, WebDavSetting setting, WebDavFolderRule[] rules, object userState) {
|
||||
if ((this.SetFolderWebDavRulesOperationCompleted == null)) {
|
||||
this.SetFolderWebDavRulesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetFolderWebDavRulesOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("SetFolderWebDavRules", new object[] {
|
||||
|
@ -367,10 +313,8 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
rules}, this.SetFolderWebDavRulesOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnSetFolderWebDavRulesOperationCompleted(object arg)
|
||||
{
|
||||
if ((this.SetFolderWebDavRulesCompleted != null))
|
||||
{
|
||||
private void OnSetFolderWebDavRulesOperationCompleted(object arg) {
|
||||
if ((this.SetFolderWebDavRulesCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.SetFolderWebDavRulesCompleted(this, new SetFolderWebDavRulesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
|
@ -378,9 +322,8 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetFolderWebDavRules", 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 WebDavFolderRule[] GetFolderWebDavRules(string organizationId, string folder, WebDavSetting setting)
|
||||
{
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetFolderWebDavRules", 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 WebDavFolderRule[] GetFolderWebDavRules(string organizationId, string folder, WebDavSetting setting) {
|
||||
object[] results = this.Invoke("GetFolderWebDavRules", new object[] {
|
||||
organizationId,
|
||||
folder,
|
||||
|
@ -389,8 +332,7 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginGetFolderWebDavRules(string organizationId, string folder, WebDavSetting setting, System.AsyncCallback callback, object asyncState)
|
||||
{
|
||||
public System.IAsyncResult BeginGetFolderWebDavRules(string organizationId, string folder, WebDavSetting setting, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("GetFolderWebDavRules", new object[] {
|
||||
organizationId,
|
||||
folder,
|
||||
|
@ -398,23 +340,19 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
}
|
||||
|
||||
/// <remarks/>
|
||||
public WebDavFolderRule[] EndGetFolderWebDavRules(System.IAsyncResult asyncResult)
|
||||
{
|
||||
public WebDavFolderRule[] EndGetFolderWebDavRules(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((WebDavFolderRule[])(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetFolderWebDavRulesAsync(string organizationId, string folder, WebDavSetting setting)
|
||||
{
|
||||
public void GetFolderWebDavRulesAsync(string organizationId, string folder, WebDavSetting setting) {
|
||||
this.GetFolderWebDavRulesAsync(organizationId, folder, setting, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void GetFolderWebDavRulesAsync(string organizationId, string folder, WebDavSetting setting, object userState)
|
||||
{
|
||||
if ((this.GetFolderWebDavRulesOperationCompleted == null))
|
||||
{
|
||||
public void GetFolderWebDavRulesAsync(string organizationId, string folder, WebDavSetting setting, object userState) {
|
||||
if ((this.GetFolderWebDavRulesOperationCompleted == null)) {
|
||||
this.GetFolderWebDavRulesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetFolderWebDavRulesOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("GetFolderWebDavRules", new object[] {
|
||||
|
@ -423,10 +361,8 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
setting}, this.GetFolderWebDavRulesOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnGetFolderWebDavRulesOperationCompleted(object arg)
|
||||
{
|
||||
if ((this.GetFolderWebDavRulesCompleted != null))
|
||||
{
|
||||
private void OnGetFolderWebDavRulesOperationCompleted(object arg) {
|
||||
if ((this.GetFolderWebDavRulesCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.GetFolderWebDavRulesCompleted(this, new GetFolderWebDavRulesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
|
@ -434,46 +370,38 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CheckFileServicesInstallation", 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 bool CheckFileServicesInstallation()
|
||||
{
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CheckFileServicesInstallation", 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 bool CheckFileServicesInstallation() {
|
||||
object[] results = this.Invoke("CheckFileServicesInstallation", new object[0]);
|
||||
return ((bool)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginCheckFileServicesInstallation(System.AsyncCallback callback, object asyncState)
|
||||
{
|
||||
public System.IAsyncResult BeginCheckFileServicesInstallation(System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("CheckFileServicesInstallation", new object[0], callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public bool EndCheckFileServicesInstallation(System.IAsyncResult asyncResult)
|
||||
{
|
||||
public bool EndCheckFileServicesInstallation(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((bool)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void CheckFileServicesInstallationAsync()
|
||||
{
|
||||
public void CheckFileServicesInstallationAsync() {
|
||||
this.CheckFileServicesInstallationAsync(null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void CheckFileServicesInstallationAsync(object userState)
|
||||
{
|
||||
if ((this.CheckFileServicesInstallationOperationCompleted == null))
|
||||
{
|
||||
public void CheckFileServicesInstallationAsync(object userState) {
|
||||
if ((this.CheckFileServicesInstallationOperationCompleted == null)) {
|
||||
this.CheckFileServicesInstallationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCheckFileServicesInstallationOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("CheckFileServicesInstallation", new object[0], this.CheckFileServicesInstallationOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnCheckFileServicesInstallationOperationCompleted(object arg)
|
||||
{
|
||||
if ((this.CheckFileServicesInstallationCompleted != null))
|
||||
{
|
||||
private void OnCheckFileServicesInstallationOperationCompleted(object arg) {
|
||||
if ((this.CheckFileServicesInstallationCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.CheckFileServicesInstallationCompleted(this, new CheckFileServicesInstallationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
|
@ -481,9 +409,59 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/RenameFolder", 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 SystemFile RenameFolder(string organizationId, string originalFolder, string newFolder, WebDavSetting setting)
|
||||
{
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/Search", 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 SystemFile[] Search(string searchPath, string searchText, string userPrincipalName, bool recursive) {
|
||||
object[] results = this.Invoke("Search", new object[] {
|
||||
searchPath,
|
||||
searchText,
|
||||
userPrincipalName,
|
||||
recursive});
|
||||
return ((SystemFile[])(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginSearch(string searchPath, string searchText, string userPrincipalName, bool recursive, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("Search", new object[] {
|
||||
searchPath,
|
||||
searchText,
|
||||
userPrincipalName,
|
||||
recursive}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public SystemFile[] EndSearch(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((SystemFile[])(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void SearchAsync(string searchPath, string searchText, string userPrincipalName, bool recursive) {
|
||||
this.SearchAsync(searchPath, searchText, userPrincipalName, recursive, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void SearchAsync(string searchPath, string searchText, string userPrincipalName, bool recursive, object userState) {
|
||||
if ((this.SearchOperationCompleted == null)) {
|
||||
this.SearchOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSearchOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("Search", new object[] {
|
||||
searchPath,
|
||||
searchText,
|
||||
userPrincipalName,
|
||||
recursive}, this.SearchOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnSearchOperationCompleted(object arg) {
|
||||
if ((this.SearchCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.SearchCompleted(this, new SearchCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/RenameFolder", 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 SystemFile RenameFolder(string organizationId, string originalFolder, string newFolder, WebDavSetting setting) {
|
||||
object[] results = this.Invoke("RenameFolder", new object[] {
|
||||
organizationId,
|
||||
originalFolder,
|
||||
|
@ -493,8 +471,7 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginRenameFolder(string organizationId, string originalFolder, string newFolder, WebDavSetting setting, System.AsyncCallback callback, object asyncState)
|
||||
{
|
||||
public System.IAsyncResult BeginRenameFolder(string organizationId, string originalFolder, string newFolder, WebDavSetting setting, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("RenameFolder", new object[] {
|
||||
organizationId,
|
||||
originalFolder,
|
||||
|
@ -503,23 +480,19 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
}
|
||||
|
||||
/// <remarks/>
|
||||
public SystemFile EndRenameFolder(System.IAsyncResult asyncResult)
|
||||
{
|
||||
public SystemFile EndRenameFolder(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((SystemFile)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void RenameFolderAsync(string organizationId, string originalFolder, string newFolder, WebDavSetting setting)
|
||||
{
|
||||
public void RenameFolderAsync(string organizationId, string originalFolder, string newFolder, WebDavSetting setting) {
|
||||
this.RenameFolderAsync(organizationId, originalFolder, newFolder, setting, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void RenameFolderAsync(string organizationId, string originalFolder, string newFolder, WebDavSetting setting, object userState)
|
||||
{
|
||||
if ((this.RenameFolderOperationCompleted == null))
|
||||
{
|
||||
public void RenameFolderAsync(string organizationId, string originalFolder, string newFolder, WebDavSetting setting, object userState) {
|
||||
if ((this.RenameFolderOperationCompleted == null)) {
|
||||
this.RenameFolderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRenameFolderOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("RenameFolder", new object[] {
|
||||
|
@ -529,46 +502,39 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
setting}, this.RenameFolderOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnRenameFolderOperationCompleted(object arg)
|
||||
{
|
||||
if ((this.RenameFolderCompleted != null))
|
||||
{
|
||||
private void OnRenameFolderOperationCompleted(object arg) {
|
||||
if ((this.RenameFolderCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.RenameFolderCompleted(this, new RenameFolderCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public new void CancelAsync(object userState)
|
||||
{
|
||||
public new void CancelAsync(object userState) {
|
||||
base.CancelAsync(userState);
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
public delegate void GetFoldersCompletedEventHandler(object sender, GetFoldersCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class GetFoldersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
|
||||
{
|
||||
public partial class GetFoldersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal GetFoldersCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState)
|
||||
{
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public SystemFile[] Result
|
||||
{
|
||||
get
|
||||
{
|
||||
public SystemFile[] Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((SystemFile[])(this.results[0]));
|
||||
}
|
||||
|
@ -576,29 +542,25 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
public delegate void GetFolderCompletedEventHandler(object sender, GetFolderCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class GetFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
|
||||
{
|
||||
public partial class GetFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal GetFolderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState)
|
||||
{
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public SystemFile Result
|
||||
{
|
||||
get
|
||||
{
|
||||
public SystemFile Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((SystemFile)(this.results[0]));
|
||||
}
|
||||
|
@ -606,37 +568,33 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
public delegate void CreateFolderCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
public delegate void DeleteFolderCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
public delegate void SetFolderWebDavRulesCompletedEventHandler(object sender, SetFolderWebDavRulesCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class SetFolderWebDavRulesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
|
||||
{
|
||||
public partial class SetFolderWebDavRulesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal SetFolderWebDavRulesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState)
|
||||
{
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public bool Result
|
||||
{
|
||||
get
|
||||
{
|
||||
public bool Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((bool)(this.results[0]));
|
||||
}
|
||||
|
@ -644,29 +602,25 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
public delegate void GetFolderWebDavRulesCompletedEventHandler(object sender, GetFolderWebDavRulesCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class GetFolderWebDavRulesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
|
||||
{
|
||||
public partial class GetFolderWebDavRulesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal GetFolderWebDavRulesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState)
|
||||
{
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public WebDavFolderRule[] Result
|
||||
{
|
||||
get
|
||||
{
|
||||
public WebDavFolderRule[] Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((WebDavFolderRule[])(this.results[0]));
|
||||
}
|
||||
|
@ -674,29 +628,25 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
public delegate void CheckFileServicesInstallationCompletedEventHandler(object sender, CheckFileServicesInstallationCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class CheckFileServicesInstallationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
|
||||
{
|
||||
public partial class CheckFileServicesInstallationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal CheckFileServicesInstallationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState)
|
||||
{
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public bool Result
|
||||
{
|
||||
get
|
||||
{
|
||||
public bool Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((bool)(this.results[0]));
|
||||
}
|
||||
|
@ -704,29 +654,51 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
|||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
public delegate void RenameFolderCompletedEventHandler(object sender, RenameFolderCompletedEventArgs e);
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
public delegate void SearchCompletedEventHandler(object sender, SearchCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class RenameFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
|
||||
{
|
||||
public partial class SearchCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal RenameFolderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState)
|
||||
{
|
||||
internal SearchCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public SystemFile Result
|
||||
{
|
||||
get
|
||||
{
|
||||
public SystemFile[] Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((SystemFile[])(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
public delegate void RenameFolderCompletedEventHandler(object sender, RenameFolderCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class RenameFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal RenameFolderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public SystemFile Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((SystemFile)(this.results[0]));
|
||||
}
|
||||
|
|
|
@ -175,6 +175,23 @@ namespace WebsitePanel.Server
|
|||
}
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public SystemFile[] Search(string searchPath, string searchText, string userPrincipalName, bool recursive)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.WriteStart("'{0}' Search", ProviderSettings.ProviderName);
|
||||
var searchResults = EnterpriseStorageProvider.Search(searchPath, searchText, userPrincipalName, recursive);
|
||||
Log.WriteEnd("'{0}' Search", ProviderSettings.ProviderName);
|
||||
return searchResults;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError(String.Format("'{0}' Search", ProviderSettings.ProviderName), ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[WebMethod, SoapHeader("settings")]
|
||||
public SystemFile RenameFolder(string organizationId, string originalFolder, string newFolder, WebDavSetting setting)
|
||||
{
|
||||
|
|
|
@ -251,14 +251,14 @@ namespace WebsitePanel.WebDav.Core
|
|||
{
|
||||
get
|
||||
{
|
||||
string displayName = _href.AbsoluteUri.Replace(_baseUri.AbsoluteUri, "");
|
||||
string displayName = _href.AbsoluteUri.Trim('/').Replace(_baseUri.AbsoluteUri.Trim('/'), "");
|
||||
displayName = Regex.Replace(displayName, "\\/$", "");
|
||||
Match displayNameMatch = Regex.Match(displayName, "([\\/]+)$");
|
||||
if (displayNameMatch.Success)
|
||||
{
|
||||
displayName = displayNameMatch.Groups[1].Value;
|
||||
}
|
||||
return HttpUtility.UrlDecode(displayName);
|
||||
return HttpUtility.UrlDecode(displayName.Trim('/'));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -473,15 +473,10 @@ namespace WebsitePanel.WebDav.Core
|
|||
public void SetHref(Uri href)
|
||||
{
|
||||
_href = href;
|
||||
string baseUri = _href.Scheme + "://" + _href.Host;
|
||||
for (int i = 0; i < _href.Segments.Length - 1; i++)
|
||||
{
|
||||
if (_href.Segments[i] != "/")
|
||||
{
|
||||
baseUri += "/" + _href.Segments[i];
|
||||
}
|
||||
}
|
||||
_baseUri = new Uri(baseUri);
|
||||
|
||||
var baseUrl = href.AbsoluteUri.Remove(href.AbsoluteUri.Length - href.Segments.Last().Length);
|
||||
|
||||
_baseUri = new Uri(baseUrl);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -14,6 +14,7 @@ namespace WebsitePanel.WebDav.Core.Interfaces.Managers
|
|||
void UploadFile(string path, HttpPostedFileBase file);
|
||||
void UploadFile(string path, byte[] bytes);
|
||||
void UploadFile(string path, Stream stream);
|
||||
IEnumerable<IHierarchyItem> SearchFiles(int itemId, string pathPart, string searchValue, string uesrPrincipalName, bool recursive);
|
||||
IResource GetResource(string path);
|
||||
string GetFileUrl(string path);
|
||||
void DeleteResource(string path);
|
||||
|
|
|
@ -14,6 +14,7 @@ using WebsitePanel.WebDav.Core.Config;
|
|||
using WebsitePanel.WebDav.Core.Exceptions;
|
||||
using WebsitePanel.WebDav.Core.Extensions;
|
||||
using WebsitePanel.WebDav.Core.Interfaces.Managers;
|
||||
using WebsitePanel.WebDav.Core.Interfaces.Security;
|
||||
using WebsitePanel.WebDav.Core.Resources;
|
||||
using WebsitePanel.WebDav.Core.Security.Cryptography;
|
||||
using WebsitePanel.WebDav.Core.Wsp.Framework;
|
||||
|
@ -24,15 +25,17 @@ namespace WebsitePanel.WebDav.Core.Managers
|
|||
{
|
||||
private readonly ICryptography _cryptography;
|
||||
private readonly WebDavSession _webDavSession;
|
||||
private readonly IWebDavAuthorizationService _webDavAuthorizationService;
|
||||
|
||||
private readonly ILog Log;
|
||||
|
||||
private bool _isRoot = true;
|
||||
private IFolder _currentFolder;
|
||||
|
||||
public WebDavManager(ICryptography cryptography)
|
||||
public WebDavManager(ICryptography cryptography, IWebDavAuthorizationService webDavAuthorizationService)
|
||||
{
|
||||
_cryptography = cryptography;
|
||||
_webDavAuthorizationService = webDavAuthorizationService;
|
||||
Log = LogManager.GetLogger(this.GetType());
|
||||
|
||||
_webDavSession = new WebDavSession();
|
||||
|
@ -84,6 +87,36 @@ namespace WebsitePanel.WebDav.Core.Managers
|
|||
return sortedChildren;
|
||||
}
|
||||
|
||||
public IEnumerable<IHierarchyItem> SearchFiles(int itemId, string pathPart, string searchValue, string uesrPrincipalName, bool recursive)
|
||||
{
|
||||
pathPart = (pathPart ?? string.Empty).Replace("/","\\");
|
||||
|
||||
var items = WspContext.Services.EnterpriseStorage.SearchFiles(itemId, pathPart, searchValue, uesrPrincipalName, recursive);
|
||||
|
||||
var resources = Convert(items, new Uri(WebDavAppConfigManager.Instance.WebdavRoot).Append(WspContext.User.OrganizationId, pathPart));
|
||||
|
||||
if (string.IsNullOrWhiteSpace(pathPart))
|
||||
{
|
||||
var rootItems = ConnectToWebDavServer().ToArray();
|
||||
|
||||
foreach (var resource in resources)
|
||||
{
|
||||
var rootItem = rootItems.FirstOrDefault(x => x.Name == resource.DisplayName);
|
||||
|
||||
if (rootItem == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
resource.ContentLength = rootItem.Size;
|
||||
resource.AllocatedSpace = rootItem.FRSMQuotaMB;
|
||||
resource.IsRootItem = true;
|
||||
}
|
||||
}
|
||||
|
||||
return FilterResult(resources);
|
||||
}
|
||||
|
||||
public bool IsFile(string path)
|
||||
{
|
||||
string folder = GetFileFolder(path);
|
||||
|
@ -290,6 +323,7 @@ namespace WebsitePanel.WebDav.Core.Managers
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
return rootFolders;
|
||||
}
|
||||
|
||||
|
@ -307,6 +341,33 @@ namespace WebsitePanel.WebDav.Core.Managers
|
|||
return pathPart.StartsWith('/' + toRemove) ? pathPart.Substring(toRemove.Length + 1) : pathPart;
|
||||
}
|
||||
|
||||
private IEnumerable<WebDavResource> Convert(IEnumerable<SystemFile> files, Uri baseUri)
|
||||
{
|
||||
var convertResult = new List<WebDavResource>();
|
||||
|
||||
var credentials = new NetworkCredential(WspContext.User.Login,
|
||||
_cryptography.Decrypt(WspContext.User.EncryptedPassword),
|
||||
WebDavAppConfigManager.Instance.UserDomain);
|
||||
|
||||
foreach (var file in files)
|
||||
{
|
||||
var webDavitem = new WebDavResource();
|
||||
|
||||
webDavitem.SetCredentials(credentials);
|
||||
|
||||
webDavitem.SetHref(baseUri.Append(file.RelativeUrl.Replace("\\","/")));
|
||||
|
||||
webDavitem.SetItemType(file.IsDirectory? ItemType.Folder : ItemType.Resource);
|
||||
webDavitem.SetLastModified(file.Changed);
|
||||
webDavitem.ContentLength = file.Size;
|
||||
webDavitem.AllocatedSpace = file.FRSMQuotaMB;
|
||||
|
||||
convertResult.Add(webDavitem);
|
||||
}
|
||||
|
||||
return convertResult;
|
||||
}
|
||||
|
||||
private byte[] ReadFully(Stream input)
|
||||
{
|
||||
var buffer = new byte[16 * 1024];
|
||||
|
|
|
@ -36,8 +36,7 @@ namespace WebsitePanel.WebDavPortal
|
|||
));
|
||||
|
||||
bundles.Add(new ScriptBundle("~/bundles/bigIconsScripts").Include(
|
||||
"~/Scripts/appScripts/recalculateResourseHeight.js",
|
||||
"~/Scripts/appScripts/uploadingData2.js"
|
||||
"~/Scripts/appScripts/recalculateResourseHeight.js"
|
||||
));
|
||||
|
||||
bundles.Add(new ScriptBundle("~/bundles/authScripts").Include(
|
||||
|
|
|
@ -248,6 +248,15 @@ tr.selected-file {
|
|||
width: 200px;
|
||||
}
|
||||
|
||||
.search-block {
|
||||
}
|
||||
|
||||
.search-block input, .search-block label {
|
||||
display: inline-block;
|
||||
width: initial;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* Theme Mods */
|
||||
|
||||
input,div{border-radius:0px!important;}
|
||||
|
|
|
@ -48,6 +48,7 @@ namespace WebsitePanel.WebDavPortal.Controllers
|
|||
private readonly IAccessTokenManager _tokenManager;
|
||||
private readonly IWebDavAuthorizationService _webDavAuthorizationService;
|
||||
private readonly IUserSettingsManager _userSettingsManager;
|
||||
private readonly FileOpenerManager _openerManager;
|
||||
private readonly ILog Log;
|
||||
|
||||
public FileSystemController(ICryptography cryptography, IWebDavManager webdavManager, IAuthenticationService authenticationService, IAccessTokenManager tokenManager, IWebDavAuthorizationService webDavAuthorizationService, FileOpenerManager openerManager, IUserSettingsManager userSettingsManager)
|
||||
|
@ -60,6 +61,7 @@ namespace WebsitePanel.WebDavPortal.Controllers
|
|||
_userSettingsManager = userSettingsManager;
|
||||
|
||||
Log = LogManager.GetLogger(this.GetType());
|
||||
_openerManager = new FileOpenerManager();
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
|
@ -70,8 +72,7 @@ namespace WebsitePanel.WebDavPortal.Controllers
|
|||
return RedirectToRoute(FileSystemRouteNames.ShowContentPath, new { org, pathPart });
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public ActionResult ShowContent(string org, string pathPart = "")
|
||||
public ActionResult ShowContent(string org, string pathPart = "", string searchValue = "")
|
||||
{
|
||||
if (org != WspContext.User.OrganizationId)
|
||||
{
|
||||
|
@ -92,7 +93,8 @@ namespace WebsitePanel.WebDavPortal.Controllers
|
|||
{
|
||||
UrlSuffix = pathPart,
|
||||
Permissions =_webDavAuthorizationService.GetPermissions(WspContext.User, pathPart),
|
||||
UserSettings = _userSettingsManager.GetUserSettings(WspContext.User.AccountId)
|
||||
UserSettings = _userSettingsManager.GetUserSettings(WspContext.User.AccountId),
|
||||
SearchValue = searchValue
|
||||
};
|
||||
|
||||
return View(model);
|
||||
|
@ -104,24 +106,26 @@ namespace WebsitePanel.WebDavPortal.Controllers
|
|||
}
|
||||
|
||||
[ChildActionOnly]
|
||||
public ActionResult ContentList(string org, FolderViewTypes viewType, string pathPart = "")
|
||||
public ActionResult ContentList(string org, ModelForWebDav model, string pathPart = "")
|
||||
{
|
||||
try
|
||||
{
|
||||
IEnumerable<IHierarchyItem> children = _webdavManager.OpenFolder(pathPart);
|
||||
|
||||
var model = new ModelForWebDav
|
||||
{
|
||||
UrlSuffix = pathPart,
|
||||
Permissions = _webDavAuthorizationService.GetPermissions(WspContext.User, pathPart),
|
||||
UserSettings = _userSettingsManager.GetUserSettings(WspContext.User.AccountId)
|
||||
};
|
||||
|
||||
if (Request.Browser.IsMobileDevice == false && model.UserSettings.WebDavViewType == FolderViewTypes.Table)
|
||||
{
|
||||
return PartialView("_ShowContentTable", model);
|
||||
}
|
||||
|
||||
IEnumerable<IHierarchyItem> children;
|
||||
|
||||
if (string.IsNullOrEmpty(model.SearchValue))
|
||||
{
|
||||
children = _webdavManager.OpenFolder(pathPart);
|
||||
}
|
||||
else
|
||||
{
|
||||
children = _webdavManager.SearchFiles(WspContext.User.ItemId, pathPart, model.SearchValue, WspContext.User.Login, true);
|
||||
}
|
||||
|
||||
model.Items = children.Take(WebDavAppConfigManager.Instance.ElementsRendering.DefaultCount);
|
||||
|
||||
return PartialView("_ShowContentBigIcons", model);
|
||||
|
@ -136,9 +140,20 @@ namespace WebsitePanel.WebDavPortal.Controllers
|
|||
[HttpGet]
|
||||
public ActionResult GetContentDetails(string org, string pathPart, [ModelBinder(typeof (JqueryDataTableModelBinder))] JqueryDataTableRequest dtRequest)
|
||||
{
|
||||
var folderItems = _webdavManager.OpenFolder(pathPart);
|
||||
IEnumerable<WebDavResource> folderItems;
|
||||
|
||||
var tableItems = Mapper.Map<IEnumerable<IHierarchyItem>, IEnumerable<ResourceTableItemModel>>(folderItems).ToList();
|
||||
if (string.IsNullOrEmpty(dtRequest.Search.Value) == false)
|
||||
{
|
||||
folderItems = _webdavManager.SearchFiles(WspContext.User.ItemId, pathPart, dtRequest.Search.Value, WspContext.User.Login, true).Select(x => new WebDavResource(null, x));
|
||||
}
|
||||
else
|
||||
{
|
||||
folderItems = _webdavManager.OpenFolder(pathPart).Select(x=>new WebDavResource(null, x));
|
||||
}
|
||||
|
||||
var tableItems = Mapper.Map<IEnumerable<WebDavResource>, IEnumerable<ResourceTableItemModel>>(folderItems).ToList();
|
||||
|
||||
FillContentModel(tableItems);
|
||||
|
||||
var orders = dtRequest.Orders.ToList();
|
||||
orders.Insert(0, new JqueryDataTableOrder{Column = 3, Ascending = false});
|
||||
|
@ -304,5 +319,27 @@ namespace WebsitePanel.WebDavPortal.Controllers
|
|||
}
|
||||
#endregion
|
||||
|
||||
private void FillContentModel(IEnumerable<ResourceTableItemModel> items)
|
||||
{
|
||||
foreach (var item in items)
|
||||
{
|
||||
var opener = _openerManager[Path.GetExtension(item.DisplayName)];
|
||||
|
||||
switch (opener)
|
||||
{
|
||||
case FileOpenerType.OfficeOnline:
|
||||
{
|
||||
var pathPart = item.Href.AbsolutePath.Replace("/" + WspContext.User.OrganizationId, "").TrimStart('/');
|
||||
item.Url = string.Concat(Url.RouteUrl(FileSystemRouteNames.EditOfficeOnline, new {org = WspContext.User.OrganizationId, pathPart = ""}), pathPart);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
item.Url = item.Href.LocalPath;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -15,7 +15,6 @@ namespace WebsitePanel.WebDavPortal.FileOperations
|
|||
public class FileOpenerManager
|
||||
{
|
||||
private readonly IDictionary<string, FileOpenerType> _operationTypes = new Dictionary<string, FileOpenerType>();
|
||||
private UrlHelper _urlHelper;
|
||||
|
||||
public FileOpenerManager()
|
||||
{
|
||||
|
@ -23,10 +22,8 @@ namespace WebsitePanel.WebDavPortal.FileOperations
|
|||
_operationTypes.AddRange(WebDavAppConfigManager.Instance.OfficeOnline.ToDictionary(x => x.Extension, y => FileOpenerType.OfficeOnline));
|
||||
}
|
||||
|
||||
public string GetUrl(IHierarchyItem item)
|
||||
public string GetUrl(IHierarchyItem item, UrlHelper urlHelper)
|
||||
{
|
||||
_urlHelper =_urlHelper ?? new UrlHelper(HttpContext.Current.Request.RequestContext);
|
||||
|
||||
var opener = this[Path.GetExtension(item.DisplayName)];
|
||||
string href = "/";
|
||||
|
||||
|
@ -35,7 +32,7 @@ namespace WebsitePanel.WebDavPortal.FileOperations
|
|||
case FileOpenerType.OfficeOnline:
|
||||
{
|
||||
var pathPart = item.Href.AbsolutePath.Replace("/" + WspContext.User.OrganizationId, "").TrimStart('/');
|
||||
href = string.Concat(_urlHelper.RouteUrl(FileSystemRouteNames.EditOfficeOnline, new { org = WspContext.User.OrganizationId, pathPart = "" }), pathPart);
|
||||
href = string.Concat(urlHelper.RouteUrl(FileSystemRouteNames.EditOfficeOnline, new { org = WspContext.User.OrganizationId, pathPart = "" }), pathPart);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
|
@ -36,18 +36,18 @@ namespace WebsitePanel.WebDavPortal.Mapping.Profiles.Webdav
|
|||
{
|
||||
var openerManager = new FileOpenerManager();
|
||||
|
||||
Mapper.CreateMap<IHierarchyItem, ResourceTableItemModel>()
|
||||
Mapper.CreateMap<WebDavResource, ResourceTableItemModel>()
|
||||
.ForMember(ti => ti.DisplayName, x => x.MapFrom(hi => hi.DisplayName.Trim('/')))
|
||||
.ForMember(ti => ti.Url, x => x.MapFrom(hi => openerManager.GetUrl(hi)))
|
||||
.ForMember(ti => ti.Href, x => x.MapFrom(hi => hi.Href))
|
||||
.ForMember(ti => ti.Type, x => x.MapFrom(hi => hi.ItemType.GetDescription().ToLowerInvariant()))
|
||||
.ForMember(ti => ti.IconHref, x => x.MapFrom(hi => hi.ItemType == ItemType.Folder ? WebDavAppConfigManager.Instance.FileIcons.FolderPath.Trim('~') : WebDavAppConfigManager.Instance.FileIcons[Path.GetExtension(hi.DisplayName.Trim('/'))].Trim('~')))
|
||||
.ForMember(ti => ti.IsTargetBlank, x => x.MapFrom(hi => openerManager.GetIsTargetBlank(hi)))
|
||||
.ForMember(ti => ti.Type, x => x.MapFrom(hi => (new WebDavResource(null, hi)).ItemType.GetDescription().ToLowerInvariant()))
|
||||
.ForMember(ti => ti.IconHref, x => x.MapFrom(hi => (new WebDavResource(null, hi)).ItemType == ItemType.Folder ? WebDavAppConfigManager.Instance.FileIcons.FolderPath.Trim('~') : WebDavAppConfigManager.Instance.FileIcons[Path.GetExtension(hi.DisplayName.Trim('/'))].Trim('~')))
|
||||
.ForMember(ti => ti.LastModified, x => x.MapFrom(hi => (new WebDavResource(null, hi)).LastModified))
|
||||
.ForMember(ti => ti.LastModified, x => x.MapFrom(hi => hi.LastModified))
|
||||
.ForMember(ti => ti.LastModifiedFormated,
|
||||
x => x.MapFrom(hi => (new WebDavResource(null, hi)).LastModified == DateTime.MinValue ? "--" : (new WebDavResource(null, hi)).LastModified.ToString("dd/MM/yyyy hh:mm tt")))
|
||||
x => x.MapFrom(hi => hi.LastModified == DateTime.MinValue ? "--" : (new WebDavResource(null, hi)).LastModified.ToString("dd/MM/yyyy hh:mm tt")))
|
||||
|
||||
.ForMember(ti => ti.Size, x => x.MapFrom(hi => (new WebDavResource(null,hi)).ContentLength))
|
||||
.ForMember(ti => ti.IsFolder, x => x.MapFrom(hi => (new WebDavResource(null, hi)).ItemType == ItemType.Folder));
|
||||
.ForMember(ti => ti.Size, x => x.MapFrom(hi => hi.ContentLength))
|
||||
.ForMember(ti => ti.IsFolder, x => x.MapFrom(hi => hi.ItemType == ItemType.Folder));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -8,6 +8,7 @@ namespace WebsitePanel.WebDavPortal.Models.FileSystem
|
|||
{
|
||||
public string DisplayName { get; set; }
|
||||
public string Url { get; set; }
|
||||
public Uri Href { get; set; }
|
||||
public bool IsTargetBlank { get; set; }
|
||||
public bool IsFolder { get; set; }
|
||||
public long Size { get; set; }
|
||||
|
|
|
@ -11,6 +11,7 @@ namespace WebsitePanel.WebDavPortal.Models
|
|||
public IEnumerable<IHierarchyItem> Items { get; set; }
|
||||
public string UrlSuffix { get; set; }
|
||||
public string Error { get; set; }
|
||||
public string SearchValue { get; set; }
|
||||
public WebDavPermissions Permissions { get; set; }
|
||||
public UserPortalSettings UserSettings { get; set; }
|
||||
}
|
||||
|
|
|
@ -249,6 +249,15 @@ namespace WebsitePanel.WebDavPortal.Resources {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Search.
|
||||
/// </summary>
|
||||
public static string Search {
|
||||
get {
|
||||
return ResourceManager.GetString("Search", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Select files to upload.
|
||||
/// </summary>
|
||||
|
|
|
@ -180,6 +180,9 @@
|
|||
<data name="ProcessingWithDots" xml:space="preserve">
|
||||
<value>Processing...</value>
|
||||
</data>
|
||||
<data name="Search" xml:space="preserve">
|
||||
<value>Search</value>
|
||||
</data>
|
||||
<data name="SelectFilesToUpload" xml:space="preserve">
|
||||
<value>Select files to upload</value>
|
||||
</data>
|
||||
|
|
|
@ -83,7 +83,6 @@ WspFileBrowser.prototype = {
|
|||
"ajax": ajaxUrl,
|
||||
"processing": true,
|
||||
"serverSide": true,
|
||||
"searching": false,
|
||||
"columnDefs": [
|
||||
{
|
||||
"render": function(data, type, row) {
|
||||
|
@ -118,6 +117,14 @@ WspFileBrowser.prototype = {
|
|||
});
|
||||
|
||||
$(tableId).removeClass('dataTable');
|
||||
|
||||
var oTable = this.table;
|
||||
$(tableId+'_filter input').unbind();
|
||||
$(tableId+'_filter input').bind('keyup', function (e) {
|
||||
if (e.keyCode == 13) {
|
||||
oTable.fnFilter(this.value);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
refreshDataTable: function () {
|
||||
|
@ -136,6 +143,40 @@ WspFileBrowser.prototype = {
|
|||
sequentialUploads: true
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
initBigIcons: function (elementId, url) {
|
||||
$(document).ready(function () {
|
||||
$(window).load(function () {
|
||||
getResources();
|
||||
});
|
||||
$(window).scroll(function () {
|
||||
if (($(window).scrollTop() + 1) >= ($(document).height() - $(window).height())) {
|
||||
getResources();
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
var oldResourcesDivHeight = $(elementId).height();
|
||||
|
||||
function getResources() {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: url,//'/storage/show-additional-content',
|
||||
data: { path: window.location.pathname, resourseRenderCount: $(".element-container").length },
|
||||
dataType: "html",
|
||||
success: function (result) {
|
||||
var domElement = $(result);
|
||||
$(elementId).append(domElement);
|
||||
if ($(document).height() == $(window).height() && oldResourcesDivHeight != $('#resourcesDiv').height()) {
|
||||
getResources();
|
||||
oldResourcesDivHeight = $(elementId).height();
|
||||
};
|
||||
|
||||
recalculateResourseHeight();
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -41,9 +41,9 @@ $(document).on('touchstart', '.element-container', function(e) {
|
|||
$(document).on('dblclick', '.element-container', function (e) {
|
||||
wsp.fileBrowser.openItem(this);
|
||||
|
||||
var links = $(item).find('.file-link');
|
||||
var links = $(this).find('.file-link');
|
||||
|
||||
if (links.length != 0 && links[0].hasClass('processing-dialog')) {
|
||||
if (links.length != 0 && $(links[0]).hasClass('processing-dialog')) {
|
||||
wsp.dialogs.showProcessDialog();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -20,7 +20,7 @@ else
|
|||
{
|
||||
@Html.Partial("_ShowContentTopMenu", Model)
|
||||
|
||||
@Html.Action("ContentList", "FileSystem", new { viewType = Request.Browser.IsMobileDevice ? FolderViewTypes.BigIcons : Model.UserSettings.WebDavViewType });
|
||||
@Html.Action("ContentList", "FileSystem", new { model = Model });
|
||||
}
|
||||
|
||||
|
||||
|
@ -34,17 +34,22 @@ else
|
|||
@Scripts.Render("~/bundles/bigIconsScripts")
|
||||
|
||||
<script>
|
||||
recalculateResourseHeight();
|
||||
$(document).ready(function () {
|
||||
@if (string.IsNullOrEmpty(Model.SearchValue))
|
||||
{
|
||||
@:wsp.fileBrowser.initBigIcons('#resourcesDiv', '@Url.RouteUrl(FileSystemRouteNames.ShowAdditionalContent)');
|
||||
}
|
||||
recalculateResourseHeight();
|
||||
});
|
||||
</script>
|
||||
}
|
||||
else
|
||||
{
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(document).ready(function () {
|
||||
wsp.fileBrowser.setSettings({ deletionUrl: "@Url.RouteUrl(FileSystemRouteNames.DeleteFiles)" });
|
||||
wsp.fileBrowser.initDataTable('#webdav-items-table', '@Url.RouteUrl(FileSystemRouteNames.ShowContentDetails)');
|
||||
});
|
||||
|
||||
</script>
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,26 @@
|
|||
@using WebsitePanel.WebDav.Core.Client
|
||||
@using WebsitePanel.WebDavPortal.Resources
|
||||
@using WebsitePanel.WebDavPortal.UI.Routes
|
||||
@model WebsitePanel.WebDavPortal.Models.ModelForWebDav
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="search-block navbar-right">
|
||||
<div>
|
||||
@using (Html.BeginRouteForm(FileSystemRouteNames.ShowContentPath))
|
||||
{
|
||||
<label>
|
||||
@UI.Search:
|
||||
</label>
|
||||
@Html.TextBoxFor(x => x.SearchValue, new { @class = "form-control input-sm"})
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
|
||||
|
||||
<div class="row" id="resourcesDiv">
|
||||
@if (Model != null)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue