Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.flexstor.common.gui.addressbook
Class AbstractAddressBookModel  view AbstractAddressBookModel download AbstractAddressBookModel.java

java.lang.Object
  extended bycom.flexstor.common.gui.addressbook.AbstractAddressBookModel
All Implemented Interfaces:
AddressBookModelI
Direct Known Subclasses:
AddressBookModel

public abstract class AbstractAddressBookModel
extends java.lang.Object
implements AddressBookModelI

Abstracte model for address book, which interacts with the gatway to communicate with bean, which in turn talks to database.


Field Summary
protected  boolean bEmailInitialized
           
protected  boolean bFTPInitialized
           
protected  boolean bIsUser
           
protected  com.flexstor.common.gateway.SettingsGateway gw
           
protected  java.util.ArrayList lstEmailAddresses
           
protected  java.util.ArrayList lstFTPAddresses
           
protected  com.flexstor.common.data.ejb.role.RoleData roleData
           
protected  java.lang.String ugName
           
 
Constructor Summary
AbstractAddressBookModel()
           
 
Method Summary
 void deleteAddress(com.flexstor.common.data.ejb.address.AddressData address)
          Implementation for AddressBookModelI.
 java.util.ArrayList getAddresses(int addressType)
          Implementation for AddressBookModelI.
abstract  com.flexstor.common.data.ejb.address.AddressData getCurrentAddress()
          Implementation for AddressBookModelI.
abstract  com.flexstor.common.data.ejb.address.EmailAddressData getDefaultEMailAddress()
           
 boolean init(java.lang.String ugName, boolean bIsUser)
          Initializes the manager.
abstract  void refresh(int addressType)
          Implementation for AddressBookModelI.
protected  boolean refreshRoleData()
           
protected  void removeFromList(com.flexstor.common.data.ejb.address.AddressData address)
          This method removes the address from list.
abstract  void saveAddress(com.flexstor.common.data.ejb.address.AddressData address)
          Implementation for AddressBookModelI.
abstract  void setCurrentAddress(com.flexstor.common.data.ejb.address.AddressData data)
          Implementation for AddressBookModelI.
abstract  void updateAddress(com.flexstor.common.data.ejb.address.AddressData data)
          Implementation for AddressBookModelI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gw

protected com.flexstor.common.gateway.SettingsGateway gw

roleData

protected com.flexstor.common.data.ejb.role.RoleData roleData

lstEmailAddresses

protected java.util.ArrayList lstEmailAddresses

lstFTPAddresses

protected java.util.ArrayList lstFTPAddresses

bEmailInitialized

protected boolean bEmailInitialized

bFTPInitialized

protected boolean bFTPInitialized

ugName

protected java.lang.String ugName

bIsUser

protected boolean bIsUser
Constructor Detail

AbstractAddressBookModel

public AbstractAddressBookModel()
Method Detail

init

public boolean init(java.lang.String ugName,
                    boolean bIsUser)
Initializes the manager.


deleteAddress

public void deleteAddress(com.flexstor.common.data.ejb.address.AddressData address)
                   throws com.flexstor.common.gateway.exceptions.TransactionFailedException
Implementation for AddressBookModelI. Deletes one address from the database. The bean removes it from all roles.

Specified by:
deleteAddress in interface AddressBookModelI

refresh

public abstract void refresh(int addressType)
                      throws com.flexstor.common.gateway.exceptions.TransactionFailedException
Implementation for AddressBookModelI. Refreshes the contents of specified type of address list.

Specified by:
refresh in interface AddressBookModelI

saveAddress

public abstract void saveAddress(com.flexstor.common.data.ejb.address.AddressData address)
                          throws com.flexstor.common.gateway.exceptions.TransactionFailedException,
                                 com.flexstor.common.exceptions.ejb.DuplicateRecordException
Implementation for AddressBookModelI. Saves one address to the database. If the data object contains a key, an update is performed for the existing object, otherwise an insert.

Specified by:
saveAddress in interface AddressBookModelI

updateAddress

public abstract void updateAddress(com.flexstor.common.data.ejb.address.AddressData data)
                            throws com.flexstor.common.gateway.exceptions.TransactionFailedException,
                                   com.flexstor.common.exceptions.ejb.DuplicateRecordException
Implementation for AddressBookModelI. Saves one address to the database . If the data object contains a key, an update is performed for the existing object.

Specified by:
updateAddress in interface AddressBookModelI

getAddresses

public java.util.ArrayList getAddresses(int addressType)
                                 throws com.flexstor.common.gateway.exceptions.TransactionFailedException
Implementation for AddressBookModelI. Gets all send addresses for all roles the user is a member of. This call is cached. To refresh the data, refresh() must be called.

Specified by:
getAddresses in interface AddressBookModelI

removeFromList

protected void removeFromList(com.flexstor.common.data.ejb.address.AddressData address)
This method removes the address from list.


refreshRoleData

protected boolean refreshRoleData()

getCurrentAddress

public abstract com.flexstor.common.data.ejb.address.AddressData getCurrentAddress()
Implementation for AddressBookModelI. gets the current address.

Specified by:
getCurrentAddress in interface AddressBookModelI

setCurrentAddress

public abstract void setCurrentAddress(com.flexstor.common.data.ejb.address.AddressData data)
                                throws com.flexstor.common.gateway.exceptions.TransactionFailedException
Implementation for AddressBookModelI. sets the current address.

Specified by:
setCurrentAddress in interface AddressBookModelI

getDefaultEMailAddress

public abstract com.flexstor.common.data.ejb.address.EmailAddressData getDefaultEMailAddress()
                                                                                      throws com.flexstor.common.gateway.exceptions.TransactionFailedException
Specified by:
getDefaultEMailAddress in interface AddressBookModelI