| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.dsml.protocol; |
| | | |
| | |
| | | private Boolean trustAll; |
| | | private Boolean useHTTPAuthzID; |
| | | private HashSet<String> exopStrings = new HashSet<String>(); |
| | | private org.opends.server.types.Control proxyAuthzControl = null; |
| | | private org.opends.server.types.Control proxyAuthzControl; |
| | | |
| | | /** |
| | | * This method will be called by the Servlet Container when |
| | |
| | | /** Default global admin UID. */ |
| | | public static final String GLOBAL_ADMIN_UID = "admin"; |
| | | |
| | | private static HashMap<String, ServerProperty> nameToServerProperty = null; |
| | | private static HashMap<String, ServerProperty> nameToServerProperty; |
| | | |
| | | /** |
| | | * Get a ServerProperty associated to a name. |
| | |
| | | } |
| | | } |
| | | |
| | | private static HashMap<String, AdministratorProperty> |
| | | nameToAdminUserProperty = null; |
| | | private static HashMap<String, AdministratorProperty> nameToAdminUserProperty; |
| | | |
| | | /** |
| | | * Get a AdministratorProperty associated to a name. |
| | |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2009 Parametric Technology Corporation (PTC) |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.admin.ads.util; |
| | |
| | | /** |
| | | * The default keyManager. |
| | | */ |
| | | private X509KeyManager keyManager = null ; |
| | | private X509KeyManager keyManager; |
| | | |
| | | /** |
| | | * The default constructor. |
| | |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2009 Parametric Technology Corporation (PTC) |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.admin.ads.util; |
| | |
| | | private X509TrustManager trustManager; |
| | | private String lastRefusedAuthType; |
| | | private X509Certificate[] lastRefusedChain; |
| | | private Cause lastRefusedCause = null; |
| | | private KeyStore keystore = null; |
| | | private Cause lastRefusedCause; |
| | | private KeyStore keystore; |
| | | |
| | | /** |
| | | * The following ArrayList contain information about the certificates |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.guitools.controlpanel.browser; |
| | | |
| | |
| | | private String[] containerClasses; |
| | | private NumSubordinateHacker numSubordinateHacker; |
| | | private int queueTotalSize; |
| | | private int maxChildren = 0; |
| | | private int maxChildren; |
| | | private final Collection<BrowserEventListener> listeners = |
| | | new ArrayList<BrowserEventListener>(); |
| | | private final LDAPConnectionPool connectionPool; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.datamodel; |
| | |
| | | /** |
| | | * The sort column of the table. |
| | | */ |
| | | protected int sortColumn = 0; |
| | | protected int sortColumn; |
| | | /** |
| | | * Whether the sorting is ascending or descending. |
| | | */ |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | * Portions Copyright 2013-2015 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.datamodel; |
| | |
| | | private ArrayList<String[]> dataArray = |
| | | new ArrayList<String[]>(); |
| | | private String[] COLUMN_NAMES; |
| | | private int sortColumn = 0; |
| | | private int sortColumn; |
| | | private boolean sortAscending = true; |
| | | private boolean displayReplicationInformation; |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.datamodel; |
| | |
| | | private ArrayList<String[]> dataArray = |
| | | new ArrayList<String[]>(); |
| | | private String[] COLUMN_NAMES; |
| | | private int sortColumn = 0; |
| | | private int sortColumn; |
| | | private boolean sortAscending = true; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * The sort column of the table. |
| | | */ |
| | | private int sortColumn = 0; |
| | | private int sortColumn; |
| | | /** |
| | | * Whether the sorting is ascending or descending. |
| | | */ |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.event; |
| | |
| | | */ |
| | | public class ClickTooltipDisplayer extends MouseAdapter |
| | | { |
| | | private boolean isTooltipVisible = false; |
| | | private boolean isTooltipVisible; |
| | | private Popup tipWindow; |
| | | |
| | | /** |
| | |
| | | { |
| | | private Set<String> backendSet; |
| | | private DN lastDn; |
| | | private int nDeleted = 0; |
| | | private int nDeleted; |
| | | private int nToDelete = -1; |
| | | private BrowserController controller; |
| | | private TreePath[] paths; |
| | | private long lastProgressTime; |
| | | private boolean equivalentCommandWithControlPrinted = false; |
| | | private boolean equivalentCommandWithoutControlPrinted = false; |
| | | private boolean equivalentCommandWithControlPrinted; |
| | | private boolean equivalentCommandWithoutControlPrinted; |
| | | private boolean useAdminCtx; |
| | | |
| | | /** |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.task; |
| | |
| | | private Entry newEntry; |
| | | private BrowserController controller; |
| | | private TreePath treePath; |
| | | private boolean useAdminCtx = false; |
| | | private boolean useAdminCtx; |
| | | |
| | | /** |
| | | * Constructor of the task. |
| | |
| | | private BasicNode parentNode; |
| | | private BrowserController controller; |
| | | private DN dn; |
| | | private boolean useAdminCtx = false; |
| | | private boolean useAdminCtx; |
| | | |
| | | /** |
| | | * Constructor of the task. |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | |
| | | private ChangeListener changeListener; |
| | | |
| | | private boolean backupIDInitialized = false; |
| | | private boolean backupIDInitialized; |
| | | |
| | | private ScheduleSummaryPanel schedulePanel; |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | private GenericDialog duplicateEntryDlg; |
| | | private DuplicateEntryPanel duplicateEntryPanel; |
| | | |
| | | private boolean ignoreTreeSelectionEvents = false; |
| | | private boolean ignoreTreeSelectionEvents; |
| | | |
| | | private LDAPEntryReader entryReader; |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.guitools.controlpanel.ui; |
| | | |
| | |
| | | private JLabel lNoConnectionHandlers = Utilities.createPrimaryLabel( |
| | | INFO_CTRL_PANEL_NO_CONNECTION_HANDLER_FOUND.get()); |
| | | |
| | | private boolean firstRealDataSet = false; |
| | | private boolean firstRealDataSet; |
| | | |
| | | private JCheckBoxMenuItem showAveragesMenu; |
| | | |
| | |
| | | private boolean readUseOpenDSJavaHome; |
| | | private boolean readUseOpenDSJavaArgs; |
| | | |
| | | private boolean initialized = false; |
| | | private boolean initialized; |
| | | |
| | | private boolean previousLocal = true; |
| | | |
| | |
| | | private final String[] COLUMN_NAMES = new String[] { |
| | | getHeader(INFO_CTRL_PANEL_COMMAND_LINE_NAME_COLUMN.get(), 40), |
| | | getHeader(INFO_CTRL_PANEL_JAVA_ARGUMENTS_COLUMN.get(), 40)}; |
| | | private int sortColumn = 0; |
| | | private int sortColumn; |
| | | private boolean sortAscending = true; |
| | | |
| | | /** |
| | |
| | | private int lastCollapsedHeight = -1; |
| | | private int lastExpandedHeight = -1; |
| | | |
| | | private static boolean lastShowDetails = false; |
| | | private static boolean lastCloseWhenOver = false; |
| | | private static boolean lastShowDetails; |
| | | private static boolean lastCloseWhenOver; |
| | | |
| | | private boolean taskIsOver; |
| | | |
| | |
| | | private final String[] COLUMN_NAMES = new String[] { |
| | | getHeader(LocalizableMessage.raw("Attribute"), 40), |
| | | getHeader(LocalizableMessage.raw("Value", 40))}; |
| | | private int sortColumn = 0; |
| | | private int sortColumn; |
| | | private boolean sortAscending = true; |
| | | |
| | | /** |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui.components; |
| | |
| | | private LinkedHashSet<ActionListener> listeners = |
| | | new LinkedHashSet<ActionListener>(); |
| | | |
| | | private boolean constructorBorderSet = false; |
| | | private boolean constructorBorderSet; |
| | | |
| | | /** |
| | | * Default constructor. |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui.nodes; |
| | |
| | | private Icon icon; |
| | | private int fontStyle; |
| | | |
| | | private boolean sizeLimitReached = false; |
| | | private boolean sizeLimitReached; |
| | | |
| | | private String[] objectClassValues; |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.guitools.controlpanel.util; |
| | | |
| | |
| | | /** |
| | | * Whether the configuration has already been read or not. |
| | | */ |
| | | protected boolean configRead = false; |
| | | protected boolean configRead; |
| | | |
| | | /** |
| | | * The set of connection listeners. |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.guitools.controlpanel.util; |
| | | |
| | |
| | | private static String[] packages = { |
| | | "org.opends" |
| | | }; |
| | | static private File logFile = null; |
| | | static private File logFile; |
| | | static private FileHandler fileHandler; |
| | | |
| | | /** |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS. |
| | | * Portions Copyright 2013-2015 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.quicksetup; |
| | |
| | | */ |
| | | public class Configuration { |
| | | |
| | | private String contents = null; |
| | | private String lowerCaseContents = null; |
| | | private Installation install = null; |
| | | private File file = null; |
| | | private String contents; |
| | | private String lowerCaseContents; |
| | | private Installation install; |
| | | private File file; |
| | | |
| | | /** |
| | | * Create a Configuration from a file. |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS. |
| | | * Portions Copyright 2013-2015 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.quicksetup; |
| | |
| | | /** |
| | | * The File object related to the license file. |
| | | */ |
| | | static private File licFile = null; |
| | | static private File licFile; |
| | | |
| | | /** |
| | | * The license file approval state. |
| | | */ |
| | | static private boolean approved = false; |
| | | static private boolean approved; |
| | | |
| | | /** |
| | | * Returns the license file name. |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup; |
| | |
| | | */ |
| | | public class QuickSetupLog { |
| | | |
| | | static private File logFile = null; |
| | | static private FileHandler fileHandler = null; |
| | | static private File logFile; |
| | | static private FileHandler fileHandler; |
| | | |
| | | /** |
| | | * Creates a new file handler for writing log messages to the file indicated |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.installer.ui; |
| | |
| | | new TreeSet<ServerDescriptor>(this); |
| | | //The display of the server the user provided in the replication options |
| | | // panel |
| | | private String serverToConnectDisplay = null; |
| | | private String serverToConnectDisplay; |
| | | |
| | | /** |
| | | * Constructor of the panel. |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | * Portions Copyright 2013-2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.quicksetup.installer.ui; |
| | | |
| | |
| | | new HashMap<String, JCheckBox>(); |
| | | // The display of the server the user provided in the replication options |
| | | // panel |
| | | private String serverToConnectDisplay = null; |
| | | private String serverToConnectDisplay; |
| | | |
| | | private JLabel noSuffixLabel; |
| | | private Component labelGlue; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.ui; |
| | |
| | | } |
| | | } |
| | | |
| | | private static long lastActionWhen = 0; |
| | | private static long lastActionWhen; |
| | | |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | * Portions Copyright 2013-2015 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.quicksetup.ui; |
| | |
| | | */ |
| | | public class UIFactory |
| | | { |
| | | private static boolean initialized = false; |
| | | private static boolean initialized; |
| | | |
| | | private static String parentPackagePath; |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS. |
| | | * Portions Copyright 2012-2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.quicksetup.util; |
| | | |
| | |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | private Application application = null; |
| | | private Application application; |
| | | |
| | | /** |
| | | * Creates a new file manager. |
| | |
| | | */ |
| | | private abstract class FileOperation { |
| | | |
| | | private File objectFile = null; |
| | | private File objectFile; |
| | | |
| | | /** |
| | | * Creates a new file operation. |
| | |
| | | */ |
| | | private class MoveOperation extends FileOperation { |
| | | |
| | | File destination = null; |
| | | File destination; |
| | | |
| | | /** |
| | | * Creates a delete operation. |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.util; |
| | |
| | | */ |
| | | public class StandardOutputSuppressor { |
| | | |
| | | static private Token token = null; |
| | | static private Token token; |
| | | |
| | | /** |
| | | * Object to return to this class for |
| | | * unsupressing output. |
| | | */ |
| | | /** Object to return to this class for unsuppressing output. */ |
| | | static private class Token { |
| | | PrintStream out; |
| | | PrintStream err; |
| | | } |
| | | |
| | | /** |
| | | * Suppresses output to the standard output |
| | | * streams. |
| | | */ |
| | | /** Suppresses output to the standard output streams. */ |
| | | static synchronized public void suppress() { |
| | | if (token == null) { |
| | | token = new Token(); |
| | |
| | | } |
| | | |
| | | /** |
| | | * Unsupresses the standard output streams. Following a call to this |
| | | * Unsuppresses the standard output streams. Following a call to this |
| | | * method System.out and System.err will point to the descriptor prior |
| | | * to calling <code>suppress()</code>. |
| | | */ |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.util; |
| | |
| | | */ |
| | | public class UIKeyStore extends KeyStore |
| | | { |
| | | private static KeyStore keyStore = null; |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | private static KeyStore keyStore; |
| | | |
| | | /** |
| | | * This should never be called. |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | * Portions Copyright 2013-2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.quicksetup.webstart; |
| | | |
| | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | private ApplicationException ex; |
| | | |
| | | private boolean isFinished; |
| | | |
| | | private int downloadPercentage = 0; |
| | | |
| | | private int currentPercMin = 0; |
| | | |
| | | private int currentPercMax = 0; |
| | | |
| | | private int currentValidatingPercent = 0; |
| | | |
| | | private int currentUpgradingPercent = 0; |
| | | |
| | | private int downloadPercentage; |
| | | private int currentPercMin; |
| | | private int currentPercMax; |
| | | private int currentValidatingPercent; |
| | | private int currentUpgradingPercent; |
| | | private Status status = Status.DOWNLOADING; |
| | | |
| | | private LocalizableMessage summary = null; |
| | | private LocalizableMessage summary; |
| | | |
| | | /** |
| | | * This enumeration contains the different Status on which |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin; |
| | | |
| | |
| | | DefaultBehaviorProvider<T> { |
| | | |
| | | // The absolute path to the managed object containing the property. |
| | | private ManagedObjectPath<?, ?> path = null; |
| | | private ManagedObjectPath<?, ?> path; |
| | | |
| | | // The string representation of the managed object path specifying |
| | | // the absolute location of the managed object. |
| | |
| | | |
| | | // The string representation of the managed object path specifying |
| | | // the parent of the aggregated managed objects. |
| | | private String parentPathString = null; |
| | | private String parentPathString; |
| | | |
| | | // The name of a relation in the parent managed object which |
| | | // contains the aggregated managed objects. |
| | | private String rdName = null; |
| | | private String rdName; |
| | | |
| | | // The condition which is used to determine if a referenced |
| | | // managed object is enabled. |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS. |
| | | * Portions Copyright 2012-2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.admin; |
| | | |
| | |
| | | // run-time. For example, when removing or replacing extension Jar |
| | | // files (the URLClassLoader only supports adding new |
| | | // URLs, not removal). |
| | | private MyURLClassLoader loader = null; |
| | | private MyURLClassLoader loader; |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.admin; |
| | |
| | | |
| | | // Optional base DN which all valid values must be immediately |
| | | // subordinate to. |
| | | private DN baseDN = null; |
| | | private DN baseDN; |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin; |
| | | |
| | |
| | | private DurationUnit baseUnit = DurationUnit.SECONDS; |
| | | |
| | | // The optional maximum unit for this property definition. |
| | | private DurationUnit maximumUnit = null; |
| | | private DurationUnit maximumUnit; |
| | | |
| | | // The lower limit of the property value in milli-seconds. |
| | | private long lowerLimit = 0L; |
| | | private long lowerLimit; |
| | | |
| | | // The optional upper limit of the property value in |
| | | // milli-seconds. |
| | | private Long upperLimit = null; |
| | | private Long upperLimit; |
| | | |
| | | // Indicates whether this property allows the use of the |
| | | // "unlimited" duration value (represented using a -1L or the |
| | | // string "unlimited"). |
| | | private boolean allowUnlimited = false; |
| | | private boolean allowUnlimited; |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.admin; |
| | |
| | | extends AbstractBuilder<C, S, InstantiableRelationDefinition<C, S>> { |
| | | |
| | | // The optional naming property definition. |
| | | private PropertyDefinition<?> namingPropertyDefinition = null; |
| | | private PropertyDefinition<?> namingPropertyDefinition; |
| | | |
| | | // The plural name of the relation. |
| | | private final String pluralName; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.admin; |
| | |
| | | AbstractBuilder<Integer, IntegerPropertyDefinition> { |
| | | |
| | | // The lower limit of the property value. |
| | | private int lowerLimit = 0; |
| | | private int lowerLimit; |
| | | |
| | | // The optional upper limit of the property value. |
| | | private Integer upperLimit = null; |
| | | private Integer upperLimit; |
| | | |
| | | // Indicates whether this property allows the use of the "unlimited" value |
| | | // (represented using a -1 or the string "unlimited"). |
| | | private boolean allowUnlimited = false; |
| | | private boolean allowUnlimited; |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.admin; |
| | |
| | | |
| | | // The optional default managed object associated with this |
| | | // optional relation. |
| | | private DefaultManagedObject<? extends C, ? extends S> |
| | | defaultManagedObject = null; |
| | | private DefaultManagedObject<? extends C, ? extends S> defaultManagedObject; |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.admin; |
| | |
| | | |
| | | // The optional default managed object associated with this |
| | | // singleton relation. |
| | | private DefaultManagedObject<? extends C, ? extends S> |
| | | defaultManagedObject = null; |
| | | private DefaultManagedObject<? extends C, ? extends S> defaultManagedObject; |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin; |
| | | |
| | |
| | | AbstractBuilder<Long, SizePropertyDefinition> { |
| | | |
| | | // The lower limit of the property value in bytes. |
| | | private long lowerLimit = 0L; |
| | | private long lowerLimit; |
| | | |
| | | // The optional upper limit of the property value in bytes. |
| | | private Long upperLimit = null; |
| | | private Long upperLimit; |
| | | |
| | | // Indicates whether this property allows the use of the "unlimited" memory |
| | | // size value (represented using a -1L or the string "unlimited"). |
| | | private boolean allowUnlimited = false; |
| | | private boolean allowUnlimited; |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.admin; |
| | |
| | | private boolean isCaseInsensitive = true; |
| | | |
| | | // Optional pattern which values of this property must match. |
| | | private Pattern pattern = null; |
| | | private Pattern pattern; |
| | | |
| | | // Pattern usage which provides a user-friendly summary of the |
| | | // pattern if present. |
| | | private String patternUsage = null; |
| | | private String patternUsage; |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2007-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin.client.cli; |
| | | |
| | |
| | | /** |
| | | * The 'hostName' global argument. |
| | | */ |
| | | public StringArgument hostNameArg = null; |
| | | public StringArgument hostNameArg; |
| | | |
| | | /** |
| | | * The 'port' global argument. |
| | | */ |
| | | public IntegerArgument portArg = null; |
| | | public IntegerArgument portArg; |
| | | |
| | | /** |
| | | * The 'bindDN' global argument. |
| | | */ |
| | | public StringArgument bindDnArg = null; |
| | | public StringArgument bindDnArg; |
| | | |
| | | /** |
| | | * The 'adminUID' global argument. |
| | | */ |
| | | public StringArgument adminUidArg = null; |
| | | public StringArgument adminUidArg; |
| | | |
| | | /** |
| | | * The 'bindPasswordFile' global argument. |
| | | */ |
| | | public FileBasedArgument bindPasswordFileArg = null; |
| | | public FileBasedArgument bindPasswordFileArg; |
| | | |
| | | /** |
| | | * The 'bindPassword' global argument. |
| | | */ |
| | | public StringArgument bindPasswordArg = null; |
| | | public StringArgument bindPasswordArg; |
| | | |
| | | /** |
| | | * The 'trustAllArg' global argument. |
| | | */ |
| | | public BooleanArgument trustAllArg = null; |
| | | public BooleanArgument trustAllArg; |
| | | |
| | | /** |
| | | * The 'trustStore' global argument. |
| | | */ |
| | | public StringArgument trustStorePathArg = null; |
| | | public StringArgument trustStorePathArg; |
| | | |
| | | /** |
| | | * The 'trustStorePassword' global argument. |
| | | */ |
| | | public StringArgument trustStorePasswordArg = null; |
| | | public StringArgument trustStorePasswordArg; |
| | | |
| | | /** |
| | | * The 'trustStorePasswordFile' global argument. |
| | | */ |
| | | public FileBasedArgument trustStorePasswordFileArg = null; |
| | | public FileBasedArgument trustStorePasswordFileArg; |
| | | |
| | | /** |
| | | * The 'keyStore' global argument. |
| | | */ |
| | | public StringArgument keyStorePathArg = null; |
| | | public StringArgument keyStorePathArg; |
| | | |
| | | /** |
| | | * The 'keyStorePassword' global argument. |
| | | */ |
| | | public StringArgument keyStorePasswordArg = null; |
| | | public StringArgument keyStorePasswordArg; |
| | | |
| | | /** |
| | | * The 'keyStorePasswordFile' global argument. |
| | | */ |
| | | public FileBasedArgument keyStorePasswordFileArg = null; |
| | | public FileBasedArgument keyStorePasswordFileArg; |
| | | |
| | | /** |
| | | * The 'certNicknameArg' global argument. |
| | | */ |
| | | public StringArgument certNicknameArg = null; |
| | | public StringArgument certNicknameArg; |
| | | |
| | | /** |
| | | * The 'useSSLArg' global argument. |
| | | */ |
| | | public BooleanArgument useSSLArg = null; |
| | | public BooleanArgument useSSLArg; |
| | | |
| | | /** |
| | | * The 'useStartTLSArg' global argument. |
| | | */ |
| | | public BooleanArgument useStartTLSArg = null; |
| | | public BooleanArgument useStartTLSArg; |
| | | |
| | | /** |
| | | * Argument indicating a SASL option. |
| | | */ |
| | | public StringArgument saslOptionArg = null; |
| | | public StringArgument saslOptionArg; |
| | | |
| | | /** |
| | | * Argument to specify the connection timeout. |
| | | */ |
| | | public IntegerArgument connectTimeoutArg = null; |
| | | public IntegerArgument connectTimeoutArg; |
| | | |
| | | /** |
| | | * Private container for global arguments. |
| | | */ |
| | | private LinkedHashSet<Argument> argList = null; |
| | | private LinkedHashSet<Argument> argList; |
| | | |
| | | /** The trust manager. */ |
| | | private ApplicationTrustManager trustManager; |
| | | |
| | | private boolean configurationInitialized = false; |
| | | private boolean configurationInitialized; |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** Defines if the CLI always use the SSL connection type. */ |
| | | private boolean alwaysSSL = false; |
| | | private boolean alwaysSSL; |
| | | |
| | | /** |
| | | * Creates a new instance of secure arguments. |
| | |
| | | * |
| | | * |
| | | * Copyright 2007-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.admin.client.cli; |
| | |
| | | /** |
| | | * The 'showUsage' global argument. |
| | | */ |
| | | protected BooleanArgument showUsageArg = null; |
| | | protected BooleanArgument showUsageArg; |
| | | |
| | | /** |
| | | * The 'verbose' global argument. |
| | | */ |
| | | protected BooleanArgument verboseArg = null; |
| | | protected BooleanArgument verboseArg; |
| | | |
| | | /** |
| | | * The secure args list object. |
| | |
| | | /** |
| | | * Argument indicating a properties file argument. |
| | | */ |
| | | protected StringArgument propertiesFileArg = null; |
| | | protected StringArgument propertiesFileArg; |
| | | |
| | | /** |
| | | * The argument which should be used to indicate that we will not |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin.client.spi; |
| | | |
| | |
| | | RelationDefinitionVisitor<Void, Void> { |
| | | |
| | | // Possible exceptions. |
| | | private AuthorizationException ae = null; |
| | | |
| | | private ManagedObjectAlreadyExistsException moaee = null; |
| | | |
| | | private MissingMandatoryPropertiesException mmpe = null; |
| | | |
| | | private ConcurrentModificationException cme = null; |
| | | |
| | | private OperationRejectedException ore = null; |
| | | |
| | | private CommunicationException ce = null; |
| | | |
| | | |
| | | private AuthorizationException ae; |
| | | private ManagedObjectAlreadyExistsException moaee; |
| | | private MissingMandatoryPropertiesException mmpe; |
| | | private ConcurrentModificationException cme; |
| | | private OperationRejectedException ore; |
| | | private CommunicationException ce; |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.admin.client.spi; |
| | |
| | | |
| | | // Any exception that occurred whilst retrieving inherited default |
| | | // values. |
| | | private PropertyException exception = null; |
| | | private PropertyException exception; |
| | | |
| | | // The path of the managed object containing the first property. |
| | | private final ManagedObjectPath<?, ?> firstPath; |
| | |
| | | private final boolean isCreate; |
| | | |
| | | // The path of the managed object containing the next property. |
| | | private ManagedObjectPath<?, ?> nextPath = null; |
| | | private ManagedObjectPath<?, ?> nextPath; |
| | | |
| | | // The next property whose default values were required. |
| | | private PropertyDefinition<T> nextProperty = null; |
| | | private PropertyDefinition<T> nextProperty; |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin.condition; |
| | | |
| | |
| | | } |
| | | |
| | | // The strongly typed private implementation. |
| | | private Impl<?> impl = null; |
| | | private Impl<?> impl; |
| | | |
| | | // The property name. |
| | | private final String propertyName; |
| | |
| | | * |
| | | * |
| | | * Copyright 2007-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin.doc; |
| | | |
| | |
| | | private final int ind = 0; |
| | | private StringBuffer htmlBuff = new StringBuffer(); |
| | | private static String generationDir; |
| | | private static boolean ldapMapping = false; |
| | | private static boolean ldapMapping; |
| | | private static String OpenDJWiki; |
| | | private static String OpenDJHome; |
| | | private static String aciSyntaxPage; |
| | | private static String durationSyntaxPage; |
| | | private boolean inList = false; |
| | | private int listLevel = 0; |
| | | private boolean inList; |
| | | private int listLevel; |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin.server; |
| | | |
| | |
| | | |
| | | // Any exception that occurred whilst retrieving inherited default |
| | | // values. |
| | | private PropertyException exception = null; |
| | | private PropertyException exception; |
| | | |
| | | // Optional new configuration entry which does not yet exist in |
| | | // the configuration back-end. |
| | | private final ConfigEntry newConfigEntry; |
| | | |
| | | // The path of the managed object containing the next property. |
| | | private ManagedObjectPath<?, ?> nextPath = null; |
| | | private ManagedObjectPath<?, ?> nextPath; |
| | | |
| | | // The next property whose default values were required. |
| | | private PropertyDefinition<T> nextProperty = null; |
| | | private PropertyDefinition<T> nextProperty; |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS. |
| | | * Portions Copyright 2012-2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.api; |
| | | |
| | |
| | | private ConnectionHandlerMonitor monitor; |
| | | |
| | | /** Is this handler the admin connection handler. */ |
| | | private boolean isAdminConnectionHandler = false; |
| | | private boolean isAdminConnectionHandler; |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | * Portions Copyright 2013-2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.api; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | |
| | | protected AtomicLong cacheMisses = new AtomicLong(0); |
| | | |
| | | // The monitor associated with this entry cache. |
| | | private EntryCacheMonitorProvider entryCacheMonitor = null; |
| | | private EntryCacheMonitorProvider entryCacheMonitor; |
| | | |
| | | |
| | | /** |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2010-2014 ForgeRock AS |
| | | * Portions Copyright 2010-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.authorization.dseecompat; |
| | | |
| | |
| | | /** |
| | | * The ACI targets. |
| | | */ |
| | | private AciTargets targets=null; |
| | | private AciTargets targets; |
| | | |
| | | /** |
| | | * Version that we support. |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS. |
| | | * Portions Copyright 2012-2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.authorization.dseecompat; |
| | | |
| | |
| | | /** |
| | | * Index into the ACI string where the ACI body starts. |
| | | */ |
| | | private int startPos=0; |
| | | private int startPos; |
| | | |
| | | /** |
| | | * The name of the ACI, currently not used but parsed. |
| | | */ |
| | | private String name = null; |
| | | private String name; |
| | | |
| | | /** |
| | | * The version of the ACi, current not used but parsed and checked for 3.0. |
| | | */ |
| | | private String version = null; |
| | | private String version; |
| | | |
| | | /** |
| | | * This structure represents a permission-bind rule pairs. There can be |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.authorization.dseecompat; |
| | | |
| | |
| | | * True if this is the first attribute type in the resource entry being |
| | | * evaluated. |
| | | */ |
| | | private boolean isFirst = false; |
| | | private boolean isFirst; |
| | | |
| | | /** |
| | | * True if an entry test rule was seen during target matching of an ACI |
| | | * entry. A entry test rule is an ACI with targetattrs target keyword. |
| | | */ |
| | | private boolean isEntryTestRule = false; |
| | | private boolean isEntryTestRule; |
| | | |
| | | /** |
| | | * The right mask to use in the evaluation of the LDAP operation. |
| | |
| | | /** |
| | | * True if a targattrfilters match was found. |
| | | */ |
| | | private boolean targAttrFiltersMatch=false; |
| | | private boolean targAttrFiltersMatch; |
| | | |
| | | /** |
| | | * The authorization entry currently being evaluated. If proxied |
| | |
| | | * This entry is only used if proxied authorization is being used. It is |
| | | * the original authorization entry before the proxied authorization change. |
| | | */ |
| | | private Entry origAuthorizationEntry=null; |
| | | private Entry origAuthorizationEntry; |
| | | |
| | | /** |
| | | * True if proxied authorization is being used. |
| | | */ |
| | | private boolean proxiedAuthorization=false; |
| | | private boolean proxiedAuthorization; |
| | | |
| | | /** |
| | | * Used by proxied authorization processing. True if the entry has already |
| | |
| | | * several access checks on the same entry (modify DN), this |
| | | * flag is used to bypass the proxy check after the initial evaluation. |
| | | */ |
| | | private boolean seenEntry=false; |
| | | private boolean seenEntry; |
| | | |
| | | /** |
| | | * True if geteffectiverights evaluation is in progress. |
| | | */ |
| | | private boolean isGetEffectiveRightsEval=false; |
| | | private boolean isGetEffectiveRightsEval; |
| | | |
| | | /** |
| | | * True if the operation has a geteffectiverights control. |
| | | */ |
| | | private boolean hasGetEffectiveRightsControl=false; |
| | | private boolean hasGetEffectiveRightsControl; |
| | | |
| | | /** |
| | | * The geteffectiverights authzID in DN format. |
| | | */ |
| | | private DN authzid=null; |
| | | private DN authzid; |
| | | |
| | | /** |
| | | * True if the authZid should be used as the client DN, only used in |
| | | * geteffectiverights evaluation. |
| | | */ |
| | | private boolean useAuthzid=false; |
| | | private boolean useAuthzid; |
| | | |
| | | /** |
| | | * The list of specific attributes to get rights for, in addition to |
| | | * any attributes requested in the search. |
| | | */ |
| | | private List<AttributeType> specificAttrs=null; |
| | | private List<AttributeType> specificAttrs; |
| | | |
| | | /** |
| | | * Table of ACIs that have targattrfilter keywords that matched. Used |
| | |
| | | * targattrfilter keyword. Used in geteffectiverights attributeLevel |
| | | * write evaluation. |
| | | */ |
| | | private String targAttrFiltersAciName=null; |
| | | private String targAttrFiltersAciName; |
| | | |
| | | /** |
| | | * Value that is used to store the allow/deny result of a deciding ACI |
| | | * containing a targattrfilter keyword. Used in geteffectiverights |
| | | * attributeLevel write evaluation. |
| | | */ |
| | | private int targAttrMatch=0; |
| | | private int targAttrMatch; |
| | | |
| | | /** |
| | | * The ACI that decided the last evaluation. Used in geteffectiverights |
| | | * loginfo processing. |
| | | */ |
| | | private Aci decidingAci=null; |
| | | private Aci decidingAci; |
| | | |
| | | /** |
| | | * The reason the last evaluation decision was made. Used both |
| | | * in geteffectiverights loginfo processing and attributeLevel write |
| | | * evaluation. |
| | | */ |
| | | private EnumEvalReason evalReason=null; |
| | | private EnumEvalReason evalReason; |
| | | |
| | | /** |
| | | * A summary string holding the last evaluation information in textual |
| | | * format. Used in geteffectiverights loginfo processing. |
| | | */ |
| | | private String summaryString=null; |
| | | private String summaryString; |
| | | |
| | | /** |
| | | * Flag used to determine if ACI all attributes target matched. |
| | | */ |
| | | private int evalAllAttributes=0; |
| | | private int evalAllAttributes; |
| | | |
| | | /** |
| | | * String used to hold a control OID string. |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.authorization.dseecompat; |
| | | |
| | |
| | | * Attribute type used in access evaluation to see if the geteffectiverights |
| | | * related to the "aclRights" attribute can be performed. |
| | | */ |
| | | private static AttributeType aclRights = null; |
| | | private static AttributeType aclRights; |
| | | |
| | | /** |
| | | * Attribute type used in access evaluation to see if the geteffectiverights |
| | | * related to the "aclRightsInfo" attribute can be performed. |
| | | */ |
| | | private static AttributeType aclRightsInfo = null; |
| | | private static AttributeType aclRightsInfo; |
| | | |
| | | /** Attribute type used in the geteffectiverights selfwrite evaluation. */ |
| | | private static AttributeType dnAttributeType=null; |
| | | private static AttributeType dnAttributeType; |
| | | |
| | | /**The distinguishedName string. */ |
| | | private static final String dnAttrStr = "distinguishedname"; |
| | |
| | | /* |
| | | * True if the server is in lockdown mode. |
| | | */ |
| | | private boolean inLockDownMode = false; |
| | | private boolean inLockDownMode; |
| | | |
| | | /* |
| | | * The AciList caches the ACIs. |
| | |
| | | /** |
| | | * ACI syntax has a target keyword. |
| | | */ |
| | | private Target target = null ; |
| | | private Target target; |
| | | |
| | | /** |
| | | * ACI syntax has a targetscope keyword. |
| | |
| | | /** |
| | | * ACI syntax has a targetattr keyword. |
| | | */ |
| | | private TargetAttr targetAttr = null ; |
| | | private TargetAttr targetAttr; |
| | | |
| | | /** |
| | | * ACI syntax has a targetfilter keyword. |
| | | */ |
| | | private TargetFilter targetFilter=null; |
| | | private TargetFilter targetFilter; |
| | | |
| | | /** |
| | | * ACI syntax has a targattrtfilters keyword. |
| | | */ |
| | | private TargAttrFilters targAttrFilters=null; |
| | | private TargAttrFilters targAttrFilters; |
| | | |
| | | /** |
| | | * The ACI syntax has a targetcontrol keyword. |
| | | */ |
| | | private TargetControl targetControl=null; |
| | | private TargetControl targetControl; |
| | | |
| | | /** |
| | | * The ACI syntax has a extop keyword. |
| | | */ |
| | | private ExtOp extOp=null; |
| | | private ExtOp extOp; |
| | | |
| | | /** |
| | | * The number of regular expression group positions in a valid ACI target |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2014 ForgeRock AS |
| | | * Portions Copyright 2013-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.authorization.dseecompat; |
| | | import static org.opends.messages.AccessControlMessages.*; |
| | |
| | | /** |
| | | * Enumeration representing the authentication method. |
| | | */ |
| | | private EnumAuthMethod authMethod=null; |
| | | private EnumAuthMethod authMethod; |
| | | |
| | | /** |
| | | * The SASL mechanism if the authentication method is SASL. |
| | | */ |
| | | private String saslMech = null; |
| | | private String saslMech; |
| | | |
| | | /** |
| | | * Enumeration representing the bind rule operation type. |
| | | */ |
| | | private EnumBindRuleType type=null; |
| | | private EnumBindRuleType type; |
| | | |
| | | /** |
| | | * Create a class representing an authmethod bind rule keyword from the |
| | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** List of patterns to match against. */ |
| | | private List<String> patterns = null; |
| | | private List<String> patterns; |
| | | |
| | | /** The enumeration representing the bind rule type of the DNS rule. */ |
| | | private EnumBindRuleType type=null; |
| | | private EnumBindRuleType type; |
| | | |
| | | /** Regular expression group used to match a dns rule. */ |
| | | private static final String valueRegex = "([a-zA-Z0-9\\.\\-\\*]+)"; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2014 ForgeRock AS |
| | | * Portions Copyright 2013-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.authorization.dseecompat; |
| | | |
| | |
| | | public class DayOfWeek implements KeywordBindRule { |
| | | |
| | | /** List containing the enumeration of the day of the week. */ |
| | | private List<EnumDayOfWeek> days = null; |
| | | private List<EnumDayOfWeek> days; |
| | | |
| | | /** Enumeration representing the bind rule operation type. */ |
| | | private EnumBindRuleType type=null; |
| | | private EnumBindRuleType type; |
| | | |
| | | /** |
| | | * Create a class representing a dayofweek bind rule keyword. |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2014 ForgeRock AS |
| | | * Portions Copyright 2013-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.authorization.dseecompat; |
| | | |
| | |
| | | public class GroupDN implements KeywordBindRule { |
| | | |
| | | /** List of group DNs. */ |
| | | private List<DN> groupDNs = null; |
| | | private List<DN> groupDNs; |
| | | |
| | | /** Enumeration representing the groupdn operator type. */ |
| | | private EnumBindRuleType type=null; |
| | | private EnumBindRuleType type; |
| | | |
| | | /** |
| | | * Regular expression matching one or more LDAP URLs separated by |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2014 ForgeRock AS |
| | | * Portions Copyright 2013-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.authorization.dseecompat; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | |
| | | * List of the pattern classes, one for each address decoded from the bind |
| | | * rule. |
| | | */ |
| | | private List<PatternIP> patternIPList=null; |
| | | private List<PatternIP> patternIPList; |
| | | |
| | | /** The type of the bind rule (!= or =). */ |
| | | private EnumBindRuleType type=null; |
| | | private EnumBindRuleType type; |
| | | |
| | | /** |
| | | * Create a class representing the IP bind rule expressions for this ACI. |
| | |
| | | * are under this suffix. Originally a way to search all nested groups |
| | | * under this suffix, so the behavior is slightly different. |
| | | */ |
| | | private DN baseDN=null; |
| | | private DN baseDN; |
| | | |
| | | |
| | | /** |
| | |
| | | * this is the sequence of RDN patterns in the DN pattern. Otherwise it |
| | | * is null. |
| | | */ |
| | | PatternRDN[] equality = null; |
| | | PatternRDN[] equality; |
| | | |
| | | |
| | | /** |
| | | * If the pattern included any Multiple-Whole-RDN wildcards, then these |
| | | * are the RDN pattern sequences that appear between those wildcards. |
| | | */ |
| | | PatternRDN[] subInitial = null; |
| | | List<PatternRDN[]> subAnyElements = null; |
| | | PatternRDN[] subFinal = null; |
| | | PatternRDN[] subInitial; |
| | | List<PatternRDN[]> subAnyElements; |
| | | PatternRDN[] subFinal; |
| | | |
| | | |
| | | /** |
| | |
| | | * suffix pattern but the pattern started with a Multiple-Whole-RDN wildcard |
| | | * (one or more RDN components allowed before matching elements). |
| | | */ |
| | | boolean isSuffix = false; |
| | | boolean isSuffix; |
| | | |
| | | |
| | | /** |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.authorization.dseecompat; |
| | | |
| | |
| | | * Indicate whether the RDN contains a wildcard in any of its attribute |
| | | * types. |
| | | */ |
| | | private boolean hasTypeWildcard = false; |
| | | private boolean hasTypeWildcard; |
| | | |
| | | |
| | | /** |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS |
| | | * Portions Copyright 2013-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.authorization.dseecompat; |
| | | |
| | |
| | | private BindRule bindRule; |
| | | |
| | | /** The permission part. */ |
| | | private Permission perm=null; |
| | | private Permission perm; |
| | | |
| | | /** |
| | | * This constructor calls the permission and bind rule decodes |
| | |
| | | /** |
| | | * The access type (allow,deny) corresponding to the ACI permission value. |
| | | */ |
| | | private EnumAccessType accessType = null; |
| | | private EnumAccessType accessType; |
| | | |
| | | /** |
| | | * The rights (search, add, delete, ...) corresponding to the ACI rights |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2014 ForgeRock AS |
| | | * Portions Copyright 2013-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.authorization.dseecompat; |
| | | |
| | |
| | | public class SSF implements KeywordBindRule { |
| | | |
| | | /** Enumeration representing the bind rule operation type. */ |
| | | private EnumBindRuleType type=null; |
| | | private EnumBindRuleType type; |
| | | |
| | | private static final int MAX_KEY_BITS=1024; |
| | | private int ssf; |
| | |
| | | /** |
| | | * The mask corresponding to the operation of this list (add or del). |
| | | */ |
| | | private int mask=0; |
| | | private int mask; |
| | | |
| | | /** |
| | | * ListHashMap keyed by the attribute type and mapping to the corresponding |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2014 ForgeRock AS |
| | | * Portions Copyright 2013-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.authorization.dseecompat; |
| | | |
| | |
| | | * A valid targattrfilters rule may have two TargFilterlist parts -- the |
| | | * first one is required. |
| | | */ |
| | | private TargAttrFilterList firstFilterList = null; |
| | | private TargAttrFilterList secondFilterList = null; |
| | | private TargAttrFilterList firstFilterList; |
| | | private TargAttrFilterList secondFilterList; |
| | | |
| | | /** |
| | | * Regular expression group position for the first operation value. |
| | |
| | | /* |
| | | * Flags that is set if all user attributes pattern seen "*". |
| | | */ |
| | | private boolean allUserAttributes = false ; |
| | | private boolean allUserAttributes; |
| | | |
| | | /* |
| | | * Flags that is set if all operational attributes pattern seen "+". |
| | | */ |
| | | private boolean allOpAttributes = false ; |
| | | private boolean allOpAttributes; |
| | | |
| | | /* |
| | | * HashSet of the attribute types parsed by the constructor. |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2014 ForgeRock AS |
| | | * Portions Copyright 2013-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.authorization.dseecompat; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | |
| | | private static final String timeofdayRegex = "[0-2]\\d[0-5]\\d"; |
| | | |
| | | /** Enumeration representing the bind rule operation type. */ |
| | | private EnumBindRuleType type=null; |
| | | private EnumBindRuleType type; |
| | | |
| | | /** Holds the time value parsed from the ACI. */ |
| | | private int timeRef; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2014 ForgeRock AS |
| | | * Portions Copyright 2013-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.authorization.dseecompat; |
| | | |
| | |
| | | * This list holds a list of objects representing a EnumUserDNType |
| | | * URL mapping. |
| | | */ |
| | | private List<UserDNTypeURL> urlList=null; |
| | | private List<UserDNTypeURL> urlList; |
| | | |
| | | /** Enumeration of the userdn operation type. */ |
| | | private EnumBindRuleType type=null; |
| | | private EnumBindRuleType type; |
| | | |
| | | /** |
| | | * Constructor that creates the userdn class. It also sets up an attribute |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS. |
| | | * Portions Copyright 2012-2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.backends.jeb; |
| | | import com.sleepycat.je.Cursor; |
| | |
| | | /** |
| | | * The current number of entries exported. |
| | | */ |
| | | private long exportedCount = 0; |
| | | private long exportedCount; |
| | | |
| | | /** |
| | | * The current number of entries skipped. |
| | | */ |
| | | private long skippedCount = 0; |
| | | private long skippedCount; |
| | | |
| | | /** |
| | | * Create a new export job. |
| | |
| | | * The number of entries that had been exported at the time of the |
| | | * previous progress report. |
| | | */ |
| | | private long previousCount = 0; |
| | | private long previousCount; |
| | | |
| | | /** |
| | | * The time in milliseconds of the previous progress report. |
| | |
| | | |
| | | private long offset; |
| | | private final ByteBuffer cache; |
| | | private Integer indexID = null; |
| | | private Integer indexID; |
| | | private ByteBuffer keyBuf = ByteBuffer.allocate(128); |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.backends.pluggable; |
| | | |
| | |
| | | private RootContainer rootContainer; |
| | | |
| | | private int maxEntries = 1024; |
| | | private boolean filterUseEnabled = false; |
| | | private boolean filterUseEnabled; |
| | | private String startTimeStamp; |
| | | private final HashMap<SearchFilter, FilterStats> filterToStats = |
| | | new HashMap<SearchFilter, FilterStats>(); |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS. |
| | | * Portions Copyright 2012-2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.backends.pluggable; |
| | | |
| | |
| | | /** |
| | | * The current number of entries exported. |
| | | */ |
| | | private long exportedCount = 0; |
| | | private long exportedCount; |
| | | |
| | | /** |
| | | * The current number of entries skipped. |
| | | */ |
| | | private long skippedCount = 0; |
| | | private long skippedCount; |
| | | |
| | | /** |
| | | * Create a new export job. |
| | |
| | | * The number of entries that had been exported at the time of the |
| | | * previous progress report. |
| | | */ |
| | | private long previousCount = 0; |
| | | private long previousCount; |
| | | |
| | | /** |
| | | * The time in milliseconds of the previous progress report. |
| | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | //The DN representing the authzId. May be null. |
| | | private DN authzDN=null; |
| | | private DN authzDN; |
| | | |
| | | //The raw DN representing the authzId. May be null. |
| | | private String rawAuthzDN=null; |
| | | private String rawAuthzDN; |
| | | |
| | | //The list of additional attribute types to return rights for. May be null. |
| | | private List<AttributeType> attrs=null; |
| | | private List<AttributeType> attrs; |
| | | |
| | | //The raw DN representing the authzId. May be null. |
| | | private List<String> rawAttrs=null; |
| | | private List<String> rawAttrs; |
| | | |
| | | /** |
| | | * Create a new geteffectiverights control with the specified authzDN and |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.controls; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The visibility from the control value. |
| | | private boolean visibility = false; |
| | | private boolean visibility; |
| | | |
| | | /** |
| | | * Creates a new instance of the Subentries Control with the provided |
| | |
| | | "org.opends.server.core.AccessControlConfigManager"; |
| | | |
| | | // The single application-wide instance. |
| | | private static AccessControlConfigManager instance = null; |
| | | private static AccessControlConfigManager instance; |
| | | |
| | | // The active access control implementation. |
| | | private AtomicReference<AccessControlHandler> accessControlHandler; |
| | |
| | | * Indicates whether the server currently holds an exclusive lock on the |
| | | * server lock file. |
| | | */ |
| | | private static boolean serverLocked = false; |
| | | private static boolean serverLocked; |
| | | |
| | | /** |
| | | * The message to be displayed on the command-line when the user asks for the |
| | |
| | | * Used by group instances to determine if new groups have been registered or |
| | | * groups deleted. |
| | | */ |
| | | private volatile long refreshToken = 0; |
| | | private volatile long refreshToken; |
| | | |
| | | /** |
| | | * A mapping between the DNs of the config entries and the associated group |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.core; |
| | | |
| | |
| | | private int secondsUntilUnlock = Integer.MIN_VALUE; |
| | | |
| | | // The set of authentication failure times for this user. |
| | | private List<Long> authFailureTimes = null; |
| | | private List<Long> authFailureTimes; |
| | | |
| | | // The set of grace login times for this user. |
| | | private List<Long> graceLoginTimes = null; |
| | | private List<Long> graceLoginTimes; |
| | | |
| | | // The time that the user's account should expire (or did expire). |
| | | private long accountExpirationTime = Long.MIN_VALUE; |
| | |
| | | private static DN serversDN; |
| | | |
| | | /** Indicates whether the schema references have been initialized. */ |
| | | private static boolean schemaInitDone = false; |
| | | private static boolean schemaInitDone; |
| | | |
| | | /** |
| | | * The secure random number generator used for key generation, initialization |
| | |
| | | private final KeyEntryID fKeyID; |
| | | private final SecretKey fSecretKey; |
| | | private final int fKeyLengthBits; |
| | | private boolean fIsCompromised = false; |
| | | private boolean fIsCompromised; |
| | | } |
| | | |
| | | private static void putSingleValueAttribute( |
| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.extensions; |
| | |
| | | private final int interval; |
| | | private final TimeUnit unit; |
| | | private final String instanceName; |
| | | private int lastState = 0; |
| | | private int lastState; |
| | | |
| | | /** |
| | | * Constructs a new DiskSpaceMonitor that will notify the specified |
| | |
| | | |
| | | // isAvailable acts as memory barrier for lastException. |
| | | private volatile boolean isAvailable = true; |
| | | private DirectoryException lastException = null; |
| | | private DirectoryException lastException; |
| | | |
| | | |
| | | |
| | |
| | | private final class PooledConnection implements Connection |
| | | { |
| | | private Connection connection; |
| | | private boolean connectionIsClosed = false; |
| | | private boolean connectionIsClosed; |
| | | |
| | | |
| | | |
| | |
| | | |
| | | |
| | | // Guarded by PolicyImpl.lock. |
| | | private boolean poolIsClosed = false; |
| | | private boolean poolIsClosed; |
| | | |
| | | private final ConnectionFactory factory; |
| | | private final int poolSize = Runtime.getRuntime().availableProcessors() * 2; |
| | |
| | | private final LDAPWriter writer; |
| | | private final LDAPReader reader; |
| | | private int nextMessageID = 1; |
| | | private boolean isClosed = false; |
| | | private boolean isClosed; |
| | | |
| | | |
| | | |
| | |
| | | private final AttributeType cachedPasswordAttribute; |
| | | private final AttributeType cachedPasswordTimeAttribute; |
| | | |
| | | private ByteString newCachedPassword = null; |
| | | private ByteString newCachedPassword; |
| | | |
| | | |
| | | |
| | |
| | | // Current configuration. |
| | | private LDAPPassThroughAuthenticationPolicyCfg cfg; |
| | | |
| | | private ConnectionFactory searchFactory = null; |
| | | private ConnectionFactory bindFactory = null; |
| | | private ConnectionFactory searchFactory; |
| | | private ConnectionFactory bindFactory; |
| | | |
| | | private PasswordStorageScheme<?> pwdStorageScheme = null; |
| | | private PasswordStorageScheme<?> pwdStorageScheme; |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | * Portions Copyright 2012-2015 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.server.extensions; |
| | |
| | | |
| | | |
| | | private final ByteChannel child; |
| | | private volatile ByteChannel redirect = null; |
| | | private volatile ByteChannel redirect; |
| | | |
| | | |
| | | |
| | |
| | | |
| | | |
| | | // The SASL server to use in the authentication. |
| | | private SaslServer saslServer = null; |
| | | private SaslServer saslServer; |
| | | |
| | | // The identity mapper to use when mapping identities. |
| | | private final IdentityMapper<?> identityMapper; |
| | |
| | | private final String mechanism; |
| | | |
| | | // The authorization entry used in the authentication. |
| | | private Entry authEntry = null; |
| | | private Entry authEntry; |
| | | |
| | | // The authorization entry used in the authentication. |
| | | private Entry authzEntry = null; |
| | | private Entry authzEntry; |
| | | |
| | | // The user name used in the authentication taken from the name callback. |
| | | private String userName; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS |
| | | * Portions Copyright 2012-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.extensions; |
| | | |
| | |
| | | private final ByteChannel channel; |
| | | private final SSLEngine sslEngine; |
| | | |
| | | private volatile SSLException sslException = null; |
| | | private volatile SSLException sslException; |
| | | private ByteBuffer recvWrappedBuffer; |
| | | private ByteBuffer recvUnwrappedBuffer; |
| | | private ByteBuffer sendWrappedBuffer; |
| | |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | protected static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | private AccessLogPublisherCfg cfg = null; |
| | | private Filter filter = null; |
| | | private AccessLogPublisherCfg cfg; |
| | | private Filter filter; |
| | | private final ChangeListener changeListener = new ChangeListener(); |
| | | private final FilterListener filterListener = new FilterListener(); |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2007-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2014 ForgeRock AS |
| | | * Portions Copyright 2013-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.loggers; |
| | | |
| | |
| | | * Trace methods will use this static boolean to determine if debug is enabled |
| | | * so to not incur the cost of calling debugPublishers.isEmpty(). |
| | | */ |
| | | static boolean enabled = false; |
| | | static boolean enabled; |
| | | |
| | | private static final LoggerStorage |
| | | <DebugLogPublisher<DebugLogPublisherCfg>, DebugLogPublisherCfg> |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.loggers; |
| | | |
| | |
| | | |
| | | private File originalFile; |
| | | private String newFile; |
| | | private boolean deleteOriginal = false; |
| | | private boolean deleteOriginal; |
| | | private String encryptAlgorithm = "RSA"; |
| | | private String alias = null; |
| | | private String alias; |
| | | |
| | | /** |
| | | * Create the action based on the original file, the new file after |
| | |
| | | ConfigurationChangeListener<FileCountLogRetentionPolicyCfg> |
| | | { |
| | | |
| | | private int numFiles = 0; |
| | | private int numFiles; |
| | | private FileCountLogRetentionPolicyCfg config; |
| | | |
| | | /** |
| | |
| | | { |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | private long freeDiskSpace = 0; |
| | | private long freeDiskSpace; |
| | | private FreeDiskSpaceLogRetentionPolicyCfg config; |
| | | |
| | | /** |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.loggers; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | |
| | | class LogPublisherErrorHandler |
| | | { |
| | | private DN publisherConfigDN; |
| | | private boolean writeErroroccurred = false; |
| | | private boolean writeErroroccurred; |
| | | |
| | | /** |
| | | * Construct a new log publisher error handler for a log publisher |
| | |
| | | private boolean append; |
| | | private long interval; |
| | | private boolean stopRequested; |
| | | private long sizeLimit = 0; |
| | | private long sizeLimit; |
| | | |
| | | private Thread rotaterThread; |
| | | |
| | | private Calendar lastRotationTime = TimeThread.getCalendar(); |
| | | private Calendar lastCleanTime = TimeThread.getCalendar(); |
| | | private long lastCleanCount = 0; |
| | | private long totalFilesRotated = 0; |
| | | private long totalFilesCleaned = 0; |
| | | private long lastCleanCount; |
| | | private long totalFilesRotated; |
| | | private long totalFilesCleaned; |
| | | |
| | | /** The underlying output stream. */ |
| | | private MeteredStream outputStream; |
| | | /** The underlaying buffered writer using the output steram. */ |
| | | /** The underlying buffered writer using the output stream. */ |
| | | private BufferedWriter writer; |
| | | |
| | | /** |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.loggers; |
| | | |
| | |
| | | private File originalFile; |
| | | private String signatureAlgorithm = "SHA1withRSA"; |
| | | private String digestAlgorithm = "SHA"; |
| | | private String alias = null; |
| | | private String alias; |
| | | |
| | | /** |
| | | * Create the signature action based on the log file name, |
| | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | private static final File[] EMPTY_FILE_LIST = new File[0]; |
| | | |
| | | private long size = 0; |
| | | private long size; |
| | | private FileComparator comparator; |
| | | private SizeLimitLogRetentionPolicyCfg config; |
| | | |
| | |
| | | |
| | | |
| | | |
| | | private TextWriter writer = null; |
| | | private FileBasedAccessLogPublisherCfg cfg = null; |
| | | private boolean isCombinedMode = false; |
| | | private boolean includeControlOIDs = false; |
| | | private TextWriter writer; |
| | | private FileBasedAccessLogPublisherCfg cfg; |
| | | private boolean isCombinedMode; |
| | | private boolean includeControlOIDs; |
| | | private String timeStampFormat = "dd/MMM/yyyy:HH:mm:ss Z"; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | private TextWriter writer = null; |
| | | private FileBasedHTTPAccessLogPublisherCfg cfg = null; |
| | | private TextWriter writer; |
| | | private FileBasedHTTPAccessLogPublisherCfg cfg; |
| | | private List<String> logFormatFields; |
| | | private String timeStampFormat = "dd/MMM/yyyy:HH:mm:ss Z"; |
| | | |
| | |
| | | RotationPolicy<TimeLimitLogRotationPolicyCfg>, |
| | | ConfigurationChangeListener<TimeLimitLogRotationPolicyCfg> |
| | | { |
| | | private long timeInterval = 0; |
| | | private long timeInterval; |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.monitors; |
| | | |
| | |
| | | private RootContainer rootContainer; |
| | | |
| | | private int maxEntries = 1024; |
| | | private boolean filterUseEnabled = false; |
| | | private boolean filterUseEnabled; |
| | | private String startTimeStamp; |
| | | private final HashMap<SearchFilter, FilterStats> filterToStats = |
| | | new HashMap<SearchFilter, FilterStats>(); |
| | |
| | | private long interval; |
| | | |
| | | //The flag used by the background thread to check if it should exit. |
| | | private boolean stopRequested=false; |
| | | private boolean stopRequested; |
| | | |
| | | //The thread name. |
| | | private static final String name = |
| | |
| | | private File logFile; |
| | | |
| | | //The Thread class that the background thread corresponds to. |
| | | private Thread backGroundThread=null; |
| | | private Thread backGroundThread; |
| | | |
| | | /** |
| | | * Used to save a map in the modifyDN operation attachment map that holds |
| | |
| | | |
| | | // Help to not warn permanently and fullfill the log file |
| | | // in debug mode. |
| | | private boolean alreadyWarn = false; |
| | | private boolean alreadyWarn; |
| | | |
| | | |
| | | /** |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2013-2014 ForgeRock AS |
| | | * Portions Copyright 2013-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.protocols.http; |
| | | |
| | |
| | | |
| | | /** The statistics tracker associated with this client connection. */ |
| | | private final HTTPStatistics statTracker; |
| | | private boolean useNanoTime = false; |
| | | private boolean useNanoTime; |
| | | |
| | | /** Total execution time for this request. */ |
| | | private final AtomicLong totalProcessingTime = new AtomicLong(); |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.protocols.jmx; |
| | | |
| | |
| | | /** |
| | | * the ssl socket factory (do not serialize). |
| | | */ |
| | | private transient SSLSocketFactory sslSocketFactory = null; |
| | | private transient SSLSocketFactory sslSocketFactory; |
| | | |
| | | /** |
| | | * the host to connect to (do not serialize). |
| | | */ |
| | | private transient String serverHostname = null; |
| | | private transient String serverHostname; |
| | | |
| | | /** |
| | | * Constructs a new <code>DirectoryRMIClientSocketFactory</code>. |
| | |
| | | /** |
| | | * The SSL socket factory associated with the connector. |
| | | */ |
| | | private SSLSocketFactory sslSocketFactory = null; |
| | | private SSLSocketFactory sslSocketFactory; |
| | | |
| | | /** |
| | | * Indicate if we required the client authentication via SSL. |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.protocols.jmx; |
| | |
| | | /** |
| | | * the wrapped JMX RMI connector. |
| | | */ |
| | | private JMXConnector jmxc = null; |
| | | private JMXConnector jmxc; |
| | | |
| | | /** |
| | | * the connection environment set at creation. |
| | | */ |
| | | private Map<String,Object> environment = null; |
| | | private Map<String,Object> environment; |
| | | |
| | | /** |
| | | * the JMX Service URL. |
| | | */ |
| | | private JMXServiceURL serviceURL = null; |
| | | private JMXServiceURL serviceURL; |
| | | |
| | | /** |
| | | * the host to connect to. |
| | | */ |
| | | private String serverHostname = null; |
| | | private String serverHostname; |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.protocols.jmx; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | |
| | | { |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | /** |
| | | * The client authentication mode. <code>true</code> indicates that the |
| | | * client will be authenticated by its certificate (SSL protocol). |
| | | * <code>true</code> indicate , that we have to perform an lDAP |
| | | * authentication |
| | | */ |
| | | private boolean needClientCertificate = false; |
| | | |
| | | /** |
| | | * Indicate if the we are in the finalized phase. |
| | | * |
| | | * @see JmxConnectionHandler |
| | | */ |
| | | private boolean finalizedPhase = false; |
| | | private boolean finalizedPhase; |
| | | |
| | | /** |
| | | * The JMX Client connection to be used to perform the bind (auth) |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | * Portions Copyright 2013-2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.protocols.jmx; |
| | | |
| | |
| | | /** |
| | | * The MBean server used to handle JMX interaction. |
| | | */ |
| | | private MBeanServer mbs = null; |
| | | private MBeanServer mbs; |
| | | |
| | | |
| | | /** |
| | |
| | | /** |
| | | * The reference to the created RMI registry. |
| | | */ |
| | | private Registry registry = null; |
| | | private Registry registry; |
| | | |
| | | /** |
| | | * The Underlying Socket factory. |
| | |
| | | |
| | | /** The statistics tracker associated with this client connection. */ |
| | | private final LDAPStatistics statTracker; |
| | | private boolean useNanoTime=false; |
| | | private boolean useNanoTime; |
| | | |
| | | |
| | | /** The connection ID assigned to this connection. */ |
| | |
| | | private final int bufferSize; |
| | | private final RedirectingByteChannel saslChannel; |
| | | private final RedirectingByteChannel tlsChannel; |
| | | private volatile ConnectionSecurityProvider saslActiveProvider = null; |
| | | private volatile ConnectionSecurityProvider tlsActiveProvider = null; |
| | | private volatile ConnectionSecurityProvider saslPendingProvider = null; |
| | | private volatile ConnectionSecurityProvider tlsPendingProvider = null; |
| | | private volatile ConnectionSecurityProvider saslActiveProvider; |
| | | private volatile ConnectionSecurityProvider tlsActiveProvider; |
| | | private volatile ConnectionSecurityProvider saslPendingProvider; |
| | | private volatile ConnectionSecurityProvider tlsPendingProvider; |
| | | |
| | | |
| | | /** |
| | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // Indicates whether the Directory Server is in the process of shutting down. |
| | | private volatile boolean shutdownRequested = false; |
| | | private volatile boolean shutdownRequested; |
| | | |
| | | // The current set of selection keys. |
| | | private volatile SelectionKey[] keys = new SelectionKey[0]; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.replication.plugin; |
| | | |
| | |
| | | public class GenerationIdChecksum implements Checksum |
| | | { |
| | | // Checksum to be returned. |
| | | private long checksum = 0L; |
| | | private long checksum; |
| | | |
| | | /** |
| | | * This is the generation id for an empty backend. |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | * Portions Copyright 2013-2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.replication.plugin; |
| | | |
| | |
| | | * This flag indicates that this value was generated to store the last date |
| | | * when the entry was renamed. |
| | | */ |
| | | private boolean ismodDN = false; |
| | | private boolean ismodDN; |
| | | |
| | | /** |
| | | * Create a new object from the String encoded form. |
| | |
| | | private final AtomicInteger numReplayedPostOpCalled = new AtomicInteger(); |
| | | |
| | | private final PersistentServerState state; |
| | | private volatile boolean generationIdSavedStatus = false; |
| | | private volatile boolean generationIdSavedStatus; |
| | | |
| | | /** |
| | | * This object is used to store the list of update currently being |
| | |
| | | |
| | | private final InternalClientConnection conn = getRootConnection(); |
| | | private final AtomicBoolean shutdown = new AtomicBoolean(); |
| | | private volatile boolean disabled = false; |
| | | private volatile boolean stateSavingDisabled = false; |
| | | private volatile boolean disabled; |
| | | private volatile boolean stateSavingDisabled; |
| | | |
| | | /** |
| | | * This list is used to temporary store operations that needs to be replayed |
| | |
| | | * fractional configuration (i.e with compliant fractional configuration in |
| | | * domain root entry). |
| | | */ |
| | | private boolean forceBadDataSet = false; |
| | | private boolean forceBadDataSet; |
| | | |
| | | /** |
| | | * The message id to be used when an import is stopped with error by |
| | |
| | | * fractionalSpecificClassesAttributes or fractionalAllClassesAttributes or |
| | | * both should be filled with something. |
| | | */ |
| | | private boolean fractional = false; |
| | | private boolean fractional; |
| | | |
| | | /** |
| | | * - If true, tells that the configured fractional replication is exclusive: |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.replication.plugin; |
| | | |
| | |
| | | /** The ReplicationDomain that will be used to send UpdateMsg. */ |
| | | private final ReplicationDomain domain; |
| | | |
| | | private boolean recoveringOldChanges = false; |
| | | private boolean recoveringOldChanges; |
| | | |
| | | /** |
| | | * Creates a new PendingChanges using the provided CSNGenerator. |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.replication.plugin; |
| | | |
| | |
| | | |
| | | private final BlockingQueue<UpdateToReplay> updateToReplayQueue; |
| | | private AtomicBoolean shutdown = new AtomicBoolean(false); |
| | | private static int count = 0; |
| | | private static int count; |
| | | |
| | | /** |
| | | * Constructor for the ReplayThread. |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.replication.plugin; |
| | | |
| | |
| | | */ |
| | | public class UpdateToReplay |
| | | { |
| | | private LDAPUpdateMsg updateMessage = null; |
| | | private LDAPReplicationDomain replicationDomain = null; |
| | | private LDAPUpdateMsg updateMessage; |
| | | private LDAPReplicationDomain replicationDomain; |
| | | |
| | | /** |
| | | * Construct the object associating the update message with the replication |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2013-2014 ForgeRock AS. |
| | | * Portions Copyright 2013-2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.replication.protocol; |
| | | |
| | |
| | | * Did some servers go in timeout when the matching update (corresponding to |
| | | * CSN) was sent?. |
| | | */ |
| | | private boolean hasTimeout = false; |
| | | private boolean hasTimeout; |
| | | |
| | | /** |
| | | * Were some servers in wrong status when the matching update (corresponding |
| | | * to CSN) was sent?. |
| | | */ |
| | | private boolean hasWrongStatus = false; |
| | | private boolean hasWrongStatus; |
| | | |
| | | /** |
| | | * Did some servers make an error replaying the sent matching update |
| | | * (corresponding to CSN)?. |
| | | */ |
| | | private boolean hasReplayError = false; |
| | | private boolean hasReplayError; |
| | | |
| | | /** |
| | | * The list of server ids that had errors for the sent matching update |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.replication.protocol; |
| | | |
| | |
| | | private String initiatorsName; |
| | | |
| | | /** whether the DEL operation is a subtree DEL. */ |
| | | private boolean isSubtreeDelete = false; |
| | | private boolean isSubtreeDelete; |
| | | |
| | | /** |
| | | * Creates a new delete message. |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.replication.protocol; |
| | | |
| | |
| | | /** |
| | | * For test purposes only to simulate loss of heartbeats. |
| | | */ |
| | | private static volatile boolean heartbeatsDisabled = false; |
| | | private static volatile boolean heartbeatsDisabled; |
| | | |
| | | /** |
| | | * The session on which heartbeats are to be sent. |
| | |
| | | /** |
| | | * Set this to stop the thread. |
| | | */ |
| | | private volatile boolean shutdown = false; |
| | | private volatile boolean shutdown; |
| | | private final Object shutdownLock = new Object(); |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | * Portions Copyright 2013-2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.replication.protocol; |
| | | |
| | |
| | | public class InitializeRequestMsg extends RoutableMsg |
| | | { |
| | | private final DN baseDN; |
| | | private int initWindow = 0; |
| | | private int initWindow; |
| | | |
| | | /** |
| | | * Creates a InitializeRequestMsg message. |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.replication.protocol; |
| | | |
| | |
| | | { |
| | | // Suppress compile warning |
| | | static final long serialVersionUID = 1739875L; |
| | | private String msg = null; // Explicit message |
| | | private String msg; // Explicit message |
| | | private short protocolVersion = -1; // protocol version of the pdu |
| | | private byte pduType = -1; // type of the pdu |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.replication.protocol; |
| | | |
| | |
| | | /** |
| | | * The time the last message published to this session. |
| | | */ |
| | | private volatile long lastPublishTime = 0; |
| | | private volatile long lastPublishTime; |
| | | |
| | | /** |
| | | * The time the last message was received on this session. |
| | | */ |
| | | private volatile long lastReceiveTime = 0; |
| | | private volatile long lastReceiveTime; |
| | | |
| | | /** |
| | | * Close and error guarded by stateLock: use a different lock to publish since |
| | |
| | | * connections. |
| | | */ |
| | | private final Object stateLock = new Object(); |
| | | private volatile boolean closeInitiated = false; |
| | | private volatile boolean closeInitiated; |
| | | private Throwable sessionError; |
| | | |
| | | /** |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | * Portions Copyright 2013-2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.replication.protocol; |
| | | |
| | |
| | | protected CSN csn; |
| | | |
| | | /** True when the update must use assured replication. */ |
| | | protected boolean assuredFlag = false; |
| | | protected boolean assuredFlag; |
| | | |
| | | /** When assuredFlag is true, defines the requested assured mode. */ |
| | | protected AssuredMode assuredMode = AssuredMode.SAFE_DATA_MODE; |
| | |
| | | /** Referrals URLs this DS is exporting. */ |
| | | private List<String> refUrls = new ArrayList<String>(); |
| | | /** Assured replication enabled on DS or not. */ |
| | | private boolean assuredFlag = false; |
| | | private boolean assuredFlag; |
| | | /** DS assured mode (relevant if assured replication enabled). */ |
| | | private AssuredMode assuredMode = AssuredMode.SAFE_DATA_MODE; |
| | | /** DS safe data level (relevant if assured mode is safe data). */ |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS. |
| | | * Portions Copyright 2013-2015 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.server.replication.server; |
| | |
| | | * The server handler of the server that sent the assured update message and |
| | | * to who we want to return the final ack. |
| | | */ |
| | | private ServerHandler requesterServerHandler = null; |
| | | private ServerHandler requesterServerHandler; |
| | | |
| | | /** The requested assured mode of matching update message. */ |
| | | private AssuredMode assuredMode = null; |
| | | private AssuredMode assuredMode; |
| | | |
| | | /** The CSN of the assured update message we want acks for. */ |
| | | protected CSN csn = null; |
| | | protected CSN csn; |
| | | |
| | | /** |
| | | * Is the treatment of the acks for the update message completed or not ? |
| | |
| | | * acks is completed or an ack timeout has occurred and we are going to |
| | | * remove this object from the map where it is stored. |
| | | */ |
| | | private boolean completed = false; |
| | | private boolean completed; |
| | | |
| | | /** |
| | | * This gives the list of servers we are willing to wait acks from and the |
| | |
| | | * code can then call getTimeoutServers() method to now which servers did not |
| | | * respond in time. |
| | | */ |
| | | protected List<Integer> serversInTimeout = null; |
| | | protected List<Integer> serversInTimeout; |
| | | |
| | | /** |
| | | * Creates a new ExpectedAcksInfo. |
| | |
| | | /** |
| | | * Number of update sent to the server. |
| | | */ |
| | | private int outCount = 0; |
| | | private int outCount; |
| | | /** |
| | | * Number of updates received from the server. |
| | | */ |
| | | private int inCount = 0; |
| | | private int inCount; |
| | | /** |
| | | * Specifies the max queue size for this handler. |
| | | */ |
| | |
| | | /** |
| | | * Specifies whether the consumer is following the producer (is not late). |
| | | */ |
| | | private boolean following = false; |
| | | private boolean following; |
| | | /** |
| | | * Specifies the current serverState of this handler. |
| | | */ |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS. |
| | | * Portions Copyright 2012-2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.replication.server; |
| | | |
| | |
| | | private final Object lock = new Object(); |
| | | |
| | | /** The total number of bytes for all the message in the queue. */ |
| | | private int bytesCount = 0; |
| | | private int bytesCount; |
| | | |
| | | /** |
| | | * Return the first UpdateMsg in the MsgQueue. |
| | |
| | | private final Object pendingMonitorLock = new Object(); |
| | | |
| | | /** Guarded by pendingMonitorLock. */ |
| | | private long monitorDataLastBuildDate = 0; |
| | | private long monitorDataLastBuildDate; |
| | | |
| | | /** |
| | | * The set of replication servers which are already known to be slow to send |
| | |
| | | private ChangelogBackend changelogBackend; |
| | | |
| | | private final AtomicBoolean shutdown = new AtomicBoolean(); |
| | | private boolean stopListen = false; |
| | | private boolean stopListen; |
| | | private final ReplSessionSecurity replSessionSecurity; |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | |
| | | // Monitors for synchronizing domain creation with the connect thread. |
| | | private final Object domainTicketLock = new Object(); |
| | | private final Object connectThreadLock = new Object(); |
| | | private long domainTicket = 0L; |
| | | private long domainTicket; |
| | | |
| | | /** |
| | | * Holds the list of all replication servers instantiated in this VM. |
| | |
| | | * {@link #generationId} from being reset by |
| | | * {@link #resetGenerationIdIfPossible()}. |
| | | */ |
| | | private volatile boolean generationIdSavedStatus = false; |
| | | private volatile boolean generationIdSavedStatus; |
| | | |
| | | /** The tracer object for the debug logger. */ |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | |
| | | * Counter used to purge the timer tasks references in assuredTimeoutTimer, |
| | | * every n number of treated assured messages. |
| | | */ |
| | | private int assuredTimeoutTimerPurgeCounter = 0; |
| | | private int assuredTimeoutTimerPurgeCounter; |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2014 ForgeRock AS |
| | | * Portions Copyright 2013-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.replication.server; |
| | | |
| | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** Did some servers go in timeout when the matching update was sent ?. */ |
| | | private boolean hasTimeout = false; |
| | | private boolean hasTimeout; |
| | | |
| | | /** Were some servers in wrong status when the matching update was sent ?. */ |
| | | private boolean hasWrongStatus = false; |
| | | private boolean hasWrongStatus; |
| | | |
| | | /** Did some servers make an error replaying the sent matching update ?. */ |
| | | private boolean hasReplayError = false; |
| | | private boolean hasReplayError; |
| | | |
| | | /** |
| | | * The list of server ids that had errors for the sent matching update Each |
| | |
| | | * we can compute an ack message (based on info in this object), to be |
| | | * returned to the (requester) server that sent us an assured update message. |
| | | */ |
| | | private int numKnownAckStatus = 0; |
| | | private int numKnownAckStatus; |
| | | |
| | | /** |
| | | * Creates a new SafeReadExpectedAcksInfo. |
| | |
| | | /** |
| | | * Number of updates received from the server in assured safe read mode. |
| | | */ |
| | | private int assuredSrReceivedUpdates = 0; |
| | | private int assuredSrReceivedUpdates; |
| | | /** |
| | | * Number of updates received from the server in assured safe read mode that |
| | | * timed out. |
| | |
| | | /** |
| | | * Number of updates sent to the server in assured safe read mode. |
| | | */ |
| | | private int assuredSrSentUpdates = 0; |
| | | private int assuredSrSentUpdates; |
| | | /** |
| | | * Number of updates sent to the server in assured safe read mode that timed |
| | | * out. |
| | |
| | | /** |
| | | * Number of updates received from the server in assured safe data mode. |
| | | */ |
| | | private int assuredSdReceivedUpdates = 0; |
| | | private int assuredSdReceivedUpdates; |
| | | /** |
| | | * Number of updates received from the server in assured safe data mode that |
| | | * timed out. |
| | |
| | | /** |
| | | * Number of updates sent to the server in assured safe data mode. |
| | | */ |
| | | private int assuredSdSentUpdates = 0; |
| | | private int assuredSdSentUpdates; |
| | | |
| | | /** |
| | | * Number of updates sent to the server in assured safe data mode that timed out. |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.replication.server; |
| | | |
| | |
| | | |
| | | private final ReplicationServerDomain replicationServerDomain; |
| | | private final Object eventMonitor = new Object(); |
| | | private boolean pendingStatusMessage = false; |
| | | private boolean pendingStatusMessage; |
| | | private long nextCheckDSDegradedStatusTime; |
| | | |
| | | |
| | |
| | | private final ReplicationDraftCNKey key; |
| | | private final DatabaseEntry entry = new DatabaseEntry(); |
| | | private ChangeNumberIndexRecord record; |
| | | private boolean isClosed = false; |
| | | private boolean isClosed; |
| | | |
| | | |
| | | /** |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.replication.server.changelog.je; |
| | | |
| | |
| | | public class JEChangeNumberIndexDB implements ChangeNumberIndexDB |
| | | { |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | private static int NO_KEY = 0; |
| | | private static final int NO_KEY = 0; |
| | | |
| | | private DraftCNDB db; |
| | | /** |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.replication.server.changelog.je; |
| | | |
| | |
| | | * As underlying cursor is already pointing to a record at start, this |
| | | * indicator allow to shift the pointed record at initialization time. |
| | | */ |
| | | private boolean isInitialized = false; |
| | | private boolean isInitialized; |
| | | |
| | | /** |
| | | * Creates a new DB Cursor. All created iterator must be released by |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.replication.server.changelog.je; |
| | | |
| | |
| | | * When not null, the next change with a ts different from |
| | | * tsForNewCounterRecord will lead to store a new counterRecord. |
| | | */ |
| | | private long counterTsLimit = 0; |
| | | private long counterTsLimit; |
| | | |
| | | /** |
| | | * The counter record will never be written to the db more often than each |
| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.replication.service; |
| | | |
| | |
| | | /** |
| | | * Set this to stop the thread. |
| | | */ |
| | | private volatile boolean shutdown = false; |
| | | private volatile boolean shutdown; |
| | | private final Object shutdownLock = new Object(); |
| | | |
| | | /** |
| | |
| | | * |
| | | * |
| | | * Copyright 2007-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.replication.service; |
| | |
| | | /** |
| | | * Thread life-cycle state. |
| | | */ |
| | | private volatile boolean shutdown = false; |
| | | private volatile boolean shutdown; |
| | | private final Object shutdownLock = new Object(); |
| | | |
| | | |
| | |
| | | |
| | | } |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | private volatile boolean shutdown = false; |
| | | private volatile boolean shutdown; |
| | | private final Object startStopLock = new Object(); |
| | | private volatile ReplicationDomainCfg config; |
| | | /** |
| | |
| | | private int maxSendWindow; |
| | | private int rcvWindow = 100; |
| | | private int halfRcvWindow = rcvWindow / 2; |
| | | private int timeout = 0; |
| | | private int timeout; |
| | | private final ReplSessionSecurity replSessionSecurity; |
| | | /** |
| | | * The RS this DS is currently connected to. |
| | |
| | | /** |
| | | * The number of times the connection was lost. |
| | | */ |
| | | private int numLostConnections = 0; |
| | | private int numLostConnections; |
| | | /** |
| | | * When the broker cannot connect to any replication server |
| | | * it log an error and keeps continuing every second. |
| | |
| | | * and to know that it is necessary to print a new message when the broker |
| | | * finally succeed to connect. |
| | | */ |
| | | private volatile boolean connectionError = false; |
| | | private volatile boolean connectionError; |
| | | private final Object connectPhaseLock = new Object(); |
| | | /** |
| | | * The thread that publishes messages to the RS containing the current |
| | |
| | | private final AtomicReference<Topology> topology = |
| | | new AtomicReference<Topology>(new Topology()); |
| | | /** <pre>@GuardedBy("this")</pre>. */ |
| | | private volatile int updateDoneCount = 0; |
| | | private volatile boolean connectRequiresRecovery = false; |
| | | private volatile int updateDoneCount; |
| | | private volatile boolean connectRequiresRecovery; |
| | | |
| | | /** |
| | | * This integer defines when the best replication server checking algorithm |
| | |
| | | * least for a monitoring period after the last received topology message |
| | | * (topology stabilization). |
| | | */ |
| | | private int mustRunBestServerCheckingAlgorithm = 0; |
| | | private int mustRunBestServerCheckingAlgorithm; |
| | | |
| | | /** |
| | | * The monitor provider for this replication domain. |
| | |
| | | private final boolean sslEncryption; |
| | | private final int degradedStatusThreshold; |
| | | /** Keeps the 0 value if created with a ReplServerStartMsg. */ |
| | | private int connectedDSNumber = 0; |
| | | private int connectedDSNumber; |
| | | // @NotNull |
| | | private Set<Integer> connectedDSs; |
| | | /** |
| | |
| | | private int importSource = RoutableMsg.UNKNOWN_SERVER; |
| | | |
| | | /** The total entry count expected to be processed. */ |
| | | private long entryCount = 0; |
| | | private long entryCount; |
| | | /** The count for the entry not yet processed. */ |
| | | private long entryLeftCount = 0; |
| | | private long entryLeftCount; |
| | | |
| | | /** Exception raised during the initialization. */ |
| | | private DirectoryException exception; |
| | |
| | | private final boolean importInProgress; |
| | | |
| | | /** Current counter of messages exchanged during the initialization. */ |
| | | private int msgCnt = 0; |
| | | private int msgCnt; |
| | | |
| | | /** |
| | | * Number of connections lost when we start the initialization. Will help |
| | | * counting connections lost during initialization, |
| | | */ |
| | | private int initNumLostConnections = 0; |
| | | private int initNumLostConnections; |
| | | |
| | | /** |
| | | * Request message sent when this server has the initializeFromRemote task. |
| | |
| | | private MatchingRule defaultSubstringMatchingRule; |
| | | |
| | | /** If true strip the suggested minimum upper bound from the syntax OID. */ |
| | | private static boolean stripMinimumUpperBound=false; |
| | | private static boolean stripMinimumUpperBound; |
| | | |
| | | |
| | | /** |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2014 ForgeRock AS |
| | | * Portions Copyright 2013-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.tools; |
| | | import java.io.IOException; |
| | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The hostname to connect to. |
| | | private String hostName = null; |
| | | private String hostName; |
| | | |
| | | // The port number on which the directory server is accepting requests. |
| | | private int portNumber = 389; |
| | | |
| | | private LDAPConnectionOptions connectionOptions = null; |
| | | private LDAPConnectionOptions connectionOptions; |
| | | private LDAPWriter ldapWriter; |
| | | private LDAPReader ldapReader; |
| | | private int versionNumber = 3; |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.tools; |
| | | |
| | |
| | | public class LDAPConnectionOptions |
| | | { |
| | | |
| | | private boolean reportAuthzID = false; |
| | | private boolean useSSL = false; |
| | | private boolean startTLS = false; |
| | | private boolean saslExternal = false; |
| | | private boolean usePasswordPolicyControl = false; |
| | | private SSLConnectionFactory sslConnectionFactory = null; |
| | | private String saslMechanism = null; |
| | | private boolean reportAuthzID; |
| | | private boolean useSSL; |
| | | private boolean startTLS; |
| | | private boolean saslExternal; |
| | | private boolean usePasswordPolicyControl; |
| | | private SSLConnectionFactory sslConnectionFactory; |
| | | private String saslMechanism; |
| | | private int versionNumber = 3; |
| | | private Map<String, List<String>> saslProperties = |
| | | new HashMap<String, List<String>> (); |
| | | private boolean verbose = false; |
| | | private boolean verbose; |
| | | |
| | | /** |
| | | * Creates a the connection options instance. |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.tools; |
| | | |
| | |
| | | public class LDAPDeleteOptions extends LDAPToolOptions |
| | | { |
| | | |
| | | private boolean deleteSubtree = false; |
| | | private boolean deleteSubtree; |
| | | |
| | | /** |
| | | * Creates the options instance. |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.tools; |
| | | |
| | |
| | | public class LDAPModifyOptions extends LDAPToolOptions |
| | | { |
| | | |
| | | private boolean defaultAdd = false; |
| | | private boolean defaultAdd; |
| | | |
| | | /** |
| | | * Creates the options instance. |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.tools; |
| | | |
| | |
| | | |
| | | private DereferenceAliasesPolicy dereferencePolicy = NEVER; |
| | | private SearchScope searchScope = WHOLE_SUBTREE; |
| | | private int sizeLimit = 0; |
| | | private int timeLimit = 0; |
| | | private boolean typesOnly = false; |
| | | private boolean countMatchingEntries = false; |
| | | private int sizeLimit; |
| | | private int timeLimit; |
| | | private boolean typesOnly; |
| | | private boolean countMatchingEntries; |
| | | |
| | | /** |
| | | * Creates the options instance. |
| | | * |
| | | */ |
| | | public LDAPSearchOptions() |
| | | { |
| | |
| | | * Set the timeLimit for the operation. |
| | | * |
| | | * @param timeLimit The time limit for the search. |
| | | * |
| | | */ |
| | | |
| | | public void setTimeLimit(int timeLimit) |
| | | { |
| | | this.timeLimit = timeLimit; |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.tools; |
| | | |
| | |
| | | public class LDAPToolOptions |
| | | { |
| | | |
| | | private boolean showOperations = false; |
| | | private boolean verbose = false; |
| | | private boolean continueOnError = false; |
| | | private boolean showOperations; |
| | | private boolean verbose; |
| | | private boolean continueOnError; |
| | | private String encoding = System.getProperty("file.encoding"); |
| | | private ArrayList<Control> controls = new ArrayList<Control>(); |
| | | |
| | |
| | | /** |
| | | * ID of task for which to display details and exit. |
| | | */ |
| | | private StringArgument task = null; |
| | | private StringArgument task; |
| | | |
| | | /** |
| | | * Indicates print summary and exit. |
| | | */ |
| | | private BooleanArgument summary = null; |
| | | private BooleanArgument summary; |
| | | |
| | | /** |
| | | * ID of task to cancel. |
| | | */ |
| | | private StringArgument cancel = null; |
| | | private StringArgument cancel; |
| | | |
| | | /** |
| | | * Argument used to request non-interactive behavior. |
| | | */ |
| | | private BooleanArgument noPrompt = null; |
| | | private BooleanArgument noPrompt; |
| | | |
| | | /** |
| | | * Accesses the directory's task backend. |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2014 ForgeRock AS |
| | | * Portions Copyright 2013-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.tools; |
| | | |
| | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | private SSLSocketFactory sslSocketFactory = null; |
| | | private SSLSocketFactory sslSocketFactory; |
| | | |
| | | /** |
| | | * Constructor for the SSL connection factory. |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | * Portions Copyright 2013-2015 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.server.tools; |
| | |
| | | /** |
| | | * The service was successfully started. |
| | | */ |
| | | private static int SERVICE_START_SUCCESSFUL = 0; |
| | | private static int SERVICE_START_SUCCESSFUL; |
| | | /** |
| | | * The service could not be found. |
| | | */ |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS. |
| | | * Portions Copyright 2012-2015 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.server.tools.upgrade; |
| | |
| | | private static abstract class FileOperation |
| | | { |
| | | |
| | | private File objectFile = null; |
| | | private File objectFile; |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2013 ForgeRock AS. |
| | | * Portions Copyright 2013-2015 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.server.tools.upgrade; |
| | |
| | | /** |
| | | * The File object related to the license file. |
| | | */ |
| | | static private File licFile = null; |
| | | static private File licFile; |
| | | |
| | | /** |
| | | * The license file approval state. |
| | | */ |
| | | static private boolean approved = false; |
| | | static private boolean approved; |
| | | |
| | | /** |
| | | * Returns the license file name. |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2013-2014 ForgeRock AS |
| | | * Portions Copyright 2013-2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.tools.upgrade; |
| | |
| | | */ |
| | | class UpgradeLog |
| | | { |
| | | static private File logFile = null; |
| | | static private FileHandler fileHandler = null; |
| | | static private File logFile; |
| | | static private FileHandler fileHandler; |
| | | final static String UPGRADELOGNAME = "upgrade.log"; |
| | | |
| | | /** |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2014 ForgeRock AS |
| | | * Portions Copyright 2012-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | |
| | | { |
| | | |
| | | // The set of elements if there are more than one. |
| | | private LinkedHashSet<T> elements = null; |
| | | private LinkedHashSet<T> elements; |
| | | |
| | | // The first element. |
| | | private T firstElement = null; |
| | | private T firstElement; |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | // The attribute type for this attribute. |
| | | private AttributeType attributeType = null; |
| | | private AttributeType attributeType; |
| | | |
| | | // The name of this attribute as provided by the end user. |
| | | private String name = null; |
| | | private String name; |
| | | |
| | | // The normalized set of options if there are more than one. |
| | | private SortedSet<String> normalizedOptions = null; |
| | | private SortedSet<String> normalizedOptions; |
| | | |
| | | // The set of options. |
| | | private final SmallSet<String> options = new SmallSet<String>(); |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | |
| | | private final MatchingRule substringMatchingRule; |
| | | |
| | | // True once this attribute type has been removed from the schema. |
| | | private volatile boolean isDirty = false; |
| | | private volatile boolean isDirty; |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2014 ForgeRock AS |
| | | * Portions Copyright 2013-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | |
| | | |
| | | // Time-stamp acts as memory barrier for networkInterfaces. |
| | | private static final long CACHED_LOCAL_ADDRESSES_TIMEOUT_MS = 30 * 1000; |
| | | private static volatile long localAddressesTimeStamp = 0; |
| | | private static volatile long localAddressesTimeStamp; |
| | | private static Set<InetAddress> localAddresses = new HashSet<InetAddress>(); |
| | | |
| | | /** |
| | |
| | | private final String definition; |
| | | |
| | | // True once this object class has been removed from the schema. |
| | | private volatile boolean isDirty = false; |
| | | private volatile boolean isDirty; |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | |
| | | private SubtreeSpecification subTreeSpec; |
| | | |
| | | // Collective subentry flag. |
| | | private boolean isCollective = false; |
| | | private boolean isCollective; |
| | | |
| | | // Inherited collective subentry flag. |
| | | private boolean isInheritedCollective = false; |
| | | private boolean isInheritedCollective; |
| | | |
| | | // Inherited collective from DN subentry flag. |
| | | private boolean isInheritedFromDNCollective = false; |
| | | private boolean isInheritedFromDNCollective; |
| | | |
| | | // Inherited collective from RDN subentry flag. |
| | | private boolean isInheritedFromRDNCollective = false; |
| | | private boolean isInheritedFromRDNCollective; |
| | | |
| | | // Inherited collective DN attribute type. |
| | | private AttributeType inheritFromDNType; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Copyright 2013-2014 ForgeRock AS |
| | | * Copyright 2013-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.util; |
| | | |
| | |
| | | |
| | | |
| | | |
| | | private static boolean is64Bit=false; |
| | | private static boolean is64Bit; |
| | | |
| | | static { |
| | | String arch = System.getProperty("sun.arch.data.model"); |
| | |
| | | private ApplicationTrustManager trustManager; |
| | | |
| | | /** Boolean that tells if we ask for bind DN or admin UID in the same prompt. */ |
| | | private boolean useAdminOrBindDn = false; |
| | | private boolean useAdminOrBindDn; |
| | | |
| | | /** |
| | | * Boolean that tells if we must propose LDAP if it is available even if the |
| | | * user provided certificate parameters. |
| | | */ |
| | | private boolean displayLdapIfSecureParameters = false; |
| | | private boolean displayLdapIfSecureParameters; |
| | | |
| | | /** The SecureConnectionCliArgsList object. */ |
| | | private SecureConnectionCliArgs secureArgsList; |
| | | |
| | | /** Indicate if we need to display the heading. */ |
| | | private boolean isHeadingDisplayed = false; |
| | | private boolean isHeadingDisplayed; |
| | | |
| | | /** the Console application. */ |
| | | private ConsoleApplication app; |
| | | |
| | | /** Indicate if the trust store in in memory. */ |
| | | private boolean trustStoreInMemory = false; |
| | | private boolean trustStoreInMemory; |
| | | |
| | | /** Indicate if the all certificates are accepted. */ |
| | | private boolean trustAll = false; |
| | | private boolean trustAll; |
| | | |
| | | /** Indicate that the trust manager was created with the parameters provided. */ |
| | | private boolean trustManagerInitialized; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.forgerock.opendj.config.server; |
| | | |
| | |
| | | private static final String DUMMY_TEST_RELATION = "*dummy*test*relation*"; |
| | | |
| | | // Indicates if the dummy relation profile has been registered. |
| | | private static boolean isProfileRegistered = false; |
| | | private static boolean isProfileRegistered; |
| | | |
| | | // Prevent instantiation. |
| | | private AdminTestCaseUtils() { |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.util; |
| | |
| | | @Test(groups = {"slow"}, sequential=true) |
| | | public class FileManagerTest extends QuickSetupTestCase { |
| | | |
| | | File fmWorkspace = null; |
| | | FileManager fileManager = null; |
| | | File fmWorkspace; |
| | | FileManager fileManager; |
| | | |
| | | @BeforeClass |
| | | public void setUp() throws Exception { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions copyright 2013 ForgeRock AS. |
| | | * Portions Copyright 2013-2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server; |
| | | |
| | |
| | | private static final SimpleDateFormat TEST_PROGESS_TIME_FORMAT = new SimpleDateFormat( |
| | | "dd/MMM/yyyy:HH:mm:ss Z"); |
| | | |
| | | private boolean doProgressNone = false; |
| | | private boolean doProgressNone; |
| | | private boolean doProgressTime = true; |
| | | private boolean doProgressTestCount = true; |
| | | private boolean doProgressMemory = false; |
| | | private boolean doProgressMemoryGcs = false; |
| | | private boolean doProgressMemory; |
| | | private boolean doProgressMemoryGcs; |
| | | private boolean doProgressRestarts = true; |
| | | private boolean doProgressThreadCount = false; |
| | | private boolean doProgressThreadChange = false; |
| | | private boolean doProgressThreadCount; |
| | | private boolean doProgressThreadChange; |
| | | |
| | | private void initializeProgressVars() { |
| | | String prop = System.getProperty(PROPERTY_TEST_PROGRESS); |
| | |
| | | } |
| | | |
| | | private final LinkedHashSet<Class<?>> _classesWithTestsRunInterleaved = new LinkedHashSet<Class<?>>(); |
| | | private Object _lastTestObject = null; |
| | | private Object _lastTestObject; |
| | | private final IdentityHashMap<Object,Object> _previousTestObjects = new IdentityHashMap<Object,Object>(); |
| | | private void checkForInterleavedBetweenClasses(ITestResult tr) { |
| | | Object[] testInstances = tr.getMethod().getInstances(); |
| | |
| | | } |
| | | |
| | | |
| | | private boolean statusHeaderPrinted = false; |
| | | private boolean statusHeaderPrinted; |
| | | private synchronized void printStatusHeaderOnce() { |
| | | if (statusHeaderPrinted) { |
| | | return; |
| | |
| | | } |
| | | |
| | | private final long testSuiteStartTime = System.currentTimeMillis(); |
| | | private long prevMemInUse = 0; |
| | | private long maxMemInUse = 0; |
| | | private long prevMemInUse; |
| | | private long maxMemInUse; |
| | | private boolean isFirstTest = true; |
| | | |
| | | private void outputTestProgress(Object finishedTestObject) |
| | |
| | | private static class TestClassResults { |
| | | private final IClass _cls; |
| | | private final LinkedHashMap<ITestNGMethod, TestMethodResults> _methods = new LinkedHashMap<ITestNGMethod, TestMethodResults>(); |
| | | private int _totalInvocations = 0; |
| | | private long _totalDurationMs = 0; |
| | | private int _totalInvocations; |
| | | private long _totalDurationMs; |
| | | |
| | | /** Indexed by SUCCESS, FAILURE, SKIP, SUCCESS_PERCENTAGE_FAILURE. */ |
| | | private int[] _resultCounts = new int[STATUSES.length]; |
| | |
| | | |
| | | private static class TestMethodResults { |
| | | private final ITestNGMethod _method; |
| | | int _totalInvocations = 0; |
| | | long _totalDurationMs = 0; |
| | | int _totalInvocations; |
| | | long _totalDurationMs; |
| | | |
| | | /** Indexed by SUCCESS, FAILURE, SKIP, SUCCESS_PERCENTAGE_FAILURE. */ |
| | | private int[] _resultCounts = new int[STATUSES.length]; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.admin; |
| | |
| | | */ |
| | | public class BooleanPropertyDefinitionTest extends DirectoryServerTestCase { |
| | | |
| | | BooleanPropertyDefinition.Builder builder = null; |
| | | BooleanPropertyDefinition.Builder builder; |
| | | |
| | | /** |
| | | * Sets up tests. |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | * Portions Copyright 2012-2015 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.server.admin; |
| | |
| | | } |
| | | } |
| | | |
| | | ClassPropertyDefinition.Builder builder = null; |
| | | ClassPropertyDefinition.Builder builder; |
| | | |
| | | /** |
| | | * Sets up tests |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.admin; |
| | |
| | | |
| | | private enum TestEnum { ONE, TWO, THREE } |
| | | |
| | | private EnumPropertyDefinition.Builder<TestEnum> builder = null; |
| | | private EnumPropertyDefinition.Builder<TestEnum> builder; |
| | | |
| | | @BeforeClass |
| | | public void setUp() { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.admin; |
| | |
| | | * ManagedObjectDefinitionI18NResource Tester. |
| | | */ |
| | | public class ManagedObjectDefinitionI18NResourceTest extends DirectoryServerTestCase { |
| | | ManagedObjectDefinitionI18NResource modr = null; |
| | | ManagedObjectDefinitionI18NResource modr; |
| | | |
| | | /** |
| | | * Creates the resource |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.admin; |
| | |
| | | |
| | | private static final TestParentCfgDefn d; |
| | | |
| | | private RelativeInheritedDefaultBehaviorProvider<Boolean> ridbp = null; |
| | | private RelativeInheritedDefaultBehaviorProvider<Boolean> ridbp; |
| | | |
| | | static |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin; |
| | | |
| | |
| | | } |
| | | |
| | | // Test parent object class definition. |
| | | private static ObjectClass TEST_PARENT_OCD = null; |
| | | private static ObjectClass TEST_PARENT_OCD; |
| | | |
| | | // Test child object class definition. |
| | | private static ObjectClass TEST_CHILD_OCD = null; |
| | | private static ObjectClass TEST_CHILD_OCD; |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin.client.ldap; |
| | | |
| | |
| | | public final class CreateEntryMockLDAPConnection extends MockLDAPConnection { |
| | | |
| | | // Detect multiple calls. |
| | | private boolean alreadyAdded = false; |
| | | private boolean alreadyAdded; |
| | | |
| | | // The expected set of attributes (attribute name -> list of |
| | | // values). |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin.client.ldap; |
| | | |
| | |
| | | public final class DeleteSubtreeMockLDAPConnection extends MockLDAPConnection { |
| | | |
| | | // Detect multiple calls. |
| | | private boolean alreadyDeleted = false; |
| | | private boolean alreadyDeleted; |
| | | |
| | | // The expected DN. |
| | | private final LdapName expectedDN; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin.client.ldap; |
| | | |
| | |
| | | public final class ModifyEntryMockLDAPConnection extends MockLDAPConnection { |
| | | |
| | | // Detect multiple calls. |
| | | private boolean alreadyModified = false; |
| | | private boolean alreadyModified; |
| | | |
| | | // The expected DN. |
| | | private final LdapName expectedDN; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.admin.client.spi; |
| | |
| | | private static final String STR_DEFAULT = "str def"; |
| | | |
| | | /** Test boolean property def */ |
| | | private BooleanPropertyDefinition testBoolPropertyDefinition = null; |
| | | private BooleanPropertyDefinition testBoolPropertyDefinition; |
| | | |
| | | /** Test single valued string property def */ |
| | | private StringPropertyDefinition testSvStringPropertyDefinition = null; |
| | | private StringPropertyDefinition testSvStringPropertyDefinition; |
| | | |
| | | /** Test multi-valued string property def */ |
| | | private StringPropertyDefinition testMvStringPropertyDefinition = null; |
| | | private StringPropertyDefinition testMvStringPropertyDefinition; |
| | | |
| | | private PropertyProvider emptyPropertyProvider = new PropertyProvider() { |
| | | public <T> Collection<T> getPropertyValues(PropertyDefinition<T> d) throws IllegalArgumentException { |
| | |
| | | |
| | | private class TestPropertyProvider<T> implements PropertyProvider { |
| | | |
| | | PropertyDefinition<T> pd = null; |
| | | Collection<T> values = null; |
| | | PropertyDefinition<T> pd; |
| | | Collection<T> values; |
| | | |
| | | public TestPropertyProvider(PropertyDefinition<T> pd, Collection<T> values) { |
| | | this.pd = pd; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.admin.server; |
| | | |
| | |
| | | private static final String DUMMY_TEST_RELATION = "*dummy*test*relation*"; |
| | | |
| | | // Indicates if the dummy relation profile has been registered. |
| | | private static boolean isProfileRegistered = false; |
| | | private static boolean isProfileRegistered; |
| | | |
| | | |
| | | |
| | |
| | | }; |
| | | |
| | | /** JNDI LDAP context. */ |
| | | private JNDIDirContextAdaptor adaptor = null; |
| | | private JNDIDirContextAdaptor adaptor; |
| | | |
| | | /** |
| | | * The saved test child configuration "aggregation-property" property |
| | | * definition. |
| | | */ |
| | | private AggregationPropertyDefinition<ConnectionHandlerCfgClient, ConnectionHandlerCfg> aggregationPropertyDefinitionDefault = null; |
| | | private AggregationPropertyDefinition<ConnectionHandlerCfgClient, ConnectionHandlerCfg> aggregationPropertyDefinitionDefault; |
| | | |
| | | /** |
| | | * An aggregation where the target must be enabled if the source is enabled. |
| | | */ |
| | | private AggregationPropertyDefinition<ConnectionHandlerCfgClient, ConnectionHandlerCfg> aggregationPropertyDefinitionTargetAndSourceMustBeEnabled = null; |
| | | private AggregationPropertyDefinition<ConnectionHandlerCfgClient, ConnectionHandlerCfg> aggregationPropertyDefinitionTargetAndSourceMustBeEnabled; |
| | | |
| | | /** An aggregation where the target must be enabled. */ |
| | | private AggregationPropertyDefinition<ConnectionHandlerCfgClient, ConnectionHandlerCfg> aggregationPropertyDefinitionTargetMustBeEnabled = null; |
| | | private AggregationPropertyDefinition<ConnectionHandlerCfgClient, ConnectionHandlerCfg> aggregationPropertyDefinitionTargetMustBeEnabled; |
| | | |
| | | |
| | | |
| | |
| | | }; |
| | | |
| | | // JNDI LDAP context. |
| | | private JNDIDirContextAdaptor adaptor = null; |
| | | private JNDIDirContextAdaptor adaptor; |
| | | |
| | | |
| | | |
| | |
| | | private final class MockPolicy extends AuthenticationPolicy |
| | | { |
| | | private final boolean isDisabled; |
| | | |
| | | private boolean isPolicyFinalized = false; |
| | | |
| | | private boolean isStateFinalized = false; |
| | | |
| | | private final boolean matches; |
| | | |
| | | private ByteString matchedPassword = null; |
| | | |
| | | private boolean isPolicyFinalized; |
| | | private boolean isStateFinalized; |
| | | private ByteString matchedPassword; |
| | | |
| | | |
| | | /** |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2014 ForgeRock AS |
| | | * Portions Copyright 2013-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.authorization.dseecompat; |
| | | |
| | |
| | | @Test(groups = {"precommit", "dseecompat"}, sequential = true) |
| | | public abstract class AciTestCase extends DirectoryServerTestCase { |
| | | |
| | | private Attribute globalACIAttribute = null; |
| | | private Attribute globalACIAttribute; |
| | | |
| | | @BeforeClass |
| | | public void aciTestCaseSetup() throws Exception |
| | |
| | | extends CommonEntryCacheTestCase<EntryCacheCfg> |
| | | { |
| | | // Entry cache implementations participating in this test. |
| | | private SoftReferenceEntryCache softRefCache = null; |
| | | private FIFOEntryCache fifoCache = null; |
| | | private SoftReferenceEntryCache softRefCache; |
| | | private FIFOEntryCache fifoCache; |
| | | |
| | | // ... and their configuration entries. |
| | | Entry cacheSoftReferenceConfigEntry = null; |
| | | Entry cacheFIFOConfigEntry = null; |
| | | Entry cacheSoftReferenceConfigEntry; |
| | | Entry cacheFIFOConfigEntry; |
| | | |
| | | // The entry cache order map sorted by the cache level. |
| | | private SortedMap<Integer, EntryCache<? extends EntryCacheCfg>> |
| | |
| | | EntryCache<? extends EntryCacheCfg>>(); |
| | | |
| | | // Dummy test entries for each participating implementation. |
| | | private ArrayList<Entry> testSoftRefEntriesList = null; |
| | | private ArrayList<Entry> testFIFOEntriesList = null; |
| | | private ArrayList<Entry> testSoftRefEntriesList; |
| | | private ArrayList<Entry> testFIFOEntriesList; |
| | | |
| | | /** |
| | | * Initialize the entry cache test. |
| | |
| | | private MappingPolicy mappingPolicy = MappingPolicy.UNMAPPED; |
| | | private final SortedSet<String> primaryServers = new TreeSet<String>(); |
| | | private final SortedSet<String> secondaryServers = new TreeSet<String>(); |
| | | private int timeoutMS = 0; // unlimited |
| | | private int timeoutMS; // unlimited |
| | | private DN mappedSearchBindDN = searchBindDN; |
| | | private String mappedSearchBindPassword = "searchPassword"; |
| | | private String mappedSearchBindPasswordEnvVar = null; |
| | | private String mappedSearchBindPasswordFile = null; |
| | | private String mappedSearchBindPasswordProperty = null; |
| | | private boolean usePasswordCaching = false; |
| | | private String mappedSearchBindPasswordEnvVar; |
| | | private String mappedSearchBindPasswordFile; |
| | | private String mappedSearchBindPasswordProperty; |
| | | private boolean usePasswordCaching; |
| | | |
| | | |
| | | |
| | |
| | | |
| | | private final ServerSocket serverSocket; |
| | | private final List<Action> actions = new LinkedList<Action>(); |
| | | private Socket socket = null; |
| | | private volatile Exception e = null; |
| | | private Thread serverThread = null; |
| | | private Socket socket; |
| | | private volatile Exception e; |
| | | private Thread serverThread; |
| | | private final CountDownLatch stopLatch = new CountDownLatch(1); |
| | | private final Queue<BlockAction> blockers = new LinkedList<BlockAction>(); |
| | | |
| | |
| | | /** |
| | | * The singleton instance of this test password validator. |
| | | */ |
| | | private static TestPasswordValidator instance = null; |
| | | private static TestPasswordValidator instance; |
| | | |
| | | |
| | | |
| | |
| | | private static AtomicInteger postDisconnectCounter = new AtomicInteger(0); |
| | | private static AtomicInteger ldifImportCounter = new AtomicInteger(0); |
| | | private static AtomicInteger ldifExportCounter = new AtomicInteger(0); |
| | | private static boolean startupCalled = false; |
| | | private static boolean shutdownCalled = false; |
| | | private static boolean startupCalled; |
| | | private static boolean shutdownCalled; |
| | | |
| | | |
| | | |
| | |
| | | /** |
| | | * The singleton instance of this test password validator. |
| | | */ |
| | | private static UpdatePreOpPlugin instance = null; |
| | | private static UpdatePreOpPlugin instance; |
| | | |
| | | |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | * Portions Copyright 2013-2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.replication; |
| | | |
| | |
| | | private class BrokerReader extends Thread |
| | | { |
| | | private ReplicationBroker broker; |
| | | private int count = 0; |
| | | private int count; |
| | | private Boolean finished = false; |
| | | |
| | | /** |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.replication.plugin; |
| | | |
| | |
| | | private final String SAFE_DATA_DN = "ou=safe-data," + TEST_ROOT_DN_STRING; |
| | | private final String SAFE_READ_DN = "ou=safe-read," + TEST_ROOT_DN_STRING; |
| | | private final String NOT_ASSURED_DN = "ou=not-assured," + TEST_ROOT_DN_STRING; |
| | | private Entry safeDataDomainCfgEntry = null; |
| | | private Entry safeReadDomainCfgEntry = null; |
| | | private Entry notAssuredDomainCfgEntry = null; |
| | | private Entry safeDataDomainCfgEntry; |
| | | private Entry safeReadDomainCfgEntry; |
| | | private Entry notAssuredDomainCfgEntry; |
| | | |
| | | /** The fake replication server */ |
| | | private FakeReplicationServer replicationServer = null; |
| | | private FakeReplicationServer replicationServer; |
| | | |
| | | // Definitions for the scenario the RS supports |
| | | private static final int NOT_ASSURED_SCENARIO = 1; |
| | |
| | | { |
| | | |
| | | private ServerSocket listenSocket; |
| | | private boolean shutdown = false; |
| | | private Session session = null; |
| | | private boolean shutdown; |
| | | private Session session; |
| | | |
| | | // Parameters given at constructor time |
| | | private final int port; |
| | | private int serverId = -1; |
| | | private boolean isAssured = false; |
| | | private boolean isAssured; |
| | | private AssuredMode assuredMode = AssuredMode.SAFE_DATA_MODE; |
| | | private byte safeDataLevel = 1; |
| | | |
| | |
| | | private ServerState serverState; |
| | | private int windowSize = -1; |
| | | private byte groupId = -1; |
| | | private boolean sslEncryption = false; |
| | | private boolean sslEncryption; |
| | | /** The scenario this RS is expecting */ |
| | | private int scenario = -1; |
| | | |
| | | /** parameters at handshake are ok */ |
| | | private boolean handshakeOk = false; |
| | | private boolean handshakeOk; |
| | | /** |
| | | * signal that the current scenario the RS must execute reached the point |
| | | * where the main code can perform test assertion. |
| | | */ |
| | | private boolean scenarioExecuted = false; |
| | | private boolean scenarioExecuted; |
| | | |
| | | private CSNGenerator gen; |
| | | private String testcase; |
| | |
| | | * |
| | | * |
| | | * Copyright 2007-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.replication.plugin; |
| | | |
| | |
| | | * By default changeTimeHeartbeatInterval is set to 0 in order to disable this |
| | | * feature and not kill the tests that expect to receive special messages. |
| | | */ |
| | | private long changeTimeHeartbeatInterval = 0; |
| | | private long changeTimeHeartbeatInterval; |
| | | |
| | | private IsolationPolicy policy = IsolationPolicy.REJECT_ALL_UPDATES; |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.replication.plugin; |
| | | |
| | |
| | | private int rs1Port = -1; |
| | | private int rs2Port = -1; |
| | | private int rs3Port = -1; |
| | | private LDAPReplicationDomain rd1 = null; |
| | | private LDAPReplicationDomain rd2 = null; |
| | | private ReplicationServer rs1 = null; |
| | | private ReplicationServer rs2 = null; |
| | | private ReplicationServer rs3 = null; |
| | | private LDAPReplicationDomain rd1; |
| | | private LDAPReplicationDomain rd2; |
| | | private ReplicationServer rs1; |
| | | private ReplicationServer rs2; |
| | | private ReplicationServer rs3; |
| | | |
| | | // The tracer object for the debug logger |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.replication.plugin; |
| | | |
| | |
| | | private static final int RS2_ID = 32; |
| | | private int rs1Port = -1; |
| | | private int rs2Port = -1; |
| | | private LDAPReplicationDomain rd1 = null; |
| | | private LDAPReplicationDomain rd2 = null; |
| | | private ReplicationServer rs1 = null; |
| | | private ReplicationServer rs2 = null; |
| | | private LDAPReplicationDomain rd1; |
| | | private LDAPReplicationDomain rd2; |
| | | private ReplicationServer rs1; |
| | | private ReplicationServer rs2; |
| | | |
| | | /** The tracer object for the debug logger */ |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.replication.plugin; |
| | | |
| | |
| | | private int rs1Port = -1; |
| | | private int rs2Port = -1; |
| | | private int rs3Port = -1; |
| | | private LDAPReplicationDomain rd1 = null; |
| | | private LDAPReplicationDomain rd2 = null; |
| | | private LDAPReplicationDomain rd3 = null; |
| | | private LDAPReplicationDomain rd4 = null; |
| | | private LDAPReplicationDomain rd5 = null; |
| | | private LDAPReplicationDomain rd6 = null; |
| | | private ReplicationServer rs1 = null; |
| | | private ReplicationServer rs2 = null; |
| | | private ReplicationServer rs3 = null; |
| | | private LDAPReplicationDomain rd1; |
| | | private LDAPReplicationDomain rd2; |
| | | private LDAPReplicationDomain rd3; |
| | | private LDAPReplicationDomain rd4; |
| | | private LDAPReplicationDomain rd5; |
| | | private LDAPReplicationDomain rd6; |
| | | private ReplicationServer rs1; |
| | | private ReplicationServer rs2; |
| | | private ReplicationServer rs3; |
| | | |
| | | /** The tracer object for the debug logger */ |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.replication.server; |
| | | |
| | |
| | | * <code>fakeRd1 == fakeRDs[1]</code>, etc. |
| | | */ |
| | | private FakeReplicationDomain[] fakeRDs; |
| | | private FakeReplicationServer fakeRs1 = null; |
| | | private FakeReplicationServer fakeRs2 = null; |
| | | private FakeReplicationServer fakeRs3 = null; |
| | | private ReplicationServer rs1 = null; |
| | | private ReplicationServer rs2 = null; |
| | | private ReplicationServer rs3 = null; |
| | | private ReplicationServer rs4 = null; |
| | | private FakeReplicationServer fakeRs1; |
| | | private FakeReplicationServer fakeRs2; |
| | | private FakeReplicationServer fakeRs3; |
| | | private ReplicationServer rs1; |
| | | private ReplicationServer rs2; |
| | | private ReplicationServer rs3; |
| | | private ReplicationServer rs4; |
| | | |
| | | /** |
| | | * Small assured timeout value (timeout to be used in first RS receiving an |
| | |
| | | private final CSNGenerator gen; |
| | | |
| | | /** Number of received updates */ |
| | | private int nReceivedUpdates = 0; |
| | | private int nWrongReceivedUpdates = 0; |
| | | private int nReceivedUpdates; |
| | | private int nWrongReceivedUpdates; |
| | | |
| | | /** |
| | | * Creates a fake replication domain (DS) |
| | |
| | | * According to the configured scenario, it will answer to updates with acks |
| | | * as the scenario is requesting. |
| | | */ |
| | | private static int fakePort = 0; |
| | | private static int fakePort; |
| | | |
| | | private class FakeReplicationServer extends Thread |
| | | { |
| | | |
| | | private boolean shutdown = false; |
| | | private boolean shutdown; |
| | | private Session session; |
| | | |
| | | /** Parameters given at constructor time */ |
| | | private int port; |
| | | private int serverId = -1; |
| | | private boolean isAssured = false; // Default value for config |
| | | private boolean isAssured; // Default value for config |
| | | private AssuredMode assuredMode = AssuredMode.SAFE_DATA_MODE; // Default value for config |
| | | private byte safeDataLevel = 1; // Default value for config |
| | | private DN baseDN; |
| | | private long generationId = -1L; |
| | | private byte groupId = -1; |
| | | private boolean sslEncryption = false; |
| | | private boolean sslEncryption; |
| | | /** The scenario this RS is expecting */ |
| | | private int scenario = -1; |
| | | |
| | |
| | | /** False if a received update had assured parameters not as expected */ |
| | | private boolean everyUpdatesAreOk = true; |
| | | /** Number of received updates */ |
| | | private int nReceivedUpdates = 0; |
| | | private int nReceivedUpdates; |
| | | |
| | | /** |
| | | * True if an ack has been replied to a received assured update (in assured |
| | | * mode of course) used in reply scenario |
| | | */ |
| | | private boolean ackReplied = false; |
| | | private boolean ackReplied; |
| | | |
| | | /** |
| | | * Creates a fake replication server |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.replication.server; |
| | | |
| | |
| | | private class BrokerReader extends Thread |
| | | { |
| | | private ReplicationBroker broker; |
| | | private int numMsgRcv = 0; |
| | | private int numMsgRcv; |
| | | private final int numMsgExpected; |
| | | private Exception exc; |
| | | private String errDetails; |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Copyright 2014 ForgeRock AS. |
| | | * Copyright 2014-2015 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.replication.server.changelog.file; |
| | | |
| | |
| | | /** A parser that can be set to fail when reading. */ |
| | | static class FailingStringRecordParser extends StringRecordParser |
| | | { |
| | | private boolean failToRead = false; |
| | | private boolean failToRead; |
| | | |
| | | @Override |
| | | public Record<String, String> decodeRecord(ByteString data) throws DecodingException |
| | |
| | | public class MakeLDIFTestCase |
| | | extends ToolsTestCase |
| | | { |
| | | private String resourcePath = null; |
| | | private String resourcePath; |
| | | |
| | | @BeforeClass |
| | | public void setUp() throws Exception |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | * Portions Copyright 2014-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.util; |
| | | |
| | |
| | | private AttributeType AT_TELN; |
| | | |
| | | // Temporary file containing an attribute value. |
| | | private File TEMP_FILE = null; |
| | | private File TEMP_FILE; |
| | | |
| | | // Temporary file content. |
| | | private static final String TEMP_FILE_STRING = "hello world"; |