Skip to content

Commit

Permalink
Merge pull request #387 from Orckestra/dev
Browse files Browse the repository at this point in the history
C1 CMS naming and fixes (mostly upgrade related)
  • Loading branch information
Marcus Wendt authored Feb 8, 2017
2 parents 22511fd + 80d29fe commit f78b232
Show file tree
Hide file tree
Showing 89 changed files with 413 additions and 260 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ private string GetDocumentTitle(PackageDescription packageDescription)
{
// Valid package names:
// "Composite.Community.Versioning"
// "Orckestra CMS 3.0"
// "C1 CMS 3.0"
string name = packageDescription.Name.Trim();

string documentTitle = name;
Expand Down
2 changes: 1 addition & 1 deletion Composite.Workflows/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly. See also Composite SharedAssemblyInfo.cs
[assembly: AssemblyDescription("Orckestra CMS Workflow Foundation classes")]
[assembly: AssemblyDescription("C1 CMS Workflow Foundation classes")]
[assembly: AssemblyConfiguration("")]

// Setting ComVisible to false makes the types in this assembly not visible
Expand Down
2 changes: 1 addition & 1 deletion Composite/AspNet/Razor/CompositeC1WebPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace Composite.AspNet.Razor
{
/// <summary>
/// Defines a Orckestra CMS razor control
/// Defines a C1 CMS razor control
/// </summary>
public abstract class CompositeC1WebPage : WebPage, IDisposable
{
Expand Down
31 changes: 28 additions & 3 deletions Composite/C1Console/Actions/UrlActionToken.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
using Composite.C1Console.Security;
using Composite.C1Console.Events;
using System.Web;
using Composite.Core.ResourceSystem;
using Composite.Core.ResourceSystem.Icons;


namespace Composite.C1Console.Actions
Expand All @@ -20,10 +22,23 @@ public sealed class UrlActionToken : ActionToken
/// <param name="url"></param>
/// <param name="permissionTypes"></param>
public UrlActionToken(string label, string url, IEnumerable<PermissionType> permissionTypes)
: this(label, DefaultIcon, url, permissionTypes)
{
}

/// <summary>
/// To add a custom URL action
/// </summary>
/// <param name="label"></param>
/// <param name="url"></param>
/// <param name="icon"></param>
/// <param name="permissionTypes"></param>
public UrlActionToken(string label, ResourceHandle icon, string url, IEnumerable<PermissionType> permissionTypes)
{
Label = label;
Url = url;
PermissionTypes = permissionTypes;
Icon = icon;
}

/// <exclude />
Expand All @@ -35,19 +50,28 @@ public UrlActionToken(string label, string url, IEnumerable<PermissionType> perm
/// <exclude />
public override IEnumerable<PermissionType> PermissionTypes { get; }

/// <exclude />
public ResourceHandle Icon { get; }

/// <exclude />
public override string Serialize()
{
return this.Label + "·" + this.Url + "·" + this.PermissionTypes.SerializePermissionTypes();
return $"{Label}·{Url}·{PermissionTypes.SerializePermissionTypes()}·{Icon.ResourceNamespace}·{Icon.ResourceName}";
}

private static ResourceHandle DefaultIcon => new ResourceHandle(BuildInIconProviderName.ProviderName, "page");


/// <exclude />
public static ActionToken Deserialize(string serializedData)
{
string[] s = serializedData.Split('·');

return new UrlActionToken(s[0], s[1], s[2].DesrializePermissionTypes());
var icon = s.Length == 5
? new ResourceHandle(s[3], s[4])
: DefaultIcon;

return new UrlActionToken(s[0], icon, s[1], s[2].DesrializePermissionTypes());
}
}

Expand All @@ -73,7 +97,8 @@ public FlowToken Execute(EntityToken entityToken, ActionToken actionToken, FlowC
Url = extendedUrl,
ViewId = Guid.NewGuid().ToString(),
ViewType = ViewType.Main,
Label = urlActionToken.Label
Label = urlActionToken.Label,
IconResourceHandle = urlActionToken.Icon
}, currentConsoleId);

return null;
Expand Down
2 changes: 1 addition & 1 deletion Composite/C1Console/Commands/IConsoleCommandHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace Composite.C1Console.Commands
{
/// <summary>
/// Handles hash based deep links to Orckestra CMS console (/Composite/top.aspx#&lt;command name&gt;;&lt;command payload&gt; )
/// Handles hash based deep links to C1 CMS console (/Composite/top.aspx#&lt;command name&gt;;&lt;command payload&gt; )
/// </summary>
[CustomFactory(typeof(ConsoleCommandHandlerCustomFactory))]
public interface IConsoleCommandHandler
Expand Down
2 changes: 1 addition & 1 deletion Composite/C1Console/Security/EntityToken.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public object Deserialize(string serializedObject)


/// <summary>
/// EntityToken is used through out Orckestra CMS to describe artifacts that can have security settings. Also see <see cref="Composite.Data.DataEntityToken"/>.
/// EntityToken is used through out C1 CMS to describe artifacts that can have security settings. Also see <see cref="Composite.Data.DataEntityToken"/>.
/// </summary>
/// <remarks>
/// When subclassing this class and adding properties that have an impack when identity (equiallity)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ public LoginSessionStoreFactory()

public new ILoginSessionStore CreateDefault()
{
var loginSessionstores =
(ServiceLocator.GetServices<INoneConfigurationBasedLoginSessionStore>()??
Enumerable.Empty<ILoginSessionStore>())
.Union(new[] { base.CreateDefault() });
if (ServiceLocator.HasService(typeof(INoneConfigurationBasedLoginSessionStore)))
{
var loginSessionstores = ServiceLocator.GetServices<INoneConfigurationBasedLoginSessionStore>().Union(new[] { base.CreateDefault() });

return new LoginSessionStoreResolver(loginSessionstores);
return new LoginSessionStoreResolver(loginSessionstores);
}

return new LoginSessionStoreResolver(new[] { base.CreateDefault() });
}
}
}
Expand Down
1 change: 1 addition & 0 deletions Composite/Composite.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@
<Compile Include="Search\Crawling\DefaultDocumentFieldNames.cs" />
<Compile Include="Search\Crawling\EntityTokenSecurityHelper.cs" />
<Compile Include="Search\Crawling\IDataFieldProcessorProvider.cs" />
<Compile Include="Search\Crawling\PublicationStatusDataFieldProcessor.cs" />
<Compile Include="Search\Crawling\SearchDocumentBuilder.cs" />
<Compile Include="Search\Crawling\DateTimeDataFieldProcessor.cs" />
<Compile Include="Search\Crawling\DefaultDataFieldProcessor.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Composite.Core.Configuration.BuildinPlugins.GlobalSettingsProvider
{
internal sealed class BuildinGlobalSettingsProvider : IGlobalSettingsProvider
{
private string _applicationName = "Orckestra CMS";
private string _applicationName = "C1 CMS";
private string _applicationShortName = "C1";
private string _brandedVersionAssemblySource = "Composite";
private string _configurationDirectory = "~";
Expand Down
2 changes: 1 addition & 1 deletion Composite/Core/Configuration/GlobalSettingsFacade.cs
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ public static bool OnlyTranslateWhenApproved

/// <summary>
/// The maximum number of characters the path to the application root (like 'C:\InetPub\MySite') can contain.
/// Orckestra CMS create files below this path, some of which have very long paths - if the root path is long enough the combined length
/// C1 CMS create files below this path, some of which have very long paths - if the root path is long enough the combined length
/// can exceed a limitation in Microsoft Windows - see http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx#paths
/// </summary>
public static int MaximumRootPathLength
Expand Down
21 changes: 20 additions & 1 deletion Composite/Core/Localization/LocalizationFacade.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,25 @@ public static void RenameUrlMappingNameForLocale(string cultureName, string newU
/// <param name="addAccessToAllUsers"></param>
/// <param name="makeFlush"></param>
public static void AddLocale(CultureInfo cultureInfo, string urlMappingName, bool addAccessToAllUsers = true, bool makeFlush = true)
{
{
AddLocale(cultureInfo, urlMappingName, addAccessToAllUsers, makeFlush, false);
}




/// <summary>
/// Adds a locale to the system. Throws exception if the given locale has already been installed or
/// if the given url mapping name has already been used. If the given locale is the first, its set
/// to be the default locale.
/// </summary>
/// <param name="cultureInfo"></param>
/// <param name="urlMappingName"></param>
/// <param name="addAccessToAllUsers"></param>
/// <param name="makeFlush"></param>
/// <param name="isDefault"></param>
internal static void AddLocale(CultureInfo cultureInfo, string urlMappingName, bool addAccessToAllUsers, bool makeFlush, bool isDefault)
{
using (TransactionScope transactionScope = TransactionsFacade.CreateNewScope())
{
Verify.That(!IsLocaleInstalled(cultureInfo), "The locale '{0}' has already been added to the system", cultureInfo);
Expand All @@ -141,6 +159,7 @@ public static void AddLocale(CultureInfo cultureInfo, string urlMappingName, boo
systemActiveLocale.Id = Guid.NewGuid();
systemActiveLocale.CultureName = cultureInfo.Name;
systemActiveLocale.UrlMappingName = urlMappingName;
systemActiveLocale.IsDefault = isDefault;
DataFacade.AddNew(systemActiveLocale);

if (addAccessToAllUsers)
Expand Down
28 changes: 14 additions & 14 deletions Composite/Core/Log.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
namespace Composite.Core
{
/// <summary>
/// Provide write access to the Orckestra CMS log. Note that 'verbose' messages are typically only shown in run-time log viewers.
/// Provide write access to the C1 CMS log. Note that 'verbose' messages are typically only shown in run-time log viewers.
/// </summary>
public static class Log
{
/// <summary>
/// Logs a 'information' message to the Orckestra CMS log.
/// Logs a 'information' message to the C1 CMS log.
/// </summary>
/// <param name="title">Title of log message</param>
/// <param name="message">Message to log</param>
Expand All @@ -24,7 +24,7 @@ public static void LogInformation(string title, string message)


/// <summary>
/// Logs a 'information' message to the Orckestra CMS log.
/// Logs a 'information' message to the C1 CMS log.
/// </summary>
/// <param name="title">Title of log message</param>
/// <param name="messageFormat">Message to log in a String.Format() style using {0} etc.</param>
Expand All @@ -38,7 +38,7 @@ public static void LogInformation(string title, string messageFormat, params obj


/// <summary>
/// Logs a 'verbose' message to the Orckestra CMS log. Verbose messages are typically only shown in developer log viewers.
/// Logs a 'verbose' message to the C1 CMS log. Verbose messages are typically only shown in developer log viewers.
/// </summary>
/// <param name="title">Title of log message</param>
/// <param name="message">Message to log</param>
Expand All @@ -50,7 +50,7 @@ public static void LogVerbose(string title, string message)


/// <summary>
/// Logs a 'verbose' message to the Orckestra CMS log.
/// Logs a 'verbose' message to the C1 CMS log.
/// </summary>
/// <param name="title">Title of log message</param>
/// <param name="messageFormat">Message to log in a String.Format() style using {0} etc.</param>
Expand All @@ -64,7 +64,7 @@ public static void LogVerbose(string title, string messageFormat, params object[


/// <summary>
/// Logs a 'warning' message to the Orckestra CMS log.
/// Logs a 'warning' message to the C1 CMS log.
/// </summary>
/// <param name="title">Title of log message</param>
/// <param name="message">Message to log</param>
Expand All @@ -76,7 +76,7 @@ public static void LogWarning(string title, string message)


/// <summary>
/// Logs a 'warning' message to the Orckestra CMS log.
/// Logs a 'warning' message to the C1 CMS log.
/// </summary>
/// <param name="title">Title of log message</param>
/// <param name="messageFormat">Message to log in a String.Format() style using {0} etc.</param>
Expand All @@ -90,7 +90,7 @@ public static void LogWarning(string title, string messageFormat, params object[


/// <summary>
/// Logs a 'verbose' message to the Orckestra CMS log.
/// Logs a 'verbose' message to the C1 CMS log.
/// </summary>
/// <param name="title">Title of log message</param>
/// <param name="exception">Exception to log</param>
Expand All @@ -102,7 +102,7 @@ public static void LogWarning(string title, Exception exception)


/// <summary>
/// Logs a 'error' message to the Orckestra CMS log.
/// Logs a 'error' message to the C1 CMS log.
/// </summary>
/// <param name="title">Title of log message</param>
/// <param name="message">Message to log</param>
Expand All @@ -114,7 +114,7 @@ public static void LogError(string title, string message)


/// <summary>
/// Logs a 'error' message to the Orckestra CMS log.
/// Logs a 'error' message to the C1 CMS log.
/// </summary>
/// <param name="title">Title of log message</param>
/// <param name="messageFormat">Message to log in a String.Format() style using {0} etc.</param>
Expand All @@ -128,7 +128,7 @@ public static void LogError(string title, string messageFormat, params object[]


/// <summary>
/// Logs a 'error' message to the Orckestra CMS log.
/// Logs a 'error' message to the C1 CMS log.
/// </summary>
/// <param name="title">Title of log message</param>
/// <param name="exception">Exception to log</param>
Expand All @@ -140,7 +140,7 @@ public static void LogError(string title, Exception exception)


/// <summary>
/// Logs a 'critical' message to the Orckestra CMS log. You should only use 'critical' when a major system failure occur.
/// Logs a 'critical' message to the C1 CMS log. You should only use 'critical' when a major system failure occur.
/// </summary>
/// <param name="title">Title of log message</param>
/// <param name="message">Message to log</param>
Expand All @@ -152,7 +152,7 @@ public static void LogCritical(string title, string message)


/// <summary>
/// Logs a 'critical' message to the Orckestra CMS log. You should only use 'critical' when a major system failure occur.
/// Logs a 'critical' message to the C1 CMS log. You should only use 'critical' when a major system failure occur.
/// </summary>
/// <param name="title">Title of log message</param>
/// <param name="messageFormat">Message to log in a String.Format() style using {0} etc.</param>
Expand All @@ -166,7 +166,7 @@ public static void LogCritical(string title, string messageFormat, params object


/// <summary>
/// Logs a 'critical' message to the Orckestra CMS log. You should only use 'critical' when a major system failure occur.
/// Logs a 'critical' message to the C1 CMS log. You should only use 'critical' when a major system failure occur.
/// </summary>
/// <param name="title">Title of log message</param>
/// <param name="exception">Exception to log</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ public void AddRedirectsForAssembly(AssemblyName assemblyName)
<assemblyBinding xmlns=""urn:schemas-microsoft-com:asm.v1"">
<dependentAssembly>
<assemblyIdentity name=""{0}"" publicKeyToken=""{1}"" culture=""neutral""/>
<!-- This binding redirect was added by Orckestra CMS package installer -->
<!-- This binding redirect was added by C1 CMS package installer -->
<bindingRedirect oldVersion=""0.0.0.0-{2}"" newVersion=""{2}"" />
</dependentAssembly>
</assemblyBinding>", assemblyName.Name, publicKeyToken, newTargetVersionStr)).Elements().Single());
Expand Down
2 changes: 1 addition & 1 deletion Composite/Core/PageTemplates/IPageTemplateProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public interface IPageTemplateProvider
IEnumerable<PageTemplateDescriptor> GetPageTemplates();

/// <summary>
/// Factory that give Orckestra CMS a IPageLayouter capable of rendering a Orckestra CMS page with the specified layout ID.
/// Factory that give C1 CMS a IPageLayouter capable of rendering a C1 CMS page with the specified layout ID.
/// The factory will be called for each individual page rendering
/// </summary>
/// <returns></returns>
Expand Down
2 changes: 1 addition & 1 deletion Composite/Core/PageTemplates/PageTemplateDescriptor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace Composite.Core.PageTemplates
{
/// <summary>
/// Describes a page layout to the Orckestra CMS core so it may set up editing UI
/// Describes a page layout to the C1 CMS core so it may set up editing UI
/// </summary>
public class PageTemplateDescriptor
{
Expand Down
2 changes: 1 addition & 1 deletion Composite/Core/PageTemplates/PageTemplateFacade.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public static IPageRenderer BuildPageRenderer(Guid pageTemplateId)
{
var provider = PageTemplateProviderRegistry.GetProviderByTemplateId(pageTemplateId);

Verify.IsNotNull(provider, "Failed to get page template with id '{0}'. The template may contain errors preventing it to compile. Check the Orckestra CMS log for possible compilation errors.", pageTemplateId);
Verify.IsNotNull(provider, "Failed to get page template with id '{0}'. The template may contain errors preventing it to compile. Check the C1 CMS log for possible compilation errors.", pageTemplateId);

return provider.BuildPageRenderer(pageTemplateId);
}
Expand Down
4 changes: 2 additions & 2 deletions Composite/Core/ResourceSystem/LocalizationFiles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3770,7 +3770,7 @@ public static class Composite_Plugins_PackageElementProvider {
public static string AddPackageSource_Step1_UrlHelp=>T("AddPackageSource.Step1.UrlHelp");
///<summary>&quot;The entered text was not a valid URL&quot;</summary>
public static string AddPackageSource_Step1_UrlNotValid=>T("AddPackageSource.Step1.UrlNotValid");
///<summary>&quot;The server is not a Orckestra CMS package server&quot;</summary>
///<summary>&quot;The server is not a C1 CMS package server&quot;</summary>
public static string AddPackageSource_Step1_UrlNonPackageServer=>T("AddPackageSource.Step1.UrlNonPackageServer");
///<summary>&quot;Add Package Server Source&quot;</summary>
public static string AddPackageSource_Step2_LayoutLabel=>T("AddPackageSource.Step2.LayoutLabel");
Expand Down Expand Up @@ -5196,7 +5196,7 @@ public static class Composite_Plugins_StandardFunctions {
public static string Composite_Web_Html_Template_CommonMetaTags_param_Designer_help=>T("Composite.Web.Html.Template.CommonMetaTags.param.Designer.help");
///<summary>&quot;Show generator&quot;</summary>
public static string Composite_Web_Html_Template_CommonMetaTags_param_ShowGenerator_label=>T("Composite.Web.Html.Template.CommonMetaTags.param.ShowGenerator.label");
///<summary>&quot;Show the world you support Orckestra CMS Foundation - free open source!&quot;</summary>
///<summary>&quot;Show the world you support C1 CMS Foundation - free open source!&quot;</summary>
public static string Composite_Web_Html_Template_CommonMetaTags_param_ShowGenerator_help=>T("Composite.Web.Html.Template.CommonMetaTags.param.ShowGenerator.help");
///<summary>&quot;Appends a lang=&apos;(language code)&apos; attribute the the parent element, reflecting the language of the current page. You can put this just below the &lt;html /&gt; tag.&quot;</summary>
public static string Composite_Web_Html_Template_LangAttribute_description=>T("Composite.Web.Html.Template.LangAttribute.description");
Expand Down
2 changes: 1 addition & 1 deletion Composite/Core/Routing/PageUrlData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
namespace Composite.Core.Routing
{
/// <summary>
/// Information stored in a Orckestra CMS page url
/// Information stored in a C1 CMS page url
/// </summary>
public class PageUrlData
{
Expand Down
Loading

0 comments on commit f78b232

Please sign in to comment.