Commit Contribution from Helicon
Includes: - complete re-write of Web Application Gallery - Addition of Web PI Installer in Server module
This commit is contained in:
parent
3b81883a25
commit
a2beec7fe4
80 changed files with 9236 additions and 1762 deletions
|
@ -0,0 +1,214 @@
|
|||
// Copyright (c) 2012, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// - Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace WebsitePanel.Server
|
||||
{
|
||||
public class WPIProduct
|
||||
{
|
||||
private string productId;
|
||||
private string logo;
|
||||
private string summary;
|
||||
private string title;
|
||||
private string link;
|
||||
private string version;
|
||||
private string eulaUrl;
|
||||
private string downloadedLocation;
|
||||
private string longDescription;
|
||||
private bool isInstalled;
|
||||
private int fileSize;
|
||||
private DateTime published;
|
||||
private string author;
|
||||
private string authorUri;
|
||||
|
||||
public WPIProduct()
|
||||
{
|
||||
}
|
||||
|
||||
public string Logo
|
||||
{
|
||||
get { return this.logo; }
|
||||
set { this.logo = value; }
|
||||
}
|
||||
|
||||
public string ProductId
|
||||
{
|
||||
get { return this.productId; }
|
||||
set { this.productId = value; }
|
||||
}
|
||||
|
||||
|
||||
public string Summary
|
||||
{
|
||||
get { return this.summary; }
|
||||
set { this.summary = value; }
|
||||
}
|
||||
|
||||
public string Title
|
||||
{
|
||||
get { return this.title; }
|
||||
set { this.title = value; }
|
||||
}
|
||||
|
||||
public string Link
|
||||
{
|
||||
get { return this.link; }
|
||||
set { this.link = value; }
|
||||
}
|
||||
|
||||
public bool IsInstalled
|
||||
{
|
||||
get { return this.isInstalled; }
|
||||
set { this.isInstalled = value; }
|
||||
}
|
||||
|
||||
public string Version
|
||||
{
|
||||
get { return this.version; }
|
||||
set { this.version = value; }
|
||||
}
|
||||
|
||||
public string EulaUrl
|
||||
{
|
||||
get { return this.eulaUrl; }
|
||||
set { this.eulaUrl = value; }
|
||||
}
|
||||
|
||||
public string DownloadedLocation
|
||||
{
|
||||
get { return this.downloadedLocation; }
|
||||
set { this.downloadedLocation = value; }
|
||||
}
|
||||
|
||||
public int FileSize
|
||||
{
|
||||
get { return this.fileSize; }
|
||||
set { this.fileSize = value; }
|
||||
}
|
||||
|
||||
public string LongDescription
|
||||
{
|
||||
get { return this.longDescription; }
|
||||
set { this.longDescription = value; }
|
||||
}
|
||||
|
||||
public DateTime Published
|
||||
{
|
||||
get { return this.published; }
|
||||
set { this.published = value; }
|
||||
}
|
||||
|
||||
public string Author
|
||||
{
|
||||
get { return author; }
|
||||
set { author = value; }
|
||||
}
|
||||
|
||||
public string AuthorUri
|
||||
{
|
||||
get { return authorUri; }
|
||||
set { authorUri = value; }
|
||||
}
|
||||
}
|
||||
|
||||
public class WPITab
|
||||
{
|
||||
private string description;
|
||||
private bool fromCustomFeed;
|
||||
private string id;
|
||||
private string name;
|
||||
|
||||
public WPITab()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public WPITab(string id, string name)
|
||||
{
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public string Description
|
||||
{
|
||||
get { return this.description; }
|
||||
set { this.description = value; }
|
||||
}
|
||||
|
||||
public bool FromCustomFeed
|
||||
{
|
||||
get { return this.fromCustomFeed; }
|
||||
set { this.fromCustomFeed = value; }
|
||||
}
|
||||
|
||||
public string Id
|
||||
{
|
||||
get { return this.id; }
|
||||
set { this.id = value; }
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return this.name; }
|
||||
set { this.name = value; }
|
||||
}
|
||||
}
|
||||
|
||||
public class WPIKeyword
|
||||
{
|
||||
private string id;
|
||||
private string text;
|
||||
|
||||
public WPIKeyword()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public WPIKeyword(string id, string text)
|
||||
{
|
||||
this.id = id;
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
public string Id
|
||||
{
|
||||
get { return this.id; }
|
||||
set { this.id = value; }
|
||||
}
|
||||
|
||||
public string Text
|
||||
{
|
||||
get { return this.text; }
|
||||
set { this.text = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -57,7 +57,7 @@ namespace WebsitePanel.Providers.Common
|
|||
public void AddError(string errorCode, Exception ex)
|
||||
{
|
||||
if(ex != null)
|
||||
errorCode += ":" + ex.Message;
|
||||
errorCode += ":" + ex.Message + "; " + ex.StackTrace;
|
||||
|
||||
this.ErrorCodes.Add(errorCode);
|
||||
this.IsSuccess = false;
|
||||
|
|
|
@ -47,4 +47,8 @@ namespace WebsitePanel.Providers.ResultObjects
|
|||
public class DeploymentParametersResult : ValueResultObject<List<DeploymentParameter>>
|
||||
{
|
||||
}
|
||||
|
||||
public class GalleryLanguagesResult : ValueResultObject<List<SettingPair>>
|
||||
{
|
||||
}
|
||||
}
|
|
@ -119,14 +119,18 @@ namespace WebsitePanel.Providers.Web
|
|||
|
||||
|
||||
// web app gallery
|
||||
void InitFeeds(int UserId, string[] feeds);
|
||||
void SetResourceLanguage(int UserId, string resourceLanguage);
|
||||
bool IsMsDeployInstalled();
|
||||
GalleryCategoriesResult GetGalleryCategories();
|
||||
GalleryApplicationsResult GetGalleryApplications(string categoryId);
|
||||
GalleryApplicationResult GetGalleryApplication(string id);
|
||||
GalleryWebAppStatus GetGalleryApplicationStatus(string id);
|
||||
GalleryWebAppStatus DownloadGalleryApplication(string id);
|
||||
DeploymentParametersResult GetGalleryApplicationParameters(string id);
|
||||
StringResultObject InstallGalleryApplication(string id, List<DeploymentParameter> updatedValues);
|
||||
GalleryLanguagesResult GetGalleryLanguages(int UserId);
|
||||
GalleryCategoriesResult GetGalleryCategories(int UserId);
|
||||
GalleryApplicationsResult GetGalleryApplications(int UserId, string categoryId);
|
||||
GalleryApplicationsResult GetGalleryApplicationsFiltered(int UserId, string pattern);
|
||||
GalleryApplicationResult GetGalleryApplication(int UserId, string id);
|
||||
GalleryWebAppStatus GetGalleryApplicationStatus(int UserId, string id);
|
||||
GalleryWebAppStatus DownloadGalleryApplication(int UserId, string id);
|
||||
DeploymentParametersResult GetGalleryApplicationParameters(int UserId, string id);
|
||||
StringResultObject InstallGalleryApplication(int UserId, string id, List<DeploymentParameter> updatedValues, string languageId);
|
||||
|
||||
//
|
||||
void GrantWebManagementAccess(string siteId, string accountName, string accountPassword);
|
||||
|
|
|
@ -41,37 +41,48 @@ namespace WebsitePanel.Providers.WebAppGallery
|
|||
}
|
||||
|
||||
[Flags]
|
||||
public enum DeploymentParameterWellKnownTag
|
||||
public enum DeploymentParameterWellKnownTag : long
|
||||
{
|
||||
None = 0,
|
||||
AppHostConfig = 1,
|
||||
AppPoolConfig = 2,
|
||||
Boolean = 4,
|
||||
ComObject32 = 8,
|
||||
ComObject64 = 16,
|
||||
DBAdminPassword = 32,
|
||||
DBAdminUserName = 64,
|
||||
DBConnectionString = 128,
|
||||
DBName = 256,
|
||||
DBServer = 512,
|
||||
DBUserName = 1024,
|
||||
DBUserPassword = 2048,
|
||||
FlatFile = 4096,
|
||||
Hidden = 8192,
|
||||
IisApp = 16384,
|
||||
MetaKey = 32768,
|
||||
MySql = 65536,
|
||||
MySqlConnectionString = 131072,
|
||||
New = 262144,
|
||||
RegKey = 524288,
|
||||
SetAcl = 1048576,
|
||||
Sql = 2097152,
|
||||
SqLite = 4194304,
|
||||
SqlConnectionString = 8388608,
|
||||
Password = 16777216,
|
||||
PhysicalPath = 33554432,
|
||||
VistaDB = 67108864,
|
||||
Validate = 134217728,
|
||||
None = 0L,
|
||||
AppHostConfig = 1L,
|
||||
AppPoolConfig = 2L,
|
||||
Boolean = 4L,
|
||||
ComObject32 = 8L,
|
||||
ComObject64 = 16L,
|
||||
DBAdminPassword = 32L,
|
||||
DBAdminUserName = 64L,
|
||||
DBConnectionString = 128L,
|
||||
DBName = 256L,
|
||||
DBServer = 512L,
|
||||
DBUserName = 1024L,
|
||||
DBUserPassword = 2048L,
|
||||
FlatFile = 4096L,
|
||||
Hidden = 8192L,
|
||||
IisApp = 16384L,
|
||||
MetaKey = 32768L,
|
||||
MySql = 65536L,
|
||||
MySqlConnectionString = 131072L,
|
||||
New = 262144L,
|
||||
RegKey = 524288L,
|
||||
SetAcl = 1048576L,
|
||||
Sql = 2097152L,
|
||||
SqLite = 4194304L,
|
||||
SqlConnectionString = 8388608L,
|
||||
Password = 16777216L,
|
||||
PhysicalPath = 33554432L,
|
||||
VistaDB = 67108864L,
|
||||
Validate = 134217728L,
|
||||
SqLiteConnectionString = 268435456L,
|
||||
SqlCE = 536870912L,
|
||||
NoStore = 1073741824L,
|
||||
AppURL = 2147483648L,
|
||||
NoProtocol = 4294967296L,
|
||||
DBUserConnectionString = 8589934592L,
|
||||
DBAdminConnectionString = 17179869184L,
|
||||
WebPIApplicationID = 34359738368L,
|
||||
Ignore = 68719476736L,
|
||||
AutoGenerated = 137438953472L,
|
||||
SingleLineConnectionString = 274877906944L,
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
|
|
|
@ -203,7 +203,7 @@ namespace WebsitePanel.Providers.WebAppGallery
|
|||
}
|
||||
}
|
||||
|
||||
[XmlIgnore]
|
||||
[XmlIgnore]
|
||||
public string Size
|
||||
{
|
||||
get
|
||||
|
@ -217,6 +217,10 @@ namespace WebsitePanel.Providers.WebAppGallery
|
|||
}
|
||||
}
|
||||
|
||||
[XmlElement(ElementName = "installerFileSize", Namespace = "http://www.w3.org/2005/Atom")]
|
||||
public int InstallerFileSize { get; set; }
|
||||
|
||||
|
||||
public string AuthorName {
|
||||
get { return Author.Name; }
|
||||
}
|
||||
|
|
|
@ -53,6 +53,9 @@ namespace WebsitePanel.Providers.WebAppGallery
|
|||
public const string MsDeployIsNotInstalled = "MsDeployIsNotInstalled";
|
||||
public const string GeneralError = "GeneralError"; // + exception message
|
||||
|
||||
// Languages
|
||||
public const string GetLanguagesError = "GetLanguagesError";
|
||||
|
||||
// Categories
|
||||
public const string GetCategoriesError = "GetCategoriesError";
|
||||
|
||||
|
|
|
@ -74,6 +74,7 @@
|
|||
<Compile Include="Common\ByteOperations.cs" />
|
||||
<Compile Include="Common\ErrorCodes.cs" />
|
||||
<Compile Include="Common\PasswdHelper.cs" />
|
||||
<Compile Include="Common\WPIEntries.cs" />
|
||||
<Compile Include="HostedSolution\BaseReport.cs" />
|
||||
<Compile Include="HostedSolution\BaseStatistics.cs" />
|
||||
<Compile Include="HostedSolution\BlackBerryErrorsCodes.cs" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue