| | |
| | | |
| | | import static org.opends.server.loggers.ErrorLogger.logError; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.AdminMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.getMessage; |
| | | import static org.opends.server.util.StaticUtils.stackTraceToSingleLineString; |
| | |
| | | public final class ClassLoaderProvider { |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | /** |
| | | * Private URLClassLoader implementation. This is only required so |
| | | * that we can provide access to the addURL method. |
| | | */ |
| | |
| | | loader.addJarFile(extension); |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_ADMIN_CANNOT_OPEN_JAR_FILE; |
| | |
| | | addExtension(extensionsPath.listFiles(filter)); |
| | | } catch (InitializationException e) { |
| | | if (debugEnabled()) { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | throw e; |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_ADMIN_EXTENSIONS_CANNOT_LIST_FILES; |
| | |
| | | loadDefinitionClasses(is); |
| | | } catch (IOException e) { |
| | | if (debugEnabled()) { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_ADMIN_CANNOT_READ_CORE_MANIFEST; |
| | |
| | | throw new InitializationException(msgID, message); |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_ADMIN_CANNOT_LOAD_CLASS_FROM_CORE_MANIFEST; |
| | |
| | | is = jarFile.getInputStream(entry); |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_ADMIN_CANNOT_READ_EXTENSION_MANIFEST; |
| | |
| | | loadDefinitionClasses(is); |
| | | } catch (IOException e) { |
| | | if (debugEnabled()) { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_ADMIN_CANNOT_READ_EXTENSION_MANIFEST; |
| | |
| | | throw new InitializationException(msgID, message); |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_ADMIN_CANNOT_LOAD_CLASS_FROM_EXTENSION_MANIFEST; |
| | |
| | | continue; |
| | | } |
| | | |
| | | debugMessage(DebugLogLevel.INFO, "Loading class " + className); |
| | | TRACER.debugMessage(DebugLogLevel.INFO, "Loading class " + className); |
| | | |
| | | // Use the underlying loader. |
| | | Class.forName(className, true, loader); |
| | |
| | | jarFile = new JarFile(jar); |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_ADMIN_CANNOT_OPEN_JAR_FILE; |
| | |
| | | package org.opends.server.admin.server; |
| | | |
| | | |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | |
| | | import org.opends.server.api.ConfigAddListener; |
| | | import org.opends.server.api.ConfigDeleteListener; |
| | |
| | | */ |
| | | final class DelayedConfigAddListener implements ConfigAddListener { |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // The name of the parent entry. |
| | | private final DN parent; |
| | | |
| | |
| | | } |
| | | } catch (ConfigException e) { |
| | | if (debugEnabled()) { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // Ignore this error as it implies that this listener has |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.messages.MessageHandler.getMessage; |
| | | import static org.opends.server.util.StaticUtils.stackTraceToSingleLineString; |
| | | |
| | |
| | | import org.opends.server.types.DirectoryException; |
| | | |
| | | |
| | | |
| | | /** |
| | | * A server-side managed object. |
| | | * |
| | |
| | | implements PropertyProvider { |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | /** |
| | | * Internal inherited default value provider implementation. |
| | | */ |
| | | private static class MyInheritedDefaultValueProvider implements |
| | |
| | | // Ignore the exception since this implies deregistration. |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | // Ignore the exception since this implies deregistration. |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } catch (ConfigException e) { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = AdminMessages.MSGID_ADMIN_CANNOT_GET_LISTENER_BASE; |
| | |
| | | } catch (ConfigException e) { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = AdminMessages.MSGID_ADMIN_CANNOT_GET_MANAGED_OBJECT; |
| | |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.CoreMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | |
| | | */ |
| | | public abstract class ClientConnection |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // The set of authentication information for this client connection. |
| | | private AuthenticationInfo authenticationInfo; |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | String message = getMessage(msgID, getConnectionID(), -1L, |
| | | String.valueOf(authDN), |
| | | privilege.getName(), result); |
| | | debugMessage(DebugLogLevel.INFO, message); |
| | | TRACER.debugMessage(DebugLogLevel.INFO, message); |
| | | } |
| | | else |
| | | { |
| | |
| | | operation.getOperationID(), |
| | | String.valueOf(authDN), |
| | | privilege.getName(), result); |
| | | debugMessage(DebugLogLevel.INFO, message); |
| | | TRACER.debugMessage(DebugLogLevel.INFO, message); |
| | | } |
| | | } |
| | | |
| | |
| | | String message = getMessage(msgID, getConnectionID(), -1L, |
| | | String.valueOf(authDN), |
| | | buffer.toString(), result); |
| | | debugMessage(DebugLogLevel.INFO, message); |
| | | TRACER.debugMessage(DebugLogLevel.INFO, message); |
| | | } |
| | | else |
| | | { |
| | |
| | | operation.getOperationID(), |
| | | String.valueOf(authDN), |
| | | buffer.toString(), result); |
| | | debugMessage(DebugLogLevel.INFO, message); |
| | | TRACER.debugMessage(DebugLogLevel.INFO, message); |
| | | } |
| | | |
| | | return result; |
| | |
| | | */ |
| | | public Map<String,TraceSettings> getMethodSettings(String className) |
| | | { |
| | | return new HashMap<String, TraceSettings>(); |
| | | if(methodTraceSettings == null) |
| | | { |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | return methodTraceSettings.get(className); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | * @param sourceLocation The location of the method in the source. |
| | | * @param args The parameters provided to the |
| | | * constructor. |
| | | * @param stackTrace The stack trace at the time the |
| | | * constructor is executed or null if its |
| | | * not available. |
| | | */ |
| | | public abstract void traceConstructor(LogLevel level, |
| | | TraceSettings settings, |
| | | String signature, |
| | | String sourceLocation, |
| | | Object[] args); |
| | | Object[] args, |
| | | StackTraceElement[] stackTrace); |
| | | |
| | | |
| | | |
| | |
| | | * @param obj The object instance on which the method |
| | | * has been invoked. |
| | | * @param args The parameters provided to the method. |
| | | * @param stackTrace The stack trace at the time the method |
| | | * is executed or null if its not available. |
| | | */ |
| | | public abstract void traceNonStaticMethodEntry(LogLevel level, |
| | | public abstract void traceMethodEntry(LogLevel level, |
| | | TraceSettings settings, |
| | | String signature, |
| | | String sourceLocation, |
| | | Object obj, |
| | | Object[] args); |
| | | Object[] args, |
| | | StackTraceElement[] stackTrace); |
| | | |
| | | |
| | | |
| | |
| | | * @param signature The method signature. |
| | | * @param sourceLocation The location of the method in the source. |
| | | * @param args The parameters provided to the method. |
| | | * @param stackTrace The stack trace at the time the method |
| | | * is executed or null if its not available. |
| | | */ |
| | | public abstract void traceStaticMethodEntry(LogLevel level, |
| | | TraceSettings settings, |
| | | String signature, |
| | | String sourceLocation, |
| | | Object[] args); |
| | | Object[] args, |
| | | StackTraceElement[] stackTrace); |
| | | |
| | | |
| | | |
| | |
| | | * @param signature The method signature. |
| | | * @param sourceLocation The location of the method in the source. |
| | | * @param ret The return value for the method. |
| | | * @param stackTrace The stack trace at the time the method |
| | | * is returned or null if its not available. |
| | | */ |
| | | public abstract void traceReturn(LogLevel level, |
| | | TraceSettings settings, |
| | | String signature, |
| | | String sourceLocation, |
| | | Object ret); |
| | | Object ret, |
| | | StackTraceElement[] stackTrace); |
| | | |
| | | |
| | | |
| | |
| | | * @param signature The method signature. |
| | | * @param sourceLocation The location of the method in the source. |
| | | * @param msg The message to be logged. |
| | | * @param stackTrace The stack trace at the time the message |
| | | * is logged or null if its not available. |
| | | */ |
| | | public abstract void traceMessage(LogLevel level, |
| | | TraceSettings settings, |
| | | String signature, |
| | | String sourceLocation, |
| | | String msg); |
| | | String msg, |
| | | StackTraceElement[] stackTrace); |
| | | |
| | | |
| | | |
| | |
| | | * @param signature The method signature. |
| | | * @param sourceLocation The location of the method in the source. |
| | | * @param ex The exception that was thrown. |
| | | * @param stackTrace The stack trace at the time the exception |
| | | * is thrown or null if its not available. |
| | | */ |
| | | public abstract void traceThrown(LogLevel level, |
| | | TraceSettings settings, |
| | | String signature, |
| | | String sourceLocation, |
| | | Throwable ex); |
| | | Throwable ex, |
| | | StackTraceElement[] stackTrace); |
| | | |
| | | |
| | | |
| | |
| | | * @param signature The method signature. |
| | | * @param sourceLocation The location of the method in the source. |
| | | * @param ex The exception that was caught. |
| | | * @param stackTrace The stack trace at the time the exception |
| | | * is caught or null if its not available. |
| | | */ |
| | | public abstract void traceCaught(LogLevel level, |
| | | TraceSettings settings, |
| | | String signature, |
| | | String sourceLocation, |
| | | Throwable ex); |
| | | Throwable ex, |
| | | StackTraceElement[] stackTrace); |
| | | |
| | | |
| | | |
| | |
| | | * {@code null}). |
| | | * @param key The key to dump. |
| | | * @param data The data to dump. |
| | | * @param stackTrace The stack trace at the time the access |
| | | * occured or null if its not available. |
| | | */ |
| | | public abstract void traceJEAccess(LogLevel level, |
| | | TraceSettings settings, |
| | |
| | | Database database, |
| | | Transaction txn, |
| | | DatabaseEntry key, |
| | | DatabaseEntry data); |
| | | DatabaseEntry data, |
| | | StackTraceElement[] stackTrace); |
| | | |
| | | |
| | | |
| | |
| | | * @param signature The method signature. |
| | | * @param sourceLocation The location of the method in the source. |
| | | * @param data The data to dump. |
| | | * @param stackTrace The stack trace at the time the data |
| | | * is logged or null if its not available. |
| | | */ |
| | | public abstract void traceData(LogLevel level, |
| | | TraceSettings settings, |
| | | String signature, |
| | | String sourceLocation, |
| | | byte[] data); |
| | | byte[] data, |
| | | StackTraceElement[] stackTrace); |
| | | |
| | | |
| | | |
| | |
| | | * @param signature The method signature. |
| | | * @param sourceLocation The location of the method in the source. |
| | | * @param element The protocol element to dump. |
| | | * @param stackTrace The stack trace at the time the protocol |
| | | * element is logged or null if its not |
| | | * available. |
| | | */ |
| | | public abstract void traceProtocolElement(LogLevel level, |
| | | TraceSettings settings, |
| | | String signature, |
| | | String sourceLocation, |
| | | ProtocolElement element); |
| | | ProtocolElement element, |
| | | StackTraceElement[] stackTrace); |
| | | |
| | | |
| | | |
| | |
| | | import org.opends.server.types.DebugLogLevel; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | |
| | | |
| | | |
| | |
| | | extends MatchingRule |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | /** |
| | | * Indicates whether the two provided normalized values are equal to |
| | | * each other. |
| | | * |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | try |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e2); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | |
| | | return 0; |
| | |
| | | import org.opends.server.types.ObjectClass; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | |
| | | |
| | |
| | | public abstract class MonitorProvider |
| | | extends DirectoryThread |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // Indicates whether a request has been received to stop running. |
| | | private boolean stopRequested; |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | import org.opends.server.types.VirtualAttributeRule; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | |
| | | |
| | | |
| | |
| | | <T extends VirtualAttributeCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | /** |
| | | * Initializes this virtual attribute based on the information in |
| | | * the provided configuration entry. |
| | | * |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // The substring couldn't be normalized. We have to return |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // The substring couldn't be normalized. We have to return |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // The substring couldn't be normalized. We have to return |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // The value couldn't be normalized. If we can't find a |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // We couldn't normalize the provided value. We should return |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // We couldn't normalize one of the attribute values. If we |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // We couldn't normalize the provided value. We should return |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // We couldn't normalize one of the attribute values. If we |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // We couldn't normalize the provided value. We should return |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // We couldn't normalize one of the attribute values. If we |
| | |
| | | import static org.opends.server.authorization.dseecompat.Aci.*; |
| | | import org.opends.server.core.*; |
| | | import static org.opends.server.loggers.ErrorLogger.logError; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.MessageHandler.getMessage; |
| | | import org.opends.server.types.*; |
| | | import static org.opends.server.util.StaticUtils.toLowerCase; |
| | | import static org.opends.server.util.StaticUtils.stackTraceToSingleLineString; |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import org.opends.server.protocols.internal.InternalSearchOperation; |
| | | import org.opends.server.protocols.internal.InternalClientConnection; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | |
| | | */ |
| | | public class AciHandler extends AccessControlHandler |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | /* |
| | | * The list that holds that ACIs keyed by the DN of the entry |
| | | * holding the ACI. |
| | |
| | | } |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | msgID = MSGID_ACI_HANDLER_FAIL_PROCESS_GLOBAL_ACI; |
| | | String message = |
| | | getMessage(msgID, String.valueOf(configuration.dn()), |
| | |
| | | import org.opends.server.types.operation.PostResponseModifyDNOperation; |
| | | import org.opends.server.protocols.internal.InternalClientConnection; |
| | | import org.opends.server.protocols.internal.InternalSearchOperation; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.ErrorLogger.logError; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.*; |
| | | import static org.opends.server.messages.AciMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.getMessage; |
| | |
| | | */ |
| | | public class AciListenerManager |
| | | implements ChangeNotificationListener, BackendInitializationListener { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | /* |
| | | * The AciList caches the ACIs. |
| | |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | //TODO log message |
| | | continue; |
| | |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | //TODO log message |
| | | continue; |
| | |
| | | import static org.opends.server.authorization.dseecompat.Aci.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.MessageHandler.getMessage; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | import java.net.InetAddress; |
| | |
| | | * This class implements the dns bind rule keyword. |
| | | */ |
| | | public class DNS implements KeywordBindRule { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | /* |
| | | * List of patterns to match against. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_ACI_ERROR_CHECKING_CANONICAL_HOSTNAME; |
| | |
| | | import static org.opends.server.util.StaticUtils.isHexDigit; |
| | | import static org.opends.server.util.StaticUtils.hexStringToByteArray; |
| | | import org.opends.server.util.Validator; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | |
| | | public class PatternDN |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | /** |
| | | * If the pattern did not include any Multiple-Whole-RDN wildcards, then |
| | | * this is the sequence of RDN patterns in the DN pattern. Otherwise it |
| | | * is null. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_ATTR_SYNTAX_DN_ATTR_VALUE_DECODE_FAILURE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_ATTR_SYNTAX_DN_ATTR_VALUE_DECODE_FAILURE; |
| | |
| | | import org.opends.server.types.SearchScope; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.BackendMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | extends Backend |
| | | implements ConfigurationChangeListener<BackupBackendCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // The current configuration state. |
| | | private BackupBackendCfg currentConfig; |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_BACKUP_CANNOT_DECODE_BACKUP_ROOT_DN; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_BACKEND_CANNOT_REGISTER_BASEDN; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ce); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ce); |
| | | } |
| | | |
| | | int msgID = MSGID_BACKUP_INVALID_BACKUP_DIRECTORY; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_BACKUP_ERROR_GETTING_BACKUP_DIRECTORY; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ce); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ce); |
| | | } |
| | | |
| | | int msgID = MSGID_BACKUP_INVALID_BACKUP_DIRECTORY; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_BACKUP_ERROR_GETTING_BACKUP_DIRECTORY; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | continue; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | continue; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | continue; |
| | |
| | | import org.opends.server.util.LDIFWriter; |
| | | import org.opends.server.util.Validator; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.BackendMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | public class MemoryBackend |
| | | extends Backend |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // The base DNs for this backend. |
| | | private DN[] baseDNs; |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_BACKEND_CANNOT_REGISTER_BASEDN; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | // so just ignore it if it does for some reason. |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_MEMORYBACKEND_CANNOT_CREATE_LDIF_WRITER; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | import org.opends.server.util.Validator; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.BackendMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | extends Backend |
| | | implements ConfigurationChangeListener<BackendCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | // The set of user-defined attributes that will be included in the base |
| | | // monitor entry. |
| | | private ArrayList<Attribute> userDefinedAttributes; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_MONITOR_CANNOT_DECODE_MONITOR_ROOT_DN; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_BACKEND_CANNOT_REGISTER_BASEDN; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_ROOTDSE_UNABLE_TO_CREATE_LDIF_WRITER; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | try |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e2); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | try |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e2); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_BACKEND_ERROR_INTERACTING_WITH_BACKEND_ENTRY; |
| | |
| | | import org.opends.server.util.Validator; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.BackendMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.ConfigMessages. |
| | |
| | | extends Backend |
| | | implements ConfigurationChangeListener<RootDSEBackendCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // The set of standard "static" attributes that we will always include in the |
| | | // root DSE entry and won't change while the server is running. |
| | | private ArrayList<Attribute> staticDSEAttributes; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_ROOTDSE_SUBORDINATE_BASE_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | throw de; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_ROOTDSE_UNEXPECTED_SEARCH_FAILURE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_ROOTDSE_UNABLE_TO_CREATE_LDIF_WRITER; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_ROOTDSE_UNABLE_TO_EXPORT_DSE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_ROOTDSE_SUBORDINATE_BASE_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_ROOTDSE_SUBORDINATE_BASE_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_BACKEND_ERROR_INTERACTING_WITH_BACKEND_ENTRY; |
| | |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.BackendMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | implements ConfigurationChangeListener<SchemaBackendCfg>, AlertGenerator |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | /** |
| | | * The fully-qualified name of this class. |
| | | */ |
| | | private static final String CLASS_NAME = |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_BACKEND_CANNOT_REGISTER_BASEDN; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_SCHEMA_ERROR_DETERMINING_SCHEMA_CHANGES; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_SCHEMA_MODIFY_CANNOT_DECODE_ATTRTYPE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_SCHEMA_MODIFY_CANNOT_DECODE_OBJECTCLASS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_SCHEMA_MODIFY_CANNOT_DECODE_NAME_FORM; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_SCHEMA_MODIFY_CANNOT_DECODE_DCR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_SCHEMA_MODIFY_CANNOT_DECODE_DSR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_SCHEMA_MODIFY_CANNOT_DECODE_MR_USE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_SCHEMA_MODIFY_CANNOT_DECODE_ATTRTYPE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_SCHEMA_MODIFY_CANNOT_DECODE_OBJECTCLASS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_SCHEMA_MODIFY_CANNOT_DECODE_NAME_FORM; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_SCHEMA_MODIFY_CANNOT_DECODE_DCR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_SCHEMA_MODIFY_CANNOT_DECODE_DSR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_SCHEMA_MODIFY_CANNOT_DECODE_MR_USE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | throw de; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_SCHEMA_MODIFY_CANNOT_WRITE_NEW_SCHEMA; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_SCHEMA_MODIFY_CANNOT_DECODE_ATTRTYPE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_SCHEMA_MODIFY_CANNOT_DECODE_OBJECTCLASS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_SCHEMA_MODIFY_CANNOT_DECODE_NAME_FORM; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_SCHEMA_MODIFY_CANNOT_DECODE_DSR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | boolean allCleaned = true; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e2); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | |
| | | allCleaned = false; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | for (File f : installedFileList) |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e2); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e2); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | |
| | | allRestored = false; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_SCHEMA_UNABLE_TO_CREATE_LDIF_WRITER; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_SCHEMA_UNABLE_TO_EXPORT_BASE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_SCHEMA_BACKUP_CANNOT_GET_MAC; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_SCHEMA_BACKUP_CANNOT_GET_DIGEST; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_SCHEMA_BACKUP_CANNOT_CREATE_ARCHIVE_FILE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_SCHEMA_BACKUP_CANNOT_GET_CIPHER; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_SCHEMA_BACKUP_CANNOT_LIST_SCHEMA_FILES; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | try |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_SCHEMA_BACKUP_CANNOT_CLOSE_ZIP_STREAM; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_SCHEMA_BACKUP_CANNOT_UPDATE_BACKUP_DESCRIPTOR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_SCHEMA_CANNOT_DETERMINE_BASE_DN; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_BACKEND_ERROR_INTERACTING_WITH_BACKEND_ENTRY; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_SCHEMA_CANNOT_DEREGISTER_BASE_DN; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_SCHEMA_CANNOT_REGISTER_BASE_DN; |
| | |
| | | |
| | | import org.opends.server.types.*; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.api.ApproximateMatchingRule; |
| | | |
| | | /** |
| | |
| | | public class ApproximateIndexer extends Indexer |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | /** |
| | | * The comparator for index keys generated by this class. |
| | | */ |
| | | private static final Comparator<byte[]> comparator = |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | import org.opends.server.types.Modification; |
| | | import org.opends.server.types.SearchFilter; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | |
| | | /** |
| | |
| | | */ |
| | | public class AttributeIndex |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | return new EntryIDSet(); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | return new EntryIDSet(); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | return new EntryIDSet(); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | return new EntryIDSet(); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | return new EntryIDSet(); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | return new EntryIDSet(); |
| | | } |
| | |
| | | import static org.opends.server.messages.MessageHandler.getMessage; |
| | | import static org.opends.server.messages.JebMessages.*; |
| | | import static org.opends.server.loggers.ErrorLogger.logError; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import org.opends.server.admin.std.server.JEBackendCfg; |
| | |
| | | extends Backend |
| | | implements ConfigurationChangeListener<JEBackendCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | /** |
| | | * The configuration of this JE backend. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | String message = getMessage(MSGID_JEB_OPEN_ENV_FAIL, |
| | | e.getMessage()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, databaseException); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, databaseException); |
| | | } |
| | | String message = getMessage(MSGID_JEB_OPEN_DATABASE_FAIL, |
| | | databaseException.getMessage()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, databaseException); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, databaseException); |
| | | } |
| | | String message = getMessage(MSGID_JEB_GET_ENTRY_COUNT_FAILED, |
| | | databaseException.getMessage()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_BACKEND_CANNOT_REGISTER_BASEDN; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | int msgID = MSGID_JEB_DATABASE_EXCEPTION; |
| | | String message = getMessage(msgID, e.getMessage()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | String message = getMessage(MSGID_JEB_DATABASE_EXCEPTION, |
| | | e.getMessage()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | e.getMessage(), |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | String message = getMessage(MSGID_JEB_DATABASE_EXCEPTION, |
| | | e.getMessage()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | e.getMessage(), |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | String message = getMessage(MSGID_JEB_DATABASE_EXCEPTION, |
| | | e.getMessage()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | e.getMessage(), |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | String message = getMessage(MSGID_JEB_DATABASE_EXCEPTION, |
| | | e.getMessage()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | e.getMessage(), |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | String message = getMessage(MSGID_JEB_DATABASE_EXCEPTION, e.getMessage()); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | e.getMessage(), |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | String message = getMessage(MSGID_JEB_DATABASE_EXCEPTION, e.getMessage()); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ioe); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ioe); |
| | | } |
| | | int msgID = MSGID_JEB_IO_ERROR; |
| | | String message = getMessage(msgID, ioe.getMessage()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, je); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, je); |
| | | } |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | je.getMessage(), |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | String message = getMessage(MSGID_JEB_DATABASE_EXCEPTION, |
| | | de.getMessage()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | e.getMessage(), |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ioe); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ioe); |
| | | } |
| | | int msgID = MSGID_JEB_IO_ERROR; |
| | | String message = getMessage(msgID, ioe.getMessage()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, je); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, je); |
| | | } |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | je.getMessage(), |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | String message = getMessage(MSGID_JEB_DATABASE_EXCEPTION, |
| | | de.getMessage()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | String message = getMessage(MSGID_JEB_DATABASE_EXCEPTION, |
| | | e.getMessage()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | e.getMessage(), |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | String message = getMessage(MSGID_JEB_DATABASE_EXCEPTION, |
| | | e.getMessage()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | e.getMessage(), |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | resultCode = DirectoryServer.getServerErrorResultCode(); |
| | |
| | | import java.util.zip.ZipInputStream; |
| | | import java.util.zip.ZipOutputStream; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.loggers.ErrorLogger.logError; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.MessageHandler.getMessage; |
| | | import static org.opends.server.messages.JebMessages.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | public class BackupManager |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | /** |
| | | * The common prefix for archive files. |
| | | */ |
| | | public static final String BACKUP_BASE_FILENAME = "backup-"; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | e.getMessage(), |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_JEB_BACKUP_CANNOT_GET_MAC; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_JEB_BACKUP_CANNOT_GET_DIGEST; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_JEB_BACKUP_CANNOT_CREATE_ARCHIVE_FILE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_JEB_BACKUP_CANNOT_GET_CIPHER; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_JEB_BACKUP_CANNOT_LIST_LOG_FILES; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | msgID = MSGID_JEB_BACKUP_CANNOT_WRITE_ARCHIVE_FILE; |
| | | message = getMessage(msgID, ZIPENTRY_EMPTY_PLACEHOLDER, |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | msgID = MSGID_JEB_BACKUP_CANNOT_WRITE_ARCHIVE_FILE; |
| | | message = getMessage(msgID, zipEntryName, |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // A log file has been deleted by the cleaner since we started. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | msgID = MSGID_JEB_BACKUP_CANNOT_WRITE_ARCHIVE_FILE; |
| | | message = getMessage(msgID, logFile.getName(), |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_JEB_BACKUP_CANNOT_LIST_LOG_FILES; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | try |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_JEB_BACKUP_CANNOT_CLOSE_ZIP_STREAM; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_JEB_BACKUP_CANNOT_UPDATE_BACKUP_DESCRIPTOR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | e.getMessage(), |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | int msgID = MSGID_JEB_BACKUP_CANNOT_RESTORE; |
| | | String message = getMessage(msgID, backupInfo.getBackupID(), |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | int msgID = MSGID_JEB_BACKUP_CANNOT_RESTORE; |
| | | String message = getMessage(msgID, dependent.getBackupID(), |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | int msgID = MSGID_JEB_BACKUP_CANNOT_RESTORE; |
| | | String message = getMessage(msgID, backupInfo.getBackupID(), |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | e.getMessage(), |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_JEB_BACKUP_CANNOT_UPDATE_BACKUP_DESCRIPTOR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_JEB_BACKUP_CANNOT_GET_MAC; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_JEB_BACKUP_CANNOT_GET_DIGEST; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_JEB_BACKUP_CANNOT_GET_CIPHER; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_JEB_BACKUP_CANNOT_GET_CIPHER; |
| | |
| | | MSGID_CONFIG_BACKEND_INSANE_MODE; |
| | | import static org.opends.server.messages.JebMessages.*; |
| | | import static org.opends.server.loggers.ErrorLogger.logError; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.util.StaticUtils.getFileForPath; |
| | | |
| | | import org.opends.server.config.ConfigConstants; |
| | |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | | import java.io.File; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import org.opends.server.types.*; |
| | | import org.opends.server.admin.std.server.JEBackendCfg; |
| | | import org.opends.server.admin.server.ConfigurationChangeListener; |
| | |
| | | public class Config |
| | | implements ConfigurationChangeListener<JEBackendCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | /** |
| | | * The name of the object class which configures |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | import java.util.Map; |
| | | import java.lang.reflect.Method; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.admin.std.server.JEBackendCfg; |
| | | import org.opends.server.admin.std.meta.JEBackendCfgDefn; |
| | | import org.opends.server.admin.DurationPropertyDefinition; |
| | |
| | | public class ConfigurableEnvironment |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | /** |
| | | * The name of the attribute which configures the database cache size as a |
| | | * percentage of Java VM heap size. |
| | | */ |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | return ""; |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.util.StaticUtils; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugInfo; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugVerbose; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | |
| | | /** |
| | | * This class represents the DN database, or dn2id, which has one record |
| | |
| | | public class DN2ID |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | /** |
| | | * The database entryContainer. |
| | | */ |
| | | private EntryContainer entryContainer; |
| | |
| | | |
| | | if(debugEnabled()) |
| | | { |
| | | debugInfo("JE DN2ID database %s opened with %d records.", |
| | | TRACER.debugInfo("JE DN2ID database %s opened with %d records.", |
| | | database.getDatabaseName(), database.count()); |
| | | } |
| | | } |
| | |
| | | { |
| | | if(debugEnabled()) |
| | | { |
| | | debugVerbose("%d existing records will be deleted from the " + |
| | | TRACER.debugVerbose("%d existing records will be deleted from the " + |
| | | "database", getRecordCount()); |
| | | } |
| | | DatabaseEntry data = new DatabaseEntry(); |
| | |
| | | } |
| | | if(debugEnabled()) |
| | | { |
| | | debugVerbose("%d records deleted", deletedCount); |
| | | TRACER.debugVerbose("%d records deleted", deletedCount); |
| | | } |
| | | } |
| | | catch(DatabaseException de) |
| | | { |
| | | if(debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | throw de; |
| | |
| | | import java.util.Set; |
| | | |
| | | import static org.opends.server.util.ServerConstants.ATTR_REFERRAL_URL; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugInfo; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugVerbose; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.JebMessages. |
| | | MSGID_JEB_REFERRAL_RESULT_MESSAGE; |
| | |
| | | */ |
| | | public class DN2URI |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | /** |
| | | * The standard attribute type that is used to specify the set of referral |
| | |
| | | |
| | | if(debugEnabled()) |
| | | { |
| | | debugInfo("JE DN2URI database %s opened with %d records.", |
| | | TRACER.debugInfo("JE DN2URI database %s opened with %d records.", |
| | | database.getDatabaseName(), database.count()); |
| | | } |
| | | } |
| | |
| | | { |
| | | if(debugEnabled()) |
| | | { |
| | | debugVerbose("%d existing records will be deleted from the " + |
| | | TRACER.debugVerbose("%d existing records will be deleted from the " + |
| | | "database", getRecordCount()); |
| | | } |
| | | DatabaseEntry data = new DatabaseEntry(); |
| | |
| | | } |
| | | if(debugEnabled()) |
| | | { |
| | | debugVerbose("%d records deleted", deletedCount); |
| | | TRACER.debugVerbose("%d records deleted", deletedCount); |
| | | } |
| | | } |
| | | catch(DatabaseException de) |
| | | { |
| | | if(debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | throw de; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | // Return the non-LDAP URI as is. |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | catch (UnsupportedEncodingException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | // Return the non-LDAP URI as is. |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | catch (UnsupportedEncodingException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | import com.sleepycat.je.Database; |
| | | import com.sleepycat.je.DatabaseException; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | |
| | | import java.util.Comparator; |
| | |
| | | */ |
| | | public class DbPreloadComparator implements Comparator<Database> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | /** |
| | | * Calculate the relative priority of a database for preloading. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | return 3; |
| | | } |
| | |
| | | |
| | | import static org.opends.server.messages.MessageHandler.getMessage; |
| | | import static org.opends.server.messages.JebMessages.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugJEAccess; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugVerbose; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | |
| | | /** |
| | |
| | | */ |
| | | public class EntryContainer |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | /** |
| | | * The name of the entry database. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | close(); |
| | | throw e; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | close(); |
| | | throw e; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | close(); |
| | | throw e; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | throw new DirectoryException(ResultCode.PROTOCOL_ERROR, |
| | | e.getMessage(), e.getMessageID(), e); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | throw new DirectoryException(ResultCode.PROTOCOL_ERROR, |
| | | e.getMessage(), e.getMessageID(), e); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | throw new DirectoryException(ResultCode.PROTOCOL_ERROR, |
| | | e.getMessage(), e.getMessageID(), e); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | int msgID = MSGID_JEB_INVALID_PAGED_RESULTS_COOKIE; |
| | | String str = StaticUtils.bytesToHex(pageRequest.getCookie().value()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | catch (JebException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | int msgID = MSGID_JEB_INVALID_PAGED_RESULTS_COOKIE; |
| | | String str = StaticUtils.bytesToHex(pageRequest.getCookie().value()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | continue; |
| | | } |
| | |
| | | } |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, deadlockException); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, deadlockException); |
| | | } |
| | | } |
| | | catch (DatabaseException databaseException) |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | try |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | try |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | try |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | for (AttributeIndex index : attrIndexMap.values()) |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | database = env.openDatabase(txn, fullName, dbConfig); |
| | | if (debugEnabled()) |
| | | { |
| | | debugVerbose("open db=%s txnid=%d", database.getDatabaseName(), |
| | | TRACER.debugVerbose("open db=%s txnid=%d", |
| | | database.getDatabaseName(), |
| | | txn.getId()); |
| | | } |
| | | transactionCommit(txn); |
| | |
| | | database = env.openDatabase(null, fullName, dbConfig); |
| | | if (debugEnabled()) |
| | | { |
| | | debugVerbose("open db=%s txnid=none", database.getDatabaseName()); |
| | | TRACER.debugVerbose("open db=%s txnid=none", |
| | | database.getDatabaseName()); |
| | | } |
| | | } |
| | | |
| | |
| | | Transaction txn = env.beginTransaction(parentTxn, txnConfig); |
| | | if (debugEnabled()) |
| | | { |
| | | debugVerbose("beginTransaction", "begin txnid=" + txn.getId()); |
| | | TRACER.debugVerbose("beginTransaction", "begin txnid=" + txn.getId()); |
| | | } |
| | | return txn; |
| | | } |
| | |
| | | txn.commit(); |
| | | if (debugEnabled()) |
| | | { |
| | | debugVerbose("commit txnid=%d", txn.getId()); |
| | | TRACER.debugVerbose("commit txnid=%d", txn.getId()); |
| | | } |
| | | } |
| | | } |
| | |
| | | txn.abort(); |
| | | if (debugEnabled()) |
| | | { |
| | | debugVerbose("abort txnid=%d", txn.getId()); |
| | | TRACER.debugVerbose("abort txnid=%d", txn.getId()); |
| | | } |
| | | } |
| | | } |
| | |
| | | OperationStatus status = database.putNoOverwrite(txn, key, data); |
| | | if (debugEnabled()) |
| | | { |
| | | debugJEAccess(DebugLogLevel.VERBOSE, status, database, txn, key, data); |
| | | TRACER.debugJEAccess(DebugLogLevel.VERBOSE, status, database, txn, key, |
| | | data); |
| | | } |
| | | return status; |
| | | } |
| | |
| | | OperationStatus status = cursor.putNoOverwrite(key, data); |
| | | if (debugEnabled()) |
| | | { |
| | | debugJEAccess(DebugLogLevel.VERBOSE, status, |
| | | TRACER.debugJEAccess(DebugLogLevel.VERBOSE, status, |
| | | cursor.getDatabase(), null, key, data); |
| | | } |
| | | return status; |
| | |
| | | OperationStatus status = database.put(txn, key, data); |
| | | if (debugEnabled()) |
| | | { |
| | | debugJEAccess(DebugLogLevel.VERBOSE, status, database, txn, key, data); |
| | | TRACER.debugJEAccess(DebugLogLevel.VERBOSE, status, database, txn, key, |
| | | data); |
| | | } |
| | | return status; |
| | | } |
| | |
| | | OperationStatus status = cursor.put(key, data); |
| | | if (debugEnabled()) |
| | | { |
| | | debugJEAccess(DebugLogLevel.VERBOSE, status, |
| | | TRACER.debugJEAccess(DebugLogLevel.VERBOSE, status, |
| | | cursor.getDatabase(), null, key, data); |
| | | } |
| | | return status; |
| | |
| | | OperationStatus status = database.get(txn, key, data, lockMode); |
| | | if (debugEnabled()) |
| | | { |
| | | debugJEAccess(DebugLogLevel.VERBOSE, status, database, txn, key, data); |
| | | TRACER.debugJEAccess(DebugLogLevel.VERBOSE, status, database, txn, key, |
| | | data); |
| | | } |
| | | return status; |
| | | } |
| | |
| | | OperationStatus status = cursor.getSearchKey(key, data, lockMode); |
| | | if (debugEnabled()) |
| | | { |
| | | debugJEAccess(DebugLogLevel.VERBOSE, status, |
| | | TRACER.debugJEAccess(DebugLogLevel.VERBOSE, status, |
| | | cursor.getDatabase(), null, key, data); |
| | | } |
| | | return status; |
| | |
| | | OperationStatus status = database.delete(txn, key); |
| | | if (debugEnabled()) |
| | | { |
| | | debugJEAccess(DebugLogLevel.VERBOSE, status, database, txn, key, null); |
| | | TRACER.debugJEAccess(DebugLogLevel.VERBOSE, status, database, txn, key, |
| | | null); |
| | | } |
| | | return status; |
| | | } |
| | |
| | | long count = database.count(); |
| | | if (debugEnabled()) |
| | | { |
| | | debugJEAccess(DebugLogLevel.VERBOSE, OperationStatus.SUCCESS, |
| | | TRACER.debugJEAccess(DebugLogLevel.VERBOSE, OperationStatus.SUCCESS, |
| | | database, null, null, null); |
| | | } |
| | | return count; |
| | |
| | | */ |
| | | package org.opends.server.backends.jeb; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.MessageHandler.getMessage; |
| | | import static org.opends.server.messages.JebMessages.MSGID_JEB_CREATE_FAIL; |
| | |
| | | */ |
| | | public class EnvManager |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | /** |
| | | * A filename filter to match all kinds of JE files. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | String message = getMessage(MSGID_JEB_CREATE_FAIL, e.getMessage()); |
| | | throw new JebException(MSGID_JEB_CREATE_FAIL, message, e); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | String message = getMessage(MSGID_JEB_REMOVE_FAIL, e.getMessage()); |
| | | throw new JebException(MSGID_JEB_REMOVE_FAIL, message, e); |
| | |
| | | */ |
| | | package org.opends.server.backends.jeb; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | |
| | | import com.sleepycat.je.Transaction; |
| | |
| | | */ |
| | | public class EqualityIndexer extends Indexer |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | import java.io.IOException; |
| | | import java.util.*; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugError; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.MessageHandler.getMessage; |
| | | import static org.opends.server.loggers.ErrorLogger.logError; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.JebMessages.*; |
| | | |
| | | /** |
| | |
| | | */ |
| | | public class ExportJob |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | /** |
| | | * The requested LDIF export configuration. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | |
| | | debugError("Malformed id2entry ID %s.%n", |
| | | TRACER.debugError("Malformed id2entry ID %s.%n", |
| | | StaticUtils.bytesToHex(key.getData())); |
| | | } |
| | | skippedCount++; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | |
| | | debugError("Malformed id2entry record for ID %d:%n%s%n", |
| | | TRACER.debugError("Malformed id2entry record for ID %d:%n%s%n", |
| | | entryID.longValue(), |
| | | StaticUtils.bytesToHex(data.getData())); |
| | | } |
| | |
| | | */ |
| | | package org.opends.server.backends.jeb; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugInfo; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.MessageHandler.getMessage; |
| | | import static org.opends.server.messages.JebMessages.*; |
| | | |
| | |
| | | public class ID2Entry |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | /** |
| | | * The database entryContainer. |
| | | */ |
| | | private EntryContainer entryContainer; |
| | |
| | | |
| | | if(debugEnabled()) |
| | | { |
| | | debugInfo("JE ID2Entry database %s opened with %d records.", |
| | | TRACER.debugInfo("JE ID2Entry database %s opened with %d records.", |
| | | database.getDatabaseName(), database.count()); |
| | | } |
| | | } |
| | |
| | | import com.sleepycat.je.Transaction; |
| | | |
| | | import org.opends.server.api.Backend; |
| | | import org.opends.server.loggers.debug.DebugLogger; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.messages.JebMessages; |
| | | import org.opends.server.types.AttributeType; |
| | |
| | | import java.util.TimerTask; |
| | | import java.util.concurrent.LinkedBlockingQueue; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.messages.JebMessages. |
| | | MSGID_JEB_IMPORT_ENTRY_EXISTS; |
| | | import static org.opends.server.messages.MessageHandler.getMessage; |
| | | import static org.opends.server.messages.JebMessages. |
| | | MSGID_JEB_IMPORT_PARENT_NOT_FOUND; |
| | | import static org.opends.server.loggers.ErrorLogger.logError; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.JebMessages.*; |
| | | |
| | | /** |
| | |
| | | */ |
| | | public class ImportJob implements Thread.UncaughtExceptionHandler |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | /** |
| | | * The backend instance we are importing into. |
| | |
| | | logError(ErrorLogCategory.BACKEND, ErrorLogSeverity.NOTICE, |
| | | message, msgID); |
| | | |
| | | DebugLogger.debugInfo( |
| | | TRACER.debugInfo( |
| | | rootContainer.getEnvironmentConfig().toString()); |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | catch (DirectoryException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } while (true); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | */ |
| | | package org.opends.server.backends.jeb; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.api.DirectoryThread; |
| | | import org.opends.server.types.AttributeType; |
| | |
| | | */ |
| | | public class ImportThread extends DirectoryThread |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | /** |
| | | * The import context of this thread. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | continue; |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | catch (IOException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | */ |
| | | package org.opends.server.backends.jeb; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugInfo; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugVerbose; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | |
| | | import com.sleepycat.je.Cursor; |
| | |
| | | */ |
| | | public class Index |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | |
| | | if(debugEnabled()) |
| | | { |
| | | debugInfo("JE Index database %s opened with %d records.", |
| | | TRACER.debugInfo("JE Index database %s opened with %d records.", |
| | | database.getDatabaseName(), database.count()); |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | return new EntryIDSet(); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | return new EntryIDSet(); |
| | | } |
| | |
| | | { |
| | | if(debugEnabled()) |
| | | { |
| | | debugVerbose("%d existing records will be deleted from the " + |
| | | TRACER.debugVerbose("%d existing records will be deleted from the " + |
| | | "database", getRecordCount()); |
| | | } |
| | | DatabaseEntry data = new DatabaseEntry(); |
| | |
| | | } |
| | | if(debugEnabled()) |
| | | { |
| | | debugVerbose("%d records deleted", deletedCount); |
| | | TRACER.debugVerbose("%d records deleted", deletedCount); |
| | | } |
| | | } |
| | | catch(DatabaseException de) |
| | | { |
| | | if(debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | throw de; |
| | |
| | | import java.util.TreeMap; |
| | | import java.util.WeakHashMap; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.MessageHandler.getMessage; |
| | | import static org.opends.server.loggers.ErrorLogger.logError; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.JebMessages.*; |
| | | |
| | | /** |
| | |
| | | */ |
| | | public class IndexMergeThread extends DirectoryThread |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | /** |
| | | * The buffer size to use when reading data from disk. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | throw e; |
| | | } |
| | |
| | | |
| | | import org.opends.server.types.*; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugError; |
| | | import static org.opends.server.messages.JebMessages. |
| | | MSGID_JEB_MISSING_DN2ID_RECORD; |
| | | import static org.opends.server.messages.JebMessages. |
| | |
| | | MSGID_JEB_REBUILD_INSERT_ENTRY_FAILED; |
| | | import static org.opends.server.messages.MessageHandler.getMessage; |
| | | import static org.opends.server.loggers.ErrorLogger.logError; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.util.StaticUtils.stackTraceToSingleLineString; |
| | | |
| | | |
| | |
| | | public class IndexRebuildThread extends DirectoryThread |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | /** |
| | | * The entry container. |
| | | */ |
| | | EntryContainer ec = null; |
| | |
| | | //TODO: throw error |
| | | if(debugEnabled()) |
| | | { |
| | | debugError("No index type specified. Rebuild process terminated."); |
| | | TRACER.debugError("No index type specified. Rebuild process " + |
| | | "terminated."); |
| | | } |
| | | |
| | | return; |
| | |
| | | //TODO: throw error |
| | | if(debugEnabled()) |
| | | { |
| | | debugError("No attribute index specified. Rebuild process terminated."); |
| | | TRACER.debugError("No attribute index specified. Rebuild process " + |
| | | "terminated."); |
| | | } |
| | | |
| | | return; |
| | |
| | | //TODO: throw error |
| | | if(debugEnabled()) |
| | | { |
| | | debugError("No index specified. Rebuild process terminated."); |
| | | TRACER.debugError("No index specified. Rebuild process terminated."); |
| | | } |
| | | |
| | | return; |
| | |
| | | totalEntries = getTotalEntries(); |
| | | if(debugEnabled()) |
| | | { |
| | | debugInfo("Initiating rebuild of the %s indexType/database", indexName); |
| | | debugVerbose("%d entries will be rebuilt", totalEntries); |
| | | TRACER.debugInfo("Initiating rebuild of the %s indexType/database", |
| | | indexName); |
| | | TRACER.debugVerbose("%d entries will be rebuilt", totalEntries); |
| | | } |
| | | |
| | | switch(indexType) |
| | |
| | | |
| | | if(debugEnabled()) |
| | | { |
| | | debugVerbose("Rebuilt %d entries", rebuiltEntries); |
| | | TRACER.debugVerbose("Rebuilt %d entries", rebuiltEntries); |
| | | } |
| | | } |
| | | catch(Exception e) |
| | |
| | | |
| | | if(debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | duplicatedEntries++; |
| | | if(debugEnabled()) |
| | | { |
| | | debugInfo("Unable to insert entry with DN %s and ID %d " + |
| | | TRACER.debugInfo("Unable to insert entry with DN %s and ID %d " + |
| | | "into the DN2ID database because it already exists.", |
| | | entry.getDN().toString(), entryID.longValue()); |
| | | } |
| | |
| | | |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | duplicatedEntries++; |
| | | if(debugEnabled()) |
| | | { |
| | | debugInfo("Unable to insert entry with DN %s and ID %d " + |
| | | TRACER.debugInfo("Unable to insert entry with DN %s and ID %d " + |
| | | "into the DN2URI database because it already exists.", |
| | | entry.getDN().toString(), entryID.longValue()); |
| | | } |
| | |
| | | |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | if(debugEnabled()) |
| | | { |
| | | duplicatedEntries++; |
| | | debugInfo("Unable to insert entry with DN %s and ID %d " + |
| | | "into the DN2Subtree database because it already " + |
| | | TRACER.debugInfo("Unable to insert entry with DN %s and " + |
| | | "ID %d into the DN2Subtree database because it already " + |
| | | "exists.", |
| | | entry.getDN().toString(), entryID.longValue()); |
| | | } |
| | |
| | | |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | if(debugEnabled()) |
| | | { |
| | | duplicatedEntries++; |
| | | debugInfo("Unable to insert entry with DN %s and ID %d " + |
| | | "into the DN2Subtree database because it already " + |
| | | "exists.", |
| | | entry.getDN().toString(), entryID.longValue()); |
| | | TRACER.debugInfo("Unable to insert entry with DN %s and ID " + |
| | | "%d into the DN2Subtree database because it already " + |
| | | "exists.", entry.getDN().toString(), entryID.longValue()); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | if(debugEnabled()) |
| | | { |
| | | duplicatedEntries++; |
| | | debugInfo("Unable to insert entry with DN %s and ID %d " + |
| | | TRACER.debugInfo("Unable to insert entry with DN %s and ID %d " + |
| | | "into the DN2Subtree database because it already " + |
| | | "exists.", |
| | | entry.getDN().toString(), entryID.longValue()); |
| | |
| | | |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | if(debugEnabled()) |
| | | { |
| | | duplicatedEntries++; |
| | | debugInfo("Unable to insert entry with DN %s and ID %d " + |
| | | TRACER.debugInfo("Unable to insert entry with DN %s and ID %d " + |
| | | "into the DN2Subtree database because it already " + |
| | | "exists.", |
| | | entry.getDN().toString(), entryID.longValue()); |
| | |
| | | |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.LDAPException; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugInfo; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | |
| | | */ |
| | | public class JebFormat |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | /** |
| | | * The format version used by this class to encode and decode a DatabaseEntry. |
| | |
| | | |
| | | if(debugEnabled()) |
| | | { |
| | | debugInfo("Compression %d/%d%n", |
| | | TRACER.debugInfo("Compression %d/%d%n", |
| | | compressedSize, uncompressedSize); |
| | | } |
| | | |
| | |
| | | */ |
| | | package org.opends.server.backends.jeb; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | |
| | | import org.opends.server.api.OrderingMatchingRule; |
| | |
| | | */ |
| | | public class OrderingIndexer extends Indexer |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | import com.sleepycat.je.StatsConfig; |
| | | import com.sleepycat.je.EnvironmentStats; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.loggers.ErrorLogger.logError; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import static org.opends.server.messages.JebMessages. |
| | | MSGID_JEB_ATTRIBUTE_INDEX_NOT_CONFIGURED; |
| | |
| | | public class RebuildJob |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | /** |
| | | * The rebuild configuraiton. |
| | | */ |
| | | private RebuildConfig rebuildConfig; |
| | |
| | | |
| | | if(debugEnabled()) |
| | | { |
| | | debugVerbose("Rebuild thread %s stats: total %d processed %d " + |
| | | "rebuilt %d duplicated %d skipped %d", |
| | | TRACER.debugVerbose("Rebuild thread %s stats: total %d " + |
| | | "processed %d rebuilt %d duplicated %d skipped %d", |
| | | thread.getTotalEntries(), thread.getProcessedEntries(), |
| | | thread.getRebuiltEntries(), |
| | | thread.getDuplicatedEntries(), |
| | |
| | | { |
| | | if(debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | //TODO: Throw error and bail out. |
| | | if(debugEnabled()) |
| | | { |
| | | debugError("Conflit detected. This job config: %s, " + |
| | | TRACER.debugError("Conflit detected. This job config: %s, " + |
| | | "That job config: %s.", |
| | | job.rebuildConfig, otherJob.rebuildConfig); |
| | | } |
| | |
| | | |
| | | if(debugEnabled()) |
| | | { |
| | | debugInfo("Created rebuild thread %s", rebuildThread.getName()); |
| | | TRACER.debugInfo("Created rebuild thread %s", |
| | | rebuildThread.getName()); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | if(debugEnabled()) |
| | | { |
| | | debugInfo("Detailed overall rebuild job stats: rebuilt %d, " + |
| | | TRACER.debugInfo("Detailed overall rebuild job stats: rebuilt %d, " + |
| | | "duplicated %d, skipped %d", |
| | | totalRebuilt, totalDuplicated, totalSkipped); |
| | | } |
| | |
| | | { |
| | | if(debugEnabled()) |
| | | { |
| | | debugInfo("Delaying the start of thread %s because " + |
| | | TRACER.debugInfo("Delaying the start of thread %s because " + |
| | | "the max number of rebuild threads has been reached."); |
| | | } |
| | | start = false; |
| | |
| | | |
| | | if(debugEnabled()) |
| | | { |
| | | debugInfo("Delaying the start of thread %s because " + |
| | | TRACER.debugInfo("Delaying the start of thread %s because " + |
| | | "it depends on another index rebuilt to " + |
| | | "go first.", t.getName()); |
| | | } |
| | |
| | | |
| | | if(debugEnabled()) |
| | | { |
| | | debugInfo("Delaying the start of thread %s because " + |
| | | TRACER.debugInfo("Delaying the start of thread %s because " + |
| | | "it depends on another index being rebuilt to " + |
| | | "finish.", t.getName()); |
| | | } |
| | |
| | | { |
| | | if(debugEnabled()) |
| | | { |
| | | debugInfo("Starting rebuild thread %s.", t.getName()); |
| | | TRACER.debugInfo("Starting rebuild thread %s.", t.getName()); |
| | | } |
| | | waitingThreads.remove(t); |
| | | activeThreads.add(t); |
| | |
| | | |
| | | if(debugEnabled()) |
| | | { |
| | | debugInfo("Rebuild thread %s finished.", t.getName()); |
| | | TRACER.debugInfo("Rebuild thread %s finished.", t.getName()); |
| | | } |
| | | activeThreads.remove(t); |
| | | completedThreads.add(t); |
| | |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.ResultCode; |
| | | import static org.opends.server.loggers.ErrorLogger.logError; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugInfo; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.MessageHandler.getMessage; |
| | | import static org.opends.server.messages.JebMessages.*; |
| | | import org.opends.server.api.Backend; |
| | |
| | | public class RootContainer |
| | | implements ConfigurationChangeListener<JEBackendCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | /** |
| | | * The JE database environment. |
| | |
| | | |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("JE (%s) environment opened with the following config: %n%s", |
| | | JEVersion.CURRENT_VERSION.toString(), |
| | | env.getConfig().toString()); |
| | | TRACER.debugInfo("JE (%s) environment opened with the following " + |
| | | "config: %n%s", JEVersion.CURRENT_VERSION.toString(), |
| | | env.getConfig().toString()); |
| | | |
| | | // Get current size of heap in bytes |
| | | long heapSize = Runtime.getRuntime().totalMemory(); |
| | |
| | | // after garbage collection and decrease as new objects are created. |
| | | long heapFreeSize = Runtime.getRuntime().freeMemory(); |
| | | |
| | | debugInfo("Current size of heap: %d bytes", heapSize); |
| | | debugInfo("Max size of heap: %d bytes", heapMaxSize); |
| | | debugInfo("Free memory in heap: %d bytes", heapFreeSize); |
| | | TRACER.debugInfo("Current size of heap: %d bytes", heapSize); |
| | | TRACER.debugInfo("Max size of heap: %d bytes", heapMaxSize); |
| | | TRACER.debugInfo("Free memory in heap: %d bytes", heapFreeSize); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | if(debugEnabled()) |
| | | { |
| | | debugInfo("file=" + db.getDatabaseName() + |
| | | TRACER.debugInfo("file=" + db.getDatabaseName() + |
| | | " LNs=" + preloadStats.getNLNsLoaded()); |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | if(debugEnabled()) |
| | | { |
| | | debugInfo("The change to the following property will " + |
| | | TRACER.debugInfo("The change to the following property will " + |
| | | "take effect when the backend is restarted: " + |
| | | param.getName()); |
| | | } |
| | |
| | | |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo(env.getConfig().toString()); |
| | | TRACER.debugInfo(env.getConfig().toString()); |
| | | } |
| | | } |
| | | catch (Exception e) |
| | |
| | | */ |
| | | package org.opends.server.backends.jeb; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import com.sleepycat.je.Transaction; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | |
| | | */ |
| | | public class SubstringIndexer extends Indexer |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | package org.opends.server.backends.jeb; |
| | | |
| | | import static org.opends.server.loggers.ErrorLogger.logError; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | |
| | | import com.sleepycat.je.Cursor; |
| | | import com.sleepycat.je.CursorConfig; |
| | |
| | | import org.opends.server.util.StaticUtils; |
| | | import org.opends.server.util.ServerConstants; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugError; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.MessageHandler.getMessage; |
| | | import static org.opends.server.messages.JebMessages.*; |
| | |
| | | */ |
| | | public class VerifyJob |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | /** |
| | | * The verify configuration. |
| | |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | |
| | | debugError("Malformed id2entry ID %s.%n", |
| | | TRACER.debugError("Malformed id2entry ID %s.%n", |
| | | StaticUtils.bytesToHex(key.getData())); |
| | | } |
| | | continue; |
| | |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | |
| | | debugError("Malformed id2entry record for ID %d:%n%s%n", |
| | | TRACER.debugError("Malformed id2entry record for ID %d:%n%s%n", |
| | | entryID.longValue(), |
| | | StaticUtils.bytesToHex(data.getData())); |
| | | } |
| | |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | { |
| | | debugError("The stored entry count in id2entry (%d) does " + |
| | | TRACER.debugError("The stored entry count in id2entry (%d) does " + |
| | | "not agree with the actual number of entry " + |
| | | "records found (%d).%n", storedEntryCount, keyCount); |
| | | } |
| | |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | |
| | | debugError("File dn2id has malformed key %s.%n", |
| | | TRACER.debugError("File dn2id has malformed key %s.%n", |
| | | StaticUtils.bytesToHex(key.getData())); |
| | | } |
| | | continue; |
| | |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | |
| | | debugError("File dn2id has malformed ID for DN <%s>:%n%s%n", |
| | | TRACER.debugError("File dn2id has malformed ID for DN <%s>:%n%s%n", |
| | | dn.toNormalizedString(), |
| | | StaticUtils.bytesToHex(data.getData())); |
| | | } |
| | |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | continue; |
| | | } |
| | |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | { |
| | | debugError("File dn2id has DN <%s> referencing unknown " + |
| | | TRACER.debugError("File dn2id has DN <%s> referencing unknown " + |
| | | "ID %d%n", dn.toNormalizedString(), entryID.longValue()); |
| | | } |
| | | } |
| | |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | { |
| | | debugError("File dn2id has DN <%s> referencing entry " + |
| | | TRACER.debugError("File dn2id has DN <%s> referencing entry " + |
| | | "with wrong DN <%s>%n", dn.toNormalizedString(), |
| | | entry.getDN().toNormalizedString()); |
| | | } |
| | |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | |
| | | debugError("File id2children has malformed ID %s%n", |
| | | TRACER.debugError("File id2children has malformed ID %s%n", |
| | | StaticUtils.bytesToHex(key.getData())); |
| | | } |
| | | continue; |
| | |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | |
| | | debugError("File id2children has malformed ID list " + |
| | | TRACER.debugError("File id2children has malformed ID list " + |
| | | "for ID %s:%n%s%n", entryID, |
| | | StaticUtils.bytesToHex(data.getData())); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | errorCount++; |
| | | continue; |
| | |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | { |
| | | debugError("File id2children has unknown ID %d%n", |
| | | TRACER.debugError("File id2children has unknown ID %d%n", |
| | | entryID.longValue()); |
| | | } |
| | | continue; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | errorCount++; |
| | | continue; |
| | |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | { |
| | | debugError("File id2children has ID %d referencing " + |
| | | TRACER.debugError("File id2children has ID %d referencing " + |
| | | "unknown ID %d%n", entryID.longValue(), id.longValue()); |
| | | } |
| | | continue; |
| | |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | { |
| | | debugError("File id2children has ID %d with DN <%s> " + |
| | | TRACER.debugError("File id2children has ID %d with DN <%s> " + |
| | | "referencing ID %d with non-child DN <%s>%n", |
| | | entryID.longValue(), entry.getDN().toString(), |
| | | id.longValue(), childEntry.getDN().toString()); |
| | |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | |
| | | debugError("File id2subtree has malformed ID %s%n", |
| | | TRACER.debugError("File id2subtree has malformed ID %s%n", |
| | | StaticUtils.bytesToHex(key.getData())); |
| | | } |
| | | continue; |
| | |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | |
| | | debugError("File id2subtree has malformed ID list " + |
| | | TRACER.debugError("File id2subtree has malformed ID list " + |
| | | "for ID %s:%n%s%n", entryID, |
| | | StaticUtils.bytesToHex(data.getData())); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | errorCount++; |
| | | continue; |
| | |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | { |
| | | debugError("File id2subtree has unknown ID %d%n", |
| | | TRACER.debugError("File id2subtree has unknown ID %d%n", |
| | | entryID.longValue()); |
| | | } |
| | | continue; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | errorCount++; |
| | | continue; |
| | |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | { |
| | | debugError("File id2subtree has ID %d referencing " + |
| | | TRACER.debugError("File id2subtree has ID %d referencing " + |
| | | "unknown ID %d%n", entryID.longValue(), id.longValue()); |
| | | } |
| | | continue; |
| | |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | { |
| | | debugError("File id2subtree has ID %d with DN <%s> " + |
| | | TRACER.debugError("File id2subtree has ID %d with DN <%s> " + |
| | | "referencing ID %d with non-subordinate " + |
| | | "DN <%s>%n", |
| | | entryID.longValue(), entry.getDN().toString(), |
| | |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | |
| | | debugError("Malformed ID list: %s%n%s", |
| | | TRACER.debugError("Malformed ID list: %s%n%s", |
| | | StaticUtils.bytesToHex(data.getData()), |
| | | keyDump(index, key.getData())); |
| | | } |
| | |
| | | errorCount++; |
| | | if(debugEnabled()) |
| | | { |
| | | debugError("Reversed ordering of index keys " + |
| | | TRACER.debugError("Reversed ordering of index keys " + |
| | | "(keys dumped in the order found in database)%n" + |
| | | "Key 1:%n%s%nKey 2:%n%s", |
| | | keyDump(index, thisValue.value()), |
| | |
| | | errorCount++; |
| | | if(debugEnabled()) |
| | | { |
| | | debugError("Duplicate index keys%nKey 1:%n%s%nKey2:%n%s", |
| | | keyDump(index, thisValue.value()), |
| | | keyDump(index,previousValue.value())); |
| | | TRACER.debugError("Duplicate index keys%nKey 1:%n%s%n" + |
| | | "Key2:%n%s", keyDump(index, thisValue.value()), |
| | | keyDump(index,previousValue.value())); |
| | | } |
| | | continue; |
| | | } |
| | |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | { |
| | | debugError("Malformed value%n%s", keyDump(index, value)); |
| | | TRACER.debugError("Malformed value%n%s", keyDump(index, value)); |
| | | } |
| | | continue; |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugError("Duplicate reference to ID %d%n%s", |
| | | TRACER.debugError("Duplicate reference to ID %d%n%s", |
| | | id.longValue(), keyDump(index, key.getData())); |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | errorCount++; |
| | | continue; |
| | |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | { |
| | | debugError("Reference to unknown ID %d%n%s", |
| | | TRACER.debugError("Reference to unknown ID %d%n%s", |
| | | id.longValue(), keyDump(index, key.getData())); |
| | | } |
| | | continue; |
| | |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | { |
| | | debugError("Reference to entry " + |
| | | TRACER.debugError("Reference to entry " + |
| | | "<%s> which does not match the value%n%s", |
| | | entry.getDN(), keyDump(index, value)); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugError("File dn2id is missing key %s.%n", |
| | | TRACER.debugError("File dn2id is missing key %s.%n", |
| | | dn.toNormalizedString()); |
| | | } |
| | | errorCount++; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugError("File dn2id has ID %d instead of %d for key %s.%n", |
| | | TRACER.debugError("File dn2id has ID %d instead of %d for key %s.%n", |
| | | id.longValue(), |
| | | entryID.longValue(), |
| | | dn.toNormalizedString()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | |
| | | debugError("File dn2id has error reading key %s: %s.%n", |
| | | TRACER.debugError("File dn2id has error reading key %s: %s.%n", |
| | | dn.toNormalizedString(), |
| | | e.getMessage()); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugError("File dn2id is missing key %s.%n", |
| | | TRACER.debugError("File dn2id is missing key %s.%n", |
| | | parentDN.toNormalizedString()); |
| | | } |
| | | errorCount++; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | |
| | | debugError("File dn2id has error reading key %s: %s.%n", |
| | | TRACER.debugError("File dn2id has error reading key %s: %s.%n", |
| | | parentDN.toNormalizedString(), |
| | | e.getMessage()); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugError("File dn2id is missing key %s.%n", |
| | | TRACER.debugError("File dn2id is missing key %s.%n", |
| | | parentDN.toNormalizedString()); |
| | | } |
| | | errorCount++; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | |
| | | debugError("File dn2id has error reading key %s: %s.", |
| | | TRACER.debugError("File dn2id has error reading key %s: %s.", |
| | | parentDN.toNormalizedString(), |
| | | e.getMessage()); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugError("File id2children is missing ID %d " + |
| | | TRACER.debugError("File id2children is missing ID %d " + |
| | | "for key %d.%n", |
| | | entryID.longValue(), parentID.longValue()); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | |
| | | debugError("File id2children has error reading key %d: %s.", |
| | | TRACER.debugError("File id2children has error reading key %d: %s.", |
| | | parentID.longValue(), e.getMessage()); |
| | | } |
| | | errorCount++; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugError("File dn2id is missing key %s.%n", |
| | | TRACER.debugError("File dn2id is missing key %s.%n", |
| | | dn.toNormalizedString()); |
| | | } |
| | | errorCount++; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | |
| | | debugError("File dn2id has error reading key %s: %s.%n", |
| | | TRACER.debugError("File dn2id has error reading key %s: %s.%n", |
| | | dn.toNormalizedString(), |
| | | e.getMessage()); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugError("File id2subtree is missing ID %d " + |
| | | TRACER.debugError("File id2subtree is missing ID %d " + |
| | | "for key %d.%n", |
| | | entryID.longValue(), id.longValue()); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | |
| | | debugError("File id2subtree has error reading key %d: %s.%n", |
| | | TRACER.debugError("File id2subtree has error reading key %d: %s.%n", |
| | | id.longValue(), e.getMessage()); |
| | | } |
| | | errorCount++; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | |
| | | debugError("Error normalizing values of attribute %s in " + |
| | | TRACER.debugError("Error normalizing values of attribute %s in " + |
| | | "entry <%s>: %s.%n", |
| | | attrIndex.getAttributeType().toString(), |
| | | entry.getDN().toString(), |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugError("Missing ID %d%n%s", |
| | | TRACER.debugError("Missing ID %d%n%s", |
| | | entryID.longValue(), |
| | | keyDump(presenceIndex, presenceKey.getData())); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | |
| | | debugError("Error reading database: %s%n%s", |
| | | TRACER.debugError("Error reading database: %s%n%s", |
| | | e.getMessage(), |
| | | keyDump(presenceIndex, presenceKey.getData())); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugError("Missing ID %d%n%s", |
| | | TRACER.debugError("Missing ID %d%n%s", |
| | | entryID.longValue(), |
| | | keyDump(equalityIndex, normalizedBytes)); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | |
| | | debugError("Error reading database: %s%n%s", |
| | | TRACER.debugError("Error reading database: %s%n%s", |
| | | e.getMessage(), |
| | | keyDump(equalityIndex, normalizedBytes)); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugError("Missing ID %d%n%s", |
| | | TRACER.debugError("Missing ID %d%n%s", |
| | | entryID.longValue(), |
| | | keyDump(substringIndex, key.getData())); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | |
| | | debugError("Error reading database: %s%n%s", |
| | | TRACER.debugError("Error reading database: %s%n%s", |
| | | e.getMessage(), |
| | | keyDump(substringIndex, key.getData())); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugError("Missing ID %d%n%s", |
| | | TRACER.debugError("Missing ID %d%n%s", |
| | | entryID.longValue(), |
| | | keyDump(orderingIndex, normalizedBytes)); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | |
| | | debugError("Error reading database: %s%n%s", |
| | | TRACER.debugError("Error reading database: %s%n%s", |
| | | e.getMessage(), |
| | | keyDump(orderingIndex, normalizedBytes)); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugError("Missing ID %d%n%s", |
| | | TRACER.debugError("Missing ID %d%n%s", |
| | | entryID.longValue(), |
| | | keyDump(orderingIndex, normalizedBytes)); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | |
| | | debugError("Error reading database: %s%n%s", |
| | | TRACER.debugError("Error reading database: %s%n%s", |
| | | e.getMessage(), |
| | | keyDump(approximateIndex, normalizedBytes)); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.BackendMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | */ |
| | | public class RecurringTask |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_RECURRINGTASK_CANNOT_LOAD_CLASS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_RECURRINGTASK_CANNOT_INSTANTIATE_CLASS_AS_TASK; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ie); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | |
| | | int msgID = MSGID_RECURRINGTASK_CANNOT_INITIALIZE_INTERNAL; |
| | |
| | | import org.opends.server.util.TimeThread; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.loggers.ErrorLogger; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.BackendMessages.*; |
| | |
| | | public abstract class Task |
| | | implements Comparable<Task> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_TASK_CANNOT_PARSE_SCHEDULED_START_TIME; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_TASK_CANNOT_PARSE_ACTUAL_START_TIME; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_TASK_CANNOT_PARSE_COMPLETION_TIME; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | setTaskState(TaskState.STOPPED_BY_ERROR); |
| | |
| | | import org.opends.server.types.SearchScope; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.BackendMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | extends Backend |
| | | implements ConfigurationChangeListener<TaskBackendCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // The current configuration state. |
| | | private TaskBackendCfg currentConfig; |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // This should never happen. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // This should never happen. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_BACKEND_CANNOT_REGISTER_BASEDN; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_TASKBE_ERROR_GETTING_BACKING_FILE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_TASKBE_ERROR_GETTING_BACKING_FILE; |
| | |
| | | import org.opends.server.util.TimeThread; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.BackendMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | implements AlertGenerator |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | /** |
| | | * The fully-qualified name of this class. |
| | | */ |
| | | private static final String CLASS_NAME = |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_TASKSCHED_ERROR_SCHEDULING_RECURRING_ITERATION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | |
| | | if (le.canContinueReading()) |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_TASKSCHED_CANNOT_SCHEDULE_TASK_FROM_ENTRY; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ioe); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ioe); |
| | | } |
| | | |
| | | int msgID = MSGID_TASKSCHED_ERROR_READING_TASK_BACKING_FILE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ioe); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ioe); |
| | | } |
| | | |
| | | int msgID = MSGID_TASKSCHED_CANNOT_CREATE_BACKING_FILE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_TASKSCHED_CANNOT_RENAME_CURRENT_BACKING_FILE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_TASKSCHED_CANNOT_RENAME_NEW_BACKING_FILE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ioe); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ioe); |
| | | } |
| | | |
| | | int msgID = MSGID_TASKSCHED_CANNOT_WRITE_BACKING_FILE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_TASKSCHED_CANNOT_WRITE_BACKING_FILE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_TASKSCHED_CANNOT_LOAD_CLASS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_TASKSCHED_CANNOT_INSTANTIATE_CLASS_AS_TASK; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ie); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | |
| | | int msgID = MSGID_TASKSCHED_CANNOT_INITIALIZE_INTERNAL; |
| | |
| | | import org.opends.server.api.DirectoryThread; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.BackendMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | public class TaskThread |
| | | extends DirectoryThread |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ie); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_TASK_EXECUTE_FAILED; |
| | |
| | | import org.opends.server.types.DebugLogLevel; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ConfigMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | |
| | | */ |
| | | public class ConfigEntry |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | conflictingChild = null; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_ENTRY_CANNOT_REMOVE_CHILD; |
| | |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ConfigMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | |
| | |
| | | public class DNConfigAttribute |
| | | extends ConfigAttribute |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | rejectReason.append(getMessage(MSGID_CONFIG_ATTR_DN_CANNOT_PARSE, |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_ATTR_DN_CANNOT_PARSE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_ATTR_DN_CANNOT_PARSE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_ATTR_DN_CANNOT_PARSE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_ATTR_DN_CANNOT_PARSE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_ATTR_DN_CANNOT_PARSE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ce); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ce); |
| | | } |
| | | |
| | | throw ce; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_ATTR_INVALID_DN_VALUE; |
| | |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ConfigMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | |
| | |
| | | public class IntegerConfigAttribute |
| | | extends ConfigAttribute |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | rejectReason.append(getMessage(MSGID_CONFIG_ATTR_INVALID_INT_VALUE, |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_ATTR_INT_COULD_NOT_PARSE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_ATTR_INT_COULD_NOT_PARSE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ce); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ce); |
| | | } |
| | | |
| | | throw ce; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_ATTR_INT_COULD_NOT_PARSE; |
| | |
| | | import org.opends.server.types.DebugLogLevel; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ConfigMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | |
| | |
| | | public class IntegerWithUnitConfigAttribute |
| | | extends ConfigAttribute |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_ATTR_COULD_NOT_PARSE_INT_COMPONENT; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | rejectReason.append(getMessage(MSGID_CONFIG_ATTR_INT_COULD_NOT_PARSE, |
| | |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.SearchScope; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ConfigMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | implements DynamicMBean, DirectoryServerMBean |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | /** |
| | | * The fully-qualified name of this class. |
| | | */ |
| | | private static final String CLASS_NAME = "org.opends.server.config.JMXMBean"; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_JMX_CANNOT_REGISTER_MBEAN; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | e.printStackTrace(); |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_JMX_CANNOT_GET_ATTRIBUTE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_JMX_ATTR_NO_ATTR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_JMX_ATTR_NO_ATTR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logError( |
| | | ErrorLogCategory.CONFIGURATION, |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_JMX_CANNOT_GET_CONFIG_ENTRY; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | logError( |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.MILD_ERROR, |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, me); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, me); |
| | | } |
| | | |
| | | throw me; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | throw new MBeanException(e); |
| | |
| | | import org.opends.server.types.DebugLogLevel; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ConfigMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | |
| | |
| | | public class MultiChoiceConfigAttribute |
| | | extends ConfigAttribute |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ce); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ce); |
| | | } |
| | | |
| | | throw ce; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_ATTR_INVALID_STRING_VALUE; |
| | |
| | | import org.opends.server.types.DebugLogLevel; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ConfigMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | |
| | |
| | | public class StringConfigAttribute |
| | | extends ConfigAttribute |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ce); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ce); |
| | | } |
| | | |
| | | throw ce; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_ATTR_INVALID_STRING_VALUE; |
| | |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.LDAPException; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.ProtocolMessages.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | public class AccountUsableResponseControl |
| | | extends Control |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ae); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ae); |
| | | } |
| | | |
| | | int msgID = MSGID_ACCTUSABLERES_DECODE_ERROR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_ACCTUSABLERES_DECODE_ERROR; |
| | |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.LDAPException; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.ProtocolMessages.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | public class EntryChangeNotificationControl |
| | | extends Control |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_ECN_CANNOT_DECODE_VALUE; |
| | |
| | | import org.opends.server.core.DirectoryServer; |
| | | import static org.opends.server.messages.ProtocolMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.getMessage; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | |
| | | import java.util.List; |
| | | import java.util.ArrayList; |
| | |
| | | * |
| | | **/ |
| | | public class GetEffectiveRights extends Control { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | //The DN representing the authzId. May be null. |
| | | private DN authzDN=null; |
| | |
| | | } |
| | | } catch (ASN1Exception e) { |
| | | if (debugEnabled()) { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_GETEFFECTIVERIGHTS_DECODE_ERROR; |
| | |
| | | throw new LDAPException(LDAPResultCode.PROTOCOL_ERROR, msgID, message); |
| | | } catch (DirectoryException de) { |
| | | if (debugEnabled()) { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_DECODE_GETEFFECTIVERIGHTS_AUTHZID_DN; |
| | |
| | | import org.opends.server.types.LDAPException; |
| | | import org.opends.server.types.SearchFilter; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.ProtocolMessages.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | public class LDAPAssertionRequestControl |
| | | extends Control |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ae); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ae); |
| | | } |
| | | |
| | | int msgID = MSGID_LDAPASSERT_INVALID_CONTROL_VALUE; |
| | |
| | | import org.opends.server.types.LDAPException; |
| | | import org.opends.server.types.ObjectClass; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.ProtocolMessages.*; |
| | |
| | | public class LDAPPostReadRequestControl |
| | | extends Control |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ae); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ae); |
| | | } |
| | | |
| | | int msgID = MSGID_POSTREADREQ_CANNOT_DECODE_VALUE; |
| | |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.LDAPException; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.ProtocolMessages.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | public class LDAPPostReadResponseControl |
| | | extends Control |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ae); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ae); |
| | | } |
| | | |
| | | int msgID = MSGID_POSTREADRESP_CANNOT_DECODE_VALUE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | |
| | | int msgID = MSGID_POSTREADRESP_CANNOT_DECODE_VALUE; |
| | |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.LDAPException; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.ProtocolMessages.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | public class LDAPPreReadRequestControl |
| | | extends Control |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ae); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ae); |
| | | } |
| | | |
| | | int msgID = MSGID_PREREADREQ_CANNOT_DECODE_VALUE; |
| | |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.LDAPException; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.ProtocolMessages.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | public class LDAPPreReadResponseControl |
| | | extends Control |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ae); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ae); |
| | | } |
| | | |
| | | int msgID = MSGID_PREREADRESP_CANNOT_DECODE_VALUE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | |
| | | int msgID = MSGID_PREREADRESP_CANNOT_DECODE_VALUE; |
| | |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.LDAPException; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.ProtocolMessages.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | public class MatchedValuesControl |
| | | extends Control |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_MATCHEDVALUES_CANNOT_DECODE_VALUE_AS_SEQUENCE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | import org.opends.server.types.RawFilter; |
| | | import org.opends.server.util.Validator; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.ProtocolMessages.*; |
| | |
| | | */ |
| | | public class MatchedValuesFilter |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_MVFILTER_CANNOT_DECODE_AVA; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_MVFILTER_CANNOT_DECODE_SUBSTRINGS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_MVFILTER_CANNOT_DECODE_PRESENT_TYPE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_MVFILTER_CANNOT_DECODE_EXTENSIBLE_MATCH; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | normalizedSubAny = null; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | return false; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | return false; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | return false; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | return false; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | return false; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | return false; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | return false; |
| | |
| | | */ |
| | | package org.opends.server.controls; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.ProtocolMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.getMessage; |
| | |
| | | */ |
| | | public class PagedResultsControl extends Control |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_LDAP_PAGED_RESULTS_DECODE_SEQUENCE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_LDAP_PAGED_RESULTS_DECODE_SIZE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_LDAP_PAGED_RESULTS_DECODE_COOKIE; |
| | |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.LDAPException; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.ProtocolMessages.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | public class PasswordExpiringControl |
| | | extends Control |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PWEXPIRING_CANNOT_DECODE_SECONDS_UNTIL_EXPIRATION; |
| | |
| | | import org.opends.server.types.Control; |
| | | import org.opends.server.types.LDAPException; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.ProtocolMessages.*; |
| | |
| | | public class PasswordPolicyResponseControl |
| | | extends Control |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ae); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ae); |
| | | } |
| | | |
| | | int msgID = MSGID_PWPOLICYRES_DECODE_ERROR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PWPOLICYRES_DECODE_ERROR; |
| | |
| | | import org.opends.server.types.Control; |
| | | import org.opends.server.types.LDAPException; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.ProtocolMessages.*; |
| | |
| | | public class PersistentSearchControl |
| | | extends Control |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PSEARCH_CANNOT_DECODE_VALUE; |
| | |
| | | import org.opends.server.types.LockManager; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.ProtocolMessages.*; |
| | |
| | | public class ProxiedAuthV1Control |
| | | extends Control |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PROXYAUTH1_CANNOT_DECODE_VALUE; |
| | |
| | | import org.opends.server.types.LockManager; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.ProtocolMessages.*; |
| | |
| | | public class ProxiedAuthV2Control |
| | | extends Control |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ae); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ae); |
| | | } |
| | | |
| | | int msgID = MSGID_PROXYAUTH2_CANNOT_DECODE_VALUE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PROXYAUTH2_CANNOT_DECODE_VALUE; |
| | |
| | | */ |
| | | package org.opends.server.core; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ConfigMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | public final class AccessControlConfigManager |
| | | implements AlertGenerator |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // Fully qualified class name. |
| | | private static final String CLASS_NAME = |
| | | "org.opends.server.core.AccessControlConfigManager"; |
| | |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_AUTHZ_UNABLE_TO_INSTANTIATE_HANDLER; |
| | |
| | | } catch (ClassNotFoundException e) { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_AUTHZ_UNABLE_TO_LOAD_CLASS; |
| | |
| | | } catch (ClassCastException e) { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_AUTHZ_BAD_CLASS; |
| | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.core.CoreConstants.*; |
| | | import static org.opends.server.loggers.AccessLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.CoreMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | implements PreParseAddOperation, PreOperationAddOperation, |
| | | PostOperationAddOperation, PostResponseAddOperation |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // The set of response controls to send to the client. |
| | | private ArrayList<Control> responseControls; |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | logError(ErrorLogCategory.SYNCHRONIZATION, |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | break; |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_ADD_INVALID_PWPOLICY_DN_SYNTAX; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResponseData(de); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | |
| | | setResultCode(ResultCode.valueOf(le.getResultCode())); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(ResultCode.PROTOCOL_ERROR); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | |
| | | setResultCode(ResultCode.valueOf(le.getResultCode())); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | |
| | | setResultCode(ResultCode.valueOf(le.getResultCode())); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | |
| | | setResultCode(ResultCode.valueOf(le.getResultCode())); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | logError(ErrorLogCategory.SYNCHRONIZATION, |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, coe); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, coe); |
| | | } |
| | | |
| | | CancelResult cancelResult = coe.getCancelResult(); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | logError(ErrorLogCategory.SYNCHRONIZATION, |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_ADD_ERROR_NOTIFYING_CHANGE_LISTENER; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_ADD_ERROR_NOTIFYING_PERSISTENT_SEARCH; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigConstants; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import org.opends.server.types.*; |
| | | import static org.opends.server.loggers.ErrorLogger.logError; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ConfigMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.getMessage; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | |
| | | ConfigurationAddListener<BackendCfg>, |
| | | ConfigurationDeleteListener<BackendCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_BACKEND_CANNOT_GET_CONFIG_BASE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_BACKEND_CANNOT_INSTANTIATE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_BACKEND_CANNOT_ACQUIRE_SHARED_LOCK; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_BACKEND_CANNOT_INITIALIZE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e2); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | |
| | | msgID = MSGID_CONFIG_BACKEND_CANNOT_RELEASE_SHARED_LOCK; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_BACKEND_CANNOT_REGISTER_BACKEND; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | unacceptableReason.add(de.getMessage()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | unacceptableReason.add(de.getMessage()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_BACKEND_CANNOT_INSTANTIATE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e2); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_BACKEND_CANNOT_RELEASE_SHARED_LOCK; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_BACKEND_UNABLE_TO_DETERMINE_ENABLED_STATE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_BACKEND_CANNOT_INSTANTIATE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_BACKEND_CANNOT_ACQUIRE_SHARED_LOCK; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_BACKEND_CANNOT_INITIALIZE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e2); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | |
| | | msgID = MSGID_CONFIG_BACKEND_CANNOT_RELEASE_SHARED_LOCK; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_BACKEND_CANNOT_REGISTER_BACKEND; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_BACKEND_CANNOT_INSTANTIATE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_BACKEND_CANNOT_INSTANTIATE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_BACKEND_CANNOT_ACQUIRE_SHARED_LOCK; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_BACKEND_CANNOT_INITIALIZE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e2); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | |
| | | msgID = MSGID_CONFIG_BACKEND_CANNOT_RELEASE_SHARED_LOCK; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_BACKEND_CANNOT_REGISTER_BACKEND; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e2); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_BACKEND_CANNOT_RELEASE_SHARED_LOCK; |
| | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.core.CoreConstants.*; |
| | | import static org.opends.server.loggers.AccessLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.CoreMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | implements PreParseBindOperation, PreOperationBindOperation, |
| | | PostOperationBindOperation, PostResponseBindOperation |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // The credentials used for SASL authentication. |
| | | private ASN1OctetString saslCredentials; |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(ResultCode.INVALID_CREDENTIALS); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(ResultCode.INVALID_CREDENTIALS); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_BIND_CANNOT_PROCESS_USER_SIZE_LIMIT; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_BIND_CANNOT_PROCESS_USER_TIME_LIMIT; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_BIND_OPERATION_PASSWORD_VALIDATION_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResponseData(de); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_BIND_CANNOT_PROCESS_USER_SIZE_LIMIT; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_BIND_CANNOT_PROCESS_USER_TIME_LIMIT; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResponseData(de); |
| | |
| | | |
| | | import static org.opends.server.core.CoreConstants.*; |
| | | import static org.opends.server.loggers.AccessLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.CoreMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | implements PreParseCompareOperation, PreOperationCompareOperation, |
| | | PostOperationCompareOperation, PostResponseCompareOperation |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // The attribute type for this compare operation. |
| | | private AttributeType attributeType; |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | break; |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | |
| | | setResultCode(ResultCode.valueOf(le.getResultCode())); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(ResultCode.PROTOCOL_ERROR); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | |
| | | setResultCode(ResultCode.valueOf(le.getResultCode())); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | |
| | | setResultCode(ResultCode.valueOf(le.getResultCode())); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ConfigMessages.*; |
| | | import static org.opends.server.messages.CoreMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.getMessage; |
| | |
| | | ConfigurationAddListener<ConnectionHandlerCfg>, |
| | | ConfigurationDeleteListener<ConnectionHandlerCfg>, |
| | | ConfigurationChangeListener<ConnectionHandlerCfg> { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | // The mapping between configuration entry DNs and their |
| | | // corresponding connection handler implementations. |
| | |
| | | } catch (ConfigException e) { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | messages.add(e.getMessage()); |
| | |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_CONNHANDLER_CANNOT_INITIALIZE; |
| | |
| | | } catch (ConfigException e) { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | messages.add(e.getMessage()); |
| | |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_CONNHANDLER_CANNOT_INITIALIZE; |
| | |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_CONNHANDLER_CANNOT_INITIALIZE; |
| | |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_CONNHANDLER_CANNOT_INITIALIZE; |
| | |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_CONNHANDLER_CANNOT_INITIALIZE; |
| | |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_CONNHANDLER_CANNOT_INITIALIZE; |
| | |
| | | import org.opends.server.types.WritabilityMode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ConfigMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | public class CoreConfigManager |
| | | implements ConfigurableComponent |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | // error message and use the default. |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR, |
| | |
| | | // error message and use the default. |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR, |
| | |
| | | // error message and use the default. |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR, |
| | |
| | | // error message and use the default. |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR, |
| | |
| | | // error message and use the default. |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR, |
| | |
| | | // error message and use the default. |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR, |
| | |
| | | // error message and use the default. |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR, |
| | |
| | | // error message and use the default. |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR, |
| | |
| | | // error message and use the default. |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR, |
| | |
| | | // error message and use the default. |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR, |
| | |
| | | // error message and use the default. |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR, |
| | |
| | | // error message and use the default. |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR, |
| | |
| | | // error message and use the default. |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR, |
| | |
| | | // error message and use the default. |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR, |
| | |
| | | // error message and use the default. |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR, |
| | |
| | | // error message and use the default. |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR, |
| | | MSGID_CONFIG_CORE_REJECT_UNAUTHENTICATED_REQUESTS_INVALID, |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.MILD_ERROR, |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred. Log a message and continue. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred. Log a message and continue. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred. Log a message and continue. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred. Log a message and continue. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred. Log a message and continue. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred. Log a message and continue. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred. Log a message and continue. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred. Log a message and continue. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred. Log a message and continue. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred. Log a message and continue. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred. Log a message and continue. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred. Log a message and continue. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred. Log a message and continue. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred. Log a message and continue. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred, so the provided value must not be valid. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred, so the provided value must not be valid. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred, so the provided value must not be valid. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred, so the provided value must not be valid. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred, so the provided value must not be valid. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred, so the provided value must not be valid. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred, so the provided value must not be valid. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred, so the provided value must not be valid. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred, so the provided value must not be valid. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred, so the provided value must not be valid. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred, so the provided value must not be valid. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred, so the provided value must not be valid. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred, so the provided value must not be valid. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred, so the provided value must not be valid. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred, so the provided value must not be valid. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred, so we will not allow this configuration change to |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred, so we will not allow this configuration change to |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred, so we will not allow this configuration change to |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred, so we will not allow this configuration change to |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred, so we will not allow this configuration change to |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred, so we will not allow this configuration change to |
| | |
| | | // error message and use the default. |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | if (resultCode == ResultCode.SUCCESS) |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred, so we will not allow this configuration change to |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred, so we will not allow this configuration change to |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred, so we will not allow this configuration change to |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred, so we will not allow this configuration change to |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred, so we will not allow this configuration change to |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred, so we will not allow this configuration change to |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred, so we will not allow this configuration change to |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred, so we will not allow this configuration change to |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An error occurred, so we will not allow this configuration change to |
| | |
| | | |
| | | import static org.opends.server.core.CoreConstants.*; |
| | | import static org.opends.server.loggers.AccessLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.CoreMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | implements PreParseDeleteOperation, PreOperationDeleteOperation, |
| | | PostOperationDeleteOperation, PostResponseDeleteOperation |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | logError(ErrorLogCategory.SYNCHRONIZATION, |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | |
| | | setResultCode(ResultCode.valueOf(le.getResultCode())); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(ResultCode.PROTOCOL_ERROR); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | |
| | | setResultCode(ResultCode.valueOf(le.getResultCode())); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | |
| | | setResultCode(ResultCode.valueOf(le.getResultCode())); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | |
| | | setResultCode(ResultCode.valueOf(le.getResultCode())); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | logError(ErrorLogCategory.SYNCHRONIZATION, |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, coe); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, coe); |
| | | } |
| | | |
| | | CancelResult cancelResult = coe.getCancelResult(); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | logError(ErrorLogCategory.SYNCHRONIZATION, |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_DELETE_ERROR_NOTIFYING_CHANGE_LISTENER; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_DELETE_ERROR_NOTIFYING_PERSISTENT_SEARCH; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | import org.opends.server.util.args.StringArgument; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.AccessLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.TextDebugLogPublisher; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.CoreMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | |
| | | public class DirectoryServer |
| | | implements Thread.UncaughtExceptionHandler, AlertGenerator |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | /** |
| | | * The fully-qualified name of this class. |
| | | */ |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_CREATE_MBEAN_SERVER; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_LOAD_CONFIG_HANDLER_CLASS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_INSTANTIATE_CONFIG_HANDLER; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ie); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | |
| | | throw ie; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_INITIALIZE_CONFIG_HANDLER; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_ACQUIRE_EXCLUSIVE_SERVER_LOCK; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_SYNTAX; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_SYNTAX; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_SYNTAX; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_SYNTAX; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_SYNTAX; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_SYNTAX; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_SYNTAX; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_SYNTAX; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_SYNTAX; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_SYNTAX; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_SYNTAX; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ie); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | |
| | | throw ie; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_INITIALIZE_CONFIG_HANDLER; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_GET_ROOT_DSE_CONFIG_ENTRY; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | // This should never happen. |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_WORKQ_CANNOT_PARSE_DN; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_WORKQ_CANNOT_LOAD; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_WORKQ_CANNOT_INSTANTIATE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e2); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | |
| | | msgID = MSGID_SHUTDOWN_CANNOT_RELEASE_SHARED_BACKEND_LOCK; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_CANNOT_RELEASE_EXCLUSIVE_SERVER_LOCK; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // This could theoretically happen if an alert needs to be sent before the |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, exception); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, exception); |
| | | } |
| | | |
| | | int msgID = MSGID_UNCAUGHT_THREAD_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_ACQUIRE_EXCLUSIVE_SERVER_LOCK; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ie); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | |
| | | int msgID = MSGID_DSCORE_CANNOT_BOOTSTRAP; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ie); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | |
| | | int msgID = MSGID_DSCORE_CANNOT_START; |
| | |
| | | |
| | | import org.opends.server.api.DirectoryThread; |
| | | |
| | | import org.opends.server.loggers.debug.DebugLogger; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.CoreMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | |
| | |
| | | extends DirectoryThread |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | /** |
| | | * The fully-qualified name of this class. |
| | | */ |
| | | private static final String CLASS_NAME = |
| | |
| | | */ |
| | | public void run() |
| | | { |
| | | DebugLogger.debugInfo( |
| | | TRACER.debugInfo( |
| | | "Directory Server shutdown hook has been invoked."); |
| | | |
| | | DirectoryServer.shutDown(CLASS_NAME, |
| | |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.config.ConfigException; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ConfigMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | |
| | | ConfigurationAddListener <EntryCacheCfg>, |
| | | ConfigurationDeleteListener <EntryCacheCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // The current entry cache registered in the server |
| | | private EntryCache _entryCache = null; |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_ENTRYCACHE_CANNOT_INSTALL_DEFAULT_CACHE; |
| | |
| | | |
| | | import static org.opends.server.core.CoreConstants.*; |
| | | import static org.opends.server.loggers.AccessLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.CoreMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | implements PreParseExtendedOperation, PreOperationExtendedOperation, |
| | | PostOperationExtendedOperation, PostResponseExtendedOperation |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.ConfigMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.getMessage; |
| | |
| | | ConfigurationAddListener<ExtendedOperationHandlerCfg>, |
| | | ConfigurationDeleteListener<ExtendedOperationHandlerCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | } catch (ConfigException e) { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | messages.add(e.getMessage()); |
| | |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_EXTOP_INITIALIZATION_FAILED; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | messages.add(e.getMessage()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_EXTOP_INITIALIZATION_FAILED; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_EXTOP_INVALID_CLASS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_EXTOP_INVALID_CLASS; |
| | |
| | | import org.opends.server.types.operation.PostResponseModifyDNOperation; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ConfigMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | implements ConfigChangeListener, ConfigAddListener, ConfigDeleteListener, |
| | | BackendInitializationListener, ChangeNotificationListener |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_GROUP_CANNOT_GET_BASE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_GROUP_INVALID_CLASS_NAME; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_GROUP_INVALID_CLASS_NAME; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_GROUP_INVALID_CLASS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_GROUP_INVALID_ENABLED_VALUE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_GROUP_INVALID_ENABLED_VALUE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_GROUP_INVALID_CLASS_NAME; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_GROUP_INVALID_CLASS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_GROUP_INITIALIZATION_FAILED; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_GROUP_INVALID_CLASS_NAME; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_GROUP_INVALID_CLASS_NAME; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_GROUP_INVALID_CLASS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_GROUP_INVALID_ENABLED_VALUE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_GROUP_INVALID_ENABLED_VALUE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_GROUP_INVALID_CLASS_NAME; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_GROUP_INVALID_CLASS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_GROUP_INITIALIZATION_FAILED; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // FIXME -- Is there anything that we need to do here? |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // FIXME -- Is there anything that we need to do here? |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // FIXME -- Is there anything that we need to do here? |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // FIXME -- Handle this. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // FIXME -- Do we need to do anything else? |
| | |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ConfigMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | public class KeyManagerProviderConfigManager |
| | | implements ConfigChangeListener, ConfigAddListener, ConfigDeleteListener |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_KEYMANAGER_CANNOT_GET_BASE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_KEYMANAGER_INVALID_CLASS_NAME; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_KEYMANAGER_INVALID_CLASS_NAME; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_KEYMANAGER_INVALID_CLASS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_KEYMANAGER_INVALID_ENABLED_VALUE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_KEYMANAGER_INVALID_ENABLED_VALUE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_KEYMANAGER_INVALID_CLASS_NAME; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_KEYMANAGER_INVALID_CLASS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_KEYMANAGER_INITIALIZATION_FAILED; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_KEYMANAGER_INVALID_CLASS_NAME; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_KEYMANAGER_INVALID_CLASS_NAME; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_KEYMANAGER_INVALID_CLASS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_KEYMANAGER_INVALID_ENABLED_VALUE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_KEYMANAGER_INVALID_ENABLED_VALUE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_KEYMANAGER_INVALID_CLASS_NAME; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_KEYMANAGER_INVALID_CLASS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_KEYMANAGER_INITIALIZATION_FAILED; |
| | |
| | | |
| | | import org.opends.server.api.Backend; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.CoreMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | */ |
| | | public class LockFileManager |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_FILELOCKER_LOCK_SHARED_FAILED_CREATE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_FILELOCKER_LOCK_SHARED_FAILED_OPEN; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_FILELOCKER_LOCK_SHARED_FAILED_LOCK; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_FILELOCKER_LOCK_EXCLUSIVE_FAILED_CREATE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_FILELOCKER_LOCK_EXCLUSIVE_FAILED_OPEN; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_FILELOCKER_LOCK_EXCLUSIVE_FAILED_LOCK; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_FILELOCKER_UNLOCK_EXCLUSIVE_FAILED_RELEASE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // Even though we couldn't close the channel for some reason, this |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_FILELOCKER_UNLOCK_SHARED_FAILED_RELEASE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // Even though we couldn't close the channel for some reason, this |
| | |
| | | import org.opends.server.loggers.RetentionPolicy; |
| | | import org.opends.server.config.ConfigException; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.MessageHandler.getMessage; |
| | | import static org.opends.server.messages.ConfigMessages.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | |
| | | ConfigurationDeleteListener<LogRetentionPolicyCfg>, |
| | | ConfigurationChangeListener<LogRetentionPolicyCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | /** |
| | | * Initializes all the log retention policies. |
| | |
| | | catch (ConfigException e) { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | messages.add(e.getMessage()); |
| | | resultCode = DirectoryServer.getServerErrorResultCode(); |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | int msgID = MSGID_CONFIG_RETENTION_POLICY_CANNOT_CREATE_POLICY; |
| | | messages.add(getMessage(msgID, String.valueOf(config.dn().toString()), |
| | |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.config.ConfigException; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.MessageHandler.getMessage; |
| | | import static org.opends.server.messages.ConfigMessages.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | |
| | | ConfigurationDeleteListener<LogRotationPolicyCfg>, |
| | | ConfigurationChangeListener<LogRotationPolicyCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | /** |
| | | * Initializes all the log rotation policies. |
| | |
| | | catch (ConfigException e) { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | messages.add(e.getMessage()); |
| | | resultCode = DirectoryServer.getServerErrorResultCode(); |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | int msgID = MSGID_CONFIG_ROTATION_POLICY_CANNOT_CREATE_POLICY; |
| | | messages.add(getMessage(msgID, String.valueOf(config.dn().toString()), |
| | |
| | | |
| | | import static org.opends.server.core.CoreConstants.*; |
| | | import static org.opends.server.loggers.AccessLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.CoreMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | implements PreParseModifyDNOperation, PreOperationModifyDNOperation, |
| | | PostOperationModifyDNOperation, PostResponseModifyDNOperation |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // Indicates whether to delete the old RDN value from the entry. |
| | | private boolean deleteOldRDN; |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | LockManager.unlock(entryDN, currentLock); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | break; |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | logError(ErrorLogCategory.SYNCHRONIZATION, |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | |
| | | setResultCode(ResultCode.valueOf(le.getResultCode())); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(ResultCode.PROTOCOL_ERROR); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | |
| | | setResultCode(ResultCode.valueOf(le.getResultCode())); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | |
| | | setResultCode(ResultCode.valueOf(le.getResultCode())); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | |
| | | setResultCode(ResultCode.valueOf(le.getResultCode())); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | |
| | | setResultCode(ResultCode.valueOf(le.getResultCode())); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | setResultCode(ResultCode.CONSTRAINT_VIOLATION); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | setResultCode(ResultCode.CONSTRAINT_VIOLATION); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | logError(ErrorLogCategory.SYNCHRONIZATION, |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, coe); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, coe); |
| | | } |
| | | |
| | | CancelResult cancelResult = coe.getCancelResult(); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | logError(ErrorLogCategory.SYNCHRONIZATION, |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_MODDN_ERROR_NOTIFYING_CHANGE_LISTENER; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_MODDN_ERROR_NOTIFYING_PERSISTENT_SEARCH; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.core.CoreConstants.*; |
| | | import static org.opends.server.loggers.AccessLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.CoreMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.getMessage; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | implements PreParseModifyOperation, PreOperationModifyOperation, |
| | | PostOperationModifyOperation, PostResponseModifyOperation |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // The raw, unprocessed entry DN as included by the client request. |
| | | private ByteString rawEntryDN; |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | |
| | | setResultCode(ResultCode.valueOf(le.getResultCode())); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | break; |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | |
| | | setResultCode(ResultCode.valueOf(le.getResultCode())); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(ResultCode.PROTOCOL_ERROR); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | |
| | | setResultCode(ResultCode.valueOf(le.getResultCode())); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | |
| | | setResultCode(ResultCode.valueOf(le.getResultCode())); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | |
| | | setResultCode(ResultCode.valueOf(le.getResultCode())); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | |
| | | setResultCode(ResultCode.valueOf(le.getResultCode())); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | logError(ErrorLogCategory.SYNCHRONIZATION, |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResponseData(de); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResponseData(de); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | setResultCode(ResultCode.INVALID_ATTRIBUTE_SYNTAX); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | setResultCode(ResultCode.INVALID_ATTRIBUTE_SYNTAX); |
| | |
| | | } catch (DirectoryException e) { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | setResponseData(e); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | logError(ErrorLogCategory.SYNCHRONIZATION, |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, coe); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, coe); |
| | | } |
| | | |
| | | CancelResult cancelResult = coe.getCancelResult(); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | logError(ErrorLogCategory.SYNCHRONIZATION, |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_MODIFY_ERROR_NOTIFYING_CHANGE_LISTENER; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_MODIFY_ERROR_NOTIFYING_PERSISTENT_SEARCH; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ConfigMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | public class MonitorConfigManager |
| | | implements ConfigChangeListener, ConfigAddListener, ConfigDeleteListener |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_MONITOR_CANNOT_GET_BASE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_MONITOR_INVALID_CLASS_NAME; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_MONITOR_INVALID_CLASS_NAME; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_MONITOR_INVALID_CLASS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_MONITOR_INVALID_ENABLED_VALUE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_MONITOR_INVALID_ENABLED_VALUE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_MONITOR_INVALID_CLASS_NAME; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_MONITOR_INVALID_CLASS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_MONITOR_INITIALIZATION_FAILED; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_MONITOR_INVALID_CLASS_NAME; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_MONITOR_INVALID_CLASS_NAME; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_MONITOR_INVALID_CLASS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_MONITOR_INVALID_ENABLED_VALUE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_MONITOR_INVALID_ENABLED_VALUE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_MONITOR_INVALID_CLASS_NAME; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_MONITOR_INVALID_CLASS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_MONITOR_INITIALIZATION_FAILED; |
| | |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.CoreMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | */ |
| | | public class PasswordPolicy |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // The DN of the entry containing the configuration for this password |
| | | // policy. |
| | | private final DN configEntryDN; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_PASSWORD_ATTRIBUTE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_DEFAULT_STORAGE_SCHEMES; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_DEPRECATED_STORAGE_SCHEMES; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_PASSWORD_VALIDATORS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_NOTIFICATION_HANDLERS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_PASSWORD_GENERATOR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_REQUIRE_CHANGE_BY_TIME; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_LAST_LOGIN_TIME_ATTR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_PWPOLICY_INVALID_LAST_LOGIN_TIME_FORMAT; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_LAST_LOGIN_TIME_FORMAT; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_PWPOLICY_INVALID_PREVIOUS_LAST_LOGIN_TIME_FORMAT; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_PREVIOUS_LAST_LOGIN_TIME_FORMAT; |
| | |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.CoreMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.getMessage; |
| | |
| | | public class PasswordPolicyConfig |
| | | implements ConfigurationChangeListener<PasswordPolicyCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | /** |
| | | * The password policy object corresponding to the configuration entry. The |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ce); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ce); |
| | | } |
| | | |
| | | unacceptableReasons.add(ce.getMessage()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ie); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | |
| | | unacceptableReasons.add(ie.getMessage()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ce); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ce); |
| | | } |
| | | ArrayList<String> messages = new ArrayList<String>(); |
| | | messages.add(ce.getMessage()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ie); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | ArrayList<String> messages = new ArrayList<String>(); |
| | | messages.add(ie.getMessage()); |
| | |
| | | import org.opends.server.util.TimeThread; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugInfo; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugWarning; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugError; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.CoreMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | */ |
| | | public class PasswordPolicyState |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | // The user entry with which this state information is associated. |
| | |
| | | |
| | | if (debug) |
| | | { |
| | | debugWarning("Could not determine password changed time for user %s.", |
| | | userDNString); |
| | | TRACER.debugWarning("Could not determine password changed time for " + |
| | | "user %s.", userDNString); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | if (debug) |
| | | { |
| | | debugError("Could not parse password policy subentry DN %s " + |
| | | "for user %s: %s", |
| | | TRACER.debugError("Could not parse password policy subentry " + |
| | | "DN %s for user %s: %s", |
| | | v.getStringValue(), userDNString, |
| | | stackTraceToSingleLineString(e)); |
| | | } |
| | |
| | | { |
| | | if (debug) |
| | | { |
| | | debugError("Password policy subentry %s for user %s " + |
| | | TRACER.debugError("Password policy subentry %s for user %s " + |
| | | "is not defined in the Directory Server.", |
| | | String.valueOf(subentryDN), userDNString); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Using password policy subentry %s for user %s.", |
| | | TRACER.debugInfo("Using password policy subentry %s for user %s.", |
| | | String.valueOf(subentryDN), userDNString); |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Using the default password policy for user %s", |
| | | TRACER.debugInfo("Using the default password policy for user %s", |
| | | userDNString); |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning null because attribute %s does not " + |
| | | TRACER.debugInfo("Returning null because attribute %s does not " + |
| | | "exist in user entry %s", |
| | | attributeType.getNameOrOID(), userDNString); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning value %s for user %s", |
| | | TRACER.debugInfo("Returning value %s for user %s", |
| | | stringValue, userDNString); |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | if (debug) |
| | | { |
| | | debugWarning("Unable to decode value %s for attribute %s " + |
| | | TRACER.debugWarning("Unable to decode value %s for attribute %s " + |
| | | "in user entry %s: %s", |
| | | v.getStringValue(), attributeType.getNameOrOID(), |
| | | userDNString, stackTraceToSingleLineString(e)); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning -1 because attribute %s does not " + |
| | | TRACER.debugInfo("Returning -1 because attribute %s does not " + |
| | | "exist in user entry %s", |
| | | attributeType.getNameOrOID(), userDNString); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | if (debug) |
| | | { |
| | | debugWarning("Unable to decode value %s for attribute %s" + |
| | | TRACER.debugWarning("Unable to decode value %s for attribute %s" + |
| | | "in user entry %s: %s", |
| | | v.getStringValue(), attributeType.getNameOrOID(), |
| | | userDNString, stackTraceToSingleLineString(e)); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning an empty list because attribute %s " + |
| | | TRACER.debugInfo("Returning an empty list because attribute %s " + |
| | | "does not exist in user entry %s", |
| | | attributeType.getNameOrOID(), userDNString); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Attribute %s resolves to true for user entry %s", |
| | | attributeType.getNameOrOID(), userDNString); |
| | | TRACER.debugInfo("Attribute %s resolves to true for user entry " + |
| | | "%s", attributeType.getNameOrOID(), userDNString); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Attribute %s resolves to false for user entry %s", |
| | | attributeType.getNameOrOID(), userDNString); |
| | | TRACER.debugInfo("Attribute %s resolves to false for user " + |
| | | "entry %s", attributeType.getNameOrOID(), userDNString); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | if (debug) |
| | | { |
| | | debugError("Unable to resolve value %s for attribute %s " + |
| | | TRACER.debugError("Unable to resolve value %s for attribute %s " + |
| | | "in user entry %s as a Boolean.", |
| | | valueString, attributeType.getNameOrOID(), |
| | | userDNString); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning %s because attribute %s does not exist " + |
| | | TRACER.debugInfo("Returning %s because attribute %s does not exist " + |
| | | "in user entry %s", |
| | | ConditionResult.UNDEFINED.toString(), |
| | | attributeType.getNameOrOID(), userDNString); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Setting password changed time for user %s to current time " + |
| | | "of %d", userDNString, currentTime); |
| | | TRACER.debugInfo("Setting password changed time for user %s to " + |
| | | "current time of %d", userDNString, currentTime); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning stored result of %b for user %s", |
| | | TRACER.debugInfo("Returning stored result of %b for user %s", |
| | | (isDisabled == ConditionResult.TRUE), userDNString); |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | isDisabled = ConditionResult.TRUE; |
| | | if (debug) |
| | | { |
| | | debugWarning("User %s is considered administratively disabled " + |
| | | "because an error occurred while attempting to make " + |
| | | "the determination: %s.", |
| | | TRACER.debugWarning("User %s is considered administratively " + |
| | | "disabled because an error occurred while attempting to make " + |
| | | "the determination: %s.", |
| | | userDNString, stackTraceToSingleLineString(e)); |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("User %s is not administratively disabled since the" + |
| | | " attribute \"%s\" is not present in the entry.", |
| | | TRACER.debugInfo("User %s is not administratively disabled since " + |
| | | "the attribute \"%s\" is not present in the entry.", |
| | | userDNString, OP_ATTR_ACCOUNT_DISABLED); |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("User %s %s administratively disabled.", |
| | | TRACER.debugInfo("User %s %s administratively disabled.", |
| | | userDNString, |
| | | ((isDisabled == ConditionResult.TRUE) ? " is" : " is not")); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Updating user %s to set the disabled flag to %b", |
| | | TRACER.debugInfo("Updating user %s to set the disabled flag to %b", |
| | | userDNString, isDisabled); |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning stored result of %b for user %s", |
| | | TRACER.debugInfo("Returning stored result of %b for user %s", |
| | | (isAccountExpired == ConditionResult.TRUE), userDNString); |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | isAccountExpired = ConditionResult.TRUE; |
| | | if (debug) |
| | | { |
| | | debugWarning("User %s is considered to have an expired account " + |
| | | "because an error occurred while attempting to make " + |
| | | TRACER.debugWarning("User %s is considered to have an expired " + |
| | | "account because an error occurred while attempting to make " + |
| | | "the determination: %s.", |
| | | userDNString, stackTraceToSingleLineString(e)); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("The account for user %s is not expired because the " + |
| | | "expiration time has not yet arrived.", userDNString); |
| | | TRACER.debugInfo("The account for user %s is not expired because " + |
| | | "the expiration time has not yet arrived.", userDNString); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("The account for user %s is expired because the " + |
| | | TRACER.debugInfo("The account for user %s is expired because the " + |
| | | "expiration time in that account has passed.", userDNString); |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("The account for user %s is not expired because " + |
| | | TRACER.debugInfo("The account for user %s is not expired because " + |
| | | "there is no expiration time in the user's entry.", |
| | | userDNString); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning stored auth failure time list of %d " + |
| | | TRACER.debugInfo("Returning stored auth failure time list of %d " + |
| | | "elements for user %s" + |
| | | authFailureTimes.size(), userDNString); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | if (debug) |
| | | { |
| | | debugWarning("Error while processing auth failure times " + |
| | | TRACER.debugWarning("Error while processing auth failure times " + |
| | | "for user %s: %s", |
| | | userDNString, stackTraceToSingleLineString(e)); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning an empty auth failure time list for user %s" + |
| | | " because the attribute is absent from the entry.", |
| | | TRACER.debugInfo("Returning an empty auth failure time list for " + |
| | | "user %s because the attribute is absent from the entry.", |
| | | userDNString); |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Removing expired auth failure time %d for user %s", |
| | | l, userDNString); |
| | | TRACER.debugInfo("Removing expired auth failure time %d for " + |
| | | "user %s", l, userDNString); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning auth failure time list of %d elements for user %s", |
| | | authFailureTimes.size(), userDNString); |
| | | TRACER.debugInfo("Returning auth failure time list of %d elements " + |
| | | "for user %s", authFailureTimes.size(), userDNString); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Updating authentication failure times for user %s", |
| | | TRACER.debugInfo("Updating authentication failure times for user %s", |
| | | userDNString); |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Locking user account %s due to too many failures.", |
| | | TRACER.debugInfo("Locking user account %s due to too many failures.", |
| | | userDNString); |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Clearing authentication failure times for user %s", |
| | | TRACER.debugInfo("Clearing authentication failure times for user %s", |
| | | userDNString); |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | failureLockedTime = currentTime; |
| | | if (debug) |
| | | { |
| | | debugWarning("Returning current time for user %s because an error " + |
| | | "occurred: %s", |
| | | TRACER.debugWarning("Returning current time for user %s because an " + |
| | | "error occurred: %s", |
| | | userDNString, stackTraceToSingleLineString(e)); |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Clearing failure lockout time for user %s.", userDNString); |
| | | TRACER.debugInfo("Clearing failure lockout time for user %s.", |
| | | userDNString); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning false for user %s because lockout due to " + |
| | | "failures is not enabled.", userDNString); |
| | | TRACER.debugInfo("Returning false for user %s because lockout due " + |
| | | "to failures is not enabled.", userDNString); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning false for user %s because there is no " + |
| | | "locked time.", userDNString); |
| | | TRACER.debugInfo("Returning false for user %s because there is " + |
| | | "no locked time.", userDNString); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Locking user %s because there were enough existing " + |
| | | "failures even though there was no account locked time.", |
| | | TRACER.debugInfo("Locking user %s because there were enough " + |
| | | "existing failures even though there was no account locked time.", |
| | | userDNString); |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning true for user %s because there is a locked " + |
| | | "time and the lockout duration has not been reached.", |
| | | TRACER.debugInfo("Returning true for user %s because there is a " + |
| | | "locked time and the lockout duration has not been reached.", |
| | | userDNString); |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning false for user %s " + |
| | | TRACER.debugInfo("Returning false for user %s " + |
| | | "because the existing lockout has expired.", userDNString); |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning true for user %s " + |
| | | TRACER.debugInfo("Returning true for user %s " + |
| | | "because there is a locked time and no lockout duration.", |
| | | userDNString); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning stored last login time of %d for user %s.", |
| | | lastLoginTime, userDNString); |
| | | TRACER.debugInfo("Returning stored last login time of %d for " + |
| | | "user %s.", lastLoginTime, userDNString); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning -1 for user %s because no last login time " + |
| | | "will be maintained.", userDNString); |
| | | TRACER.debugInfo("Returning -1 for user %s because no last login " + |
| | | "time will be maintained.", userDNString); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning last login time of %d for user %s" + |
| | | TRACER.debugInfo("Returning last login time of %d for user %s" + |
| | | "decoded using current last login time format.", |
| | | lastLoginTime, userDNString); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // This could mean that the last login time was encoded using a |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning last login time of %d for user %s" + |
| | | "decoded using previous last login time format of %s.", |
| | | lastLoginTime, userDNString, f); |
| | | TRACER.debugInfo("Returning last login time of %d for " + |
| | | "user %s decoded using previous last login time format " + |
| | | "of %s.", lastLoginTime, userDNString, f); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | assert lastLoginTime == -1; |
| | | if (debug) |
| | | { |
| | | debugWarning("Returning -1 for user %s because the last login " + |
| | | "time value %s could not be parsed using any known format.", |
| | | userDNString, valueString); |
| | | TRACER.debugWarning("Returning -1 for user %s because the " + |
| | | "last login time value %s could not be parsed using any " + |
| | | "known format.", userDNString, valueString); |
| | | } |
| | | |
| | | return lastLoginTime; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning %d for user %s because no last " + |
| | | TRACER.debugInfo("Returning %d for user %s because no last " + |
| | | "login time value exists.", lastLoginTime, userDNString); |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | if (debug) |
| | | { |
| | | debugWarning("Unable to set last login time for user %s because an " + |
| | | "error occurred: %s", |
| | | TRACER.debugWarning("Unable to set last login time for user %s " + |
| | | "because an error occurred: %s", |
| | | userDNString, stackTraceToSingleLineString(e)); |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Not updating last login time for user %s because the " + |
| | | "new value matches the existing value.", userDNString); |
| | | TRACER.debugInfo("Not updating last login time for user %s " + |
| | | "because the new value matches the existing value.", |
| | | userDNString); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Updated the last login time for user %s to %s", |
| | | TRACER.debugInfo("Updated the last login time for user %s to %s", |
| | | userDNString, timestamp); |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning stored result of %b for user %s", |
| | | TRACER.debugInfo("Returning stored result of %b for user %s", |
| | | (isIdleLocked == ConditionResult.TRUE), userDNString); |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning false for user %s because no idle lockout " + |
| | | "interval is defined.", userDNString); |
| | | TRACER.debugInfo("Returning false for user %s because no idle " + |
| | | "lockout interval is defined.", userDNString); |
| | | } |
| | | } |
| | | |
| | |
| | | reason.append( |
| | | "the password changed time is in an acceptable window"); |
| | | } |
| | | debugInfo("Returning false for user %s because %s.", |
| | | TRACER.debugInfo("Returning false for user %s because %s.", |
| | | userDNString, reason.toString()); |
| | | } |
| | | } |
| | |
| | | "changed time is not in an acceptable window" |
| | | : "neither last login time nor password " + |
| | | "changed time are in an acceptable window"; |
| | | debugInfo("Returning true for user %s because %s.", |
| | | TRACER.debugInfo("Returning true for user %s because %s.", |
| | | userDNString, reason); |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning stored result of %b for user %s.", |
| | | TRACER.debugInfo("Returning stored result of %b for user %s.", |
| | | (mustChangePassword == ConditionResult.TRUE), userDNString); |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning false for user %s because neither force " + |
| | | "change on add nor force change on reset is enabled, " + |
| | | TRACER.debugInfo("Returning false for user %s because neither " + |
| | | "force change on add nor force change on reset is enabled, " + |
| | | "or users are not allowed to self-modify passwords.", |
| | | userDNString); |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | mustChangePassword = ConditionResult.TRUE; |
| | | if (debug) |
| | | { |
| | | debugWarning("Returning true for user %s because an error occurred: %s", |
| | | userDNString, stackTraceToSingleLineString(e)); |
| | | TRACER.debugWarning("Returning true for user %s because an error " + |
| | | "occurred: %s", userDNString, stackTraceToSingleLineString(e)); |
| | | } |
| | | |
| | | return true; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning %b for user since the attribute \"%s\"" + |
| | | TRACER.debugInfo("Returning %b for user since the attribute \"%s\"" + |
| | | " is not present in the entry.", |
| | | false, userDNString, OP_ATTR_PWPOLICY_RESET_REQUIRED); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning %b for user %s.", |
| | | TRACER.debugInfo("Returning %b for user %s.", |
| | | (mustChangePassword == ConditionResult.TRUE), userDNString); |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Updating user %s to set the reset flag to %b", |
| | | TRACER.debugInfo("Updating user %s to set the reset flag to %b", |
| | | userDNString, mustChangePassword); |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning false for user %s because there is no maximum " + |
| | | "reset age.", userDNString); |
| | | TRACER.debugInfo("Returning false for user %s because there is no " + |
| | | "maximum reset age.", userDNString); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning false for user %s because the user's password " + |
| | | "has not been reset.", userDNString); |
| | | TRACER.debugInfo("Returning false for user %s because the user's " + |
| | | "password has not been reset.", userDNString); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning %b for user %s after comparing the current and " + |
| | | "max reset times.", locked, userDNString); |
| | | TRACER.debugInfo("Returning %b for user %s after comparing the " + |
| | | "current and max reset times.", locked, userDNString); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning password expiration time of %d for user %s.", |
| | | expirationTime, userDNString); |
| | | TRACER.debugInfo("Returning password expiration time of %d for user " + |
| | | "%s.", expirationTime, userDNString); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning false because there is no minimum age."); |
| | | TRACER.debugInfo("Returning false because there is no minimum age."); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning false because the minimum age has expired."); |
| | | TRACER.debugInfo("Returning false because the minimum age has " + |
| | | "expired."); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning false because the account is in a must-change " + |
| | | "state."); |
| | | TRACER.debugInfo("Returning false because the account is in a " + |
| | | "must-change state."); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning true."); |
| | | TRACER.debugInfo("Returning true."); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning stored required change time of %d for user %s", |
| | | requiredChangeTime, userDNString); |
| | | TRACER.debugInfo("Returning stored required change time of %d for " + |
| | | "user %s", requiredChangeTime, userDNString); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | requiredChangeTime = -1; |
| | | if (debug) |
| | | { |
| | | debugWarning("Returning %d for user %s because an error occurred: %s", |
| | | requiredChangeTime, userDNString, |
| | | TRACER.debugWarning("Returning %d for user %s because an error " + |
| | | "occurred: %s", requiredChangeTime, userDNString, |
| | | stackTraceToSingleLineString(e)); |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning required change time of %d for user %s", |
| | | TRACER.debugInfo("Returning required change time of %d for user %s", |
| | | requiredChangeTime, userDNString); |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Updating required change time for user %s", userDNString); |
| | | TRACER.debugInfo("Updating required change time for user %s", |
| | | userDNString); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | if (debug) |
| | | { |
| | | debugWarning("Unable to decode the warned time for user %s: %s", |
| | | userDNString, stackTraceToSingleLineString(e)); |
| | | TRACER.debugWarning("Unable to decode the warned time for user %s: " + |
| | | "%s", userDNString, stackTraceToSingleLineString(e)); |
| | | } |
| | | |
| | | warnedTime = -1; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning a warned time of %d for user %s", |
| | | TRACER.debugInfo("Returning a warned time of %d for user %s", |
| | | warnedTime, userDNString); |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Not updating warned time for user %s because the warned " + |
| | | "time is the same as the current time.", userDNString); |
| | | TRACER.debugInfo("Not updating warned time for user %s because " + |
| | | "the warned time is the same as the current time.", userDNString); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Updated the warned time for user %s", userDNString); |
| | | TRACER.debugInfo("Updated the warned time for user %s", userDNString); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Clearing warned time for user %s", userDNString); |
| | | TRACER.debugInfo("Clearing warned time for user %s", userDNString); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Cleared the warned time for user %s", userDNString); |
| | | TRACER.debugInfo("Cleared the warned time for user %s", userDNString); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | if (debug) |
| | | { |
| | | debugWarning("Error while processing grace login times " + |
| | | TRACER.debugWarning("Error while processing grace login times " + |
| | | "for user %s: %s", |
| | | userDNString, stackTraceToSingleLineString(e)); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning grace login times for user %s", userDNString); |
| | | TRACER.debugInfo("Returning grace login times for user %s", |
| | | userDNString); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Updating grace login times for user %s", userDNString); |
| | | TRACER.debugInfo("Updating grace login times for user %s", |
| | | userDNString); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Clearing grace login times for user %s", userDNString); |
| | | TRACER.debugInfo("Clearing grace login times for user %s", |
| | | userDNString); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debug) |
| | | { |
| | | debugWarning("User entry %s contains a password with scheme %s " + |
| | | "that is not defined in the server.", |
| | | userDNString, schemeName); |
| | | TRACER.debugWarning("User entry %s contains a password with " + |
| | | "scheme %s that is not defined in the server.", |
| | | userDNString, schemeName); |
| | | } |
| | | |
| | | continue; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | if (debug) |
| | | { |
| | | debugWarning("Cannot get clear password value foruser %s: %s", |
| | | userDNString, e); |
| | | TRACER.debugWarning("Cannot get clear password value foruser %s: " + |
| | | "%s", userDNString, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning false because user %s does not have any " + |
| | | "values for password attribute %s", |
| | | userDNString, |
| | | TRACER.debugInfo("Returning false because user %s does not have " + |
| | | "any values for password attribute %s", userDNString, |
| | | passwordPolicy.getPasswordAttribute().getNameOrOID()); |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debug) |
| | | { |
| | | debugWarning("User entry %s contains a password with scheme %s " + |
| | | "that is not defined in the server.", |
| | | userDNString, schemeName); |
| | | TRACER.debugWarning("User entry %s contains a password with " + |
| | | "scheme %s that is not defined in the server.", |
| | | userDNString, schemeName); |
| | | } |
| | | |
| | | continue; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning true for user %s because the provided " + |
| | | "password matches a value encoded with scheme %s", |
| | | TRACER.debugInfo("Returning true for user %s because the " + |
| | | "provided password matches a value encoded with scheme %s", |
| | | userDNString, schemeName); |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | if (debug) |
| | | { |
| | | debugWarning("An error occurred while attempting to process a " + |
| | | "password value for user %s: %s", |
| | | userDNString, stackTraceToSingleLineString(e)); |
| | | TRACER.debugWarning("An error occurred while attempting to " + |
| | | "process a password value for user %s: %s", |
| | | userDNString, stackTraceToSingleLineString(e)); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Returning false because the provided password does not " + |
| | | "match any of the stored password values for user %s", |
| | | TRACER.debugInfo("Returning false because the provided password does " + |
| | | "not match any of the stored password values for user %s", |
| | | userDNString); |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("The password provided for user %s failed the %s " + |
| | | "password validator.", userDNString, validatorDN.toString()); |
| | | TRACER.debugInfo("The password provided for user %s failed " + |
| | | "the %s password validator.", |
| | | userDNString, validatorDN.toString()); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("The password provided for user %s passed the %s " + |
| | | "password validator.", userDNString, validatorDN.toString()); |
| | | TRACER.debugInfo("The password provided for user %s passed " + |
| | | "the %s password validator.", |
| | | userDNString, validatorDN.toString()); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Doing nothing for user %s because no " + |
| | | TRACER.debugInfo("Doing nothing for user %s because no " + |
| | | "deprecated storage schemes have been defined.", userDNString); |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Doing nothing for entry %s because no password values " + |
| | | "were found.", userDNString); |
| | | TRACER.debugInfo("Doing nothing for entry %s because no password " + |
| | | "values were found.", userDNString); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debug) |
| | | { |
| | | debugWarning("Skipping password value for user %s because the " + |
| | | "associated storage scheme %s is not configured for use.", |
| | | userDNString, schemeName); |
| | | TRACER.debugWarning("Skipping password value for user %s " + |
| | | "because the associated storage scheme %s is not " + |
| | | "configured for use.", userDNString, schemeName); |
| | | } |
| | | |
| | | continue; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Marking password with scheme %s for removal " + |
| | | "from user entry %s.", schemeName, userDNString); |
| | | TRACER.debugInfo("Marking password with scheme %s for " + |
| | | "removal from user entry %s.", schemeName, userDNString); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | if (debug) |
| | | { |
| | | debugWarning("Skipping password value for user %s because an " + |
| | | "error occurred while attempting to decode it " + |
| | | "based on the user password syntax: %s", |
| | | TRACER.debugWarning("Skipping password value for user %s because " + |
| | | "an error occurred while attempting to decode it based on " + |
| | | "the user password syntax: %s", |
| | | userDNString, stackTraceToSingleLineString(e)); |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("User entry %s does not have any password values " + |
| | | TRACER.debugInfo("User entry %s does not have any password values " + |
| | | "encoded using deprecated schemes.", userDNString); |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | if (debug) |
| | | { |
| | | debugWarning("Unable to encode password for user %s using " + |
| | | TRACER.debugWarning("Unable to encode password for user %s using " + |
| | | "default scheme %s: %s", |
| | | userDNString, s.getStorageSchemeName(), |
| | | stackTraceToSingleLineString(e)); |
| | |
| | | { |
| | | if (debug) |
| | | { |
| | | debugWarning("Not updating user entry %s because removing " + |
| | | TRACER.debugWarning("Not updating user entry %s because removing " + |
| | | "deprecated schemes would leave the user without a password.", |
| | | userDNString); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("Updating user entry %s to replace password values " + |
| | | TRACER.debugInfo("Updating user entry %s to replace password values " + |
| | | "encoded with deprecated schemes with values encoded " + |
| | | "with the default schemes.", userDNString); |
| | | } |
| | |
| | | { |
| | | if (debug) |
| | | { |
| | | debugWarning("Unable to generate a new password for user %s because " + |
| | | "no password generator has been defined in the associated " + |
| | | "password policy.", |
| | | userDNString); |
| | | TRACER.debugWarning("Unable to generate a new password for user " + |
| | | "%s because no password generator has been defined in the " + |
| | | "associated password policy.", userDNString); |
| | | } |
| | | |
| | | return null; |
| | |
| | | import org.opends.server.types.SearchScope; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | public class PersistentSearch |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // Indicates whether entries returned should include the entry change |
| | | // notification control. |
| | | private boolean returnECs; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | // FIXME -- Do we need to do anything here? |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | DirectoryServer.deregisterPersistentSearch(this); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e2); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | // FIXME -- Do we need to do anything here? |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | DirectoryServer.deregisterPersistentSearch(this); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e2); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | // FIXME -- Do we need to do anything here? |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | DirectoryServer.deregisterPersistentSearch(this); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e2); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | // FIXME -- Do we need to do anything here? |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | DirectoryServer.deregisterPersistentSearch(this); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e2); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | } |
| | | } |
| | |
| | | import org.opends.server.types.SearchResultEntry; |
| | | import org.opends.server.types.SearchResultReference; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ConfigMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.PluginMessages.*; |
| | |
| | | ConfigurationDeleteListener<PluginCfg>, |
| | | ConfigurationChangeListener<PluginCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // Arrays for holding the plugins of each type. |
| | | private DirectoryServerPlugin[] startupPlugins; |
| | | private DirectoryServerPlugin[] shutdownPlugins; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_STARTUP_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_SHUTDOWN_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_POST_CONNECT_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e2); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_POST_DISCONNECT_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_LDIF_IMPORT_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_LDIF_EXPORT_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_PRE_PARSE_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_PRE_PARSE_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_PRE_PARSE_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_PRE_PARSE_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_PRE_PARSE_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_PRE_PARSE_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_PRE_PARSE_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_PRE_PARSE_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_PRE_PARSE_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_PRE_PARSE_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_PRE_OPERATION_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_PRE_OPERATION_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_PRE_OPERATION_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_PRE_OPERATION_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_PRE_OPERATION_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_PRE_OPERATION_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_PRE_OPERATION_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_PRE_OPERATION_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_POST_OPERATION_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_POST_OPERATION_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_POST_OPERATION_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_POST_OPERATION_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_POST_OPERATION_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_POST_OPERATION_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_POST_OPERATION_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_POST_OPERATION_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_POST_OPERATION_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_POST_OPERATION_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_POST_RESPONSE_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_POST_RESPONSE_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_POST_RESPONSE_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_POST_RESPONSE_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_POST_RESPONSE_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_POST_RESPONSE_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_POST_RESPONSE_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_POST_RESPONSE_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_SEARCH_ENTRY_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_SEARCH_REFERENCE_PLUGIN_EXCEPTION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PLUGIN_INTERMEDIATE_RESPONSE_PLUGIN_EXCEPTION; |
| | |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ConfigMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | implements ConfigChangeListener, ConfigAddListener, ConfigDeleteListener, |
| | | ConfigurableComponent |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_ROOTDN_CANNOT_GET_BASE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_CONFIG_ROOTDN_ERROR_DETERMINING_ROOT_PRIVILEGES; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_CONFIG_ROOTDN_CANNOT_PARSE_ALTERNATE_BIND_DNS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_CONFIG_ROOTDN_CANNOT_PARSE_ALTERNATE_BIND_DNS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | msgID = MSGID_CONFIG_ROOTDN_CANNOT_REGISTER_ALTERNATE_BIND_DN; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_CONFIG_ROOTDN_CANNOT_PARSE_ALTERNATE_BIND_DNS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_CONFIG_ROOTDN_CANNOT_PARSE_ALTERNATE_BIND_DNS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | msgID = MSGID_CONFIG_ROOTDN_CANNOT_REGISTER_ALTERNATE_BIND_DN; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_CONFIG_ROOTDN_ERROR_DETERMINING_ROOT_PRIVILEGES; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | if (resultCode == ResultCode.SUCCESS) |
| | |
| | | import org.opends.server.util.LDIFReader; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ConfigMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | |
| | | public class SchemaConfigManager |
| | | implements ConfigChangeListener, ConfigAddListener, ConfigDeleteListener |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // The schema that has been parsed from the server configuration. |
| | | private Schema schema; |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_SCHEMA_CANNOT_GET_MR_BASE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_CONFIG_SCHEMA_MR_UNABLE_TO_DETERMINE_ENABLED_STATE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_CONFIG_SCHEMA_MR_CANNOT_GET_CLASS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_CONFIG_SCHEMA_MR_CANNOT_INSTANTIATE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_CONFIG_SCHEMA_MR_CANNOT_INITIALIZE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | msgID = MSGID_CONFIG_SCHEMA_MR_CONFLICTING_MR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_SCHEMA_CANNOT_GET_SYNTAX_BASE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_CONFIG_SCHEMA_SYNTAX_UNABLE_TO_DETERMINE_ENABLED_STATE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_CONFIG_SCHEMA_SYNTAX_CANNOT_GET_CLASS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_CONFIG_SCHEMA_SYNTAX_CANNOT_INSTANTIATE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_CONFIG_SCHEMA_SYNTAX_CANNOT_INITIALIZE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | msgID = MSGID_CONFIG_SCHEMA_SYNTAX_CONFLICTING_SYNTAX; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ie); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | |
| | | throw ie; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_SCHEMA_CANNOT_LIST_FILES; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_SCHEMA_CANNOT_OPEN_FILE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_SCHEMA_CANNOT_READ_LDIF_ENTRY; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | attrTypeSyntax = new AttributeTypeSyntax(); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | ocSyntax = new ObjectClassSyntax(); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | nfSyntax = new NameFormSyntax(); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | dcrSyntax = new DITContentRuleSyntax(); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | dsrSyntax = new DITStructureRuleSyntax(); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | mruSyntax = new MatchingRuleUseSyntax(); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_SCHEMA_CANNOT_PARSE_ATTR_TYPE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_SCHEMA_CANNOT_PARSE_ATTR_TYPE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_SCHEMA_CONFLICTING_ATTR_TYPE; |
| | |
| | | // This should never happen. |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_SCHEMA_CANNOT_PARSE_OC; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_SCHEMA_CANNOT_PARSE_OC; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_SCHEMA_CONFLICTING_OC; |
| | |
| | | // This should never happen. |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_SCHEMA_CANNOT_PARSE_NAME_FORM; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_SCHEMA_CANNOT_PARSE_NAME_FORM; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_SCHEMA_CONFLICTING_NAME_FORM; |
| | |
| | | // This should never happen. |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_SCHEMA_CANNOT_PARSE_DCR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_SCHEMA_CANNOT_PARSE_DCR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_SCHEMA_CONFLICTING_DCR; |
| | |
| | | // This should never happen. |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_SCHEMA_CANNOT_PARSE_DSR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_SCHEMA_CANNOT_PARSE_DSR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_SCHEMA_CONFLICTING_DSR; |
| | |
| | | // This should never happen. |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_SCHEMA_CANNOT_PARSE_MRU; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_SCHEMA_CANNOT_PARSE_MRU; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_SCHEMA_CONFLICTING_MRU; |
| | |
| | | // This should never happen. |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | import static org.opends.server.core.CoreConstants.*; |
| | | import static org.opends.server.loggers.AccessLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.CoreMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | PostOperationSearchOperation, PostResponseSearchOperation, |
| | | SearchEntrySearchOperation, SearchReferenceSearchOperation |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // Indicates whether a search result done response has been sent to the |
| | | // client. |
| | | private AtomicBoolean responseSent; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResponseData(de); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResponseData(de); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | |
| | | setResultCode(ResultCode.valueOf(le.getResultCode())); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(ResultCode.PROTOCOL_ERROR); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | |
| | | setResultCode(ResultCode.valueOf(le.getResultCode())); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | |
| | | setResultCode(ResultCode.valueOf(le.getResultCode())); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | |
| | | setResultCode(ResultCode.valueOf(le.getResultCode())); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | |
| | | setResultCode(ResultCode.valueOf(le.getResultCode())); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | |
| | | setResultCode(ResultCode.valueOf(le.getResultCode())); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, coe); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, coe); |
| | | } |
| | | |
| | | CancelResult cancelResult = coe.getCancelResult(); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | setResultCode(DirectoryServer.getServerErrorResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ConfigMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.getMessage; |
| | | import static org.opends.server.util.StaticUtils.stackTraceToSingleLineString; |
| | |
| | | ConfigurationAddListener<SynchronizationProviderCfg>, |
| | | ConfigurationDeleteListener<SynchronizationProviderCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | messages.add(e.getMessage()); |
| | | resultCode = DirectoryServer.getServerErrorResultCode(); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | int msgID = MSGID_CONFIG_SYNCH_ERROR_INITIALIZING_PROVIDER; |
| | | messages.add(getMessage(msgID, String.valueOf( |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | messages.add(e.getMessage()); |
| | | resultCode = DirectoryServer.getServerErrorResultCode(); |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | int msgID = MSGID_CONFIG_SYNCH_ERROR_INITIALIZING_PROVIDER; |
| | | messages.add(getMessage(msgID, String.valueOf( |
| | |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ConfigMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | public class TrustManagerProviderConfigManager |
| | | implements ConfigChangeListener, ConfigAddListener, ConfigDeleteListener |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_TRUSTMANAGER_CANNOT_GET_BASE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_TRUSTMANAGER_INVALID_CLASS_NAME; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_TRUSTMANAGER_INVALID_CLASS_NAME; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_TRUSTMANAGER_INVALID_CLASS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_TRUSTMANAGER_INVALID_ENABLED_VALUE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_TRUSTMANAGER_INVALID_ENABLED_VALUE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_TRUSTMANAGER_INVALID_CLASS_NAME; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_TRUSTMANAGER_INVALID_CLASS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_TRUSTMANAGER_INITIALIZATION_FAILED; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_TRUSTMANAGER_INVALID_CLASS_NAME; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_TRUSTMANAGER_INVALID_CLASS_NAME; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_TRUSTMANAGER_INVALID_CLASS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_TRUSTMANAGER_INVALID_ENABLED_VALUE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_TRUSTMANAGER_INVALID_ENABLED_VALUE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_TRUSTMANAGER_INVALID_CLASS_NAME; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_TRUSTMANAGER_INVALID_CLASS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_TRUSTMANAGER_INITIALIZATION_FAILED; |
| | |
| | | |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ConfigMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | |
| | | ConfigurationAddListener<VirtualAttributeCfg>, |
| | | ConfigurationDeleteListener<VirtualAttributeCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // A mapping between the DNs of the config entries and the associated |
| | | // virtual attribute rules. |
| | | private ConcurrentHashMap<DN,VirtualAttributeRule> rules; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_VATTR_INVALID_SEARCH_FILTER; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_VATTR_INVALID_SEARCH_FILTER; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | if (resultCode == ResultCode.SUCCESS) |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_VATTR_INVALID_SEARCH_FILTER; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | if (resultCode == ResultCode.SUCCESS) |
| | |
| | | import org.opends.server.util.Base64; |
| | | |
| | | import static org.opends.server.extensions.ExtensionsConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | public class Base64PasswordStorageScheme |
| | | extends PasswordStorageScheme <PasswordStorageSchemeCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PWSCHEME_CANNOT_BASE64_DECODE_STORED_PASSWORD; |
| | |
| | | import org.opends.server.types.LockManager; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | implements ConfigurationChangeListener< |
| | | CramMD5SASLMechanismHandlerCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // An array filled with the inner pad byte. |
| | | private byte[] iPad; |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_SASLCRAMMD5_CANNOT_GET_MESSAGE_DIGEST; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, pe); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, pe); |
| | | } |
| | | |
| | | bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS); |
| | |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | public class CancelExtendedOperation |
| | | extends ExtendedOperationHandler<ExtendedOperationHandlerCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | operation.setResultCode(ResultCode.PROTOCOL_ERROR); |
| | |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.extensions.ExtensionsConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ConfigMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | implements AlertGenerator |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | /** |
| | | * The fully-qualified name of this class. |
| | | */ |
| | | private static final String CLASS_NAME = |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ie); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | |
| | | throw ie; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_FILE_CANNOT_VERIFY_EXISTENCE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_UNABLE_TO_APPLY_STARTUP_CHANGES; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_FILE_CANNOT_OPEN_FOR_READ; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | |
| | | try |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | try |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e2); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ie); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | |
| | | try |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | try |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e2); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, le); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | |
| | | try |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | try |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e2); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | // This should not happen. |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | try |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e2); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_CANNOT_DETERMINE_SERVER_ROOT; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ie); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | |
| | | throw ie; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_CANNOT_DETERMINE_SERVER_ROOT; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_CANNOT_REGISTER_AS_PRIVATE_SUFFIX; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ce); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ce); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_FILE_ADD_FAILED; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ce); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ce); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_FILE_DELETE_FAILED; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_MANUAL_CHANGES_LOST; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_FILE_WRITE_CANNOT_EXPORT_NEW_CONFIG; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_FILE_WRITE_CANNOT_RENAME_NEW_CONFIG; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_FILE_CANNOT_CREATE_ARCHIVE_DIR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_FILE_CANNOT_WRITE_CONFIG_ARCHIVE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_FILE_CANNOT_WRITE_CONFIG_ARCHIVE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_LDIF_WRITE_ERROR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_FILE_CLOSE_ERROR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_FILE_WRITE_ERROR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_BACKUP_CANNOT_GET_MAC; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_BACKUP_CANNOT_GET_DIGEST; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_BACKUP_CANNOT_CREATE_ARCHIVE_FILE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CONFIG_BACKUP_CANNOT_GET_CIPHER; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_CONFIG_BACKUP_CANNOT_DETERMINE_CONFIG_FILE_LOCATION; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | try |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | try |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_CONFIG_BACKUP_CANNOT_CLOSE_ZIP_STREAM; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_CONFIG_BACKUP_CANNOT_UPDATE_BACKUP_DESCRIPTOR; |
| | |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | |
| | | extends PasswordValidator<DictionaryPasswordValidatorCfg> |
| | | implements ConfigurationChangeListener<DictionaryPasswordValidatorCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // The current configuration for this password validator. |
| | | private DictionaryPasswordValidatorCfg currentConfig; |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_DICTIONARY_VALIDATOR_CANNOT_READ_FILE; |
| | |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.util.Base64; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | implements ConfigurationChangeListener< |
| | | DigestMD5SASLMechanismHandlerCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // The current configuration for this SASL mechanism handler. |
| | | private DigestMD5SASLMechanismHandlerCfg currentConfig; |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_SASLDIGESTMD5_CANNOT_GET_MESSAGE_DIGEST; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // This isn't necessarily fatal because we're going to retry using UTF-8, |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // This is fatal because either we can't parse the credentials as a |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, pe); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, pe); |
| | | } |
| | | |
| | | int msgID = MSGID_SASLDIGESTMD5_CANNOT_PARSE_RESPONSE_DIGEST; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | logError(ErrorLogCategory.EXTENSIONS, |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS); |
| | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | public class DynamicGroup |
| | | extends Group |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // The DN of the entry that holds the definition for this group. |
| | | private DN groupEntryDN; |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_DYNAMICGROUP_CANNOT_DECODE_MEMBERURL; |
| | |
| | | import org.opends.server.types.VirtualAttributeRule; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | |
| | | |
| | |
| | | extends VirtualAttributeProvider<VirtualAttributeCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | /** |
| | | * Creates a new instance of this entryDN virtual attribute provider. |
| | | */ |
| | | public EntryDNVirtualAttributeProvider() |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | return false; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | implements ConfigurationChangeListener< |
| | | ExternalSASLMechanismHandlerCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // The attribute type that should hold the certificates to use for the |
| | | // validation. |
| | | private AttributeType certificateAttributeType; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | bindOperation.setResponseData(de); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS); |
| | |
| | | import org.opends.server.types.SearchFilter; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | extends EntryCache <FIFOEntryCacheCfg> |
| | | implements ConfigurationChangeListener<FIFOEntryCacheCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | // This should never happen. |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | finally |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // The attempt to add the lock to the list failed, so we need to |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e2); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // The attempt to add the lock to the list failed, so we need to |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e2); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // The attempt to add the lock to the list failed, so we need to |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e2); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // The attempt to add the lock to the list failed, so we need to |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e2); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // This shouldn't happen, but if it does then we can't be sure whether |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // This shouldn't happen, but if it does, then just ignore it. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | return; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | return; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // This shouldn't happen, but if it does then we can't be sure whether |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // This shouldn't happen, but if it does, then just ignore it. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // We can't rule out the possibility of a conflict, so return false. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // We can't be sure there wasn't a conflict, so return false. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // This shouldn't happen, but there's not much that we can do if it does. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // This shouldn't happen, but there's not much that we can do if it does. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // This shouldn't happen, but there's not much that we can do if it does. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // This shouldn't happen, but there's not much that we can do if it does. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // This shouldn't happen, but there's not much that we can do if it does. |
| | |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | extends KeyManagerProvider<FileBasedKeyManagerCfg> |
| | | implements ConfigurableComponent |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ce); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ce); |
| | | } |
| | | |
| | | throw ce; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ie); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | |
| | | throw ie; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_FILE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, kse); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, kse); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_KEYMANAGER_INVALID_TYPE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ie); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | |
| | | throw ie; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_TYPE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ie); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | |
| | | throw ie; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_PIN_PROPERTY; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ie); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | |
| | | throw ie; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_PIN_ENVAR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ie); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | |
| | | throw ie; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_PIN_FILE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_PIN_FROM_ATTR; |
| | |
| | | } catch (SecurityException e) { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_FILE; |
| | |
| | | } catch (KeyStoreException kse) { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, kse); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, kse); |
| | | } |
| | | |
| | | int msgID = MSGID_FILE_KEYMANAGER_INVALID_TYPE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_FILE_KEYMANAGER_CANNOT_LOAD; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_FILE_KEYMANAGER_CANNOT_CREATE_FACTORY; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ce); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ce); |
| | | } |
| | | |
| | | unacceptableReasons.add(ce.getMessage()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_FILE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, kse); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, kse); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_KEYMANAGER_INVALID_TYPE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_TYPE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_PIN_PROPERTY; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_PIN_ENVAR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_PIN_FILE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_PIN_FROM_ATTR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ce); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ce); |
| | | } |
| | | |
| | | if (resultCode == ResultCode.SUCCESS) |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_FILE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, kse); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, kse); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_KEYMANAGER_INVALID_TYPE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_TYPE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_PIN_PROPERTY; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_PIN_ENVAR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_PIN_FILE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_PIN_FROM_ATTR; |
| | |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | extends TrustManagerProvider |
| | | implements ConfigurableComponent |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ce); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ce); |
| | | } |
| | | |
| | | throw ce; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ie); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | |
| | | throw ie; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_FILE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, kse); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, kse); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_TRUSTMANAGER_INVALID_TYPE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ie); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | |
| | | throw ie; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_TYPE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ie); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | |
| | | throw ie; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_PIN_PROPERTY; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ie); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | |
| | | throw ie; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_PIN_ENVAR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ie); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | |
| | | throw ie; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_PIN_FILE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_PIN_FROM_ATTR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_LOAD; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_CREATE_FACTORY; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ce); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ce); |
| | | } |
| | | |
| | | unacceptableReasons.add(ce.getMessage()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_FILE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, kse); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, kse); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_TRUSTMANAGER_INVALID_TYPE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_TYPE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_PIN_PROPERTY; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_PIN_ENVAR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_PIN_FILE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_PIN_FROM_ATTR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ce); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ce); |
| | | } |
| | | |
| | | if (resultCode == ResultCode.SUCCESS) |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_FILE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, kse); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, kse); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_TRUSTMANAGER_INVALID_TYPE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_TYPE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_PIN_PROPERTY; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_PIN_ENVAR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_PIN_FILE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_PIN_FROM_ATTR; |
| | |
| | | import org.opends.server.types.SearchFilter; |
| | | import org.opends.server.types.SearchScope; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | public class FilteredStaticGroupMemberList |
| | | extends MemberList |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_STATICMEMBERS_CANNOT_GET_ENTRY; |
| | |
| | | import org.opends.server.types.SearchResultEntry; |
| | | import org.opends.server.types.SearchScope; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | implements ConfigurationChangeListener< |
| | | FingerprintCertificateMapperCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // The attribute type that will be used to map the certificate's fingerprint. |
| | | private AttributeType fingerprintAttributeType; |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_FCM_PEER_CERT_NOT_X509; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | String peerSubject = peerCertificate.getSubjectX500Principal().getName( |
| | |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | implements ConfigurationChangeListener< |
| | | GSSAPISASLMechanismHandlerCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // The DN of the configuration entry for this SASL mechanism handler. |
| | | private DN configEntryDN; |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_SASLGSSAPI_CANNOT_GET_SERVER_FQDN; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_SASLGSSAPI_CANNOT_CREATE_JAAS_CONFIG; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ie); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | |
| | | bindOperation.setAuthFailureReason(ie.getMessageID(), ie.getMessage()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | if (resultCode == ResultCode.SUCCESS) |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | resultCode = DirectoryServer.getServerErrorResultCode(); |
| | |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | public class GSSAPIStateInfo |
| | | implements PrivilegedExceptionAction<Boolean>, CallbackHandler |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_SASLGSSAPI_CANNOT_CREATE_LOGIN_CONTEXT; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_SASLGSSAPI_CANNOT_AUTHENTICATE_SERVER; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_SASLGSSAPI_CANNOT_CREATE_SASL_SERVER; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | try |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e2); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | try |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | import org.opends.server.types.VirtualAttributeRule; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | |
| | | |
| | |
| | | extends VirtualAttributeProvider<VirtualAttributeCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | /** |
| | | * Creates a new instance of this entryDN virtual attribute provider. |
| | | */ |
| | | public IsMemberOfVirtualAttributeProvider() |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | return false; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ConfigMessages.*; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | implements AlertHandler, DynamicMBean, DirectoryServerMBean |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | /** |
| | | * The fully-qualified name of this class. |
| | | */ |
| | | private static final String CLASS_NAME = |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_JMX_ALERT_HANDLER_CANNOT_REGISTER; |
| | |
| | | import org.opends.server.util.Base64; |
| | | |
| | | import static org.opends.server.extensions.ExtensionsConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | |
| | | extends PasswordStorageScheme <PasswordStorageSchemeCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | /** |
| | | * The fully-qualified name of this class. |
| | | */ |
| | | private static final String CLASS_NAME = |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PWSCHEME_CANNOT_INITIALIZE_MESSAGE_DIGEST; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | return false; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | logError(ErrorLogCategory.EXTENSIONS, ErrorLogSeverity.MILD_ERROR, |
| | |
| | | import org.opends.server.types.VirtualAttributeRule; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | |
| | | |
| | |
| | | extends VirtualAttributeProvider<MemberVirtualAttributeCfg> |
| | | implements ConfigurationChangeListener<MemberVirtualAttributeCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // The attribute type used to indicate which target group should be used to |
| | | // obtain the member list. |
| | | private AttributeType targetGroupType; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | |
| | | public class NullConnectionSecurityProvider |
| | | extends ConnectionSecurityProvider |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ioe); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ioe); |
| | | } |
| | | |
| | | // An error occurred while trying to read data from the client. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An unexpected error occurred. Disconnect and return. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ioe); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ioe); |
| | | } |
| | | |
| | | // An error occurred while trying to write data to the client. Disconnect |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An unexpected error occurred. Disconnect and return. |
| | |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | KeyManagerProvider<PKCS11KeyManagerCfg> implements |
| | | ConfigurableComponent |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ie); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | |
| | | throw ie; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_PKCS11_KEYMANAGER_CANNOT_DETERMINE_PIN_PROPERTY; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ie); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | |
| | | throw ie; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_PKCS11_KEYMANAGER_CANNOT_DETERMINE_PIN_ENVAR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ie); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | |
| | | throw ie; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_PKCS11_KEYMANAGER_CANNOT_DETERMINE_PIN_FILE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_PKCS11_KEYMANAGER_CANNOT_DETERMINE_PIN_FROM_ATTR; |
| | |
| | | } catch (IOException ioe) { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ioe); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ioe); |
| | | } |
| | | |
| | | int msgID = MSGID_PKCS11_KEYMANAGER_PIN_FILE_CANNOT_READ; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PKCS11_KEYMANAGER_CANNOT_LOAD; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PKCS11_KEYMANAGER_CANNOT_CREATE_FACTORY; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_PKCS11_KEYMANAGER_CANNOT_DETERMINE_PIN_PROPERTY; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_PKCS11_KEYMANAGER_CANNOT_DETERMINE_PIN_ENVAR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_PKCS11_KEYMANAGER_CANNOT_DETERMINE_PIN_FILE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_PKCS11_KEYMANAGER_CANNOT_DETERMINE_PIN_FROM_ATTR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_PKCS11_KEYMANAGER_CANNOT_DETERMINE_PIN_PROPERTY; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_PKCS11_KEYMANAGER_CANNOT_DETERMINE_PIN_ENVAR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_PKCS11_KEYMANAGER_CANNOT_DETERMINE_PIN_FILE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_PKCS11_KEYMANAGER_CANNOT_DETERMINE_PIN_FROM_ATTR; |
| | |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.extensions.ExtensionsConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | implements ConfigurationChangeListener< |
| | | PasswordModifyExtendedOperationHandlerCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | int msgID = MSGID_EXTOP_PASSMOD_CANNOT_DETERMINE_ID_MAPPER; |
| | | String message = getMessage(msgID, String.valueOf(config.dn()), |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ae); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ae); |
| | | } |
| | | |
| | | operation.setResultCode(ResultCode.PROTOCOL_ERROR); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | operation.setResultCode(ResultCode.INVALID_DN_SYNTAX); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | if (oldPassword == null) |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | operation.setResultCode(DirectoryServer.getServerErrorResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | if (oldPassword == null) |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | if (oldPassword == null) |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | // We couldn't decode the provided password value, so remove it |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | // We couldn't decode the provided password value, so remove it |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | break; |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | operation.setResultCode(de.getResultCode()); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_EXTOP_PASSMOD_CANNOT_DETERMINE_ID_MAPPER; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | resultCode = DirectoryServer.getServerErrorResultCode(); |
| | |
| | | import org.opends.server.types.Privilege; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | implements ConfigurationChangeListener< |
| | | PlainSASLMechanismHandlerCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // The DN of the configuration entry for this SASL mechanism handler. |
| | | private DN configEntryDN; |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS); |
| | |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | extends PasswordGenerator<RandomPasswordGeneratorCfg> |
| | | implements ConfigurationChangeListener<RandomPasswordGeneratorCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | // The current configuration for this password validator. |
| | | private RandomPasswordGeneratorCfg currentConfig; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_RANDOMPWGEN_CANNOT_DETERMINE_CHARSETS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_RANDOMPWGEN_INVALID_PWFORMAT; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_RANDOMPWGEN_CANNOT_DETERMINE_PWFORMAT; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_RANDOMPWGEN_CANNOT_DETERMINE_CHARSETS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_RANDOMPWGEN_INVALID_PWFORMAT; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_RANDOMPWGEN_CANNOT_DETERMINE_PWFORMAT; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_RANDOMPWGEN_CANNOT_DETERMINE_CHARSETS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_RANDOMPWGEN_INVALID_PWFORMAT; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_RANDOMPWGEN_CANNOT_DETERMINE_PWFORMAT; |
| | |
| | | import org.opends.server.util.Base64; |
| | | |
| | | import static org.opends.server.extensions.ExtensionsConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | |
| | | extends PasswordStorageScheme <PasswordStorageSchemeCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | /** |
| | | * The fully-qualified name of this class. |
| | | */ |
| | | private static final String CLASS_NAME = |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PWSCHEME_CANNOT_INITIALIZE_MESSAGE_DIGEST; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | return false; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | logError(ErrorLogCategory.EXTENSIONS, ErrorLogSeverity.MILD_ERROR, |
| | |
| | | import org.opends.server.util.Base64; |
| | | |
| | | import static org.opends.server.extensions.ExtensionsConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | |
| | | extends PasswordStorageScheme <PasswordStorageSchemeCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | /** |
| | | * The fully-qualified name of this class. |
| | | */ |
| | | private static final String CLASS_NAME = |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PWSCHEME_CANNOT_INITIALIZE_MESSAGE_DIGEST; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PWSCHEME_CANNOT_BASE64_DECODE_STORED_PASSWORD; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | return false; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | return false; |
| | |
| | | import org.opends.server.util.Base64; |
| | | |
| | | import static org.opends.server.extensions.ExtensionsConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | |
| | | extends PasswordStorageScheme <PasswordStorageSchemeCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | /** |
| | | * The fully-qualified name of this class. |
| | | */ |
| | | private static final String CLASS_NAME = |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PWSCHEME_CANNOT_INITIALIZE_MESSAGE_DIGEST; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PWSCHEME_CANNOT_BASE64_DECODE_STORED_PASSWORD; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | return false; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | return false; |
| | |
| | | import org.opends.server.util.Base64; |
| | | |
| | | import static org.opends.server.extensions.ExtensionsConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | |
| | | extends PasswordStorageScheme <PasswordStorageSchemeCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | /** |
| | | * The fully-qualified name of this class. |
| | | */ |
| | | private static final String CLASS_NAME = |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PWSCHEME_CANNOT_INITIALIZE_MESSAGE_DIGEST; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PWSCHEME_CANNOT_BASE64_DECODE_STORED_PASSWORD; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | return false; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | return false; |
| | |
| | | import org.opends.server.util.Base64; |
| | | |
| | | import static org.opends.server.extensions.ExtensionsConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | |
| | | extends PasswordStorageScheme <PasswordStorageSchemeCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | /** |
| | | * The fully-qualified name of this class. |
| | | */ |
| | | private static final String CLASS_NAME = |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PWSCHEME_CANNOT_INITIALIZE_MESSAGE_DIGEST; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PWSCHEME_CANNOT_BASE64_DECODE_STORED_PASSWORD; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | return false; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | return false; |
| | |
| | | import org.opends.server.util.Base64; |
| | | |
| | | import static org.opends.server.extensions.ExtensionsConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | extends PasswordStorageScheme <PasswordStorageSchemeCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | /** |
| | | * The fully-qualified name of this class. |
| | | */ |
| | | private static final String CLASS_NAME = |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PWSCHEME_CANNOT_INITIALIZE_MESSAGE_DIGEST; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PWSCHEME_CANNOT_BASE64_DECODE_STORED_PASSWORD; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | return false; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | return false; |
| | |
| | | import org.opends.server.types.MemberList; |
| | | import org.opends.server.types.MembershipException; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | public class SimpleStaticGroupMemberList |
| | | extends MemberList |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_STATICMEMBERS_CANNOT_GET_ENTRY; |
| | |
| | | |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | ConfigurationChangeListener<SoftReferenceEntryCacheCfg>, |
| | | Runnable |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | // The set of time units that will be used for expressing the task retention |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // The attempt to add the lock to the list failed, so we need to |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e2); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // The attempt to add the lock to the list failed, so we need to |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e2); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // The attempt to add the lock to the list failed, so we need to |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e2); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // The attempt to add the lock to the list failed, so we need to |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e2); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // This shouldn't happen, but if it does then we can't be sure whether |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // This shouldn't happen, but if it does, then just ignore it. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // This shouldn't happen, but if it does then we can't be sure whether |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // This shouldn't happen, but if it does, then just ignore it. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | public class StartTLSExtendedOperation |
| | | extends ExtendedOperationHandler<ExtendedOperationHandlerCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | logError(ErrorLogCategory.CORE_SERVER, ErrorLogSeverity.MILD_ERROR, |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | logError(ErrorLogCategory.CORE_SERVER, ErrorLogSeverity.MILD_ERROR, |
| | |
| | | import org.opends.server.types.SearchFilter; |
| | | import org.opends.server.types.SearchScope; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | public class StaticGroup |
| | | extends Group |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // The attribute type used to hold the membership list for this group. |
| | | private AttributeType memberAttributeType; |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_STATICGROUP_CANNOT_DECODE_MEMBER_VALUE_AS_DN; |
| | |
| | | import org.opends.server.types.SearchResultEntry; |
| | | import org.opends.server.types.SearchScope; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | implements ConfigurationChangeListener< |
| | | SubjectAttributeToUserAttributeCertificateMapperCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // The DN of the configuration entry for this certificate mapper. |
| | | private DN configEntryDN; |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_SATUACM_PEER_CERT_NOT_X509; |
| | |
| | | import org.opends.server.types.SearchResultEntry; |
| | | import org.opends.server.types.SearchScope; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | implements ConfigurationChangeListener< |
| | | SubjectDNToUserAttributeCertificateMapperCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // The attribute type that will be used to map the certificate's subject. |
| | | private AttributeType subjectAttributeType; |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_SDTUACM_PEER_CERT_NOT_X509; |
| | |
| | | import org.opends.server.types.LockManager; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | extends CertificateMapper<CertificateMapperCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | /** |
| | | * Creates a new instance of this certificate mapper. Note that all actual |
| | | * initialization should be done in the |
| | | * <CODE>initializeCertificateMapper</CODE> method. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_SEDCM_PEER_CERT_NOT_X509; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_SEDCM_CANNOT_DECODE_SUBJECT_AS_DN; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_SEDCM_CANNOT_GET_ENTRY; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_SEDCM_CANNOT_GET_ENTRY; |
| | |
| | | import org.opends.server.types.VirtualAttributeRule; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | extends VirtualAttributeProvider<VirtualAttributeCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | /** |
| | | * Creates a new instance of this subschemaSubentry virtual attribute |
| | | * provider. |
| | | */ |
| | |
| | | import org.opends.server.types.SSLClientAuthPolicy; |
| | | import org.opends.server.util.SelectableCertificateKeyManager; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | public class TLSConnectionSecurityProvider |
| | | extends ConnectionSecurityProvider |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_TLS_SECURITY_PROVIDER_CANNOT_INITIALIZE; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ioe); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ioe); |
| | | } |
| | | |
| | | // An error occurred while trying to communicate with the client. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An unexpected error occurred while trying to process the data read. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ioe); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ioe); |
| | | } |
| | | |
| | | // An error occurred while trying to communicate with the client. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // An unexpected error occurred while trying to process the data read. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | return null; |
| | |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ConfigMessages.*; |
| | | import static org.opends.server.messages.CoreMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | extends WorkQueue |
| | | implements ConfigurableComponent |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_CONFIG_WORK_QUEUE_CANNOT_DETERMINE_NUM_WORKER_THREADS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_CONFIG_WORK_QUEUE_CANNOT_DETERMINE_QUEUE_CAPACITY; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_CONFIG_WORK_QUEUE_CANNOT_CREATE_MONITOR; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | logError(ErrorLogCategory.CORE_SERVER, ErrorLogSeverity.SEVERE_WARNING, |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | logError(ErrorLogCategory.CORE_SERVER, ErrorLogSeverity.SEVERE_WARNING, |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | finally |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | finally |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // This should not happen. The only recourse we have is to log a message |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_CONFIG_WORK_QUEUE_CANNOT_DETERMINE_NUM_WORKER_THREADS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_CONFIG_WORK_QUEUE_CANNOT_DETERMINE_QUEUE_CAPACITY; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_CONFIG_WORK_QUEUE_CANNOT_DETERMINE_NUM_WORKER_THREADS; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_CONFIG_WORK_QUEUE_CANNOT_DETERMINE_QUEUE_CAPACITY; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | finally |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ie); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | finally |
| | |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.Operation; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.CoreMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | |
| | | public class TraditionalWorkerThread |
| | | extends DirectoryThread |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // Indicates whether the Directory Server is shutting down and this thread |
| | | // should stop running. |
| | | private boolean shutdownRequested; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugWarning( |
| | | TRACER.debugWarning( |
| | | "Uncaught exception in worker thread while processing " + |
| | | "operation %s: %s", String.valueOf(operation), e); |
| | | |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | try |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugWarning( |
| | | TRACER.debugWarning( |
| | | "Exception in worker thread while trying to log a " + |
| | | "message about an uncaught exception %s: %s", e, e2); |
| | | |
| | | debugCaught(DebugLogLevel.ERROR, e2); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e2); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo(getName() + " exiting."); |
| | | TRACER.debugInfo(getName() + " exiting."); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo(getName() + " being signaled to shut down."); |
| | | TRACER.debugInfo(getName() + " being signaled to shut down."); |
| | | } |
| | | |
| | | // Set a flag that indicates that the thread should stop running. |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugWarning( |
| | | TRACER.debugWarning( |
| | | "Caught an exception while trying to interrupt the worker " + |
| | | "thread waiting for work: %s", e); |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugWarning( |
| | | TRACER.debugWarning( |
| | | "Caught an exception while trying to abandon the " + |
| | | "operation in progress for the worker thread: %s", e); |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ExtensionsMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | public class VirtualStaticGroup |
| | | extends Group |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // The DN of the entry that holds the definition for this group. |
| | | private DN groupEntryDN; |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, de); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | int msgID = MSGID_VIRTUAL_STATIC_GROUP_CANNOT_DECODE_TARGET; |
| | |
| | | import org.opends.server.types.SearchScope; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | |
| | |
| | | extends DN |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | /** |
| | | * The serial version identifier required to satisfy the compiler because this |
| | | * class implements the {@code java.io.Serializable} interface. This value |
| | | * was generated using the {@code serialver} command-line utility included |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | throw new RuntimeException(stackTraceToSingleLineString(e)); |
| | |
| | | import org.opends.server.admin.server.ConfigurationDeleteListener; |
| | | import org.opends.server.admin.ClassPropertyDefinition; |
| | | import org.opends.server.config.ConfigException; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ConfigMessages. |
| | | MSGID_CONFIG_LOGGER_CANNOT_CREATE_LOGGER; |
| | | import static org.opends.server.messages.ConfigMessages. |
| | |
| | | ConfigurationDeleteListener<AccessLogPublisherCfg>, |
| | | ConfigurationChangeListener<AccessLogPublisherCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // The set of access loggers that have been registered with the server. It |
| | | // will initially be empty. |
| | | static ConcurrentHashMap<DN, AccessLogPublisher> accessPublishers = |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | messages.add(e.getMessage()); |
| | | resultCode = DirectoryServer.getServerErrorResultCode(); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | int msgID = MSGID_CONFIG_LOGGER_CANNOT_CREATE_LOGGER; |
| | | messages.add(getMessage(msgID, String.valueOf(config.dn().toString()), |
| | |
| | | import org.opends.server.core.DirectoryServer; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.ConfigMessages.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | import static org.opends.server.messages.MessageHandler.getMessage; |
| | |
| | | ConfigurationDeleteListener<ErrorLogPublisherCfg>, |
| | | ConfigurationChangeListener<ErrorLogPublisherCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // The set of error loggers that have been registered with the server. It |
| | | // will initially be empty. |
| | | private static ConcurrentHashMap<DN, ErrorLogPublisher> errorPublishers = |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | messages.add(e.getMessage()); |
| | | resultCode = DirectoryServer.getServerErrorResultCode(); |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | int msgID = MSGID_CONFIG_LOGGER_CANNOT_CREATE_LOGGER; |
| | | messages.add(getMessage(msgID, String.valueOf(config.dn().toString()), |
| | |
| | | import java.util.List; |
| | | import java.util.ArrayList; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugInfo; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | |
| | | RetentionPolicy<FileCountLogRetentionPolicyCfg>, |
| | | ConfigurationChangeListener<FileCountLogRetentionPolicyCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | private int numFiles = 0; |
| | | |
| | |
| | | { |
| | | if(debugEnabled()) |
| | | { |
| | | debugInfo("Deleting log file:", files[j]); |
| | | TRACER.debugInfo("Deleting log file:", files[j]); |
| | | } |
| | | files[j].delete(); |
| | | count++; |
| | |
| | | |
| | | import org.opends.server.util.TimeThread; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugInfo; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.admin.std.server.FixedTimeLogRotationPolicyCfg; |
| | | import org.opends.server.admin.server.ConfigurationChangeListener; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | |
| | | RotationPolicy<FixedTimeLogRotationPolicyCfg>, |
| | | ConfigurationChangeListener<FixedTimeLogRotationPolicyCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | private static final long MS_IN_DAY = 24 * 3600 * 1000; |
| | | |
| | |
| | | |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("As of %d, the next rotation at fixed time is: %d", |
| | | currTime, nextRotationTime); |
| | | TRACER.debugInfo("The next fixed rotation time in %ds", |
| | | (currTime - nextRotationTime)/1000); |
| | | } |
| | | |
| | | return currTime > nextRotationTime; |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugInfo; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | |
| | | RetentionPolicy<FreeDiskSpaceLogRetentionPolicyCfg>, |
| | | ConfigurationChangeListener<FreeDiskSpaceLogRetentionPolicyCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | private long freeDiskSpace = 0; |
| | | |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | if(debugEnabled()) |
| | | { |
| | | debugInfo("Current free disk space: %d, Required: %d", freeSpace, |
| | | TRACER.debugInfo("Current free disk space: %d, Required: %d", freeSpace, |
| | | freeDiskSpace); |
| | | } |
| | | |
| | |
| | | freedSpace += files[j].length(); |
| | | if(debugEnabled()) |
| | | { |
| | | debugInfo("Deleting log file:", files[j]); |
| | | TRACER.debugInfo("Deleting log file:", files[j]); |
| | | } |
| | | files[j].delete(); |
| | | if (freedSpace >= freeSpaceNeeded) |
| | |
| | | import java.io.IOException; |
| | | import java.util.zip.GZIPOutputStream; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | |
| | | /** |
| | |
| | | */ |
| | | public class GZIPAction implements PostRotationAction |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | private File originalFile; |
| | | private File newFile; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ioe); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ioe); |
| | | } |
| | | if (inputStreamOpen) |
| | | { |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, fe); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, fe); |
| | | } |
| | | // Cannot do much. Ignore. |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ge); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ge); |
| | | } |
| | | // Cannot do much. Ignore. |
| | | } |
| | |
| | | import org.opends.server.util.TimeThread; |
| | | import static org.opends.server.util.StaticUtils.stackTraceToSingleLineString; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugVerbose; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.LoggerMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | |
| | | implements ServerShutdownListener, TextWriter, |
| | | ConfigurationChangeListener<SizeLimitLogRotationPolicyCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | private static final String UTF8_ENCODING= "UTF-8"; |
| | | |
| | | private CopyOnWriteArrayList<RotationPolicy> rotationPolicies = |
| | |
| | | sizePolicy.currentConfig.removeSizeLimitChangeListener(this); |
| | | } |
| | | } |
| | | |
| | | this.rotationPolicies.clear(); |
| | | } |
| | | |
| | | /** |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | if (debugEnabled()) |
| | | { |
| | | debugVerbose("%d files deleted by rentention policy", |
| | | TRACER.debugVerbose("%d files deleted by rentention policy", |
| | | numFilesDeleted); |
| | | } |
| | | } |
| | |
| | | } |
| | | catch(Exception e) |
| | | { |
| | | if(debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | errorHandler.handleCloseError(e); |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if(debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | errorHandler.handleOpenError(currentFile, e); |
| | | } |
| | | |
| | |
| | | // new RotationActionThread(newFile, actions, configEntry); |
| | | //rotThread.start(); |
| | | |
| | | if(debugEnabled()) |
| | | { |
| | | TRACER.debugInfo("Log file %s rotated and renamed to %s", |
| | | currentFile, newFile); |
| | | } |
| | | |
| | | totalFilesRotated++; |
| | | lastRotationTime = TimeThread.getTime(); |
| | | } |
| | |
| | | import org.opends.server.api.DirectoryThread; |
| | | import org.opends.server.config.ConfigEntry; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | |
| | | /** |
| | |
| | | */ |
| | | public class RotationActionThread extends DirectoryThread |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | private ArrayList<ActionType> actions; |
| | | private String filename; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | import org.opends.server.admin.std.server.SizeLimitLogRetentionPolicyCfg; |
| | | import org.opends.server.admin.server.ConfigurationChangeListener; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugInfo; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | |
| | | RetentionPolicy<SizeLimitLogRetentionPolicyCfg>, |
| | | ConfigurationChangeListener<SizeLimitLogRetentionPolicyCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | private long size = 0; |
| | | |
| | |
| | | |
| | | if(debugEnabled()) |
| | | { |
| | | debugInfo("Total size of files: %d, Max: %d", totalLength, size); |
| | | TRACER.debugInfo("Total size of files: %d, Max: %d", totalLength, size); |
| | | } |
| | | |
| | | if (totalLength <= size) |
| | |
| | | freedSpace += files[j].length(); |
| | | if(debugEnabled()) |
| | | { |
| | | debugInfo("Deleting log file:", files[j]); |
| | | TRACER.debugInfo("Deleting log file:", files[j]); |
| | | } |
| | | files[j].delete(); |
| | | if (freedSpace >= freeSpaceNeeded) |
| | |
| | | package org.opends.server.loggers; |
| | | |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugInfo; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.admin.std.server.SizeLimitLogRotationPolicyCfg; |
| | | import org.opends.server.admin.server.ConfigurationChangeListener; |
| | | import org.opends.server.types.InitializationException; |
| | |
| | | RotationPolicy<SizeLimitLogRotationPolicyCfg>, |
| | | ConfigurationChangeListener<SizeLimitLogRotationPolicyCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | private long sizeLimit; |
| | | |
| | |
| | | */ |
| | | public boolean rotateFile(MultifileTextWriter writer) |
| | | { |
| | | if (writer.getBytesWritten() >= sizeLimit) |
| | | long fileSize = writer.getBytesWritten(); |
| | | |
| | | if (debugEnabled()) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugInfo("%d bytes written in current file", writer.getBytesWritten()); |
| | | } |
| | | return true; |
| | | TRACER.debugInfo("%d bytes written in current log file. " + |
| | | "Next rotation occurs at %d bytes", writer.getBytesWritten(), |
| | | sizeLimit); |
| | | } |
| | | return false; |
| | | |
| | | return fileSize >= sizeLimit; |
| | | } |
| | | |
| | | } |
| | |
| | | import org.opends.server.admin.server.ConfigurationChangeListener; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.ResultCode; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | |
| | | import java.util.List; |
| | | import java.util.ArrayList; |
| | |
| | | RotationPolicy<TimeLimitLogRotationPolicyCfg>, |
| | | ConfigurationChangeListener<TimeLimitLogRotationPolicyCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | private long timeInterval = 0; |
| | | |
| | | /** |
| | |
| | | public boolean rotateFile(MultifileTextWriter writer) |
| | | { |
| | | long currTime = TimeThread.getTime(); |
| | | return currTime - writer.getLastRotationTime() > timeInterval; |
| | | long currInterval = currTime - writer.getLastRotationTime(); |
| | | |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugInfo("Last rotation occured %ds ago. " + |
| | | "Next rotation in %ds", currInterval / 1000, |
| | | (timeInterval - currInterval)/1000); |
| | | } |
| | | |
| | | return currInterval > timeInterval; |
| | | } |
| | | |
| | | } |
| | |
| | | import java.util.zip.ZipEntry; |
| | | import java.util.zip.ZipOutputStream; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | |
| | | /** |
| | |
| | | */ |
| | | public class ZIPAction implements PostRotationAction |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | |
| | | private File originalFile; |
| | | private File newFile; |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ioe); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ioe); |
| | | } |
| | | if (inputStreamOpen) |
| | | { |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, fe); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, fe); |
| | | } |
| | | // Cannot do much. Ignore. |
| | | } |
| | |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, ze); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ze); |
| | | } |
| | | // Cannot do much. Ignore. |
| | | } |
| New file |
| | |
| | | /* |
| | | * CDDL HEADER START |
| | | * |
| | | * The contents of this file are subject to the terms of the |
| | | * Common Development and Distribution License, Version 1.0 only |
| | | * (the "License"). You may not use this file except in compliance |
| | | * with the License. |
| | | * |
| | | * You can obtain a copy of the license at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE |
| | | * or https://OpenDS.dev.java.net/OpenDS.LICENSE. |
| | | * See the License for the specific language governing permissions |
| | | * and limitations under the License. |
| | | * |
| | | * When distributing Covered Code, include this CDDL HEADER in each |
| | | * file and include the License file at |
| | | * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, |
| | | * add the following below this CDDL HEADER, with the fields enclosed |
| | | * by brackets "[]" replaced with your own identifying information: |
| | | * Portions Copyright [yyyy] [name of copyright owner] |
| | | * |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006-2007 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.loggers.debug; |
| | | |
| | | import org.aspectj.lang.annotation.*; |
| | | import org.aspectj.lang.JoinPoint; |
| | | |
| | | import static |
| | | org.opends.server.loggers.debug.DebugLogger.DEFAULT_CONSTRUCTOR_LEVEL; |
| | | import static |
| | | org.opends.server.loggers.debug.DebugLogger.DEFAULT_ENTRY_EXIT_LEVEL; |
| | | import static |
| | | org.opends.server.loggers.debug.DebugLogger.DEFAULT_THROWN_LEVEL; |
| | | |
| | | /** |
| | | * An aspect for source-code tracing at the method level. |
| | | * |
| | | * One DebugLogger aspect instance exists for each Java class using tracing. |
| | | * Tracer must be registered with the DebugLogger. |
| | | * |
| | | * Logging is always done at a level basis, with debug log messages |
| | | * exceeding the trace threshold being traced, others being discarded. |
| | | */ |
| | | @Aspect() |
| | | public class DebugAspect |
| | | { |
| | | /** |
| | | * Pointcut for matching static context events. |
| | | */ |
| | | @Pointcut("!this(Object)") |
| | | private void staticContext() |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * Pointcut for matching non static context events. |
| | | * @param obj The object being operated on. |
| | | */ |
| | | @Pointcut("this(obj)") |
| | | private void nonStaticContext(Object obj) |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * Pointcut for matching all toString() methods. |
| | | */ |
| | | @Pointcut("execution(* *..toString(..))") |
| | | private void toStringMethod() |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * Pointcut for matching all getMessage() methods. |
| | | */ |
| | | @Pointcut("execution(String org.opends.server." + |
| | | "messages.MessageHandler.getMessage(..))") |
| | | private void getMessageMethod() |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * Pointcut for matching the getDirectoryThreadGroup method. |
| | | */ |
| | | @Pointcut("execution(public static ThreadGroup org.opends.server." + |
| | | "core.DirectoryServer.getDirectoryThreadGroup(..))") |
| | | private void getThreadGroupMethod() |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * Pointcut for matching all getDebugProperties() methods. |
| | | * TODO: Make this less general. Find out if pointcut matches |
| | | * subclass methods. |
| | | */ |
| | | @Pointcut("execution(* *..getDebugProperties(..))") |
| | | private void getDebugPropertiesMethod() |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * Pointcut for matching all logging related classes. |
| | | */ |
| | | @Pointcut("within(org.opends.server.loggers.*+ || " + |
| | | "org.opends.server.loggers.debug..*+ || " + |
| | | "org.opends.server.types.DebugLogLevel+ || " + |
| | | "org.opends.server.types.DebugLogCategory+ || " + |
| | | "org.opends.server.api.DebugLogPublisher+ || " + |
| | | "org.opends.server.util.TimeThread+ ||" + |
| | | "org.opends.server.util.MultiOutputStream+)") |
| | | private void debugRelatedClasses() |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * Pointcut to exclude all pointcuts which should not be adviced by the |
| | | * debug logger. |
| | | */ |
| | | @Pointcut("toStringMethod() || getMessageMethod() || " + |
| | | "getDebugPropertiesMethod() || debugRelatedClasses() || " + |
| | | "getThreadGroupMethod()") |
| | | private void excluded() |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * Pointcut for matching the execution of all public methods. |
| | | */ |
| | | @Pointcut("execution(!@(DebugLogger.NoDebugTracing || " + |
| | | "DebugLogger.NoEntryDebugTracing) public * *(..)) && " + |
| | | "!excluded()") |
| | | void tracedEntryMethod() |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * Pointcut for matching the execution of all public methods. |
| | | */ |
| | | @Pointcut("execution(!@(DebugLogger.NoDebugTracing || " + |
| | | "DebugLogger.NoExitDebugTracing) public * *(..)) && " + |
| | | "!excluded()") |
| | | void tracedExitMethod() |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * Pointcut for matching the execution of all public methods. |
| | | */ |
| | | @Pointcut("execution(@DebugLogger.TraceThrown public * *(..)) && " + |
| | | "!excluded()") |
| | | void tracedThrownMethod() |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * Pointcut for matching the execution of all constructors. |
| | | */ |
| | | @Pointcut("execution(!@(DebugLogger.NoDebugTracing || " + |
| | | "DebugLogger.NoEntryDebugTracing) public new(..)) && !excluded()") |
| | | void tracedEntryConstructor() |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * Pointcut for matching the execution of all constructors. |
| | | */ |
| | | @Pointcut("execution(!@(DebugLogger.NoDebugTracing || " + |
| | | "DebugLogger.NoExitDebugTracing) public new(..)) && !excluded()") |
| | | void tracedExitConstructor() |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * Pointcut for matching only if there are publishers. |
| | | * |
| | | * @return if debug logging is enabled. |
| | | */ |
| | | @Pointcut("if()") |
| | | public static boolean shouldTrace() |
| | | { |
| | | return DebugLogger.enabled; |
| | | } |
| | | |
| | | /** |
| | | * AspectJ Implementation. |
| | | * |
| | | * @param thisJoinPoint the JoinPoint reflection object. |
| | | */ |
| | | @Before("shouldTrace() && tracedEntryConstructor()") |
| | | public void traceConstructor(JoinPoint thisJoinPoint) |
| | | { |
| | | String signature = |
| | | thisJoinPoint.getSignature().getDeclaringTypeName(); |
| | | Object[] args = thisJoinPoint.getArgs(); |
| | | DebugTracer tracer = DebugLogger.getTracer(signature); |
| | | if(tracer != null) |
| | | { |
| | | tracer.debugConstructor( |
| | | DEFAULT_CONSTRUCTOR_LEVEL, args); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * AspectJ Implementation. |
| | | * |
| | | * @param thisJoinPoint the JoinPoint reflection object. |
| | | * @param obj the object this method operations on. |
| | | */ |
| | | @Before("shouldTrace() && tracedEntryMethod() && nonStaticContext(obj)") |
| | | public void traceNonStaticMethodEntry(JoinPoint thisJoinPoint, Object obj) |
| | | { |
| | | String signature = |
| | | thisJoinPoint.getSignature().getDeclaringTypeName(); |
| | | Object[] args = thisJoinPoint.getArgs(); |
| | | Object callerInstance = thisJoinPoint.getThis(); |
| | | DebugTracer tracer = DebugLogger.getTracer(signature); |
| | | if(tracer != null) |
| | | { |
| | | tracer.debugMethodEntry( |
| | | DEFAULT_ENTRY_EXIT_LEVEL, callerInstance, args); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * AspectJ Implementation. |
| | | * |
| | | * @param thisJoinPoint the JoinPoint reflection object. |
| | | */ |
| | | @Before("shouldTrace() && tracedEntryMethod() && staticContext()") |
| | | public void traceStaticMethodEntry(JoinPoint thisJoinPoint) |
| | | { |
| | | String signature = |
| | | thisJoinPoint.getSignature().getDeclaringTypeName(); |
| | | Object[] args = thisJoinPoint.getArgs(); |
| | | DebugTracer tracer = DebugLogger.getTracer(signature); |
| | | if(tracer != null) |
| | | { |
| | | tracer.debugStaticMethodEntry( |
| | | DEFAULT_ENTRY_EXIT_LEVEL, args); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * AspectJ Implementation. |
| | | * |
| | | * @param thisJoinPointStaticPart the JoinPoint reflection object. |
| | | * @param ret the return value of the method. |
| | | */ |
| | | @AfterReturning(pointcut = "shouldTrace() && " + |
| | | "(tracedExitMethod() || tracedExitConstructor())", |
| | | returning = "ret") |
| | | public void traceReturn(JoinPoint.StaticPart thisJoinPointStaticPart, |
| | | Object ret) |
| | | { |
| | | String signature = |
| | | thisJoinPointStaticPart.getSignature().getDeclaringTypeName(); |
| | | DebugTracer tracer = DebugLogger.getTracer(signature); |
| | | if(tracer != null) |
| | | { |
| | | tracer.debugReturn( |
| | | DEFAULT_ENTRY_EXIT_LEVEL, ret); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * AspectJ Implementation. |
| | | * |
| | | * @param thisJoinPointStaticPart the JoinPoint reflection object. |
| | | * @param ex the exception thrown. |
| | | */ |
| | | @SuppressAjWarnings({"adviceDidNotMatch"}) |
| | | @AfterThrowing(pointcut = "shouldTrace() && tracedThrownMethod()", |
| | | throwing = "ex") |
| | | public void traceThrown(JoinPoint.StaticPart thisJoinPointStaticPart, |
| | | Throwable ex) |
| | | { |
| | | String signature = |
| | | thisJoinPointStaticPart.getSignature().getDeclaringTypeName(); |
| | | DebugTracer tracer = DebugLogger.getTracer(signature); |
| | | if(tracer != null) |
| | | { |
| | | tracer.debugThrown( |
| | | DEFAULT_THROWN_LEVEL, ex); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | import java.util.*; |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | | import java.util.concurrent.CopyOnWriteArraySet; |
| | | import java.nio.ByteBuffer; |
| | | import java.lang.reflect.Method; |
| | | import java.lang.reflect.InvocationTargetException; |
| | | |
| | | import org.opends.server.api.ProtocolElement; |
| | | import org.opends.server.api.DebugLogPublisher; |
| | | import org.opends.server.loggers.*; |
| | | import org.opends.server.types.*; |
| | | import org.opends.server.util.DynamicConstants; |
| | | import org.opends.server.admin.std.server.DebugLogPublisherCfg; |
| | | import org.opends.server.admin.std.meta.DebugLogPublisherCfgDefn; |
| | | import org.opends.server.admin.server.ConfigurationAddListener; |
| | |
| | | import static org.opends.server.messages.ConfigMessages.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | import com.sleepycat.je.*; |
| | | |
| | | /** |
| | | * A logger for debug and trace logging. DebugLogger provides a debugging |
| | | * management access point. It is used to configure the Tracers, as well as |
| | |
| | | static final LogLevel DEFAULT_THROWN_LEVEL = |
| | | DebugLogLevel.ERROR; |
| | | |
| | | // The set of all DebugTracer aspect instances. |
| | | static CopyOnWriteArraySet<DebugTracer> classTracers = |
| | | new CopyOnWriteArraySet<DebugTracer>(); |
| | | // The set of all DebugTracer instances. |
| | | private static ConcurrentHashMap<String, DebugTracer> classTracers = |
| | | new ConcurrentHashMap<String, DebugTracer>(); |
| | | |
| | | // The set of debug loggers that have been registered with the server. It |
| | | // will initially be empty. |
| | | static ConcurrentHashMap<DN, |
| | | private static ConcurrentHashMap<DN, |
| | | DebugLogPublisher> debugPublishers = |
| | | new ConcurrentHashMap<DN, |
| | | DebugLogPublisher>(); |
| | |
| | | { |
| | | debugPublishers.put(dn, publisher); |
| | | |
| | | // Update all existing aspect instances |
| | | addTracerSettings(publisher); |
| | | updateTracerSettings(); |
| | | |
| | | enabled = DynamicConstants.WEAVE_ENABLED; |
| | | enabled = true; |
| | | } |
| | | |
| | | /** |
| | |
| | | if(removed != null) |
| | | { |
| | | removed.close(); |
| | | removeTracerSettings(removed); |
| | | } |
| | | |
| | | updateTracerSettings(); |
| | | |
| | | if(debugPublishers.isEmpty()) |
| | | { |
| | | enabled = false; |
| | |
| | | for(DebugLogPublisher publisher : debugPublishers.values()) |
| | | { |
| | | publisher.close(); |
| | | removeTracerSettings(publisher); |
| | | } |
| | | |
| | | debugPublishers.clear(); |
| | | |
| | | updateTracerSettings(); |
| | | |
| | | enabled = false; |
| | | } |
| | | |
| | |
| | | } |
| | | catch(ConfigException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | messages.add(e.getMessage()); |
| | | resultCode = DirectoryServer.getServerErrorResultCode(); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | int msgID = MSGID_CONFIG_LOGGER_CANNOT_CREATE_LOGGER; |
| | | messages.add(getMessage(msgID, String.valueOf(config.dn().toString()), |
| | | stackTraceToSingleLineString(e))); |
| | |
| | | } |
| | | |
| | | /** |
| | | * Adds the settings for the provided publisher in all existing tracers. |
| | | * If existing settings exist for the given publisher, it will be updated |
| | | * with the new settings. |
| | | * |
| | | * @param publisher The debug log publisher with the new settings. |
| | | * Update all debug tracers with the settings in the registered |
| | | * publishers. |
| | | */ |
| | | @SuppressWarnings("unchecked") |
| | | public static void addTracerSettings(DebugLogPublisher publisher) |
| | | static void updateTracerSettings() |
| | | { |
| | | // Make sure this publisher is still registered with us. If not, don't |
| | | // use its settings. |
| | | if(debugPublishers.contains(publisher)) |
| | | { |
| | | for(DebugTracer tracer : classTracers) |
| | | { |
| | | tracer.classSettings.put(publisher, |
| | | publisher.getClassSettings(tracer.className)); |
| | | DebugLogPublisher[] publishers = |
| | | debugPublishers.values().toArray(new DebugLogPublisher[0]); |
| | | |
| | | // For some reason, the compiler doesn't see that |
| | | // debugLogPublihser.getMethodSettings returns a parameterized Map. |
| | | // This problem goes away if a parameterized verson of |
| | | // DebugLogPublisher is used. However, we can't not use reflection to |
| | | // instantiate a generic |
| | | // DebugLogPublisher<? extends DebugLogPublisherCfg> type. The only |
| | | // thing we can do is to just suppress the compiler warnings. |
| | | Map<String, TraceSettings> methodSettings = |
| | | publisher.getMethodSettings(tracer.className); |
| | | if(methodSettings != null) |
| | | { |
| | | tracer.methodSettings.put(publisher, methodSettings); |
| | | } |
| | | } |
| | | for(DebugTracer tracer : classTracers.values()) |
| | | { |
| | | tracer.updateSettings(publishers); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * Removes the settings for the provided publisher in all existing tracers. |
| | | * |
| | | * @param publisher The debug log publisher to remove. |
| | | */ |
| | | public static void removeTracerSettings(DebugLogPublisher publisher) |
| | | { |
| | | for(DebugTracer tracer : classTracers) |
| | | { |
| | | tracer.classSettings.remove(publisher); |
| | | tracer.methodSettings.remove(publisher); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Indicates if debug logging is enabled. |
| | | * |
| | | * @return True if debug logging is enabled. False otherwise. |
| | |
| | | } |
| | | |
| | | /** |
| | | * Stub method for logging an arbitrary event in a method at the INFO level. |
| | | * Implementation provided by AspectJ. |
| | | * Creates a new Debug Tracer for the caller class and registers it |
| | | * with the Debug Logger. |
| | | * |
| | | * @param msg the message to be logged. |
| | | * @return The tracer created for the caller class. |
| | | */ |
| | | public static void debugVerbose(String msg) {} |
| | | public static DebugTracer getTracer() |
| | | { |
| | | DebugTracer tracer = |
| | | new DebugTracer(debugPublishers.values(). |
| | | toArray(new DebugLogPublisher[0])); |
| | | classTracers.put(tracer.getTracedClassName(), tracer); |
| | | |
| | | return tracer; |
| | | } |
| | | |
| | | /** |
| | | * Stub method for logging an arbitrary event in a method at the INFO level. |
| | | * Implementation provided by AspectJ. |
| | | * Returns the registered Debug Tracer for a traced class. |
| | | * |
| | | * @param msg the message to be logged. |
| | | * @param className The name of the class tracer to retrieve. |
| | | * @return The tracer for the provided class or null if there are |
| | | * no tracers registered. |
| | | */ |
| | | public static void debugInfo(String msg) {} |
| | | |
| | | |
| | | /** |
| | | * Stub method for logging an arbitrary event in a method at the WARNING |
| | | * level. Implementation provided by AspectJ. |
| | | * |
| | | * @param msg the message to be logged. |
| | | */ |
| | | public static void debugWarning(String msg) {} |
| | | |
| | | |
| | | /** |
| | | * Stub method for logging an arbitrary event in a method at the ERROR |
| | | * level. Implementation provided by AspectJ. |
| | | * |
| | | * @param msg the message to be logged. |
| | | */ |
| | | public static void debugError(String msg) {} |
| | | |
| | | |
| | | /** |
| | | * Stub method for logging an arbitrary event in a method at the INFO |
| | | * level. Implementation provided by AspectJ. |
| | | * |
| | | * @param msg The message to be formatted and logged. |
| | | * @param msgArgs The set of arguments to use to replace tokens in the |
| | | * format string before it is returned. |
| | | */ |
| | | public static void debugVerbose(String msg, Object... msgArgs) {} |
| | | |
| | | |
| | | /** |
| | | * Stub method for logging an arbitrary event in a method at the INFO |
| | | * level. Implementation provided by AspectJ. |
| | | * |
| | | * @param msg The message to be formatted and logged. |
| | | * @param msgArgs The set of arguments to use to replace tokens in the |
| | | * format string before it is returned. |
| | | */ |
| | | public static void debugInfo(String msg, Object... msgArgs) {} |
| | | |
| | | |
| | | /** |
| | | * Stub method for logging an arbitrary event in a method at the WARNING |
| | | * level. Implementation provided by AspectJ. |
| | | * |
| | | * @param msg The message to be formatted and logged. |
| | | * @param msgArgs The set of arguments to use to replace tokens in the |
| | | * format string before it is returned. |
| | | */ |
| | | public static void debugWarning(String msg, Object... msgArgs) |
| | | {} |
| | | |
| | | |
| | | /** |
| | | * Stub method for logging an arbitrary event in a method at the ERROR |
| | | * level. Implementation provided by AspectJ. |
| | | * |
| | | * @param msg The message to be formatted and logged. |
| | | * @param msgArgs The set of arguments to use to replace tokens in the |
| | | * format string before it is returned. |
| | | */ |
| | | public static void debugError(String msg, Object... msgArgs) |
| | | {} |
| | | |
| | | |
| | | /** |
| | | * Stub method for logging an arbitrary event in a method. |
| | | * Implementation provided by AspectJ. |
| | | * |
| | | * @param level The level of the message being logged. |
| | | * @param msg The message to be logged. |
| | | */ |
| | | public static void debugMessage(LogLevel level, String msg) |
| | | {} |
| | | |
| | | |
| | | /** |
| | | * Stub method for logging an arbitrary event in a method. |
| | | * Implementation provided by AspectJ. |
| | | * |
| | | * @param level The level of the message being logged. |
| | | * @param msg The message to be formatted and logged. |
| | | * @param msgArgs The set of arguments to use to replace tokens in the |
| | | * format string before it is returned. |
| | | */ |
| | | public static void debugMessage(LogLevel level, String msg, |
| | | Object... msgArgs) {} |
| | | |
| | | |
| | | /** |
| | | * Stub method for logging a caught exception in a method. |
| | | * Implementation provided by AspectJ. |
| | | * |
| | | * @param level The level of the message being logged. |
| | | * @param t The exception caught. |
| | | */ |
| | | public static void debugCaught(LogLevel level, Throwable t) |
| | | {} |
| | | |
| | | /** |
| | | * Stub method for logging a thrown exception in a method. |
| | | * Implementation provided by AspectJ. |
| | | * |
| | | * @param level The level of the message being logged. |
| | | * @param t The exception being thrown. |
| | | */ |
| | | public static void debugThrown(LogLevel level, Throwable t) |
| | | {} |
| | | |
| | | |
| | | /** |
| | | * Stub method for logging an JE database access in a method. |
| | | * Implementation provided by AspectJ. |
| | | * |
| | | * @param level The level of the message being logged. |
| | | * @param status The JE return status code of the operation. |
| | | * @param database The JE database handle operated on. |
| | | * @param txn The JE transaction handle used in the operation. |
| | | * @param key The database key operated on. |
| | | * @param data The database value read or written. |
| | | */ |
| | | public static void debugJEAccess(LogLevel level, |
| | | OperationStatus status, |
| | | Database database, |
| | | Transaction txn, |
| | | DatabaseEntry key, DatabaseEntry data) {} |
| | | |
| | | /** |
| | | * Stub method for logging raw data in a method. |
| | | * Implementation provided by AspectJ. |
| | | * |
| | | * @param level The level of the message being logged. |
| | | * @param bytes The data to dump. |
| | | */ |
| | | public static void debugData(LogLevel level, byte[] bytes) {} |
| | | |
| | | /** |
| | | * Stub method for logging raw data in a method. |
| | | * Implementation provided by AspectJ. |
| | | * |
| | | * @param level The level of the message being logged. |
| | | * @param buffer The data to dump. |
| | | */ |
| | | public static void debugData(LogLevel level, ByteBuffer buffer) {} |
| | | |
| | | /** |
| | | * Stub method for logging a protocol element in a method. |
| | | * Implementation provided by AspectJ. |
| | | * |
| | | * @param level The level of the message being logged. |
| | | * @param element The protocol element to dump. |
| | | */ |
| | | public static void debugProtocolElement(LogLevel level, |
| | | ProtocolElement element) {} |
| | | |
| | | public static DebugTracer getTracer(String className) |
| | | { |
| | | return classTracers.get(className); |
| | | } |
| | | |
| | | /** |
| | | * Classes and methods annotated with @NoDebugTracing will not be weaved with |
| | |
| | | // Skip leading frames debug logging classes |
| | | while (firstFrame < frames.length && |
| | | isFrameForPackage(frames[firstFrame], |
| | | "org.opends.server.loggers")) { |
| | | "org.opends.server.loggers.debug")) { |
| | | firstFrame++; |
| | | } |
| | | |
| | |
| | | */ |
| | | public static String formatStackTrace(Throwable t) |
| | | { |
| | | return formatStackTrace(t, null, COMPLETE_STACK, true); |
| | | return formatStackTrace(t, COMPLETE_STACK, true); |
| | | } |
| | | |
| | | /** |
| | | * Generate a String representation of the possibly filtered stack trace |
| | | * of the given Throwable. |
| | | * @param t - the Throwable for which to generate the stack trace. |
| | | * @param filter - a FrameFilter to use to exclude some stack frames from |
| | | * the trace. If null, no filtering is performed. |
| | | * @param maxDepth - the maximum number of stack frames to include in the |
| | | * trace. |
| | | * @param includeCause - also include the stack trace for the cause Throwable. |
| | | * @return the stack trace. |
| | | */ |
| | | public static String formatStackTrace(Throwable t, FrameFilter filter, |
| | | int maxDepth, boolean includeCause) |
| | | public static String formatStackTrace(Throwable t, int maxDepth, |
| | | boolean includeCause) |
| | | { |
| | | StringBuffer buffer= new StringBuffer(); |
| | | |
| | | while(t != null) |
| | | { |
| | | StackTraceElement[] frames = t.getStackTrace(); |
| | | if(filter != null) |
| | | { |
| | | frames = filter.getFilteredStackTrace(frames); |
| | | } |
| | | |
| | | if (frames != null) { |
| | | int frameLimit= Math.min(maxDepth, frames.length); |
| | |
| | | /** |
| | | * Generate a String representation of the possibly filtered stack trace |
| | | * from the current position in executation. |
| | | * @param filter - a FrameFilter to use to exclude some stack frames from |
| | | * the trace. If null, no filtering is performed. |
| | | * |
| | | * @param stackTrace - The stack trace elements to format. |
| | | * @param maxDepth - the maximum number of stack frames to include in the |
| | | * trace. |
| | | * @return the stack trace. |
| | | */ |
| | | public static String formatStackTrace(FrameFilter filter, int maxDepth) |
| | | public static String formatStackTrace(StackTraceElement[] stackTrace, |
| | | int maxDepth) |
| | | { |
| | | StringBuffer buffer= new StringBuffer(); |
| | | |
| | | StackTraceElement[] frames = Thread.currentThread().getStackTrace(); |
| | | if(filter != null) |
| | | { |
| | | frames = filter.getFilteredStackTrace(frames); |
| | | } |
| | | |
| | | if (frames != null) { |
| | | int frameLimit= Math.min(maxDepth, frames.length); |
| | | if (stackTrace != null) { |
| | | int frameLimit= Math.min(maxDepth, stackTrace.length); |
| | | if (frameLimit > 0) { |
| | | |
| | | |
| | | for (int i= 0; i < frameLimit; i++) { |
| | | buffer.append(" "); |
| | | buffer.append(frames[i]); |
| | | buffer.append(stackTrace[i]); |
| | | buffer.append(EOL); |
| | | } |
| | | |
| | | if(frameLimit < frames.length) |
| | | if(frameLimit < stackTrace.length) |
| | | { |
| | | buffer.append(" ...("); |
| | | buffer.append(frames.length - frameLimit); |
| | | buffer.append(stackTrace.length - frameLimit); |
| | | buffer.append(" more)"); |
| | | buffer.append(EOL); |
| | | } |
| | |
| | | */ |
| | | package org.opends.server.loggers.debug; |
| | | |
| | | import org.aspectj.lang.annotation.*; |
| | | import org.aspectj.lang.JoinPoint; |
| | | import org.opends.server.api.DebugLogPublisher; |
| | | import org.opends.server.api.ProtocolElement; |
| | | import org.opends.server.types.DebugLogCategory; |
| | |
| | | import org.opends.server.loggers.LogLevel; |
| | | import org.opends.server.loggers.LogCategory; |
| | | |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | import java.nio.ByteBuffer; |
| | | |
| | | import com.sleepycat.je.OperationStatus; |
| | | import com.sleepycat.je.Database; |
| | | import com.sleepycat.je.Transaction; |
| | | import com.sleepycat.je.DatabaseEntry; |
| | | |
| | | import static |
| | | org.opends.server.loggers.debug.DebugLogger.DEFAULT_CONSTRUCTOR_LEVEL; |
| | | import static |
| | | org.opends.server.loggers.debug.DebugLogger.DEFAULT_ENTRY_EXIT_LEVEL; |
| | | import static |
| | | org.opends.server.loggers.debug.DebugLogger.DEFAULT_THROWN_LEVEL; |
| | | import static |
| | | org.opends.server.loggers.debug.DebugLogger.debugPublishers; |
| | | import static |
| | | org.opends.server.loggers.debug.DebugLogger.classTracers; |
| | | import com.sleepycat.je.Database; |
| | | |
| | | /** |
| | | * An aspect for source-code tracing at the method level. |
| | | * Class for source-code tracing at the method level. |
| | | * |
| | | * One DebugLogger aspect instance exists for each Java class using tracing. |
| | | * One DebugTracer instance exists for each Java class using tracing. |
| | | * Tracer must be registered with the DebugLogger. |
| | | * |
| | | * Logging is always done at a level basis, with debug log messages |
| | | * exceeding the trace threshold being traced, others being discarded. |
| | | */ |
| | | @Aspect("pertypewithin(!@DebugLogger.NoDebugTracing org.opends.server..*+ && " + |
| | | "!org.opends.server.loggers.*+ && " + |
| | | "!org.opends.server.loggers.debug..*+ &&" + |
| | | "!org.opends.server.types.DebugLogLevel+ && " + |
| | | "!org.opends.server.types.DebugLogCategory+ && " + |
| | | "!org.opends.server.api.DebugLogPublisher+ &&" + |
| | | "!org.opends.server.util.TimeThread+)") |
| | | |
| | | public class DebugTracer |
| | | { |
| | | /** |
| | | * Pointcut for matching static context events. |
| | | */ |
| | | @Pointcut("!this(Object)") |
| | | private void staticContext() |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * Pointcut for matching non static context events. |
| | | * @param obj The object being operated on. |
| | | */ |
| | | @Pointcut("this(obj)") |
| | | private void nonStaticContext(Object obj) |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * Pointcut for matching all toString() methods. |
| | | */ |
| | | @Pointcut("execution(* *..toString(..))") |
| | | private void toStringMethod() |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * Pointcut for matching all getMessage() methods. |
| | | */ |
| | | @Pointcut("execution(String org.opends.server." + |
| | | "messages.MessageHandler.getMessage(..))") |
| | | private void getMessageMethod() |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * Pointcut for matching all getDebugProperties() methods. |
| | | * TODO: Make this less general. Find out if pointcut matches |
| | | * subclass methods. |
| | | */ |
| | | @Pointcut("execution(* *..getDebugProperties(..))") |
| | | private void getDebugPropertiesMethod() |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * Pointcut for matching debugMessage() methods. |
| | | */ |
| | | @Pointcut("call(public static void org.opends.server." + |
| | | "loggers.debug.DebugLogger.debugMessage(..))") |
| | | private void logMessageMethod() |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * Pointcut for matching debugVerbose() methods. |
| | | */ |
| | | @Pointcut("call(public static void org.opends.server." + |
| | | "loggers.debug.DebugLogger.debugVerbose(..))") |
| | | private void logVerboseMethod() |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * Pointcut for matching debugInfo() methods. |
| | | */ |
| | | @Pointcut("call(public static void org.opends.server." + |
| | | "loggers.debug.DebugLogger.debugInfo(..))") |
| | | private void logInfoMethod() |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * Pointcut for matching debugWarning() methods. |
| | | */ |
| | | @Pointcut("call(public static void org.opends.server." + |
| | | "loggers.debug.DebugLogger.debugWarning(..))") |
| | | private void logWarningMethod() |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * Pointcut for matching debugError() methods. |
| | | */ |
| | | @Pointcut("call(public static void org.opends.server." + |
| | | "loggers.debug.DebugLogger.debugError(..))") |
| | | private void logErrorMethod() |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * Pointcut for matching debugThrown() methods. |
| | | */ |
| | | @Pointcut("call(public static void org.opends.server." + |
| | | "loggers.debug.DebugLogger.debugThrown(..))") |
| | | private void logThrownMethod() |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * Pointcut for matching debugCaught() methods. |
| | | */ |
| | | @Pointcut("call(public static void org.opends.server." + |
| | | "loggers.debug.DebugLogger.debugCaught(..))") |
| | | private void logCaughtMethod() |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * Pointcut for matching debugJEAccess() methods. |
| | | */ |
| | | @Pointcut("call(public static void org.opends.server." + |
| | | "loggers.debug.DebugLogger.debugJEAccess(..))") |
| | | private void logJEAccessMethod() |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * Pointcut for matching debugData() methods. |
| | | */ |
| | | @Pointcut("call(public static void org.opends.server." + |
| | | "loggers.debug.DebugLogger.debugData(..))") |
| | | private void logDataMethod() |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * Pointcut for matching debugProtocolElement() methods. |
| | | */ |
| | | @Pointcut("call(public static void org.opends.server." + |
| | | "loggers.debug.DebugLogger.debugProtocolElement(..))") |
| | | private void logProtocolElementMethod() |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * Pointcut for matching all debug logging methods. |
| | | */ |
| | | @Pointcut("logMessageMethod() || logVerboseMethod() || logInfoMethod() || " + |
| | | "logWarningMethod() || logErrorMethod() || logCaughtMethod() || " + |
| | | "logJEAccessMethod() || logDataMethod() || logProtocolElementMethod()") |
| | | private void logMethods() |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * Pointcut to exclude all pointcuts which should not be adviced by the |
| | | * debug logger. |
| | | */ |
| | | @Pointcut("toStringMethod() || getMessageMethod() || " + |
| | | "getDebugPropertiesMethod() || logMethods()") |
| | | private void excluded() |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * Pointcut for matching the execution of all public methods. |
| | | */ |
| | | @Pointcut("execution(!@(DebugLogger.NoDebugTracing || " + |
| | | "DebugLogger.NoEntryDebugTracing) public * *(..)) && " + |
| | | "!excluded()") |
| | | void tracedEntryMethod() |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * Pointcut for matching the execution of all public methods. |
| | | */ |
| | | @Pointcut("execution(!@(DebugLogger.NoDebugTracing || " + |
| | | "DebugLogger.NoExitDebugTracing) public * *(..)) && " + |
| | | "!excluded()") |
| | | void tracedExitMethod() |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * Pointcut for matching the execution of all public methods. |
| | | */ |
| | | @Pointcut("execution(@DebugLogger.TraceThrown public * *(..)) && " + |
| | | "!excluded()") |
| | | void tracedThrownMethod() |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * Pointcut for matching the execution of all constructors. |
| | | */ |
| | | @Pointcut("execution(!@(DebugLogger.NoDebugTracing || " + |
| | | "DebugLogger.NoEntryDebugTracing) public new(..)) && !excluded()") |
| | | void tracedEntryConstructor() |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * Pointcut for matching the execution of all constructors. |
| | | */ |
| | | @Pointcut("execution(!@(DebugLogger.NoDebugTracing || " + |
| | | "DebugLogger.NoExitDebugTracing) public new(..)) && !excluded()") |
| | | void tracedExitConstructor() |
| | | { |
| | | } |
| | | |
| | | /** |
| | | * Pointcut for matching only if there are publishers. |
| | | * |
| | | * @return if debug logging is enabled. |
| | | */ |
| | | @Pointcut("if()") |
| | | public static boolean shouldTrace() |
| | | { |
| | | return DebugLogger.enabled; |
| | | } |
| | | |
| | | // The class this aspect traces. |
| | | String className; |
| | | |
| | | //The current class level trace settings. |
| | | ConcurrentHashMap<DebugLogPublisher, TraceSettings> classSettings = |
| | | new ConcurrentHashMap<DebugLogPublisher, TraceSettings>(); |
| | | |
| | | //The current method level trace settings. |
| | | ConcurrentHashMap<DebugLogPublisher, Map<String, TraceSettings>> |
| | | methodSettings = new ConcurrentHashMap<DebugLogPublisher, |
| | | Map<String, TraceSettings>>(); |
| | | |
| | | private String className; |
| | | |
| | | /** |
| | | * AspectJ Implementation. |
| | | * A class that represents a settings cache entry. |
| | | */ |
| | | private class PublisherSettings |
| | | { |
| | | DebugLogPublisher debugPublisher; |
| | | TraceSettings classSettings; |
| | | Map<String, TraceSettings> methodSettings; |
| | | } |
| | | |
| | | PublisherSettings[] publisherSettings; |
| | | |
| | | /** |
| | | * Construct a new DebugTracer object with cached settings obtained from |
| | | * the provided array of publishers. |
| | | * |
| | | * @param thisJoinPointStaticPart the JoinPoint reflection object. |
| | | * @param publishers The array of publishers to obtain the settings from. |
| | | */ |
| | | @SuppressWarnings("unchecked") |
| | | @Before("staticinitialization(*)") |
| | | public void initializeTracer(JoinPoint.StaticPart thisJoinPointStaticPart) |
| | | DebugTracer(DebugLogPublisher[] publishers) |
| | | { |
| | | classTracers.add(this); |
| | | className = thisJoinPointStaticPart.getSignature().getDeclaringTypeName(); |
| | | // Trim off the debug logging and non OpenDS frames. |
| | | StackTraceElement callerFrame = |
| | | getCallerFrame(Thread.currentThread().getStackTrace()); |
| | | |
| | | // TODO: What if this is null or 0 length? |
| | | if(callerFrame != null) |
| | | { |
| | | // The caller should be the first item on the stack. |
| | | className = callerFrame.getClassName(); |
| | | } |
| | | |
| | | publisherSettings = new PublisherSettings[publishers.length]; |
| | | |
| | | // Get the settings from all publishers. |
| | | for(DebugLogPublisher logPublisher : |
| | | debugPublishers.values()) |
| | | for(int i = 0; i < publishers.length; i++) |
| | | { |
| | | TraceSettings cSettings = logPublisher.getClassSettings(className); |
| | | classSettings.put(logPublisher, cSettings); |
| | | DebugLogPublisher publisher = publishers[i]; |
| | | PublisherSettings settings = new PublisherSettings(); |
| | | |
| | | settings.debugPublisher = publisher; |
| | | settings.classSettings = publisher.getClassSettings(className); |
| | | |
| | | // For some reason, the compiler doesn't see that |
| | | // debugLogPublihser.getMethodSettings returns a parameterized Map. |
| | |
| | | // is used. However, we can't not use reflection to instantiate a generic |
| | | // DebugLogPublisher<? extends DebugLogPublisherCfg> type. The only thing |
| | | // we can do is to just supress the compiler warnings. |
| | | Map<String, TraceSettings> mSettings = |
| | | logPublisher.getMethodSettings(className); |
| | | if(mSettings != null) |
| | | { |
| | | methodSettings.put(logPublisher, mSettings); |
| | | } |
| | | settings.methodSettings = publisher.getMethodSettings(className); |
| | | |
| | | publisherSettings[i] = settings; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * AspectJ Implementation. |
| | | * Log an constructor execution event. |
| | | * |
| | | * @param thisJoinPoint the JoinPoint reflection object. |
| | | * @param level The level of the message being logged. |
| | | * @param args The arguments passed to the constructor. |
| | | */ |
| | | @Before("shouldTrace() && tracedEntryConstructor()") |
| | | public void traceConstructor(JoinPoint thisJoinPoint) |
| | | public void debugConstructor(LogLevel level, Object... args) |
| | | { |
| | | String signature = thisJoinPoint.getSignature().getName(); |
| | | String sl = thisJoinPoint.getSourceLocation().toString(); |
| | | Object[] args = thisJoinPoint.getArgs(); |
| | | for(DebugLogPublisher logPublisher : debugPublishers.values()) |
| | | if(DebugLogger.debugEnabled()) |
| | | { |
| | | TraceSettings settings = getSettings(logPublisher, signature); |
| | | if (DEFAULT_CONSTRUCTOR_LEVEL.intValue() >= |
| | | getEffectiveLevel(settings, DebugLogCategory.CONSTRUCTOR).intValue()) |
| | | StackTraceElement[] stackTrace = null; |
| | | StackTraceElement[] filteredStackTrace = null; |
| | | StackTraceElement callerFrame = null; |
| | | for (PublisherSettings settings : publisherSettings) |
| | | { |
| | | logPublisher.traceConstructor(DebugLogger.DEFAULT_CONSTRUCTOR_LEVEL, |
| | | settings, signature, sl, args); |
| | | TraceSettings activeSettings = settings.classSettings; |
| | | Map<String, TraceSettings> methodSettings = settings.methodSettings; |
| | | |
| | | if (shouldLog(level, DebugLogCategory.CONSTRUCTOR, |
| | | activeSettings) || methodSettings != null) |
| | | { |
| | | if(stackTrace == null) |
| | | { |
| | | stackTrace = Thread.currentThread().getStackTrace(); |
| | | } |
| | | if (callerFrame == null) |
| | | { |
| | | callerFrame = getCallerFrame(stackTrace); |
| | | } |
| | | |
| | | String signature = callerFrame.getMethodName(); |
| | | |
| | | // Specific method settings still could exist. Try getting |
| | | // the settings for this method. |
| | | if(methodSettings != null) |
| | | { |
| | | TraceSettings mSettings = methodSettings.get(signature); |
| | | |
| | | if (mSettings == null) |
| | | { |
| | | // Try looking for an undecorated method name |
| | | int idx = signature.indexOf('('); |
| | | if (idx != -1) |
| | | { |
| | | mSettings = |
| | | methodSettings.get(signature.substring(0, idx)); |
| | | } |
| | | } |
| | | |
| | | // If this method does have a specific setting and it is not |
| | | // suppose to be logged, continue. |
| | | if (mSettings != null) |
| | | { |
| | | if(!shouldLog(level, DebugLogCategory.CONSTRUCTOR, |
| | | mSettings)) |
| | | { |
| | | continue; |
| | | } |
| | | else |
| | | { |
| | | activeSettings = mSettings; |
| | | } |
| | | } |
| | | } |
| | | |
| | | String sl = callerFrame.getFileName() + " @ " + |
| | | callerFrame.getLineNumber(); |
| | | |
| | | if (activeSettings.noArgs) |
| | | { |
| | | args = null; |
| | | } |
| | | |
| | | if (filteredStackTrace == null && activeSettings.stackDepth > 0) |
| | | { |
| | | filteredStackTrace = |
| | | DebugStackTraceFormatter.SMART_FRAME_FILTER. |
| | | getFilteredStackTrace(stackTrace); |
| | | } |
| | | |
| | | settings.debugPublisher.traceConstructor(level, |
| | | activeSettings, signature, |
| | | sl, args, |
| | | filteredStackTrace); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * AspectJ Implementation. |
| | | * Log an non static method entry event. |
| | | * |
| | | * @param thisJoinPoint the JoinPoint reflection object. |
| | | * @param obj the object this method operations on. |
| | | * @param level The level of the message being logged. |
| | | * @param obj The object type instance the method is a member of. |
| | | * @param args The arguments passed to the method. |
| | | */ |
| | | @Before("shouldTrace() && tracedEntryMethod() && nonStaticContext(obj)") |
| | | public void traceNonStaticMethodEntry(JoinPoint thisJoinPoint, Object obj) |
| | | public void debugMethodEntry(LogLevel level, Object obj, Object... args) |
| | | { |
| | | String signature = thisJoinPoint.getSignature().getName(); |
| | | String sl = thisJoinPoint.getSourceLocation().toString(); |
| | | Object[] args = thisJoinPoint.getArgs(); |
| | | for(DebugLogPublisher logPublisher : debugPublishers.values()) |
| | | if(DebugLogger.debugEnabled()) |
| | | { |
| | | TraceSettings settings = getSettings(logPublisher, signature); |
| | | if (DEFAULT_ENTRY_EXIT_LEVEL.intValue() >= |
| | | getEffectiveLevel(settings, DebugLogCategory.ENTER).intValue()) |
| | | StackTraceElement[] stackTrace = null; |
| | | StackTraceElement[] filteredStackTrace = null; |
| | | StackTraceElement callerFrame = null; |
| | | for (PublisherSettings settings : publisherSettings) |
| | | { |
| | | logPublisher.traceNonStaticMethodEntry(DEFAULT_ENTRY_EXIT_LEVEL, |
| | | settings, signature, sl, obj, |
| | | args); |
| | | TraceSettings activeSettings = settings.classSettings; |
| | | Map<String, TraceSettings> methodSettings = settings.methodSettings; |
| | | |
| | | if (shouldLog(level, DebugLogCategory.ENTER, |
| | | activeSettings) || methodSettings != null) |
| | | { |
| | | if(stackTrace == null) |
| | | { |
| | | stackTrace = Thread.currentThread().getStackTrace(); |
| | | } |
| | | if (callerFrame == null) |
| | | { |
| | | callerFrame = getCallerFrame(stackTrace); |
| | | } |
| | | |
| | | String signature = callerFrame.getMethodName(); |
| | | |
| | | // Specific method settings still could exist. Try getting |
| | | // the settings for this method. |
| | | if(methodSettings != null) |
| | | { |
| | | TraceSettings mSettings = methodSettings.get(signature); |
| | | |
| | | if (mSettings == null) |
| | | { |
| | | // Try looking for an undecorated method name |
| | | int idx = signature.indexOf('('); |
| | | if (idx != -1) |
| | | { |
| | | mSettings = |
| | | methodSettings.get(signature.substring(0, idx)); |
| | | } |
| | | } |
| | | |
| | | // If this method does have a specific setting and it is not |
| | | // suppose to be logged, continue. |
| | | if (mSettings != null) |
| | | { |
| | | if(!shouldLog(level, DebugLogCategory.ENTER, |
| | | mSettings)) |
| | | { |
| | | continue; |
| | | } |
| | | else |
| | | { |
| | | activeSettings = mSettings; |
| | | } |
| | | } |
| | | } |
| | | |
| | | String sl = callerFrame.getFileName() + " @ " + |
| | | callerFrame.getLineNumber(); |
| | | |
| | | if (activeSettings.noArgs) |
| | | { |
| | | args = null; |
| | | } |
| | | |
| | | if (filteredStackTrace == null && activeSettings.stackDepth > 0) |
| | | { |
| | | filteredStackTrace = |
| | | DebugStackTraceFormatter.SMART_FRAME_FILTER. |
| | | getFilteredStackTrace(stackTrace); |
| | | } |
| | | |
| | | settings.debugPublisher.traceMethodEntry(level, |
| | | activeSettings, signature, |
| | | sl, obj, args, |
| | | filteredStackTrace); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * AspectJ Implementation. |
| | | * Log an static method entry event. |
| | | * |
| | | * @param thisJoinPoint the JoinPoint reflection object. |
| | | * @param level The level of the message being logged. |
| | | * @param args The arguments passed to the method. |
| | | */ |
| | | @Before("shouldTrace() && tracedEntryMethod() && staticContext()") |
| | | public void traceStaticMethodEntry(JoinPoint thisJoinPoint) |
| | | public void debugStaticMethodEntry(LogLevel level, Object... args) |
| | | { |
| | | String signature = thisJoinPoint.getSignature().getName(); |
| | | String sl = thisJoinPoint.getSourceLocation().toString(); |
| | | Object[] args = thisJoinPoint.getArgs(); |
| | | for(DebugLogPublisher logPublisher : debugPublishers.values()) |
| | | if(DebugLogger.debugEnabled()) |
| | | { |
| | | TraceSettings settings = getSettings(logPublisher, signature); |
| | | if (DEFAULT_ENTRY_EXIT_LEVEL.intValue() >= |
| | | getEffectiveLevel(settings, DebugLogCategory.ENTER).intValue()) |
| | | StackTraceElement[] stackTrace = null; |
| | | StackTraceElement[] filteredStackTrace = null; |
| | | StackTraceElement callerFrame = null; |
| | | for (PublisherSettings settings : publisherSettings) |
| | | { |
| | | logPublisher.traceStaticMethodEntry(DEFAULT_ENTRY_EXIT_LEVEL, settings, |
| | | signature, sl, args); |
| | | TraceSettings activeSettings = settings.classSettings; |
| | | Map<String, TraceSettings> methodSettings = settings.methodSettings; |
| | | |
| | | if (shouldLog(level, DebugLogCategory.ENTER, |
| | | activeSettings) || methodSettings != null) |
| | | { |
| | | if(stackTrace == null) |
| | | { |
| | | stackTrace = Thread.currentThread().getStackTrace(); |
| | | } |
| | | if (callerFrame == null) |
| | | { |
| | | callerFrame = getCallerFrame(stackTrace); |
| | | } |
| | | |
| | | String signature = callerFrame.getMethodName(); |
| | | |
| | | // Specific method settings still could exist. Try getting |
| | | // the settings for this method. |
| | | if(methodSettings != null) |
| | | { |
| | | TraceSettings mSettings = methodSettings.get(signature); |
| | | |
| | | if (mSettings == null) |
| | | { |
| | | // Try looking for an undecorated method name |
| | | int idx = signature.indexOf('('); |
| | | if (idx != -1) |
| | | { |
| | | mSettings = |
| | | methodSettings.get(signature.substring(0, idx)); |
| | | } |
| | | } |
| | | |
| | | // If this method does have a specific setting and it is not |
| | | // suppose to be logged, continue. |
| | | if (mSettings != null) |
| | | { |
| | | if(!shouldLog(level, DebugLogCategory.ENTER, |
| | | mSettings)) |
| | | { |
| | | continue; |
| | | } |
| | | else |
| | | { |
| | | activeSettings = mSettings; |
| | | } |
| | | } |
| | | } |
| | | |
| | | String sl = callerFrame.getFileName() + " @ " + |
| | | callerFrame.getLineNumber(); |
| | | |
| | | if (activeSettings.noArgs) |
| | | { |
| | | args = null; |
| | | } |
| | | |
| | | if (filteredStackTrace == null && activeSettings.stackDepth > 0) |
| | | { |
| | | filteredStackTrace = |
| | | DebugStackTraceFormatter.SMART_FRAME_FILTER. |
| | | getFilteredStackTrace(stackTrace); |
| | | } |
| | | |
| | | settings.debugPublisher.traceStaticMethodEntry(level, |
| | | activeSettings, |
| | | signature, sl, args, |
| | | filteredStackTrace); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * AspectJ Implementation. |
| | | * Log a return from a method call event. |
| | | * |
| | | * @param thisJoinPointStaticPart the JoinPoint reflection object. |
| | | * @param ret the return value of the method. |
| | | * @param level The level of the message being logged. |
| | | * @param ret The value being returned from the method. |
| | | */ |
| | | @AfterReturning(pointcut = "shouldTrace() && " + |
| | | "(tracedExitMethod() || tracedExitConstructor())", |
| | | returning = "ret") |
| | | public void traceReturn(JoinPoint.StaticPart thisJoinPointStaticPart, |
| | | Object ret) |
| | | public void debugReturn(LogLevel level, Object ret) |
| | | { |
| | | String signature = thisJoinPointStaticPart.getSignature().getName(); |
| | | String sl = thisJoinPointStaticPart.getSourceLocation().toString(); |
| | | for(DebugLogPublisher logPublisher : debugPublishers.values()) |
| | | if(DebugLogger.debugEnabled()) |
| | | { |
| | | TraceSettings settings = getSettings(logPublisher, signature); |
| | | if (DEFAULT_ENTRY_EXIT_LEVEL.intValue() >= |
| | | getEffectiveLevel(settings, DebugLogCategory.EXIT).intValue()) |
| | | StackTraceElement[] stackTrace = null; |
| | | StackTraceElement[] filteredStackTrace = null; |
| | | StackTraceElement callerFrame = null; |
| | | for (PublisherSettings settings : publisherSettings) |
| | | { |
| | | logPublisher.traceReturn(DEFAULT_ENTRY_EXIT_LEVEL, settings, signature, |
| | | sl, ret); |
| | | TraceSettings activeSettings = settings.classSettings; |
| | | Map<String, TraceSettings> methodSettings = settings.methodSettings; |
| | | |
| | | if (shouldLog(level, DebugLogCategory.ENTER, |
| | | activeSettings) || methodSettings != null) |
| | | { |
| | | if(stackTrace == null) |
| | | { |
| | | stackTrace = Thread.currentThread().getStackTrace(); |
| | | } |
| | | if (callerFrame == null) |
| | | { |
| | | callerFrame = getCallerFrame(stackTrace); |
| | | } |
| | | |
| | | String signature = callerFrame.getMethodName(); |
| | | |
| | | // Specific method settings still could exist. Try getting |
| | | // the settings for this method. |
| | | if(methodSettings != null) |
| | | { |
| | | TraceSettings mSettings = methodSettings.get(signature); |
| | | |
| | | if (mSettings == null) |
| | | { |
| | | // Try looking for an undecorated method name |
| | | int idx = signature.indexOf('('); |
| | | if (idx != -1) |
| | | { |
| | | mSettings = |
| | | methodSettings.get(signature.substring(0, idx)); |
| | | } |
| | | } |
| | | |
| | | // If this method does have a specific setting and it is not |
| | | // suppose to be logged, continue. |
| | | if (mSettings != null) |
| | | { |
| | | if(!shouldLog(level, DebugLogCategory.ENTER, |
| | | mSettings)) |
| | | { |
| | | continue; |
| | | } |
| | | else |
| | | { |
| | | activeSettings = mSettings; |
| | | } |
| | | } |
| | | } |
| | | |
| | | String sl = callerFrame.getFileName() + " @ " + |
| | | callerFrame.getLineNumber(); |
| | | |
| | | if (activeSettings.noRetVal) |
| | | { |
| | | ret = null; |
| | | } |
| | | |
| | | if (filteredStackTrace == null && activeSettings.stackDepth > 0) |
| | | { |
| | | filteredStackTrace = |
| | | DebugStackTraceFormatter.SMART_FRAME_FILTER. |
| | | getFilteredStackTrace(stackTrace); |
| | | } |
| | | |
| | | settings.debugPublisher.traceReturn(level, |
| | | activeSettings, signature, |
| | | sl, ret, |
| | | filteredStackTrace); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * AspectJ Implementation. |
| | | * Log an exception thrown from a method. |
| | | * |
| | | * @param thisJoinPointStaticPart the JoinPoint reflection object. |
| | | * @param ex the exception thrown. |
| | | * @param level The level of the message being logged. |
| | | * @param ex The exception being thrown. |
| | | */ |
| | | @SuppressAjWarnings({"adviceDidNotMatch"}) |
| | | @AfterThrowing(pointcut = "shouldTrace() && tracedThrownMethod()", |
| | | throwing = "ex") |
| | | public void traceThrown(JoinPoint.StaticPart thisJoinPointStaticPart, |
| | | Throwable ex) |
| | | public void debugThrown(LogLevel level, Throwable ex) |
| | | { |
| | | String signature = thisJoinPointStaticPart.getSignature().getName(); |
| | | String sl = thisJoinPointStaticPart.getSourceLocation().toString(); |
| | | for(DebugLogPublisher logPublisher : debugPublishers.values()) |
| | | if(DebugLogger.debugEnabled()) |
| | | { |
| | | TraceSettings settings = getSettings(logPublisher, signature); |
| | | if (DEFAULT_THROWN_LEVEL.intValue() >= |
| | | getEffectiveLevel(settings, DebugLogCategory.THROWN).intValue()) |
| | | StackTraceElement[] stackTrace = null; |
| | | StackTraceElement[] filteredStackTrace = null; |
| | | StackTraceElement callerFrame = null; |
| | | for (PublisherSettings settings : publisherSettings) |
| | | { |
| | | logPublisher.traceThrown(DEFAULT_THROWN_LEVEL, settings, signature, sl, |
| | | ex); |
| | | TraceSettings activeSettings = settings.classSettings; |
| | | Map<String, TraceSettings> methodSettings = settings.methodSettings; |
| | | |
| | | if (shouldLog(level, DebugLogCategory.THROWN, |
| | | activeSettings) || methodSettings != null) |
| | | { |
| | | if(stackTrace == null) |
| | | { |
| | | stackTrace = Thread.currentThread().getStackTrace(); |
| | | } |
| | | if (callerFrame == null) |
| | | { |
| | | callerFrame = getCallerFrame(stackTrace); |
| | | } |
| | | |
| | | String signature = callerFrame.getMethodName(); |
| | | |
| | | // Specific method settings still could exist. Try getting |
| | | // the settings for this method. |
| | | if(methodSettings != null) |
| | | { |
| | | TraceSettings mSettings = methodSettings.get(signature); |
| | | |
| | | if (mSettings == null) |
| | | { |
| | | // Try looking for an undecorated method name |
| | | int idx = signature.indexOf('('); |
| | | if (idx != -1) |
| | | { |
| | | mSettings = |
| | | methodSettings.get(signature.substring(0, idx)); |
| | | } |
| | | } |
| | | |
| | | // If this method does have a specific setting and it is not |
| | | // suppose to be logged, continue. |
| | | if (mSettings != null) |
| | | { |
| | | if(!shouldLog(level, DebugLogCategory.THROWN, |
| | | mSettings)) |
| | | { |
| | | continue; |
| | | } |
| | | else |
| | | { |
| | | activeSettings = mSettings; |
| | | } |
| | | } |
| | | } |
| | | |
| | | String sl = callerFrame.getFileName() + " @ " + |
| | | callerFrame.getLineNumber(); |
| | | |
| | | if (filteredStackTrace == null && activeSettings.stackDepth > 0) |
| | | { |
| | | filteredStackTrace = |
| | | DebugStackTraceFormatter.SMART_FRAME_FILTER. |
| | | getFilteredStackTrace(ex.getStackTrace()); |
| | | } |
| | | |
| | | settings.debugPublisher.traceThrown(level, activeSettings, signature, |
| | | sl, ex, filteredStackTrace); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * AspectJ Implementation. |
| | | * Log an arbitrary event at the verbose level. |
| | | * Same as debugMessage(DebugLogLevel.ERROR, msg) |
| | | * |
| | | * @param thisEnclosingJoinPointStaticPart the JoinPoint reflection object |
| | | * of the code that contains the |
| | | * debug call. |
| | | * @param thisJoinPointStaticPart the JoinPoint reflection object. |
| | | * @param level the level of the log message. |
| | | * @param ex the exception thrown. |
| | | */ |
| | | @SuppressAjWarnings({"adviceDidNotMatch"}) |
| | | @Around("shouldTrace() && logThrownMethod() && args(level, ex)") |
| | | public void traceThrown(JoinPoint.EnclosingStaticPart |
| | | thisEnclosingJoinPointStaticPart, |
| | | JoinPoint.StaticPart |
| | | thisJoinPointStaticPart, |
| | | LogLevel level, Throwable ex) |
| | | { |
| | | String signature = |
| | | thisEnclosingJoinPointStaticPart.getSignature().getName(); |
| | | String sl = thisJoinPointStaticPart.getSourceLocation().toString(); |
| | | for(DebugLogPublisher logPublisher : debugPublishers.values()) |
| | | { |
| | | TraceSettings settings = getSettings(logPublisher, signature); |
| | | if (level.intValue() >= |
| | | getEffectiveLevel(settings, DebugLogCategory.THROWN).intValue()) |
| | | { |
| | | logPublisher.traceThrown(level, settings, signature, sl, ex); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * AspectJ Implementation. |
| | | * |
| | | * @param thisEnclosingJoinPointStaticPart the JoinPoint reflection object |
| | | * of the code that contains the |
| | | * debug call. |
| | | * @param thisJoinPointStaticPart the JoinPoint reflection object. |
| | | * @param msg message to format and log. |
| | | */ |
| | | @SuppressAjWarnings({"adviceDidNotMatch"}) |
| | | @Around("shouldTrace() && logVerboseMethod() && args(msg)") |
| | | public void traceVerbose(JoinPoint.EnclosingStaticPart |
| | | thisEnclosingJoinPointStaticPart, |
| | | JoinPoint.StaticPart |
| | | thisJoinPointStaticPart, |
| | | String msg) |
| | | public void debugVerbose(String msg) |
| | | { |
| | | String signature = |
| | | thisEnclosingJoinPointStaticPart.getSignature().getName(); |
| | | String sl = thisJoinPointStaticPart.getSourceLocation().toString(); |
| | | for(DebugLogPublisher logPublisher : debugPublishers.values()) |
| | | { |
| | | TraceSettings settings = getSettings(logPublisher, signature); |
| | | if (DebugLogLevel.VERBOSE.intValue() >= |
| | | getEffectiveLevel(settings, DebugLogCategory.MESSAGE).intValue()) |
| | | { |
| | | logPublisher.traceMessage(DebugLogLevel.VERBOSE, settings, signature, |
| | | sl, msg); |
| | | } |
| | | } |
| | | debugMessage(DebugLogLevel.VERBOSE, msg, new Object[]{}); |
| | | } |
| | | |
| | | /** |
| | | * AspectJ Implementation. |
| | | * Log an arbitrary event at the verbose level. |
| | | * Same as debugMessage(DebugLogLevel.ERROR, msg, msgArgs...) |
| | | * |
| | | * @param thisEnclosingJoinPointStaticPart the JoinPoint reflection object |
| | | * of the code that contains the |
| | | * debug call. |
| | | * @param thisJoinPointStaticPart the JoinPoint reflection object. |
| | | * @param msg message to format and log. |
| | | * @param msgArgs arguments to place into the format string. |
| | | */ |
| | | @SuppressAjWarnings({"adviceDidNotMatch"}) |
| | | @Around("shouldTrace() && logVerboseMethod() && args(msg, msgArgs)") |
| | | public void traceVerbose(JoinPoint.EnclosingStaticPart |
| | | thisEnclosingJoinPointStaticPart, |
| | | JoinPoint.StaticPart |
| | | thisJoinPointStaticPart, |
| | | String msg, Object[] msgArgs) |
| | | public void debugVerbose(String msg, Object... msgArgs) |
| | | { |
| | | String signature = |
| | | thisEnclosingJoinPointStaticPart.getSignature().getName(); |
| | | String sl = thisJoinPointStaticPart.getSourceLocation().toString(); |
| | | msg = DebugMessageFormatter.format(msg, msgArgs); |
| | | for(DebugLogPublisher logPublisher : debugPublishers.values()) |
| | | { |
| | | TraceSettings settings = getSettings(logPublisher, signature); |
| | | if (DebugLogLevel.VERBOSE.intValue() >= |
| | | getEffectiveLevel(settings, DebugLogCategory.MESSAGE).intValue()) |
| | | { |
| | | logPublisher.traceMessage(DebugLogLevel.VERBOSE, settings, signature, |
| | | sl, msg); |
| | | } |
| | | } |
| | | debugMessage(DebugLogLevel.VERBOSE, msg, msgArgs); |
| | | } |
| | | |
| | | /** |
| | | * AspectJ Implementation. |
| | | * Log an arbitrary event at the info level. |
| | | * Same as debugMessage(DebugLogLevel.ERROR, msg) |
| | | * |
| | | * @param thisEnclosingJoinPointStaticPart the JoinPoint reflection object |
| | | * of the code that contains the |
| | | * debug call. |
| | | * @param thisJoinPointStaticPart the JoinPoint reflection object. |
| | | * @param msg message to format and log. |
| | | */ |
| | | @SuppressAjWarnings({"adviceDidNotMatch"}) |
| | | @Around("shouldTrace() && logInfoMethod() && args(msg)") |
| | | public void traceInfo(JoinPoint.EnclosingStaticPart |
| | | thisEnclosingJoinPointStaticPart, |
| | | JoinPoint.StaticPart |
| | | thisJoinPointStaticPart, |
| | | String msg) |
| | | public void debugInfo(String msg) |
| | | { |
| | | String signature = |
| | | thisEnclosingJoinPointStaticPart.getSignature().getName(); |
| | | String sl = thisJoinPointStaticPart.getSourceLocation().toString(); |
| | | for(DebugLogPublisher logPublisher : debugPublishers.values()) |
| | | { |
| | | TraceSettings settings = getSettings(logPublisher, signature); |
| | | if (DebugLogLevel.INFO.intValue() >= |
| | | getEffectiveLevel(settings, DebugLogCategory.MESSAGE).intValue()) |
| | | { |
| | | logPublisher.traceMessage(DebugLogLevel.INFO, settings, signature, sl, |
| | | msg); |
| | | } |
| | | } |
| | | debugMessage(DebugLogLevel.INFO, msg, new Object[]{}); |
| | | } |
| | | |
| | | /** |
| | | * AspectJ Implementation. |
| | | * Log an arbitrary event at the info level. |
| | | * Same as debugMessage(DebugLogLevel.ERROR, msg, msgArgs...) |
| | | * |
| | | * @param thisEnclosingJoinPointStaticPart the JoinPoint reflection object |
| | | * of the code that contains the |
| | | * debug call. |
| | | * @param thisJoinPointStaticPart the JoinPoint reflection object. |
| | | * @param msg message to format and log. |
| | | * @param msgArgs arguments to place into the format string. |
| | | */ |
| | | @SuppressAjWarnings({"adviceDidNotMatch"}) |
| | | @Around("shouldTrace() && logInfoMethod() && args(msg, msgArgs)") |
| | | public void traceInfo(JoinPoint.EnclosingStaticPart |
| | | thisEnclosingJoinPointStaticPart, |
| | | JoinPoint.StaticPart |
| | | thisJoinPointStaticPart, |
| | | String msg, Object[] msgArgs) |
| | | public void debugInfo(String msg, Object... msgArgs) |
| | | { |
| | | String signature = |
| | | thisEnclosingJoinPointStaticPart.getSignature().getName(); |
| | | String sl = thisJoinPointStaticPart.getSourceLocation().toString(); |
| | | msg = DebugMessageFormatter.format(msg, msgArgs); |
| | | for(DebugLogPublisher logPublisher : debugPublishers.values()) |
| | | { |
| | | TraceSettings settings = getSettings(logPublisher, signature); |
| | | if (DebugLogLevel.INFO.intValue() >= |
| | | getEffectiveLevel(settings, DebugLogCategory.MESSAGE).intValue()) |
| | | { |
| | | logPublisher.traceMessage(DebugLogLevel.INFO, settings, signature, sl, |
| | | msg); |
| | | } |
| | | } |
| | | debugMessage(DebugLogLevel.INFO, msg, msgArgs); |
| | | } |
| | | |
| | | /** |
| | | * AspectJ Implementation. |
| | | * Log an arbitrary event at the warning level. |
| | | * Same as debugMessage(DebugLogLevel.ERROR, msg) |
| | | * |
| | | * @param thisEnclosingJoinPointStaticPart the JoinPoint reflection object |
| | | * of the code that contains the |
| | | * debug call. |
| | | * @param thisJoinPointStaticPart the JoinPoint reflection object. |
| | | * @param msg message to format and log. |
| | | */ |
| | | @SuppressAjWarnings({"adviceDidNotMatch"}) |
| | | @Around("shouldTrace() && logWarningMethod() && args(msg)") |
| | | public void traceWarning(JoinPoint.EnclosingStaticPart |
| | | thisEnclosingJoinPointStaticPart, |
| | | JoinPoint.StaticPart |
| | | thisJoinPointStaticPart, |
| | | String msg) |
| | | public void debugWarning(String msg) |
| | | |
| | | { |
| | | String signature = |
| | | thisEnclosingJoinPointStaticPart.getSignature().getName(); |
| | | String sl = thisJoinPointStaticPart.getSourceLocation().toString(); |
| | | for(DebugLogPublisher logPublisher : debugPublishers.values()) |
| | | { |
| | | TraceSettings settings = getSettings(logPublisher, signature); |
| | | if (DebugLogLevel.WARNING.intValue() >= |
| | | getEffectiveLevel(settings, DebugLogCategory.MESSAGE).intValue()) |
| | | { |
| | | logPublisher.traceMessage(DebugLogLevel.WARNING, settings, signature, |
| | | sl, msg); |
| | | } |
| | | } |
| | | debugMessage(DebugLogLevel.WARNING, msg, new Object[]{}); |
| | | } |
| | | |
| | | /** |
| | | * AspectJ Implementation. |
| | | * Log an arbitrary event at the warning level. |
| | | * Same as debugMessage(DebugLogLevel.ERROR, msg, msgArgs...) |
| | | * |
| | | * @param thisEnclosingJoinPointStaticPart the JoinPoint reflection object |
| | | * of the code that contains the |
| | | * debug call. |
| | | * @param thisJoinPointStaticPart the JoinPoint reflection object. |
| | | * @param msg message to format and log. |
| | | * @param msgArgs arguments to place into the format string. |
| | | */ |
| | | @SuppressAjWarnings({"adviceDidNotMatch"}) |
| | | @Around("shouldTrace() && logWarningMethod() && args(msg, msgArgs)") |
| | | public void traceWarning(JoinPoint.EnclosingStaticPart |
| | | thisEnclosingJoinPointStaticPart, |
| | | JoinPoint.StaticPart |
| | | thisJoinPointStaticPart, |
| | | String msg, Object[] msgArgs) |
| | | public void debugWarning(String msg, Object... msgArgs) |
| | | { |
| | | String signature = |
| | | thisEnclosingJoinPointStaticPart.getSignature().getName(); |
| | | String sl = thisJoinPointStaticPart.getSourceLocation().toString(); |
| | | msg = DebugMessageFormatter.format(msg, msgArgs); |
| | | for(DebugLogPublisher logPublisher : debugPublishers.values()) |
| | | { |
| | | TraceSettings settings = getSettings(logPublisher, signature); |
| | | if (DebugLogLevel.WARNING.intValue() >= |
| | | getEffectiveLevel(settings, DebugLogCategory.MESSAGE).intValue()) |
| | | { |
| | | logPublisher.traceMessage(DebugLogLevel.WARNING, settings, signature, |
| | | sl, msg); |
| | | } |
| | | } |
| | | debugMessage(DebugLogLevel.WARNING, msg, msgArgs); |
| | | } |
| | | |
| | | /** |
| | | * AspectJ Implementation. |
| | | * Log an arbitrary event at the error level. |
| | | * Same as debugMessage(DebugLogLevel.ERROR, msg) |
| | | * |
| | | * @param thisEnclosingJoinPointStaticPart the JoinPoint reflection object |
| | | * of the code that contains the |
| | | * debug call. |
| | | * @param thisJoinPointStaticPart the JoinPoint reflection object. |
| | | * @param msg message to format and log. |
| | | */ |
| | | @SuppressAjWarnings({"adviceDidNotMatch"}) |
| | | @Around("shouldTrace() && logErrorMethod() && args(msg)") |
| | | public void traceError(JoinPoint.EnclosingStaticPart |
| | | thisEnclosingJoinPointStaticPart, |
| | | JoinPoint.StaticPart |
| | | thisJoinPointStaticPart, |
| | | String msg) |
| | | public void debugError(String msg) |
| | | |
| | | { |
| | | String signature = |
| | | thisEnclosingJoinPointStaticPart.getSignature().getName(); |
| | | String sl = thisJoinPointStaticPart.getSourceLocation().toString(); |
| | | for(DebugLogPublisher logPublisher : debugPublishers.values()) |
| | | { |
| | | TraceSettings settings = getSettings(logPublisher, signature); |
| | | if (DebugLogLevel.ERROR.intValue() >= |
| | | getEffectiveLevel(settings, DebugLogCategory.MESSAGE).intValue()) |
| | | { |
| | | logPublisher.traceMessage(DebugLogLevel.ERROR, settings, signature, sl, |
| | | msg); |
| | | } |
| | | } |
| | | debugMessage(DebugLogLevel.ERROR, msg, new Object[]{}); |
| | | } |
| | | |
| | | /** |
| | | * AspectJ Implementation. |
| | | * Log an arbitrary event at the error level. |
| | | * Same as debugMessage(DebugLogLevel.ERROR, msg, msgArgs...) |
| | | * |
| | | * @param thisEnclosingJoinPointStaticPart the JoinPoint reflection object |
| | | * of the code that contains the |
| | | * debug call. |
| | | * @param thisJoinPointStaticPart the JoinPoint reflection object. |
| | | * @param msg message to format and log. |
| | | * @param msgArgs arguments to place into the format string. |
| | | */ |
| | | @SuppressAjWarnings({"adviceDidNotMatch"}) |
| | | @Around("shouldTrace() && logErrorMethod() && args(msg, msgArgs)") |
| | | public void traceError(JoinPoint.EnclosingStaticPart |
| | | thisEnclosingJoinPointStaticPart, |
| | | JoinPoint.StaticPart |
| | | thisJoinPointStaticPart, |
| | | String msg, Object[] msgArgs) |
| | | public void debugError(String msg, Object... msgArgs) |
| | | { |
| | | String signature = |
| | | thisEnclosingJoinPointStaticPart.getSignature().getName(); |
| | | String sl = thisJoinPointStaticPart.getSourceLocation().toString(); |
| | | msg = DebugMessageFormatter.format(msg, msgArgs); |
| | | for(DebugLogPublisher logPublisher : debugPublishers.values()) |
| | | { |
| | | TraceSettings settings = getSettings(logPublisher, signature); |
| | | if (DebugLogLevel.ERROR.intValue() >= |
| | | getEffectiveLevel(settings, DebugLogCategory.MESSAGE).intValue()) |
| | | { |
| | | logPublisher.traceMessage(DebugLogLevel.ERROR, settings, signature, sl, |
| | | msg); |
| | | } |
| | | } |
| | | debugMessage(DebugLogLevel.ERROR, msg, msgArgs); |
| | | } |
| | | |
| | | /** |
| | | * AspectJ Implementation. |
| | | * Log an arbitrary event. |
| | | * |
| | | * @param thisEnclosingJoinPointStaticPart the JoinPoint reflection object |
| | | * of the code that contains the |
| | | * debug call. |
| | | * @param thisJoinPointStaticPart the JoinPoint reflection object. |
| | | * @param level the level of the log message. |
| | | * @param msg message to format and log. |
| | | */ |
| | | @SuppressAjWarnings({"adviceDidNotMatch"}) |
| | | @Around("shouldTrace() && logMessageMethod() && args(level, msg)") |
| | | public void traceMessage(JoinPoint.EnclosingStaticPart |
| | | thisEnclosingJoinPointStaticPart, |
| | | JoinPoint.StaticPart |
| | | thisJoinPointStaticPart, |
| | | LogLevel level, String msg) |
| | | public void debugMessage(LogLevel level, String msg) |
| | | { |
| | | String signature = |
| | | thisEnclosingJoinPointStaticPart.getSignature().getName(); |
| | | String sl = thisJoinPointStaticPart.getSourceLocation().toString(); |
| | | for(DebugLogPublisher logPublisher : debugPublishers.values()) |
| | | { |
| | | TraceSettings settings = getSettings(logPublisher, signature); |
| | | if (level.intValue() >= |
| | | getEffectiveLevel(settings, DebugLogCategory.MESSAGE).intValue()) |
| | | { |
| | | logPublisher.traceMessage(level, settings, signature, sl, msg); |
| | | } |
| | | } |
| | | debugMessage(level, msg, new Object[]{}); |
| | | } |
| | | |
| | | /** |
| | | * AspectJ Implementation. |
| | | * Log an arbitrary event. |
| | | * |
| | | * @param thisEnclosingJoinPointStaticPart the JoinPoint reflection object |
| | | * of the code that contains the |
| | | * debug call. |
| | | * @param thisJoinPointStaticPart the JoinPoint reflection object. |
| | | * @param level the level of the log message. |
| | | * @param msg message to format and log. |
| | | * @param msgArgs arguments to place into the format string. |
| | | */ |
| | | @SuppressAjWarnings({"adviceDidNotMatch"}) |
| | | @Around("shouldTrace() && logMessageMethod() && args(level, msg, msgArgs)") |
| | | public void traceMessage(JoinPoint.EnclosingStaticPart |
| | | thisEnclosingJoinPointStaticPart, |
| | | JoinPoint.StaticPart |
| | | thisJoinPointStaticPart, |
| | | LogLevel level, String msg, Object... msgArgs) |
| | | public void debugMessage(LogLevel level, String msg, Object... msgArgs) |
| | | { |
| | | String signature = |
| | | thisEnclosingJoinPointStaticPart.getSignature().getName(); |
| | | String sl = thisJoinPointStaticPart.getSourceLocation().toString(); |
| | | msg = DebugMessageFormatter.format(msg, msgArgs); |
| | | for(DebugLogPublisher logPublisher : debugPublishers.values()) |
| | | if(DebugLogger.debugEnabled()) |
| | | { |
| | | TraceSettings settings = getSettings(logPublisher, signature); |
| | | if (level.intValue() >= |
| | | getEffectiveLevel(settings, DebugLogCategory.MESSAGE).intValue()) |
| | | StackTraceElement[] stackTrace = null; |
| | | StackTraceElement[] filteredStackTrace = null; |
| | | StackTraceElement callerFrame = null; |
| | | for (PublisherSettings settings : publisherSettings) |
| | | { |
| | | logPublisher.traceMessage(level, settings, signature, sl, msg); |
| | | TraceSettings activeSettings = settings.classSettings; |
| | | Map<String, TraceSettings> methodSettings = settings.methodSettings; |
| | | |
| | | if (shouldLog(level, DebugLogCategory.MESSAGE, |
| | | activeSettings) || methodSettings != null) |
| | | { |
| | | if(stackTrace == null) |
| | | { |
| | | stackTrace = Thread.currentThread().getStackTrace(); |
| | | } |
| | | if (callerFrame == null) |
| | | { |
| | | callerFrame = getCallerFrame(stackTrace); |
| | | } |
| | | |
| | | String signature = callerFrame.getMethodName(); |
| | | |
| | | // Specific method settings still could exist. Try getting |
| | | // the settings for this method. |
| | | if(methodSettings != null) |
| | | { |
| | | TraceSettings mSettings = methodSettings.get(signature); |
| | | |
| | | if (mSettings == null) |
| | | { |
| | | // Try looking for an undecorated method name |
| | | int idx = signature.indexOf('('); |
| | | if (idx != -1) |
| | | { |
| | | mSettings = |
| | | methodSettings.get(signature.substring(0, idx)); |
| | | } |
| | | } |
| | | |
| | | // If this method does have a specific setting and it is not |
| | | // suppose to be logged, continue. |
| | | if (mSettings != null) |
| | | { |
| | | if(!shouldLog(level, DebugLogCategory.MESSAGE, |
| | | mSettings)) |
| | | { |
| | | continue; |
| | | } |
| | | else |
| | | { |
| | | activeSettings = mSettings; |
| | | } |
| | | } |
| | | } |
| | | |
| | | String sl = callerFrame.getFileName() + " @ " + |
| | | callerFrame.getLineNumber(); |
| | | |
| | | if(msgArgs != null && msgArgs.length > 0) |
| | | { |
| | | msg = String.format(msg, msgArgs); |
| | | } |
| | | |
| | | if (filteredStackTrace == null && activeSettings.stackDepth > 0) |
| | | { |
| | | filteredStackTrace = |
| | | DebugStackTraceFormatter.SMART_FRAME_FILTER. |
| | | getFilteredStackTrace(stackTrace); |
| | | } |
| | | |
| | | settings.debugPublisher.traceMessage(level, activeSettings, signature, |
| | | sl, msg, filteredStackTrace); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * AspectJ Implementation. |
| | | * Log an cought exception. |
| | | * |
| | | * @param thisEnclosingJoinPointStaticPart the JoinPoint reflection object |
| | | * of the code that contains the |
| | | * debug call. |
| | | * @param thisJoinPointStaticPart the JoinPoint reflection object. |
| | | * @param level the level of the log message. |
| | | * @param ex the exception caught. |
| | | */ |
| | | @SuppressAjWarnings({"adviceDidNotMatch"}) |
| | | @Around("shouldTrace() && logCaughtMethod() && args(level, ex)") |
| | | public void traceCaught(JoinPoint.EnclosingStaticPart |
| | | thisEnclosingJoinPointStaticPart, |
| | | JoinPoint.StaticPart |
| | | thisJoinPointStaticPart, |
| | | LogLevel level, Throwable ex) |
| | | public void debugCaught(LogLevel level, Throwable ex) |
| | | { |
| | | String signature = |
| | | thisEnclosingJoinPointStaticPart.getSignature().getName(); |
| | | String sl = thisJoinPointStaticPart.getSourceLocation().toString(); |
| | | for(DebugLogPublisher logPublisher : debugPublishers.values()) |
| | | if(DebugLogger.debugEnabled()) |
| | | { |
| | | TraceSettings settings = getSettings(logPublisher, signature); |
| | | if (level.intValue() >= |
| | | getEffectiveLevel(settings, DebugLogCategory.CAUGHT).intValue()) |
| | | StackTraceElement[] stackTrace = null; |
| | | StackTraceElement[] filteredStackTrace = null; |
| | | StackTraceElement callerFrame = null; |
| | | for (PublisherSettings settings : publisherSettings) |
| | | { |
| | | logPublisher.traceCaught(level, settings, signature, sl, ex); |
| | | TraceSettings activeSettings = settings.classSettings; |
| | | Map<String, TraceSettings> methodSettings = settings.methodSettings; |
| | | |
| | | if (shouldLog(level, DebugLogCategory.CAUGHT, |
| | | activeSettings) || methodSettings != null) |
| | | { |
| | | if(stackTrace == null) |
| | | { |
| | | stackTrace = Thread.currentThread().getStackTrace(); |
| | | } |
| | | if (callerFrame == null) |
| | | { |
| | | callerFrame = getCallerFrame(stackTrace); |
| | | } |
| | | |
| | | String signature = callerFrame.getMethodName(); |
| | | |
| | | // Specific method settings still could exist. Try getting |
| | | // the settings for this method. |
| | | if(methodSettings != null) |
| | | { |
| | | TraceSettings mSettings = methodSettings.get(signature); |
| | | |
| | | if (mSettings == null) |
| | | { |
| | | // Try looking for an undecorated method name |
| | | int idx = signature.indexOf('('); |
| | | if (idx != -1) |
| | | { |
| | | mSettings = |
| | | methodSettings.get(signature.substring(0, idx)); |
| | | } |
| | | } |
| | | |
| | | // If this method does have a specific setting and it is not |
| | | // suppose to be logged, continue. |
| | | if (mSettings != null) |
| | | { |
| | | if(!shouldLog(level, DebugLogCategory.CAUGHT, |
| | | mSettings)) |
| | | { |
| | | continue; |
| | | } |
| | | else |
| | | { |
| | | activeSettings = mSettings; |
| | | } |
| | | } |
| | | } |
| | | |
| | | String sl = callerFrame.getFileName() + " @ " + |
| | | callerFrame.getLineNumber(); |
| | | |
| | | if (filteredStackTrace == null && activeSettings.stackDepth > 0) |
| | | { |
| | | filteredStackTrace = |
| | | DebugStackTraceFormatter.SMART_FRAME_FILTER. |
| | | getFilteredStackTrace(ex.getStackTrace()); |
| | | } |
| | | |
| | | settings.debugPublisher.traceCaught(level, activeSettings, signature, |
| | | sl, ex, filteredStackTrace); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * AspectJ Implementation. |
| | | * Log a JE database access event. |
| | | * |
| | | * @param thisEnclosingJoinPointStaticPart the JoinPoint reflection object |
| | | * of the code that contains the |
| | | * debug call. |
| | | * @param thisJoinPointStaticPart the JoinPoint reflection object. |
| | | * @param level the level of the log message. |
| | | * @param status status of the JE operation. |
| | | * @param database the database handle. |
| | |
| | | * @param key the key to dump. |
| | | * @param data the data to dump. |
| | | */ |
| | | @SuppressAjWarnings({"adviceDidNotMatch"}) |
| | | @Around("shouldTrace() && logJEAccessMethod() && args(level, status, " + |
| | | "database, txn, key, data)") |
| | | public void traceJEAccess(JoinPoint.EnclosingStaticPart |
| | | thisEnclosingJoinPointStaticPart, |
| | | JoinPoint.StaticPart |
| | | thisJoinPointStaticPart, |
| | | LogLevel level, OperationStatus status, |
| | | public void debugJEAccess(LogLevel level, OperationStatus status, |
| | | Database database, Transaction txn, |
| | | DatabaseEntry key, DatabaseEntry data) |
| | | { |
| | | String signature = |
| | | thisEnclosingJoinPointStaticPart.getSignature().getName(); |
| | | String sl = thisJoinPointStaticPart.getSourceLocation().toString(); |
| | | for(DebugLogPublisher logPublisher : debugPublishers.values()) |
| | | if(DebugLogger.debugEnabled()) |
| | | { |
| | | TraceSettings settings = getSettings(logPublisher, signature); |
| | | if (level.intValue() >= |
| | | getEffectiveLevel(settings, |
| | | DebugLogCategory.DATABASE_ACCESS).intValue()) |
| | | StackTraceElement[] stackTrace = null; |
| | | StackTraceElement[] filteredStackTrace = null; |
| | | StackTraceElement callerFrame = null; |
| | | for (PublisherSettings settings : publisherSettings) |
| | | { |
| | | logPublisher.traceJEAccess(level, settings, signature, sl, status, |
| | | database, txn, key, data); |
| | | TraceSettings activeSettings = settings.classSettings; |
| | | Map<String, TraceSettings> methodSettings = settings.methodSettings; |
| | | |
| | | if (shouldLog(level, DebugLogCategory.DATABASE_ACCESS, |
| | | activeSettings) || methodSettings != null) |
| | | { |
| | | if(stackTrace == null) |
| | | { |
| | | stackTrace = Thread.currentThread().getStackTrace(); |
| | | } |
| | | if (callerFrame == null) |
| | | { |
| | | callerFrame = getCallerFrame(stackTrace); |
| | | } |
| | | |
| | | String signature = callerFrame.getMethodName(); |
| | | |
| | | // Specific method settings still could exist. Try getting |
| | | // the settings for this method. |
| | | if(methodSettings != null) |
| | | { |
| | | TraceSettings mSettings = methodSettings.get(signature); |
| | | |
| | | if (mSettings == null) |
| | | { |
| | | // Try looking for an undecorated method name |
| | | int idx = signature.indexOf('('); |
| | | if (idx != -1) |
| | | { |
| | | mSettings = |
| | | methodSettings.get(signature.substring(0, idx)); |
| | | } |
| | | } |
| | | |
| | | // If this method does have a specific setting and it is not |
| | | // suppose to be logged, continue. |
| | | if (mSettings != null) |
| | | { |
| | | if(!shouldLog(level, DebugLogCategory.DATABASE_ACCESS, |
| | | mSettings)) |
| | | { |
| | | continue; |
| | | } |
| | | else |
| | | { |
| | | activeSettings = mSettings; |
| | | } |
| | | } |
| | | } |
| | | |
| | | String sl = callerFrame.getFileName() + " @ " + |
| | | callerFrame.getLineNumber(); |
| | | |
| | | if (filteredStackTrace == null && activeSettings.stackDepth > 0) |
| | | { |
| | | filteredStackTrace = |
| | | DebugStackTraceFormatter.SMART_FRAME_FILTER. |
| | | getFilteredStackTrace(stackTrace); |
| | | } |
| | | |
| | | settings.debugPublisher.traceJEAccess(level, activeSettings, |
| | | signature, sl, status, database, |
| | | txn, key, data, |
| | | filteredStackTrace); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * AspectJ Implementation. |
| | | * @param thisEnclosingJoinPointStaticPart the JoinPoint reflection object |
| | | * of the code that contains the |
| | | * debug call. |
| | | * @param thisJoinPointStaticPart the JoinPoint reflection object. |
| | | * Log raw data in the form of a byte array. |
| | | * |
| | | * @param level the level of the log message. |
| | | * @param data the data to dump. |
| | | */ |
| | | @SuppressAjWarnings({"adviceDidNotMatch"}) |
| | | @Around("shouldTrace() && logDataMethod() && args(level, data)") |
| | | public void traceData(JoinPoint.EnclosingStaticPart |
| | | thisEnclosingJoinPointStaticPart, |
| | | JoinPoint.StaticPart |
| | | thisJoinPointStaticPart, |
| | | LogLevel level, byte[] data) |
| | | public void debugData(LogLevel level, byte[] data) |
| | | { |
| | | String signature = |
| | | thisEnclosingJoinPointStaticPart.getSignature().getName(); |
| | | String sl = thisJoinPointStaticPart.getSourceLocation().toString(); |
| | | for(DebugLogPublisher logPublisher : debugPublishers.values()) |
| | | if(DebugLogger.debugEnabled() && data != null) |
| | | { |
| | | TraceSettings settings = getSettings(logPublisher, signature); |
| | | if (level.intValue() >= |
| | | getEffectiveLevel(settings, DebugLogCategory.DATA).intValue()) |
| | | StackTraceElement[] stackTrace = null; |
| | | StackTraceElement[] filteredStackTrace = null; |
| | | StackTraceElement callerFrame = null; |
| | | for (PublisherSettings settings : publisherSettings) |
| | | { |
| | | logPublisher.traceData(level, settings, signature, sl, data); |
| | | TraceSettings activeSettings = settings.classSettings; |
| | | Map<String, TraceSettings> methodSettings = settings.methodSettings; |
| | | |
| | | if (shouldLog(level, DebugLogCategory.DATA, |
| | | activeSettings) || methodSettings != null) |
| | | { |
| | | if(stackTrace == null) |
| | | { |
| | | stackTrace = Thread.currentThread().getStackTrace(); |
| | | } |
| | | if (callerFrame == null) |
| | | { |
| | | callerFrame = getCallerFrame(stackTrace); |
| | | } |
| | | |
| | | String signature = callerFrame.getMethodName(); |
| | | |
| | | // Specific method settings still could exist. Try getting |
| | | // the settings for this method. |
| | | if(methodSettings != null) |
| | | { |
| | | TraceSettings mSettings = methodSettings.get(signature); |
| | | |
| | | if (mSettings == null) |
| | | { |
| | | // Try looking for an undecorated method name |
| | | int idx = signature.indexOf('('); |
| | | if (idx != -1) |
| | | { |
| | | mSettings = |
| | | methodSettings.get(signature.substring(0, idx)); |
| | | } |
| | | } |
| | | |
| | | // If this method does have a specific setting and it is not |
| | | // suppose to be logged, continue. |
| | | if (mSettings != null) |
| | | { |
| | | if(!shouldLog(level, DebugLogCategory.DATA, |
| | | mSettings)) |
| | | { |
| | | continue; |
| | | } |
| | | else |
| | | { |
| | | activeSettings = mSettings; |
| | | } |
| | | } |
| | | } |
| | | |
| | | String sl = callerFrame.getFileName() + " @ " + |
| | | callerFrame.getLineNumber(); |
| | | |
| | | if (filteredStackTrace == null && activeSettings.stackDepth > 0) |
| | | { |
| | | filteredStackTrace = |
| | | DebugStackTraceFormatter.SMART_FRAME_FILTER. |
| | | getFilteredStackTrace(stackTrace); |
| | | } |
| | | |
| | | settings.debugPublisher.traceData(level, activeSettings, signature, |
| | | sl, data, filteredStackTrace); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * AspectJ Implementation. |
| | | * Log a protocol element. |
| | | * |
| | | * @param thisEnclosingJoinPointStaticPart the JoinPoint reflection object |
| | | * of the code that contains the |
| | | * debug call. |
| | | * @param thisJoinPointStaticPart the JoinPoint reflection object. |
| | | * @param level the level of the log message. |
| | | * @param element the protocol element to dump. |
| | | */ |
| | | @SuppressAjWarnings({"adviceDidNotMatch"}) |
| | | @Around("shouldTrace() && logProtocolElementMethod() && args(level, element)") |
| | | public void traceProtocolElement(JoinPoint.EnclosingStaticPart |
| | | thisEnclosingJoinPointStaticPart, |
| | | JoinPoint.StaticPart |
| | | thisJoinPointStaticPart, |
| | | LogLevel level, ProtocolElement element) |
| | | public void debugProtocolElement(LogLevel level, ProtocolElement element) |
| | | { |
| | | String signature = |
| | | thisEnclosingJoinPointStaticPart.getSignature().getName(); |
| | | String sl = thisJoinPointStaticPart.getSourceLocation().toString(); |
| | | for(DebugLogPublisher logPublisher : debugPublishers.values()) |
| | | if(DebugLogger.debugEnabled() && element != null) |
| | | { |
| | | TraceSettings settings = getSettings(logPublisher, signature); |
| | | if (level.intValue() >= |
| | | getEffectiveLevel(settings, DebugLogCategory.PROTOCOL).intValue()) |
| | | StackTraceElement[] stackTrace = null; |
| | | StackTraceElement[] filteredStackTrace = null; |
| | | StackTraceElement callerFrame = null; |
| | | for (PublisherSettings settings : publisherSettings) |
| | | { |
| | | logPublisher.traceProtocolElement(level, settings, signature, sl, |
| | | element); |
| | | TraceSettings activeSettings = settings.classSettings; |
| | | Map<String, TraceSettings> methodSettings = settings.methodSettings; |
| | | |
| | | if (shouldLog(level, DebugLogCategory.PROTOCOL, |
| | | activeSettings) || methodSettings != null) |
| | | { |
| | | if(stackTrace == null) |
| | | { |
| | | stackTrace = Thread.currentThread().getStackTrace(); |
| | | } |
| | | if (callerFrame == null) |
| | | { |
| | | callerFrame = getCallerFrame(stackTrace); |
| | | } |
| | | |
| | | String signature = callerFrame.getMethodName(); |
| | | |
| | | // Specific method settings still could exist. Try getting |
| | | // the settings for this method. |
| | | if(methodSettings != null) |
| | | { |
| | | TraceSettings mSettings = methodSettings.get(signature); |
| | | |
| | | if (mSettings == null) |
| | | { |
| | | // Try looking for an undecorated method name |
| | | int idx = signature.indexOf('('); |
| | | if (idx != -1) |
| | | { |
| | | mSettings = |
| | | methodSettings.get(signature.substring(0, idx)); |
| | | } |
| | | } |
| | | |
| | | // If this method does have a specific setting and it is not |
| | | // suppose to be logged, continue. |
| | | if (mSettings != null) |
| | | { |
| | | if(!shouldLog(level, DebugLogCategory.PROTOCOL, |
| | | mSettings)) |
| | | { |
| | | continue; |
| | | } |
| | | else |
| | | { |
| | | activeSettings = mSettings; |
| | | } |
| | | } |
| | | } |
| | | |
| | | String sl = callerFrame.getFileName() + " @ " + |
| | | callerFrame.getLineNumber(); |
| | | |
| | | if (filteredStackTrace == null && activeSettings.stackDepth > 0) |
| | | { |
| | | filteredStackTrace = |
| | | DebugStackTraceFormatter.SMART_FRAME_FILTER. |
| | | getFilteredStackTrace(stackTrace); |
| | | } |
| | | |
| | | settings.debugPublisher.traceProtocolElement(level, activeSettings, |
| | | signature, sl, element, |
| | | filteredStackTrace); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * AspectJ Implementation. |
| | | * Log raw data in the form of a ByteBuffer. |
| | | * |
| | | * @param thisEnclosingJoinPointStaticPart the JoinPoint reflection object |
| | | * of the code that contains the |
| | | * debug call. |
| | | * @param thisJoinPointStaticPart the JoinPoint reflection object. |
| | | * @param level the level of the log message. |
| | | * @param buffer the data to dump. |
| | | */ |
| | | @SuppressAjWarnings({"adviceDidNotMatch"}) |
| | | @Around("shouldTrace() && logDataMethod() && args(level, buffer)") |
| | | public void traceData(JoinPoint.EnclosingStaticPart |
| | | thisEnclosingJoinPointStaticPart, |
| | | JoinPoint.StaticPart |
| | | thisJoinPointStaticPart, |
| | | LogLevel level, ByteBuffer buffer) |
| | | public void debugData(LogLevel level, ByteBuffer buffer) |
| | | { |
| | | String signature = |
| | | thisEnclosingJoinPointStaticPart.getSignature().getName(); |
| | | String sl = thisJoinPointStaticPart.getSourceLocation().toString(); |
| | | for(DebugLogPublisher logPublisher : debugPublishers.values()) |
| | | { |
| | | TraceSettings settings = getSettings(logPublisher, signature); |
| | | if (level.intValue() >= |
| | | getEffectiveLevel(settings, DebugLogCategory.DATA).intValue()) |
| | | { |
| | | logPublisher.traceData(level, settings, signature, sl, buffer.array()); |
| | | } |
| | | } |
| | | debugData(level, buffer.array()); |
| | | } |
| | | |
| | | /** |
| | | * Get the current trace settings in effect for the specified method. |
| | | * Gets the name of the class this tracer traces. |
| | | * |
| | | * @param debugLogPublisher - the debug publisher to get the trace settings |
| | | * from. |
| | | * @param method - the method to get trace settings for |
| | | * @return the current trace settings in effect |
| | | * @return The name of the class this tracer traces. |
| | | */ |
| | | protected final TraceSettings getSettings(DebugLogPublisher debugLogPublisher, |
| | | String method) |
| | | public String getTracedClassName() |
| | | { |
| | | TraceSettings settings = this.classSettings.get(debugLogPublisher); |
| | | return className; |
| | | } |
| | | |
| | | Map<String, TraceSettings> methodSettings = |
| | | this.methodSettings.get(debugLogPublisher); |
| | | if (methodSettings != null) |
| | | /** |
| | | * Update the cached settings of the tracer with the settings from the |
| | | * provided publishers. |
| | | * |
| | | * @param publishers The array of publishers to obtain the settings from. |
| | | */ |
| | | @SuppressWarnings("unchecked") |
| | | void updateSettings(DebugLogPublisher[] publishers) |
| | | { |
| | | PublisherSettings[] newSettings = |
| | | new PublisherSettings[publishers.length]; |
| | | |
| | | // Get the settings from all publishers. |
| | | for(int i = 0; i < publishers.length; i++) |
| | | { |
| | | TraceSettings mSettings = methodSettings.get(method); |
| | | DebugLogPublisher publisher = publishers[i]; |
| | | PublisherSettings settings = new PublisherSettings(); |
| | | |
| | | if (mSettings == null) |
| | | settings.debugPublisher = publisher; |
| | | settings.classSettings = publisher.getClassSettings(className); |
| | | |
| | | // For some reason, the compiler doesn't see that |
| | | // debugLogPublihser.getMethodSettings returns a parameterized Map. |
| | | // This problem goes away if a parameterized verson of DebugLogPublisher |
| | | // is used. However, we can't not use reflection to instantiate a generic |
| | | // DebugLogPublisher<? extends DebugLogPublisherCfg> type. The only thing |
| | | // we can do is to just supress the compiler warnings. |
| | | settings.methodSettings = publisher.getMethodSettings(className); |
| | | |
| | | newSettings[i] = settings; |
| | | } |
| | | |
| | | publisherSettings = newSettings; |
| | | } |
| | | |
| | | /** |
| | | * Return the caller stack frame. |
| | | * |
| | | * @param stackTrace The entrie stack trace frames. |
| | | * @return the caller stack frame or null if none is found on the |
| | | * stack trace. |
| | | */ |
| | | private StackTraceElement getCallerFrame(StackTraceElement[] stackTrace) |
| | | { |
| | | if (stackTrace != null && stackTrace.length > 0) |
| | | { |
| | | // Skip leading frames debug logging classes and getStackTrace |
| | | // method call frame if any. |
| | | for (int i = 0; i < stackTrace.length; i++) |
| | | { |
| | | // Try looking for an undecorated method name |
| | | int idx = method.indexOf('('); |
| | | if (idx != -1) |
| | | StackTraceElement aStackTrace = stackTrace[i]; |
| | | if(i == 0 && aStackTrace.getClassName().equals("java.lang.Thread")) |
| | | { |
| | | mSettings = |
| | | methodSettings.get(method.substring(0, idx)); |
| | | continue; |
| | | } |
| | | |
| | | if (!aStackTrace.getClassName().startsWith( |
| | | "org.opends.server.loggers.debug")) |
| | | { |
| | | return aStackTrace; |
| | | } |
| | | } |
| | | |
| | | if (mSettings != null) settings = mSettings; |
| | | } |
| | | |
| | | return settings; |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * Retrieve the current log level given the trace settings and log category. |
| | | * |
| | | * @param settings the trace settings to test from. |
| | | * @param category the log category to test. |
| | | * @return the effective log level. |
| | | */ |
| | | protected final LogLevel getEffectiveLevel(TraceSettings settings, |
| | | LogCategory category) |
| | | private boolean shouldLog(LogLevel messageLevel, LogCategory messageCategory, |
| | | TraceSettings activeSettings) |
| | | { |
| | | if (settings == null) |
| | | { |
| | | return DebugLogLevel.DISABLED; |
| | | } |
| | | return !(activeSettings.includeCategories != null && |
| | | !activeSettings.includeCategories.contains(messageCategory)) && |
| | | messageLevel.intValue() >= activeSettings.level.intValue(); |
| | | |
| | | LogLevel level = settings.level; |
| | | Set<LogCategory> includedCategories = settings.includeCategories; |
| | | |
| | | if(includedCategories != null && |
| | | !includedCategories.contains(category)) |
| | | { |
| | | level = DebugLogLevel.DISABLED; |
| | | } |
| | | |
| | | return level; |
| | | } |
| | | } |
| opends/src/server/org/opends/server/loggers/debug/TextDebugLogPublisher.java
opends/src/server/org/opends/server/monitors/DatabaseEnvironmentMonitor.java
opends/src/server/org/opends/server/monitors/SystemInfoMonitorProvider.java
opends/src/server/org/opends/server/monitors/VersionMonitorProvider.java
opends/src/server/org/opends/server/plugins/LDAPADListPlugin.java
opends/src/server/org/opends/server/plugins/LastModPlugin.java
opends/src/server/org/opends/server/plugins/PasswordPolicyImportPlugin.java
opends/src/server/org/opends/server/plugins/profiler/ProfileStack.java
opends/src/server/org/opends/server/plugins/profiler/ProfileStackFrame.java
opends/src/server/org/opends/server/plugins/profiler/ProfilerPlugin.java
opends/src/server/org/opends/server/plugins/profiler/ProfilerThread.java
opends/src/server/org/opends/server/protocols/asn1/ASN1OctetString.java
opends/src/server/org/opends/server/protocols/asn1/ASN1Reader.java
opends/src/server/org/opends/server/protocols/asn1/ASN1Writer.java
opends/src/server/org/opends/server/protocols/internal/InternalClientConnection.java
opends/src/server/org/opends/server/protocols/jmx/DirectoryRMIClientSocketFactory.java
opends/src/server/org/opends/server/protocols/jmx/DirectoryRMIServerSocketFactory.java
opends/src/server/org/opends/server/protocols/jmx/JmxClientConnection.java
opends/src/server/org/opends/server/protocols/jmx/RmiAuthenticator.java
opends/src/server/org/opends/server/protocols/jmx/RmiConnector.java
opends/src/server/org/opends/server/protocols/ldap/AbandonRequestProtocolOp.java
opends/src/server/org/opends/server/protocols/ldap/AddRequestProtocolOp.java
opends/src/server/org/opends/server/protocols/ldap/AddResponseProtocolOp.java
opends/src/server/org/opends/server/protocols/ldap/BindRequestProtocolOp.java
opends/src/server/org/opends/server/protocols/ldap/BindResponseProtocolOp.java
opends/src/server/org/opends/server/protocols/ldap/CompareRequestProtocolOp.java
opends/src/server/org/opends/server/protocols/ldap/CompareResponseProtocolOp.java
opends/src/server/org/opends/server/protocols/ldap/DeleteRequestProtocolOp.java
opends/src/server/org/opends/server/protocols/ldap/DeleteResponseProtocolOp.java
opends/src/server/org/opends/server/protocols/ldap/ExtendedRequestProtocolOp.java
opends/src/server/org/opends/server/protocols/ldap/ExtendedResponseProtocolOp.java
opends/src/server/org/opends/server/protocols/ldap/IntermediateResponseProtocolOp.java
opends/src/server/org/opends/server/protocols/ldap/LDAPAttribute.java
opends/src/server/org/opends/server/protocols/ldap/LDAPClientConnection.java
opends/src/server/org/opends/server/protocols/ldap/LDAPConnectionHandler.java
opends/src/server/org/opends/server/protocols/ldap/LDAPControl.java
opends/src/server/org/opends/server/protocols/ldap/LDAPFilter.java
opends/src/server/org/opends/server/protocols/ldap/LDAPMessage.java
opends/src/server/org/opends/server/protocols/ldap/LDAPRequestHandler.java
opends/src/server/org/opends/server/protocols/ldap/LDAPStatistics.java
opends/src/server/org/opends/server/protocols/ldap/ModifyDNRequestProtocolOp.java
opends/src/server/org/opends/server/protocols/ldap/ModifyDNResponseProtocolOp.java
opends/src/server/org/opends/server/protocols/ldap/ModifyRequestProtocolOp.java
opends/src/server/org/opends/server/protocols/ldap/ModifyResponseProtocolOp.java
opends/src/server/org/opends/server/protocols/ldap/SearchRequestProtocolOp.java
opends/src/server/org/opends/server/protocols/ldap/SearchResultDoneProtocolOp.java
opends/src/server/org/opends/server/protocols/ldap/SearchResultEntryProtocolOp.java
opends/src/server/org/opends/server/protocols/ldap/SearchResultReferenceProtocolOp.java
opends/src/server/org/opends/server/protocols/ldap/UnbindRequestProtocolOp.java
opends/src/server/org/opends/server/replication/plugin/HeartbeatMonitor.java
opends/src/server/org/opends/server/replication/plugin/ReplicationBroker.java
opends/src/server/org/opends/server/replication/plugin/ReplicationDomain.java
opends/src/server/org/opends/server/replication/protocol/HeartbeatThread.java
opends/src/server/org/opends/server/replication/server/ServerHandler.java
opends/src/server/org/opends/server/schema/AbsoluteSubtreeSpecificationSyntax.java
opends/src/server/org/opends/server/schema/AciSyntax.java
opends/src/server/org/opends/server/schema/AttributeTypeSyntax.java
opends/src/server/org/opends/server/schema/AuthPasswordEqualityMatchingRule.java
opends/src/server/org/opends/server/schema/AuthPasswordExactEqualityMatchingRule.java
opends/src/server/org/opends/server/schema/DITContentRuleSyntax.java
opends/src/server/org/opends/server/schema/DITStructureRuleSyntax.java
opends/src/server/org/opends/server/schema/DirectoryStringSyntax.java
opends/src/server/org/opends/server/schema/DistinguishedNameEqualityMatchingRule.java
opends/src/server/org/opends/server/schema/DistinguishedNameSyntax.java
opends/src/server/org/opends/server/schema/DoubleMetaphoneApproximateMatchingRule.java
opends/src/server/org/opends/server/schema/GeneralizedTimeEqualityMatchingRule.java
opends/src/server/org/opends/server/schema/GeneralizedTimeOrderingMatchingRule.java
opends/src/server/org/opends/server/schema/GeneralizedTimeSyntax.java
opends/src/server/org/opends/server/schema/IntegerFirstComponentEqualityMatchingRule.java
opends/src/server/org/opends/server/schema/LDAPSyntaxDescriptionSyntax.java
opends/src/server/org/opends/server/schema/MatchingRuleSyntax.java
opends/src/server/org/opends/server/schema/MatchingRuleUseSyntax.java
opends/src/server/org/opends/server/schema/NameAndOptionalUIDSyntax.java
opends/src/server/org/opends/server/schema/NameFormSyntax.java
opends/src/server/org/opends/server/schema/ObjectClassSyntax.java
opends/src/server/org/opends/server/schema/RFC3672SubtreeSpecificationSyntax.java
opends/src/server/org/opends/server/schema/RelativeSubtreeSpecificationSyntax.java
opends/src/server/org/opends/server/schema/TelephoneNumberSyntax.java
opends/src/server/org/opends/server/schema/UTCTimeSyntax.java
opends/src/server/org/opends/server/schema/UniqueMemberEqualityMatchingRule.java
opends/src/server/org/opends/server/schema/UserPasswordEqualityMatchingRule.java
opends/src/server/org/opends/server/tasks/AddSchemaFileTask.java
opends/src/server/org/opends/server/tasks/ImportTask.java
opends/src/server/org/opends/server/tasks/InitializeTargetTask.java
opends/src/server/org/opends/server/tasks/InitializeTask.java
opends/src/server/org/opends/server/tasks/RebuildTask.java
opends/src/server/org/opends/server/tasks/RestoreTask.java
opends/src/server/org/opends/server/tasks/TaskUtils.java
opends/src/server/org/opends/server/tools/LDAPCompare.java
opends/src/server/org/opends/server/tools/LDAPConnection.java
opends/src/server/org/opends/server/tools/LDAPDelete.java
opends/src/server/org/opends/server/tools/LDAPModify.java
opends/src/server/org/opends/server/tools/LDAPSearch.java
opends/src/server/org/opends/server/tools/SSLConnectionFactory.java
opends/src/server/org/opends/server/types/Attribute.java
opends/src/server/org/opends/server/types/AttributeType.java
opends/src/server/org/opends/server/types/AttributeValue.java
opends/src/server/org/opends/server/types/BackupDirectory.java
opends/src/server/org/opends/server/types/BackupInfo.java
opends/src/server/org/opends/server/types/CryptoManager.java
opends/src/server/org/opends/server/types/DITContentRule.java
opends/src/server/org/opends/server/types/DITStructureRule.java
opends/src/server/org/opends/server/types/DN.java
opends/src/server/org/opends/server/types/Entry.java
opends/src/server/org/opends/server/types/FilePermission.java
opends/src/server/org/opends/server/types/InvokableMethod.java
opends/src/server/org/opends/server/types/LDAPURL.java
opends/src/server/org/opends/server/types/LDIFExportConfig.java
opends/src/server/org/opends/server/types/LDIFImportConfig.java
opends/src/server/org/opends/server/types/LockManager.java
opends/src/server/org/opends/server/types/MatchingRuleUse.java
opends/src/server/org/opends/server/types/NameForm.java
opends/src/server/org/opends/server/types/ObjectClass.java
opends/src/server/org/opends/server/types/RDN.java
opends/src/server/org/opends/server/types/RawAttribute.java
opends/src/server/org/opends/server/types/RawFilter.java
opends/src/server/org/opends/server/types/RawModification.java
opends/src/server/org/opends/server/types/Schema.java
opends/src/server/org/opends/server/types/SearchFilter.java
opends/src/server/org/opends/server/types/SortKey.java
opends/src/server/org/opends/server/types/VirtualAttributeRule.java
opends/src/server/org/opends/server/util/EMailMessage.java
opends/src/server/org/opends/server/util/LDIFReader.java
opends/src/server/org/opends/server/util/LDIFWriter.java
opends/src/server/org/opends/server/util/MultiOutputStream.java
opends/src/server/org/opends/server/util/StaticUtils.java
opends/src/server/org/opends/server/util/TimeThread.java
opends/src/server/org/opends/server/util/Validator.java
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/InitOnLineTest.java |