[AAE-10777] Move services from Core in Content the right place (#8242)

Clean core services and directive
This commit is contained in:
Eugenio Romano
2023-03-10 09:28:24 +01:00
committed by GitHub
parent 112e272ce7
commit 2590e7d0a9
263 changed files with 884 additions and 3393 deletions

View File

@@ -5,7 +5,7 @@ Status: Active
Last reviewed: 2018-11-20
---
# [Node Download directive](../../../lib/core/src/lib/directives/node-download.directive.ts "Defined in node-download.directive.ts")
# [Node Download directive](lib/content-services/src/lib/directives/node-download.directive.ts "Defined in node-download.directive.ts")
Allows folders and/or files to be downloaded, with multiple nodes packed as a '.ZIP' archive.

View File

@@ -4,7 +4,7 @@ Added: v2.0.0
Status: Active
---
# [Bpm User model](../../../lib/core/src/lib/models/bpm-user.model.ts "Defined in bpm-user.model.ts")
# [Bpm User model](lib/process-services/src/lib/common/models/bpm-user.model.ts "Defined in bpm-user.model.ts")
Contains information about a Process Services user.

View File

@@ -4,7 +4,7 @@ Added: v2.0.0
Status: Active
---
# [Ecm User model](../../../lib/core/src/lib/models/ecm-user.model.ts "Defined in ecm-user.model.ts")
# [Ecm User model](lib/content-services/src/lib/common/models/ecm-user.model.ts "Defined in ecm-user.model.ts")
Contains information about a Content Services user.

View File

@@ -4,7 +4,7 @@ Added: v2.0.0
Status: Active
---
# [User Process model](../../../lib/core/src/lib/models/user-process.model.ts "Defined in user-process.model.ts")
# [User Process model](lib/process-services/src/lib/common/models/user-process.model.ts "Defined in user-process.model.ts")
Represents a Process Services user.

View File

@@ -5,7 +5,7 @@ Status: Active
Last reviewed: 2019-03-13
---
# [Content service](../../../lib/core/src/lib/services/content.service.ts "Defined in content.service.ts")
# [Content service](lib/content-services/src/lib/common/services/content.service.ts "Defined in content.service.ts")
Accesses app-generated data objects via URLs and file downloads.
@@ -18,7 +18,7 @@ Accesses app-generated data objects via URLs and file downloads.
- _blob:_ [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) - Data to wrap into object URL
- **Returns** `string` - URL string
- **downloadBlob**(blob: [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob), fileName: `string`)<br/>
(**Deprecated:** in 3.2.0, use [DownloadService](../../../lib/core/src/lib/services/download.service.ts) instead. Invokes content download for a [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) with a file name.)
(**Deprecated:** in 3.2.0, use [DownloadService](lib/core/src/lib/common/services/download.service.ts) instead. Invokes content download for a [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) with a file name.)
- _blob:_ [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) - Content to download.
- _fileName:_ `string` - Name of the resulting file.
- **getContentUrl**(node: [`NodeEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeEntry.md)`|string`, attachment?: `boolean`, ticket?: `string`): `string`<br/>
@@ -42,15 +42,15 @@ Accesses app-generated data objects via URLs and file downloads.
Gets content for the given node.
- _nodeId:_ `string` - ID of the target node
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Content data
- **hasAllowableOperations**(node: `Node`, allowableOperation: [`AllowableOperationsEnum`](../../../lib/core/src/lib/models/allowable-operations.enum.ts)`|string`): `boolean`<br/>
- **hasAllowableOperations**(node: `Node`, allowableOperation: [`AllowableOperationsEnum`](lib/content-services/src/lib/common/models/allowable-operations.enum.ts)`|string`): `boolean`<br/>
Checks if the user has permissions on that node
- _node:_ `Node` - Node to check allowableOperations
- _allowableOperation:_ [`AllowableOperationsEnum`](../../../lib/core/src/lib/models/allowable-operations.enum.ts)`|string` - Create, delete, update, updatePermissions, !create, !delete, !update, !updatePermissions
- _allowableOperation:_ [`AllowableOperationsEnum`](lib/content-services/src/lib/common/models/allowable-operations.enum.ts)`|string` - Create, delete, update, updatePermissions, !create, !delete, !update, !updatePermissions
- **Returns** `boolean` - True if the user has the required permissions, false otherwise
- **hasPermissions**(node: `Node`, permission: [`PermissionsEnum`](../../../lib/core/src/lib/models/permissions.enum.ts)`|string`, userId?: `string`): `boolean`<br/>
- **hasPermissions**(node: `Node`, permission: [`PermissionsEnum`](lib/content-services/src/lib/common/models/permissions.enum.ts)`|string`, userId?: `string`): `boolean`<br/>
Checks if the user has permission on that node
- _node:_ `Node` - Node to check permissions
- _permission:_ [`PermissionsEnum`](../../../lib/core/src/lib/models/permissions.enum.ts)`|string` - Required permission type
- _permission:_ [`PermissionsEnum`](lib/content-services/src/lib/common/models/permissions.enum.ts)`|string` - Required permission type
- _userId:_ `string` - (Optional) Optional current user id will be taken by default
- **Returns** `boolean` - True if the user has the required permissions, false otherwise

View File

@@ -5,7 +5,7 @@ Status: Active
Last reviewed: 2018-11-19
---
# [Discovery Api service](../../../lib/core/src/lib/services/discovery-api.service.ts "Defined in discovery-api.service.ts")
# [Discovery Api service](lib/content-services/src/lib/common/services/discovery-api.service.ts "Defined in discovery-api.service.ts")
Gets version and license information for Process Services and Content Services.

View File

@@ -5,7 +5,7 @@ Status: Active
Last reviewed: 2019-01-08
---
# [Download zip service](../../../lib/core/src/lib/services/download-zip.service.ts "Defined in download-zip.service.ts")
# [Download zip service](lib/content-services/src/lib/dialogs/download-zip/services/download-zip.service.ts "Defined in download-zip.service.ts")
Creates and manages downloads.

View File

@@ -5,7 +5,7 @@ Status: Active
Last reviewed: 2019-01-16
---
# [Nodes Api service](../../../lib/core/src/lib/services/nodes-api.service.ts "Defined in nodes-api.service.ts")
# [Nodes Api service](lib/content-services/src/lib/common/services/nodes-api.service.ts "Defined in nodes-api.service.ts")
Accesses and manipulates ACS document nodes using their node IDs.
@@ -66,10 +66,10 @@ Accesses and manipulates ACS document nodes using their node IDs.
- _nodeId:_ `string` - ID of the target node
- _options:_ `any` - Optional parameters supported by JS-API
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/NodePaging.md)`>` - List of child items from the folder
- **getNodeMetadata**(nodeId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodeMetadata`](../../../lib/core/src/lib/models/node-metadata.model.ts)`>`<br/>
- **getNodeMetadata**(nodeId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodeMetadata`](lib/content-services/src/lib/common/models/node-metadata.model.ts)`>`<br/>
Get the metadata and the nodeType for a nodeId cleaned by the prefix.
- _nodeId:_ `string` - ID of the target node
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodeMetadata`](../../../lib/core/src/lib/models/node-metadata.model.ts)`>` - Node metadata
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodeMetadata`](lib/content-services/src/lib/common/models/node-metadata.model.ts)`>` - Node metadata
- **restoreNode**(nodeId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNode`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeMinimalEntry.md)`>`<br/>
Restores a node previously moved to the trashcan.
- _nodeId:_ `string` - ID of the node to restore

View File

@@ -5,7 +5,7 @@ Status: Active
Last reviewed: 2018-04-06
---
# [People Content service](../../../lib/core/src/lib/services/people-content.service.ts "Defined in people-content.service.ts")
# [People Content service](lib/content-services/src/lib/common/services/people-content.service.ts "Defined in people-content.service.ts")
Gets information about a Content Services user.
@@ -36,10 +36,10 @@ Gets information about a Content Services user.
- **isCurrentUserAdmin**(): `boolean`<br/>
Used to know if the current user has the admin capability
- **Returns** `boolean` - true or false
- **listPeople**(requestQuery?: [`PeopleContentQueryRequestModel`](../../../lib/core/src/lib/services/people-content.service.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`PeopleContentQueryResponse`](../../../lib/core/src/lib/services/people-content.service.ts)`>`<br/>
- **listPeople**(requestQuery?: [`PeopleContentQueryRequestModel`](lib/content-services/src/lib/common/services/people-content.service.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`PeopleContentQueryResponse`](lib/content-services/src/lib/common/services/people-content.service.ts)`>`<br/>
Gets a list of people.
- _requestQuery:_ [`PeopleContentQueryRequestModel`](../../../lib/core/src/lib/services/people-content.service.ts) - (Optional) maxItems and skipCount parameters supported by JS-API
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`PeopleContentQueryResponse`](../../../lib/core/src/lib/services/people-content.service.ts)`>` - Response containing pagination and list of entries
- _requestQuery:_ [`PeopleContentQueryRequestModel`](lib/content-services/src/lib/common/services/people-content.service.ts) - (Optional) maxItems and skipCount parameters supported by JS-API
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`PeopleContentQueryResponse`](lib/content-services/src/lib/common/services/people-content.service.ts)`>` - Response containing pagination and list of entries
- **resetLocalCurrentUser**()<br/>
Reset the local current user object
- **updatePerson**(personId: `string`, details: `PersonBodyUpdate`, opts?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`EcmUserModel`](../../core/models/ecm-user.model.md)`>`<br/>

View File

@@ -5,7 +5,7 @@ Status: Active
Last reviewed: 2018-04-05
---
# [People Process service](../../../lib/core/src/lib/services/people-process.service.ts "Defined in people-process.service.ts")
# [People Process service](lib/process-services/src/lib/common/services/people-process.service.ts "Defined in people-process.service.ts")
Gets information about Process Services users.

View File

@@ -5,7 +5,7 @@ Status: Active
Last reviewed: 2019-01-16
---
# [Upload Service](../../../lib/core/src/lib/services/upload.service.ts "Defined in upload.service.ts")
# [Upload Service](lib/content-services/src/lib/common/services/upload.service.ts "Defined in upload.service.ts")
Provides access to various APIs related to file upload features.
@@ -13,26 +13,26 @@ Provides access to various APIs related to file upload features.
### Methods
- **addToQueue**(files: [`FileModel`](../../../lib/core/src/lib/models/file.model.ts)`[]`): [`FileModel`](../../../lib/core/src/lib/models/file.model.ts)`[]`<br/>
- **addToQueue**(files: [`FileModel`](lib/content-services/src/lib/common/models/file.model.ts)`[]`): [`FileModel`](lib/content-services/src/lib/common/models/file.model.ts)`[]`<br/>
Adds files to the uploading queue to be uploaded
- _files:_ [`FileModel`](../../../lib/core/src/lib/models/file.model.ts)`[]` - One or more separate parameters or an array of files to queue
- **Returns** [`FileModel`](../../../lib/core/src/lib/models/file.model.ts)`[]` - Array of files that were not blocked from upload by the ignore list
- **cancelUpload**(files: [`FileModel`](../../../lib/core/src/lib/models/file.model.ts)`[]`)<br/>
- _files:_ [`FileModel`](lib/content-services/src/lib/common/models/file.model.ts)`[]` - One or more separate parameters or an array of files to queue
- **Returns** [`FileModel`](lib/content-services/src/lib/common/models/file.model.ts)`[]` - Array of files that were not blocked from upload by the ignore list
- **cancelUpload**(files: [`FileModel`](lib/content-services/src/lib/common/models/file.model.ts)`[]`)<br/>
Cancels uploading of files. If the file is smaller than 1 MB the file will be uploaded and then the node deleted to prevent having files that were aborted but still uploaded.
- _files:_ [`FileModel`](../../../lib/core/src/lib/models/file.model.ts)`[]` - One or more separate parameters or an array of files specifying uploads to cancel
- _files:_ [`FileModel`](lib/content-services/src/lib/common/models/file.model.ts)`[]` - One or more separate parameters or an array of files specifying uploads to cancel
- **clearCache**()<br/>
- **clearQueue**()<br/>
Clears the upload queue
- **getQueue**(): [`FileModel`](../../../lib/core/src/lib/models/file.model.ts)`[]`<br/>
- **getQueue**(): [`FileModel`](lib/content-services/src/lib/common/models/file.model.ts)`[]`<br/>
Gets the file Queue
- **Returns** [`FileModel`](../../../lib/core/src/lib/models/file.model.ts)`[]` - Array of files that form the queue
- **Returns** [`FileModel`](lib/content-services/src/lib/common/models/file.model.ts)`[]` - Array of files that form the queue
- **getThreadsCount**(): `number`<br/>
Returns the number of concurrent threads for uploading.
- **Returns** `number` - Number of concurrent threads (default 1)
- **getUploadPromise**(file: [`FileModel`](../../../lib/core/src/lib/models/file.model.ts)): `any`<br/>
- **getUploadPromise**(file: [`FileModel`](lib/content-services/src/lib/common/models/file.model.ts)): `any`<br/>
Gets an upload promise for a file.
- _file:_ [`FileModel`](../../../lib/core/src/lib/models/file.model.ts) - The target file
- _file:_ [`FileModel`](lib/content-services/src/lib/common/models/file.model.ts) - The target file
- **Returns** `any` - [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises) that is resolved if the upload is successful or error otherwise
- **isUploading**(): `boolean`<br/>
Checks whether the service still has files uploading or awaiting upload.
@@ -46,15 +46,15 @@ Provides access to various APIs related to file upload features.
| Name | Type | Description |
| ---- | ---- | ----------- |
| queueChanged | [`FileModel`](../../../lib/core/src/lib/models/file.model.ts)\[] | Emitted when the file queue changes. |
| fileUpload | [`FileUploadEvent`](../../../lib/core/src/lib/events/file.event.ts) | Emitted when a [File model](lib/core/src/lib/models/file.model.ts) changes its state. |
| fileUploadStarting | [`FileUploadEvent`](../../../lib/core/src/lib/events/file.event.ts) | Emitted when an upload starts. |
| fileUploadCancelled | [`FileUploadEvent`](../../../lib/core/src/lib/events/file.event.ts) | Emitted when an upload gets cancelled by the user. |
| fileUploadProgress | [`FileUploadEvent`](../../../lib/core/src/lib/events/file.event.ts) | Emitted during the file upload process and contains the current progress for a particular [File model](lib/core/src/lib/models/file.model.ts). |
| fileUploadAborted | [`FileUploadEvent`](../../../lib/core/src/lib/events/file.event.ts) | Emitted when a file upload gets aborted by the server. |
| fileUploadError | [`FileUploadEvent`](../../../lib/core/src/lib/events/file.event.ts) | Emitted when an error occurs during a file upload. |
| fileUploadComplete | [`FileUploadCompleteEvent`](../../../lib/core/src/lib/events/file.event.ts) | Emitted when a file upload is complete. |
| fileUploadDelete | [`FileUploadDeleteEvent`](../../../lib/core/src/lib/events/file.event.ts) | Emitted when an uploaded file is removed from server. |
| queueChanged | [`FileModel`](lib/content-services/src/lib/common/models/file.model.ts)\[] | Emitted when the file queue changes. |
| fileUpload | [`FileUploadEvent`](lib/content-services/src/lib/common/events/file.event.ts) | Emitted when a [File model](lib/content-services/src/lib/common/models/file.model.ts) changes its state. |
| fileUploadStarting | [`FileUploadEvent`](lib/content-services/src/lib/common/events/file.event.ts) | Emitted when an upload starts. |
| fileUploadCancelled | [`FileUploadEvent`](lib/content-services/src/lib/common/events/file.event.ts) | Emitted when an upload gets cancelled by the user. |
| fileUploadProgress | [`FileUploadEvent`](lib/content-services/src/lib/common/events/file.event.ts) | Emitted during the file upload process and contains the current progress for a particular [File model](lib/content-services/src/lib/common/models/file.model.ts). |
| fileUploadAborted | [`FileUploadEvent`](lib/content-services/src/lib/common/events/file.event.ts) | Emitted when a file upload gets aborted by the server. |
| fileUploadError | [`FileUploadEvent`](lib/content-services/src/lib/common/events/file.event.ts) | Emitted when an error occurs during a file upload. |
| fileUploadComplete | [`FileUploadCompleteEvent`](lib/content-services/src/lib/common/events/file.event.ts) | Emitted when a file upload is complete. |
| fileUploadDelete | [`FileUploadDeleteEvent`](lib/content-services/src/lib/common/events/file.event.ts) | Emitted when an uploaded file is removed from server. |
| fileDeleted | string | This can be invoked when a file is deleted from an external source to upload the file dialog status. |
## Details
@@ -120,7 +120,7 @@ In this way all the files present in the .git folder won't be uploaded.
### Toggling Versioning Support
It is also possible to provide the `versioningEnabled` value as part of the [`FileUploadOptions`](../../../lib/core/src/lib/models/file.model.ts) when using [upload service](../../core/services/upload.service.md) from the code.
It is also possible to provide the `versioningEnabled` value as part of the [`FileUploadOptions`](lib/content-services/src/lib/common/models/file.model.ts) when using [upload service](../../core/services/upload.service.md) from the code.
> Note: When creating a new node using multipart/form-data by default versioning is enabled and set to MAJOR Version.
> Since Alfresco 6.2.3 versioningEnabled flag was introduced offering better control over the new node Versioning.

View File

@@ -5,7 +5,7 @@ Status: Active
Last reviewed: 2022-06-05
---
# [User access service](../../../lib/core/src/lib/services/user-access.service.ts "Defined in user-access.service.ts")
# [User access service](lib/core/src/lib/auth/services/user-access.service.ts "Defined in user-access.service.ts")
Checks the global and application access of a user