[ADF- 2670] Checked and updated docs for 2.3 (#3197)

* [ADF-2670] Reviewed docs for 2.3 with only minor changes

* [ADF-2670] Checked and updated docs for 2.3
This commit is contained in:
Andy Stark
2018-04-16 15:51:29 +01:00
committed by Eugenio Romano
parent e4b9d775a2
commit 460e33ccdb
21 changed files with 226 additions and 137 deletions

View File

@@ -83,7 +83,7 @@ for more information about installing and using the source code.
| [Form service](form.service.md) | Implements Process Services form methods | [Source](../../lib/core/form/services/form.service.ts) |
| [Node service](node.service.md) | Gets Alfresco Repository node metadata and creates nodes with metadata. | [Source](../../lib/core/form/services/node.service.ts) |
| [Process content service](process-content.service.md) | Manipulates content related to a Process Instance or Task Instance in APS. | [Source](../../lib/core/form/services/process-content.service.ts) |
| [Alfresco api service](alfresco-api.service.md) | Provides access to initialized **AlfrescoJSApi** instance. | [Source](../../lib/core/services/alfresco-api.service.ts) |
| [Alfresco api service](alfresco-api.service.md) | Provides access to an initialized **AlfrescoJSApi** instance. | [Source](../../lib/core/services/alfresco-api.service.ts) |
| [Apps process service](apps-process.service.md) | Gets details of the Process Services apps that are deployed for the user. | [Source](../../lib/core/services/apps-process.service.ts) |
| [Auth guard bpm service](auth-guard-bpm.service.md) | Adds authentication with Process Services to a route within the app. | [Source](../../lib/core/services/auth-guard-bpm.service.ts) |
| [Auth guard ecm service](auth-guard-ecm.service.md) | Adds authentication with Content Services to a route within the app. | [Source](../../lib/core/services/auth-guard-ecm.service.ts) |

View File

@@ -1,10 +1,12 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-04-13
---
# Alfresco Api Service
Provides access to initialized **AlfrescoJSApi** instance.
Provides access to an initialized **AlfrescoJSApi** instance.
## Basic Usage
@@ -24,19 +26,37 @@ export class MyComponent implements OnInit {
}
```
## Events
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| contentApi | `ContentApi` | | (Read only) Accesses the Content API |
| nodesApi | `NodesApi` | | (Read only) Accesses the Nodes API |
| renditionsApi | `RenditionsApi` | | (Read only) Accesses the Renditions API |
| sharedLinksApi | `SharedLinksApi` | | (Read only) Accesses the Shared Links API |
| sitesApi | `SitesApi` | | (Read only) Accesses the Sites API |
| favoritesApi | `FavoritesApi` | | (Read only) Accesses the Favorites API |
| peopleApi | `PeopleApi` | | (Read only) Accesses the People API |
| searchApi | `SearchApi` | | (Read only) Accesses the Search API |
| versionsApi | `VersionsApi` | | (Read only) Accesses the Versions API |
| classesApi | `ClassesApi` | | (Read only) Accesses the Classes API |
| groupsApi | `GroupsApi` | | (Read only) Accesses the Groups API |
### Events
| Name | Type | Description |
| --- | --- | --- |
| nodeUpdated | `Subject<MinimalNodeEntryEntity>` | Publish/subscribe to events related to node updates. |
| nodeUpdated | `Subject<MinimalNodeEntryEntity>` | Emitted when a node updates. |
## Details
**Note for developers**: _the TypeScript declaration files for Alfresco JS API
are still under development and some Alfresco APIs may not be accessed
via your favourite IDE's intellisense or TypeScript compiler.
In case of any TypeScript type check errors you can still call any supported
Alfresco JS api by casting the instance to `any` type like the following:_
**Note for developers**: The TypeScript declaration files for the Alfresco JS API
are still under development and some Alfresco APIs may not be accessible
via your IDE's intellisense or TypeScript compiler.
To avoid these TypeScript type check errors, you can call any supported
Alfresco JS api by casting the instance to the `any` type as in the following example:
```ts
let api: any = this.apiService.getInstance();

View File

@@ -1,7 +1,9 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-04-13
---
# Content service
Accesses app-generated data objects via URLs and file downloads.

View File

@@ -1,7 +1,7 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-03-21
Last reviewed: 2018-04-16
---
# DataTable component

View File

@@ -1,7 +1,7 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-03-20
Last reviewed: 2018-04-16
---
# Pagination Component

View File

@@ -1,7 +1,9 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-04-16
---
# User Preferences Service
Stores preferences for components.
@@ -31,15 +33,16 @@ Stores preferences for components.
- `getDefaultLocale(): string`
Gets the default locale.
- `select : Observable`
Return the value for the user status property changed
- `select(property: string) : Observable`
Return the value for the user status property changed
- `property` - The property name to query
## Details
The preferences are bound to a particular `prefix` so the application can switch between different profiles on demand.
For example upon login you can set the `prefix` as current username:
For example, upon login you can set the `prefix` to the current username:
```ts
import { UserPreferencesService, AuthenticationService } from '@alfresco/adf-core';
@@ -58,9 +61,9 @@ class AppComponent {
}
```
As soon as you assign the storage prefix all settings that you get or set via the `UserPreferencesService` will be saved to dedicated profile.
As soon as you assign the storage prefix, all settings that you get or set via the `UserPreferencesService` will be saved to a dedicated profile.
You can import the service in your controller and use its APIs like below:
You can import the service into your controller and use its APIs as shown below:
```ts
@Component({...})
@@ -87,7 +90,9 @@ The service also provides quick access to a set of the "known" properties used a
| locale | `string` | Current locale setting. |
## User Preference onChange Stream
Whenever a property is set to the user preference service an onChange event is sent with the whole set of user properties. This comes in handy when a component wants to react to some property change.
Whenever a property is set with the user preference service, an `onChange` event is sent with the
whole set of user properties. This is useful when a component needs to react to a property change:
```ts
userPreferences.paginationSize = 10;
@@ -96,7 +101,7 @@ Whenever a property is set to the user preference service an onChange event is s
});
```
We have added also the `select` method where the user can give the property name which wants to be notified the changes and get the updated value.
You can also use the `select` method to get notification when a particular property is changed.
A set of basic properties is added into the enumeration `UserPreferenceValues` which gives you the key value to access the standard user preference service properties : **PaginationSize**, **DisableCSRF**, **Locale** and **SupportedPageSizes**.
```ts