Package com.day.cq.dam.scene7.api
Interface S7ConfigResolver
Provides access to the Scene7 cloud configuration
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final StringDefault char setstatic final StringThe companyAlias, only supported in DMS7static final StringScene7 generated company handle ID for the company corresponding to the companyAlias Only supported in DMS7static final StringScene7 generated company handle IDstatic final StringThe companyNamestatic final Stringcq root folder ID in the scene7 company folder hierarchy, is not the "root path" in the S7 (see getRootPath())static final StringStores the default configuration property flagstatic final StringScene7 User email IDstatic final StringThe Scene7 flash templates publish server URL.static final StringDeprecated.static final StringThe Scene7 import queue namestatic final StringThe import queue topicstatic final StringScene7 User password IDstatic final StringThe Scene7 preview server URL.static final StringThe Scene7 preview server jwt for authorization.static final StringThe Scene7 preview server jwt expiry.static final Stringcontrols s7 publish state updates and synchronization of assets/folders already managed by s7static final StringThe Scene7 publish server URL.static final StringScene7 region (server mapping)static final StringThe "root path" ID in the S7 sense...see getRootPath()static final Stringcontrols s7 updates and synchronization of assets/folders already managed by s7static final StringThe target path property, storing the path where Scene7 assets are downloaded into CQ DAM.static final StringScene7 generated user handle ID -
Method Summary
Modifier and TypeMethodDescriptionfetchPreviewServerToken(S7Config s7Config) Fetch the preview server token for Scene7 configuration providedDeprecated.getDefaultS7Config(ResourceResolver resourceResolver) Returns default S7 configuration If run under DMS7 mode, return DMS7 configuration, otherwise, return S7Connect configurationgetDefaultS7Config(ResourceResolver resourceResolver, String configRootPath) Deprecated.getS7Config(ResourceResolver resourceResolver, String configPath) Returns the S7Config generated from the configPathgetS7Config(ResourceResolver resourceResolver, String email, String password, String region) Returns a S7Config with the corresponding parameters applied.getS7ConfigForAssetPath(ResourceResolver resourceResolver, String assetPath) Retrieves the Scene7 configuration associated with asset by content path when Scene7 metadata is not availablegetS7ConfigForImageUrl(ResourceResolver resourceResolver, String imageUrl) Deprecated.this method is brokengetS7ConfigForResource(Resource resource) Deprecated.this method returns unreadable config! UsegetS7ConfigForResource(ResourceResolver, Resource)instead.getS7ConfigForResource(ResourceResolver resourceResolver, Resource resource) Retrieves the Scene7 configuration associated with a DAM asset resource by successively analysing the resource and then its parents.getS7ConfigForResource(ResourceResolver resourceResolver, Resource resource, boolean ignoreSelectiveSync) Retrieves the Scene7 configuration associated with a DAM asset resource by successively analysing the resource and then its parents.getS7ConfigForRootId(ResourceResolver resourceResolver, String rootId) Looks up scene7 configuration for the specified root id (company name?)getS7ConfigPathForAssetPath(ResourceResolver resolver, String assetPath) Retrieves the Scene7 configuration associated with an asset path.getS7ConfigPathForImageUrl(ResourceResolver resolver, String domain, String companyName) Retrieves the Scene7 configuration associated with an image server URL.getS7ConfigPathForResource(ResourceResolver resolver, Resource resource) Retrieves the Scene7 configuration path associated with a DAM asset resource by successively analysing the resource and then its parents.getS7Configurations(ResourceResolver resourceResolver) Returns all the S7 configurations, include both old configuration(under /etc) and new configuration after 0DT change(under /conf)getS7Configurations(ResourceResolver resourceResolver, String configRootPath) Deprecated.getSharedS7Config(ResourceResolver resourceResolver, S7Config s7Config) Returns a copy of the given S7Config pointing to the shared companyTemporary method for checking if DMS7 feature is enalbedparseDomainAndCompanyNameForUrl(String imageUrl) Helper method to extract domain and company information related to an image urlvoidsetPreviewServerTokenForS7Config(String token, S7Config s7config) Sets the preview server jwt token and expirty for Scene7 configuration provided
-
Field Details
-
REGION
Scene7 region (server mapping)- See Also:
-
EMAIL
Scene7 User email ID- See Also:
-
PASSWORD
Scene7 User password ID- See Also:
-
USER_HANDLE
Scene7 generated user handle ID- See Also:
-
COMPANY_HANDLE
Scene7 generated company handle ID- See Also:
-
ROOT_PATH
The "root path" ID in the S7 sense...see getRootPath()- See Also:
-
CQ_ROOT_PATH
cq root folder ID in the scene7 company folder hierarchy, is not the "root path" in the S7 (see getRootPath())- See Also:
-
SYNC_ENABLED
controls s7 updates and synchronization of assets/folders already managed by s7- See Also:
-
PUBLISH_ENABLED
controls s7 publish state updates and synchronization of assets/folders already managed by s7- See Also:
-
CHARSET
Default char set- See Also:
-
PUBLISH_SERVER
The Scene7 publish server URL.- See Also:
-
PREVIEW_SERVER
The Scene7 preview server URL.- See Also:
-
PREVIEW_SERVER_TOKEN
The Scene7 preview server jwt for authorization.- See Also:
-
PREVIEW_SERVER_TOKEN_EXPIRY
The Scene7 preview server jwt expiry.- See Also:
-
FLASH_TEMPLATES_SERVER
The Scene7 flash templates publish server URL.- See Also:
-
TARGET_PATH
The target path property, storing the path where Scene7 assets are downloaded into CQ DAM.- See Also:
-
DEFAULT_CONFIG_FLAG
Stores the default configuration property flag- See Also:
-
ADHOC_FOLDER
- See Also:
-
FXG_SERVER
Deprecated.The Scene7 FXG server URL.- See Also:
-
IMPORT_QUEUE_NAME
The Scene7 import queue name- See Also:
-
IMPORT_QUEUE_TOPIC
The import queue topic- See Also:
-
COMPANY_NAME
The companyName- See Also:
-
COMPANY_ALIAS
The companyAlias, only supported in DMS7- See Also:
-
COMPANY_ALIAS_HANDLE
Scene7 generated company handle ID for the company corresponding to the companyAlias Only supported in DMS7- See Also:
-
-
Method Details
-
getS7ConfigReaderResolver
ResourceResolver getS7ConfigReaderResolver()- Returns:
- *new* ResourceResolver able to read Scene7 Configurations. WARNING: caller is responsible to close it!
-
getS7Config
S7Config getS7Config(ResourceResolver resourceResolver, String email, String password, String region) Returns a S7Config with the corresponding parameters applied.- Parameters:
resourceResolver- - resource resolver to access Scene7 configurationemail- - scene7 account name used for connect to Scene7 serverpassword- - scene7 account password used for connect to Scene7 serverregion- - scene7 server region- Returns:
- the S7Config that match provided username, password and region
-
getS7Config
Returns the S7Config generated from the configPath- Parameters:
resourceResolver- - resource resolver to access Scene7 configurationconfigPath- - path to the target s7 cloud configPath settings- Returns:
- S7Config referenced by passed in configPath, return null if cannot get s7Config
-
getS7Configurations
@Deprecated List<S7Config> getS7Configurations(ResourceResolver resourceResolver, String configRootPath) Deprecated.Returns all the S7 configurations loaded from the children of a given root path. It's deprecated from AEM6.4 due to 0DT change, this can only be used for retrieving old configuration under /etc use getS7Configurations(ResourceResolver resourceResolver) instead- Parameters:
resourceResolver- - resource resolver to access Scene7 configurationconfigRootPath- - root path where the configurations will be loaded from- Returns:
- list of
S7Configconfigurations
-
getS7Configurations
Returns all the S7 configurations, include both old configuration(under /etc) and new configuration after 0DT change(under /conf)- Parameters:
resourceResolver- - resource resolver to access Scene7 configuration- Returns:
- list of
S7Configconfigurations
-
getDefaultS7Config
Deprecated.Returns default S7 configuration Deprecated after 0DT chagne in AEM6.4, use the getDefaultS7Config(ResourceResolver resourceResolver) instead- Parameters:
resourceResolver- - resource resolver to access Scene7 configurationconfigRootPath- - root path where the configurations will be loaded from- Returns:
- default
S7Configconfiguration object
-
getDefaultS7Config
Returns default S7 configuration If run under DMS7 mode, return DMS7 configuration, otherwise, return S7Connect configuration- Parameters:
resourceResolver- - resource resolver to access Scene7 configuration- Returns:
- default
S7Configconfiguration object
-
getDefaultS7Config
Deprecated.WARNING: this method embeds the new ResourceResolver into returned S7Config instance! Caller is responsible to callS7Config.close(), or usegetDefaultS7Config(ResourceResolver)instead.Returns default S7 configuration, resolved using the S7 config service user If run under DMS7 mode, return DMS7 configuration, otherwise, return S7Connect configuration- Returns:
- default
S7Configconfiguration object
-
getS7ConfigForResource
Retrieves the Scene7 configuration associated with a DAM asset resource by successively analysing the resource and then its parents. If no S7Config is found this method returns default configuration instead.- Parameters:
resourceResolver- - resource resolver to access Scene7 configurationresource- - a DAM asset resource- Returns:
- the associated Scene7 configuration or default configuration, null if no configuration and no default configuration found
-
getS7ConfigForResource
S7Config getS7ConfigForResource(ResourceResolver resourceResolver, Resource resource, boolean ignoreSelectiveSync) Retrieves the Scene7 configuration associated with a DAM asset resource by successively analysing the resource and then its parents. If no S7Config is found this method returns default configuration instead.- Parameters:
resourceResolver- - resource resolver to access Scene7 configurationresource- - a DAM asset resourceignoreSelectiveSync- - ignore selective sync and return default config- Returns:
- the associated Scene7 configuration or default configuration, null if no configuration and no default configuration found
-
getS7ConfigForResource
Deprecated.this method returns unreadable config! UsegetS7ConfigForResource(ResourceResolver, Resource)instead.Retrieves the Scene7 configuration associated with a DAM asset resource by successively analysing the resource and then its parents. If no S7Config is found this method returns null.- Parameters:
resource- a DAM asset resource- Returns:
- the associated Scene7 configuration; null if no configuration is found
-
getS7ConfigForImageUrl
Deprecated.this method is brokenRetrieves the Scene7 configuration associated with an image server URL. Returns null if no S7Config is found.- Parameters:
resourceResolver- resource resolver to access Scene7 configurationimageUrl- the image server URL- Returns:
- return associated Scene7 configuration; null if no configuration is found
-
getS7ConfigForAssetPath
Retrieves the Scene7 configuration associated with asset by content path when Scene7 metadata is not available- Parameters:
resourceResolver- resource resolver to access Scene7 configurationassetPath- the asset content path- Returns:
- associated Scene7 configuration; null if no configuration is found
-
getS7ConfigForRootId
Looks up scene7 configuration for the specified root id (company name?)- Parameters:
resourceResolver- resource resolver to access Scene7 configurationrootId- catalog root id- Returns:
- S7Config object that corresponds to the specified rootId or null if none found.
-
getS7ConfigPathForResource
Retrieves the Scene7 configuration path associated with a DAM asset resource by successively analysing the resource and then its parents. If no S7Config is found this method returns null.- Parameters:
resolver- resource resolver associated with user sessionresource- a DAM asset resource- Returns:
- the associated Scene7 configuration path; null if no configuration is found
-
getS7ConfigPathForImageUrl
Retrieves the Scene7 configuration associated with an image server URL. Returns null if no S7Config is found.- Parameters:
resolver- resource resolver associated with user sessiondomain- delivery domain associated with configurationcompanyName- companyName associated with configuration- Returns:
- return associated Scene7 configuration path; null if no configuration is found
-
parseDomainAndCompanyNameForUrl
Helper method to extract domain and company information related to an image url- Parameters:
imageUrl- image url embedding the domain and company information- Returns:
- return a map with keys 'domain' and 'companyName' if available
-
getS7ConfigPathForAssetPath
Retrieves the Scene7 configuration associated with an asset path. Returns null if no S7Config is found.- Parameters:
resolver- resource resolver associated with user sessionassetPath- asset path associated with configuration- Returns:
- return associated Scene7 configuration path; null if no configuration is found
-
isDMS7Enabled
Boolean isDMS7Enabled()Temporary method for checking if DMS7 feature is enalbed- Returns:
- return if the DMS7 mode is enabled
-
setPreviewServerTokenForS7Config
Sets the preview server jwt token and expirty for Scene7 configuration provided- Parameters:
token- String containing JWT tokens7config- Scene7Config for which token has to be set
-
fetchPreviewServerToken
Fetch the preview server token for Scene7 configuration provided- Parameters:
s7Config- Scene7Config for which token has to be fetched- Returns:
- return previewServerToken if it is unexpired
-
S7Config.close(), or usegetDefaultS7Config(ResourceResolver)instead.