Class DataFeedProcessExecution

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

public class DataFeedProcessExecution extends Object implements Serializable, com.broadleafcommerce.data.tracking.core.ContextStateAware
This tracks the lifecycle and state of a specific execution of a DataFeedProcess.

Admin users should almost never be responsible for making direct CRUD requests on this entity. The system should be in charge of managing these records.

See Also:
  • Constructor Details

    • DataFeedProcessExecution

      public DataFeedProcessExecution()
  • Method Details

    • getId

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

      public String getDataFeedProcessId()
      The DataFeedProcess.getId() of the DataFeedProcess which this execution is for.
      Returns:
      the ID of the data feed process this execution is for
    • getStartTime

      @Nullable public Instant getStartTime()
      The time at which this execution started processing.
      Returns:
      the time at which this execution started processing
    • getEndTime

      @Nullable public Instant getEndTime()
      The time at which this execution stopped processing.
      Returns:
      the time at which this execution stopped processing
    • getStatus

      public String getStatus()
      Should contain a value from DefaultDataFeedExecutionStatuses describing the current status of the execution.

      When this is being changed, be sure to update getStartTime() or getEndTime() if appropriate.

      Returns:
      the current status of the execution
    • isContainsErrors

      public boolean isContainsErrors()
      A simple flag indicating whether the current execution encountered any errors.
      Returns:
      whether this execution experienced errors
      See Also:
    • getErrorDetails

      public List<String> getErrorDetails()
      If errors are encountered during the run of this execution (ex: isContainsErrors() is true), details should be added here. Otherwise, this will be empty.
      Returns:
      details about any errors experienced by this execution
      See Also:
    • getQueriedDataFileLocation

      @Nullable public String getQueriedDataFileLocation()
      After the raw data is fetched, the execution will serialize and store it in a JSON file. This can then be used by DataFeedPublication executions to transform + publish data.

      This field should contain the location of that file (including filename extension). This is usually something that can be directly passed to StorageService.

    • getProcessType

      public String getProcessType()
      Should be copied from DataFeedProcess.getProcessType().

      This duplication protects the execution in case DataFeedProcess is mutated after this starts.

      Returns:
      value matching DataFeedProcess.getProcessType()
    • getDataFeedPublicationConfigurationIds

      public List<String> getDataFeedPublicationConfigurationIds()
      Should be copied from DataFeedProcess.getDataFeedPublicationConfigurationIds().

      This duplication protects the execution in case DataFeedProcess is mutated after this starts.

      Returns:
      value matching DataFeedProcess.getDataFeedPublicationConfigurationIds()
    • getApplicationId

      public String getApplicationId()
      Should be copied from DataFeedProcess.getApplicationId().

      This duplication protects the execution in case DataFeedProcess is mutated after this starts.

      Returns:
      value matching DataFeedProcess.getApplicationId()
    • getFilterString

      @Nullable public String getFilterString()
      Should be copied from DataFeedProcess.getFilterString().

      This duplication protects the execution in case DataFeedProcess is mutated after this starts.

      Returns:
      value matching DataFeedProcess.getFilterString()
    • 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 execution.
      Parameters:
      id - the id of this data feed execution
    • setDataFeedProcessId

      public void setDataFeedProcessId(String dataFeedProcessId)
      The DataFeedProcess.getId() of the DataFeedProcess which this execution is for.
      Parameters:
      dataFeedProcessId - the ID of the data feed process this execution is for
    • setStartTime

      public void setStartTime(@Nullable Instant startTime)
      The time at which this execution started processing.
      Parameters:
      startTime - the time at which this execution started processing
    • setEndTime

      public void setEndTime(@Nullable Instant endTime)
      The time at which this execution stopped processing.
      Parameters:
      endTime - the time at which this execution stopped processing
    • setStatus

      public void setStatus(String status)
      Should contain a value from DefaultDataFeedExecutionStatuses describing the current status of the execution.

      When this is being changed, be sure to update getStartTime() or getEndTime() if appropriate.

      Parameters:
      status - the current status of the execution
    • setContainsErrors

      public void setContainsErrors(boolean containsErrors)
      A simple flag indicating whether the current execution encountered any errors.
      Parameters:
      containsErrors - whether this execution experienced errors
      See Also:
    • setErrorDetails

      public void setErrorDetails(List<String> errorDetails)
      If errors are encountered during the run of this execution (ex: isContainsErrors() is true), details should be added here. Otherwise, this will be empty.
      Parameters:
      errorDetails - details about any errors experienced by this execution
      See Also:
    • setQueriedDataFileLocation

      public void setQueriedDataFileLocation(@Nullable String queriedDataFileLocation)
      After the raw data is fetched, the execution will serialize and store it in a JSON file. This can then be used by DataFeedPublication executions to transform + publish data.

      This field should contain the location of that file (including filename extension). This is usually something that can be directly passed to StorageService.

    • setProcessType

      public void setProcessType(String processType)
      Should be copied from DataFeedProcess.getProcessType().

      This duplication protects the execution in case DataFeedProcess is mutated after this starts.

      Parameters:
      processType - value matching DataFeedProcess.getProcessType()
    • setDataFeedPublicationConfigurationIds

      public void setDataFeedPublicationConfigurationIds(List<String> dataFeedPublicationConfigurationIds)
      Should be copied from DataFeedProcess.getDataFeedPublicationConfigurationIds().

      This duplication protects the execution in case DataFeedProcess is mutated after this starts.

      Parameters:
      dataFeedPublicationConfigurationIds - value matching DataFeedProcess.getDataFeedPublicationConfigurationIds()
    • setApplicationId

      public void setApplicationId(String applicationId)
      Should be copied from DataFeedProcess.getApplicationId().

      This duplication protects the execution in case DataFeedProcess is mutated after this starts.

      Parameters:
      applicationId - value matching DataFeedProcess.getApplicationId()
    • setFilterString

      public void setFilterString(@Nullable String filterString)
      Should be copied from DataFeedProcess.getFilterString().

      This duplication protects the execution in case DataFeedProcess is mutated after this starts.

      Parameters:
      filterString - value matching DataFeedProcess.getFilterString()
    • 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