mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
[ADF-3551] Doc review updates (#3789)
* [ADF-3551] Updated docs plus minor ToC tool fix * [ADF-3551] Updated docs and JSDocs * [ADF-3551] Updated docs and JSDocs
This commit is contained in:
parent
9c82507d5c
commit
a7cdcbf7b9
@ -1,10 +1,10 @@
|
||||
---
|
||||
Added: v2.3.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-04-10
|
||||
Last reviewed: 2018-09-13
|
||||
---
|
||||
|
||||
# Node Public file Share Directive
|
||||
# Node Public File Share Directive
|
||||
|
||||
Creates and manages public shared links for files.
|
||||
|
||||
@ -15,7 +15,7 @@ Creates and manages public shared links for files.
|
||||
```html
|
||||
<adf-toolbar>
|
||||
<button mat-icon-button
|
||||
[baseShareUrl]="http://localhos:8080/myrouteForShareFile/"
|
||||
[baseShareUrl]="http://localhost:8080/myrouteForShareFile/"
|
||||
[adf-share]="documentList.selection[0]">
|
||||
<mat-icon>share</mat-icon>
|
||||
</button>
|
||||
@ -32,7 +32,7 @@ Creates and manages public shared links for files.
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| baseShareUrl | `string` | | baseShareUrl to add as prefix to the generated link |
|
||||
| baseShareUrl | `string` | | Prefix to add to the generated link. |
|
||||
| node | [`MinimalNodeEntity`](../content-services/document-library.model.md) | | Node to share. |
|
||||
|
||||
## Details
|
||||
@ -47,7 +47,7 @@ a `sharedId` for the file. This will create a URL like the following:
|
||||
|
||||
http://localhost:8080/myrouteForShareFile/NEW_GENERATED_SHAREID
|
||||
|
||||
To use this,ou will need to implement some code that gets the `NEW_GENERATED_SHAREID` with the router
|
||||
To use this, you will need to implement some code that gets the `NEW_GENERATED_SHAREID` with the router
|
||||
and passes it to a [Viewer component](../core/viewer.component.md):
|
||||
|
||||
```html
|
||||
|
@ -1,6 +1,7 @@
|
||||
---
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-09-13
|
||||
---
|
||||
|
||||
# App Config service
|
||||
@ -24,7 +25,7 @@ Supports app configuration settings, stored server side.
|
||||
- **Returns** `string` - Port with prefix
|
||||
- **getLocationProtocol**(): `string`<br/>
|
||||
Gets the location.protocol value.
|
||||
- **Returns** `string` -
|
||||
- **Returns** `string` - The location.protocol string
|
||||
- **load**(): [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises)`<any>`<br/>
|
||||
Loads the config file.
|
||||
- **Returns** [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises)`<any>` - Notification when loading is complete
|
||||
@ -38,14 +39,14 @@ Supports app configuration settings, stored server side.
|
||||
The [`AppConfigService`](../core/app-config.service.md) service provides support for loading and accessing global application configuration settings that you store on the server side in the form of a JSON file.
|
||||
|
||||
You may need this service when deploying your ADF-based application to production servers.
|
||||
|
||||
There can be more than one server running web apps with different settings, like different addresses for Alfresco Content/Process services.
|
||||
|
||||
Or there is a need to change global settings for all the clients.
|
||||
You may also use the service if there is a need to change global settings for all the clients.
|
||||
|
||||
The service is already pre-configured to look for the "app.config.json" file in the application root address.
|
||||
|
||||
That allows deploying ADF-based web applications to multiple servers together with different settings files, for example having development, staging or production environments.
|
||||
The service is already pre-configured to look for the "app.config.json" file in the application
|
||||
root address. This allows you to deploy ADF-based web applications to multiple servers together with
|
||||
different settings files. You could use this, for example, to create separate development, staging,
|
||||
and production environments.
|
||||
|
||||
Example of the default settings file content:
|
||||
|
||||
@ -61,10 +62,10 @@ Example of the default settings file content:
|
||||
}
|
||||
```
|
||||
|
||||
Please note that settings above are default ones coming with the server.
|
||||
You can override the values in your custom `app.config.json` file if needed.
|
||||
Note that the settings in the example above are the default ones supplied with the server.
|
||||
You can override the values in your custom `app.config.json` file if necessary.
|
||||
|
||||
You can also change the path or name of the configuration file when importing the [`CoreModule`](../../lib/core/core.module.ts) in your main application.
|
||||
You can change the path or name of the configuration file when importing the [`CoreModule`](../../lib/core/core.module.ts) in your main application.
|
||||
|
||||
```ts
|
||||
...
|
||||
@ -102,12 +103,12 @@ export class AppComponent {
|
||||
}
|
||||
```
|
||||
|
||||
Your custom components can also benefit from the [`AppConfigService`](../core/app-config.service.md),
|
||||
you can put an unlimited number of settings and optionally a nested JSON hierarchy.
|
||||
Your custom components can also benefit from the [`AppConfigService`](../core/app-config.service.md).
|
||||
You can create an unlimited number of settings and optionally organize them as a nested JSON hierarchy.
|
||||
|
||||
### Variable substitution in configuration strings
|
||||
|
||||
The [`AppConfigService`](../core/app-config.service.md) also supports a limited set of variable substitutions to greatly simplify certain scenarios.
|
||||
The [`AppConfigService`](../core/app-config.service.md) supports a limited set of variable substitutions to greatly simplify certain scenarios.
|
||||
|
||||
```json
|
||||
{
|
||||
@ -129,7 +130,9 @@ The supported variables are:
|
||||
|
||||
## App Config onLoad Stream
|
||||
|
||||
When the app config is loaded correctly an onChange event is sent with the whole set app config properties. This comes in handy when a component wants to react to some property change or interact with the app config when it's correctly loaded.
|
||||
When the app config is loaded correctly, an `onChange` event is emitted with the whole set of app
|
||||
config properties. This comes in handy when a component needs to react to some property change or
|
||||
interact with the app config when it is finished loading:
|
||||
|
||||
```ts
|
||||
appConfig.onLoad.subscribe((appConfig) => {
|
||||
@ -137,7 +140,8 @@ When the app config is loaded correctly an onChange event is sent with the whole
|
||||
});
|
||||
```
|
||||
|
||||
We have added also the `select` method where the user can give the property name which wants to be notified the when the app config is loaded and get the value.
|
||||
The `select` method lets you specify the name of a variable that should be set with the value
|
||||
of a property when the app config is loaded:
|
||||
|
||||
```json
|
||||
appconfig : {
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-03-29
|
||||
Last reviewed: 2018-09-13
|
||||
---
|
||||
|
||||
# Authentication Service
|
||||
@ -13,9 +13,8 @@ Provides authentication to ACS and APS.
|
||||
### Methods
|
||||
|
||||
- **getBpmLoggedUser**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<UserRepresentation>`<br/>
|
||||
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<UserRepresentation>` -
|
||||
|
||||
Gets information about the user currently logged into APS.
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<UserRepresentation>` - User information
|
||||
- **getBpmUsername**(): `string`<br/>
|
||||
Gets the BPM username
|
||||
- **Returns** `string` - The BPM username
|
||||
@ -40,20 +39,17 @@ Provides authentication to ACS and APS.
|
||||
- _error:_ `any` - Error message
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Object representing the error message
|
||||
- **isALLProvider**(): `boolean`<br/>
|
||||
|
||||
- **Returns** `boolean` -
|
||||
|
||||
Does the provider support both ECM and BPM?
|
||||
- **Returns** `boolean` - True if both are supported, false otherwise
|
||||
- **isBPMProvider**(): `boolean`<br/>
|
||||
|
||||
- **Returns** `boolean` -
|
||||
|
||||
Does the provider support BPM?
|
||||
- **Returns** `boolean` - True if supported, false otherwise
|
||||
- **isBpmLoggedIn**(): `boolean`<br/>
|
||||
Checks if the user is logged in on a BPM provider.
|
||||
- **Returns** `boolean` - True if logged in, false otherwise
|
||||
- **isECMProvider**(): `boolean`<br/>
|
||||
|
||||
- **Returns** `boolean` -
|
||||
|
||||
Does the provider support ECM?
|
||||
- **Returns** `boolean` - True if supported, false otherwise
|
||||
- **isEcmLoggedIn**(): `boolean`<br/>
|
||||
Checks if the user is logged in on an ECM provider.
|
||||
- **Returns** `boolean` - True if logged in, false otherwise
|
||||
@ -61,9 +57,8 @@ Provides authentication to ACS and APS.
|
||||
Checks if the user logged in.
|
||||
- **Returns** `boolean` - True if logged in, false otherwise
|
||||
- **isOauth**(): `boolean`<br/>
|
||||
|
||||
- **Returns** `boolean` -
|
||||
|
||||
Does the provider support OAuth?
|
||||
- **Returns** `boolean` - True if supported, false otherwise
|
||||
- **isRememberMeSet**(): `boolean`<br/>
|
||||
Checks whether the "remember me" cookie was set or not.
|
||||
- **Returns** `boolean` - True if set, false otherwise
|
||||
@ -73,9 +68,9 @@ Provides authentication to ACS and APS.
|
||||
- _password:_ `string` - Password for the login
|
||||
- _rememberMe:_ `boolean` - Stores the user's login details if true
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<Function>` - Object with auth type ("ECM", "BPM" or "ALL") and auth ticket
|
||||
- **logout**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
|
||||
- **logout**(): `any`<br/>
|
||||
Logs the user out.
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Response event called when logout is complete
|
||||
- **Returns** `any` - Response event called when logout is complete
|
||||
- **setRedirect**(url: [`RedirectionModel`](../../lib/core/models/redirection.model.ts))<br/>
|
||||
Sets the URL to redirect to after login.
|
||||
- _url:_ [`RedirectionModel`](../../lib/core/models/redirection.model.ts) - URL to redirect to
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-04-16
|
||||
Last reviewed: 2018-09-13
|
||||
---
|
||||
|
||||
# DataTable component
|
||||
@ -318,7 +318,7 @@ together in the same datatable.
|
||||
| loading | `boolean` | false | Flag that indicates if the datatable is in loading state and needs to show the loading template (see the docs to learn how to configure a loading template). |
|
||||
| multiselect | `boolean` | false | Toggles multiple row selection, which renders checkboxes at the beginning of each row. |
|
||||
| noPermission | `boolean` | false | Flag that indicates if the datatable should show the "no permission" template. |
|
||||
| rowMenuCacheEnabled | `boolean` | true | |
|
||||
| rowMenuCacheEnabled | `boolean` | true | Should the items for the row actions menu be cached for reuse after they are loaded the first time? |
|
||||
| rowStyle | `string` | | The inline style to apply to every row. See [NgStyle](https://angular.io/docs/ts/latest/api/common/index/NgStyle-directive.html) docs for more details and usage examples. |
|
||||
| rowStyleClass | `string` | "" | The CSS class to apply to every row. |
|
||||
| rows | `any[]` | \[] | The rows that the datatable will show. |
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
Added: v2.4.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-06-08
|
||||
Last reviewed: 2018-09-13
|
||||
---
|
||||
|
||||
# Empty Content Component
|
||||
@ -32,9 +32,9 @@ Provides a generic "Empty Content" placeholder for components.
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| icon | `string` | "cake" | Material Icon to use |
|
||||
| subtitle | `string` | "" | String or Resource Key for the title |
|
||||
| title | `string` | "" | String or Resource Key for the subtitle |
|
||||
| icon | `string` | "cake" | Material Icon to use. |
|
||||
| subtitle | `string` | "" | String or Resource Key for the subtitle. |
|
||||
| title | `string` | "" | String or Resource Key for the title. |
|
||||
|
||||
## Details
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
Added: v2.4.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-06-13
|
||||
Last reviewed: 2018-09-13
|
||||
---
|
||||
|
||||
# Error Content Component
|
||||
@ -16,20 +16,20 @@ Once you have caught the error in your server you will need to redirect to `/err
|
||||
this.router.navigate(['/error', errorCode]);
|
||||
```
|
||||
|
||||
## Properties
|
||||
## Class members
|
||||
|
||||
### Error Content Component
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| ---- | ---- |---- | ----------- |
|
||||
| errorCode | string | |Error code |
|
||||
| returnButtonUrl | string | "/" |URL for the return button |
|
||||
| secondaryButtonUrl | string | "report-issue" |(Optional) URL for the secondary button |
|
||||
|
||||
Note that you will also have to provide values for the variables used in the view template.
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| errorCode | `string` | | Error code associated with this error. |
|
||||
| returnButtonUrl | `string` | "/" | Target URL for the return button. |
|
||||
| secondaryButtonUrl | `string` | "report-issue" | Target URL for the secondary button. |
|
||||
|
||||
## Details
|
||||
|
||||
Note that you need to provide values for the variables used in the view template.
|
||||
|
||||
You can customize your error messages by adding them to the translate files inside
|
||||
`lib/core/i18n`:
|
||||
|
||||
@ -50,4 +50,4 @@ You can customize your error messages by adding them to the translate files insi
|
||||
|
||||
## See also
|
||||
|
||||
- [Empty Content component](empty-content.component.md)
|
||||
- [Empty Content component](empty-content.component.md)
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
Added: v2.0.0
|
||||
Status: Internal
|
||||
Last reviewed: 2018-06-13
|
||||
Last reviewed: 2018-09-13
|
||||
---
|
||||
|
||||
# Host settings component
|
||||
@ -33,14 +33,14 @@ Validates the URLs for ACS and APS and saves them in the user's local storage
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| providers | `string[]` | | Tells the component which provider option are available. Possible valid values are "ECM" (Content), "BPM" (Process) , "ALL" (Content and Process), 'OAUTH2' SSO . |
|
||||
| providers | `string[]` | | Tells the component which provider options are available. Possible valid values are "ECM" (Content), "BPM" (Process) , "ALL" (Content and Process), 'OAUTH2' SSO. |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| bpmHostChange | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<string>` | (**Deprecated:** in 2.4.0) Emitted when the bpm host URL is changed. |
|
||||
| cancel | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<boolean>` | |
|
||||
| cancel | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<boolean>` | Emitted when the user cancels the changes. |
|
||||
| ecmHostChange | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<string>` | (**Deprecated:** in 2.4.0) Emitted when the ecm host URL is changed. |
|
||||
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<string>` | Emitted when the URL is invalid. |
|
||||
| success | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<boolean>` | |
|
||||
| success | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<boolean>` | Emitted when the changes are successfully applied. |
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-08-07
|
||||
Last reviewed: 2018-09-13
|
||||
---
|
||||
|
||||
# Login component
|
||||
@ -77,11 +77,11 @@ with custom input fields handled by your application or parent component:
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| backgroundImageUrl | `string` | | Path to a custom background image. |
|
||||
| copyrightText | `string` | | The copyright text below the login box. |
|
||||
| disableCsrf | `boolean` | | Prevents the CSRF Token from being submitted. Only valid for Alfresco Process Services. |
|
||||
| disableCsrf | `boolean` | | (**Deprecated:** 3.0.0) Prevents the CSRF Token from being submitted. Only valid for Alfresco Process Services. |
|
||||
| fieldsValidation | `any` | | Custom validation rules for the login form. |
|
||||
| logoImageUrl | `string` | | Path to a custom logo image. |
|
||||
| needHelpLink | `string` | "" | Sets the URL of the NEED HELP link in the footer. |
|
||||
| providers | `string` | | (**Deprecated:** 3.0.0 Possible valid values are ECM, BPM or ALL. deprecated in 3.0.0 use the providers property in the the app.config.json) |
|
||||
| providers | `string` | | (**Deprecated:** 3.0.0 - use the providers property in the the app.config.json) Possible valid values are ECM, BPM or ALL. |
|
||||
| registerLink | `string` | "" | Sets the URL of the REGISTER link in the footer. |
|
||||
| showLoginActions | `boolean` | true | Should the extra actions (`Need Help`, `Register`, etc) be shown? |
|
||||
| showRememberMe | `boolean` | true | Should the `Remember me` checkbox be shown? When selected, this option will remember the logged-in user after the browser is closed to avoid logging in repeatedly. |
|
||||
|
@ -1,15 +1,45 @@
|
||||
---
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-09-13
|
||||
---
|
||||
|
||||
# Node Service
|
||||
|
||||
Gets Alfresco Repository node metadata and creates nodes with metadata.
|
||||
|
||||
This service cannot be used to create nodes with content.
|
||||
## Class members
|
||||
|
||||
## Importing
|
||||
### Methods
|
||||
|
||||
- **createNode**(name: `string`, nodeType: `string`, properties: `any`, path: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
|
||||
Create a new Node from form metadata
|
||||
- _name:_ `string` - Node name
|
||||
- _nodeType:_ `string` - Node type
|
||||
- _properties:_ `any` - Node body properties
|
||||
- _path:_ `string` - Path to the node
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - The created node
|
||||
- **createNodeMetadata**(nodeType: `string`, nameSpace: `any`, data: `any`, path: `string`, name?: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
|
||||
Create a new Node from form metadata.
|
||||
- _nodeType:_ `string` - Node type
|
||||
- _nameSpace:_ `any` - Namespace for properties
|
||||
- _data:_ `any` - Property data to store in the node under namespace
|
||||
- _path:_ `string` - Path to the node
|
||||
- _name:_ `string` - (Optional) Node name
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - The created node
|
||||
- **getNodeMetadata**(nodeId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodeMetadata`](../../lib/core/form/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/form/models/node-metadata.model.ts)`>` - Node metadata
|
||||
|
||||
## Details
|
||||
|
||||
Note that this service cannot be used to create nodes with content.
|
||||
|
||||
The `path` parameter to `createNode` and `createNodeMetadata` specifies an intermediate
|
||||
path of folders to create between the root and the target node.
|
||||
|
||||
### Importing
|
||||
|
||||
```ts
|
||||
import { NodeService } from '@alfresco/adf-core';
|
||||
@ -20,106 +50,6 @@ export class SomePageComponent implements OnInit {
|
||||
}
|
||||
```
|
||||
|
||||
## Methods
|
||||
|
||||
#### getNodeMetadata(nodeId: string): Observable`<NodeMetadata>`
|
||||
|
||||
Get the metadata and type for passed in node ID (e.g. 3062d73b-fe47-4040-89d2-79efae63869c):
|
||||
|
||||
```ts
|
||||
// Get the node reference from somewhere...
|
||||
const nodeId = '3062d73b-fe47-4040-89d2-79efae63869c';
|
||||
|
||||
this.nodeService2.getNodeMetadata(nodeId).subscribe(data => {
|
||||
const nodeMetadata = data.metadata;
|
||||
const nodeType = data.nodeType;
|
||||
|
||||
console.log('nodeMetadata', nodeMetadata);
|
||||
console.log('nodeType', nodeType);
|
||||
}, error => {
|
||||
console.log('Error: ', error);
|
||||
});
|
||||
```
|
||||
|
||||
The metadata response doesn't include the `cm:auditable` properties (i.e. created, creator, modified, modifier, last access)
|
||||
or the name of the node (i.e. `cm:name`).
|
||||
|
||||
The `metadata` response looks like in this example:
|
||||
|
||||
author: "Martin"
|
||||
description: "Installation guide for Alfresco 3.3 on Linux"
|
||||
lastThumbnailModification: "doclib:1505900632400"
|
||||
title: "Install 3.3 Linux"
|
||||
versionLabel: "1.0"
|
||||
versionType: "MAJOR"
|
||||
|
||||
Note that the properties are missing namespace prefix. The `nodeType` response will be returned with namespace prefix,
|
||||
such as `cm:content`.
|
||||
|
||||
Executing this method on a folder node returns no metadata, just the type.
|
||||
|
||||
#### createNode(name: string, nodeType: string, properties: any, path: string): Observable`<any>`
|
||||
|
||||
Creates a node in the Alfresco Repository with passed in `name`, `nodeType`, and metadata `properties`.
|
||||
It will be created in the folder `path` that is passed in.
|
||||
|
||||
```ts
|
||||
const nodePath = '/Guest Home';
|
||||
const nodeName = 'someFolder';
|
||||
const nodeType = 'cm:folder';
|
||||
const properties = {
|
||||
'cm:title': 'Some title',
|
||||
'cm:description': 'Some description'
|
||||
};
|
||||
this.nodeService2.createNode(nodeName, nodeType, properties, nodePath).subscribe(nodeInfo => {
|
||||
console.log('New Node info: ', nodeInfo);
|
||||
}, error => {
|
||||
console.log('Error: ', error);
|
||||
});
|
||||
```
|
||||
|
||||
Note that the `path` property should not include the **/Company Home** bit.
|
||||
|
||||
The response includes all metadata about the new node:
|
||||
|
||||
entry:
|
||||
aspectNames: (2) ["cm:titled", "cm:auditable"]
|
||||
createdAt: Mon Nov 06 2017 13:04:49 GMT+0000 (GMT) {}
|
||||
createdByUser: {id: "admin@app.activiti.com", displayName: "ADF User"}
|
||||
id: "1ab71bb1-d67f-4147-95f6-b5801830ca08"
|
||||
isFile: false
|
||||
isFolder: true
|
||||
modifiedAt: Mon Nov 06 2017 13:04:49 GMT+0000 (GMT) {}
|
||||
modifiedByUser: {id: "admin@app.activiti.com", displayName: "ADF User"}
|
||||
name: "someFolder"
|
||||
nodeType: "cm:folder"
|
||||
parentId: "a29b5fe3-81f6-46a7-9bed-6a53620acb32"
|
||||
properties: {cm:title: "Some title", cm:description: "Some description"}
|
||||
|
||||
#### createNodeMetadata(nodeType: string, nameSpace: any, data: any, path: string, name?: string): Observable`<any>`
|
||||
|
||||
This is a convenience method if your property list is missing namespace prefix for property names.
|
||||
The namespace prefix can then be supplied separately and this method will prepend it automatically.
|
||||
This method calls the `createNode` method internally:
|
||||
|
||||
```ts
|
||||
const nodePath = '/Guest Home';
|
||||
const nodeName = 'someOtherFolder';
|
||||
const nodeType = 'cm:folder';
|
||||
const propNamespacePrefix = 'cm';
|
||||
const properties = {
|
||||
'title': 'Some title',
|
||||
'description': 'Some description'
|
||||
};
|
||||
this.nodeService2.createNodeMetadata(nodeType, propNamespacePrefix, properties, nodePath, nodeName).subscribe(nodeInfo => {
|
||||
console.log('New Node info: ', nodeInfo);
|
||||
}, error => {
|
||||
console.log('Error: ', error);
|
||||
});
|
||||
```
|
||||
|
||||
See the `createNode` method for information about the response object.
|
||||
|
||||
## See also
|
||||
|
||||
- [Nodes api service](nodes-api.service.md)
|
||||
|
@ -1,6 +1,7 @@
|
||||
---
|
||||
Added: v2.1.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-09-13
|
||||
---
|
||||
|
||||
# Search Configuration service
|
||||
@ -12,11 +13,11 @@ Provides fine control of parameters to a search.
|
||||
### Methods
|
||||
|
||||
- **generateQueryBody**(searchTerm: `string`, maxResults: `number`, skipCount: `number`): `QueryBody`<br/>
|
||||
|
||||
- _searchTerm:_ `string` -
|
||||
- _maxResults:_ `number` -
|
||||
- _skipCount:_ `number` -
|
||||
- **Returns** `QueryBody` -
|
||||
Generates a QueryBody object with custom search parameters.
|
||||
- _searchTerm:_ `string` - Term text to search for
|
||||
- _maxResults:_ `number` - Maximum number of search results to show in a page
|
||||
- _skipCount:_ `number` - The offset of the start of the page within the results list
|
||||
- **Returns** `QueryBody` - Query body defined by the parameters
|
||||
|
||||
## Details
|
||||
|
||||
|
@ -31,6 +31,7 @@ export class NodeSharedDirective implements OnChanges {
|
||||
@Input('adf-share')
|
||||
node: MinimalNodeEntity;
|
||||
|
||||
/** Prefix to add to the generated link. */
|
||||
@Input()
|
||||
baseShareUrl: string;
|
||||
|
||||
|
@ -94,6 +94,7 @@ export class AppConfigService {
|
||||
|
||||
/**
|
||||
* Gets the location.protocol value.
|
||||
* @returns The location.protocol string
|
||||
*/
|
||||
getLocationProtocol(): string {
|
||||
return location.protocol;
|
||||
|
@ -149,6 +149,10 @@ export class DataTableComponent implements AfterContentInit, OnChanges, DoCheck,
|
||||
@Input()
|
||||
noPermission: boolean = false;
|
||||
|
||||
/**
|
||||
* Should the items for the row actions menu be cached for reuse after they are loaded
|
||||
* the first time?
|
||||
*/
|
||||
@Input()
|
||||
rowMenuCacheEnabled = true;
|
||||
|
||||
|
@ -28,8 +28,9 @@ export class NodeService {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get All the metadata and the nodeType for a nodeId cleaned by the prefix
|
||||
* @param nodeId Node Id
|
||||
* Get the metadata and the nodeType for a nodeId cleaned by the prefix.
|
||||
* @param nodeId ID of the target node
|
||||
* @returns Node metadata
|
||||
*/
|
||||
public getNodeMetadata(nodeId: string): Observable<NodeMetadata> {
|
||||
return from(this.apiService.getInstance().nodes.getNodeInfo(nodeId))
|
||||
@ -37,11 +38,13 @@ export class NodeService {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new Node from form metadata
|
||||
* @param path path
|
||||
* @param nodeType node type
|
||||
* @param nameSpace namespace node
|
||||
* @param data data to store
|
||||
* Create a new Node from form metadata.
|
||||
* @param path Path to the node
|
||||
* @param nodeType Node type
|
||||
* @param name Node name
|
||||
* @param nameSpace Namespace for properties
|
||||
* @param data Property data to store in the node under namespace
|
||||
* @returns The created node
|
||||
*/
|
||||
public createNodeMetadata(nodeType: string, nameSpace: any, data: any, path: string, name?: string): Observable<any> {
|
||||
let properties = {};
|
||||
@ -56,10 +59,11 @@ export class NodeService {
|
||||
|
||||
/**
|
||||
* Create a new Node from form metadata
|
||||
* @param name path
|
||||
* @param nodeType node type
|
||||
* @param properties namespace node
|
||||
* @param path path
|
||||
* @param name Node name
|
||||
* @param nodeType Node type
|
||||
* @param properties Node body properties
|
||||
* @param path Path to the node
|
||||
* @returns The created node
|
||||
*/
|
||||
public createNode(name: string, nodeType: string, properties: any, path: string): Observable<any> {
|
||||
let body = {
|
||||
|
@ -19,6 +19,13 @@ import { QueryBody } from 'alfresco-js-api';
|
||||
|
||||
export interface SearchConfigurationInterface {
|
||||
|
||||
/**
|
||||
* Generates a QueryBody object with custom search parameters.
|
||||
* @param searchTerm Term text to search for
|
||||
* @param maxResults Maximum number of search results to show in a page
|
||||
* @param skipCount The offset of the start of the page within the results list
|
||||
* @returns Query body defined by the parameters
|
||||
*/
|
||||
generateQueryBody(searchTerm: string, maxResults: number, skipCount: number): QueryBody;
|
||||
|
||||
}
|
||||
|
@ -86,8 +86,9 @@ export class LoginComponent implements OnInit {
|
||||
@Input()
|
||||
copyrightText: string = '\u00A9 2016 Alfresco Software, Inc. All Rights Reserved.';
|
||||
|
||||
/** @deprecated 3.0.0 Possible valid values are ECM, BPM or ALL.
|
||||
* deprecated in 3.0.0 use the providers property in the the app.config.json
|
||||
/**
|
||||
* Possible valid values are ECM, BPM or ALL.
|
||||
* @deprecated 3.0.0 - use the providers property in the the app.config.json
|
||||
*/
|
||||
@Input()
|
||||
providers: string;
|
||||
@ -96,7 +97,10 @@ export class LoginComponent implements OnInit {
|
||||
@Input()
|
||||
fieldsValidation: any;
|
||||
|
||||
/** @depreated 3.0.0 Prevents the CSRF Token from being submitted. Only valid for Alfresco Process Services. */
|
||||
/**
|
||||
* Prevents the CSRF Token from being submitted. Only valid for Alfresco Process Services.
|
||||
* @deprecated 3.0.0
|
||||
*/
|
||||
@Input()
|
||||
disableCsrf: boolean;
|
||||
|
||||
|
@ -53,18 +53,34 @@ export class AuthenticationService {
|
||||
return this.alfrescoApi.getInstance().isLoggedIn();
|
||||
}
|
||||
|
||||
/**
|
||||
* Does the provider support OAuth?
|
||||
* @returns True if supported, false otherwise
|
||||
*/
|
||||
isOauth(): boolean {
|
||||
return this.alfrescoApi.getInstance().isOauthConfiguration();
|
||||
}
|
||||
|
||||
/**
|
||||
* Does the provider support ECM?
|
||||
* @returns True if supported, false otherwise
|
||||
*/
|
||||
isECMProvider(): boolean {
|
||||
return this.alfrescoApi.getInstance().isEcmConfiguration();
|
||||
}
|
||||
|
||||
/**
|
||||
* Does the provider support BPM?
|
||||
* @returns True if supported, false otherwise
|
||||
*/
|
||||
isBPMProvider(): boolean {
|
||||
return this.alfrescoApi.getInstance().isBpmConfiguration();
|
||||
}
|
||||
|
||||
/**
|
||||
* Does the provider support both ECM and BPM?
|
||||
* @returns True if both are supported, false otherwise
|
||||
*/
|
||||
isALLProvider(): boolean {
|
||||
return this.alfrescoApi.getInstance().isEcmBpmConfiguration();
|
||||
}
|
||||
@ -137,9 +153,6 @@ export class AuthenticationService {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private callApiLogout(): Promise<any> {
|
||||
if (this.alfrescoApi.getInstance()) {
|
||||
return this.alfrescoApi.getInstance().logout();
|
||||
@ -233,6 +246,10 @@ export class AuthenticationService {
|
||||
return this.hasValidRedirection(provider) ? this.redirectUrl.url : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets information about the user currently logged into APS.
|
||||
* @returns User information
|
||||
*/
|
||||
getBpmLoggedUser(): Observable<UserRepresentation> {
|
||||
return from(this.alfrescoApi.getInstance().activiti.profileApi.getProfile());
|
||||
}
|
||||
|
@ -25,6 +25,13 @@ export class SearchConfigurationService implements SearchConfigurationInterface
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a QueryBody object with custom search parameters.
|
||||
* @param searchTerm Term text to search for
|
||||
* @param maxResults Maximum number of search results to show in a page
|
||||
* @param skipCount The offset of the start of the page within the results list
|
||||
* @returns Query body defined by the parameters
|
||||
*/
|
||||
public generateQueryBody(searchTerm: string, maxResults: number, skipCount: number): QueryBody {
|
||||
let defaultQueryBody: QueryBody = {
|
||||
query: {
|
||||
|
@ -35,6 +35,10 @@ export class HostSettingsComponent implements OnInit {
|
||||
|
||||
HOST_REGEX: string = '^(http|https):\/\/.*[^/]$';
|
||||
|
||||
/**
|
||||
* Tells the component which provider options are available. Possible valid values
|
||||
* are "ECM" (Content), "BPM" (Process) , "ALL" (Content and Process), 'OAUTH2' SSO.
|
||||
*/
|
||||
@Input()
|
||||
providers: string[] = ['BPM', 'ECM', 'ALL'];
|
||||
|
||||
@ -52,9 +56,11 @@ export class HostSettingsComponent implements OnInit {
|
||||
@Output()
|
||||
ecmHostChange = new EventEmitter<string>();
|
||||
|
||||
/** Emitted when the user cancels the changes. */
|
||||
@Output()
|
||||
cancel = new EventEmitter<boolean>();
|
||||
|
||||
/** Emitted when the changes are successfully applied. */
|
||||
@Output()
|
||||
success = new EventEmitter<boolean>();
|
||||
|
||||
|
@ -27,12 +27,15 @@ import { Component, ChangeDetectionStrategy, ViewEncapsulation, Input } from '@a
|
||||
})
|
||||
export class EmptyContentComponent {
|
||||
|
||||
/** Material Icon to use. */
|
||||
@Input()
|
||||
icon = 'cake';
|
||||
|
||||
/** String or Resource Key for the title. */
|
||||
@Input()
|
||||
title = '';
|
||||
|
||||
/** String or Resource Key for the subtitle. */
|
||||
@Input()
|
||||
subtitle = '';
|
||||
|
||||
|
@ -36,12 +36,15 @@ import { TranslationService } from '../../services/translation.service';
|
||||
})
|
||||
export class ErrorContentComponent implements OnInit, AfterContentChecked {
|
||||
|
||||
/** Target URL for the secondary button. */
|
||||
@Input()
|
||||
secondaryButtonUrl: string = 'report-issue';
|
||||
|
||||
/** Target URL for the return button. */
|
||||
@Input()
|
||||
returnButtonUrl: string = '/';
|
||||
|
||||
/** Error code associated with this error. */
|
||||
@Input()
|
||||
errorCode: string;
|
||||
|
||||
|
@ -127,7 +127,7 @@ function makeToc(tree) {
|
||||
headings.forEach(heading => {
|
||||
var linkTitle = "";
|
||||
|
||||
if (!((heading.item.children[0].type === "text") && (heading.item.children[0].value === "Contents"))) {
|
||||
if (!((heading.item.children.length > 0) && (heading.item.children[0].type === "text") && (heading.item.children[0].value === "Contents"))) {
|
||||
linkTitle = tostring(heading.item).trim();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user