Class FolderEntity

Represents a folder.

Inheritance
System.Object
FolderEntity
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Mediachase.Commerce.Assets
Assembly: Mediachase.Commerce.dll
Version: 10.8.0
Syntax
public class FolderEntity : EntityObject

Constructors

FolderEntity()

Declaration
public FolderEntity()

FolderEntity(PrimaryKeyId)

Declaration
public FolderEntity(PrimaryKeyId primaryKeyId)
Parameters
Type Name Description
PrimaryKeyId primaryKeyId

FolderEntity(String)

Declaration
public FolderEntity(string metaClassName)
Parameters
Type Name Description
System.String metaClassName

FolderEntity(String, PrimaryKeyId)

Declaration
public FolderEntity(string metaClassName, PrimaryKeyId primaryKeyId)
Parameters
Type Name Description
System.String metaClassName
PrimaryKeyId primaryKeyId

Fields

ClassName

Declaration
public const string ClassName = "Folder"
Field Value
Type Description
System.String

FieldCreated

Declaration
public const string FieldCreated = "Created"
Field Value
Type Description
System.String

FieldCreatorId

Declaration
public const string FieldCreatorId = "CreatorId"
Field Value
Type Description
System.String

FieldDescription

Declaration
public const string FieldDescription = "Description"
Field Value
Type Description
System.String

FieldHasChildren

Declaration
public const string FieldHasChildren = "HasChildren"
Field Value
Type Description
System.String

FieldModified

Declaration
public const string FieldModified = "Modified"
Field Value
Type Description
System.String

FieldModifierId

Declaration
public const string FieldModifierId = "ModifierId"
Field Value
Type Description
System.String

FieldName

Declaration
public const string FieldName = "Name"
Field Value
Type Description
System.String

FieldOutlineLevel

Declaration
public const string FieldOutlineLevel = "OutlineLevel"
Field Value
Type Description
System.String

FieldOutlineNumber

Declaration
public const string FieldOutlineNumber = "OutlineNumber"
Field Value
Type Description
System.String

FieldParent

Declaration
public const string FieldParent = "Parent"
Field Value
Type Description
System.String

FieldParentId

Declaration
public const string FieldParentId = "ParentId"
Field Value
Type Description
System.String

FieldScopeIndex

Declaration
public const string FieldScopeIndex = "ScopeIndex"
Field Value
Type Description
System.String

PrimaryKeyName

Declaration
public const string PrimaryKeyName = "PrimaryKeyId"
Field Value
Type Description
System.String

Properties

Created

Declaration
public DateTime Created { get; set; }
Property Value
Type Description
System.DateTime

CreatorId

Declaration
public string CreatorId { get; set; }
Property Value
Type Description
System.String

Description

Declaration
public string Description { get; set; }
Property Value
Type Description
System.String

ExtendedProperties

Declaration
public EntityObjectProperty[] ExtendedProperties { get; set; }
Property Value
Type Description
EntityObjectProperty[]

HasChildren

Declaration
public bool HasChildren { get; set; }
Property Value
Type Description
System.Boolean

Modified

Declaration
public DateTime Modified { get; set; }
Property Value
Type Description
System.DateTime

ModifierId

Declaration
public string ModifierId { get; set; }
Property Value
Type Description
System.String

Name

Declaration
public string Name { get; set; }
Property Value
Type Description
System.String

OutlineLevel

Declaration
public int OutlineLevel { get; set; }
Property Value
Type Description
System.Int32

OutlineNumber

Declaration
public string OutlineNumber { get; set; }
Property Value
Type Description
System.String

Parent

Declaration
public string Parent { get; }
Property Value
Type Description
System.String

ParentId

Declaration
public PrimaryKeyId? ParentId { get; set; }
Property Value
Type Description
System.Nullable<PrimaryKeyId>

ScopeIndex

Declaration
public int? ScopeIndex { get; set; }
Property Value
Type Description
System.Nullable<System.Int32>

Methods

AppendFolder(Nullable<PrimaryKeyId>, FolderEntity)

Adds the child to the parent folder.

Declaration
public static FolderEntity AppendFolder(PrimaryKeyId? parentId, FolderEntity child)
Parameters
Type Name Description
System.Nullable<PrimaryKeyId> parentId

The parent folder.

FolderEntity child

The child folder.

Returns
Type Description
FolderEntity

CopyRecursive(PrimaryKeyId, PrimaryKeyId)

Copies the specified folder id.

Declaration
public static void CopyRecursive(PrimaryKeyId folderId, PrimaryKeyId parentId)
Parameters
Type Name Description
PrimaryKeyId folderId

The folder id.

PrimaryKeyId parentId

The parent id.

DeleteRecursive(FolderEntity)

