Package com.day.cq.dam.scene7.api
Interface Scene7DAMService
The
Scene7DAMAssetService is responsible for obtaining S7 related information about already imported DAM
assets.-
Method Summary
Modifier and TypeMethodDescriptiongetS7FileReference(Asset asset) For a DAM imported Scene7 asset, this method returns the file reference of the asset from Scene7.getS7FileReference(Asset asset, String configPath) For a DAM imported Scene7 asset, this method returns the file reference of the asset from Scene7.getS7FileReference(Asset asset, String configPath, boolean isPreview) For a DAM imported Scene7 asset, this method returns the file reference of the asset from Scene7.voidsetResourceMetadataOnSync(Resource resource, String scene7Handle, S7Config s7Config, String status, Boolean deleteOnFail) Deprecated.booleansetS7DMFileReference(Resource resource, String fileReference) Update an embedded Dynamic Media Scene7 asset URL reference in WCM componentbooleansetS7FileReference(Resource resource, String fileReference) Update an embedded Scene7 asset URL reference in WCM componentvoidupdateDMVideoStaticRendition(Resource resource, String thumbAssetPath) Update the static renditions using DM Preview server url using thumbnail asset path or the Video itself.
-
Method Details
-
getS7FileReference
For a DAM imported Scene7 asset, this method returns the file reference of the asset from Scene7. This is actually the URL used to retrieve the Scene7 asset from the Scene7 public servers. In case a DAM asset cannot be identified as an imported Scene7 asset, this method will return null.- Parameters:
asset- the DAM asset- Returns:
- the URL to the Scene7 asset; null if the asset is not imported from Scene7
-
getS7FileReference
For a DAM imported Scene7 asset, this method returns the file reference of the asset from Scene7. This is actually the URL used to retrieve the Scene7 asset from the Scene7 public servers. In case a DAM asset cannot be identified as an imported Scene7 asset, this method will return null.- Parameters:
asset- the DAM assetconfigPath- Optional path to indicate what cloud configuration to use. If null, an attempt will be made to extract the cloud config from the asset.- Returns:
- the URL to the Scene7 asset; null if the asset is not imported from Scene7
-
getS7FileReference
For a DAM imported Scene7 asset, this method returns the file reference of the asset from Scene7. This is actually the URL used to retrieve the Scene7 asset from the Scene7 public or preview servers. In case a DAM asset cannot be identified as an imported Scene7 asset, this method will return null.- Parameters:
asset- the DAM assetconfigPath- Optional path to indicate what cloud configuration to use. If null, an attempt will be made to extract the cloud config from the asset.isPreview- the Scene7 public or preview server URL- Returns:
- the URL to the Scene7 asset; null if the asset is not imported from Scene7
-
setS7FileReference
Update an embedded Scene7 asset URL reference in WCM component- Parameters:
resource- Resource object of the WCM componentfileReference- Scene7 image or video asset source URL- Returns:
- whether the update operation is successful
-
setS7DMFileReference
Update an embedded Dynamic Media Scene7 asset URL reference in WCM component- Parameters:
resource- Resource object of the WCM componentfileReference- Scene7 image or video asset source URL- Returns:
- whether the update operation is successful
-
setResourceMetadataOnSync
@Deprecated void setResourceMetadataOnSync(Resource resource, String scene7Handle, S7Config s7Config, String status, Boolean deleteOnFail) throws Exception Deprecated.Sets properties on theResourceJCR node to store its relevant Scene7 properties. This method is compatible with Scene7 assets (e.g. images, videos) and company settings (e.g. image presets, viewer presets). The session must be manually saved.- Parameters:
resource- Resource object on which to add Scene7 metadatascene7Handle- Scene7 asset handle or asset IDs7Config- the Scene7 configurationstatus- the status of the sync operation (e.g. the status of an upload job)deleteOnFail- whether to delete Scene7 remote assets/settings when the properties save action fails,- Throws:
Exception- .
-
updateDMVideoStaticRendition
void updateDMVideoStaticRendition(@Nonnull Resource resource, @Nullable String thumbAssetPath) throws Exception Update the static renditions using DM Preview server url using thumbnail asset path or the Video itself. If no thumbnail asset is provided, video asset is/image url will be used to update static thumbnails.- Parameters:
resource- Video Resource which needs to be updatedthumbAssetPath- Thumbnail asset to be used for updating thumbnail.- Throws:
Exception- when unable to generate static renditions.
-
Scene7FileMetadataService.setResourceMetadataOnSync(org.apache.sling.api.resource.Resource, java.lang.String, com.day.cq.dam.scene7.api.S7Config, java.lang.String, java.lang.Boolean)instead