diff --git a/docs/README.md b/docs/README.md index dcee515231..addfc509c0 100644 --- a/docs/README.md +++ b/docs/README.md @@ -129,6 +129,7 @@ for more information about installing and using the source code. | [Page title service](page-title.service.md) | Sets the page title. | [Source](../lib/core/services/page-title.service.ts) | | [People content service](people-content.service.md) | Gets information about a Content Services user. | [Source](../lib/core/services/people-content.service.ts) | | [People process service](people-process.service.md) | Gets information about Process Services users. | [Source](../lib/core/services/people-process.service.ts) | +| [Renditions service](renditions.service.md) | Manages prearranged conversions of content to different formats. | [Source](../lib/core/services/renditions.service.ts) | | [Search configuration service](search-configuration.service.md) | Provides fine control of parameters to a search. | [Source](../lib/core/services/search-configuration.service.ts) | | [Shared links api service](shared-links-api.service.md) | Finds shared links to Content Services items. | [Source](../lib/core/services/shared-links-api.service.ts) | | [Sites service](sites.service.md) | Accesses and manipulates sites from a Content Services repository. | [Source](../lib/core/services/sites.service.ts) | @@ -139,7 +140,6 @@ for more information about installing and using the source code. | [User preferences service](user-preferences.service.md) | Stores preferences for components. | [Source](../lib/core/services/user-preferences.service.ts) | | [Bpm user service](bpm-user.service.md) | Gets information about the current Process Services user. | [Source](../lib/core/userinfo/services/bpm-user.service.ts) | | [Ecm user service](ecm-user.service.md) | Gets information about a Content Services user. | [Source](../lib/core/userinfo/services/ecm-user.service.ts) | -| _Renditions service_ | _Not currently documented_ | [Source](../lib/core/services/renditions.service.ts) | ## Widgets diff --git a/docs/renditions.service.md b/docs/renditions.service.md index bdca46654a..51e490a7ab 100644 --- a/docs/renditions.service.md +++ b/docs/renditions.service.md @@ -1,6 +1,40 @@ -# Renditions Service +# Renditions service -* getRenditionsListByNodeId(nodeId: string) -* createRendition(nodeId: string, encoding: string) -* getRendition(nodeId: string, encoding: string) -* isRenditionAvailable(nodeId: string, encoding: string) +Manages prearranged conversions of content to different formats. + +## Methods + +`isRenditionAvailable(nodeId: string, encoding: string): Observable`
+Has the specified rendition been set up for this item? + +`isConversionPossible(nodeId: string, encoding: string): Observable`
+Is it possible to convert this item to the specified format? + +`getRenditionUrl(nodeId: string, encoding: string): string`
+Gets a URL linking to a rendition. + +`getRenditionsListByNodeId(nodeId: string): Observable`
+Gets all available renditions for an item. + +`convert(nodeId: string, encoding: string, pollingInterval: number = 1000)`
+Performs a format conversion on an item directly. + +## Details + +ACS allows content items to be converted to other formats for display or delivery. +For example, a raw text file might be converted to HTML to enable better formatting +in a web browser or a PDF might be converted to an equivalent bitmap image. A +*rendition* is a prearranged conversion that is set up for an item for convenient +repeated use. More information about renditions is available in the +[Content Services documentation](https://docs.alfresco.com/5.2/references/dev-extension-points-content-transformer.html). + +In the Renditions service methods, the `nodeId` is a string identifying the content +node that the rendition applies to. This can be obtained from +[Document List component](document-list.component.md) events and various other places +in the ADF API. The `encoding` identifies the conversion performed by the rendition. + +See the +[Renditions API page](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/RenditionsApi.md#createRendition) +in the Alfresco JS API for more information about the +[RenditionPaging](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/RenditionPaging.md) +class and other implementation details.