catalog.view.bean
Class ProductBean

java.lang.Object
  extended bycatalog.view.bean.BaseBean
      extended bycatalog.view.bean.ProductBean

public class ProductBean
extends BaseBean

Product backing bean.

Used by the createProduct page and editProduct page.

Author:
Derek Y. Shen

Field Summary
 
Fields inherited from class catalog.view.bean.BaseBean
logger, serviceLocator
 
Constructor Summary
ProductBean()
          Default constructor.
 
Method Summary
 java.lang.String createAction()
          Backing bean action to create a new product.
 java.lang.String deleteAction()
          Backing bean action to delete product.
 java.util.Set getCategoryIds()
           
 java.lang.String getDescription()
           
 double getHeight()
           
 java.lang.String getId()
           
 java.lang.String getName()
           
 double getPrice()
           
 java.util.List getSelectedCategoryIds()
           
 java.lang.String getShortDescription()
          Get the short description of the product.
 double getWidth()
           
protected  void init()
          Initializes ProductBean.
 void setCategoryIds(java.util.Set newCategoryIds)
           
 void setDescription(java.lang.String newDescription)
           
 void setHeight(double newHeight)
           
 void setId(java.lang.String newId)
          Invoked by the JSF managed bean facility.
 void setName(java.lang.String newName)
           
 void setPrice(double newPrice)
           
 void setSelectedCategoryIds(java.util.List newSelectedCategoryIds)
           
 void setWidth(double newWidth)
           
 java.lang.String toString()
           
 java.lang.String updateAction()
          Backing bean action to update product.
 
Methods inherited from class catalog.view.bean.BaseBean
getServiceLocator, setServiceLocator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProductBean

public ProductBean()
Default constructor.

Method Detail

init

protected void init()
Initializes ProductBean.

Overrides:
init in class BaseBean
See Also:
BaseBean.init()

updateAction

public java.lang.String updateAction()
Backing bean action to update product.

Returns:
the navigation result

createAction

public java.lang.String createAction()
Backing bean action to create a new product.

Returns:
the navigation result

deleteAction

public java.lang.String deleteAction()
Backing bean action to delete product.

Returns:
the navigation result

getId

public java.lang.String getId()

setId

public void setId(java.lang.String newId)
Invoked by the JSF managed bean facility.

The id is from the request parameter. If the id is not null, by using the id as the key, the product bean is initialized.


getName

public java.lang.String getName()

setName

public void setName(java.lang.String newName)

getDescription

public java.lang.String getDescription()

setDescription

public void setDescription(java.lang.String newDescription)

getPrice

public double getPrice()

setPrice

public void setPrice(double newPrice)

getWidth

public double getWidth()

setWidth

public void setWidth(double newWidth)

getHeight

public double getHeight()

setHeight

public void setHeight(double newHeight)

getCategoryIds

public java.util.Set getCategoryIds()

setCategoryIds

public void setCategoryIds(java.util.Set newCategoryIds)

getSelectedCategoryIds

public java.util.List getSelectedCategoryIds()

setSelectedCategoryIds

public void setSelectedCategoryIds(java.util.List newSelectedCategoryIds)

getShortDescription

public java.lang.String getShortDescription()
Get the short description of the product.

It is used in the productSummary page.

Returns:
the short description of the product

toString

public java.lang.String toString()


Copyright (c) 2004 The JCatalog Project.