Folder
Access path: PublicAPI.Docflow.FolderMethods
Name | Description | |
---|---|---|
Count |
Returns the total number of objects of this type
| |
Count(IEntityFilter) |
Get Total Number of Objects by Filter
| |
Create |
Create New Entity (without a Database entry)
| |
CreateFolder(Folder) |
Create a folder
| |
CreateFolder(Folder, String) |
Create a folder
| |
CreateFolder(Folder, String, Boolean) |
Create a folder
| |
CreateFolder(Folder, String, Boolean, Boolean) |
Create a folder
| |
Delete |
Delete Entity from Database
| |
Find(FetchOptions) |
Find objects according to fetch options
| |
Find(String) |
Find objects according to the filter in the EQL language
| |
Find(IEntityFilter, FetchOptions) |
Fing objects according to fetch options and filter
| |
FindByIdArray |
Find All Objects by Array IDs
| |
FindFolders(String) |
Find folders by name
| |
FindFolders(Folder, String) |
Find folders by name
| |
GetAllChildren |
Get all the folder documents
| |
GetAllDocuments(Folder) |
Get all the documents from the folder
| |
GetAllDocuments(Folder, Boolean) |
Get all the documents from the folder (with a possibility to search in subfolders)
| |
GetMyDocumentFolder |
Get the "My Documents" folder of a certain user
| |
IsDirty |
Check, if there are unsaved changes in the object
| |
IsNew |
Check, if the object is new (not saved in the database)
| |
Load(Guid) |
Load by UID. If not found, an exception is invoked
| |
Load(Int64) |
Load by ID. If not found, an exception is invoked
| |
LoadOrCreate(Guid) |
Load by ID. If not found, the new object is returned
| |
LoadOrCreate(Int64) |
Load by ID. If not found, the new object is returned
| |
LoadOrNull(Guid) |
Load by UID. If not found, null is returned
| |
LoadOrNull(Int64) |
Load by ID. If not found, null is returned
| |
Move |
Move the folder
| |
Refresh |
Refresh (read over) Object from Database
| |
Save |
Save Object to Database
|
Remarks
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