|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractMap<K,V> java.util.HashMap<java.lang.Class<? extends IPolicy>,IPolicy> com.dlsc.flexgantt.policy.PolicyProvider
public class PolicyProvider
For a detailed description refer to IPolicyProvider
.
Constructor Summary | |
---|---|
PolicyProvider()
Constructs a new policy provider. |
Method Summary | ||
---|---|---|
void |
addPolicyProviderListener(IPolicyProviderListener l)
Adds a listener to the policy provider that will be informed about changes to the provider. |
|
protected void |
firePolicyProviderEvent(PolicyProviderEvent evt)
Sends the given event object to all listeners that are currently observing the policy provider. |
|
|
getPolicy(java.lang.Class<T> policyType)
Returns a policy implementation for the given policy type (policy interface). |
|
void |
removePolicyProviderListener(IPolicyProviderListener l)
Removes a listener from the policy provider. |
|
|
setPolicy(java.lang.Class<T> policyType,
T policy)
Registers a policy implementation for the given policy type (policy interface). |
Methods inherited from class java.util.HashMap |
---|
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
Methods inherited from class java.util.AbstractMap |
---|
equals, hashCode, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Constructor Detail |
---|
public PolicyProvider()
Method Detail |
---|
public <T extends IPolicy> void setPolicy(java.lang.Class<T> policyType, T policy)
IPolicyProvider
setPolicy
in interface IPolicyProvider
T
- the policy typepolicyType
- the policy interface class (e.g. INodeEditPolicy
)policy
- the policy implementation (e.g. DefaultNodeEditPolicy
)IPolicyProvider.getPolicy(Class)
public <T extends IPolicy> T getPolicy(java.lang.Class<T> policyType)
IPolicyProvider
getPolicy
in interface IPolicyProvider
T
- the policy typepolicyType
- the policy interface class (e.g. INodeEditPolicy
)
DefaultNodeEditPolicy
)IPolicyProvider.setPolicy(Class, IPolicy)
public void addPolicyProviderListener(IPolicyProviderListener l)
IPolicyProvider
addPolicyProviderListener
in interface IPolicyProvider
l
- the added policy provider listenerpublic void removePolicyProviderListener(IPolicyProviderListener l)
IPolicyProvider
removePolicyProviderListener
in interface IPolicyProvider
l
- the removed policy provider listenerprotected void firePolicyProviderEvent(PolicyProviderEvent evt)
evt
- the event sent to the listenersaddPolicyProviderListener(IPolicyProviderListener)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |