org.apache.shale.usecases.remoting
Class Business

java.lang.Object
  extended by org.apache.shale.view.AbstractFacesBean
      extended by org.apache.shale.usecases.remoting.Business

public class Business
extends org.apache.shale.view.AbstractFacesBean

Remotely executable business logic methods that complete the entire response.

$Id: Business.java 476661 2006-11-18 23:44:11Z craigmcc $


Constructor Summary
Business()
           
 
Method Summary
 void cityAndStateForZip()
          Generate an XML response from an array of JSF SelectItems.
 void listCategories()
          Return the set of reported categories.
 void listLocales()
          Return the set of reported locales.
protected  void selectItems(javax.faces.context.FacesContext context, javax.faces.model.SelectItem[] items)
          Render an XML document containing the specified selection items as the response to this request.
protected  javax.faces.model.SelectItem[] supportedCategories(javax.faces.context.FacesContext context)
          Return the set of legal supported categories.
protected  javax.faces.model.SelectItem[] supportedLocales(javax.faces.context.FacesContext context)
          Return the set of legal supported locales.
 
Methods inherited from class org.apache.shale.view.AbstractFacesBean
erase, error, error, fatal, fatal, getApplication, getApplicationMap, getBean, getExternalContext, getFacesContext, getLifecycle, getRequestHeaderMap, getRequestMap, getRequestParameter, getRequestParameterMap, getRequestParameterValues, getSessionMap, getValue, info, info, log, log, retrieveData, saveData, setBean, setValue, warn, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Business

public Business()
Method Detail

cityAndStateForZip

public void cityAndStateForZip()
                        throws IOException

Generate an XML response from an array of JSF SelectItems. Those items represent a city/state pair that matches a zip code. The zip code is stored in the zip request parameter. That parameter was put in request scope by an Ajax call--see zipCode.jsp for more details. When the XML response is complete, the protected method selectItems invokes responseComplete() on the Faces context, which ends the response.

Throws:
IOException

listCategories

public void listCategories()
                    throws IOException

Return the set of reported categories.

Throws:
IOException

listLocales

public void listLocales()
                 throws IOException

Return the set of reported locales.

Throws:
IOException

selectItems

protected void selectItems(javax.faces.context.FacesContext context,
                           javax.faces.model.SelectItem[] items)
                    throws IOException

Render an XML document containing the specified selection items as the response to this request.

Parameters:
context - FacesContext for the current request
items - Selection items to be rendered
Throws:
IOException

supportedCategories

protected javax.faces.model.SelectItem[] supportedCategories(javax.faces.context.FacesContext context)

Return the set of legal supported categories.

Parameters:
context - FacesContext for the current request

supportedLocales

protected javax.faces.model.SelectItem[] supportedLocales(javax.faces.context.FacesContext context)

Return the set of legal supported locales.

Parameters:
context - FacesContext for the current request


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.