com.elasticpath.service.catalog
Interface ProductTypeService

All Superinterfaces:
EpPersistenceService, EpService
All Known Implementing Classes:
ProductTypeServiceImpl

public interface ProductTypeService
extends EpPersistenceService

Provide attribute related business service.


Method Summary
 ProductType add(ProductType productType)
          Adds the given attribute.
 ProductType initialize(ProductType productType)
          Initialize (fill in) category attributes for the given ProductType.
 java.util.List list()
          Lists all productType stored in the database.
 java.util.List listUsedUids()
          Lists all productType uids used by categories.
 void remove(ProductType productType)
          Delete the productType.
 void update(ProductType productType)
          Updates the given productType.
 
Methods inherited from interface com.elasticpath.service.EpPersistenceService
getObject, getPersistenceEngine, setPersistenceEngine
 
Methods inherited from interface com.elasticpath.service.EpService
getElasticPath, setElasticPath
 

Method Detail

add

ProductType add(ProductType productType)
                throws DuplicateKeyException
Adds the given attribute.

Parameters:
productType - the productType to add
Returns:
the persisted instance of productType
Throws:
DuplicateKeyException - - if a productType with the speicifed key already exists.

initialize

ProductType initialize(ProductType productType)
Initialize (fill in) category attributes for the given ProductType.

Parameters:
productType - productType that needs attributes filled in.
Returns:
a productType with the attributeGroup filled in.

list

java.util.List list()
                    throws EpServiceException
Lists all productType stored in the database.

Returns:
a list of productType
Throws:
EpServiceException - - in case of any errors

listUsedUids

java.util.List listUsedUids()
Lists all productType uids used by categories.

Returns:
a list of used productType uids

remove

void remove(ProductType productType)
            throws EpServiceException
Delete the productType.

Parameters:
productType - the productType to remove
Throws:
EpServiceException - - in case of any errors

update

void update(ProductType productType)
            throws DuplicateKeyException
Updates the given productType.

Parameters:
productType - the productType to update
Throws:
DuplicateKeyException - - if a productType with the speicifed key already exists.