PublicAPI.Docflow.FolderELMA API Documentation
Folder
Access path: PublicAPI.Docflow.Folder
Methods

  NameDescription
Public methodCount 
Returns the total number of objects of this type
Public methodCount(IEntityFilter)
Get Total Number of Objects by Filter
Public methodCreate
Create New Entity (without a Database entry)
Public methodCreateFolder(Folder)
Create a folder
Public methodCreateFolder(Folder, String)
Create a folder
Public methodCreateFolder(Folder, String, Boolean)
Create a folder
Public methodCreateFolder(Folder, String, Boolean, Boolean)
Create a folder
Public methodDelete
Delete Entity from Database
Public methodFind(FetchOptions)
Find objects according to fetch options
Public methodFind(String)
Find objects according to the filter in the EQL language
Public methodFind(IEntityFilter, FetchOptions)
Fing objects according to fetch options and filter
Public methodFindByIdArray
Find All Objects by Array IDs
Public methodFindFolders(String)
Find folders by name
Public methodFindFolders(Folder, String)
Find folders by name
Public methodGetAllChildren
Get all the folder documents
Public methodGetAllDocuments(Folder)
Get all the documents from the folder
Public methodGetAllDocuments(Folder, Boolean)
Get all the documents from the folder (with a possibility to search in subfolders)
Public methodGetMyDocumentFolder
Get the "My Documents" folder of a certain user
Public methodIsDirty
Check, if there are unsaved changes in the object
Public methodIsNew
Check, if the object is new (not saved in the database)
Public methodLoad(Guid)
Load by UID. If not found, an exception is invoked
Public methodLoad(Int64)
Load by ID. If not found, an exception is invoked
Public methodLoadOrCreate(Guid)
Load by ID. If not found, the new object is returned
Public methodLoadOrCreate(Int64)
Load by ID. If not found, the new object is returned
Public methodLoadOrNull(Guid)
Load by UID. If not found, null is returned
Public methodLoadOrNull(Int64)
Load by ID. If not found, null is returned
Public methodMove
Move the folder
Public methodRefresh
Refresh (read over) Object from Database
Public methodSave
Save Object to Database
Back to Top
Remarks

Section containing methods for managing folders
Examples

Create a folder to work with

//get a current user 
var user = PublicAPI.Security.User.GetCurrentUser();
//get the current user's folder "My Documents" 
var myDocumentFolder = PublicAPI.Docflow.Folder.GetMyDocumentFolder(user);
var myFolder = PublicAPI.Docflow.Folder.CreateFolder(myDocumentFolder, "Sample Working Folder");

Create several folders in myFolder. They will be saved in the databsae

var subFolder = PublicAPI.Docflow.Folder.CreateFolder(myFolder, "Folder 1");
var subFolder2 = PublicAPI.Docflow.Folder.CreateFolder(myFolder, "Folder 2");
var subFolder3 = PublicAPI.Docflow.Folder.CreateFolder(myFolder, "Folder 3");

Move folder subFolder2

PublicAPI.Docflow.Folder.Move(myFolder, subFolder2, subFolder3);

Please save the object in the base to ensure its proper functioning

myFolder.Save();

Learn how to add permissions for a folder here

See Also