Class ImportRequest
- Author:
- Phillip Verheyden (phillipuniverse)
-
Constructor Summary
ConstructorDescriptionConvenience constructor to initialize with a DefaultImportType -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
com.broadleafcommerce.data.tracking.core.filtering.domain.ChangeContainer
Metadata used to populate anyChangeEvent
created from this request.The type of data that is being importedThe application that the import items should go into.The catalog that the import items should go into.The ID of the customer context that the import items should go into.The sandbox that the import items should go into.If and only if a new sandbox needs to be created for the current import (determined using the logic described inimportingSandboxId
), this field can be used to supply the name of the sandbox that should be created.Restrictive defined headers to use for the import.getName()
The name of this import.See the Javadocs ofImport.getParentEntityId()
for details about this field.The name or reference to the specification to use, if applicable.getType()
The resource-tier conceptual mapping of what type of data this import should createThe reference to the vendor associated with this import.int
hashCode()
boolean
Whether or not this import should go straight to production or into a sandbox.void
setChangeContainer
(com.broadleafcommerce.data.tracking.core.filtering.domain.ChangeContainer changeContainer) Metadata used to populate anyChangeEvent
created from this request.void
setFileType
(String fileType) The type of data that is being importedvoid
setImportingApplicationId
(String importingApplicationId) The application that the import items should go into.void
setImportingCatalogId
(String importingCatalogId) The catalog that the import items should go into.void
setImportingCustomerContextId
(String importingCustomerContextId) The ID of the customer context that the import items should go into.void
setImportingSandboxId
(String importingSandboxId) The sandbox that the import items should go into.void
setImportingSandboxNameToCreate
(String importingSandboxNameToCreate) If and only if a new sandbox needs to be created for the current import (determined using the logic described inimportingSandboxId
), this field can be used to supply the name of the sandbox that should be created.void
setIncludedHeaders
(Set<String> includedHeaders) Restrictive defined headers to use for the import.void
The name of this import.void
setParentEntityId
(String parentEntityId) See the Javadocs ofImport.getParentEntityId()
for details about this field.void
setProductionImport
(boolean productionImport) Whether or not this import should go straight to production or into a sandbox.void
setSpecificationRef
(String specificationRef) The name or reference to the specification to use, if applicable.void
The resource-tier conceptual mapping of what type of data this import should createvoid
setVendorRef
(String vendorRef) The reference to the vendor associated with this import.toString()
-
Constructor Details
-
ImportRequest
Convenience constructor to initialize with a DefaultImportType- Parameters:
type
-- See Also:
-
ImportRequest
public ImportRequest()
-
-
Method Details
-
getName
The name of this import. If this is leftnull
, a name will be generated with the following format:$type + " - " + $timestamp
- Returns:
- the name of this import
-
getSpecificationRef
The name or reference to the specification to use, if applicable. Please seeImportSpecificationService
andDefaultImportSpecificationService
for how this is used.- Returns:
- name or reference to the specification to use, if applicable
- See Also:
-
getType
The resource-tier conceptual mapping of what type of data this import should create- See Also:
-
getFileType
The type of data that is being imported- See Also:
-
getIncludedHeaders
Restrictive defined headers to use for the import. If null or empty, this assumes that all headers in the import will be used -
isProductionImport
public boolean isProductionImport()Whether or not this import should go straight to production or into a sandbox.- See Also:
-
importingSandboxId
-
getImportingSandboxId
The sandbox that the import items should go into.This field only has any meaning if
productionImport
isfalse
. This should always benull
ifproductionImport
istrue
.In the event that a new sandbox needs to be created for this import,
productionImport
should befalse
and this value should benull
.ImportManager.processImport(String)
will generate a new sandbox ID and request its creation in that case.In the event that an existing sandbox should be used for this import,
productionImport
should befalse
and this value should be set to a valid sandbox ID.- Returns:
- the sandbox that the import items should go into
- See Also:
-
Import.importingSandboxId
ImportManager.processImport(String)
ImportService.createSandbox(String, String)
-
getImportingSandboxNameToCreate
If and only if a new sandbox needs to be created for the current import (determined using the logic described inimportingSandboxId
), this field can be used to supply the name of the sandbox that should be created.If not supplied, the name of the import will be used (will be the generated name if the import name had to be generated as described on
name
).- Returns:
- the name of the sandbox that should be created for this import
-
getImportingCatalogId
The catalog that the import items should go into. Required when importing items that are catalog-discriminated as determined bytype
.In the case of hierarchical catalogs, this is most-derived catalog id.
If not supplied, the value will be sourced from the request's
ContextInfo
.- Returns:
- the catalog that the import items should go into
- See Also:
-
getImportingApplicationId
The application that the import items should go into.If not supplied, the value will be sourced from the request's
ContextInfo
. -
getImportingCustomerContextId
The ID of the customer context that the import items should go into.If not supplied, the value will be sourced from the request's
ContextInfo
.- Returns:
- the customer context that the import items should go into
- See Also:
-
getParentEntityId
See the Javadocs ofImport.getParentEntityId()
for details about this field.- Returns:
- the parent entity id common to all imported entities (if applicable)
- See Also:
-
getVendorRef
The reference to the vendor associated with this import. This value can be null, in which case, no vendor is associated.- Returns:
- the reference to the vendor associated with this import
-
getChangeContainer
@Nullable public com.broadleafcommerce.data.tracking.core.filtering.domain.ChangeContainer getChangeContainer()Metadata used to populate anyChangeEvent
created from this request.- Returns:
- Metadata used to populate any
ChangeEvent
created from this request
-
setName
The name of this import. If this is leftnull
, a name will be generated with the following format:$type + " - " + $timestamp
- Parameters:
name
- the name of this import
-
setSpecificationRef
The name or reference to the specification to use, if applicable. Please seeImportSpecificationService
andDefaultImportSpecificationService
for how this is used.- Parameters:
specificationRef
- name or reference to the specification to use, if applicable- See Also:
-
setType
The resource-tier conceptual mapping of what type of data this import should create- See Also:
-
setFileType
The type of data that is being imported- See Also:
-
setIncludedHeaders
Restrictive defined headers to use for the import. If null or empty, this assumes that all headers in the import will be used -
setProductionImport
public void setProductionImport(boolean productionImport) Whether or not this import should go straight to production or into a sandbox.- See Also:
-
importingSandboxId
-
setImportingSandboxId
The sandbox that the import items should go into.This field only has any meaning if
productionImport
isfalse
. This should always benull
ifproductionImport
istrue
.In the event that a new sandbox needs to be created for this import,
productionImport
should befalse
and this value should benull
.ImportManager.processImport(String)
will generate a new sandbox ID and request its creation in that case.In the event that an existing sandbox should be used for this import,
productionImport
should befalse
and this value should be set to a valid sandbox ID.- Parameters:
importingSandboxId
- the sandbox that the import items should go into- See Also:
-
Import.importingSandboxId
ImportManager.processImport(String)
ImportService.createSandbox(String, String)
-
setImportingSandboxNameToCreate
If and only if a new sandbox needs to be created for the current import (determined using the logic described inimportingSandboxId
), this field can be used to supply the name of the sandbox that should be created.If not supplied, the name of the import will be used (will be the generated name if the import name had to be generated as described on
name
).- Parameters:
importingSandboxNameToCreate
- the name of the sandbox that should be created for this import
-
setImportingCatalogId
The catalog that the import items should go into. Required when importing items that are catalog-discriminated as determined bytype
.In the case of hierarchical catalogs, this is most-derived catalog id.
If not supplied, the value will be sourced from the request's
ContextInfo
.- Parameters:
importingCatalogId
- the catalog that the import items should go into- See Also:
-
setImportingApplicationId
The application that the import items should go into.If not supplied, the value will be sourced from the request's
ContextInfo
.- Parameters:
importingApplicationId
- the application that the import items should go into- See Also:
-
setImportingCustomerContextId
The ID of the customer context that the import items should go into.If not supplied, the value will be sourced from the request's
ContextInfo
.- Parameters:
importingCustomerContextId
- the customer context that the import items should go into- See Also:
-
setParentEntityId
See the Javadocs ofImport.getParentEntityId()
for details about this field.- Parameters:
parentEntityId
- id of the parent entity common to all imported entities (if applicable)- See Also:
-
setVendorRef
The reference to the vendor associated with this import. This value can be null, in which case, no vendor is associated.- Parameters:
vendorRef
- the reference to the vendor associated with this import
-
setChangeContainer
public void setChangeContainer(@Nullable com.broadleafcommerce.data.tracking.core.filtering.domain.ChangeContainer changeContainer) Metadata used to populate anyChangeEvent
created from this request.- Parameters:
changeContainer
- Metadata used to populate anyChangeEvent
created from this request
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-