© 2002 BEA Systems, Inc.


com.beasys.commerce.ebusiness.catalog.service.item
Class ProductItemManagerImpl

java.lang.Object
  |
  +--com.beasys.commerce.foundation.SessionImpl
        |
        +--com.beasys.commerce.ebusiness.catalog.service.CatalogServiceImpl
              |
              +--com.beasys.commerce.ebusiness.catalog.service.item.ProductItemManagerImpl

public class ProductItemManagerImpl
extends CatalogServiceImpl

The implementation class for the ProductItemManager Session EJB. This implementation delegates to the service specifed by the following EJB environment property:

See Also:
ProductItemManager, ProductItemManagerHome, CatalogManager, Serialized Form

Fields inherited from class com.beasys.commerce.ebusiness.catalog.service.CatalogServiceImpl
CATALOG_MANAGER_HOME
 
Fields inherited from class com.beasys.commerce.foundation.SessionImpl
_ctx, _environmentNamingContext, _environmentPropertyCache, _isDirty
 
Constructor Summary
ProductItemManagerImpl()
           
 
Method Summary
 void createItem(CatalogRequest request, ProductItem product)
          Creates a new product item.
 void ejbActivate()
           
 void ejbCreate()
           
 void ejbPassivate()
           
 void ejbPostCreate()
           
 void ejbRemove()
           
 ProductItem getItem(CatalogRequest request, ProductItemKey productKey)
          Returns the product item with the specified key.
 int getItemCount(CatalogRequest request)
          Returns the number of product items in the product catalog.
 ProductItemKey[] getItemKeys(CatalogRequest request, int beginIndex, int endIndex)
          Returns an array over all existing product item keys within the specified ordered range.
 ViewIterator getItems(CatalogRequest request, int viewSize)
          Returns a ViewIterator over all existing product items.
 ProductItem[] getItems(CatalogRequest request, ProductItemKey[] productKeys)
          Returns the product items with the given product item keys.
 java.lang.String[] getKeywords(CatalogRequest request, ProductItemKey productKey)
          Returns the keywords associated with a given product item.
 void removeItem(CatalogRequest request, ProductItemKey productKey)
          Removes a product item.
 void setKeywords(CatalogRequest request, ProductItemKey productKey, java.lang.String[] keywords)
          Sets the keywords for a given product item.
 void setSessionContext(javax.ejb.SessionContext ctx)
           
 void updateItem(CatalogRequest request, ProductItem product)
          Updates a product item.
 
Methods inherited from class com.beasys.commerce.ebusiness.catalog.service.CatalogServiceImpl
getCatalogManager, getCatalogManagerJndiName, validateAuthorization
 
Methods inherited from class com.beasys.commerce.foundation.SessionImpl
clearRelationalBinding, clearRelationalBinding, clearRelationalBinding, clearRelationalBinding, doRelationalBinding, doRelationalBinding, doRelationalBindingOnElement, doRelationalBindingOnElement, doRelationalBindingOnElement, doRelationalBindingOnSingleton, doRelationalBindingOnSingleton, doRelationalBindingOnSingleton, doRelationalBindingWithMapKey, doRelationalBindingWithMapKey, doRelationalBindingWithMapKey, enumerateRelationalBinding, enumerateRelationalBinding, getEnvironmentNamingContext, getEnvironmentProperty, getEnvironmentProperty, getEnvironmentPropertyCache, getPersistenceHelperPlugin, getSessionContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProductItemManagerImpl

public ProductItemManagerImpl()
Method Detail

ejbCreate

public void ejbCreate()
               throws javax.ejb.CreateException

Overrides:
ejbCreate in class CatalogServiceImpl

ejbPostCreate

public void ejbPostCreate()
                   throws javax.ejb.CreateException

Overrides:
ejbPostCreate in class CatalogServiceImpl

ejbActivate

public void ejbActivate()
                 throws javax.ejb.EJBException

Overrides:
ejbActivate in class CatalogServiceImpl

ejbPassivate

public void ejbPassivate()
                  throws javax.ejb.EJBException

Overrides:
ejbPassivate in class CatalogServiceImpl

ejbRemove

public void ejbRemove()
               throws javax.ejb.EJBException

Overrides:
ejbRemove in class CatalogServiceImpl

setSessionContext

public void setSessionContext(javax.ejb.SessionContext ctx)
                       throws javax.ejb.EJBException

Overrides:
setSessionContext in class CatalogServiceImpl

getItemCount

public int getItemCount(CatalogRequest request)
                 throws CatalogException,
                        java.rmi.RemoteException
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.
Throws:
CatalogException - on general error.

getItem

public ProductItem getItem(CatalogRequest request,
                           ProductItemKey productKey)
                    throws CatalogFinderException,
                           CatalogException,
                           java.rmi.RemoteException
Returns the product item with the specified key.

Parameters:
request - The catalog request object.
productKey - The key of the target product.
Throws:
CatalogFinderException - if the product item could not be found.
CatalogException - on general error.

getItems

public ProductItem[] getItems(CatalogRequest request,
                              ProductItemKey[] productKeys)
                       throws CatalogFinderException,
                              CatalogException,
                              java.rmi.RemoteException
Returns the product items with the given product item keys.

Parameters:
request - The catalog request object.
keys - The keys of the target product items.
Throws:
CatalogFinderException - if a product item with a given key does not exist.
CatalogException - on general error.

getItemKeys

public ProductItemKey[] getItemKeys(CatalogRequest request,
                                    int beginIndex,
                                    int endIndex)
                             throws CatalogException,
                                    java.rmi.RemoteException
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.
Throws:
CatalogException - on general error.

getItems

public ViewIterator getItems(CatalogRequest request,
                             int viewSize)
                      throws CatalogException,
                             java.rmi.RemoteException
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.
Throws:
CatalogException - on general error.

getKeywords

public java.lang.String[] getKeywords(CatalogRequest request,
                                      ProductItemKey productKey)
                               throws CatalogFinderException,
                                      CatalogException,
                                      java.rmi.RemoteException
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.
Throws:
CatalogFinderException - if the product item could not be found.
CatalogException - on general error.

setKeywords

public void setKeywords(CatalogRequest request,
                        ProductItemKey productKey,
                        java.lang.String[] keywords)
                 throws CatalogFinderException,
                        CatalogException,
                        java.rmi.RemoteException
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.
Throws:
CatalogFinderException - if the product item could not be found.
CatalogException - on general error.

createItem

public void createItem(CatalogRequest request,
                       ProductItem product)
                throws CatalogCreateException,
                       CatalogException,
                       java.rmi.RemoteException
Creates a new product item.

Parameters:
request - The catalog request object.
product - The product item to persist.
Throws:
CatalogCreateException - if the product item could not be created.
CatalogException - on general error.

updateItem

public void updateItem(CatalogRequest request,
                       ProductItem product)
                throws CatalogFinderException,
                       CatalogException,
                       java.rmi.RemoteException
Updates a product item.

Parameters:
request - The catalog request object.
product - The product item to update.
Throws:
CatalogFinderException - if the product item could not be found.
CatalogException - on general error.

removeItem

public void removeItem(CatalogRequest request,
                       ProductItemKey productKey)
                throws CatalogRemoveException,
                       CatalogFinderException,
                       CatalogException,
                       java.rmi.RemoteException
Removes a product item.

Parameters:
request - The catalog request object.
product - The product item to remove.
Throws:
CatalogRemoveException - if the product item could not be removed.
CatalogFinderException - if the product item could not be found.
CatalogException - on general error.

© 2002 BEA Systems, Inc.

Copyright © 2002 BEA Systems, Inc. All Rights Reserved