org.broadleafcommerce.admin.client.service
Interface AdminCatalogService

All Superinterfaces:
com.google.gwt.user.client.rpc.RemoteService
All Known Implementing Classes:
AdminCatalogRemoteService

public interface AdminCatalogService
extends com.google.gwt.user.client.rpc.RemoteService

Author:
Phillip Verheyden

Method Summary
 Boolean cloneProduct(Long productId)
          This will create a new product along with a new Sku for the defaultSku, along with new Skus for all of the additional Skus.
 Integer generateSkusFromProduct(Long productId)
          Clear out any Skus that are already attached to the Product if there were any there and generate a new set of Skus based on the permutations of ProductOptions attached to this Product
 

Method Detail

generateSkusFromProduct

@Secured(value="PERMISSION_OTHER_DEFAULT")
Integer generateSkusFromProduct(Long productId)
                                throws com.gwtincubator.security.exception.ApplicationSecurityException
Clear out any Skus that are already attached to the Product if there were any there and generate a new set of Skus based on the permutations of ProductOptions attached to this Product

Parameters:
productId - - the Product to generate Skus from
Returns:
the number of generated Skus from the ProductOption permutations
Throws:
com.gwtincubator.security.exception.ApplicationSecurityException

cloneProduct

@Secured(value="PERMISSION_OTHER_DEFAULT")
Boolean cloneProduct(Long productId)
                     throws com.gwtincubator.security.exception.ApplicationSecurityException
This will create a new product along with a new Sku for the defaultSku, along with new Skus for all of the additional Skus. This is achieved by simply detaching the entities from the persistent session, resetting the primary keys and then saving the entity. Note: Media for the product is not saved separately, meaning if you make a change to the original product's media items (the one specified by productId) it will change the cloned product's media and vice-versa.

Parameters:
productId -
Returns:
Throws:
com.gwtincubator.security.exception.ApplicationSecurityException


Copyright © 2012. All Rights Reserved.