public abstract class AbstractDataProvider extends Object implements DataProvider
DataProvider
interface, to minimize the effort required to implement this interface.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractDataProvider()
Creates a new abstract data provider.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsEntry(org.forgerock.opendj.ldap.DN dn)
Indicates whether this data provider contains the specified entry.
|
void |
deregisterEventListener(DataProviderEventListener listener)
Deregisters an event listener from this data provider.
|
protected void |
notifyDataProviderEventOccurred(DataProviderEvent event)
Notify all event listeners that this data provider has changed state due
to an operational error, configuration change, or an administrative
action.
|
protected void |
notifyDataProviderEventOccurred(LocalizableMessage reason,
Set<DataProviderEvent.Type> types)
Notify all event listeners that this data provider has changed state due
to an operational error, configuration change, or an administrative
action.
|
void |
registerEventListener(DataProviderEventListener listener)
Registers an event listener with this data provider.
|
boolean |
supportsChangeNotification(org.forgerock.opendj.ldap.DN baseDN)
Indicates whether or not the provided base DN in this data provider
supports change notification.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfinalizeDataProvider, getBaseDNs, getEntry, getStatus, getSupportedControls, getSupportedFeatures, startDataProvider, stopDataProviderprotected AbstractDataProvider()
public boolean containsEntry(org.forgerock.opendj.ldap.DN dn) throws org.forgerock.opendj.ldap.LdapException
The default implementation is to invoke getEntry(dn) and return
true if the entry was successfully retrieved.
containsEntry in interface DataProviderdn - The DN of the entry.true if this data provider contains the specified entry,
or false if it does not.org.forgerock.opendj.ldap.LdapException - If a problem occurs while trying to make the determination,
or if dn is not a DN equal to or subordinate to one
of the base DNs managed by this data provider.public final void deregisterEventListener(DataProviderEventListener listener)
deregisterEventListener in interface DataProviderlistener - The event listener.public final void registerEventListener(DataProviderEventListener listener)
registerEventListener in interface DataProviderlistener - The event listener.public boolean supportsChangeNotification(org.forgerock.opendj.ldap.DN baseDN) throws org.forgerock.opendj.ldap.LdapException
The default implementation is to return false for all base DNs indicating that change notification is not supported.
supportsChangeNotification in interface DataProviderbaseDN - The base DN in this data provider.true if the provided base DN in this data provider
supports change notification.org.forgerock.opendj.ldap.LdapException - If baseDN is not one of the base DNs managed by this
data provider.protected final void notifyDataProviderEventOccurred(DataProviderEvent event)
This method can be used to forward events to parent data providers.
event - The data provider event.protected final void notifyDataProviderEventOccurred(LocalizableMessage reason, Set<DataProviderEvent.Type> types)
This method is equivalent to the following code:
DataProviderEvent event = new DataProviderEvent(reason, types); notifyDataProviderStateChanged(event);
reason - A message describing this event.types - The types of event that have occurred in the data provider.Copyright © 2011-2015 ForgeRock AS. All Rights Reserved.