# com.beasys.commerce.ebusiness.catalog.service.item
ProductItemManager Interface

public interface ProductItemManager
extends `CatalogService`

Service interface for managing Product Items.

Related Topics

``ProductItemManagerHome``
``ProductItemManagerImpl``
``CatalogManager``
``ProductItem``

All Superinterfaces
  `BusinessSmartComponent`, `CatalogService`, `EJBObject`, `Remote`, `Serializable`, `Session`

## Method Summary

`public void` | `createItem`(`CatalogRequest` request, `ProductItem` product) Creates a new product item.
`public `ProductItem`` | `getItem`(`CatalogRequest` request, `ProductItemKey` productKey) Returns the product item with the specified key.
`public int` | `getItemCount`(`CatalogRequest` request) Returns the number of product items in the product catalog.
`public `ProductItemKey`[]` | `getItemKeys`(`CatalogRequest` request, int beginIndex, int endIndex) Returns an array over all existing product item keys within the specified ordered range.
`public `ProductItem`[]` | `getItems`(`CatalogRequest` request, `ProductItemKey`[] productKeys) Returns the product items with the given product item keys.
`public `ViewIterator`` | `getItems`(`CatalogRequest` request, int viewSize) Returns a ViewIterator over all existing product items.
`public `String`[]` | `getKeywords`(`CatalogRequest` request, `ProductItemKey` productKey) Returns the keywords associated with a given product item.
`public void` | `removeItem`(`CatalogRequest` request, `ProductItemKey` productKey) Removes a product item.
`public void` | `setKeywords`(`CatalogRequest` request, `ProductItemKey` productKey, `String`[] keywords) Sets the keywords for a given product item.
`public void` | `updateItem`(`CatalogRequest` request, `ProductItem` product) Updates a product item.

Methods from interface `com.beasys.commerce.ebusiness.catalog.service.`CatalogService``
``getCatalogManager``

Methods from interface `javax.ejb.`EJBObject``
`getEJBHome, getHandle, getPrimaryKey, isIdentical, remove`

## Method Detail

### createItem(CatalogRequest, ProductItem) Method

    public void createItem(CatalogRequest request,
                           ProductItem product)
         throws RemoteException, CatalogCreateException, CatalogException

Creates a new product item.

#### Parameters

request
  The catalog request object.

product
  The product item to persist.

#### Exceptions

``RemoteException``
``CatalogCreateException``
  if the product item could not be created.
``CatalogException``
  on general error.

### getItem(CatalogRequest, ProductItemKey) Method

    public ProductItem getItem(CatalogRequest request,
                               ProductItemKey productKey)
         throws RemoteException, CatalogFinderException, CatalogException

Returns the product item with the specified key.

#### Parameters

request
  The catalog request object.

productKey
  The key of the target product.

#### Exceptions

``RemoteException``
``CatalogFinderException``
  if the product item could not be found.
``CatalogException``
  on general error.

### getItemCount(CatalogRequest) Method

    public int getItemCount(CatalogRequest request)
         throws RemoteException, CatalogException

Returns the number of product items in the product catalog.

#### Parameters

request
  The catalog request object

#### Returns

The number of product items in the product catalog.

#### Exceptions

``RemoteException``
``CatalogException``
  on general error.

### getItemKeys(CatalogRequest, int, int) Method

    public ProductItemKey[] getItemKeys(CatalogRequest request,
                                      int beginIndex,
                                      int endIndex)
         throws RemoteException, CatalogException

Returns an array over all existing product item keys within the specified ordered range.

#### Parameters

request
  The catalog request object.

beginIndex
  The lower bound index for returned product item keys.

endIndex
  The upper bound index for returned product item keys.

#### Returns

An array of the product item keys.

#### Exceptions

``RemoteException``
``CatalogException``
  on general error.

### getItems(CatalogRequest, ProductItemKey[]) Method

    public ProductItem[] getItems(CatalogRequest request,
                                ProductItemKey[] productKeys)
         throws RemoteException, CatalogFinderException, CatalogException

Returns the product items with the given product item keys.

#### Parameters

request
  The catalog request object.

productKeys
  The keys of the target product items.

#### Returns

The product items with the given product item keys.

#### Exceptions

``RemoteException``
``CatalogFinderException``
  if a product item with a given key does not exist.
``CatalogException``
  on general error.

### getItems(CatalogRequest, int) Method

    public ViewIterator getItems(CatalogRequest request,
                                 int viewSize)
         throws RemoteException, CatalogException

Returns a ViewIterator over all existing product items.

#### Parameters

request
  The catalog request object.

viewSize
  The view size of the returned ViewIterator.

#### Returns

A ViewIterator over all existing product items.

#### Exceptions

``RemoteException``
``CatalogException``
  on general error.

### getKeywords(CatalogRequest, ProductItemKey) Method

    public String[] getKeywords(CatalogRequest request,
                              ProductItemKey productKey)
         throws RemoteException, CatalogFinderException, CatalogException

Returns the keywords associated with a given product item.

#### Parameters

request
  The catalog request object.

productKey
  The key of the target product.

#### Returns

The keywords associated with the given product item. If there are no keywords associated with the item, a zero length <code>String</code> array is returned.

#### Exceptions

``RemoteException``
``CatalogFinderException``
  if the product item could not be found.
``CatalogException``
  on general error.

### removeItem(CatalogRequest, ProductItemKey) Method

    public void removeItem(CatalogRequest request,
                           ProductItemKey productKey)
         throws RemoteException, CatalogRemoveException, CatalogFinderException, CatalogException

Removes a product item.

#### Parameters

request
  The catalog request object.

productKey
  The product item to remove.

#### Exceptions

``RemoteException``
``CatalogRemoveException``
  if the product item could not be removed.
``CatalogFinderException``
  if the product item could not be found.
``CatalogException``
  on general error.

### setKeywords(CatalogRequest, ProductItemKey, String[]) Method

    public void setKeywords(CatalogRequest request,
                            ProductItemKey productKey,
                            String[] keywords)
         throws RemoteException, CatalogFinderException, CatalogException

Sets the keywords for a given product item.

#### Parameters

request
  The catalog request object.

productKey
  The key of the target product.

keywords
  The keywords to associate with the given product item.

#### Exceptions

``RemoteException``
``CatalogFinderException``
  if the product item could not be found.
``CatalogException``
  on general error.

### updateItem(CatalogRequest, ProductItem) Method

    public void updateItem(CatalogRequest request,
                           ProductItem product)
         throws RemoteException, CatalogFinderException, CatalogException

Updates a product item.

#### Parameters

request
  The catalog request object.

product
  The product item to update.

#### Exceptions

``RemoteException``
``CatalogFinderException``
  if the product item could not be found.
``CatalogException``
  on general error.