Class DataFeedProcess

java.lang.Object
com.broadleafcommerce.datafeed.domain.DataFeedProcess
All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware, Serializable

public class DataFeedProcess extends Object implements Serializable, com.broadleafcommerce.data.tracking.core.ContextStateAware
This is an admin-manageable "template" configuration for a job that will perform a single query for data and then publish that data to one or more data feeds.

Actually running this process is done via DataFeedProcessExecution.

See Also:
  • Constructor Details

    • DataFeedProcess

      public DataFeedProcess()
  • Method Details

    • getId

      public String getId()
      The context ID of this process.
      Returns:
      the id of this data feed process
    • getDisplayName

      public String getDisplayName()
      A user-friendly display name for the process.
      Returns:
      a user-friendly display name for this process
    • getDescription

      @Nullable public String getDescription()
      A user-friendly description explaining what the process is for.
      Returns:
      a user-friendly description for this process
    • getProcessType

      public String getProcessType()
      Should contain a value from DefaultDataFeedProcessTypes describing what type of data feed process this is.

      This field is immutable after creation.

      Returns:
      the type of this data feed process
    • getDataFeedPublicationConfigurationIds

      public List<String> getDataFeedPublicationConfigurationIds()
      The IDs of the DataFeedPublicationConfigurations to which data queried by this process will be published.

      Note that all of these must be compatible with the getProcessType().

      Note that all of these must be compatible with the getApplicationId() and tenant ID of this process.

      This can never be empty (at least one element).

      Returns:
      ids of feed publication configurations to which data queried by this process will be published
    • getApplicationId

      public String getApplicationId()
      Data feed processes always target data for a specific application. This is because some references in feed fields (ex: product links) are application-specific.

      This field should contain the context ID of the application whose data should be queried + published.

      This field is immutable after creation.

      Returns:
      id of the application whose data should be queried + published by this process
    • isEnabled

      public boolean isEnabled()
      Describes whether new DataFeedProcessExecutions of this process can be started.

      This is particularly useful when making changes to the configuration of a data feed process. When disabled, current executions can complete, but future execution will be paused until the process is re-enabled.

      Returns:
      whether this process should be enabled
    • getFilterString

      @Nullable public String getFilterString()
      (Optional) A (by default, RSQL) filter string that should be used to filter all products that are fetched by this process. If provided, any request to fetch products for this data feed process should use these filters to restrict the results that are included.
    • getContextState

      public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()
      A subset of Tracking information to expose the context state for this object.
      Specified by:
      getContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
      Returns:
      a subset of Tracking information to expose the context state for this object
    • setId

      public void setId(String id)
      The context ID of this process.
      Parameters:
      id - the id of this data feed process
    • setDisplayName

      public void setDisplayName(String displayName)
      A user-friendly display name for the process.
      Parameters:
      displayName - a user-friendly display name for this process
    • setDescription

      public void setDescription(@Nullable String description)
      A user-friendly description explaining what the process is for.
      Parameters:
      description - a user-friendly description for this process
    • setProcessType

      public void setProcessType(String processType)
      Should contain a value from DefaultDataFeedProcessTypes describing what type of data feed process this is.

      This field is immutable after creation.

      Parameters:
      processType - the type of this data feed process
    • setDataFeedPublicationConfigurationIds

      public void setDataFeedPublicationConfigurationIds(List<String> dataFeedPublicationConfigurationIds)
      The IDs of the DataFeedPublicationConfigurations to which data queried by this process will be published.

      Note that all of these must be compatible with the getProcessType().

      Note that all of these must be compatible with the getApplicationId() and tenant ID of this process.

      This can never be empty (at least one element).

      Parameters:
      dataFeedPublicationConfigurationIds - ids of feed publication configurations to which data queried by this process will be published
    • setApplicationId

      public void setApplicationId(String applicationId)
      Data feed processes always target data for a specific application. This is because some references in feed fields (ex: product links) are application-specific.

      This field should contain the context ID of the application whose data should be queried + published.

      This field is immutable after creation.

      Parameters:
      applicationId - id of the application whose data should be queried + published by this process
    • setEnabled

      public void setEnabled(boolean enabled)
      Describes whether new DataFeedProcessExecutions of this process can be started.

      This is particularly useful when making changes to the configuration of a data feed process. When disabled, current executions can complete, but future execution will be paused until the process is re-enabled.

      Parameters:
      enabled - whether this process should be enabled
    • setFilterString

      public void setFilterString(@Nullable String filterString)
      (Optional) A (by default, RSQL) filter string that should be used to filter all products that are fetched by this process. If provided, any request to fetch products for this data feed process should use these filters to restrict the results that are included.
    • setContextState

      public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
      A subset of Tracking information to expose the context state for this object.
      Specified by:
      setContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
      Parameters:
      contextState - a subset of Tracking information to expose the context state for this object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object