From 3b15bde49b0193336657865241380b908aeb6547 Mon Sep 17 00:00:00 2001 From: Andy Stark <30621568+therealandeeee@users.noreply.github.com> Date: Wed, 8 Nov 2017 10:25:37 +0000 Subject: [PATCH] [ADF-1586] Added docs for services (#2619) * [ADF-1586] Added docs for services * [ADF-1586] Removed model definitions from docs --- docs/README.md | 18 +++++++++----- docs/bpm-user.model.md | 24 ++++++++++++++++++ docs/bpm-user.service.md | 30 +++++++++++++++++++++++ docs/ecm-user.model.md | 24 ++++++++++++++++++ docs/ecm-user.service.md | 33 +++++++++++++++++++++++++ docs/people-content.service.md | 30 +++++++++++++++++++++++ docs/people-process.service.md | 45 ++++++++++++++++++++++++++++++++++ docs/seeAlsoGraph.json | 7 ++++++ docs/user-process.model.md | 21 ++++++++++++++++ 9 files changed, 226 insertions(+), 6 deletions(-) create mode 100644 docs/bpm-user.model.md create mode 100644 docs/bpm-user.service.md create mode 100644 docs/ecm-user.model.md create mode 100644 docs/ecm-user.service.md create mode 100644 docs/people-content.service.md create mode 100644 docs/people-process.service.md create mode 100644 docs/user-process.model.md diff --git a/docs/README.md b/docs/README.md index a1bf0282c8..13e1644e27 100644 --- a/docs/README.md +++ b/docs/README.md @@ -247,6 +247,8 @@ for more information about installing and using the source code. ### Directives - [Context menu directive](context-menu.directive.md) +- [Folder create directive](folder-create.directive.md) +- [Folder edit directive](folder-edit.directive.md) - [Highlight directive](highlight.directive.md) - [Logout directive](logout.directive.md) - [Node delete directive](node-delete.directive.md) @@ -254,14 +256,13 @@ for more information about installing and using the source code. - [Node permission directive](node-permission.directive.md) - [Node restore directive](node-restore.directive.md) - [Upload directive](upload.directive.md) -- [Folder create directive](folder-create.directive.md) -- [Folder edit directive](folder-edit.directive.md) ### Models - [Comment process model](comment-process.model.md) - [Product version model](product-version.model.md) - [Site model](site.model.md) +- [User process model](user-process.model.md) ### Pipes @@ -288,6 +289,8 @@ for more information about installing and using the source code. - [Nodes api service](nodes-api.service.md) - [Notification service](notification.service.md) - [Page title service](page-title.service.md) +- [People content service](people-content.service.md) +- [People process service](people-process.service.md) - [Renditions service](renditions.service.md) - [Sites api service](sites-api.service.md) - [Storage service](storage.service.md) @@ -301,8 +304,6 @@ for more information about installing and using the source code. - [*Auth guard service](../ng2-components/ng2-alfresco-core/src/services/auth-guard.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) -- [*People content service](../ng2-components/ng2-alfresco-core/src/services/people-content.service.ts) -- [*People process service](../ng2-components/ng2-alfresco-core/src/services/people-process.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) @@ -470,10 +471,15 @@ for more information about installing and using the source code. - [User info component](user-info.component.md) +### Models + +- [Bpm user model](bpm-user.model.md) +- [Ecm user model](ecm-user.model.md) + ### Services -- [*Bpm user service](../ng2-components/ng2-alfresco-userinfo/src/services/bpm-user.service.ts) -- [*Ecm user service](../ng2-components/ng2-alfresco-userinfo/src/services/ecm-user.service.ts) +- [Bpm user service](bpm-user.service.md) +- [Ecm user service](ecm-user.service.md) [(Back to Contents)](#contents) diff --git a/docs/bpm-user.model.md b/docs/bpm-user.model.md new file mode 100644 index 0000000000..2acc6f123d --- /dev/null +++ b/docs/bpm-user.model.md @@ -0,0 +1,24 @@ +# Bpm User model + +Contains information about a Process Services user. + +## Details + +Instances of this class are returned by the methods of the +[Bpm User service](bpm-user.service.md). It implements the +`UserRepresentation` interface, which is defined in the +[Alfresco JS API]h(ttps://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/UserRepresentation.md). + +Note that the Typescript class for this model is in active development; +it is likely to change and so its properties are not listed here. For the +latest version of the class, see the +[source file](https://github.com/Alfresco/alfresco-ng2-components/blob/development/ng2-components/ng2-alfresco-userinfo/src/models/bpm-user.model.ts). + + + +## See also + +- [Bpm user service](bpm-user.service.md) +- [Ecm user model](ecm-user.model.md) +- [People process service](people-process.service.md) + \ No newline at end of file diff --git a/docs/bpm-user.service.md b/docs/bpm-user.service.md new file mode 100644 index 0000000000..d5d551f6fd --- /dev/null +++ b/docs/bpm-user.service.md @@ -0,0 +1,30 @@ +# Bpm User service + +Gets information about the current Process Services user. + +## Methods + +`getCurrentUserInfo(): Observable`
+Gets information about the current user. + +`getCurrentUserProfileImage(): string`
+Returns the current user's profile image as a URL. + +## Details + +The class returned by `getCurrentUserInfo` is detailed +in the [Bpm User model docs](bpm-user.model.md). + +See the +[getProfile](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/ProfileApi.md#getProfile) +and +[getProfilePictureUrl](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/ProfileApi.md#getProfilePictureUrl) +methods in the Alfresco JS API for more information about the REST calls used by this service. + + + +## See also + +- [Ecm user service](ecm-user.service.md) +- [Bpm user model](bpm-user.model.md) + \ No newline at end of file diff --git a/docs/ecm-user.model.md b/docs/ecm-user.model.md new file mode 100644 index 0000000000..263376dabf --- /dev/null +++ b/docs/ecm-user.model.md @@ -0,0 +1,24 @@ +# Ecm User model + +Contains information about a Content Services user. + +## Details + +Instances of this class are returned by the methods of the +[Ecm User service](ecm-user.service.md). It implements the `Person` +interface, which is defined in the +[Alfresco JS API](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/Person.md). + +Note that the Typescript class for this model is in active development; +it is likely to change and so its properties are not listed here. For the +latest version of the class, see the +[source file](https://github.com/Alfresco/alfresco-ng2-components/blob/development/ng2-components/ng2-alfresco-userinfo/src/models/ecm-user.model.ts). + + + +## See also + +- [Ecm user service](ecm-user.service.md) +- [People content service](people-content.service.md) +- [Bpm user model](bpm-user.model.md) + \ No newline at end of file diff --git a/docs/ecm-user.service.md b/docs/ecm-user.service.md new file mode 100644 index 0000000000..9d12922459 --- /dev/null +++ b/docs/ecm-user.service.md @@ -0,0 +1,33 @@ +# Ecm User service + +Gets information about a Content Services user. + +## Methods + +`getUserInfo(userName: string): Observable`
+Gets information about a user identified by their username. + +`getCurrentUserInfo(): Observable`
+Gets information about the user who is currently logged-in. + +`getUserProfileImage(avatarId: string)`
+Returns a profile image as a URL. + +## Details + +The class returned by `getUserInfo` and `getCurrentUserInfo` is detailed +in the [Ecm User model docs](ecm-user.model.md). The `avatarId` passed to +`getUserProfileImage` is available as a field of the `EcmUserModel` instance +returned for a particular person. + +See the +[getPerson](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/PeopleApi.md#getPerson) +method in the Alfresco JS API for more information about the REST calls used by this service. + + + +## See also + +- [Bpm user service](bpm-user.service.md) +- [Ecm user model](ecm-user.model.md) + \ No newline at end of file diff --git a/docs/people-content.service.md b/docs/people-content.service.md new file mode 100644 index 0000000000..25e92ddbb6 --- /dev/null +++ b/docs/people-content.service.md @@ -0,0 +1,30 @@ +# People Content service + +Gets information about a Content Services user. + +## Methods + +`getPerson(personId: string): Observable`
+Gets information about a user identified by their username. + +`getCurrentPerson(): Observable`
+Gets information about the user who is currently logged-in. + +## Details + +The class returned by `getPerson` and `getCurrentPerson` is detailed +in the [Ecm User model docs](ecm-user.model.md). The `avatarId` passed to +`getUserProfileImage` is available as a field of the `EcmUserModel` instance +returned for a particular person. + +See the +[getPerson](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/PeopleApi.md#getPerson) +method in the Alfresco JS API for more information about the REST calls used by this service. + + + +## See also + +- [People process service](people-process.service.md) +- [Ecm user model](ecm-user.model.md) + \ No newline at end of file diff --git a/docs/people-process.service.md b/docs/people-process.service.md new file mode 100644 index 0000000000..4d78bfb4e8 --- /dev/null +++ b/docs/people-process.service.md @@ -0,0 +1,45 @@ +# People Process service + +Gets information about Process Services users. + +## Methods + +`getWorkflowUsers(taskId?: string, searchWord?: string): Observable`
+Gets information about users across all tasks. + +`getUserImage(user: UserProcessModel): string`
+Gets the profile picture URL for the specified user. + +`involveUserWithTask(taskId: string, idToInvolve: string): Observable`
+Sets a user to be involved with a task. + +`removeInvolvedUser(taskId: string, idToRemove: string): Observable`
+Removes a user who is currently involved with a task. + +## Details + +Use `getWorkflowUsers` to find users across all tasks, optionally filtering by the `searchWord` +in the task name. The `taskId` parameter, if used, specifies a task to be *excluded* from the +results. You would typically use this feature to find new users to assign to a task, in which +case you would want to exclude users already assigned to that task. + +The [User Process model](user-process.model.md) class used by the methods is seen throughout +ADF's Process Services features. Note that for `involveUserWithTask` and `removeInvolvedUser`, +null data is returned rather than usable details about users. + +You can find more information about the REST API methods used by this service in the +[Task Actions API](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/TaskActionsApi.md#involveUser) +(for `involveUserWithTask` and `removeInvolvedUser`), the +[User Workflow API](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/UsersWorkflowApi.md#getUsers) +(for `getWorkflowUsers`) and the +[User API](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/UserApi.md#getuserprofilepictureurl)(for `getUserImage`). + + + + +## See also + +- [User process model](user-process.model.md) +- [Bpm user model](bpm-user.model.md) +- [People content service](people-content.service.md) + \ No newline at end of file diff --git a/docs/seeAlsoGraph.json b/docs/seeAlsoGraph.json index aaca8166e1..e228092c34 100644 --- a/docs/seeAlsoGraph.json +++ b/docs/seeAlsoGraph.json @@ -11,6 +11,8 @@ "apps-process.service": ["filter.model"], "authentication.service": [], "breadcrumb.component": ["document-list.component"], + "bpm-user.model": ["bpm-user.service", "ecm-user.model", "people-process.service"], + "bpm-user.service": ["ecm-user.service"], "card-view.component": ["card-view-update.service"], "card-view-update.service": [], "checklist.component": [], @@ -44,6 +46,8 @@ "nodes-api.service" ], "dropdown-breadcrumb.component": ["document-list.component", "breadcrumb.component"], + "ecm-user.model": ["ecm-user.service", "people-content.service"], + "ecm-user.service": [], "extensibility": [], "file-uploading-dialog.component": [], "filter.model": ["process-filters.component", "task-filters.component"], @@ -78,6 +82,8 @@ "permissions-style.model": ["document-list.component"], "people-search.component": [], "people.component": [], + "people-content.service": ["people-process.service"], + "people-process.service": ["user-process.model"], "process-attachment-list.component": [], "process-audit.directive": [], "process-comments.component": [], @@ -121,6 +127,7 @@ "upload.service": [], "user-info.component": [], "user-preferences.service": [], + "user-process.model": [], "version-manager.component": ["version-list.component", "document-list.component"], "version-list.component": [], "viewer.component": [], diff --git a/docs/user-process.model.md b/docs/user-process.model.md new file mode 100644 index 0000000000..5b38f99ba5 --- /dev/null +++ b/docs/user-process.model.md @@ -0,0 +1,21 @@ +# User Process model + +Represents a Process Services user. + +## Details + +This class contains basic information about a Process Services user and +is used throughout ADF to identify and list users (eg, to assign them to +a task or to list them in search results). + +Note that the Typescript class for this model is in active development; +it is likely to change and so its properties are not listed here. For the +latest version of the class, see the +[source file](https://github.com/Alfresco/alfresco-ng2-components/blob/development/ng2-components/ng2-alfresco-core/src/models/user-process.model.ts). + + + +## See also + +- [People process service](people-process.service.md) + \ No newline at end of file