| | |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.LDIFExportConfig; |
| | | import org.opends.server.types.LDIFImportConfig; |
| | | import org.opends.server.types.RestoreConfig; |
| | |
| | | import static org.opends.server.messages.BackendMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | public synchronized void initializeBackend(ConfigEntry configEntry, |
| | | DN[] baseDNs) |
| | | throws ConfigException |
| | | throws ConfigException, InitializationException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "initializeBackend", |
| | | String.valueOf(configEntry), String.valueOf(baseDNs)); |
| | |
| | | |
| | | for (DN dn : baseDNs) |
| | | { |
| | | DirectoryServer.registerSuffix(dn, this); |
| | | try |
| | | { |
| | | DirectoryServer.registerBaseDN(dn, this, false, false); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "initializeBackend", e); |
| | | |
| | | int msgID = MSGID_BACKEND_CANNOT_REGISTER_BASEDN; |
| | | String message = getMessage(msgID, dn.toString(), |
| | | stackTraceToSingleLineString(e)); |
| | | throw new InitializationException(msgID, message, e); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | assert debugEnter(CLASS_NAME, "finalizeBackend"); |
| | | |
| | | clearMemoryBackend(); |
| | | |
| | | for (DN dn : baseDNs) |
| | | { |
| | | try |
| | | { |
| | | DirectoryServer.deregisterBaseDN(dn, false); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "finalizeBackend", e); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean supportsControl(String controlOID) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "supportsControl", |
| | | String.valueOf(controlOID)); |
| | | |
| | | return supportedControls.contains(controlOID); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public HashSet<String> getSupportedFeatures() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getSupportedFeatures"); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean supportsFeature(String featureOID) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "supportsFeature", |
| | | String.valueOf(featureOID)); |
| | | |
| | | // This backend does not provide any special feature support. |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean supportsLDIFExport() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "supportsLDIFExport"); |