Package com.day.cq.dam.scene7.api
Interface Scene7Service
The
Scene7Service provides methods for interacting with the official Scene7 API.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intScene7 specification used in getAssociatedAssets - Array of set and template assets containing the specified asset.static final intScene7 specification used in getAssociatedAssets - Array of assets that are derivatives of the specified asset.static final intScene7 specification used in getAssociatedAssets - Array of assets that were generated from the specified asset.static final intScene7 specification used in getAssociatedAssets - Array of assets that were used to generate the specified asset.static final intScene7 specification used in getAssociatedAssets - Array of assets contained by the specified set or template asset.static final intScene7 specification used in getAssociatedAssets - Array of assets that own the specified asset. -
Method Summary
Modifier and TypeMethodDescriptionaddUser(S7Config s7Config, String firstName, String lastName, String email, String defaultRole, String password, @Nullable Instant passwordExpires, boolean isValid, List<Scene7CompanyMembership> membershipArray) Creates a user account and adds the account to one of more companiesbatchSetAssetMetadata(S7Config s7Config, List<Scene7MetadataUpdate> updates) Sets asset metadata using batch mode.batchSetImageFields(S7Config s7Config, List<Scene7ImageFieldUpdate> updateArray) Sets asset metadata using batch mode.cdnCacheInvalidation(S7Config s7Config, UrlArray urlArray) Forwards the supplied list of URLs to the Scene7 CDN (Content Distribution Network) provider to invalidate their existing cache of HTTP responses@Nullable StringcreateAssetSet(S7Config s7Config, String folder, String name, String type, @Nullable Resource resource, @Nullable Scene7AssetSet setDefinition, @Nullable String thumbAssetHandle) Create an AssetSet asset on Scene7 servercreateFolder(S7Config s7Config, String cqFolderPath) Create a folder on Scene7 servercreateImageSet(S7Config s7Config, @Nullable String imageSetFolder, String imageSetName, @Nullable String thumbAssetHandle) Deprecated.@Nullable StringcreateImageSet(S7Config s7Config, String folder, String name, String type, @Nullable Resource resource, @Nullable String thumbAssetHandle) Create an ImageSet asset on Scene7 serverCreate PropertySet of given type, and store given Properties to it.createTemplate(Map<String, String> templateProperties, S7Config s7Config) Create a template on Scene7 servercreateViewerPreset(S7Config s7Config, String folderHandle, String name, String type, @Nullable List<Scene7ConfigSetting> configSettings) createViewerPreset(S7Config s7Config, String folderHandle, String name, String type, @Nullable Resource resource, @Nullable List<Scene7ConfigSetting> configSettings) Create a preset view to determine what users can see.deleteAsset(String assetHandle, S7Config s7Config) Returns a String success, note that the underlying S7 API call does not provide a data response.deleteAssets(String[] assetHandleArr, S7Config s7Config) Delete multiple assets Returns a String success, note that the underlying S7 API call does not provide a data response.deleteFolder(String folderHandle, S7Config s7Config) Returns a String success, note that the underlying S7 API call does not provide a data response.deleteImageFormat(S7Config s7Config, String imageFormatHandle) Deprecated.in favour ofdeleteImageFormat(S7Config, String, String)deleteImageFormat(S7Config s7Config, String imageFormatHandle, @Nullable String path) Deletes an image format.voiddeleteImageMap(S7Config s7Config, String imageMapHandle) Deletes an image mapbooleandeleteSubAssets(Asset asset, List<String> subAssetHandles, S7Config s7Config) Deletes the sub assets for an assetflushCdnCacheByAlias(S7Config s7Config, UrlArray companyAliasUrlArray) Forwards the supplied list of companyAliasURLs to the Scene7 CDN (Content Distribution Network) provider to invalidate their existing cache of HTTP responses.getAllUsers(S7Config s7Config, boolean includeInvalid) Return all usersgetAndStoreSecureISAuthToken(S7Config s7Config) Gets the token for a given company to access secure preview IS and stores in repository to cache token.@Nullable StringgetApplicationPropertyHandle(S7Config s7Config) Returns the application property handle.@Nullable Scene7AssetReturns a singleScene7Assetobject.getAssets(String[] assetHandles, String[] responseFields, String[] excludeFields, S7Config s7Config) Returns aScene7Assetlist, based on a list of asset handles@Nullable Scene7AssetgetAssociatedAssets(Scene7Asset asset, S7Config s7Config) Retrieves the sub-assets and the origiator asset associated with the given assetgetCompanyInfoForCompanyName(String companyName, S7Config s7Config) Returns the Company objectgetCompanyMembership(ResourceResolver resourceResolver, String userHandle, String email, String password, String region) Returns a JSON representation of the company membership information provided by Scene7.@Nullable List<Scene7Asset> getContainerAssets(Scene7Asset scene7Asset, S7Config s7Config) getFlashTemplatesServer(S7Config s7Config) Deprecated.getFolderHandle(String cqFolderPath, S7Config s7Config) Returns s7 folder handle for the associated cq foldergetFolderTree(String folderPath, int depth, String[] responseFields, String[] excludeFields, S7Config s7Config) Returns aScene7Folderholding a tree structuregetFxgServer(S7Config s7Config) Deprecated.@Nullable Scene7AssetgetGeneratedAssets(Scene7Asset asset, S7Config s7Config) Retrieves the generated assets associated with the given input assetgetImageFormats(S7Config s7Config) Returns image formats, such as PDF, EPS, SWF, and others.getImagePresets(S7Config s7Config) Returns a list of Scene7 image preset names for the givenS7ConfiggetImageSetMembers(S7Config s7Config, String assetHandle) Get members of legacy ImageSet@Nullable StringgetIpsImageUrl(Asset asset, S7Config s7Config) Gets the value of the ipsImageUrl property for an assetgetJobLogDetails(String jobHandle, S7Config s7Config) Returns a list of Scene7 asset handles(Strings) for the given job handlegetJobLogDetailsByJobName(String jobName, S7Config s7Config) Returns a list of UploadJobDetail objects for the given job namegetJobStatus(S7Config s7Config, String jobName) Get scene7 job status with given jobName, the jobName should be uniq, if there are many job have same name, it only get the first one@Nullable StringgetLinkedScene7ConfigPath(Resource resource) Returns propertydam:scene7CloudConfigPathof a givenResourceobjectgetLoginStatus(ResourceResolver resourceResolver, String email, String password, String region) Checks the login in Scene7 with the given credentials@Nullable Scene7AssetgetMasterAsset(Scene7Asset asset, S7Config s7Config) Retrieves the originator asset associated with the given assetgetMultiFileJobLogDetails(String jobHandle, S7Config s7Config) Returns an Arraylist of job details objects@Nullable StringgetPreviewServerUrl(Resource resource, ResourceResolver configResolver) Retrieves Scene7 remote asset preview /is/image/ URL (context path with image server uri).@Nullable StringgetPreviewVideoServerUrl(Resource resource, ResourceResolver configResolver) Retrieves Scene7 remote video preview /is/content/ URL (context path with image server uri).getPropertySets(String typeHandle, S7Config s7Config) Returns the video encoder preset type handle.@Nullable StringgetPropertySetTypeHandle(S7Config s7Config, String typeName) Returns the handle for IPS PropertySet type by its name.@Nullable StringgetPublishServer(S7Config s7Config) Returns the domain name of the S7 publish server@Nullable StringgetPublishServerUrl(Resource resource, ResourceResolver configResolver) Retrieves Scene7 remote asset publish /is/image/ URL (server domain and image server uri).@Nullable StringgetPublishVideoServerUrl(Resource resource, ResourceResolver configResolver) Retrieves Scene7 remote video publish /is/content/ URL (server domain and image server uri).getS7AssetMetadata(S7Config s7Config, String assetHandle) Retrieves a metadata map (key-value pair) associated with a Scene7 asset@Nullable List<Scene7Asset> getS7VideoRenditions(S7Config s7Config, String assetHandle) Retrieves a list of Scene7 video renditions with their names and asset handles@Nullable StringgetScene7ID(Resource resource) Returns propertydam:scene7IDof a givenResourceobjectgetUserHandle(ResourceResolver resourceResolver, String email, String password, String region) Returns a unique user handle from Scene7.getUsers(S7Config s7Config, @Nullable Boolean includeInactive, @Nullable Boolean includeInvalid, @Nullable List<String> companyHandleArray, @Nullable List<String> groupHandleArray, @Nullable List<String> userRoleArray, @Nullable String charFilterField, @Nullable String charFilter, @Nullable String sortBy, @Nullable Integer recordsPerPage, @Nullable Integer resultsPage) Return a optionally sorted, filtered and paged list user results@Nullable StringgetVideoEncoderPresetTypeHandle(S7Config s7Config) Returns the video encoder preset type handle.getVideoManifestAssociatedFiles(String avsFileName, S7Config s7Config) Parse AVS content and returns list of file paths contained in video manifest@Nullable StringgetVideoManifestURI(Resource resource, ManifestType manifestType, boolean onlyIfPublished) Returns the manifest url for videosgetViewerConfigSettings(S7Config s7Config, String assetHandle) Get the viewer configuration for the referenced assetgetXMPPacket(S7Config s7Config, String assetHandle) Retrieves an XMP Metadata packet for the specified asset.booleanisJobActiveByJobHandle(String jobHandle, S7Config s7Config) booleanisJobActiveByOriginalName(String originalName, S7Config s7Config) booleanisResourceLinkedToScene7(Resource resource) Returns true ifResourceobject is linked to Scene7 based on its metadatabooleanMoves an asset to a specific folderbooleanmoveAssets(S7Config s7Config, Map<Resource, String> resourcesToFolders) Moves multiple assets independently of each otherbooleanmoveAssociatedAsset(S7Config s7Config, Resource resource, String folder) Finds and moves generated assets to a specific folderbooleanmoveFolder(S7Config s7Config, String sourceFolder, String destinationFolder) Move a folder to a new locationparseAvsHandleAndOriginalAudioMetadata(Asset asset, Map<String, Object> metadata, Scene7Asset scene7Asset) Parse AVS asset handle and original audio metadata from received AVS databooleanrenameAsset(S7Config s7Config, Resource resource, String name) Rename an assetbooleanrenameFolder(S7Config s7Config, String folder, String name) Rename a foldersaveImageFormat(S7Config s7Config, @Nullable String imageFormatHandle, String name, String urlModifier) Deprecated.saveImageFormat(S7Config s7Config, @Nullable String imageFormatHandle, String name, String urlModifier, @Nullable Resource resource) Create an image format.saveImageMap(S7Config s7Config, String assetHandle, @Nullable String imageMapHandle, String name, String shapeType, String region, String action, int position, boolean enabled) Create a new image map or edit an existing mapsearchAssets(String folder, Boolean includeSubfolders, Boolean published, String[] assetTypes, String[] assetSubTypes, String[] responseFields, String[] excludeFields, int recordsPerPage, int resultsPage, S7Config s7Config) Retrieves a list ofScene7Assets from the Scene7 server.searchAssets(String folder, Boolean includeSubfolders, Boolean published, String[] assetTypes, String[] assetSubTypes, String[] responseFields, String[] excludeFields, S7Config s7Config) Retrieves a list ofScene7Assets from the Scene7 server.searchAssetsByFilename(String folder, Boolean includeSubfolders, Boolean published, String filename, S7Config s7Config) Retrieve a list ofScene7Assets from the Scene7 server by filename.searchAssetsByMetadata(String folder, Boolean includeSubfolders, String[] assetTypes, String[] assetSubTypes, Boolean published, MetadataCondition[] conditions, int recordsPerPage, int resultsPage, S7Config s7Config) Returns a DOM list with search results (from metadata), support specifysearchAssetsByMetadata(String folder, Boolean includeSubfolders, String[] assetTypes, String[] assetSubTypes, Boolean published, MetadataCondition[] conditions, S7Config s7Config) Returns a DOM list with search results (from metadata)searchAssetsByName(String folder, Boolean includeSubfolders, Boolean published, String name, S7Config s7Config) Retrieve a list ofScene7Assets from the Scene7 server by Scene7 asset name.searchAssetsByPartialName(String folder, Boolean includeSubfolders, Boolean published, String name, String conditionMode, S7Config s7Config) Retrieve a list ofScene7Assets from the Scene7 server by Scene7 asset name with partial name search optionsetAssetPublishState(String assetHandle, boolean markForPublish, S7Config s7Config) Set the publish state of a given Scene7 assetsetAssetPublishState(Resource resource, boolean markForPublish, S7Config s7Config) Set the publish state of a given Scene7 assetsetAssetsPublishState(Set<String> assetHandles, boolean markForPublish, S7Config s7Config) Set the publish state of a given Scene7 assetsvoidsetAvsHandleAndOriginalAudioMetadata(Resource resource) Update audio metadata and avs id for video asset node which were processed before multi audio / caption changessetImageMaps(S7Config s7Config, String assetHandle, List<Scene7ImageMapDefinition> imageMap) Sets the image map for an asset.voidsetPassword(S7Config s7Config, String userHandle, String password, @Nullable Integer validityInDays) Sets the password for a given user with an expiry of 100 years ahead from the current date.booleansetUrlModifier(String assetHandle, String modifier, S7Config s7Config) Update the URL Modifier for a template on Scene7 servervoidsetUserInfo(S7Config s7Config, @Nullable String userHandle, String firstName, String lastName, String email, String defaultRole, @Nullable Instant passwordExpires, boolean isValid, List<Scene7CompanyMembership> membershipArray) Set user attributessetVideoThumbnail(S7Config s7Config, String assetHandle, String thumbAssetHandle) Set the video thumbnail with a specifed thumbnail asset, not only for master video, all generated encoded videos and AVS files are also been set togethervoidsetViewerConfigSettings(S7Config s7Config, String assetHandle, String name, String type, List<Scene7ConfigSetting> configSettings) Attach viewer configuration settings to an asset Can be viewer preset or the source asset for the viewersubmitReprocessAssetsThumbnailJob(S7Config s7Config, String jobName, String assetHandle, long thumbnailTime) Submit a job to S7 for reprocessing video thumbnail to a specified video frame timevoidupdateAssetSet(S7Config s7Config, String assetHandle, @Nullable Scene7AssetSet setDefinition, @Nullable String thumbAssetHandle) Update an AssetSet on Scene7 servervoidupdateImageSet(S7Config s7Config, String assetHandle, @Nullable ImageSetMemberUpdateArray members, @Nullable String thumbAssetHandle) Update an ImageSet on Scene7 servervoidupdateImageSet(S7Config s7Config, String imageSetAssetHandle, List<String> setMemberHandles, @Nullable String thumbAssetHandle) voidUpdate the PropertySet with the new set of Properties, replacing existing ones.voidupdatePropertySet(String setHandle, String propKey, String propValue, S7Config s7Config) Update single property in the PropertySet.booleanupdateSmartCrops(S7Config s7Config, Asset asset, List<SmartCrop> smartCrops) booleanupdateSmartCrops(S7Config s7Config, Map<String, Map<String, Scene7NormalizedCropRect>> updateSmartCropMap) Deprecated.voidupdateViewerConfigSettings(S7Config s7Config, String assetHandle, List<Scene7ConfigSetting> configSettings) Updates SWF viewer configuration settings.voidupdateXMPPacket(S7Config s7Config, String assetHandle, String xmpPacketAsXml) Sets or updates an XMP metadata packet for an asset.
-
Field Details
-
CONTAINER
static final int CONTAINERScene7 specification used in getAssociatedAssets - Array of set and template assets containing the specified asset.- See Also:
-
MEMBER
static final int MEMBERScene7 specification used in getAssociatedAssets - Array of assets contained by the specified set or template asset.- See Also:
-
OWNER
static final int OWNERScene7 specification used in getAssociatedAssets - Array of assets that own the specified asset.- See Also:
-
DERIVED
static final int DERIVEDScene7 specification used in getAssociatedAssets - Array of assets that are derivatives of the specified asset.- See Also:
-
GENERATOR
static final int GENERATORScene7 specification used in getAssociatedAssets - Array of assets that were used to generate the specified asset.- See Also:
-
GENERATED
static final int GENERATEDScene7 specification used in getAssociatedAssets - Array of assets that were generated from the specified asset.- See Also:
-
-
Method Details
-
getPublishServer
Returns the domain name of the S7 publish server- Parameters:
s7Config-- Returns:
- A string,
nullif not present - Throws:
AssertionError- in case of IPS failures or undefined data format
-
getApplicationPropertyHandle
Returns the application property handle.- Parameters:
s7Config- the Scene7 configuration- Returns:
- the application property handle,
nullif not present - Throws:
AssertionError- in case of IPS failures or undefined data format
-
getVideoEncoderPresetTypeHandle
Returns the video encoder preset type handle.- Parameters:
s7Config- the Scene7 configuration- Returns:
- the video encoder preset type handle,
nullif not present - Throws:
AssertionError- in case of IPS failures or undefined data format
-
getPropertySetTypeHandle
Returns the handle for IPS PropertySet type by its name.- Parameters:
s7Config- the Scene7 configuration- Returns:
- the PropertySet type's handle, or
nullif not present - Throws:
AssertionError- in case of IPS or other failure
-
getPropertySets
Returns the video encoder preset type handle.- Parameters:
typeHandle- - the type handles7Config- the Scene7 configuration- Returns:
- the list of property sets
- Throws:
AssertionError- in case of IPS failures or undefined data format
-
createPropertySet
Create PropertySet of given type, and store given Properties to it.- Parameters:
s7Config- the Scene7 configurationtypeHandle- PropertySet type handleprops- array of Properties (Key-Value pairs) to put into new PropertySet- Returns:
- the handle of newly created PropertySet
- Throws:
AssertionError- in case of IPS or other failure
-
updatePropertySet
Update the PropertySet with the new set of Properties, replacing existing ones.- Parameters:
s7Config- the Scene7 configurationsetHandle- PropertySet handleprops- array of Properties (Key-Value pairs) to put into PropertySet- Throws:
AssertionError- in case of IPS or other failure
-
updatePropertySet
Update single property in the PropertySet.- Parameters:
setHandle- the set handle for the company settingspropKey- property key namepropValue- property key values7Config- the Scene7 configuration- Throws:
AssertionError- in case of IPS or other failure
-
getUserHandle
String getUserHandle(ResourceResolver resourceResolver, String email, String password, String region) Returns a unique user handle from Scene7.- Parameters:
resourceResolver- resource resolver used to access Scene7 configurationemail- E-Mail addresspassword- Passwordregion- Region of the Scene7 service- Returns:
- A unique user handle
- Throws:
AssertionError- in case of IPS failures or undefined data format
-
getCompanyMembership
String getCompanyMembership(ResourceResolver resourceResolver, String userHandle, String email, String password, String region) Returns a JSON representation of the company membership information provided by Scene7. The information includes a company handle, a company name and an asset root path.For example:
{
handle: 'jlkj98',
name: 'Acme Ltd.',
rootPath: '/MyAssets'
}- Parameters:
resourceResolver- resource resolver used to access Scene7 configurationuserHandle- Unique user handleemail- E-Mail addresspassword- Passwordregion- Region of the Scene7 service- Returns:
- A JSON string
- Throws:
AssertionError- in case of IPS failures or undefined data format
-
getFolderTree
Scene7Folder getFolderTree(String folderPath, int depth, String[] responseFields, String[] excludeFields, S7Config s7Config) Returns aScene7Folderholding a tree structure- Parameters:
folderPath- - the top folder of the request - does not need to be the root.depth- - depth of the returned folder tree.responseFields- - fields to be filled in for each node in the treeexcludeFields- - fields to be excluded in each node of the trees7Config-- Returns:
- A
Scene7Folderobject containing the requested folder structure - Throws:
AssertionError- in case of IPS failures or undefined data format
-
getFolderHandle
Returns s7 folder handle for the associated cq folder- Parameters:
cqFolderPath- - the path the target cq folder targeted in the s7 folder organizations7Config-- Returns:
- folder handle or null if the folder does not exist in s7.
- Throws:
AssertionError- in case of IPS failures or undefined data format
-
deleteFolder
Returns a String success, note that the underlying S7 API call does not provide a data response.- Parameters:
folderHandle- - folder to be deleteds7Config- - s7 config based on cloud service config info.- Returns:
- String success
- Throws:
AssertionError- in case of IPS failures
-
deleteAsset
Returns a String success, note that the underlying S7 API call does not provide a data response.- Parameters:
assetHandle- - asset to be deleteds7Config- - s7 config based on cloud service config info.- Returns:
- String success
- Throws:
AssertionError- in case of IPS failures or undefined data format
-
deleteAssets
Delete multiple assets Returns a String success, note that the underlying S7 API call does not provide a data response.- Parameters:
assetHandleArr- - asset to be deleteds7Config- - s7 config based on cloud service config info.- Returns:
- String success
- Throws:
AssertionError- in case of IPS failures or undefined data format
-
searchAssetsByMetadata
List<Scene7Asset> searchAssetsByMetadata(String folder, Boolean includeSubfolders, String[] assetTypes, String[] assetSubTypes, Boolean published, MetadataCondition[] conditions, S7Config s7Config) Returns a DOM list with search results (from metadata)- Parameters:
folder- - all matched assets will be in this folderincludeSubfolders- - whether to recursively search for assetsassetTypes- - all matched assets will be one of these typesassetSubTypes- array of sub Asset Types to include in searchpublished- - whether the matched assets must be marked for publish (only marked - not necessarily actually published)conditions- - metadata conditions for searchs7Config-- Returns:
- A list of assets; the list can be empty if no assets have been found.
- Throws:
AssertionError- in case of IPS failures
-
submitReprocessAssetsThumbnailJob
String submitReprocessAssetsThumbnailJob(S7Config s7Config, String jobName, String assetHandle, long thumbnailTime) Submit a job to S7 for reprocessing video thumbnail to a specified video frame time- Parameters:
s7Config- the Scene7 configurationjobName- the name of the jobassetHandle- the asset handlethumbnailTime- the frame time- Returns:
- the scene7 jobHandle, return empty string if failed to get it
-
searchAssetsByMetadata
List<Scene7Asset> searchAssetsByMetadata(String folder, Boolean includeSubfolders, String[] assetTypes, String[] assetSubTypes, Boolean published, MetadataCondition[] conditions, int recordsPerPage, int resultsPage, S7Config s7Config) Returns a DOM list with search results (from metadata), support specify- Parameters:
folder- - all matched assets will be in this folderincludeSubfolders- - whether to recursively search for assetsassetTypes- - all matched assets will be one of these typesassetSubTypes- array of sub Asset Types to include in searchpublished- - whether the matched assets must be marked for publish (only marked - not necessarily actually published)conditions- - metadata conditions for searchrecordsPerPage- maximum number of results to returnresultsPage- specifies the page of results to return, based onrecordsPerPagepage sizes7Config-- Returns:
- A list of assets; the list can be empty if no assets have been found.
- Throws:
AssertionError- in case of IPS failures
-
getAssets
List<Scene7Asset> getAssets(String[] assetHandles, String[] responseFields, String[] excludeFields, S7Config s7Config) Returns aScene7Assetlist, based on a list of asset handles- Parameters:
assetHandles- - the assets to retrieveresponseFields- - fields to be filled in for each node in the treeexcludeFields- - fields to be excluded in each node of the trees7Config-- Returns:
- A
Scene7Assetlist - Throws:
AssertionError- in case of IPS failures
-
getAsset
@Nullable @Nullable Scene7Asset getAsset(String assetHandle, String[] responseFields, String[] excludeFields, S7Config s7Config) Returns a singleScene7Assetobject. If there are multiple matching assets found, return the first asset.- Parameters:
assetHandle- - the asset to retrieveresponseFields- - fields to be filled in for each node in the treeexcludeFields- - fields to be excluded in each node of the trees7Config- - Scene7 cloud configuration object- Returns:
- A
Scene7Assetobject, or null if not found or failed - Throws:
AssertionError- in case of IPS failures
-
getMultiFileJobLogDetails
Returns an Arraylist of job details objects- Parameters:
jobHandle- - the handle for the job to get details.s7Config-- Returns:
- An AssetList of UploadJobDetail
- Throws:
AssertionError- in case of IPS failures or undefined data format
-
isJobActiveByJobHandle
- Parameters:
jobHandle- of the jobs7Config-- Returns:
trueif active job with this jobHandle or orginalName is active,falseotherwise- Throws:
AssertionError- in case of IPS failures or undefined data format
-
isJobActiveByOriginalName
- Parameters:
originalName- of the jobs7Config-- Returns:
trueif active job with this jobHandle or orginalName is active,falseotherwise- Throws:
AssertionError- in case of IPS failures or undefined data format
-
getJobLogDetails
Returns a list of Scene7 asset handles(Strings) for the given job handle- Parameters:
jobHandle- - the handle for the job to get details.s7Config-- Returns:
- A list containing asset handles strings
- Throws:
AssertionError- in case of IPS failures or undefined data format
-
getJobLogDetailsByJobName
Returns a list of UploadJobDetail objects for the given job name- Parameters:
jobName- - the handle for the job to get details.s7Config-- Returns:
- A list containing UploadJobDetail
- Throws:
AssertionError- in case of IPS failures or undefined data format
-
getJobStatus
Get scene7 job status with given jobName, the jobName should be uniq, if there are many job have same name, it only get the first one- Parameters:
s7Config- the Scene7 configurationjobName- the name of the job- Returns:
- a string indicate the result, can be "NotFound", "Done" or a string returned by the S7 API, like "Running"
-
getImagePresets
Returns a list of Scene7 image preset names for the givenS7Config- Parameters:
s7Config-- Returns:
- a list containing the names of the image presets defined in SPS
- Throws:
AssertionError- in case of IPS failures or undefined data format
-
getFlashTemplatesServer
Deprecated.Retrieves the server used for serving and manipulating flash templates, depending on the Scene7 configuration.- Parameters:
s7Config- the Scene7 configuration- Returns:
- a String containing the server's URL
-
searchAssets
List<Scene7Asset> searchAssets(String folder, Boolean includeSubfolders, Boolean published, String[] assetTypes, String[] assetSubTypes, String[] responseFields, String[] excludeFields, S7Config s7Config) Retrieves a list ofScene7Assets from the Scene7 server.- Parameters:
folder- the folder from which the assets are retrievedincludeSubfolders- whether to recursively search for assets in sub-folders of the folder where the search is performedpublished- whether the matched assets must be marked for publish (only marked - not necessarily actually published)assetTypes- all matched assets will be one of these typesassetSubTypes- array of sub Asset Types to include in searchresponseFields- the response fields that should be used to populate theScene7Asset's attributesexcludeFields- fields to be excluded from the responses7Config- the Scene7 configuration- Returns:
- a List of assets; can be empty if no assets have been found
- Throws:
AssertionError- in case of IPS failures
-
searchAssets
List<Scene7Asset> searchAssets(String folder, Boolean includeSubfolders, Boolean published, String[] assetTypes, String[] assetSubTypes, String[] responseFields, String[] excludeFields, int recordsPerPage, int resultsPage, S7Config s7Config) Retrieves a list ofScene7Assets from the Scene7 server.- Parameters:
folder- the folder from which the assets are retrievedincludeSubfolders- whether to recursively search for assets in sub-folders of the folder where the search is performedpublished- whether the matched assets must be marked for publish (only marked - not necessarily actually published)assetTypes- all matched assets will be one of these typesassetSubTypes- array of sub Asset Types to include in searchresponseFields- the response fields that should be used to populate theScene7Asset's attributesexcludeFields- fields to be excluded from the responserecordsPerPage- maximum number of results to returnresultsPage- specifies the page of results to return, based onrecordsPerPagepage sizes7Config- the Scene7 configuration- Returns:
- a List of assets; can be empty if no assets have been found
- Throws:
AssertionError- in case of IPS failures
-
searchAssetsByFilename
List<Scene7Asset> searchAssetsByFilename(String folder, Boolean includeSubfolders, Boolean published, String filename, S7Config s7Config) Retrieve a list ofScene7Assets from the Scene7 server by filename.- Parameters:
folder-includeSubfolders-published-filename-s7Config-- Returns:
- Throws:
AssertionError- in case of IPS failures
-
searchAssetsByName
List<Scene7Asset> searchAssetsByName(String folder, Boolean includeSubfolders, Boolean published, String name, S7Config s7Config) Retrieve a list ofScene7Assets from the Scene7 server by Scene7 asset name.- Parameters:
folder- remote search folder pathincludeSubfolders- to include children folderspublished- to include published or non-published assetsname- Scene7 name of target assets7Config- Scene7 cloud configuration- Throws:
AssertionError- in case of IPS failures
-
searchAssetsByPartialName
List<Scene7Asset> searchAssetsByPartialName(String folder, Boolean includeSubfolders, Boolean published, String name, String conditionMode, S7Config s7Config) Retrieve a list ofScene7Assets from the Scene7 server by Scene7 asset name with partial name search option- Parameters:
folder- remote search folder pathincludeSubfolders- to include children folderspublished- to include published or non-published assetsname- Scene7 name of target assetconditionMode- partial name search condition mode. Currently supported modes are "Equals" and "StartsWith"s7Config- Scene7 cloud configuration- Returns:
- a list of
Scene7Assets
-
getGeneratedAssets
Retrieves the generated assets associated with the given input asset- Parameters:
asset- - the asset to get the sub-assets and generator froms7Config- - the Scene7 configuration- Returns:
- the original
Scene7Assetobject updated with the sub-assets and the originator asset - Throws:
AssertionError- in case of IPS failures
-
getAssociatedAssets
Retrieves the sub-assets and the origiator asset associated with the given asset- Parameters:
asset- - the asset to get the sub-assets and generator froms7Config- - the Scene7 configuration- Returns:
- the original
Scene7Assetobject updated with the sub-assets and the originator asset - Throws:
AssertionError- in case of IPS failures
-
getMasterAsset
Retrieves the originator asset associated with the given asset- Parameters:
asset- - the asset to get the originator assets7Config- - the Scene7 configuration- Returns:
- the original
Scene7Assetobject updated with the originator asset - Throws:
AssertionError- in case of IPS failures
-
getFxgServer
Deprecated.Retrieves the server handling FXG rendering. Deprecated and only return null now.- Parameters:
s7Config- the Scene7 configuration- Returns:
- a String containing the FXG server URL
-
setAssetPublishState
Set the publish state of a given Scene7 asset- Parameters:
resource- activated resourcemarkForPublish- value of markForPublish flags7Config- the Scene7 configuration- Returns:
- String success / failure
- Throws:
AssertionError- in case of IPS failures or undefined data format
-
setAssetPublishState
Set the publish state of a given Scene7 asset- Parameters:
assetHandle- unique asset identifiermarkForPublish- value of markForPublish flags7Config- the Scene7 configuration- Returns:
- String success / failure
- Throws:
AssertionError- in case of IPS failures
-
setAssetsPublishState
Set the publish state of a given Scene7 assets- Parameters:
assetHandles- asset identifiers to set publish statemarkForPublish- value of markForPublish flags7Config- the Scene7 configuration- Returns:
- String success / failure
- Throws:
AssertionError- in case of IPS failures
-
createFolder
Create a folder on Scene7 server- Parameters:
s7Config- the Scene7 configurationcqFolderPath- the path the target cq folder targeted in the s7 folder organization- Returns:
- folder handle
- Throws:
AssertionError- in case of IPS failures or undefined data format
-
createImageSet
@Nullable @Nullable String createImageSet(S7Config s7Config, String folder, String name, String type, @Nullable @Nullable Resource resource, @Nullable @Nullable String thumbAssetHandle) Create an ImageSet asset on Scene7 server- Parameters:
s7Config- the Scene7 configurationfolder- relative target folder based on S7 Config root folder. If not exists, will attempt to create itname- name for new ImageSettype- type of new ImageSet (ImageSet, SwatchSet, RenderSet)resource- (optional) if exists, jcr resource to receive metadata from new objectthumbAssetHandle- (optional) asset handle of user-defined thumbnail image for set- Returns:
- asset handle of newly created ImageSet, or null on error
- Throws:
AssertionError- in case of IPS failures or undefined data format
-
createImageSet
@Deprecated String createImageSet(S7Config s7Config, @Nullable @Nullable String imageSetFolder, String imageSetName, @Nullable @Nullable String thumbAssetHandle) Create an ImageSet asset on Scene7 server- Parameters:
s7Config- the Scene7 configurationimageSetFolder- the path the target imageset cq folder targeted in the s7 folder organizationimageSetName- name of the image setthumbAssetHandle- (optional) user defined thumbnail asset handle- Returns:
- asset handle of new image set
-
updateImageSet
void updateImageSet(S7Config s7Config, String assetHandle, @Nullable @Nullable ImageSetMemberUpdateArray members, @Nullable @Nullable String thumbAssetHandle) Update an ImageSet on Scene7 server- Parameters:
s7Config- the Scene7 configurationassetHandle- asset handle of the ImageSet to updatemembers- (optional) list of ImageSet members (Null = not updated)thumbAssetHandle- (optional) asset handle of user-defined thumbnail image for set (Null = not updated)- Throws:
AssertionError- in case of IPS failures
-
updateImageSet
@Deprecated void updateImageSet(S7Config s7Config, String imageSetAssetHandle, List<String> setMemberHandles, @Nullable @Nullable String thumbAssetHandle) Update an ImageSet asset on Scene7 server- Parameters:
s7Config- the Scene7 configurationimageSetAssetHandle- image set Scene7 asset handlesetMemberHandles- asset handles of image set membersthumbAssetHandle- (optional) user defined thumbnail asset handle
-
getImageSetMembers
Get members of legacy ImageSet- Parameters:
s7Config- the Scene7 configurationassetHandle- asset handle of the ImageSet- Returns:
- not-null ordered list of members embedded into
ImageSetMemberArrayinstance
-
createAssetSet
@Nullable @Nullable String createAssetSet(S7Config s7Config, String folder, String name, String type, @Nullable @Nullable Resource resource, @Nullable @Nullable Scene7AssetSet setDefinition, @Nullable @Nullable String thumbAssetHandle) Create an AssetSet asset on Scene7 server- Parameters:
s7Config- the Scene7 configurationfolder- relative target folder based on S7 Config root folder. If not exists, will attempt to create itname- name for new AssetSettype- type of new AssetSetresource- (optional) if exists, jcr resource to receive metadata from new objectsetDefinition- (optional) set's definition stringthumbAssetHandle- (optional) asset handle of user-defined thumbnail image for set- Returns:
- asset handle of newly created AssetSet, or null on error
- Throws:
AssertionError- in case of IPS failures or undefined data format
-
updateAssetSet
void updateAssetSet(S7Config s7Config, String assetHandle, @Nullable @Nullable Scene7AssetSet setDefinition, @Nullable @Nullable String thumbAssetHandle) Update an AssetSet on Scene7 server- Parameters:
s7Config- the Scene7 configurationassetHandle- asset handle of the AssetSet to updatesetDefinition- (optional) set's definition string (Null = not updated)thumbAssetHandle- (optional) asset handle of user-defined thumbnail image for set (Null = not updated)- Throws:
AssertionError- in case of IPS failures
-
createViewerPreset
String createViewerPreset(S7Config s7Config, String folderHandle, String name, String type, @Nullable @Nullable Resource resource, @Nullable @Nullable List<Scene7ConfigSetting> configSettings) Create a preset view to determine what users can see. The preset view is applied when assets are published.- Parameters:
s7Config- the Scene7 configurationfolderHandle- folder handle of the folder that contains the assetsname- name for the viewertype- type of any available viewer in IPSresource- (optional) if exists, jcr resource to receive metadata from new objectconfigSettings- (optional) list containingScene7ConfigSettingvalues to apply- Returns:
- viewer preset handle or
nullif unsuccessful - Throws:
AssertionError- in case of IPS failures or undefined data format
-
createViewerPreset
@Deprecated String createViewerPreset(S7Config s7Config, String folderHandle, String name, String type, @Nullable @Nullable List<Scene7ConfigSetting> configSettings) Create a preset view to determine what users can see. The preset view is applied when assets are published.- Parameters:
s7Config- the Scene7 configurationfolderHandle- folder handle of the folder that contains the assetsname- name for the viewertype- type of any available viewer in IPSconfigSettings- list containingScene7ConfigSettingvalues to apply- Returns:
- viewer preset handle or
nullif unsuccessful
-
getViewerConfigSettings
Get the viewer configuration for the referenced asset- Parameters:
s7Config- the Scene7 configurationassetHandle- asset handle for the asset of interest- Returns:
Scene7ViewerConfigwith the information ornullif unsuccessful- Throws:
AssertionError- in case of IPS failures or undefined data format
-
setViewerConfigSettings
void setViewerConfigSettings(S7Config s7Config, String assetHandle, String name, String type, List<Scene7ConfigSetting> configSettings) Attach viewer configuration settings to an asset Can be viewer preset or the source asset for the viewer- Parameters:
s7Config- the Scene7 configurationassetHandle- asset handle for the asset to modifyname- name of the assettype- type of any available viewer in IPSconfigSettings- list containingScene7ConfigSettingvalues to apply- Throws:
AssertionError- in case of IPS failures
-
updateViewerConfigSettings
void updateViewerConfigSettings(S7Config s7Config, String assetHandle, List<Scene7ConfigSetting> configSettings) Updates SWF viewer configuration settings.- Parameters:
s7Config- the Scene7 configurationassetHandle- asset handle for the asset to modifyconfigSettings- list containingScene7ConfigSettingvalues to apply- Throws:
AssertionError- in case of IPS failures
-
addUser
String addUser(S7Config s7Config, String firstName, String lastName, String email, String defaultRole, String password, @Nullable @Nullable Instant passwordExpires, boolean isValid, List<Scene7CompanyMembership> membershipArray) Creates a user account and adds the account to one of more companies- Parameters:
s7Config- The Scene7 configurationfirstName- The user's first namelastName- The user's last nameemail- The user's email addressdefaultRole- The role for the user in the companies they belong, the IpsAdmin role overrides other per-company settingspassword- The user's passwordpasswordExpires- The instant of expiration of the passwordisValid- Determine the user's validitymembershipArray- List ofScene7CompanyMembershipentries enumerating the membership of the user.- Returns:
- The handle of the newly created user
- Throws:
AssertionError- in case of IPS failures or undefined data format
-
getAllUsers
Return all users- Parameters:
s7Config- The Scene7 configurationincludeInvalid- Indicate if invalid users should be included- Returns:
- List containing
Scene7Userrequested - Throws:
AssertionError- in case of IPS failures or undefined data format
-
getUsers
List<Scene7User> getUsers(S7Config s7Config, @Nullable @Nullable Boolean includeInactive, @Nullable @Nullable Boolean includeInvalid, @Nullable @Nullable List<String> companyHandleArray, @Nullable @Nullable List<String> groupHandleArray, @Nullable @Nullable List<String> userRoleArray, @Nullable @Nullable String charFilterField, @Nullable @Nullable String charFilter, @Nullable @Nullable String sortBy, @Nullable @Nullable Integer recordsPerPage, @Nullable @Nullable Integer resultsPage) Return a optionally sorted, filtered and paged list user results- Parameters:
s7Config- The Scene7 configincludeInactive- Include or exclude inactive membersincludeInvalid- Include or exclude invalid memberscompanyHandleArray- Filter results be companygroupHandleArray- Filter results by groupuserRoleArray- Filter results by user rolecharFilterField- Filter results by field's string prefixcharFilter- Filter results by a specific charactersortBy- Choice of user sort fieldrecordsPerPage- Number of records per page to returnresultsPage- The desired result page- Returns:
- List containing
Scene7Userrequested - Throws:
AssertionError- in case of IPS failures or undefined data format
-
setUserInfo
void setUserInfo(S7Config s7Config, @Nullable @Nullable String userHandle, String firstName, String lastName, String email, String defaultRole, @Nullable @Nullable Instant passwordExpires, boolean isValid, List<Scene7CompanyMembership> membershipArray) Set user attributes- Parameters:
s7Config- The Scene7 configuserHandle- User handlefirstName- First namelastName- Last nameemail- Email addressdefaultRole- The role for the user in the companies they belong, the IpsAdmin role overrides other per-company settingspasswordExpires- The password's expirationisValid- Determine if valid IPS usermembershipArray- List ofScene7CompanyMembershipentries enumerating the membership of the user- Throws:
AssertionError- in case of IPS failures
-
deleteImageFormat
String deleteImageFormat(S7Config s7Config, String imageFormatHandle, @Nullable @Nullable String path) Deletes an image format.- Parameters:
s7Config- The Scene7 configimageFormatHandle- Handle to the image format. (This is returned fromsaveImageFormat(S7Config, String, String, String, Resource)path- If available, path to JCR resource backing the image format- Returns:
- String success
- Throws:
AssertionError- in case of IPS failures
-
deleteImageFormat
Deprecated.in favour ofdeleteImageFormat(S7Config, String, String)Deletes an image format.- Parameters:
s7Config- The Scene7 configimageFormatHandle- Handle to the image format. (This is returned fromsaveImageFormat(S7Config, String, String, String, Resource)- Returns:
- String success
- Throws:
AssertionError- in case of IPS failures
-
getImageFormats
Returns image formats, such as PDF, EPS, SWF, and others.- Parameters:
s7Config- The Scene7 config- Returns:
- A list of
Scene7ImageFormatobjects - Throws:
AssertionError- in case of IPS failures or undefined data format
-
saveImageFormat
String saveImageFormat(S7Config s7Config, @Nullable @Nullable String imageFormatHandle, String name, String urlModifier, @Nullable @Nullable Resource resource) Create an image format.- Parameters:
s7Config- The Scene7 configimageFormatHandle- Image format handle you want to savename- Image format nameurlModifier- IPS protocol query stringresource- (optional) if exists, jcr resource to receive metadata from new object- Returns:
- The imageFormatHandle
- Throws:
AssertionError- in case of IPS failures or undefined data format
-
saveImageFormat
@Deprecated String saveImageFormat(S7Config s7Config, @Nullable @Nullable String imageFormatHandle, String name, String urlModifier) Deprecated.Create an image format.- Parameters:
s7Config- The Scene7 configimageFormatHandle- Image format handle you want to savename- Image format nameurlModifier- IPS protocol query string- Returns:
- The imageFormatHandle
-
deleteImageMap
Deletes an image map- Parameters:
s7Config- The Scene7 configimageMapHandle- Handle for the image map to delete- Throws:
AssertionError- in case of IPS failures
-
saveImageMap
String saveImageMap(S7Config s7Config, String assetHandle, @Nullable @Nullable String imageMapHandle, String name, String shapeType, String region, String action, int position, boolean enabled) Create a new image map or edit an existing map- Parameters:
s7Config- The Scene7 configassetHandle- Handle to the asset the map belongs toimageMapHandle- Handle to the image map.name- Name of the image mapshapeType- Choice of region shaperegion- A comma delimited list of points that define the regionaction- The href value associated with the image mapposition- The order in the list of image mapsenabled- Whether this map is enabled- Returns:
- The handle to the new or edited image map
- Throws:
AssertionError- in case of IPS failures or undefined data format
-
setImageMaps
List<String> setImageMaps(S7Config s7Config, String assetHandle, List<Scene7ImageMapDefinition> imageMap) Sets the image map for an asset. You must have already created the image maps. Image maps are applied in order of retrieval from the array. This means the second image map overlays the first, the third overlays the second, and so on.- Parameters:
s7Config- The Scene7 configassetHandle- Handle to the assetimageMap- list of predefinedScene7ImageMapDefinitionobjects- Returns:
- list of image map handles applied to the asset
- Throws:
AssertionError- in case of IPS failures or undefined data format
-
batchSetAssetMetadata
Scene7BatchMetadataResult batchSetAssetMetadata(S7Config s7Config, List<Scene7MetadataUpdate> updates) Sets asset metadata using batch mode.- Parameters:
s7Config- The Scene7 configupdates- List ofScene7ImageFieldUpdateto be applied- Returns:
Scene7BatchMetadataResultcontaining details on any warnings or errors- Throws:
AssertionError- in case of IPS failures or undefined data format
-
batchSetImageFields
Scene7BatchMetadataResult batchSetImageFields(S7Config s7Config, List<Scene7ImageFieldUpdate> updateArray) Sets asset metadata using batch mode.- Parameters:
s7Config- The Scene7 configupdateArray- List ofScene7ImageFieldUpdateto be applied- Returns:
Scene7BatchMetadataResultcontaining details on any warnings or errors- Throws:
AssertionError- in case of IPS failures or undefined data format
-
getPreviewServerUrl
Retrieves Scene7 remote asset preview /is/image/ URL (context path with image server uri). If resource is null, then returns DMS7 default S7Config preview URL- Parameters:
resource- Scene7 sync-ed asset in DAMconfigResolver- resource resolver with access to S7Config object- Returns:
- String Scene7 asset preview URL
-
getPublishServerUrl
Retrieves Scene7 remote asset publish /is/image/ URL (server domain and image server uri). If resource is null, then returns DMS7 default S7Config publish URL- Parameters:
resource- Scene7 sync-ed asset in DAMconfigResolver- resource resolver with access to S7Config object- Returns:
- String Scene7 asset publish URL
-
getPreviewVideoServerUrl
@Nullable @Nullable String getPreviewVideoServerUrl(Resource resource, ResourceResolver configResolver) Retrieves Scene7 remote video preview /is/content/ URL (context path with image server uri). If resource is null, then returns DMS7 default S7Config preview URL- Parameters:
resource- Scene7 sync-ed asset in DAMconfigResolver- resource resolver with access to S7Config object- Returns:
- String Scene7 asset preview URL
-
getPublishVideoServerUrl
@Nullable @Nullable String getPublishVideoServerUrl(Resource resource, ResourceResolver configResolver) Retrieves Scene7 remote video publish /is/content/ URL (server domain and image server uri). If resource is null, then returns DMS7 default S7Config preview URL- Parameters:
resource- Scene7 sync-ed asset in DAMconfigResolver- resource resolver with access to S7Config object- Returns:
- String Scene7 asset publish URL
-
getS7AssetMetadata
Retrieves a metadata map (key-value pair) associated with a Scene7 asset- Parameters:
s7Config- The Scene7 cloud configuration objectassetHandle- Scene7 unique asset identifier- Returns:
- Map key-value pairs metadata of Scene7 asset
- Throws:
AssertionError- in case of IPS failures or undefined data format
-
getS7VideoRenditions
Retrieves a list of Scene7 video renditions with their names and asset handles- Parameters:
s7Config- The Scene7 cloud configuration objectassetHandle- Scene7 unique asset identifier- Returns:
- List a list of Scene7Assets containing video rendition names and asset handles
- Throws:
AssertionError- in case of IPS failures or undefined data format
-
getScene7ID
Returns propertydam:scene7IDof a givenResourceobject- Parameters:
resource- Resource object on which to get Scene7 metadata- Returns:
- String value of
dam:scene7IDassociated toResourceor null if property is unavailable
-
isResourceLinkedToScene7
Returns true ifResourceobject is linked to Scene7 based on its metadata- Parameters:
resource- Resource object on which to get Scene7 metadata- Returns:
- true if
Resourceobject hasdam:scene7IDmetadata
-
getLinkedScene7ConfigPath
Returns propertydam:scene7CloudConfigPathof a givenResourceobject- Parameters:
resource- Resource object on which to get Scene7 metadata- Returns:
- String value of
dam:scene7CloudConfigPathassociated toResourceor null if property is unavailable
-
getContainerAssets
@Nullable @Nullable List<Scene7Asset> getContainerAssets(Scene7Asset scene7Asset, S7Config s7Config) -
moveAsset
Moves an asset to a specific folder- Parameters:
s7Config- Scene7 S7Config objectresource- Resource object to be relocatedfolder- Destination folder path- Returns:
- true/false of the moveAsset() operation succeeded
-
moveAssets
Moves multiple assets independently of each other- Parameters:
s7Config- Scene7 S7Config objectresourcesToFolders- Mapping of AEM resource to destination folder- Returns:
- true/false of the moveAssets() operation succeeded
-
moveFolder
Move a folder to a new location- Parameters:
s7Config- Scene7 S7Config objectsourceFolder- Path to source folderdestinationFolder- Path to destination folder- Returns:
- true/false of the moveFolder() operation succeeded
-
moveAssociatedAsset
Finds and moves generated assets to a specific folder- Parameters:
s7Config- Scene7 S7Config objectresource- Resource object to be relocatedfolder- Destination folder path- Returns:
- true/false of the moveAssociatedAsset() operation succeeded
-
renameAsset
Rename an asset- Parameters:
s7Config- Scene7 S7Config objectresource- Resource object to be renamedname- Asset's new name- Returns:
- true/false of the renameAsset() operation succeeded
-
renameFolder
Rename a folder- Parameters:
s7Config- Scene7 S7Config objectfolder- Folder to be renamedname- Folder's new name- Returns:
- true/false of the renameFolder() operation succeeded
-
updateSmartCrops
@Deprecated boolean updateSmartCrops(S7Config s7Config, Map<String, Map<String, Scene7NormalizedCropRect>> updateSmartCropMap) Deprecated.Update one or more Smart Crop sub asset(s)- Parameters:
s7Config- Scene7 S7Config objectupdateSmartCropMap- Map of owner handle, sub-asset asset handles and Scene7NormalizedCropRect objects- Returns:
- true/false of the updateSmartCrops() operation succeeded
-
updateSmartCrops
- Parameters:
s7Config- Scene7 S7Config objectasset- asset for updating associated smart cropssmartCrops- list of smart crops to be updated- Returns:
- true/false if the update is successful
-
setVideoThumbnail
Map<String,Integer> setVideoThumbnail(S7Config s7Config, String assetHandle, String thumbAssetHandle) Set the video thumbnail with a specifed thumbnail asset, not only for master video, all generated encoded videos and AVS files are also been set together- Parameters:
s7Config- the Scene7 configurationassetHandle- the S7 assetHandle of the master video that you want to set thumbnailthumbAssetHandle- the S7 assetHandle of the thumbnail asset- Returns:
-
getXMPPacket
Retrieves an XMP Metadata packet for the specified asset.- Parameters:
s7Config- the Scene7 configurationassetHandle- Handle to the asset you want to get XMP metadata- Returns:
- XMP metadata for the given assetHandle in XML format
-
updateXMPPacket
Sets or updates an XMP metadata packet for an asset.- Parameters:
s7Config- the Scene7 configurationassetHandle- Handle to the asset you want to get XMP metadataxmpPacketAsXml- updated XMP packet to update asset metadata in XML format
-
getLoginStatus
String getLoginStatus(ResourceResolver resourceResolver, String email, String password, String region) Checks the login in Scene7 with the given credentials- Parameters:
resourceResolver- resource resolver used to access Scene7 configurationemail- Email id of the userpassword- Password of the userregion- the user's region- Returns:
- the login status for the user.
-
setPassword
void setPassword(S7Config s7Config, String userHandle, String password, @Nullable @Nullable Integer validityInDays) Sets the password for a given user with an expiry of 100 years ahead from the current date.- Parameters:
s7Config- Scene7 configuration objectuserHandle- combination of IPS user handle and email idpassword- Password to be setvalidityInDays- Password validity in number of days. Set it to null/zero for default expiry of 100 years.
-
cdnCacheInvalidation
Forwards the supplied list of URLs to the Scene7 CDN (Content Distribution Network) provider to invalidate their existing cache of HTTP responses- Parameters:
s7Config- Scene7 configuration objecturlArray- List of up to 1000 URLs to invalidate from the CDN cache- Returns:
- CdnCacheInvalidationReturn IPS api response
-
flushCdnCacheByAlias
Forwards the supplied list of companyAliasURLs to the Scene7 CDN (Content Distribution Network) provider to invalidate their existing cache of HTTP responses.- Parameters:
s7Config- Scene7 configuration objectcompanyAliasUrlArray- List of up to 1000 URLs to invalidate from the CDN cache- Returns:
- CdnCacheInvalidationReturn IPS api response
-
getAndStoreSecureISAuthToken
Gets the token for a given company to access secure preview IS and stores in repository to cache token.- Parameters:
s7Config- Scene7 configuration object
-
deleteSubAssets
Deletes the sub assets for an asset- Parameters:
asset- Asset whose smart crops need to be removedsubAssetHandles- list of scene7 handles to the sub assetss7Config- the scene7 configuration- Returns:
- true if successfully deleted all subassets.
-
getIpsImageUrl
Gets the value of the ipsImageUrl property for an asset- Parameters:
asset- Asset whose ipsImageUrl need to be fetcheds7Config- Scene7 configuration object- Returns:
- ipsImageUrl for the asset. It may return null if ipsImageUrl is not present.
-
getCompanyInfoForCompanyName
Returns the Company object- Parameters:
companyName- company names7Config- Scene7 configuration object- Returns:
- the Company object corresponding to the companyName
- Throws:
AssertionError- in case of IPS failures or undefined data format
-
getVideoManifestURI
@Nullable @Nullable String getVideoManifestURI(Resource resource, ManifestType manifestType, boolean onlyIfPublished) throws Exception Returns the manifest url for videos- Parameters:
resource- video resourcemanifestType- type of video streaming manifest being requestedonlyIfPublished- return a manifest only if the video is published- Returns:
- the manifest url for videos
- Throws:
Exception
-
setAvsHandleAndOriginalAudioMetadata
Update audio metadata and avs id for video asset node which were processed before multi audio / caption changes- Parameters:
resource- video resource
-
parseAvsHandleAndOriginalAudioMetadata
Map<String,Object> parseAvsHandleAndOriginalAudioMetadata(Asset asset, Map<String, Object> metadata, Scene7Asset scene7Asset) Parse AVS asset handle and original audio metadata from received AVS data- Parameters:
asset- Scene7 asset parsed from AVS responsemetadata- map where default metadata will be updated- Returns:
- metadata map
-
createTemplate
Create a template on Scene7 server- Parameters:
templateProperties- the Scene7 template propertiess7Config- the Scene7 configuration- Returns:
- template asset handle
- Throws:
AssertionError- in case of IPS failures or undefined data format
-
setUrlModifier
Update the URL Modifier for a template on Scene7 server- Parameters:
assetHandle- the Scene7 template asset handlemodifier- the URL modifier to sets7Config- the Scene7 configuration- Throws:
AssertionError- in case of IPS failures
-
getVideoManifestAssociatedFiles
List<String> getVideoManifestAssociatedFiles(String avsFileName, S7Config s7Config) throws IllegalArgumentException, URISyntaxException, IOException Parse AVS content and returns list of file paths contained in video manifest- Parameters:
avsFileName- avs names7Config- Scene7 config- Returns:
- List of file paths present in video manifest i.e. m3u8, mpd
- Throws:
IllegalArgumentExceptionURISyntaxExceptionIOException
-
createImageSet(S7Config, String, String, String, Resource, String)