alfresco-ng2-components/docs/core/services/renditions.service.md
Maurizio Vitale 1fa81962a0
👽 Angular 14 rebase 👽 (#7769)
* fix after rebase

* new release strategy for ng next

Signed-off-by: eromano <eugenioromano16@gmail.com>

* peer dep

Signed-off-by: eromano <eugenioromano16@gmail.com>

* Angular 14

fix unit test and storybook

Signed-off-by: eromano <eugenioromano16@gmail.com>

fix after rebase

Signed-off-by: eromano <eugenioromano16@gmail.com>

update pkg.json

Signed-off-by: eromano <eugenioromano16@gmail.com>

missing dep

Signed-off-by: eromano <eugenioromano16@gmail.com>

Fix mistake and missing code

Dream....build only affected libs

Add utility run commands

* Use nx command to run affected tests

* Fix nx test core

fix content tests

Run unit with watch false

core test fixes

reduce test warnings

Fix process cloud unit

Fix adf unit test

Fix lint process cloud

Disable lint next line

Use right core path

Fix insights unit

fix linting insights

Fix process-services unit

fix the extensions test report

fix test warnings

Fix content unit

Fix bunch of content unit

* Produce an adf alpha of 14

* hopefully fixing the content

* Push back the npm publish

* Remove flaky unit

* Fix linting

* Make the branch as root

* Get rid of angualar13

* Remove the travis depth

* Fixing version for npm

* Enabling cache for unit and build

* Fix scss for core and paths

Copy i18 and asset by using ng-packager

Export the theming alias and fix path

Use ng-package to copy assets process-services-cloud

Use ng-package to copy assets process-services

Use ng-package to copy assets content-services

Use ng-package to copy assets insights

* feat: fix api secondary entry point

* fix storybook rebase

* Move dist under dist/libs from lib/dist

* Fix the webstyle

* Use only necessary nrwl deps and improve lint

* Fix unit for libs

* Convert lint.sh to targets - improve performance

* Use latest of angular

* Align alfresco-js-api

Signed-off-by: eromano <eugenioromano16@gmail.com>
Co-authored-by: eromano <eugenioromano16@gmail.com>
Co-authored-by: Mikolaj Serwicki <mikolaj.serwicki@hyland.com>
Co-authored-by: Tomasz <tomasz.gnyp@hyland.com>
2022-08-25 10:50:30 +01:00

6.4 KiB

Title, Added, Status, Last reviewed
Title Added Status Last reviewed
Renditions service v2.0.0 Active 2019-01-23

Renditions service

Manages prearranged conversions of content to different formats.

Class members

Methods

  • convert(nodeId: string, encoding: string, pollingInterval: number = 1000, retries: number = 5): Observable<RenditionEntry>
    Repeatedly attempts to create a rendition, through to success or failure.
    • nodeId: string - ID of the target node
    • encoding: string - Name of the rendition encoding
    • pollingInterval: number - Time interval (in milliseconds) between checks for completion
    • retries: number - Number of attempts to make before declaring failure
    • Returns Observable<RenditionEntry> - True if the rendition was created, false otherwise
  • createRendition(nodeId: string, encoding: string): Observable<any>
    Creates a rendition for a node.
    • nodeId: string - ID of the target node
    • encoding: string - Name of the rendition encoding
    • Returns Observable<any> - Null response to indicate completion
  • generateRenditionForNode(nodeId: string): Observable<any>
    Generates a rendition for a node using the first available encoding.
    • nodeId: string - ID of the target node
    • Returns Observable<any> - Null response to indicate completion
  • getAvailableRenditionForNode(nodeId: string): Observable<RenditionEntry>
    Gets the first available rendition found for a node.
  • getRendition(nodeId: string, encoding: string): Observable<RenditionEntry>
    Gets information about a rendition of a node.
    • nodeId: string - ID of the target node
    • encoding: string - Name of the rendition encoding
    • Returns Observable<RenditionEntry> - Information object about the rendition
  • getRenditionUrl(nodeId: string, encoding: string): string
    Gets a URL linking to the specified rendition of a node.
    • nodeId: string - ID of the target node
    • encoding: string - Name of the rendition encoding
    • Returns string - URL string
  • getRenditionsListByNodeId(nodeId: string): Observable<RenditionPaging>
    Gets a list of all renditions for a node.
  • isConversionPossible(nodeId: string, encoding: string): Observable<boolean>
    Checks if the node can be converted using the specified rendition.
    • nodeId: string - ID of the target node
    • encoding: string - Name of the rendition encoding
    • Returns Observable<boolean> - True if the node can be converted, false otherwise
  • isRenditionAvailable(nodeId: string, encoding: string): Observable<boolean>
    Checks if the specified rendition is available for a node.
    • nodeId: string - ID of the target node
    • encoding: string - Name of the rendition encoding
    • Returns Observable<boolean> - True if the rendition is available, false otherwise

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.

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 events and various other places in the ADF API. The encoding identifies the conversion performed by the rendition.

See the Renditions API page in the Alfresco JS API for more information about the RenditionPaging class and other implementation details.