catalog.view.bean
Class ApplicationBean

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

public class ApplicationBean
extends BaseBean

The managed bean with application scope.

It is used as an application scope cache. In JSF, the properties are set by bean management facility.

Author:
Derek Y. Shen

Field Summary
 
Fields inherited from class catalog.view.bean.BaseBean
serviceLocator
 
Constructor Summary
ApplicationBean()
          Default Constructor.
 
Method Summary
 java.lang.String getCategoryName(java.lang.String id)
          Get the category name by category id.
 java.util.List getCategorySelectItems()
           
 java.lang.String getDummyVariable()
           
static java.lang.String getImageUploadResultPage()
           
static java.lang.String getProductImageDirUri()
           
 int getProductsPerPage()
           
protected  void init()
          Initializes the ApplicationBean.
 void setImageUploadResultPage(java.lang.String newImageUploadResultPage)
           
 void setProductImageDirUri(java.lang.String newProductImageDirUri)
           
 void setProductsPerPage(int newProductsPerPage)
           
 
Methods inherited from class catalog.view.bean.BaseBean
getServiceLocator, setServiceLocator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationBean

public ApplicationBean()
Default Constructor.

Throws:
javax.faces.FacesException - If internal error occurs while retrieves categories
Method Detail

init

protected void init()
Initializes the ApplicationBean.

load all the categories.

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

getCategorySelectItems

public java.util.List getCategorySelectItems()

getProductsPerPage

public int getProductsPerPage()

setProductsPerPage

public void setProductsPerPage(int newProductsPerPage)

getProductImageDirUri

public static java.lang.String getProductImageDirUri()

setProductImageDirUri

public void setProductImageDirUri(java.lang.String newProductImageDirUri)

getImageUploadResultPage

public static java.lang.String getImageUploadResultPage()

setImageUploadResultPage

public void setImageUploadResultPage(java.lang.String newImageUploadResultPage)

getDummyVariable

public java.lang.String getDummyVariable()

getCategoryName

public java.lang.String getCategoryName(java.lang.String id)
Get the category name by category id.

Parameters:
id - the category id
Returns:
the category name associated with the category id


Copyright (c) 2004 The JCatalog Project.