Class Export
java.lang.Object
com.broadleafcommerce.common.dataexport.domain.Export
- All Implemented Interfaces:
Serializable
An entity that holds the basic information required to track the status of an export operation.
- Author:
- Samarth Dhruva (samarthd)
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
The application that the export is initialized on.The email address of the author that initiated this export operation.The timestamp at which this operation was first created.When thestatus
is determined to beExportStatus.ERROR
, this field should be set to contain the reasoning for the failure.A list of context IDs of the entities which should not be exported.The ID of the application that that the export's data will be sourced from.The ID of the catalog that that the export's data will be sourced from.The ID of the customer context that the export's data will be sourced from.The ID of the sandbox that the export's data will be sourced from.After the export file is created, this holds its location in the storage provider.The type of file that the export should ultimately produce for download by the user.The (by default, RSQL) filter string that should be used to find the records to export.getId()
The unique identifier of the export operation.A list of (additional) context IDs of specific entities which should be exported.The timestamp at which this operation last experienced a change.getName()
The name of the export operation.long
The number of records that have been successfully processed thus far.Additional parameters for this export.The parent id of the entities to export.The overall status of the export.The target of the export.The tenant that the export is initialized on.The ID of the time zone that will be used to format any date fields in the exported file.long
The total number of records that should be processed.int
hashCode()
void
setApplicationId
(String applicationId) The application that the export is initialized on.void
The email address of the author that initiated this export operation.void
setCreated
(Instant created) The timestamp at which this operation was first created.void
setErrorMessage
(String errorMessage) When thestatus
is determined to beExportStatus.ERROR
, this field should be set to contain the reasoning for the failure.void
setExclusions
(List<String> exclusions) A list of context IDs of the entities which should not be exported.void
setExportingApplicationId
(String exportingApplicationId) The ID of the application that that the export's data will be sourced from.void
setExportingCatalogId
(String exportingCatalogId) The ID of the catalog that that the export's data will be sourced from.void
setExportingCustomerContextId
(String exportingCustomerContextId) The ID of the customer context that the export's data will be sourced from.void
setExportingSandboxId
(String exportingSandboxId) The ID of the sandbox that the export's data will be sourced from.void
setFileLocation
(String fileLocation) After the export file is created, this holds its location in the storage provider.void
setFileType
(String fileType) The type of file that the export should ultimately produce for download by the user.void
setFilterString
(String filterString) The (by default, RSQL) filter string that should be used to find the records to export.void
The unique identifier of the export operation.void
setInclusions
(List<String> inclusions) A list of (additional) context IDs of specific entities which should be exported.void
setLastUpdated
(Instant lastUpdated) The timestamp at which this operation last experienced a change.void
The name of the export operation.void
setNumberOfRecordsProcessed
(long numberOfRecordsProcessed) The number of records that have been successfully processed thus far.void
setParameters
(Map<String, Object> parameters) Additional parameters for this export.void
setParentId
(String parentId) The parent id of the entities to export.void
setStatus
(ExportStatus status) The overall status of the export.void
The target of the export.void
setTenantId
(String tenantId) The tenant that the export is initialized on.void
setTimeZoneId
(String timeZoneId) The ID of the time zone that will be used to format any date fields in the exported file.void
setTotalRecordsToProcess
(long totalRecordsToProcess) The total number of records that should be processed.toString()
-
Constructor Details
-
Export
public Export()
-
-
Method Details
-
getId
The unique identifier of the export operation.- Returns:
- the unique identifier of the export operation
-
getName
The name of the export operation.- Returns:
- the name of the export operation
-
getFileType
The type of file that the export should ultimately produce for download by the user.- Returns:
- the type of file that the export should ultimately produce
- See Also:
-
getFileLocation
After the export file is created, this holds its location in the storage provider.- Returns:
- the location of the exported file in the storage provider
-
getStatus
The overall status of the export. This value should be updated as progress is made.- Returns:
- the overall status of the export
- See Also:
-
ExportStatus
errorMessage
-
getErrorMessage
When thestatus
is determined to beExportStatus.ERROR
, this field should be set to contain the reasoning for the failure.- Returns:
- a description of the error encountered when processing the operation (if any)
- See Also:
-
status
-
getTotalRecordsToProcess
public long getTotalRecordsToProcess()The total number of records that should be processed. This can be used in conjunction withnumberOfRecordsProcessed
to determine progress. This value should be determined before a request is made (ideally by running a count query that determines how many records will be targeted by the export).- Returns:
- the total number of records that should be processed
-
getNumberOfRecordsProcessed
public long getNumberOfRecordsProcessed()The number of records that have been successfully processed thus far. This value should be updated as progress is made.- Returns:
- the number of records that have been successfully processed thus far
-
getFilterString
The (by default, RSQL) filter string that should be used to find the records to export.Note: how to interpret
filterString
,inclusions
, andexclusions
is entirely left toExportProcessor
implementations.- Returns:
- the filter string that should be used to find the records to export
- See Also:
-
exclusions
inclusions
ExportProcessor.readRecordsToProcess(Export)
-
getInclusions
A list of (additional) context IDs of specific entities which should be exported.Note: how to interpret
filterString
,inclusions
, andexclusions
is entirely left toExportProcessor
implementations.- Returns:
- a list of context IDs of specific entities which should be exported
- See Also:
-
filterString
exclusions
ExportProcessor.readRecordsToProcess(Export)
-
getExclusions
A list of context IDs of the entities which should not be exported. This would be a filter to exclude any entities that are targeted for updating byfilterString
/inclusions
.Note: how to interpret
filterString
,inclusions
, andexclusions
is entirely left toExportProcessor
implementations.- Returns:
- a list of context IDs of the entities which should not be exported
- See Also:
-
filterString
inclusions
ExportProcessor.readRecordsToProcess(Export)
-
getCreated
The timestamp at which this operation was first created.- Returns:
- the timestamp at which this operation was first created
-
getLastUpdated
The timestamp at which this operation last experienced a change. This is very important, and should be constantly updated by the logic responsible for performing the actual entity exports. The value of this field will be compared against a timeout for operations that are marked asExportStatus.REQUESTED
orExportStatus.PROCESSING
in order to determine whether an operation is hanging or failed.- Returns:
- the timestamp at which this operation last experienced a change
-
getTarget
The target of the export. This is some value that can be mapped to a particular domain by the logic performing the export, rather than requiring explicit persistence of the fully qualified classname. An example of a value would be"PRODUCT"
or"CATEGORY"
- Returns:
- the target of the export
-
getParentId
The parent id of the entities to export. This should be specified if the entities to export belong to some parent entity.- Returns:
- the parent id of the entities to export
-
getApplicationId
The application that the export is initialized on. This can be different than theexportingApplicationId
.- Returns:
- the application that the export is initialized on
-
getTenantId
The tenant that the export is initialized on.- Returns:
- the tenant that the export is initialized on
-
getExportingSandboxId
The ID of the sandbox that the export's data will be sourced from.- Returns:
- the ID of the sandbox that the export's data will be sourced from
-
getExportingApplicationId
The ID of the application that that the export's data will be sourced from.- Returns:
- the ID of the application that that the export's data will be sourced from
-
getExportingCatalogId
The ID of the catalog that that the export's data will be sourced from.- Returns:
- the ID of the catalog that that the export's data will be sourced from
-
getExportingCustomerContextId
The ID of the customer context that the export's data will be sourced from.- Returns:
- the ID of the customer context that the export's data will be sourced from
-
getAuthor
The email address of the author that initiated this export operation. Derived from the current security principal when receiving anExportRequest
.- Returns:
- the email address of the author that initiated this export operation
-
getTimeZoneId
The ID of the time zone that will be used to format any date fields in the exported file. Ifnull
, will default to UTC.- Returns:
- the time-zone ID used to format any date fields in the exported file
- See Also:
-
getParameters
Additional parameters for this export.- Returns:
- the map of the additional parameters for this request
-
setId
The unique identifier of the export operation.- Parameters:
id
- the unique identifier of the export operation
-
setName
The name of the export operation.- Parameters:
name
- the name of the export operation
-
setFileType
The type of file that the export should ultimately produce for download by the user.- Parameters:
fileType
- the type of file that the export should ultimately produce- See Also:
-
setFileLocation
After the export file is created, this holds its location in the storage provider.- Parameters:
fileLocation
- the location of the exported file in the storage provider
-
setStatus
The overall status of the export. This value should be updated as progress is made.- Parameters:
status
- the overall status of the export- See Also:
-
ExportStatus
errorMessage
-
setErrorMessage
When thestatus
is determined to beExportStatus.ERROR
, this field should be set to contain the reasoning for the failure.- Parameters:
errorMessage
- a description of the error encountered when processing the operation (if any)- See Also:
-
status
-
setTotalRecordsToProcess
public void setTotalRecordsToProcess(long totalRecordsToProcess) The total number of records that should be processed. This can be used in conjunction withnumberOfRecordsProcessed
to determine progress. This value should be determined before a request is made (ideally by running a count query that determines how many records will be targeted by the export).- Parameters:
totalRecordsToProcess
- the total number of records that should be processed
-
setNumberOfRecordsProcessed
public void setNumberOfRecordsProcessed(long numberOfRecordsProcessed) The number of records that have been successfully processed thus far. This value should be updated as progress is made.- Parameters:
numberOfRecordsProcessed
- the number of records that have been successfully processed thus far
-
setFilterString
The (by default, RSQL) filter string that should be used to find the records to export.Note: how to interpret
filterString
,inclusions
, andexclusions
is entirely left toExportProcessor
implementations.- Parameters:
filterString
- the filter string that should be used to find the records to export- See Also:
-
exclusions
inclusions
ExportProcessor.readRecordsToProcess(Export)
-
setInclusions
A list of (additional) context IDs of specific entities which should be exported.Note: how to interpret
filterString
,inclusions
, andexclusions
is entirely left toExportProcessor
implementations.- Parameters:
inclusions
- a list of context IDs of specific entities which should be exported- See Also:
-
filterString
exclusions
ExportProcessor.readRecordsToProcess(Export)
-
setExclusions
A list of context IDs of the entities which should not be exported. This would be a filter to exclude any entities that are targeted for updating byfilterString
/inclusions
.Note: how to interpret
filterString
,inclusions
, andexclusions
is entirely left toExportProcessor
implementations.- Parameters:
exclusions
- a list of context IDs of the entities which should not be exported- See Also:
-
filterString
inclusions
ExportProcessor.readRecordsToProcess(Export)
-
setCreated
The timestamp at which this operation was first created.- Parameters:
created
- the timestamp at which this operation was first created
-
setLastUpdated
The timestamp at which this operation last experienced a change. This is very important, and should be constantly updated by the logic responsible for performing the actual entity exports. The value of this field will be compared against a timeout for operations that are marked asExportStatus.REQUESTED
orExportStatus.PROCESSING
in order to determine whether an operation is hanging or failed.- Parameters:
lastUpdated
- the timestamp at which this operation last experienced a change
-
setTarget
The target of the export. This is some value that can be mapped to a particular domain by the logic performing the export, rather than requiring explicit persistence of the fully qualified classname. An example of a value would be"PRODUCT"
or"CATEGORY"
- Parameters:
target
- the target of the export
-
setParentId
The parent id of the entities to export. This should be specified if the entities to export belong to some parent entity.- Parameters:
parentId
- the parent id of the entities to export
-
setApplicationId
The application that the export is initialized on. This can be different than theexportingApplicationId
.- Parameters:
applicationId
- the application that the export is initialized on
-
setTenantId
The tenant that the export is initialized on.- Parameters:
tenantId
- the tenant that the export is initialized on
-
setExportingSandboxId
The ID of the sandbox that the export's data will be sourced from.- Parameters:
exportingSandboxId
- the ID of the sandbox that the export's data will be sourced from
-
setExportingApplicationId
The ID of the application that that the export's data will be sourced from.- Parameters:
exportingApplicationId
- the ID of the application that that the export's data will be sourced from
-
setExportingCatalogId
The ID of the catalog that that the export's data will be sourced from.- Parameters:
exportingCatalogId
- the ID of the catalog that that the export's data will be sourced from
-
setExportingCustomerContextId
The ID of the customer context that the export's data will be sourced from.- Parameters:
exportingCustomerContextId
- the ID of the customer context that the export's data will be sourced from
-
setAuthor
The email address of the author that initiated this export operation. Derived from the current security principal when receiving anExportRequest
.- Parameters:
author
- the email address of the author that initiated this export operation
-
setTimeZoneId
The ID of the time zone that will be used to format any date fields in the exported file. Ifnull
, will default to UTC.- Parameters:
timeZoneId
- the time-zone ID used to format any date fields in the exported file- See Also:
-
setParameters
Additional parameters for this export.- Parameters:
parameters
- the map of the additional parameters for this request
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-