mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-04-05 21:01:35 +08:00
Move Orchard Packaging API to Orchard Frx
We have decided to use OPC for Orchard packages, so it makes sense to move the API from Futures to the Frx. --HG-- branch : dev rename : src/Orchard.Web/Modules/Futures.Modules.Packaging/Services/AtomExtensions.cs => src/Orchard/Packaging/AtomExtensions.cs rename : src/Orchard.Web/Modules/Futures.Modules.Packaging/Services/IPackageBuilder.cs => src/Orchard/Packaging/IPackageBuilder.cs rename : src/Orchard.Web/Modules/Futures.Modules.Packaging/Services/IPackageExpander.cs => src/Orchard/Packaging/IPackageExpander.cs rename : src/Orchard.Web/Modules/Futures.Modules.Packaging/Services/IPackageManager.cs => src/Orchard/Packaging/IPackageManager.cs rename : src/Orchard.Web/Modules/Futures.Modules.Packaging/Services/IPackageSourceManager.cs => src/Orchard/Packaging/IPackageSourceManager.cs rename : src/Orchard.Web/Modules/Futures.Modules.Packaging/Services/PackageBuilder.cs => src/Orchard/Packaging/PackageBuilder.cs rename : src/Orchard.Web/Modules/Futures.Modules.Packaging/Services/PackageData.cs => src/Orchard/Packaging/PackageData.cs rename : src/Orchard.Web/Modules/Futures.Modules.Packaging/Services/PackageEntry.cs => src/Orchard/Packaging/PackageEntry.cs rename : src/Orchard.Web/Modules/Futures.Modules.Packaging/Services/PackageExpander.cs => src/Orchard/Packaging/PackageExpander.cs rename : src/Orchard.Web/Modules/Futures.Modules.Packaging/Services/PackageManager.cs => src/Orchard/Packaging/PackageManager.cs rename : src/Orchard.Web/Modules/Futures.Modules.Packaging/Services/PackageSource.cs => src/Orchard/Packaging/PackageSource.cs rename : src/Orchard.Web/Modules/Futures.Modules.Packaging/Services/PackageSourceManager.cs => src/Orchard/Packaging/PackageSourceManager.cs
This commit is contained in:
parent
63613d4c61
commit
9e65f8562a
@ -1,9 +1,9 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using Futures.Modules.Packaging.Services;
|
||||
using Orchard.Commands;
|
||||
using Orchard.Environment.Extensions;
|
||||
using Orchard.Packaging;
|
||||
|
||||
namespace Futures.Modules.Packaging.Commands {
|
||||
public class PackagingCommands : DefaultOrchardCommandHandler {
|
||||
|
@ -1,10 +1,10 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using Futures.Modules.Packaging.Services;
|
||||
using Futures.Modules.Packaging.ViewModels;
|
||||
using Orchard.Environment.Extensions;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Packaging;
|
||||
using Orchard.Themes;
|
||||
using Orchard.UI.Admin;
|
||||
using Orchard.UI.Notify;
|
||||
|
@ -37,7 +37,6 @@
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.Web.DynamicData" />
|
||||
<Reference Include="System.Web.Entity" />
|
||||
<Reference Include="System.Web.ApplicationServices" />
|
||||
@ -64,25 +63,12 @@
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Web.Services" />
|
||||
<Reference Include="System.EnterpriseServices" />
|
||||
<Reference Include="WindowsBase" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AdminMenu.cs" />
|
||||
<Compile Include="Commands\PackagingCommands.cs" />
|
||||
<Compile Include="Controllers\DownloadStreamResult.cs" />
|
||||
<Compile Include="Controllers\PackagingController.cs" />
|
||||
<Compile Include="Services\AtomExtensions.cs" />
|
||||
<Compile Include="Services\IPackageBuilder.cs" />
|
||||
<Compile Include="Services\IPackageExpander.cs" />
|
||||
<Compile Include="Services\IPackageManager.cs" />
|
||||
<Compile Include="Services\IPackageSourceManager.cs" />
|
||||
<Compile Include="Services\PackageBuilder.cs" />
|
||||
<Compile Include="Services\PackageData.cs" />
|
||||
<Compile Include="Services\PackageEntry.cs" />
|
||||
<Compile Include="Services\PackageExpander.cs" />
|
||||
<Compile Include="Services\PackageManager.cs" />
|
||||
<Compile Include="Services\PackageSource.cs" />
|
||||
<Compile Include="Services\PackageSourceManager.cs" />
|
||||
<Compile Include="ViewModels\PackagingHarvestViewModel.cs" />
|
||||
<Compile Include="ViewModels\PackagingModulesViewModel.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
@ -100,6 +86,7 @@
|
||||
<Folder Include="Content\" />
|
||||
<Folder Include="Models\" />
|
||||
<Folder Include="Scripts\" />
|
||||
<Folder Include="Services\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Orchard\Orchard.Framework.csproj">
|
||||
|
@ -1,7 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Futures.Modules.Packaging.Services;
|
||||
using Orchard.Environment.Extensions.Models;
|
||||
using Orchard.Packaging;
|
||||
|
||||
namespace Futures.Modules.Packaging.ViewModels {
|
||||
public class PackagingHarvestViewModel {
|
||||
|
@ -1,5 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using Futures.Modules.Packaging.Services;
|
||||
using Orchard.Packaging;
|
||||
|
||||
namespace Futures.Modules.Packaging.ViewModels {
|
||||
public class PackagingModulesViewModel {
|
||||
|
@ -1,5 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using Futures.Modules.Packaging.Services;
|
||||
using Orchard.Packaging;
|
||||
|
||||
namespace Futures.Modules.Packaging.ViewModels {
|
||||
public class PackagingSourcesViewModel {
|
||||
|
@ -105,6 +105,7 @@
|
||||
<Reference Include="System.Runtime.Serialization">
|
||||
<RequiredTargetFramework>3.0</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.Transactions" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.Abstractions">
|
||||
@ -120,6 +121,7 @@
|
||||
</Reference>
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="Yaml, Version=1.0.3370.39839, Culture=neutral, PublicKeyToken=187a3d240e44a135, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\yaml\Yaml.dll</HintPath>
|
||||
@ -361,6 +363,18 @@
|
||||
</Compile>
|
||||
<Compile Include="ContentManagement\DataMigrations\FrameworkDataMigration.cs" />
|
||||
<Compile Include="FileSystems\Dependencies\DynamicModuleVirtualPathProvider.cs" />
|
||||
<Compile Include="Packaging\AtomExtensions.cs" />
|
||||
<Compile Include="Packaging\IPackageBuilder.cs" />
|
||||
<Compile Include="Packaging\IPackageExpander.cs" />
|
||||
<Compile Include="Packaging\IPackageManager.cs" />
|
||||
<Compile Include="Packaging\IPackageSourceManager.cs" />
|
||||
<Compile Include="Packaging\PackageBuilder.cs" />
|
||||
<Compile Include="Packaging\PackageData.cs" />
|
||||
<Compile Include="Packaging\PackageEntry.cs" />
|
||||
<Compile Include="Packaging\PackageExpander.cs" />
|
||||
<Compile Include="Packaging\PackageManager.cs" />
|
||||
<Compile Include="Packaging\PackageSource.cs" />
|
||||
<Compile Include="Packaging\PackageSourceManager.cs" />
|
||||
<Compile Include="Utility\Hash.cs" />
|
||||
<Compile Include="Data\ISessionConfigurationCache.cs" />
|
||||
<Compile Include="Data\Migration\Generator\ISchemaCommandGenerator.cs" />
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Futures.Modules.Packaging.Services {
|
||||
namespace Orchard.Packaging {
|
||||
static class AtomExtensions {
|
||||
public static string Atom(this XElement entry, string localName) {
|
||||
var element = entry.Element(AtomXName(localName));
|
@ -1,8 +1,7 @@
|
||||
using System.IO;
|
||||
using Orchard;
|
||||
using Orchard.Environment.Extensions.Models;
|
||||
|
||||
namespace Futures.Modules.Packaging.Services {
|
||||
namespace Orchard.Packaging {
|
||||
public interface IPackageBuilder : IDependency {
|
||||
Stream BuildPackage(ExtensionDescriptor extensionDescriptor);
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
using System.IO;
|
||||
using Orchard;
|
||||
|
||||
namespace Futures.Modules.Packaging.Services {
|
||||
namespace Orchard.Packaging {
|
||||
public interface IPackageExpander : IDependency {
|
||||
void ExpandPackage(Stream packageStream);
|
||||
}
|
@ -1,6 +1,4 @@
|
||||
using Orchard;
|
||||
|
||||
namespace Futures.Modules.Packaging.Services {
|
||||
namespace Orchard.Packaging {
|
||||
public interface IPackageManager : IDependency {
|
||||
PackageData Harvest(string extensionName);
|
||||
PackageData Download(string feedItemId);
|
@ -1,8 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Orchard;
|
||||
|
||||
namespace Futures.Modules.Packaging.Services {
|
||||
namespace Orchard.Packaging {
|
||||
public interface IPackageSourceManager : IDependency {
|
||||
IEnumerable<PackageSource> GetSources();
|
||||
void AddSource(PackageSource source);
|
@ -2,13 +2,14 @@
|
||||
using System.IO;
|
||||
using System.IO.Packaging;
|
||||
using System.Linq;
|
||||
using System.Net.Mime;
|
||||
using System.Reflection;
|
||||
using System.Xml.Linq;
|
||||
using Orchard.Environment.Extensions;
|
||||
using Orchard.Environment.Extensions.Models;
|
||||
using Orchard.FileSystems.WebSite;
|
||||
|
||||
namespace Futures.Modules.Packaging.Services {
|
||||
namespace Orchard.Packaging {
|
||||
public class PackageBuilder : IPackageBuilder {
|
||||
private readonly IExtensionManager _extensionManager;
|
||||
private readonly IWebSiteFolder _webSiteFolder;
|
||||
@ -82,7 +83,7 @@ namespace Futures.Modules.Packaging.Services {
|
||||
.Attributes("Include")
|
||||
.Select(x => x.Value);
|
||||
foreach (var includePath in includePaths) {
|
||||
EmbedVirtualFile(context, includePath, System.Net.Mime.MediaTypeNames.Application.Octet);
|
||||
EmbedVirtualFile(context, includePath, MediaTypeNames.Application.Octet);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -104,7 +105,7 @@ namespace Futures.Modules.Packaging.Services {
|
||||
|
||||
var virtualPath = "bin/" + assemblyName.Name + ".dll";
|
||||
if (context.SourceFolder.FileExists(context.SourcePath + virtualPath)) {
|
||||
EmbedVirtualFile(context, virtualPath, System.Net.Mime.MediaTypeNames.Application.Octet);
|
||||
EmbedVirtualFile(context, virtualPath, MediaTypeNames.Application.Octet);
|
||||
}
|
||||
else if (hintPath != null) {
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
using System.IO;
|
||||
|
||||
namespace Futures.Modules.Packaging.Services {
|
||||
namespace Orchard.Packaging {
|
||||
public class PackageData {
|
||||
public string ExtensionName { get; set; }
|
||||
public string ExtensionVersion { get; set; }
|
@ -1,6 +1,6 @@
|
||||
using System.ServiceModel.Syndication;
|
||||
|
||||
namespace Futures.Modules.Packaging.Services {
|
||||
namespace Orchard.Packaging {
|
||||
public class PackageEntry {
|
||||
public PackageSource Source { get; set; }
|
||||
public SyndicationFeed SyndicationFeed { get; set; }
|
@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.IO.Packaging;
|
||||
using System.Linq;
|
||||
@ -8,19 +8,13 @@ using Orchard.Environment.Extensions;
|
||||
using Orchard.FileSystems.VirtualPath;
|
||||
using Orchard.FileSystems.WebSite;
|
||||
|
||||
namespace Futures.Modules.Packaging.Services {
|
||||
namespace Orchard.Packaging {
|
||||
public class PackageExpander : IPackageExpander {
|
||||
private const string ContentTypePrefix = "Orchard ";
|
||||
private readonly IExtensionManager _extensionManager;
|
||||
private readonly IWebSiteFolder _webSiteFolder;
|
||||
private readonly IVirtualPathProvider _virtualPathProvider;
|
||||
|
||||
public PackageExpander(
|
||||
IExtensionManager extensionManager,
|
||||
IWebSiteFolder webSiteFolder,
|
||||
IVirtualPathProvider virtualPathProvider) {
|
||||
_extensionManager = extensionManager;
|
||||
_webSiteFolder = webSiteFolder;
|
||||
_virtualPathProvider = virtualPathProvider;
|
||||
}
|
||||
|
||||
@ -167,6 +161,5 @@ namespace Futures.Modules.Packaging.Services {
|
||||
throw new ApplicationException("Unknown extension type");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
using System.IO;
|
||||
using System.IO;
|
||||
using System.IO.Packaging;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using Orchard.Environment.Extensions;
|
||||
|
||||
namespace Futures.Modules.Packaging.Services {
|
||||
namespace Orchard.Packaging {
|
||||
public class PackageManager : IPackageManager {
|
||||
private readonly IExtensionManager _extensionManager;
|
||||
private readonly IPackageSourceManager _packageSourceManager;
|
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace Futures.Modules.Packaging.Services {
|
||||
namespace Orchard.Packaging {
|
||||
public class PackageSource {
|
||||
public Guid Id { get; set; }
|
||||
public string FeedUrl { get; set; }
|
@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
@ -8,7 +8,7 @@ using System.Xml.Linq;
|
||||
using System.Xml.Serialization;
|
||||
using Orchard.FileSystems.AppData;
|
||||
|
||||
namespace Futures.Modules.Packaging.Services {
|
||||
namespace Orchard.Packaging {
|
||||
public class PackageSourceManager : IPackageSourceManager {
|
||||
private readonly IAppDataFolder _appDataFolder;
|
||||
private static readonly XmlSerializer _sourceSerializer = new XmlSerializer(typeof(List<PackageSource>), new XmlRootAttribute("Sources"));
|
Loading…
Reference in New Issue
Block a user