Page tree
Skip to end of metadata
Go to start of metadata

Introduction

Currently, the module-DAM (retrieving Assets based in providers) is only used by STK. The module-DAM-app-assets responsible to display the list of available asset, providinf sub app to create/update/delete asset's don't use the module-DAM, but perform direct access to JCR in order to handle Asset's. This is conceptually wrong!

The module-DAM-app-assets should/must used the module-DAM to get/create/modify/update an Asset.

Proposal

Use Assets (provided by the module-DAM) in the module-DAM-app-assets sub apps (dialogs) in order to create/update/delete Assets.

module-DAM

This app should open his API:

  • Create/update/delete an Asset.
  • Provide facilities/utilities to display preview.
  • Expose the provider list

module-DAM-app-assets

The sub apps should

  • Get an asset from DamAssetProvider and the only work with the Asset Pojo to set the asset properties (including the binary content).
  • On actions (create/delete/update), this should also be performed by the DamAssetProvider (He knows based on the provider defined how to perform action on the asset, create an internal asset, or link it to an external resource...).
  • ..

Implementation

module-DAM

On the current Dam class (should be renamed to DamManager) expose 3 new methods :

  • updateAsset(Asset asset): Asset
    Update the Asset. Throws Exception in case of exception or if the asset is not found.
  • createAsset(Asset asset, String folderPath): Asset
    Create the Asset. Throws Exception in case of exception

  • deleteAsset(Asset asset): Asset
    Delete the Asset. Throws Exception in case of exception

Modify

  • getAsset(String identifier): Asset
    Get the referred Asset if found or null if not found or in case of exception.

Update the Asset Interface in order to add setters.

  • Create all setters
  • Add a getIdentifier() on the asset fulfill with the JCR Identifier of the AssetNode
  • Add getSet for the AssetType (Video/Image/...).

Add newly exposed functionalities to the Asset provider interface (get/update/create/delete).

 

Questions

module-DAM

 

 

  • No labels