namespace Umbraco.Cms.Core
{
public static partial class Constants
{
///
/// Defines the identifiers for property-type alias conventions that are used within the Umbraco core.
///
public static class Conventions
{
public static class Migrations
{
public const string UmbracoUpgradePlanName = "Umbraco.Core";
public const string KeyValuePrefix = "Umbraco.Core.Upgrader.State+";
public const string UmbracoUpgradePlanKey = KeyValuePrefix + UmbracoUpgradePlanName;
}
public static class PermissionCategories
{
public const string ContentCategory = "content";
public const string AdministrationCategory = "administration";
public const string StructureCategory = "structure";
public const string OtherCategory = "other";
}
public static class PublicAccess
{
public const string MemberUsernameRuleType = "MemberUsername";
public const string MemberRoleRuleType = "MemberRole";
}
public static class DataTypes
{
public const string ListViewPrefix = "List View - ";
}
///
/// Constants for Umbraco Content property aliases.
///
public static class Content
{
///
/// Property alias for the Content's Url (internal) redirect.
///
public const string InternalRedirectId = "umbracoInternalRedirectId";
///
/// Property alias for the Content's navigational hide, (not actually used in core code).
///
public const string NaviHide = "umbracoNaviHide";
///
/// Property alias for the Content's Url redirect.
///
public const string Redirect = "umbracoRedirect";
///
/// Property alias for the Content's Url alias.
///
public const string UrlAlias = "umbracoUrlAlias";
///
/// Property alias for the Content's Url name.
///
public const string UrlName = "umbracoUrlName";
}
///
/// Constants for Umbraco Media property aliases.
///
public static class Media
{
///
/// Property alias for the Media's file name.
///
public const string File = "umbracoFile";
///
/// Property alias for the Media's width.
///
public const string Width = "umbracoWidth";
///
/// Property alias for the Media's height.
///
public const string Height = "umbracoHeight";
///
/// Property alias for the Media's file size (in bytes).
///
public const string Bytes = "umbracoBytes";
///
/// Property alias for the Media's file extension.
///
public const string Extension = "umbracoExtension";
///
/// The default height/width of an image file if the size can't be determined from the metadata
///
public const int DefaultSize = 200;
}
///
/// Defines the alias identifiers for Umbraco media types.
///
public static class MediaTypes
{
///
/// MediaType alias for a file.
///
public const string File = "File";
///
/// MediaType alias for a folder.
///
public const string Folder = "Folder";
///
/// MediaType alias for an image.
///
public const string Image = "Image";
///
/// MediaType name for a video.
///
public const string Video = "Video";
///
/// MediaType name for an audio.
///
public const string Audio = "Audio";
///
/// MediaType name for an article.
///
public const string Article = "Article";
///
/// MediaType name for vector graphics.
///
public const string VectorGraphics = "VectorGraphics";
///
/// MediaType alias for a video.
///
public const string VideoAlias = "umbracoMediaVideo";
///
/// MediaType alias for an audio.
///
public const string AudioAlias = "umbracoMediaAudio";
///
/// MediaType alias for an article.
///
public const string ArticleAlias = "umbracoMediaArticle";
///
/// MediaType alias for vector graphics.
///
public const string VectorGraphicsAlias = "umbracoMediaVectorGraphics";
///
/// MediaType alias indicating allowing auto-selection.
///
public const string AutoSelect = "umbracoAutoSelect";
}
///
/// Constants for Umbraco Member property aliases.
///
public static class Member
{
///
/// if a role starts with __umbracoRole we won't show it as it's an internal role used for public access
///
public static readonly string InternalRolePrefix = "__umbracoRole";
///
/// Property alias for the Comments on a Member
///
public const string Comments = "umbracoMemberComments";
public const string CommentsLabel = "Comments";
///
/// Property alias for the Approved boolean of a Member
///
public const string IsApproved = "umbracoMemberApproved";
public const string IsApprovedLabel = "Is Approved";
///
/// Property alias for the Locked out boolean of a Member
///
public const string IsLockedOut = "umbracoMemberLockedOut";
public const string IsLockedOutLabel = "Is Locked Out";
///
/// Property alias for the last date the Member logged in
///
public const string LastLoginDate = "umbracoMemberLastLogin";
public const string LastLoginDateLabel = "Last Login Date";
///
/// Property alias for the last date a Member changed its password
///
public const string LastPasswordChangeDate = "umbracoMemberLastPasswordChangeDate";
public const string LastPasswordChangeDateLabel = "Last Password Change Date";
///
/// Property alias for the last date a Member was locked out
///
public const string LastLockoutDate = "umbracoMemberLastLockoutDate";
public const string LastLockoutDateLabel = "Last Lockout Date";
///
/// Property alias for the number of failed login attempts
///
public const string FailedPasswordAttempts = "umbracoMemberFailedPasswordAttempts";
public const string FailedPasswordAttemptsLabel = "Failed Password Attempts";
///
/// Group name to put the membership properties on
///
public const string StandardPropertiesGroupName = "Membership";
}
///
/// Defines the alias identifiers for Umbraco member types.
///
public static class MemberTypes
{
///
/// MemberType alias for default member type.
///
public const string DefaultAlias = "Member";
public const string SystemDefaultProtectType = "_umbracoSystemDefaultProtectType";
public const string AllMembersListId = "all-members";
}
///
/// Constants for Umbraco URLs/Querystrings.
///
public static class Url
{
///
/// Querystring parameter name used for Umbraco's alternative template functionality.
///
public const string AltTemplate = "altTemplate";
}
///
/// Defines the alias identifiers for built-in Umbraco relation types.
///
public static class RelationTypes
{
///
/// Name for default relation type "Related Media".
///
public const string RelatedMediaName = "Related Media";
///
/// Alias for default relation type "Related Media"
///
public const string RelatedMediaAlias = "umbMedia";
///
/// Name for default relation type "Related Document".
///
public const string RelatedDocumentName = "Related Document";
///
/// Alias for default relation type "Related Document"
///
public const string RelatedDocumentAlias = "umbDocument";
///
/// Name for default relation type "Relate Document On Copy".
///
public const string RelateDocumentOnCopyName = "Relate Document On Copy";
///
/// Alias for default relation type "Relate Document On Copy".
///
public const string RelateDocumentOnCopyAlias = "relateDocumentOnCopy";
///
/// Name for default relation type "Relate Parent Document On Delete".
///
public const string RelateParentDocumentOnDeleteName = "Relate Parent Document On Delete";
///
/// Alias for default relation type "Relate Parent Document On Delete".
///
public const string RelateParentDocumentOnDeleteAlias = "relateParentDocumentOnDelete";
///
/// Name for default relation type "Relate Parent Media Folder On Delete".
///
public const string RelateParentMediaFolderOnDeleteName = "Relate Parent Media Folder On Delete";
///
/// Alias for default relation type "Relate Parent Media Folder On Delete".
///
public const string RelateParentMediaFolderOnDeleteAlias = "relateParentMediaFolderOnDelete";
///
/// Returns the types of relations that are automatically tracked
///
///
/// Developers should not manually use these relation types since they will all be cleared whenever an entity
/// (content, media or member) is saved since they are auto-populated based on property values.
///
public static string[] AutomaticRelationTypes { get; } = new[] { RelatedMediaAlias, RelatedDocumentAlias };
//TODO: return a list of built in types so we can use that to prevent deletion in the uI
}
}
}
}