Try our conversational search powered by Generative AI!

Class XFormFolder

The XFormFolder is a class to handle the structure of XFormsXForm objects in the Dynamic Data Store. A XFormFolder has a path separated by / and has a structure like:

/ XFormFolder/ XFormFolder/ XForm ... XForm

Inheritance
System.Object
XFormFolder
Implements
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: EPiServer.XForms
Assembly: EPiServer.XForms.dll
Version: 7.19.2
Syntax
[EPiServerDataStore(StoreName = "XFormFolders")]
[EPiServerDataTable(TableName = "tblSystemBigTable")]
public class XFormFolder : IDynamicData

Constructors

XFormFolder()

Creates an XFormFolder object. This constructor is for internal use only.

Declaration
public XFormFolder()

XFormFolder(String)

Creates an XFormFolder object.

Declaration
public XFormFolder(string subPath)
Parameters
Type Name Description
System.String subPath

The path to assign to the folder

Fields

PATH_SEPARATOR

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

XFormFolderStoreName

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

Properties

Id

Declaration
public Identity Id { get; set; }
Property Value
Type Description
Identity

Name

Get the name of the XFormFolder.

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

An XFormFolder with the path /t1/t2 has the name t2.

Root

The root XFormFolder

Declaration
public static XFormFolder Root { get; }
Property Value
Type Description
XFormFolder

SubPath

Get the path of the XFormFolder.

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

Methods

Create(Guid, String)

Create an XFormFolder in the database.

Declaration
public static XFormFolder Create(Guid id, string subPath)
Parameters
Type Name Description
System.Guid id

The id to assign to the object

System.String subPath

The sub path of the folder

Returns
Type Description
XFormFolder

The created XFormFolder.

Create(String)

Create an XFormFolder in the database.

Declaration
public static XFormFolder Create(string subPath)
Parameters
Type Name Description
System.String subPath

The sub path of the folder

Returns
Type Description
XFormFolder

The created XFormFolder.

Delete(String)

Deletes an XFormFolder from the database.

Declaration
public static void Delete(string subPath)
Parameters
Type Name Description
System.String subPath

The path to the Xformfolder to remove.

GetFolders()

Get all folders on the root level (/).

Declaration
public static IList<XFormFolder> GetFolders()
Returns
Type Description
System.Collections.Generic.IList<XFormFolder>

A list of XFormFolders.

GetFolders(String)

Get all folders for a specific path.

Declaration
public static IList<XFormFolder> GetFolders(string subPath)
Parameters
Type Name Description
System.String subPath

Path to list XFormFolders for.

Returns
Type Description
System.Collections.Generic.IList<XFormFolder>

A list of XFormFolders.

GetForms()

Get all the XForms in the database.

Declaration
public static IList<XForm> GetForms()
Returns
Type Description
System.Collections.Generic.IList<XForm>

All existing XForms.

GetForms(String)

Get all XForm in a certain XFormFolder.

Declaration
public static IList<XForm> GetForms(string subPath)
Parameters
Type Name Description
System.String subPath

Path to XFormFolder to list XForms in.

Returns
Type Description
System.Collections.Generic.IList<XForm>

A list of XForms in the requested path.

GetForms(String, Int32, Int32, String, SortOrder, out Int32)

Get Selected XForms

Declaration
public static IList<XForm> GetForms(string createdBy, int skip, int take, string orderBy, SortOrder sortOrder, out int count)
Parameters
Type Name Description
System.String createdBy

Get XForms created by user. String.Empty or null will not make an selection on 'createdby'

System.Int32 skip

Skip x number of items

System.Int32 take

Take x number of items

System.String orderBy

Order by selected column

System.Data.SqlClient.SortOrder sortOrder

Which order to sort

System.Int32 count

Returns the total number of items

Returns
Type Description
System.Collections.Generic.IList<XForm>

List of XForms containing maximum 'take' number of items

GetForms(String, String, Int32, Int32, String, SortOrder, out Int32)

Get Selected XForms

Declaration
public static IList<XForm> GetForms(string subPath, string createdBy, int skip, int take, string orderBy, SortOrder sortOrder, out int count)
Parameters
Type Name Description
System.String subPath

Path to XFormFolder to list XForms in.

System.String createdBy

Get XForms created by user. String.Empty or null will not make an selection on 'createdby'

System.Int32 skip

Skip x number of items

System.Int32 take

Take x number of items

System.String orderBy

Order by selected column

System.Data.SqlClient.SortOrder sortOrder

Which order to sort

System.Int32 count

Returns the total number of items

Returns
Type Description
System.Collections.Generic.IList<XForm>

List of XForms containing maximum 'take' number of items

GetIndex(String, String, String, SortOrder)

Get the database index of an XForm item

Declaration
public static int GetIndex(string xFormId, string createdBy, string orderBy, SortOrder sortOrder)
Parameters
Type Name Description
System.String xFormId

The Id of the XForm item

System.String createdBy

Which user (username) the xForms must be created by. Use String.Empty or NULL to receive all

System.String orderBy

Order by selected column

System.Data.SqlClient.SortOrder sortOrder

Which order to sort

Returns
Type Description
System.Int32

The database index of the specified XForm item

GetIndex(String, String, String, SortOrder, String)

Get the database index of an XForm item

Declaration
public static int GetIndex(string xFormId, string createdBy, string orderBy, SortOrder sortOrder, string subPath)
Parameters
Type Name Description
System.String xFormId

The Id of the XForm item

System.String createdBy

Which user (username) the xForms must be created by. Use String.Empty or NULL to receive all

System.String orderBy

Order by selected column

System.Data.SqlClient.SortOrder sortOrder

Which order to sort

System.String subPath

Path to XFormFolder to list XForms in

Returns
Type Description
System.Int32

The database index of the specified XForm item

Move(Object, XFormFolder)

Moves a XForm to a XFormFolder

Declaration
public static void Move(object id, XFormFolder folder)
Parameters
Type Name Description
System.Object id

Identity of the XForm.

XFormFolder folder

An Xform folder to move the XForm to.

Rename(String)

Renames the pathname to a new pathname

Declaration
public void Rename(string newSubPath)
Parameters
Type Name Description
System.String newSubPath

The new path of the XFormFolder.

Exceptions
Type Condition
XFormException

If the path already exists.

Implements

Extension Methods