Class CloneProductAssetsService<P extends Product,R extends CloneProductRequest>
java.lang.Object
com.broadleafcommerce.catalog.clone.product.service.CloneProductAssetsService<P,R>
- All Implemented Interfaces:
CloneProductRelationshipsService<P,
,R> org.springframework.core.Ordered
public class CloneProductAssetsService<P extends Product,R extends CloneProductRequest>
extends Object
implements CloneProductRelationshipsService<P,R>
Clone the
ProductAsset
.- Author:
- Dima Myroniuk (dmyroniuk)
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorDescriptionCloneProductAssetsService
(ProductAssetService<ProductAsset> productAssetService) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Check if this service can clone specific relationship type.void
executeCloneRelationship
(R request, P original, P cloned, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Clone theProduct
relationships.int
getOrder()
protected ProductAssetService<ProductAsset>
The name of the sub-container (second-level entity), which is typically snake-cased and capitalized i.e., "PRICE_DATA".
-
Constructor Details
-
CloneProductAssetsService
-
-
Method Details
-
canHandle
Description copied from interface:CloneProductRelationshipsService
Check if this service can clone specific relationship type.- Specified by:
canHandle
in interfaceCloneProductRelationshipsService<P extends Product,
R extends CloneProductRequest> - Parameters:
relationshipType
- the relationship type to clone- Returns:
- true if this service can clone specific relationship type, false otherwise
-
executeCloneRelationship
public void executeCloneRelationship(R request, P original, P cloned, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Description copied from interface:CloneProductRelationshipsService
Clone theProduct
relationships.- Specified by:
executeCloneRelationship
in interfaceCloneProductRelationshipsService<P extends Product,
R extends CloneProductRequest> - Parameters:
request
- the request to perform the clone operationoriginal
- the original product that this is being cloned fromcloned
- theProduct
for which to clone relationships. The cloned relationships will be assigned to this Productcontext
- context information surrounding sandboxing and multitenant state
-
getSubContainerName
Description copied from interface:CloneProductRelationshipsService
The name of the sub-container (second-level entity), which is typically snake-cased and capitalized i.e., "PRICE_DATA".- Specified by:
getSubContainerName
in interfaceCloneProductRelationshipsService<P extends Product,
R extends CloneProductRequest> - Returns:
- The name of the sub-container (second-level entity), which is typically snake-cased and capitalized, i.e., "PRICE_DATA"
- See Also:
-
ChangeContainer.getSubContainerName()
-
getOrder
public int getOrder()- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
-
getProductAssetService
-