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

Quick Search    Search Deep

com.flexstor.common.settings
Class AdminAddressManager  view AdminAddressManager download AdminAddressManager.java

java.lang.Object
  extended bycom.flexstor.common.settings.SettingsManager
      extended bycom.flexstor.common.settings.AddressManager
          extended bycom.flexstor.common.settings.AdminAddressManager
All Implemented Interfaces:
PersistCollectionI

public class AdminAddressManager
extends AddressManager

This class implements the addessbook's persistence based on the current user from UserManager. All methods are using the user's role to perform their operations.


Field Summary
static java.lang.String IDENTIFIER
           
protected  com.flexstor.common.data.ejb.role.RoleData roleData
           
 
Fields inherited from class com.flexstor.common.settings.AddressManager
instance
 
Fields inherited from class com.flexstor.common.settings.SettingsManager
ADMIN, bInitialized, gw, lstSettings, USER
 
Constructor Summary
AdminAddressManager()
           
 
Method Summary
 void deleteItem(com.flexstor.common.data.ejb.SettingData setting)
          Implementation for PersistCollectionI.
 boolean init(java.lang.String ugName, boolean bIsUser)
          Initializes the manager.
 void refresh()
          Implementation for PersistCollectionI.
 void saveItem(com.flexstor.common.data.ejb.SettingData data)
          Implementation for PersistCollectionI.
 void updateItem(com.flexstor.common.data.ejb.SettingData data)
          Implementation for PersistCollectionI.
 
Methods inherited from class com.flexstor.common.settings.AddressManager
create, getDefaultEMailAddress, getInstance
 
Methods inherited from class com.flexstor.common.settings.SettingsManager
getItems
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IDENTIFIER

public static final java.lang.String IDENTIFIER
See Also:
Constant Field Values

roleData

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

AdminAddressManager

public AdminAddressManager()
Method Detail

init

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


saveItem

public void saveItem(com.flexstor.common.data.ejb.SettingData data)
              throws com.flexstor.common.gateway.exceptions.TransactionFailedException,
                     com.flexstor.common.exceptions.ejb.DuplicateRecordException
Implementation for PersistCollectionI. Saves one address to the database and links it to the user's role. If the data object contains a key, an update is performed for the existing object, otherwise an insert.

Specified by:
saveItem in interface PersistCollectionI
Specified by:
saveItem in class SettingsManager

deleteItem

public void deleteItem(com.flexstor.common.data.ejb.SettingData setting)
                throws com.flexstor.common.gateway.exceptions.TransactionFailedException
Implementation for PersistCollectionI. Deletes one address from the database. The bean removes it from all roles. In addition, the user role is refreshed to reflect the current state.

Specified by:
deleteItem in interface PersistCollectionI
Overrides:
deleteItem in class SettingsManager

refresh

public void refresh()
             throws com.flexstor.common.gateway.exceptions.TransactionFailedException
Implementation for PersistCollectionI. Refreshes the contents of the address list.

Specified by:
refresh in interface PersistCollectionI
Specified by:
refresh in class SettingsManager

updateItem

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

Specified by:
updateItem in class SettingsManager