com.elasticpath.service.catalog
Interface CategoryTypeService

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

public interface CategoryTypeService
extends EpPersistenceService

Provide attribute related business service.


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

Method Detail

add

CategoryType add(CategoryType categoryType)
                 throws DuplicateKeyException
Adds the given attribute.

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

initialize

CategoryType initialize(CategoryType categoryType)
Initialize (fill in) category attributes for the given CategoryType.

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

list

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

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

listInfo

java.util.List listInfo()
                        throws EpServiceException
Lists all CategoryType Info stored in the database. Each element in the list will be composed of a 2 element String array: [uid, name] to ease DWR conversion.

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

listUsedUids

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

Returns:
a list of used categoryType uids

remove

void remove(CategoryType categoryType)
            throws EpServiceException
Delete the categoryType.

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

update

void update(CategoryType categoryType)
            throws DuplicateKeyException
Updates the given categoryType.

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