mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-1586] Added Core services docs (#2629)
This commit is contained in:
@@ -57,14 +57,6 @@ for more information about installing and using the source code.
|
|||||||
### Services
|
### Services
|
||||||
|
|
||||||
- [*Analytics service](../ng2-components/ng2-activiti-analytics/src/services/analytics.service.ts)
|
- [*Analytics service](../ng2-components/ng2-activiti-analytics/src/services/analytics.service.ts)
|
||||||
|
|
||||||
### Widgets
|
|
||||||
|
|
||||||
- [*Checkbox widget](../ng2-components/ng2-activiti-analytics/src/components/widgets/checkbox/checkbox.widget.ts)
|
|
||||||
- [*Date range widget](../ng2-components/ng2-activiti-analytics/src/components/widgets/date-range/date-range.widget.ts)
|
|
||||||
- [*Dropdown widget](../ng2-components/ng2-activiti-analytics/src/components/widgets/dropdown/dropdown.widget.ts)
|
|
||||||
- [*Duration widget](../ng2-components/ng2-activiti-analytics/src/components/widgets/duration/duration.widget.ts)
|
|
||||||
- [*Number widget](../ng2-components/ng2-activiti-analytics/src/components/widgets/number/number.widget.ts)
|
|
||||||
<!-- ng2-activiti-analytics end -->
|
<!-- ng2-activiti-analytics end -->
|
||||||
|
|
||||||
[(Back to Contents)](#contents)
|
[(Back to Contents)](#contents)
|
||||||
@@ -120,26 +112,6 @@ for more information about installing and using the source code.
|
|||||||
### Widgets
|
### Widgets
|
||||||
|
|
||||||
- [Content widget](content.widget.md)
|
- [Content widget](content.widget.md)
|
||||||
- [*Amount widget](../ng2-components/ng2-activiti-form/src/components/widgets/amount/amount.widget.ts)
|
|
||||||
- [*Attach widget](../ng2-components/ng2-activiti-form/src/components/widgets/attach/attach.widget.ts)
|
|
||||||
- [*Checkbox widget](../ng2-components/ng2-activiti-form/src/components/widgets/checkbox/checkbox.widget.ts)
|
|
||||||
- [*Container widget](../ng2-components/ng2-activiti-form/src/components/widgets/container/container.widget.ts)
|
|
||||||
- [*Date widget](../ng2-components/ng2-activiti-form/src/components/widgets/date/date.widget.ts)
|
|
||||||
- [*Display text widget](../ng2-components/ng2-activiti-form/src/components/widgets/display-text/display-text.widget.ts)
|
|
||||||
- [*Document widget](../ng2-components/ng2-activiti-form/src/components/widgets/document/document.widget.ts)
|
|
||||||
- [*Dropdown widget](../ng2-components/ng2-activiti-form/src/components/widgets/dropdown/dropdown.widget.ts)
|
|
||||||
- [*Dynamic table widget](../ng2-components/ng2-activiti-form/src/components/widgets/dynamic-table/dynamic-table.widget.ts)
|
|
||||||
- [*Functional group widget](../ng2-components/ng2-activiti-form/src/components/widgets/functional-group/functional-group.widget.ts)
|
|
||||||
- [*Hyperlink widget](../ng2-components/ng2-activiti-form/src/components/widgets/hyperlink/hyperlink.widget.ts)
|
|
||||||
- [*Multiline text widget](../ng2-components/ng2-activiti-form/src/components/widgets/multiline-text/multiline-text.widget.ts)
|
|
||||||
- [*Number widget](../ng2-components/ng2-activiti-form/src/components/widgets/number/number.widget.ts)
|
|
||||||
- [*People widget](../ng2-components/ng2-activiti-form/src/components/widgets/people/people.widget.ts)
|
|
||||||
- [*Radio buttons widget](../ng2-components/ng2-activiti-form/src/components/widgets/radio-buttons/radio-buttons.widget.ts)
|
|
||||||
- [*Tabs widget](../ng2-components/ng2-activiti-form/src/components/widgets/tabs/tabs.widget.ts)
|
|
||||||
- [*Text widget](../ng2-components/ng2-activiti-form/src/components/widgets/text/text.widget.ts)
|
|
||||||
- [*Typeahead widget](../ng2-components/ng2-activiti-form/src/components/widgets/typeahead/typeahead.widget.ts)
|
|
||||||
- [*Unknown widget](../ng2-components/ng2-activiti-form/src/components/widgets/unknown/unknown.widget.ts)
|
|
||||||
- [*Upload widget](../ng2-components/ng2-activiti-form/src/components/widgets/upload/upload.widget.ts)
|
|
||||||
<!-- ng2-activiti-form end -->
|
<!-- ng2-activiti-form end -->
|
||||||
|
|
||||||
### Other classes and interfaces
|
### Other classes and interfaces
|
||||||
@@ -276,6 +248,7 @@ for more information about installing and using the source code.
|
|||||||
### Services
|
### Services
|
||||||
|
|
||||||
- [Alfresco api service](alfresco-api.service.md)
|
- [Alfresco api service](alfresco-api.service.md)
|
||||||
|
- [Alfresco content service](alfresco-content.service.md)
|
||||||
- [App config service](app-config.service.md)
|
- [App config service](app-config.service.md)
|
||||||
- [Apps process service](apps-process.service.md)
|
- [Apps process service](apps-process.service.md)
|
||||||
- [Auth guard bpm service](auth-guard-bpm.service.md)
|
- [Auth guard bpm service](auth-guard-bpm.service.md)
|
||||||
@@ -284,9 +257,11 @@ for more information about installing and using the source code.
|
|||||||
- [Authentication service](authentication.service.md)
|
- [Authentication service](authentication.service.md)
|
||||||
- [Card view update service](card-view-update.service.md)
|
- [Card view update service](card-view-update.service.md)
|
||||||
- [Comment process service](comment-process.service.md)
|
- [Comment process service](comment-process.service.md)
|
||||||
|
- [Content service](content.service.md)
|
||||||
- [Cookie service](cookie.service.md)
|
- [Cookie service](cookie.service.md)
|
||||||
- [Deleted nodes api service](deleted-nodes-api.service.md)
|
- [Deleted nodes api service](deleted-nodes-api.service.md)
|
||||||
- [Discovery api service](discovery-api.service.md)
|
- [Discovery api service](discovery-api.service.md)
|
||||||
|
- [Favorites api service](favorites-api.service.md)
|
||||||
- [Highlight transform service](highlight-transform.service.md)
|
- [Highlight transform service](highlight-transform.service.md)
|
||||||
- [Log service](log.service.md)
|
- [Log service](log.service.md)
|
||||||
- [Nodes api service](nodes-api.service.md)
|
- [Nodes api service](nodes-api.service.md)
|
||||||
@@ -295,19 +270,14 @@ for more information about installing and using the source code.
|
|||||||
- [People content service](people-content.service.md)
|
- [People content service](people-content.service.md)
|
||||||
- [People process service](people-process.service.md)
|
- [People process service](people-process.service.md)
|
||||||
- [Renditions service](renditions.service.md)
|
- [Renditions service](renditions.service.md)
|
||||||
|
- [Search api service](search-api.service.md)
|
||||||
|
- [Shared links api service](shared-links-api.service.md)
|
||||||
- [Sites api service](sites-api.service.md)
|
- [Sites api service](sites-api.service.md)
|
||||||
- [Storage service](storage.service.md)
|
- [Storage service](storage.service.md)
|
||||||
- [Thumbnail service](thumbnail.service.md)
|
- [Thumbnail service](thumbnail.service.md)
|
||||||
- [Translation service](translation.service.md)
|
- [Translation service](translation.service.md)
|
||||||
- [Upload service](upload.service.md)
|
- [Upload service](upload.service.md)
|
||||||
- [User preferences service](user-preferences.service.md)
|
- [User preferences service](user-preferences.service.md)
|
||||||
- [*Alfresco content service](../ng2-components/ng2-alfresco-core/src/services/alfresco-content.service.ts)
|
|
||||||
- [*Content service](../ng2-components/ng2-alfresco-core/src/services/content.service.ts)
|
|
||||||
- [*Favorites api service](../ng2-components/ng2-alfresco-core/src/services/favorites-api.service.ts)
|
|
||||||
- [*Search api service](../ng2-components/ng2-alfresco-core/src/services/search-api.service.ts)
|
|
||||||
- [*Search service](../ng2-components/ng2-alfresco-core/src/services/search.service.ts)
|
|
||||||
- [*Shared links api service](../ng2-components/ng2-alfresco-core/src/services/shared-links-api.service.ts)
|
|
||||||
- [*Translate loader service](../ng2-components/ng2-alfresco-core/src/services/translate-loader.service.ts)
|
|
||||||
<!-- ng2-alfresco-core end -->
|
<!-- ng2-alfresco-core end -->
|
||||||
|
|
||||||
[(Back to Contents)](#contents)
|
[(Back to Contents)](#contents)
|
||||||
@@ -502,19 +472,6 @@ for more information about installing and using the source code.
|
|||||||
### Components
|
### Components
|
||||||
|
|
||||||
- [Viewer component](viewer.component.md)
|
- [Viewer component](viewer.component.md)
|
||||||
- [*ImgViewer component](../ng2-components/ng2-alfresco-viewer/src/components/imgViewer.component.ts)
|
|
||||||
- [*MediaPlayer component](../ng2-components/ng2-alfresco-viewer/src/components/mediaPlayer.component.ts)
|
|
||||||
- [*PdfViewer component](../ng2-components/ng2-alfresco-viewer/src/components/pdfViewer.component.ts)
|
|
||||||
- [*TxtViewer component](../ng2-components/ng2-alfresco-viewer/src/components/txtViewer.component.ts)
|
|
||||||
- [*Unknown format component](../ng2-components/ng2-alfresco-viewer/src/components/unknown-format/unknown-format.component.ts)
|
|
||||||
- [*Viewer more actions component](../ng2-components/ng2-alfresco-viewer/src/components/viewer-more-actions.component.ts)
|
|
||||||
- [*Viewer open with component](../ng2-components/ng2-alfresco-viewer/src/components/viewer-open-with.component.ts)
|
|
||||||
- [*Viewer sidebar component](../ng2-components/ng2-alfresco-viewer/src/components/viewer-sidebar.component.ts)
|
|
||||||
- [*Viewer toolbar component](../ng2-components/ng2-alfresco-viewer/src/components/viewer-toolbar.component.ts)
|
|
||||||
|
|
||||||
### Directives
|
|
||||||
|
|
||||||
- [*Viewer extension directive](../ng2-components/ng2-alfresco-viewer/src/directives/viewer-extension.directive.ts)
|
|
||||||
<!-- ng2-alfresco-viewer end -->
|
<!-- ng2-alfresco-viewer end -->
|
||||||
|
|
||||||
[(Back to Contents)](#contents)
|
[(Back to Contents)](#contents)
|
||||||
|
53
docs/alfresco-content.service.md
Normal file
53
docs/alfresco-content.service.md
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
# Alfresco Content service
|
||||||
|
|
||||||
|
Gets URLs and access info and creates folders in Content Services.
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
`getDocumentThumbnailUrl(nodeId: any, attachment?: boolean, ticket?: string): string`<br/>
|
||||||
|
Gets a thumbnail URL for a node.
|
||||||
|
|
||||||
|
`getContentUrl(nodeId: any, attachment?: boolean, ticket?: string): string`<br/>
|
||||||
|
Gets the URL for a node's content.
|
||||||
|
|
||||||
|
`getNodeContent(nodeId: string): Observable<any>`<br/>
|
||||||
|
Gets a node's content.
|
||||||
|
|
||||||
|
`createFolder(relativePath: string, name: string, parentId?: string): Observable<FolderCreatedEvent>`<br/>
|
||||||
|
Creates a folder.
|
||||||
|
|
||||||
|
`hasPermission(node: any, permission: PermissionsEnum|string): boolean`<br/>
|
||||||
|
Checks if the user has the specified permissions for `node`.
|
||||||
|
|
||||||
|
`hasAllowableOperations(node: any): boolean `<br/>
|
||||||
|
Checks if the the node has the `allowableOperations` property.
|
||||||
|
|
||||||
|
## Details
|
||||||
|
|
||||||
|
The methods that take a `node` parameter can receive the node as either a node ID string
|
||||||
|
or as a [MinimalNode](document-library.model.md) object. You can obtain the `ticket` string,
|
||||||
|
if you need it, from the [Authentication service](authentication.service.md). If
|
||||||
|
`attachment` is false then the content can be viewed in the browser but not downloaded; the
|
||||||
|
default value of true allows a download to take place.
|
||||||
|
|
||||||
|
The `createFolder` method adds a folder with a given `name` within the folder at `parentId`,
|
||||||
|
if supplied. You can use the well-known names "-my-" , "-shared-" or "-root-" as the `parentId`.
|
||||||
|
The `relativePath` will create a sequence of folders within `parentId` with `name` as the last
|
||||||
|
element but you can use an empty string to make the folder a direct child of `parentId`.
|
||||||
|
|
||||||
|
The `hasPermission` method reports whether the node has the specified permission. (The
|
||||||
|
[Permissions](https://github.com/Alfresco/alfresco-ng2-components/blob/development/ng2-components/ng2-alfresco-core/src/models/permissions.enum.ts)
|
||||||
|
enum contains the values `DELETE`, `UPDATE`, `CREATE`, `UPDATEPERMISSIONS`, `NOT_DELETE`,
|
||||||
|
`NOT_UPDATE`, `NOT_CREATE` and `NOT_UPDATEPERMISSIONS`.
|
||||||
|
|
||||||
|
See the
|
||||||
|
[Alfresco JS API](https://github.com/Alfresco/alfresco-js-api/tree/master/src/alfresco-core-rest-api)
|
||||||
|
for more information about the low-level REST API that these methods are based on.
|
||||||
|
|
||||||
|
<!-- Don't edit the See also section. Edit seeAlsoGraph.json and run config/generateSeeAlso.js -->
|
||||||
|
<!-- seealso start -->
|
||||||
|
|
||||||
|
<!-- seealso end -->
|
||||||
|
|
||||||
|
|
||||||
|
|
59
docs/content.service.md
Normal file
59
docs/content.service.md
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
# Content service
|
||||||
|
|
||||||
|
Accesses app-generated data objects via URLs and file downloads.
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
`downloadBlob(blob: Blob, fileName: string): void`<br/>
|
||||||
|
Starts downloading the data in `blob` to a named file.
|
||||||
|
|
||||||
|
`downloadData(data: any, fileName: string): void`<br/>
|
||||||
|
Starts downloading a data object to a named file.
|
||||||
|
|
||||||
|
`downloadJSON(json: any, fileName): void`<br/>
|
||||||
|
Starts downloading of JSON data to a named file.
|
||||||
|
|
||||||
|
`createTrustedUrl(blob: Blob): string`<br/>
|
||||||
|
Creates a trusted URL to access the data in `blob`.
|
||||||
|
|
||||||
|
## Details
|
||||||
|
|
||||||
|
Use the Content service to deliver data to the user from `Blob` objects.
|
||||||
|
|
||||||
|
The [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) class
|
||||||
|
(implemented in the browser, not ADF) represents an array of bytes that you can
|
||||||
|
use to construct and store data in any binary format you choose.
|
||||||
|
The user can access a Blob either by downloading the byte array as a file or in
|
||||||
|
some cases by viewing it directly in the browser via a special URL that references
|
||||||
|
the Blob. For example, you could use the Blob interface to construct an image in the
|
||||||
|
[PNG format](https://en.wikipedia.org/wiki/Portable_Network_Graphics). Since
|
||||||
|
PNG is a format the browser can display, you could use the Blob's URL in an
|
||||||
|
<img> element to view the image within the page. Alternatively, you could let
|
||||||
|
the user download it as a PNG file.
|
||||||
|
|
||||||
|
The `downloadBlob` method starts a download of the Blob data to the `filename`
|
||||||
|
within the user's downloads folder. The other `downloadXXX` methods do the same
|
||||||
|
but first convert the supplied data to a Blob before downloading; see the
|
||||||
|
[Blob reference page](https://developer.mozilla.org/en-US/docs/Web/API/Blob)
|
||||||
|
for details of how a Blob's contents are assembled from the constructor arguments.
|
||||||
|
|
||||||
|
Use `createdTrustedUrl` to generate a URL string for a Blob. The URL refers to
|
||||||
|
the Blob as though it were a file but it is actually an object stored in memory,
|
||||||
|
so it does not persist across browser sessions. This URL can be used much like any
|
||||||
|
other, so you could use it for the `src` attribute of an <img> element or the
|
||||||
|
`href` of a download link. Note that while the URL is 'trusted', the data it contains
|
||||||
|
is not necessarily trustworthy unless you can vouch for it yourself; be careful that
|
||||||
|
the data doesn't expose your app to
|
||||||
|
[Cross Site Scripting](https://en.wikipedia.org/wiki/Cross-site_scripting)
|
||||||
|
attacks.
|
||||||
|
|
||||||
|
<!-- Don't edit the See also section. Edit seeAlsoGraph.json and run config/generateSeeAlso.js -->
|
||||||
|
<!-- seealso start -->
|
||||||
|
## See also
|
||||||
|
|
||||||
|
- [Cookie service](cookie.service.md)
|
||||||
|
- [Storage service](storage.service.md)
|
||||||
|
<!-- seealso end -->
|
||||||
|
|
||||||
|
|
||||||
|
|
@@ -25,5 +25,6 @@ beyond this size.
|
|||||||
<!-- seealso start -->
|
<!-- seealso start -->
|
||||||
## See also
|
## See also
|
||||||
|
|
||||||
|
- [Content service](content.service.md)
|
||||||
- [Storage service](storage.service.md)
|
- [Storage service](storage.service.md)
|
||||||
<!-- seealso end -->
|
<!-- seealso end -->
|
27
docs/favorites-api.service.md
Normal file
27
docs/favorites-api.service.md
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
# Favorites Api service
|
||||||
|
|
||||||
|
Gets a list of items a user has marked as their favorites.
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
`getFavorites(personId: string, options?: any): Observable<NodePaging>`<br/>
|
||||||
|
Gets the favorites for a user.
|
||||||
|
|
||||||
|
## Details
|
||||||
|
|
||||||
|
Process Services allows users to mark items as "favorites". These are typically
|
||||||
|
items that are important or frequently used.
|
||||||
|
|
||||||
|
Use `getFavorites` to find a user's favorite items. You could use this, for example,
|
||||||
|
to create a menu for the user to access their favorites quickly rather than by
|
||||||
|
navigating or searching. Using "-me-" for the `personId` indicates that the target
|
||||||
|
person is the currently logged-in user.
|
||||||
|
|
||||||
|
You can specify a number of `options` to modify the search further. See the
|
||||||
|
[Alfresco JS API page](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/FavoritesApi.md#getfavorites)
|
||||||
|
for `getFavorites` for more information.
|
||||||
|
|
||||||
|
<!-- Don't edit the See also section. Edit seeAlsoGraph.json and run config/generateSeeAlso.js -->
|
||||||
|
<!-- seealso start -->
|
||||||
|
|
||||||
|
<!-- seealso end -->
|
19
docs/search-api.service.md
Normal file
19
docs/search-api.service.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# Search Api service
|
||||||
|
|
||||||
|
Accesses the Content Services Search API.
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
`search(query: any): Observable<NodePaging>`<br/>
|
||||||
|
Searches the repository.
|
||||||
|
|
||||||
|
## Details
|
||||||
|
|
||||||
|
See the
|
||||||
|
[Alfresco JS API](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-search-rest-api/docs/SearchApi.md#search)
|
||||||
|
for the format of the query and returned data.
|
||||||
|
|
||||||
|
<!-- Don't edit the See also section. Edit seeAlsoGraph.json and run config/generateSeeAlso.js -->
|
||||||
|
<!-- seealso start -->
|
||||||
|
|
||||||
|
<!-- seealso end -->
|
@@ -23,9 +23,9 @@
|
|||||||
"comment-process.model": [],
|
"comment-process.model": [],
|
||||||
"comment-process.service": ["comment-process.model"],
|
"comment-process.service": ["comment-process.model"],
|
||||||
"content-action.component": ["document-list.component", "document-actions.service", "folder-actions.service"],
|
"content-action.component": ["document-list.component", "document-actions.service", "folder-actions.service"],
|
||||||
"content.widget": [],
|
"content.service": ["cookie.service", "storage.service"],
|
||||||
"context-menu.directive": [],
|
"context-menu.directive": [],
|
||||||
"cookie.service": [],
|
"cookie.service": ["content.service"],
|
||||||
"create-process-attachment.component": [],
|
"create-process-attachment.component": [],
|
||||||
"create-task-attachment.component": [],
|
"create-task-attachment.component": [],
|
||||||
"data-column.component": ["document-list.component", "datatable.component", "task-list.component"],
|
"data-column.component": ["document-list.component", "datatable.component", "task-list.component"],
|
||||||
|
25
docs/shared-links-api.service.md
Normal file
25
docs/shared-links-api.service.md
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# Shared Links Api service
|
||||||
|
|
||||||
|
Finds shared links to Content Services items.
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
`getSharedLinks(options: any = {}): Observable<NodePaging>`<br/>
|
||||||
|
Gets shared links available to the current user.
|
||||||
|
|
||||||
|
## Details
|
||||||
|
|
||||||
|
Content Services allows users to generate URLs that can be shared with
|
||||||
|
other people, even if they don't have a Content Services account. These
|
||||||
|
URLs are known as *shared links*.
|
||||||
|
|
||||||
|
Use `getSharedLinks` to find all the shared links that are available to
|
||||||
|
the current user. You can supply a number of `options` to refine the
|
||||||
|
search; see the
|
||||||
|
[Alfresco JS API](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SharedlinksApi.md#findsharedlinks)
|
||||||
|
for more information.
|
||||||
|
|
||||||
|
<!-- Don't edit the See also section. Edit seeAlsoGraph.json and run config/generateSeeAlso.js -->
|
||||||
|
<!-- seealso start -->
|
||||||
|
|
||||||
|
<!-- seealso end -->
|
@@ -37,4 +37,5 @@ used instead.
|
|||||||
## See also
|
## See also
|
||||||
|
|
||||||
- [Cookie service](cookie.service.md)
|
- [Cookie service](cookie.service.md)
|
||||||
|
- [Content service](content.service.md)
|
||||||
<!-- seealso end -->
|
<!-- seealso end -->
|
@@ -11,11 +11,17 @@
|
|||||||
"loading-template",
|
"loading-template",
|
||||||
"no-content-template",
|
"no-content-template",
|
||||||
"card-view-content-proxy",
|
"card-view-content-proxy",
|
||||||
"login-footer.directive",
|
"login-footer\\.directive",
|
||||||
"login-header.directive",
|
"login-header\\.directive",
|
||||||
"no-task-detail-template",
|
"no-task-detail-template",
|
||||||
"diagram",
|
"diagram",
|
||||||
"raphael",
|
"raphael",
|
||||||
"context-menu",
|
"context-menu",
|
||||||
"alfresco-settings"
|
"alfresco-settings",
|
||||||
|
"\\.widget",
|
||||||
|
"[vV]iewer",
|
||||||
|
"translate-loader",
|
||||||
|
"search\\.service",
|
||||||
|
"mediaPlayer",
|
||||||
|
"unknown-format"
|
||||||
]
|
]
|
Reference in New Issue
Block a user