Class LoadOnDemandPolicyRegistryImpl
java.lang.Object
org.eclipse.emf.compare.rcp.internal.policy.LoadOnDemandPolicyRegistryImpl
- All Implemented Interfaces:
ILoadOnDemandPolicy.Registry
A default implementation that uses a map internally.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddPolicy
(ILoadOnDemandPolicy policy) Add the givenpolicy
to this registry.void
clear()
Removes all of the registered policies.Returns the list of registered policies.boolean
Returns true if at least one of the contained policy is authorizing the given policy to be loaded on demand.removePolicy
(String className) Removes the policy registered within this registry with the given class name.
-
Constructor Details
-
LoadOnDemandPolicyRegistryImpl
public LoadOnDemandPolicyRegistryImpl()Creates a new implementation.
-
-
Method Details
-
hasAnyAuthorizingPolicy
Returns true if at least one of the contained policy is authorizing the given policy to be loaded on demand.- Specified by:
hasAnyAuthorizingPolicy
in interfaceILoadOnDemandPolicy.Registry
- Parameters:
uri
- the URI to be tested.- Returns:
- true if at least one of the contained policy is authorizing the given policy to be loaded on demand.
- See Also:
-
getPolicies
Returns the list of registered policies.- Specified by:
getPolicies
in interfaceILoadOnDemandPolicy.Registry
- Returns:
- the list of registered policies.
- See Also:
-
addPolicy
Add the givenpolicy
to this registry.- Specified by:
addPolicy
in interfaceILoadOnDemandPolicy.Registry
- Parameters:
policy
- the policy to be added.- Returns:
- the previous value associated with the class name of the given
policy
. - See Also:
-
removePolicy
Removes the policy registered within this registry with the given class name.- Specified by:
removePolicy
in interfaceILoadOnDemandPolicy.Registry
- Parameters:
className
- the class name of a previously registered policy.- Returns:
- the previously registered policy or null if none was.
- See Also:
-
clear
public void clear()Removes all of the registered policies.- Specified by:
clear
in interfaceILoadOnDemandPolicy.Registry
- See Also:
-