org.salespointframework.core.users.events
Class CapabilityDataEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.salespointframework.core.users.events.CapabilityDataEvent
All Implemented Interfaces:
java.io.Serializable

public class CapabilityDataEvent
extends java.util.EventObject

An event indicating changes in a user's capabilities.

Since:
v2.0
Version:
2.0 05/05/1999
Author:
Steffen Zschaler
See Also:
User, Capability, CapabilityDataListener, Serialized Form

Field Summary
private  java.util.Set<java.lang.String> m_stCapNames
          The capabilities that participated in the change.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
CapabilityDataEvent(java.lang.Object source, java.util.Set<java.lang.String> stCapNames)
          Create a new CapabilityDataEvent with a source and a set of affected capabilities
 
Method Summary
 boolean affectsCapability(java.lang.String sCapName)
          Test whether a given capability is affected by this event.
 Capability getCapability(java.lang.String sCapName)
          Return a capability if it is affected by this event.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_stCapNames

private java.util.Set<java.lang.String> m_stCapNames
The capabilities that participated in the change.

Constructor Detail

CapabilityDataEvent

public CapabilityDataEvent(java.lang.Object source,
                           java.util.Set<java.lang.String> stCapNames)
Create a new CapabilityDataEvent with a source and a set of affected capabilities

Parameters:
source - the source of the event, usually a User object.
stCapNames - the set of capabilities that changed.
Method Detail

affectsCapability

public boolean affectsCapability(java.lang.String sCapName)
Test whether a given capability is affected by this event.

Parameters:
sCapName - the name of the capability to be tested
Returns:
true if the given capability is affected by this event.

getCapability

public Capability getCapability(java.lang.String sCapName)
Return a capability if it is affected by this event.

Parameters:
sCapName - the name of the capability to be returned.
Returns:
the capability with the given name, if it is affected by this event. null otherwise.