Class AbstractDataFeedPublicationConfiguration
java.lang.Object
com.broadleafcommerce.datafeed.service.publisher.configuration.AbstractDataFeedPublicationConfiguration
- All Implemented Interfaces:
DataFeedPublicationConfiguration
- Direct Known Subclasses:
CommerceManagerFeedAPIPublicationConfiguration
,MerchantCenterSFTPPublicationConfiguration
public abstract class AbstractDataFeedPublicationConfiguration
extends Object
implements DataFeedPublicationConfiguration
A commonly useful base starting point for implementations of
DataFeedPublicationConfiguration
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionconvertToLocales
(List<String> localeLanguageTags) Builds a list ofLocale
from the givenlocaleLanguageTags
.Identifies the application that this configuration is for.A user-friendly display name for this configuration.Should contain a value fromDefaultDataFeedProcessTypes
describing what type of data feed process this configuration is for.getId()
The unique identifier of this feed publication configuration in BLC.This is a common (but not required) element in many implementations.Identifies the tenant that this configuration is for.void
Helpful method to quickly initialize basic properties fromAbstractDataFeedPublicationConfigurationProperties
, if using such a setup.void
setApplicationIdHint
(String applicationIdHint) void
setDisplayName
(String displayName) void
setFeedProcessType
(String feedProcessType) void
void
setIncludedLocales
(List<Locale> includedLocales) This is a common (but not required) element in many implementations.void
setTenantIdHint
(String tenantIdHint)
-
Constructor Details
-
AbstractDataFeedPublicationConfiguration
public AbstractDataFeedPublicationConfiguration()
-
-
Method Details
-
initializeFromProperties
Helpful method to quickly initialize basic properties fromAbstractDataFeedPublicationConfigurationProperties
, if using such a setup.- Parameters:
properties
- the source instance to initialize from- Throws:
IllegalArgumentException
- if there was an error with the input properties
-
convertToLocales
Builds a list ofLocale
from the givenlocaleLanguageTags
.- Parameters:
localeLanguageTags
- a list of valid locales in IETF BCP 47 language tag format- Returns:
- a list of
Locale
instances, ornull
if the input was null - Throws:
IllegalArgumentException
- if there was an error processing the input tags
-
setId
- See Also:
-
setDisplayName
-
setTenantIdHint
-
setApplicationIdHint
-
setFeedProcessType
-
setIncludedLocales
This is a common (but not required) element in many implementations. This should be a list of locales whose data should be included in the feed. This can influence which data is included and how it is transformed. -
getId
Description copied from interface:DataFeedPublicationConfiguration
The unique identifier of this feed publication configuration in BLC. This will be used to associate feed processes with a configuration.- Specified by:
getId
in interfaceDataFeedPublicationConfiguration
- Returns:
- the unique identifier for this specific publication configuration in BLC
- See Also:
-
getDisplayName
Description copied from interface:DataFeedPublicationConfiguration
A user-friendly display name for this configuration. Useful for helping admin users see what the configuration is for.- Specified by:
getDisplayName
in interfaceDataFeedPublicationConfiguration
- Returns:
- a user-friendly display name for this configuration
- See Also:
-
getTenantIdHint
Description copied from interface:DataFeedPublicationConfiguration
Identifies the tenant that this configuration is for. Useful for preventing cross-tenant usage of a configuration.When creating a
DataFeedProcess
, the value of its tenant ID must match this value in order for this configuration to be used.- Specified by:
getTenantIdHint
in interfaceDataFeedPublicationConfiguration
- Returns:
- the tenant ID that this configuration is for
- See Also:
-
getApplicationIdHint
Description copied from interface:DataFeedPublicationConfiguration
Identifies the application that this configuration is for. Useful for preventing cross-application usage of a configuration.When creating a
DataFeedProcess
, the value ofDataFeedProcess.getApplicationId()
must match this value in order for this configuration to be used.- Specified by:
getApplicationIdHint
in interfaceDataFeedPublicationConfiguration
- Returns:
- the application ID that this configuration is for
- See Also:
-
getFeedProcessType
Description copied from interface:DataFeedPublicationConfiguration
Should contain a value fromDefaultDataFeedProcessTypes
describing what type of data feed process this configuration is for.When creating a
DataFeedProcess
, the value ofDataFeedProcess.getProcessType()
must match this value in order for this configuration to be used.- Specified by:
getFeedProcessType
in interfaceDataFeedPublicationConfiguration
- Returns:
- the type of data feed process this configuration is for
- See Also:
-
getIncludedLocales
This is a common (but not required) element in many implementations. This should be a list of locales whose data should be included in the feed. This can influence which data is included and how it is transformed.
-