Skip to content

Class: FolderApplicationService ​

Defined in: application/services/core/FolderService.ts:16

Folder operations on the current workspace. Each call loads the workspace through the container's workspace service and delegates to the Workspace entity, which persists changes.

Constructors ​

Constructor ​

ts
new FolderApplicationService(container): FolderApplicationService;

Defined in: application/services/core/FolderService.ts:20

Parameters ​

ParameterTypeDescription
containerServiceContainerService container providing the workspace storage service.

Returns ​

FolderApplicationService

Methods ​

createFolder() ​

ts
createFolder(
   _workspaceId, 
   name, 
   parentId?
): Promise<Folder>;

Defined in: application/services/core/FolderService.ts:36

Create a new folder in the workspace US-FOLDER-001: Create Folder Delegates to Workspace aggregate root

Parameters ​

ParameterType
_workspaceIdstring
namestring
parentId?string

Returns ​

Promise<Folder>


deleteFolder() ​

ts
deleteFolder(
   _workspaceId, 
   folderId, 
   deleteContents?
): Promise<void>;

Defined in: application/services/core/FolderService.ts:138

Delete a folder (and optionally its contents)

Parameters ​

ParameterTypeDefault value
_workspaceIdstringundefined
folderIdstringundefined
deleteContents?booleanfalse

Returns ​

Promise<void>


deleteFolderAndMoveContents() ​

ts
deleteFolderAndMoveContents(_workspaceId, folderId): Promise<void>;

Defined in: application/services/core/FolderService.ts:189

Delete a folder and move its contents to parent (or root)

Parameters ​

ParameterType
_workspaceIdstring
folderIdstring

Returns ​

Promise<void>


getAllFolders() ​

ts
getAllFolders(_workspaceId): Promise<Folder[]>;

Defined in: application/services/core/FolderService.ts:49

Get all folders in workspace (flat list)

Parameters ​

ParameterType
_workspaceIdstring

Returns ​

Promise<Folder[]>


getDisplayFolders() ​

ts
getDisplayFolders(workspaceId): Promise<Folder[]>;

Defined in: application/services/core/FolderService.ts:72

Get folders prepared for UI selection/listing. Excludes root-like folders and removes duplicate path/name pairs.

Parameters ​

ParameterType
workspaceIdstring

Returns ​

Promise<Folder[]>


getFolder() ​

ts
getFolder(_workspaceId, folderId): Promise<Folder | null>;

Defined in: application/services/core/FolderService.ts:95

Get folder by ID

Parameters ​

ParameterType
_workspaceIdstring
folderIdstring

Returns ​

Promise<Folder | null>


renameFolder() ​

ts
renameFolder(
   _workspaceId, 
   folderId, 
   newName
): Promise<Folder>;

Defined in: application/services/core/FolderService.ts:107

Rename a folder

Parameters ​

ParameterType
_workspaceIdstring
folderIdstring
newNamestring

Returns ​

Promise<Folder>