Deletes specified folder and all its children.

Declaration
public static void DeleteRecursive(FolderEntity folder)
Parameters
Type Name Description
FolderEntity folder

The folder to delete.

GetChildElements(PrimaryKeyId)

Gets the child elements.

Declaration
public static FolderElementEntity[] GetChildElements(PrimaryKeyId parentId)
Parameters
Type Name Description
PrimaryKeyId parentId

The parent id.

Returns
Type Description
FolderElementEntity[]

GetChildElements(PrimaryKeyId, out Int32)

Gets the child elements.

Declaration
public static FolderElementEntity[] GetChildElements(PrimaryKeyId parentId, out int total)
Parameters
Type Name Description
PrimaryKeyId parentId

The parent id.

System.Int32 total

Returns the total count.

Returns
Type Description
FolderElementEntity[]

GetChildElements(PrimaryKeyId, Nullable<Int32>, Nullable<Int32>, out Int32)

Gets the child elements.

Declaration
public static FolderElementEntity[] GetChildElements(PrimaryKeyId parentId, int? startIndex, int? count, out int total)
Parameters
Type Name Description
PrimaryKeyId parentId

The parent id.

System.Nullable<System.Int32> startIndex

The start index.

System.Nullable<System.Int32> count

The count.

System.Int32 total

Returns the total count.

Returns
Type Description
FolderElementEntity[]

GetChildFolders(PrimaryKeyId)

Gets the child folders.

Declaration
public static FolderEntity[] GetChildFolders(PrimaryKeyId parentId)
Parameters
Type Name Description
PrimaryKeyId parentId

The parent id.

Returns
Type Description
FolderEntity[]

GetChildFolders(PrimaryKeyId, out Int32)

Returns child folders.

Declaration
public static FolderEntity[] GetChildFolders(PrimaryKeyId parentId, out int total)
Parameters
Type Name Description
PrimaryKeyId parentId

The parent folder id.

System.Int32 total

The total.

Returns
Type Description
FolderEntity[]

GetChildFolders(PrimaryKeyId, Nullable<Int32>, Nullable<Int32>, out Int32)

Gets the child folders.

Declaration
public static FolderEntity[] GetChildFolders(PrimaryKeyId parentId, int? startIndex, int? count, out int total)
Parameters
Type Name Description
PrimaryKeyId parentId

The parent id.

System.Nullable<System.Int32> startIndex

The start index.

System.Nullable<System.Int32> count

The count.

System.Int32 total

The returns the total count.

Returns
Type Description
FolderEntity[]

GetFolderById(Int32)

Gets the folder by id.

Declaration
public static FolderEntity GetFolderById(int folderId)
Parameters
Type Name Description
System.Int32 folderId

The folder id.

Returns
Type Description
FolderEntity

GetFolderByOulineNumber(String)

Returns a folder with given ouline number.

Declaration
public static FolderEntity GetFolderByOulineNumber(string outlineNumber)
Parameters
Type Name Description
System.String outlineNumber

The outline number.

Returns
Type Description
FolderEntity

GetPathToFolder(FolderEntity)

Returns all parent folders for given folder.

Declaration
public static FolderEntity[] GetPathToFolder(FolderEntity folder)
Parameters
Type Name Description
FolderEntity folder

The folder.

Returns
Type Description
FolderEntity[]

GetTotalCount()

Returns total object count.

Declaration
public static int GetTotalCount()
Returns
Type Description
System.Int32

InitializeProperties()

Declaration
protected void InitializeProperties()

IsExistingFolder(Int32, Int32)

Determines whether is target folder have child with the specified folderid (name).

Declaration
public static bool IsExistingFolder(int folderId, int targetFolderId)
Parameters
Type Name Description
System.Int32 folderId

The folder id.

System.Int32 targetFolderId

The target folder id.

Returns
Type Description
System.Boolean

true if is target folder have child the specified folder name; otherwise, false.

ListRootFolders()

Returns root folders.

Declaration
public static FolderEntity[] ListRootFolders()
Returns
Type Description
FolderEntity[]

Move(PrimaryKeyId, Nullable<PrimaryKeyId>)

Moves the specified folder id.

Declaration
public static void Move(PrimaryKeyId folderId, PrimaryKeyId? newParentId)
Parameters
Type Name Description
PrimaryKeyId folderId

The folder id.

System.Nullable<PrimaryKeyId> newParentId

The new parent id.

Move(FolderEntity, Nullable<PrimaryKeyId>)

Moves the specified folder.

Declaration
public static void Move(FolderEntity folder, PrimaryKeyId? newParentId)
Parameters
Type Name Description
FolderEntity folder

The folder.

System.Nullable<PrimaryKeyId> newParentId

The new parent id.