com.dlsc.flexgantt.policy
Class PolicyProviderEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.dlsc.flexgantt.policy.PolicyProviderEvent
All Implemented Interfaces:
java.io.Serializable

public class PolicyProviderEvent
extends java.util.EventObject

An event object which wraps information about an event / a change that occured inside a policy provider. The event will be sent to those policy provider listeners that are attached to the provider that changed.

Since:
1.0
Author:
Dirk Lemmermann
See Also:
IPolicyProvider.addPolicyProviderListener(IPolicyProviderListener), Serialized Form

Nested Class Summary
static class PolicyProviderEvent.ID
          An event identifier used to distinguish between different types of events that can take place inside a policy provider.
 
Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
PolicyProviderEvent(IPolicyProvider pp, PolicyProviderEvent.ID id, java.lang.Class<? extends IPolicy> policyType, IPolicy policyImpl)
          Constructs a new policy provider event.
 
Method Summary
 PolicyProviderEvent.ID getId()
          Returns the event identifier that can be used to distinguish between different types of events.
 IPolicy getPolicyImpl()
          Returns the new policy implementation.
 IPolicyProvider getPolicyProvider()
          Returns the source of the event (the modified policy provider).
 java.lang.Class<? extends IPolicy> getPolicyType()
          Returns the type of the changed policy.
 
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
 

Constructor Detail

PolicyProviderEvent

public PolicyProviderEvent(IPolicyProvider pp,
                           PolicyProviderEvent.ID id,
                           java.lang.Class<? extends IPolicy> policyType,
                           IPolicy policyImpl)
Constructs a new policy provider event.

Parameters:
pp - the changed policy provider
id - the event identifier used to distinguish between different types of events
policyType - the type of the policy that was changed
policyImpl - the new implementation of the changed policy
Since:
1.0
Method Detail

getPolicyProvider

public IPolicyProvider getPolicyProvider()
Returns the source of the event (the modified policy provider).

Returns:
the modified policy provider
Since:
1.0

getId

public PolicyProviderEvent.ID getId()
Returns the event identifier that can be used to distinguish between different types of events.

Returns:
the event identifier
Since:
1.0

getPolicyImpl

public IPolicy getPolicyImpl()
Returns the new policy implementation.

Returns:
the new policy implementation
Since:
1.0

getPolicyType

public java.lang.Class<? extends IPolicy> getPolicyType()
Returns the type of the changed policy.

Returns:
the policy type that was changed
Since:
1.0