ehsbe CommonsTM
Version 1.1.0rc3

com.ehsbe.commons.gui.util
Class DefaultUserNameStore

java.lang.Object
  extended by org.jdesktop.beans.AbstractBean
      extended by org.jdesktop.swingx.auth.UserNameStore
          extended by com.ehsbe.commons.gui.util.DefaultUserNameStore

public class DefaultUserNameStore
extends org.jdesktop.swingx.auth.UserNameStore

Saves the user names in Preferences. Because any string could be part of the user name, for every user name that must be saved a new Preferences key/value pair must be stored.

Author:
Bino George, rbair, Jens Elkner

Constructor Summary
DefaultUserNameStore()
          Creates a new instance of DefaultUserNameStore
 
Method Summary
 void addUserName(String name)
          
 boolean containsUserName(String name)
          
 Class<?> getAppNameForPreferences()
          Get the class used for getting/setting the user preference node.
 String getServer()
          Set the name of the server, which should be associated with this store.
 String[] getUserNames()
          
 void loadUserNames()
          
 void removeUserName(String name)
          
 void saveUserNames()
          
 void setAppNameForPreferences(Class<?> appClassForPreferences)
          Set the class used for getting/setting the user preference node.
 void setServer(String server)
          Set the name of the server, which should be associated with this store.
 void setUserNames(String[] userNames)
          
 
Methods inherited from class org.jdesktop.beans.AbstractBean
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, clone, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultUserNameStore

public DefaultUserNameStore()
Creates a new instance of DefaultUserNameStore

Method Detail

loadUserNames

public void loadUserNames()

Specified by:
loadUserNames in class org.jdesktop.swingx.auth.UserNameStore

saveUserNames

public void saveUserNames()

Specified by:
saveUserNames in class org.jdesktop.swingx.auth.UserNameStore

getUserNames

public String[] getUserNames()

Specified by:
getUserNames in class org.jdesktop.swingx.auth.UserNameStore

setUserNames

public void setUserNames(String[] userNames)

Specified by:
setUserNames in class org.jdesktop.swingx.auth.UserNameStore

addUserName

public void addUserName(String name)

Specified by:
addUserName in class org.jdesktop.swingx.auth.UserNameStore

removeUserName

public void removeUserName(String name)

Specified by:
removeUserName in class org.jdesktop.swingx.auth.UserNameStore

containsUserName

public boolean containsUserName(String name)

Specified by:
containsUserName in class org.jdesktop.swingx.auth.UserNameStore

getAppNameForPreferences

public Class<?> getAppNameForPreferences()
Get the class used for getting/setting the user preference node.

Returns:
prefs package node class

setAppNameForPreferences

public void setAppNameForPreferences(Class<?> appClassForPreferences)
Set the class used for getting/setting the user preference node.

Parameters:
appClassForPreferences - prefs package node class.

setServer

public void setServer(String server)
Set the name of the server, which should be associated with this store. Default: null.

Parameters:
server - the name of the server

getServer

public String getServer()
Set the name of the server, which should be associated with this store. Default: null.

Returns:
null if not set, the name of the server otherwise.

ehsbe CommonsTM
Version 1.1.0rc3

Copyright ©2005-2009 EHSBE, Walther-Rathenau-Str. 58, 39104 Magdeburg, Sachsen-Anhalt, Germany. All Rights Reserved.