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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertToLocales(List<String> localeLanguageTags) Builds a list ofLocalefrom the givenlocaleLanguageTags.Identifies the application that this configuration is for.A user-friendly display name for this configuration.Should contain a value fromDefaultDataFeedProcessTypesdescribing 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.voidHelpful method to quickly initialize basic properties fromAbstractDataFeedPublicationConfigurationProperties, if using such a setup.voidsetApplicationIdHint(String applicationIdHint) voidsetDisplayName(String displayName) voidsetFeedProcessType(String feedProcessType) voidvoidsetIncludedLocales(List<Locale> includedLocales) This is a common (but not required) element in many implementations.voidsetTenantIdHint(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 ofLocalefrom the givenlocaleLanguageTags.- Parameters:
localeLanguageTags- a list of valid locales in IETF BCP 47 language tag format- Returns:
- a list of
Localeinstances, ornullif 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:DataFeedPublicationConfigurationThe unique identifier of this feed publication configuration in BLC. This will be used to associate feed processes with a configuration.- Specified by:
getIdin interfaceDataFeedPublicationConfiguration- Returns:
- the unique identifier for this specific publication configuration in BLC
- See Also:
-
getDisplayName
Description copied from interface:DataFeedPublicationConfigurationA user-friendly display name for this configuration. Useful for helping admin users see what the configuration is for.- Specified by:
getDisplayNamein interfaceDataFeedPublicationConfiguration- Returns:
- a user-friendly display name for this configuration
- See Also:
-
getTenantIdHint
Description copied from interface:DataFeedPublicationConfigurationIdentifies 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:
getTenantIdHintin interfaceDataFeedPublicationConfiguration- Returns:
- the tenant ID that this configuration is for
- See Also:
-
getApplicationIdHint
Description copied from interface:DataFeedPublicationConfigurationIdentifies 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:
getApplicationIdHintin interfaceDataFeedPublicationConfiguration- Returns:
- the application ID that this configuration is for
- See Also:
-
getFeedProcessType
Description copied from interface:DataFeedPublicationConfigurationShould contain a value fromDefaultDataFeedProcessTypesdescribing 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:
getFeedProcessTypein 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.
-