org.fm.addressbook.bean
Class ContactBean

java.lang.Object
  extended by org.fm.addressbook.bean.BaseBean
      extended by org.fm.addressbook.bean.ContactBean

public class ContactBean
extends BaseBean

JContact- online Address Book Management Systemhttp://jcontact.sourceforge.net/

Licensed under the terms of any of the following licenses at your choice: -
GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/licenses/gpl.html -
GNU Lesser General Public License Version 2.1 or later (the "LGPL") http://www.gnu.org/licenses/lgpl.html

ContactBean is managed bean with session scope. This handles contact view logic operations.

Author:
Tennyson Varghese
Aneesh S

Field Summary
 
Fields inherited from class org.fm.addressbook.bean.BaseBean
SHOWBUTTON_CREATE, SHOWBUTTON_UPDATE
 
Constructor Summary
ContactBean()
           
 
Method Summary
 void changeAddressListener(javax.faces.event.ValueChangeEvent changeEvent)
          Listener for changing address type combo box.
 void changeCategoryListener(javax.faces.event.ValueChangeEvent changeEvent)
          Listener for changing Category combo box.
 void deleteContactAction()
          Action for delete contact
 void editContactAction()
          Action for editing action
 java.lang.String getAddress()
           
 Address getCurrentAddress()
           
 Category getCurrentCategory()
           
 Contact getCurrentContact()
           
 java.util.List<Contact> getCurrentContactList()
           
 void init()
           
 void initCurrentContact()
          Initialise currentContact
 void previewAction()
          Action for show preview of contacts
 void removeContacts(AddressBook addressBook)
          Remove all contacts of given addressBook from currentContactList
 void resetBean()
           
 void saveContactAction()
          Action for saving contact
 void searchContactsAction()
           
 void setCurrentAddress(Address currentAddress)
           
 void setCurrentCategory(Category currentCategory)
           
 void setCurrentContact(Contact currentContact)
           
 void setCurrentContactList(java.util.List<Contact> currentContactList)
           
 void updateAddressAction()
          Action for updating edited address
 void updateContactAction()
          Action for updating contact
 
Methods inherited from class org.fm.addressbook.bean.BaseBean
getShowButton, isCreateAction, setShowButton
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContactBean

public ContactBean()
Method Detail

init

public void init()
Specified by:
init in class BaseBean

resetBean

public void resetBean()
Specified by:
resetBean in class BaseBean

initCurrentContact

public void initCurrentContact()
Initialise currentContact


changeCategoryListener

public void changeCategoryListener(javax.faces.event.ValueChangeEvent changeEvent)
Listener for changing Category combo box. Pouplate contacts with respect to selected category and current addressbook


changeAddressListener

public void changeAddressListener(javax.faces.event.ValueChangeEvent changeEvent)
Listener for changing address type combo box. Set currentAddress to selected type

Parameters:
changeEvent -

updateAddressAction

public void updateAddressAction()
Action for updating edited address


previewAction

public void previewAction()
Action for show preview of contacts


saveContactAction

public void saveContactAction()
Action for saving contact


editContactAction

public void editContactAction()
Action for editing action


updateContactAction

public void updateContactAction()
Action for updating contact


deleteContactAction

public void deleteContactAction()
Action for delete contact


removeContacts

public void removeContacts(AddressBook addressBook)
Remove all contacts of given addressBook from currentContactList

Parameters:
addressBook -

searchContactsAction

public void searchContactsAction()

getAddress

public java.lang.String getAddress()
Returns:
combined Address

getCurrentContact

public Contact getCurrentContact()

setCurrentContact

public void setCurrentContact(Contact currentContact)

getCurrentContactList

public java.util.List<Contact> getCurrentContactList()

setCurrentContactList

public void setCurrentContactList(java.util.List<Contact> currentContactList)

getCurrentAddress

public Address getCurrentAddress()

setCurrentAddress

public void setCurrentAddress(Address currentAddress)

getCurrentCategory

public Category getCurrentCategory()

setCurrentCategory

public void setCurrentCategory(Category currentCategory)