SalesPoint Framework v3.1

users
Class UserManagerFilter

java.lang.Object
  extended byusers.UserManager
      extended byusers.UserManagerFilter
All Implemented Interfaces:
Serializable

public class UserManagerFilter
extends UserManager

Filters a UserManager's users with help of a UserFilter

Since:
v3.1
Author:
Andreas Bartho
See Also:
UserManager, UserFilter, Serialized Form

Field Summary
 
Fields inherited from class users.UserManager
m_lhListeners
 
Constructor Summary
UserManagerFilter()
          Creates a new UserManagerFilter.
UserManagerFilter(UserFilter uf)
          Creates a new UserManagerFilter.
UserManagerFilter(UserManager um)
          Creates a new UserManagerFilter from a given UserManager.
UserManagerFilter(UserManager um, UserFilter uf)
          Creates a new UserManagerFilter from a given UserManager and a UserFilter.
 
Method Summary
 void addUserDataListener(UserDataListener udl)
          Add a UserDataListener.
 Collection getUsers()
          Returns all users registered with this UserManagerFilter's UserManager that match the filter.
 void setFilter(UserFilter uf)
          Sets the UserFilter.
 
Methods inherited from class users.UserManager
addUser, createUser, deleteUser, fireUserAdded, fireUserDeleted, getCurrentUser, getGlobalUM, getUser, getUserNames, logOff, logOn, removeUserDataListener, setDefaultCapability, setDefaultCaps, setGlobalUM, setUserCreator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserManagerFilter

public UserManagerFilter()
Creates a new UserManagerFilter. The UserManager used is the globally set UserManager. All Users are visible, which means that the applied UserFilter returns true for every User. The UserManagerFilter created with this constructor behaves like a normal UserManager.

See Also:
UserManager.setGlobalUM(users.UserManager)

UserManagerFilter

public UserManagerFilter(UserManager um)
Creates a new UserManagerFilter from a given UserManager. All Users are visible, which means that the applied UserFilter returns true for every User.

Parameters:
um - The UserManager to be filtered.

UserManagerFilter

public UserManagerFilter(UserFilter uf)
Creates a new UserManagerFilter. The UserManager used is the globally set UserManager.

Parameters:
uf - The UserFilter to be applied.
See Also:
UserManager.setGlobalUM(users.UserManager)

UserManagerFilter

public UserManagerFilter(UserManager um,
                         UserFilter uf)
Creates a new UserManagerFilter from a given UserManager and a UserFilter.

Parameters:
um - The UserManager to be filtered.
uf - The UserFilter to be applied.
Method Detail

setFilter

public void setFilter(UserFilter uf)
Sets the UserFilter. A previously set UserFilter will be replaced.

Parameters:
uf - The new UserFilter.

getUsers

public Collection getUsers()
Returns all users registered with this UserManagerFilter's UserManager that match the filter.

Overrides:
getUsers in class UserManager
Returns:
an unmodifiable, ordered set of all users in this UserManager.
See Also:
UserManager.createUser(java.lang.String), UserManager.deleteUser(java.lang.String)

addUserDataListener

public void addUserDataListener(UserDataListener udl)
Description copied from class: UserManager
Add a UserDataListener. UserDataListeners will receive an event whenever a user was created or removed.

Overrides:
addUserDataListener in class UserManager
Parameters:
udl - the UserDataListener to add.

SalesPoint Framework v3.1