Interface Scene7Service


  • @ProviderType
    @NotNullApi
    public interface Scene7Service
    The Scene7Service provides methods for interacting with the official Scene7 API.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int CONTAINER
      Scene7 specification used in getAssociatedAssets - Array of set and template assets containing the specified asset.
      static int DERIVED
      Scene7 specification used in getAssociatedAssets - Array of assets that are derivatives of the specified asset.
      static int GENERATED
      Scene7 specification used in getAssociatedAssets - Array of assets that were generated from the specified asset.
      static int GENERATOR
      Scene7 specification used in getAssociatedAssets - Array of assets that were used to generate the specified asset.
      static int MEMBER
      Scene7 specification used in getAssociatedAssets - Array of assets contained by the specified set or template asset.
      static int OWNER
      Scene7 specification used in getAssociatedAssets - Array of assets that own the specified asset.
    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      java.lang.String addUser​(S7Config s7Config, java.lang.String firstName, java.lang.String lastName, java.lang.String email, java.lang.String defaultRole, java.lang.String password, @Nullable Instant passwordExpires, boolean isValid, java.util.List<Scene7CompanyMembership> membershipArray)
      Creates a user account and adds the account to one of more companies
      Scene7BatchMetadataResult batchSetAssetMetadata​(S7Config s7Config, java.util.List<Scene7MetadataUpdate> updates)
      Sets asset metadata using batch mode.
      Scene7BatchMetadataResult batchSetImageFields​(S7Config s7Config, java.util.List<Scene7ImageFieldUpdate> updateArray)
      Sets asset metadata using batch mode.
      CdnCacheInvalidationReturn 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 java.lang.String createAssetSet​(S7Config s7Config, java.lang.String folder, java.lang.String name, java.lang.String type, @Nullable Resource resource, @Nullable Scene7AssetSet setDefinition, @Nullable java.lang.String thumbAssetHandle)
      Create an AssetSet asset on Scene7 server
      java.lang.String createFolder​(S7Config s7Config, java.lang.String cqFolderPath)
      Create a folder on Scene7 server
      java.lang.String createImageSet​(S7Config s7Config, @Nullable java.lang.String imageSetFolder, java.lang.String imageSetName, @Nullable java.lang.String thumbAssetHandle)
      @Nullable java.lang.String createImageSet​(S7Config s7Config, java.lang.String folder, java.lang.String name, java.lang.String type, @Nullable Resource resource, @Nullable java.lang.String thumbAssetHandle)
      Create an ImageSet asset on Scene7 server
      java.lang.String createPropertySet​(S7Config s7Config, java.lang.String typeHandle, java.util.Map<java.lang.String,​java.lang.Object> props)
      Create PropertySet of given type, and store given Properties to it.
      java.lang.String createViewerPreset​(S7Config s7Config, java.lang.String folderHandle, java.lang.String name, java.lang.String type, @Nullable java.util.List<Scene7ConfigSetting> configSettings)
      java.lang.String createViewerPreset​(S7Config s7Config, java.lang.String folderHandle, java.lang.String name, java.lang.String type, @Nullable Resource resource, @Nullable java.util.List<Scene7ConfigSetting> configSettings)
      Create a preset view to determine what users can see.
      java.lang.String deleteAsset​(java.lang.String assetHandle, S7Config s7Config)
      Returns a String success, note that the underlying S7 API call does not provide a data response.
      java.lang.String deleteAssets​(java.lang.String[] assetHandleArr, S7Config s7Config)
      Delete multiple assets Returns a String success, note that the underlying S7 API call does not provide a data response.
      java.lang.String deleteFolder​(java.lang.String folderHandle, S7Config s7Config)
      Returns a String success, note that the underlying S7 API call does not provide a data response.
      java.lang.String deleteImageFormat​(S7Config s7Config, java.lang.String imageFormatHandle)
      java.lang.String deleteImageFormat​(S7Config s7Config, java.lang.String imageFormatHandle, @Nullable java.lang.String path)
      Deletes an image format.
      void deleteImageMap​(S7Config s7Config, java.lang.String imageMapHandle)
      Deletes an image map
      boolean deleteSubAssets​(Asset asset, java.util.List<java.lang.String> subAssetHandles, S7Config s7Config)
      Deletes the sub assets for an asset
      CdnCacheInvalidationReturn flushCdnCacheByAlias​(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.
      java.util.List<Scene7User> getAllUsers​(S7Config s7Config, boolean includeInvalid)
      Return all users
      java.lang.String getAndStoreSecureISAuthToken​(S7Config s7Config)
      Gets the token for a given company to access secure preview IS and stores in repository to cache token.
      @Nullable java.lang.String getApplicationPropertyHandle​(S7Config s7Config)
      Returns the application property handle.
      @Nullable Scene7Asset getAsset​(java.lang.String assetHandle, java.lang.String[] responseFields, java.lang.String[] excludeFields, S7Config s7Config)
      Returns a single Scene7Asset object.
      java.util.List<Scene7Asset> getAssets​(java.lang.String[] assetHandles, java.lang.String[] responseFields, java.lang.String[] excludeFields, S7Config s7Config)
      Returns a Scene7Asset list, based on a list of asset handles
      @Nullable Scene7Asset getAssociatedAssets​(Scene7Asset asset, S7Config s7Config)
      Retrieves the sub-assets and the origiator asset associated with the given asset
      Company getCompanyInfoForCompanyName​(java.lang.String companyName, S7Config s7Config)
      Returns the Company object
      java.lang.String getCompanyMembership​(ResourceResolver resourceResolver, java.lang.String userHandle, java.lang.String email, java.lang.String password, java.lang.String region)
      Returns a JSON representation of the company membership information provided by Scene7.
      @Nullable java.util.List<Scene7Asset> getContainerAssets​(Scene7Asset scene7Asset, S7Config s7Config)  
      java.lang.String getFlashTemplatesServer​(S7Config s7Config)
      Deprecated.
      java.lang.String getFolderHandle​(java.lang.String cqFolderPath, S7Config s7Config)
      Returns s7 folder handle for the associated cq folder
      Scene7Folder getFolderTree​(java.lang.String folderPath, int depth, java.lang.String[] responseFields, java.lang.String[] excludeFields, S7Config s7Config)
      Returns a Scene7Folder holding a tree structure
      java.lang.String getFxgServer​(S7Config s7Config)
      Deprecated.
      @Nullable Scene7Asset getGeneratedAssets​(Scene7Asset asset, S7Config s7Config)
      Retrieves the generated assets associated with the given input asset
      java.util.List<Scene7ImageFormat> getImageFormats​(S7Config s7Config)
      Returns image formats, such as PDF, EPS, SWF, and others.
      java.util.List<java.lang.String> getImagePresets​(S7Config s7Config)
      Returns a list of Scene7 image preset names for the given S7Config
      ImageSetMemberArray getImageSetMembers​(S7Config s7Config, java.lang.String assetHandle)
      Get members of legacy ImageSet
      @Nullable java.lang.String getIpsImageUrl​(Asset asset, S7Config s7Config)
      Gets the value of the ipsImageUrl property for an asset
      java.util.List<java.lang.String> getJobLogDetails​(java.lang.String jobHandle, S7Config s7Config)
      Returns a list of Scene7 asset handles(Strings) for the given job handle
      java.util.List<UploadJobDetail> getJobLogDetailsByJobName​(java.lang.String jobName, S7Config s7Config)
      Returns a list of UploadJobDetail objects for the given job name
      java.lang.String getJobStatus​(S7Config s7Config, java.lang.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 java.lang.String getLinkedScene7ConfigPath​(Resource resource)
      Returns property dam:scene7CloudConfigPath of a given Resource object
      java.lang.String getLoginStatus​(ResourceResolver resourceResolver, java.lang.String email, java.lang.String password, java.lang.String region)
      Checks the login in Scene7 with the given credentials
      @Nullable Scene7Asset getMasterAsset​(Scene7Asset asset, S7Config s7Config)
      Retrieves the originator asset associated with the given asset
      java.util.ArrayList<UploadJobDetail> getMultiFileJobLogDetails​(java.lang.String jobHandle, S7Config s7Config)
      Returns an Arraylist of job details objects
      @Nullable java.lang.String getPreviewServerUrl​(Resource resource, ResourceResolver configResolver)
      Retrieves Scene7 remote asset preview /is/image/ URL (context path with image server uri).
      @Nullable java.lang.String getPreviewVideoServerUrl​(Resource resource, ResourceResolver configResolver)
      Retrieves Scene7 remote video preview /is/content/ URL (context path with image server uri).
      java.util.List<Scene7PropertySet> getPropertySets​(java.lang.String typeHandle, S7Config s7Config)
      Returns the video encoder preset type handle.
      @Nullable java.lang.String getPropertySetTypeHandle​(S7Config s7Config, java.lang.String typeName)
      Returns the handle for IPS PropertySet type by its name.
      @Nullable java.lang.String getPublishServer​(S7Config s7Config)
      Returns the domain name of the S7 publish server
      @Nullable java.lang.String getPublishServerUrl​(Resource resource, ResourceResolver configResolver)
      Retrieves Scene7 remote asset publish /is/image/ URL (server domain and image server uri).
      @Nullable java.lang.String getPublishVideoServerUrl​(Resource resource, ResourceResolver configResolver)
      Retrieves Scene7 remote video publish /is/content/ URL (server domain and image server uri).
      @Nullable java.util.Map<java.lang.String,​java.lang.String> getS7AssetMetadata​(S7Config s7Config, java.lang.String assetHandle)
      Retrieves a metadata map (key-value pair) associated with a Scene7 asset
      @Nullable java.util.List<Scene7Asset> getS7VideoRenditions​(S7Config s7Config, java.lang.String assetHandle)
      Retrieves a list of Scene7 video renditions with their names and asset handles
      @Nullable java.lang.String getScene7ID​(Resource resource)
      Returns property dam:scene7ID of a given Resource object
      java.lang.String getUserHandle​(ResourceResolver resourceResolver, java.lang.String email, java.lang.String password, java.lang.String region)
      Returns a unique user handle from Scene7.
      java.util.List<Scene7User> getUsers​(S7Config s7Config, @Nullable java.lang.Boolean includeInactive, @Nullable java.lang.Boolean includeInvalid, @Nullable java.util.List<java.lang.String> companyHandleArray, @Nullable java.util.List<java.lang.String> groupHandleArray, @Nullable java.util.List<java.lang.String> userRoleArray, @Nullable java.lang.String charFilterField, @Nullable java.lang.String charFilter, @Nullable java.lang.String sortBy, @Nullable java.lang.Integer recordsPerPage, @Nullable java.lang.Integer resultsPage)
      Return a optionally sorted, filtered and paged list user results
      @Nullable java.lang.String getVideoEncoderPresetTypeHandle​(S7Config s7Config)
      Returns the video encoder preset type handle.
      Scene7ViewerConfig getViewerConfigSettings​(S7Config s7Config, java.lang.String assetHandle)
      Get the viewer configuration for the referenced asset
      java.lang.String getXMPPacket​(S7Config s7Config, java.lang.String assetHandle)
      Retrieves an XMP Metadata packet for the specified asset.
      boolean isJobActiveByJobHandle​(java.lang.String jobHandle, S7Config s7Config)  
      boolean isJobActiveByOriginalName​(java.lang.String originalName, S7Config s7Config)  
      boolean isResourceLinkedToScene7​(Resource resource)
      Returns true if Resource object is linked to Scene7 based on its metadata
      boolean moveAsset​(S7Config s7Config, Resource resource, java.lang.String folder)
      Moves an asset to a specific folder
      boolean moveAssets​(S7Config s7Config, java.util.Map<Resource,​java.lang.String> resourcesToFolders)
      Moves multiple assets independently of each other
      boolean moveAssociatedAsset​(S7Config s7Config, Resource resource, java.lang.String folder)
      Finds and moves generated assets to a specific folder
      boolean moveFolder​(S7Config s7Config, java.lang.String sourceFolder, java.lang.String destinationFolder)
      Move a folder to a new location
      boolean renameAsset​(S7Config s7Config, Resource resource, java.lang.String name)
      Rename an asset
      boolean renameFolder​(S7Config s7Config, java.lang.String folder, java.lang.String name)
      Rename a folder
      java.lang.String saveImageFormat​(S7Config s7Config, @Nullable java.lang.String imageFormatHandle, java.lang.String name, java.lang.String urlModifier)
      java.lang.String saveImageFormat​(S7Config s7Config, @Nullable java.lang.String imageFormatHandle, java.lang.String name, java.lang.String urlModifier, @Nullable Resource resource)
      Create an image format.
      java.lang.String saveImageMap​(S7Config s7Config, java.lang.String assetHandle, @Nullable java.lang.String imageMapHandle, java.lang.String name, java.lang.String shapeType, java.lang.String region, java.lang.String action, int position, boolean enabled)
      Create a new image map or edit an existing map
      java.util.List<Scene7Asset> searchAssets​(java.lang.String folder, java.lang.Boolean includeSubfolders, java.lang.Boolean published, java.lang.String[] assetTypes, java.lang.String[] assetSubTypes, java.lang.String[] responseFields, java.lang.String[] excludeFields, int recordsPerPage, int resultsPage, S7Config s7Config)
      Retrieves a list of Scene7Assets from the Scene7 server.
      java.util.List<Scene7Asset> searchAssets​(java.lang.String folder, java.lang.Boolean includeSubfolders, java.lang.Boolean published, java.lang.String[] assetTypes, java.lang.String[] assetSubTypes, java.lang.String[] responseFields, java.lang.String[] excludeFields, S7Config s7Config)
      Retrieves a list of Scene7Assets from the Scene7 server.
      java.util.List<Scene7Asset> searchAssetsByFilename​(java.lang.String folder, java.lang.Boolean includeSubfolders, java.lang.Boolean published, java.lang.String filename, S7Config s7Config)
      Retrieve a list of Scene7Assets from the Scene7 server by filename.
      java.util.List<Scene7Asset> searchAssetsByMetadata​(java.lang.String folder, java.lang.Boolean includeSubfolders, java.lang.String[] assetTypes, java.lang.String[] assetSubTypes, java.lang.Boolean published, MetadataCondition[] conditions, int recordsPerPage, int resultsPage, S7Config s7Config)
      Returns a DOM list with search results (from metadata), support specify
      java.util.List<Scene7Asset> searchAssetsByMetadata​(java.lang.String folder, java.lang.Boolean includeSubfolders, java.lang.String[] assetTypes, java.lang.String[] assetSubTypes, java.lang.Boolean published, MetadataCondition[] conditions, S7Config s7Config)
      Returns a DOM list with search results (from metadata)
      java.util.List<Scene7Asset> searchAssetsByName​(java.lang.String folder, java.lang.Boolean includeSubfolders, java.lang.Boolean published, java.lang.String name, S7Config s7Config)
      Retrieve a list of Scene7Assets from the Scene7 server by Scene7 asset name.
      java.util.List<Scene7Asset> searchAssetsByPartialName​(java.lang.String folder, java.lang.Boolean includeSubfolders, java.lang.Boolean published, java.lang.String name, java.lang.String conditionMode, S7Config s7Config)
      Retrieve a list of Scene7Assets from the Scene7 server by Scene7 asset name with partial name search option
      java.lang.String setAssetPublishState​(java.lang.String assetHandle, boolean markForPublish, S7Config s7Config)
      Set the publish state of a given Scene7 asset
      java.lang.String setAssetPublishState​(Resource resource, boolean markForPublish, S7Config s7Config)
      Set the publish state of a given Scene7 asset
      java.lang.String setAssetsPublishState​(java.util.Set<java.lang.String> assetHandles, boolean markForPublish, S7Config s7Config)
      Set the publish state of a given Scene7 assets
      java.util.List<java.lang.String> setImageMaps​(S7Config s7Config, java.lang.String assetHandle, java.util.List<Scene7ImageMapDefinition> imageMap)
      Sets the image map for an asset.
      void setPassword​(S7Config s7Config, java.lang.String userHandle, java.lang.String password, @Nullable java.lang.Integer validityInDays)
      Sets the password for a given user with an expiry of 100 years ahead from the current date.
      void setUserInfo​(S7Config s7Config, @Nullable java.lang.String userHandle, java.lang.String firstName, java.lang.String lastName, java.lang.String email, java.lang.String defaultRole, @Nullable Instant passwordExpires, boolean isValid, java.util.List<Scene7CompanyMembership> membershipArray)
      Set user attributes
      java.util.Map<java.lang.String,​java.lang.Integer> setVideoThumbnail​(S7Config s7Config, java.lang.String assetHandle, java.lang.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
      void setViewerConfigSettings​(S7Config s7Config, java.lang.String assetHandle, java.lang.String name, java.lang.String type, java.util.List<Scene7ConfigSetting> configSettings)
      Attach viewer configuration settings to an asset Can be viewer preset or the source asset for the viewer
      java.lang.String submitReprocessAssetsThumbnailJob​(S7Config s7Config, java.lang.String jobName, java.lang.String assetHandle, long thumbnailTime)
      Submit a job to S7 for reprocessing video thumbnail to a specified video frame time
      void updateAssetSet​(S7Config s7Config, java.lang.String assetHandle, @Nullable Scene7AssetSet setDefinition, @Nullable java.lang.String thumbAssetHandle)
      Update an AssetSet on Scene7 server
      void updateImageSet​(S7Config s7Config, java.lang.String assetHandle, @Nullable ImageSetMemberUpdateArray members, @Nullable java.lang.String thumbAssetHandle)
      Update an ImageSet on Scene7 server
      void updateImageSet​(S7Config s7Config, java.lang.String imageSetAssetHandle, java.util.List<java.lang.String> setMemberHandles, @Nullable java.lang.String thumbAssetHandle)
      void updatePropertySet​(S7Config s7Config, java.lang.String setHandle, java.util.Map<java.lang.String,​java.lang.Object> props)
      Update the PropertySet with the new set of Properties, replacing existing ones.
      void updatePropertySet​(java.lang.String setHandle, java.lang.String propKey, java.lang.String propValue, S7Config s7Config)
      Update single property in the PropertySet.
      boolean updateSmartCrops​(S7Config s7Config, Asset asset, java.util.List<SmartCrop> smartCrops)  
      boolean updateSmartCrops​(S7Config s7Config, java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​Scene7NormalizedCropRect>> updateSmartCropMap)
      Deprecated.
      void updateViewerConfigSettings​(S7Config s7Config, java.lang.String assetHandle, java.util.List<Scene7ConfigSetting> configSettings)
      Updates SWF viewer configuration settings.
      void updateXMPPacket​(S7Config s7Config, java.lang.String assetHandle, java.lang.String xmpPacketAsXml)
      Sets or updates an XMP metadata packet for an asset.
    • Field Detail

      • CONTAINER

        static final int CONTAINER
        Scene7 specification used in getAssociatedAssets - Array of set and template assets containing the specified asset.
        See Also:
        Constant Field Values
      • MEMBER

        static final int MEMBER
        Scene7 specification used in getAssociatedAssets - Array of assets contained by the specified set or template asset.
        See Also:
        Constant Field Values
      • OWNER

        static final int OWNER
        Scene7 specification used in getAssociatedAssets - Array of assets that own the specified asset.
        See Also:
        Constant Field Values
      • DERIVED

        static final int DERIVED
        Scene7 specification used in getAssociatedAssets - Array of assets that are derivatives of the specified asset.
        See Also:
        Constant Field Values
      • GENERATOR

        static final int GENERATOR
        Scene7 specification used in getAssociatedAssets - Array of assets that were used to generate the specified asset.
        See Also:
        Constant Field Values
      • GENERATED

        static final int GENERATED
        Scene7 specification used in getAssociatedAssets - Array of assets that were generated from the specified asset.
        See Also:
        Constant Field Values
    • Method Detail

      • getPublishServer

        @Nullable
        @Nullable java.lang.String getPublishServer​(S7Config s7Config)
        Returns the domain name of the S7 publish server
        Parameters:
        s7Config -
        Returns:
        A string, null if not present
        Throws:
        java.lang.AssertionError - in case of IPS failures or undefined data format
      • getApplicationPropertyHandle

        @Nullable
        @Nullable java.lang.String getApplicationPropertyHandle​(S7Config s7Config)
        Returns the application property handle.
        Parameters:
        s7Config - the Scene7 configuration
        Returns:
        the application property handle, null if not present
        Throws:
        java.lang.AssertionError - in case of IPS failures or undefined data format
      • getVideoEncoderPresetTypeHandle

        @Nullable
        @Nullable java.lang.String getVideoEncoderPresetTypeHandle​(S7Config s7Config)
        Returns the video encoder preset type handle.
        Parameters:
        s7Config - the Scene7 configuration
        Returns:
        the video encoder preset type handle, null if not present
        Throws:
        java.lang.AssertionError - in case of IPS failures or undefined data format
      • getPropertySetTypeHandle

        @Nullable
        @Nullable java.lang.String getPropertySetTypeHandle​(S7Config s7Config,
                                                            java.lang.String typeName)
        Returns the handle for IPS PropertySet type by its name.
        Parameters:
        s7Config - the Scene7 configuration
        Returns:
        the PropertySet type's handle, or null if not present
        Throws:
        java.lang.AssertionError - in case of IPS or other failure
      • getPropertySets

        java.util.List<Scene7PropertySet> getPropertySets​(java.lang.String typeHandle,
                                                          S7Config s7Config)
        Returns the video encoder preset type handle.
        Parameters:
        typeHandle - - the type handle
        s7Config - the Scene7 configuration
        Returns:
        the list of property sets
        Throws:
        java.lang.AssertionError - in case of IPS failures or undefined data format
      • createPropertySet

        java.lang.String createPropertySet​(S7Config s7Config,
                                           java.lang.String typeHandle,
                                           java.util.Map<java.lang.String,​java.lang.Object> props)
        Create PropertySet of given type, and store given Properties to it.
        Parameters:
        s7Config - the Scene7 configuration
        typeHandle - PropertySet type handle
        props - array of Properties (Key-Value pairs) to put into new PropertySet
        Returns:
        the handle of newly created PropertySet
        Throws:
        java.lang.AssertionError - in case of IPS or other failure
      • updatePropertySet

        void updatePropertySet​(S7Config s7Config,
                               java.lang.String setHandle,
                               java.util.Map<java.lang.String,​java.lang.Object> props)
        Update the PropertySet with the new set of Properties, replacing existing ones.
        Parameters:
        s7Config - the Scene7 configuration
        setHandle - PropertySet handle
        props - array of Properties (Key-Value pairs) to put into PropertySet
        Throws:
        java.lang.AssertionError - in case of IPS or other failure
      • updatePropertySet

        void updatePropertySet​(java.lang.String setHandle,
                               java.lang.String propKey,
                               java.lang.String propValue,
                               S7Config s7Config)
        Update single property in the PropertySet.
        Parameters:
        setHandle - the set handle for the company settings
        propKey - property key name
        propValue - property key value
        s7Config - the Scene7 configuration
        Throws:
        java.lang.AssertionError - in case of IPS or other failure
      • getUserHandle

        java.lang.String getUserHandle​(ResourceResolver resourceResolver,
                                       java.lang.String email,
                                       java.lang.String password,
                                       java.lang.String region)
        Returns a unique user handle from Scene7.
        Parameters:
        resourceResolver - resource resolver used to access Scene7 configuration
        email - E-Mail address
        password - Password
        region - Region of the Scene7 service
        Returns:
        A unique user handle
        Throws:
        java.lang.AssertionError - in case of IPS failures or undefined data format
      • getCompanyMembership

        java.lang.String getCompanyMembership​(ResourceResolver resourceResolver,
                                              java.lang.String userHandle,
                                              java.lang.String email,
                                              java.lang.String password,
                                              java.lang.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 configuration
        userHandle - Unique user handle
        email - E-Mail address
        password - Password
        region - Region of the Scene7 service
        Returns:
        A JSON string
        Throws:
        java.lang.AssertionError - in case of IPS failures or undefined data format
      • getFolderTree

        Scene7Folder getFolderTree​(java.lang.String folderPath,
                                   int depth,
                                   java.lang.String[] responseFields,
                                   java.lang.String[] excludeFields,
                                   S7Config s7Config)
        Returns a Scene7Folder holding 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 tree
        excludeFields - - fields to be excluded in each node of the tree
        s7Config -
        Returns:
        A Scene7Folder object containing the requested folder structure
        Throws:
        java.lang.AssertionError - in case of IPS failures or undefined data format
      • getFolderHandle

        java.lang.String getFolderHandle​(java.lang.String cqFolderPath,
                                         S7Config s7Config)
        Returns s7 folder handle for the associated cq folder
        Parameters:
        cqFolderPath - - the path the target cq folder targeted in the s7 folder organization
        s7Config -
        Returns:
        folder handle or null if the folder does not exist in s7.
        Throws:
        java.lang.AssertionError - in case of IPS failures or undefined data format
      • deleteFolder

        java.lang.String deleteFolder​(java.lang.String folderHandle,
                                      S7Config s7Config)
        Returns a String success, note that the underlying S7 API call does not provide a data response.
        Parameters:
        folderHandle - - folder to be deleted
        s7Config - - s7 config based on cloud service config info.
        Returns:
        String success
        Throws:
        java.lang.AssertionError - in case of IPS failures
      • deleteAsset

        java.lang.String deleteAsset​(java.lang.String assetHandle,
                                     S7Config s7Config)
        Returns a String success, note that the underlying S7 API call does not provide a data response.
        Parameters:
        assetHandle - - asset to be deleted
        s7Config - - s7 config based on cloud service config info.
        Returns:
        String success
        Throws:
        java.lang.AssertionError - in case of IPS failures or undefined data format
      • deleteAssets

        java.lang.String deleteAssets​(java.lang.String[] assetHandleArr,
                                      S7Config s7Config)
        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 deleted
        s7Config - - s7 config based on cloud service config info.
        Returns:
        String success
        Throws:
        java.lang.AssertionError - in case of IPS failures or undefined data format
      • searchAssetsByMetadata

        java.util.List<Scene7Asset> searchAssetsByMetadata​(java.lang.String folder,
                                                           java.lang.Boolean includeSubfolders,
                                                           java.lang.String[] assetTypes,
                                                           java.lang.String[] assetSubTypes,
                                                           java.lang.Boolean published,
                                                           MetadataCondition[] conditions,
                                                           S7Config s7Config)
        Returns a DOM list with search results (from metadata)
        Parameters:
        folder - - all matched assets will be in this folder
        includeSubfolders - - whether to recursively search for assets
        assetTypes - - all matched assets will be one of these types
        assetSubTypes - array of sub Asset Types to include in search
        published - - whether the matched assets must be marked for publish (only marked - not necessarily actually published)
        conditions - - metadata conditions for search
        s7Config -
        Returns:
        A list of assets; the list can be empty if no assets have been found.
        Throws:
        java.lang.AssertionError - in case of IPS failures
      • submitReprocessAssetsThumbnailJob

        java.lang.String submitReprocessAssetsThumbnailJob​(S7Config s7Config,
                                                           java.lang.String jobName,
                                                           java.lang.String assetHandle,
                                                           long thumbnailTime)
        Submit a job to S7 for reprocessing video thumbnail to a specified video frame time
        Parameters:
        s7Config - the Scene7 configuration
        jobName - the name of the job
        assetHandle - the asset handle
        thumbnailTime - the frame time
        Returns:
        the scene7 jobHandle, return empty string if failed to get it
      • searchAssetsByMetadata

        java.util.List<Scene7Asset> searchAssetsByMetadata​(java.lang.String folder,
                                                           java.lang.Boolean includeSubfolders,
                                                           java.lang.String[] assetTypes,
                                                           java.lang.String[] assetSubTypes,
                                                           java.lang.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 folder
        includeSubfolders - - whether to recursively search for assets
        assetTypes - - all matched assets will be one of these types
        assetSubTypes - array of sub Asset Types to include in search
        published - - whether the matched assets must be marked for publish (only marked - not necessarily actually published)
        conditions - - metadata conditions for search
        recordsPerPage - maximum number of results to return
        resultsPage - specifies the page of results to return, based on recordsPerPage page size
        s7Config -
        Returns:
        A list of assets; the list can be empty if no assets have been found.
        Throws:
        java.lang.AssertionError - in case of IPS failures
      • getAssets

        java.util.List<Scene7Asset> getAssets​(java.lang.String[] assetHandles,
                                              java.lang.String[] responseFields,
                                              java.lang.String[] excludeFields,
                                              S7Config s7Config)
        Returns a Scene7Asset list, based on a list of asset handles
        Parameters:
        assetHandles - - the assets to retrieve
        responseFields - - fields to be filled in for each node in the tree
        excludeFields - - fields to be excluded in each node of the tree
        s7Config -
        Returns:
        A Scene7Asset list
        Throws:
        java.lang.AssertionError - in case of IPS failures
      • getAsset

        @Nullable
        @Nullable Scene7Asset getAsset​(java.lang.String assetHandle,
                                       java.lang.String[] responseFields,
                                       java.lang.String[] excludeFields,
                                       S7Config s7Config)
        Returns a single Scene7Asset object. If there are multiple matching assets found, return the first asset.
        Parameters:
        assetHandle - - the asset to retrieve
        responseFields - - fields to be filled in for each node in the tree
        excludeFields - - fields to be excluded in each node of the tree
        s7Config - - Scene7 cloud configuration object
        Returns:
        A Scene7Asset object, or null if not found or failed
        Throws:
        java.lang.AssertionError - in case of IPS failures
      • getMultiFileJobLogDetails

        java.util.ArrayList<UploadJobDetail> getMultiFileJobLogDetails​(java.lang.String jobHandle,
                                                                       S7Config s7Config)
        Returns an Arraylist of job details objects
        Parameters:
        jobHandle - - the handle for the job to get details.
        s7Config -
        Returns:
        An AssetList of UploadJobDetail
        Throws:
        java.lang.AssertionError - in case of IPS failures or undefined data format
      • isJobActiveByJobHandle

        boolean isJobActiveByJobHandle​(java.lang.String jobHandle,
                                       S7Config s7Config)
        Parameters:
        jobHandle - of the job
        s7Config -
        Returns:
        true if active job with this jobHandle or orginalName is active, false otherwise
        Throws:
        java.lang.AssertionError - in case of IPS failures or undefined data format
      • isJobActiveByOriginalName

        boolean isJobActiveByOriginalName​(java.lang.String originalName,
                                          S7Config s7Config)
        Parameters:
        originalName - of the job
        s7Config -
        Returns:
        true if active job with this jobHandle or orginalName is active, false otherwise
        Throws:
        java.lang.AssertionError - in case of IPS failures or undefined data format
      • getJobLogDetails

        java.util.List<java.lang.String> getJobLogDetails​(java.lang.String jobHandle,
                                                          S7Config s7Config)
        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:
        java.lang.AssertionError - in case of IPS failures or undefined data format
      • getJobLogDetailsByJobName

        java.util.List<UploadJobDetail> getJobLogDetailsByJobName​(java.lang.String jobName,
                                                                  S7Config s7Config)
        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:
        java.lang.AssertionError - in case of IPS failures or undefined data format
      • getJobStatus

        java.lang.String getJobStatus​(S7Config s7Config,
                                      java.lang.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
        Parameters:
        s7Config - the Scene7 configuration
        jobName - 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

        java.util.List<java.lang.String> getImagePresets​(S7Config s7Config)
        Returns a list of Scene7 image preset names for the given S7Config
        Parameters:
        s7Config -
        Returns:
        a list containing the names of the image presets defined in SPS
        Throws:
        java.lang.AssertionError - in case of IPS failures or undefined data format
      • getFlashTemplatesServer

        @Deprecated
        java.lang.String getFlashTemplatesServer​(S7Config s7Config)
        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

        java.util.List<Scene7Asset> searchAssets​(java.lang.String folder,
                                                 java.lang.Boolean includeSubfolders,
                                                 java.lang.Boolean published,
                                                 java.lang.String[] assetTypes,
                                                 java.lang.String[] assetSubTypes,
                                                 java.lang.String[] responseFields,
                                                 java.lang.String[] excludeFields,
                                                 S7Config s7Config)
        Retrieves a list of Scene7Assets from the Scene7 server.
        Parameters:
        folder - the folder from which the assets are retrieved
        includeSubfolders - whether to recursively search for assets in sub-folders of the folder where the search is performed
        published - whether the matched assets must be marked for publish (only marked - not necessarily actually published)
        assetTypes - all matched assets will be one of these types
        assetSubTypes - array of sub Asset Types to include in search
        responseFields - the response fields that should be used to populate the Scene7Asset's attributes
        excludeFields - fields to be excluded from the response
        s7Config - the Scene7 configuration
        Returns:
        a List of assets; can be empty if no assets have been found
        Throws:
        java.lang.AssertionError - in case of IPS failures
      • searchAssets

        java.util.List<Scene7Asset> searchAssets​(java.lang.String folder,
                                                 java.lang.Boolean includeSubfolders,
                                                 java.lang.Boolean published,
                                                 java.lang.String[] assetTypes,
                                                 java.lang.String[] assetSubTypes,
                                                 java.lang.String[] responseFields,
                                                 java.lang.String[] excludeFields,
                                                 int recordsPerPage,
                                                 int resultsPage,
                                                 S7Config s7Config)
        Retrieves a list of Scene7Assets from the Scene7 server.
        Parameters:
        folder - the folder from which the assets are retrieved
        includeSubfolders - whether to recursively search for assets in sub-folders of the folder where the search is performed
        published - whether the matched assets must be marked for publish (only marked - not necessarily actually published)
        assetTypes - all matched assets will be one of these types
        assetSubTypes - array of sub Asset Types to include in search
        responseFields - the response fields that should be used to populate the Scene7Asset's attributes
        excludeFields - fields to be excluded from the response
        recordsPerPage - maximum number of results to return
        resultsPage - specifies the page of results to return, based on recordsPerPage page size
        s7Config - the Scene7 configuration
        Returns:
        a List of assets; can be empty if no assets have been found
        Throws:
        java.lang.AssertionError - in case of IPS failures
      • searchAssetsByFilename

        java.util.List<Scene7Asset> searchAssetsByFilename​(java.lang.String folder,
                                                           java.lang.Boolean includeSubfolders,
                                                           java.lang.Boolean published,
                                                           java.lang.String filename,
                                                           S7Config s7Config)
        Retrieve a list of Scene7Assets from the Scene7 server by filename.
        Parameters:
        folder -
        includeSubfolders -
        published -
        filename -
        s7Config -
        Returns:
        Throws:
        java.lang.AssertionError - in case of IPS failures
      • searchAssetsByName

        java.util.List<Scene7Asset> searchAssetsByName​(java.lang.String folder,
                                                       java.lang.Boolean includeSubfolders,
                                                       java.lang.Boolean published,
                                                       java.lang.String name,
                                                       S7Config s7Config)
        Retrieve a list of Scene7Assets from the Scene7 server by Scene7 asset name.
        Parameters:
        folder - remote search folder path
        includeSubfolders - to include children folders
        published - to include published or non-published assets
        name - Scene7 name of target asset
        s7Config - Scene7 cloud configuration
        Throws:
        java.lang.AssertionError - in case of IPS failures
      • searchAssetsByPartialName

        java.util.List<Scene7Asset> searchAssetsByPartialName​(java.lang.String folder,
                                                              java.lang.Boolean includeSubfolders,
                                                              java.lang.Boolean published,
                                                              java.lang.String name,
                                                              java.lang.String conditionMode,
                                                              S7Config s7Config)
        Retrieve a list of Scene7Assets from the Scene7 server by Scene7 asset name with partial name search option
        Parameters:
        folder - remote search folder path
        includeSubfolders - to include children folders
        published - to include published or non-published assets
        name - Scene7 name of target asset
        conditionMode - partial name search condition mode. Currently supported modes are "Equals" and "StartsWith"
        s7Config - Scene7 cloud configuration
        Returns:
        a list of Scene7Assets
      • getGeneratedAssets

        @Nullable
        @Nullable Scene7Asset getGeneratedAssets​(Scene7Asset asset,
                                                 S7Config s7Config)
        Retrieves the generated assets associated with the given input asset
        Parameters:
        asset - - the asset to get the sub-assets and generator from
        s7Config - - the Scene7 configuration
        Returns:
        the original Scene7Asset object updated with the sub-assets and the originator asset
        Throws:
        java.lang.AssertionError - in case of IPS failures
      • getAssociatedAssets

        @Nullable
        @Nullable Scene7Asset getAssociatedAssets​(Scene7Asset asset,
                                                  S7Config s7Config)
        Retrieves the sub-assets and the origiator asset associated with the given asset
        Parameters:
        asset - - the asset to get the sub-assets and generator from
        s7Config - - the Scene7 configuration
        Returns:
        the original Scene7Asset object updated with the sub-assets and the originator asset
        Throws:
        java.lang.AssertionError - in case of IPS failures
      • getMasterAsset

        @Nullable
        @Nullable Scene7Asset getMasterAsset​(Scene7Asset asset,
                                             S7Config s7Config)
        Retrieves the originator asset associated with the given asset
        Parameters:
        asset - - the asset to get the originator asset
        s7Config - - the Scene7 configuration
        Returns:
        the original Scene7Asset object updated with the originator asset
        Throws:
        java.lang.AssertionError - in case of IPS failures
      • getFxgServer

        @Deprecated
        java.lang.String getFxgServer​(S7Config s7Config)
        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

        java.lang.String setAssetPublishState​(Resource resource,
                                              boolean markForPublish,
                                              S7Config s7Config)
        Set the publish state of a given Scene7 asset
        Parameters:
        resource - activated resource
        markForPublish - value of markForPublish flag
        s7Config - the Scene7 configuration
        Returns:
        String success / failure
        Throws:
        java.lang.AssertionError - in case of IPS failures or undefined data format
      • setAssetPublishState

        java.lang.String setAssetPublishState​(java.lang.String assetHandle,
                                              boolean markForPublish,
                                              S7Config s7Config)
        Set the publish state of a given Scene7 asset
        Parameters:
        assetHandle - unique asset identifier
        markForPublish - value of markForPublish flag
        s7Config - the Scene7 configuration
        Returns:
        String success / failure
        Throws:
        java.lang.AssertionError - in case of IPS failures
      • setAssetsPublishState

        java.lang.String setAssetsPublishState​(java.util.Set<java.lang.String> assetHandles,
                                               boolean markForPublish,
                                               S7Config s7Config)
        Set the publish state of a given Scene7 assets
        Parameters:
        assetHandles - asset identifiers to set publish state
        markForPublish - value of markForPublish flag
        s7Config - the Scene7 configuration
        Returns:
        String success / failure
        Throws:
        java.lang.AssertionError - in case of IPS failures
      • createFolder

        java.lang.String createFolder​(S7Config s7Config,
                                      java.lang.String cqFolderPath)
        Create a folder on Scene7 server
        Parameters:
        s7Config - the Scene7 configuration
        cqFolderPath - the path the target cq folder targeted in the s7 folder organization
        Returns:
        folder handle
        Throws:
        java.lang.AssertionError - in case of IPS failures or undefined data format
      • createImageSet

        @Nullable
        @Nullable java.lang.String createImageSet​(S7Config s7Config,
                                                  java.lang.String folder,
                                                  java.lang.String name,
                                                  java.lang.String type,
                                                  @Nullable
                                                  @Nullable Resource resource,
                                                  @Nullable
                                                  @Nullable java.lang.String thumbAssetHandle)
        Create an ImageSet asset on Scene7 server
        Parameters:
        s7Config - the Scene7 configuration
        folder - relative target folder based on S7 Config root folder. If not exists, will attempt to create it
        name - name for new ImageSet
        type - type of new ImageSet (ImageSet, SwatchSet, RenderSet)
        resource - (optional) if exists, jcr resource to receive metadata from new object
        thumbAssetHandle - (optional) asset handle of user-defined thumbnail image for set
        Returns:
        asset handle of newly created ImageSet, or null on error
        Throws:
        java.lang.AssertionError - in case of IPS failures or undefined data format
      • createImageSet

        @Deprecated
        java.lang.String createImageSet​(S7Config s7Config,
                                        @Nullable
                                        @Nullable java.lang.String imageSetFolder,
                                        java.lang.String imageSetName,
                                        @Nullable
                                        @Nullable java.lang.String thumbAssetHandle)
        Create an ImageSet asset on Scene7 server
        Parameters:
        s7Config - the Scene7 configuration
        imageSetFolder - the path the target imageset cq folder targeted in the s7 folder organization
        imageSetName - name of the image set
        thumbAssetHandle - (optional) user defined thumbnail asset handle
        Returns:
        asset handle of new image set
      • updateImageSet

        void updateImageSet​(S7Config s7Config,
                            java.lang.String assetHandle,
                            @Nullable
                            @Nullable ImageSetMemberUpdateArray members,
                            @Nullable
                            @Nullable java.lang.String thumbAssetHandle)
        Update an ImageSet on Scene7 server
        Parameters:
        s7Config - the Scene7 configuration
        assetHandle - asset handle of the ImageSet to update
        members - (optional) list of ImageSet members (Null = not updated)
        thumbAssetHandle - (optional) asset handle of user-defined thumbnail image for set (Null = not updated)
        Throws:
        java.lang.AssertionError - in case of IPS failures
      • updateImageSet

        @Deprecated
        void updateImageSet​(S7Config s7Config,
                            java.lang.String imageSetAssetHandle,
                            java.util.List<java.lang.String> setMemberHandles,
                            @Nullable
                            @Nullable java.lang.String thumbAssetHandle)
        Update an ImageSet asset on Scene7 server
        Parameters:
        s7Config - the Scene7 configuration
        imageSetAssetHandle - image set Scene7 asset handle
        setMemberHandles - asset handles of image set members
        thumbAssetHandle - (optional) user defined thumbnail asset handle
      • getImageSetMembers

        ImageSetMemberArray getImageSetMembers​(S7Config s7Config,
                                               java.lang.String assetHandle)
        Get members of legacy ImageSet
        Parameters:
        s7Config - the Scene7 configuration
        assetHandle - asset handle of the ImageSet
        Returns:
        not-null ordered list of members embedded into ImageSetMemberArray instance
      • createAssetSet

        @Nullable
        @Nullable java.lang.String createAssetSet​(S7Config s7Config,
                                                  java.lang.String folder,
                                                  java.lang.String name,
                                                  java.lang.String type,
                                                  @Nullable
                                                  @Nullable Resource resource,
                                                  @Nullable
                                                  @Nullable Scene7AssetSet setDefinition,
                                                  @Nullable
                                                  @Nullable java.lang.String thumbAssetHandle)
        Create an AssetSet asset on Scene7 server
        Parameters:
        s7Config - the Scene7 configuration
        folder - relative target folder based on S7 Config root folder. If not exists, will attempt to create it
        name - name for new AssetSet
        type - type of new AssetSet
        resource - (optional) if exists, jcr resource to receive metadata from new object
        setDefinition - (optional) set's definition string
        thumbAssetHandle - (optional) asset handle of user-defined thumbnail image for set
        Returns:
        asset handle of newly created AssetSet, or null on error
        Throws:
        java.lang.AssertionError - in case of IPS failures or undefined data format
      • updateAssetSet

        void updateAssetSet​(S7Config s7Config,
                            java.lang.String assetHandle,
                            @Nullable
                            @Nullable Scene7AssetSet setDefinition,
                            @Nullable
                            @Nullable java.lang.String thumbAssetHandle)
        Update an AssetSet on Scene7 server
        Parameters:
        s7Config - the Scene7 configuration
        assetHandle - asset handle of the AssetSet to update
        setDefinition - (optional) set's definition string (Null = not updated)
        thumbAssetHandle - (optional) asset handle of user-defined thumbnail image for set (Null = not updated)
        Throws:
        java.lang.AssertionError - in case of IPS failures
      • createViewerPreset

        java.lang.String createViewerPreset​(S7Config s7Config,
                                            java.lang.String folderHandle,
                                            java.lang.String name,
                                            java.lang.String type,
                                            @Nullable
                                            @Nullable Resource resource,
                                            @Nullable
                                            @Nullable java.util.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 configuration
        folderHandle - folder handle of the folder that contains the assets
        name - name for the viewer
        type - type of any available viewer in IPS
        resource - (optional) if exists, jcr resource to receive metadata from new object
        configSettings - (optional) list containing Scene7ConfigSetting values to apply
        Returns:
        viewer preset handle or null if unsuccessful
        Throws:
        java.lang.AssertionError - in case of IPS failures or undefined data format
      • createViewerPreset

        @Deprecated
        java.lang.String createViewerPreset​(S7Config s7Config,
                                            java.lang.String folderHandle,
                                            java.lang.String name,
                                            java.lang.String type,
                                            @Nullable
                                            @Nullable java.util.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 configuration
        folderHandle - folder handle of the folder that contains the assets
        name - name for the viewer
        type - type of any available viewer in IPS
        configSettings - list containing Scene7ConfigSetting values to apply
        Returns:
        viewer preset handle or null if unsuccessful
      • getViewerConfigSettings

        Scene7ViewerConfig getViewerConfigSettings​(S7Config s7Config,
                                                   java.lang.String assetHandle)
        Get the viewer configuration for the referenced asset
        Parameters:
        s7Config - the Scene7 configuration
        assetHandle - asset handle for the asset of interest
        Returns:
        Scene7ViewerConfig with the information or null if unsuccessful
        Throws:
        java.lang.AssertionError - in case of IPS failures or undefined data format
      • setViewerConfigSettings

        void setViewerConfigSettings​(S7Config s7Config,
                                     java.lang.String assetHandle,
                                     java.lang.String name,
                                     java.lang.String type,
                                     java.util.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 configuration
        assetHandle - asset handle for the asset to modify
        name - name of the asset
        type - type of any available viewer in IPS
        configSettings - list containing Scene7ConfigSetting values to apply
        Throws:
        java.lang.AssertionError - in case of IPS failures
      • updateViewerConfigSettings

        void updateViewerConfigSettings​(S7Config s7Config,
                                        java.lang.String assetHandle,
                                        java.util.List<Scene7ConfigSetting> configSettings)
        Updates SWF viewer configuration settings.
        Parameters:
        s7Config - the Scene7 configuration
        assetHandle - asset handle for the asset to modify
        configSettings - list containing Scene7ConfigSetting values to apply
        Throws:
        java.lang.AssertionError - in case of IPS failures
      • addUser

        java.lang.String addUser​(S7Config s7Config,
                                 java.lang.String firstName,
                                 java.lang.String lastName,
                                 java.lang.String email,
                                 java.lang.String defaultRole,
                                 java.lang.String password,
                                 @Nullable
                                 @Nullable Instant passwordExpires,
                                 boolean isValid,
                                 java.util.List<Scene7CompanyMembership> membershipArray)
        Creates a user account and adds the account to one of more companies
        Parameters:
        s7Config - The Scene7 configuration
        firstName - The user's first name
        lastName - The user's last name
        email - The user's email address
        defaultRole - The role for the user in the companies they belong, the IpsAdmin role overrides other per-company settings
        password - The user's password
        passwordExpires - The instant of expiration of the password
        isValid - Determine the user's validity
        membershipArray - List of Scene7CompanyMembership entries enumerating the membership of the user.
        Returns:
        The handle of the newly created user
        Throws:
        java.lang.AssertionError - in case of IPS failures or undefined data format
      • getAllUsers

        java.util.List<Scene7User> getAllUsers​(S7Config s7Config,
                                               boolean includeInvalid)
        Return all users
        Parameters:
        s7Config - The Scene7 configuration
        includeInvalid - Indicate if invalid users should be included
        Returns:
        List containing Scene7User requested
        Throws:
        java.lang.AssertionError - in case of IPS failures or undefined data format
      • getUsers

        java.util.List<Scene7User> getUsers​(S7Config s7Config,
                                            @Nullable
                                            @Nullable java.lang.Boolean includeInactive,
                                            @Nullable
                                            @Nullable java.lang.Boolean includeInvalid,
                                            @Nullable
                                            @Nullable java.util.List<java.lang.String> companyHandleArray,
                                            @Nullable
                                            @Nullable java.util.List<java.lang.String> groupHandleArray,
                                            @Nullable
                                            @Nullable java.util.List<java.lang.String> userRoleArray,
                                            @Nullable
                                            @Nullable java.lang.String charFilterField,
                                            @Nullable
                                            @Nullable java.lang.String charFilter,
                                            @Nullable
                                            @Nullable java.lang.String sortBy,
                                            @Nullable
                                            @Nullable java.lang.Integer recordsPerPage,
                                            @Nullable
                                            @Nullable java.lang.Integer resultsPage)
        Return a optionally sorted, filtered and paged list user results
        Parameters:
        s7Config - The Scene7 config
        includeInactive - Include or exclude inactive members
        includeInvalid - Include or exclude invalid members
        companyHandleArray - Filter results be company
        groupHandleArray - Filter results by group
        userRoleArray - Filter results by user role
        charFilterField - Filter results by field's string prefix
        charFilter - Filter results by a specific character
        sortBy - Choice of user sort field
        recordsPerPage - Number of records per page to return
        resultsPage - The desired result page
        Returns:
        List containing Scene7User requested
        Throws:
        java.lang.AssertionError - in case of IPS failures or undefined data format
      • setUserInfo

        void setUserInfo​(S7Config s7Config,
                         @Nullable
                         @Nullable java.lang.String userHandle,
                         java.lang.String firstName,
                         java.lang.String lastName,
                         java.lang.String email,
                         java.lang.String defaultRole,
                         @Nullable
                         @Nullable Instant passwordExpires,
                         boolean isValid,
                         java.util.List<Scene7CompanyMembership> membershipArray)
        Set user attributes
        Parameters:
        s7Config - The Scene7 config
        userHandle - User handle
        firstName - First name
        lastName - Last name
        email - Email address
        defaultRole - The role for the user in the companies they belong, the IpsAdmin role overrides other per-company settings
        passwordExpires - The password's expiration
        isValid - Determine if valid IPS user
        membershipArray - List of Scene7CompanyMembership entries enumerating the membership of the user
        Throws:
        java.lang.AssertionError - in case of IPS failures
      • deleteImageFormat

        java.lang.String deleteImageFormat​(S7Config s7Config,
                                           java.lang.String imageFormatHandle,
                                           @Nullable
                                           @Nullable java.lang.String path)
        Deletes an image format.
        Parameters:
        s7Config - The Scene7 config
        imageFormatHandle - Handle to the image format. (This is returned from saveImageFormat(S7Config, String, String, String, Resource)
        path - If available, path to JCR resource backing the image format
        Returns:
        String success
        Throws:
        java.lang.AssertionError - in case of IPS failures
      • getImageFormats

        java.util.List<Scene7ImageFormat> getImageFormats​(S7Config s7Config)
        Returns image formats, such as PDF, EPS, SWF, and others.
        Parameters:
        s7Config - The Scene7 config
        Returns:
        A list of Scene7ImageFormat objects
        Throws:
        java.lang.AssertionError - in case of IPS failures or undefined data format
      • saveImageFormat

        java.lang.String saveImageFormat​(S7Config s7Config,
                                         @Nullable
                                         @Nullable java.lang.String imageFormatHandle,
                                         java.lang.String name,
                                         java.lang.String urlModifier,
                                         @Nullable
                                         @Nullable Resource resource)
        Create an image format.
        Parameters:
        s7Config - The Scene7 config
        imageFormatHandle - Image format handle you want to save
        name - Image format name
        urlModifier - IPS protocol query string
        resource - (optional) if exists, jcr resource to receive metadata from new object
        Returns:
        The imageFormatHandle
        Throws:
        java.lang.AssertionError - in case of IPS failures or undefined data format
      • saveImageFormat

        @Deprecated
        java.lang.String saveImageFormat​(S7Config s7Config,
                                         @Nullable
                                         @Nullable java.lang.String imageFormatHandle,
                                         java.lang.String name,
                                         java.lang.String urlModifier)
        Create an image format.
        Parameters:
        s7Config - The Scene7 config
        imageFormatHandle - Image format handle you want to save
        name - Image format name
        urlModifier - IPS protocol query string
        Returns:
        The imageFormatHandle
      • deleteImageMap

        void deleteImageMap​(S7Config s7Config,
                            java.lang.String imageMapHandle)
        Deletes an image map
        Parameters:
        s7Config - The Scene7 config
        imageMapHandle - Handle for the image map to delete
        Throws:
        java.lang.AssertionError - in case of IPS failures
      • saveImageMap

        java.lang.String saveImageMap​(S7Config s7Config,
                                      java.lang.String assetHandle,
                                      @Nullable
                                      @Nullable java.lang.String imageMapHandle,
                                      java.lang.String name,
                                      java.lang.String shapeType,
                                      java.lang.String region,
                                      java.lang.String action,
                                      int position,
                                      boolean enabled)
        Create a new image map or edit an existing map
        Parameters:
        s7Config - The Scene7 config
        assetHandle - Handle to the asset the map belongs to
        imageMapHandle - Handle to the image map.
        name - Name of the image map
        shapeType - Choice of region shape
        region - A comma delimited list of points that define the region
        action - The href value associated with the image map
        position - The order in the list of image maps
        enabled - Whether this map is enabled
        Returns:
        The handle to the new or edited image map
        Throws:
        java.lang.AssertionError - in case of IPS failures or undefined data format
      • setImageMaps

        java.util.List<java.lang.String> setImageMaps​(S7Config s7Config,
                                                      java.lang.String assetHandle,
                                                      java.util.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 config
        assetHandle - Handle to the asset
        imageMap - list of predefined Scene7ImageMapDefinition objects
        Returns:
        list of image map handles applied to the asset
        Throws:
        java.lang.AssertionError - in case of IPS failures or undefined data format
      • getPreviewServerUrl

        @Nullable
        @Nullable java.lang.String getPreviewServerUrl​(Resource resource,
                                                       ResourceResolver configResolver)
        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 DAM
        configResolver - resource resolver with access to S7Config object
        Returns:
        String Scene7 asset preview URL
      • getPublishServerUrl

        @Nullable
        @Nullable java.lang.String getPublishServerUrl​(Resource resource,
                                                       ResourceResolver configResolver)
        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 DAM
        configResolver - resource resolver with access to S7Config object
        Returns:
        String Scene7 asset publish URL
      • getPreviewVideoServerUrl

        @Nullable
        @Nullable java.lang.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 DAM
        configResolver - resource resolver with access to S7Config object
        Returns:
        String Scene7 asset preview URL
      • getPublishVideoServerUrl

        @Nullable
        @Nullable java.lang.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 DAM
        configResolver - resource resolver with access to S7Config object
        Returns:
        String Scene7 asset publish URL
      • getS7AssetMetadata

        @Nullable
        @Nullable java.util.Map<java.lang.String,​java.lang.String> getS7AssetMetadata​(S7Config s7Config,
                                                                                            java.lang.String assetHandle)
        Retrieves a metadata map (key-value pair) associated with a Scene7 asset
        Parameters:
        s7Config - The Scene7 cloud configuration object
        assetHandle - Scene7 unique asset identifier
        Returns:
        Map key-value pairs metadata of Scene7 asset
        Throws:
        java.lang.AssertionError - in case of IPS failures or undefined data format
      • getS7VideoRenditions

        @Nullable
        @Nullable java.util.List<Scene7Asset> getS7VideoRenditions​(S7Config s7Config,
                                                                   java.lang.String assetHandle)
        Retrieves a list of Scene7 video renditions with their names and asset handles
        Parameters:
        s7Config - The Scene7 cloud configuration object
        assetHandle - Scene7 unique asset identifier
        Returns:
        List a list of Scene7Assets containing video rendition names and asset handles
        Throws:
        java.lang.AssertionError - in case of IPS failures or undefined data format
      • getScene7ID

        @Nullable
        @Nullable java.lang.String getScene7ID​(Resource resource)
        Returns property dam:scene7ID of a given Resource object
        Parameters:
        resource - Resource object on which to get Scene7 metadata
        Returns:
        String value of dam:scene7ID associated to Resource or null if property is unavailable
      • isResourceLinkedToScene7

        boolean isResourceLinkedToScene7​(Resource resource)
        Returns true if Resource object is linked to Scene7 based on its metadata
        Parameters:
        resource - Resource object on which to get Scene7 metadata
        Returns:
        true if Resource object has dam:scene7ID metadata
      • getLinkedScene7ConfigPath

        @Nullable
        @Nullable java.lang.String getLinkedScene7ConfigPath​(Resource resource)
        Returns property dam:scene7CloudConfigPath of a given Resource object
        Parameters:
        resource - Resource object on which to get Scene7 metadata
        Returns:
        String value of dam:scene7CloudConfigPath associated to Resource or null if property is unavailable
      • moveAsset

        boolean moveAsset​(S7Config s7Config,
                          Resource resource,
                          java.lang.String folder)
        Moves an asset to a specific folder
        Parameters:
        s7Config - Scene7 S7Config object
        resource - Resource object to be relocated
        folder - Destination folder path
        Returns:
        true/false of the moveAsset() operation succeeded
      • moveAssets

        boolean moveAssets​(S7Config s7Config,
                           java.util.Map<Resource,​java.lang.String> resourcesToFolders)
        Moves multiple assets independently of each other
        Parameters:
        s7Config - Scene7 S7Config object
        resourcesToFolders - Mapping of AEM resource to destination folder
        Returns:
        true/false of the moveAssets() operation succeeded
      • moveFolder

        boolean moveFolder​(S7Config s7Config,
                           java.lang.String sourceFolder,
                           java.lang.String destinationFolder)
        Move a folder to a new location
        Parameters:
        s7Config - Scene7 S7Config object
        sourceFolder - Path to source folder
        destinationFolder - Path to destination folder
        Returns:
        true/false of the moveFolder() operation succeeded
      • moveAssociatedAsset

        boolean moveAssociatedAsset​(S7Config s7Config,
                                    Resource resource,
                                    java.lang.String folder)
        Finds and moves generated assets to a specific folder
        Parameters:
        s7Config - Scene7 S7Config object
        resource - Resource object to be relocated
        folder - Destination folder path
        Returns:
        true/false of the moveAssociatedAsset() operation succeeded
      • renameAsset

        boolean renameAsset​(S7Config s7Config,
                            Resource resource,
                            java.lang.String name)
        Rename an asset
        Parameters:
        s7Config - Scene7 S7Config object
        resource - Resource object to be renamed
        name - Asset's new name
        Returns:
        true/false of the renameAsset() operation succeeded
      • renameFolder

        boolean renameFolder​(S7Config s7Config,
                             java.lang.String folder,
                             java.lang.String name)
        Rename a folder
        Parameters:
        s7Config - Scene7 S7Config object
        folder - Folder to be renamed
        name - Folder's new name
        Returns:
        true/false of the renameFolder() operation succeeded
      • updateSmartCrops

        @Deprecated
        boolean updateSmartCrops​(S7Config s7Config,
                                 java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​Scene7NormalizedCropRect>> updateSmartCropMap)
        Deprecated.
        Update one or more Smart Crop sub asset(s)
        Parameters:
        s7Config - Scene7 S7Config object
        updateSmartCropMap - Map of owner handle, sub-asset asset handles and Scene7NormalizedCropRect objects
        Returns:
        true/false of the updateSmartCrops() operation succeeded
      • updateSmartCrops

        boolean updateSmartCrops​(S7Config s7Config,
                                 Asset asset,
                                 java.util.List<SmartCrop> smartCrops)
        Parameters:
        s7Config - Scene7 S7Config object
        asset - asset for updating associated smart crops
        smartCrops - list of smart crops to be updated
        Returns:
        true/false if the update is successful
      • setVideoThumbnail

        java.util.Map<java.lang.String,​java.lang.Integer> setVideoThumbnail​(S7Config s7Config,
                                                                                  java.lang.String assetHandle,
                                                                                  java.lang.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 configuration
        assetHandle - the S7 assetHandle of the master video that you want to set thumbnail
        thumbAssetHandle - the S7 assetHandle of the thumbnail asset
        Returns:
      • getXMPPacket

        java.lang.String getXMPPacket​(S7Config s7Config,
                                      java.lang.String assetHandle)
        Retrieves an XMP Metadata packet for the specified asset.
        Parameters:
        s7Config - the Scene7 configuration
        assetHandle - Handle to the asset you want to get XMP metadata
        Returns:
        XMP metadata for the given assetHandle in XML format
      • updateXMPPacket

        void updateXMPPacket​(S7Config s7Config,
                             java.lang.String assetHandle,
                             java.lang.String xmpPacketAsXml)
        Sets or updates an XMP metadata packet for an asset.
        Parameters:
        s7Config - the Scene7 configuration
        assetHandle - Handle to the asset you want to get XMP metadata
        xmpPacketAsXml - updated XMP packet to update asset metadata in XML format
      • getLoginStatus

        java.lang.String getLoginStatus​(ResourceResolver resourceResolver,
                                        java.lang.String email,
                                        java.lang.String password,
                                        java.lang.String region)
        Checks the login in Scene7 with the given credentials
        Parameters:
        resourceResolver - resource resolver used to access Scene7 configuration
        email - Email id of the user
        password - Password of the user
        region - the user's region
        Returns:
        the login status for the user.
      • setPassword

        void setPassword​(S7Config s7Config,
                         java.lang.String userHandle,
                         java.lang.String password,
                         @Nullable
                         @Nullable java.lang.Integer validityInDays)
        Sets the password for a given user with an expiry of 100 years ahead from the current date.
        Parameters:
        s7Config - Scene7 configuration object
        userHandle - combination of IPS user handle and email id
        password - Password to be set
        validityInDays - Password validity in number of days. Set it to null/zero for default expiry of 100 years.
      • cdnCacheInvalidation

        CdnCacheInvalidationReturn 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
        Parameters:
        s7Config - Scene7 configuration object
        urlArray - List of up to 1000 URLs to invalidate from the CDN cache
        Returns:
        CdnCacheInvalidationReturn IPS api response
      • flushCdnCacheByAlias

        CdnCacheInvalidationReturn flushCdnCacheByAlias​(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.
        Parameters:
        s7Config - Scene7 configuration object
        companyAliasUrlArray - List of up to 1000 URLs to invalidate from the CDN cache
        Returns:
        CdnCacheInvalidationReturn IPS api response
      • getAndStoreSecureISAuthToken

        java.lang.String getAndStoreSecureISAuthToken​(S7Config s7Config)
        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

        boolean deleteSubAssets​(Asset asset,
                                java.util.List<java.lang.String> subAssetHandles,
                                S7Config s7Config)
        Deletes the sub assets for an asset
        Parameters:
        asset - Asset whose smart crops need to be removed
        subAssetHandles - list of scene7 handles to the sub assets
        s7Config - the scene7 configuration
        Returns:
        true if successfully deleted all subassets.
      • getIpsImageUrl

        @Nullable
        @Nullable java.lang.String getIpsImageUrl​(Asset asset,
                                                  S7Config s7Config)
        Gets the value of the ipsImageUrl property for an asset
        Parameters:
        asset - Asset whose ipsImageUrl need to be fetched
        s7Config - Scene7 configuration object
        Returns:
        ipsImageUrl for the asset. It may return null if ipsImageUrl is not present.
      • getCompanyInfoForCompanyName

        Company getCompanyInfoForCompanyName​(java.lang.String companyName,
                                             S7Config s7Config)
        Returns the Company object
        Parameters:
        companyName - company name
        s7Config - Scene7 configuration object
        Returns:
        the Company object corresponding to the companyName
        Throws:
        java.lang.AssertionError - in case of IPS failures or undefined data format