Class CloneCategoryProductRelationshipService<P extends Category,R extends CloneCategoryRequest>

java.lang.Object
com.broadleafcommerce.catalog.clone.category.service.CloneCategoryProductRelationshipService<P,R>
All Implemented Interfaces:
CloneCategoryRelationshipsService<P,R>, org.springframework.core.Ordered

public class CloneCategoryProductRelationshipService<P extends Category,R extends CloneCategoryRequest> extends Object implements CloneCategoryRelationshipsService<P,R>
Clone the CategoryProduct.
Author:
Chad Harchar (charchar)
  • Constructor Details

    • CloneCategoryProductRelationshipService

      public CloneCategoryProductRelationshipService(CategoryProductService<CategoryProduct> categoryProductService, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
  • Method Details

    • canHandle

      public boolean canHandle(String relationshipType)
      Description copied from interface: CloneCategoryRelationshipsService
      Check if this service can clone specific relationship type.
      Specified by:
      canHandle in interface CloneCategoryRelationshipsService<P extends Category,R extends CloneCategoryRequest>
      Parameters:
      relationshipType - the relationship type to clone
      Returns:
      true if this service can clone specific relationship type, false otherwise
    • executeCloneRelationship

      public void executeCloneRelationship(@NonNull R request, @NonNull P original, @NonNull P cloned, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Description copied from interface: CloneCategoryRelationshipsService
      Clone the Category relationships.
      Specified by:
      executeCloneRelationship in interface CloneCategoryRelationshipsService<P extends Category,R extends CloneCategoryRequest>
      Parameters:
      request - the request to perform the clone operation
      original - the original category that this is being cloned from
      cloned - the Category for which to clone relationships. The cloned relationships will be assigned to this Category
      context - context information surrounding sandboxing and multitenant state
    • getSubContainerName

      public String getSubContainerName()
      Description copied from interface: CloneCategoryRelationshipsService
      The name of the sub-container (second-level entity), which is typically snake-cased and capitalized i.e., "PRICE_DATA".
      Specified by:
      getSubContainerName in interface CloneCategoryRelationshipsService<P extends Category,R extends CloneCategoryRequest>
      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 interface org.springframework.core.Ordered
    • getCategoryProductService

      protected CategoryProductService<CategoryProduct> getCategoryProductService()
    • getTypeFactory

      protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()