Fix OPENDJ-525: Remove compiler warnings when building using JDK7
| | |
| | | <!-- Prevent ant runtime from being included on classpath during |
| | | compilation. --> |
| | | <presetdef name="javac"> |
| | | <javac includeantruntime="false" /> |
| | | <javac optimize="true" includeantruntime="false" |
| | | debug="on" debuglevel="${build.debuglevel}" |
| | | deprecation="true" fork="true" |
| | | memoryInitialSize="${MEM}" memoryMaximumSize="${MEM}"> |
| | | <compilerarg value="-Xlint:all" /> |
| | | <compilerarg value="-Xlint:-rawtypes" /> |
| | | <compilerarg value="-Xlint:-static" /> |
| | | <compilerarg value="-Xlint:-unchecked" /> |
| | | </javac> |
| | | </presetdef> |
| | | |
| | | <!-- Create a package bundle containing the DSML library. --> |
| | |
| | | <mkdir dir="${build.lib.dir}" /> |
| | | |
| | | <javac srcdir="${src.dir}:${admin.src.dir}:${msg.src.dir}:${msg.javagen.dir}:${ads.src.dir}:${quicksetup.src.dir}:${guitools.src.dir}" |
| | | destdir="${classes.dir}" debug="on" debuglevel="${build.debuglevel}" |
| | | deprecation="true" fork="true" |
| | | memoryInitialSize="${MEM}" memoryMaximumSize="${MEM}"> |
| | | <compilerarg value="-Xlint:all" /> |
| | | |
| | | destdir="${classes.dir}"> |
| | | <classpath> |
| | | <fileset dir="${lib.dir}"> |
| | | <include name="*.jar" /> |
| | |
| | | <target name="compilequicksetup" depends="buildtools,compile" |
| | | description="Compile the Quick Setup source files."> |
| | | <mkdir dir="${quicksetup.classes.dir}" /> |
| | | <javac srcdir="${ads.src.dir}" destdir="${quicksetup.classes.dir}" |
| | | optimize="true" debug="on" debuglevel="lines,source" |
| | | deprecation="true" fork="true" memoryInitialSize="${MEM}" |
| | | memoryMaximumSize="${MEM}"> |
| | | <compilerarg value="-Xlint:all" /> |
| | | <javac srcdir="${ads.src.dir}" destdir="${quicksetup.classes.dir}"> |
| | | <classpath> |
| | | <fileset dir="${build.dir}/build-tools"> |
| | | <include name="build-tools.jar" /> |
| | |
| | | <pathelement path="${classes.dir}"/> |
| | | </classpath> |
| | | </javac> |
| | | <javac srcdir="${src.dir}:${msg.src.dir}:${msg.javagen.dir}" destdir="${quicksetup.classes.dir}" |
| | | debug="on" debuglevel="${build.debuglevel}" |
| | | deprecation="true" fork="true" memoryInitialSize="${MEM}" |
| | | memoryMaximumSize="${MEM}"> |
| | | <javac srcdir="${src.dir}:${msg.src.dir}:${msg.javagen.dir}" destdir="${quicksetup.classes.dir}"> |
| | | <include name="**/org/opends/server/util/SetupUtils.java"/> |
| | | <include name="**/org/opends/server/util/CertificateManager.java"/> |
| | | <include name="**/org/opends/server/util/DynamicConstants.java"/> |
| | |
| | | <include name="**/org/opends/messages/Category.java"/> |
| | | <include name="**/org/opends/messages/QuickSetupMessages.java"/> |
| | | <include name="**/org/opends/server/types/OpenDsException.java"/> |
| | | <compilerarg value="-Xlint:all" /> |
| | | </javac> |
| | | <javac srcdir="${quicksetup.src.dir}" destdir="${quicksetup.classes.dir}" |
| | | debug="on" debuglevel="${build.debuglevel}" |
| | | deprecation="true" fork="true" memoryInitialSize="${MEM}" |
| | | memoryMaximumSize="${MEM}"> |
| | | <compilerarg value="-Xlint:all" /> |
| | | |
| | | <javac srcdir="${quicksetup.src.dir}" destdir="${quicksetup.classes.dir}"> |
| | | <classpath> |
| | | <fileset dir="${build.dir}/build-tools"> |
| | | <include name="build-tools.jar" /> |
| | |
| | | <!-- Recreate the classes directory and recompile into it. --> |
| | | <mkdir dir="${classes.dir}" /> |
| | | <javac srcdir="${src.dir}:${msg.src.dir}:${msg.javagen.dir}:${admin.src.dir}:${ads.src.dir}:${quicksetup.src.dir}:${guitools.src.dir}" |
| | | destdir="${classes.dir}" |
| | | debug="on" debuglevel="${build.debuglevel}" |
| | | deprecation="true" fork="true" memoryInitialSize="${MEM}" |
| | | memoryMaximumSize="${MEM}"> |
| | | <compilerarg value="-Xlint:all" /> |
| | | |
| | | destdir="${classes.dir}"> |
| | | <classpath> |
| | | <fileset dir="${lib.dir}"> |
| | | <include name="*.jar" /> |
| | |
| | | |
| | | <!-- Recreate the quicksetup classes directory and recompile into it. --> |
| | | <mkdir dir="${quicksetup.classes.dir}" /> |
| | | <javac srcdir="${ads.src.dir}" destdir="${quicksetup.classes.dir}" |
| | | optimize="true" debug="on" debuglevel="lines,source" |
| | | deprecation="true" fork="true" memoryInitialSize="${MEM}" |
| | | memoryMaximumSize="${MEM}"> |
| | | <compilerarg value="-Xlint:all" /> |
| | | <javac srcdir="${ads.src.dir}" destdir="${quicksetup.classes.dir}"> |
| | | <classpath> |
| | | <fileset dir="${build.dir}/build-tools"> |
| | | <include name="build-tools.jar" /> |
| | |
| | | <pathelement path="${classes.dir}"/> |
| | | </classpath> |
| | | </javac> |
| | | <javac srcdir="${src.dir}:${msg.src.dir}:${msg.javagen.dir}" destdir="${quicksetup.classes.dir}" |
| | | debug="on" debuglevel="${build.debuglevel}" |
| | | deprecation="true" fork="true" memoryInitialSize="${MEM}" |
| | | memoryMaximumSize="${MEM}"> |
| | | <javac srcdir="${src.dir}:${msg.src.dir}:${msg.javagen.dir}" destdir="${quicksetup.classes.dir}"> |
| | | <include name="**/org/opends/server/util/SetupUtils.java"/> |
| | | <include name="**/org/opends/server/util/CertificateManager.java"/> |
| | | <include name="**/org/opends/server/util/DynamicConstants.java"/> |
| | |
| | | <include name="**/org/opends/messages/Category.java"/> |
| | | <include name="**/org/opends/messages/QuickSetupMessages.java"/> |
| | | <include name="**/org/opends/server/types/OpenDsException.java"/> |
| | | <compilerarg value="-Xlint:all" /> |
| | | </javac> |
| | | <javac srcdir="${quicksetup.src.dir}" destdir="${quicksetup.classes.dir}" |
| | | debug="on" debuglevel="${build.debuglevel}" |
| | | deprecation="true" fork="true" memoryInitialSize="${MEM}" |
| | | memoryMaximumSize="${MEM}"> |
| | | <compilerarg value="-Xlint:all" /> |
| | | <javac srcdir="${quicksetup.src.dir}" destdir="${quicksetup.classes.dir}"> |
| | | <classpath> |
| | | <fileset dir="${build.dir}/build-tools"> |
| | | <include name="build-tools.jar" /> |
| | |
| | | |
| | | <mkdir dir="${dsml.classes.dir}" /> |
| | | |
| | | <javac srcdir="${dsml.gen.dir}" destdir="${dsml.classes.dir}" |
| | | debug="on" debuglevel="${build.debuglevel}" |
| | | deprecation="true" fork="true" memoryInitialSize="${MEM}" |
| | | memoryMaximumSize="${MEM}"> |
| | | <compilerarg value="-Xlint:all" /> |
| | | <javac srcdir="${dsml.gen.dir}" destdir="${dsml.classes.dir}"> |
| | | <compilerarg value="-Xlint:-path" /> |
| | | |
| | | <classpath> |
| | | <fileset dir="${dsml.lib.dir}"> |
| | | <include name="*.jar" /> |
| | |
| | | </classpath> |
| | | </javac> |
| | | |
| | | <javac srcdir="${dsml.src.dir}" destdir="${dsml.classes.dir}" |
| | | debug="on" debuglevel="${build.debuglevel}" |
| | | deprecation="true" fork="true" memoryInitialSize="${MEM}" |
| | | memoryMaximumSize="${MEM}"> |
| | | <compilerarg value="-Xlint:all" /> |
| | | <javac srcdir="${dsml.src.dir}" destdir="${dsml.classes.dir}"> |
| | | <compilerarg value="-Xlint:-path" /> |
| | | |
| | | <classpath> |
| | | <fileset dir="${dsml.lib.dir}"> |
| | | <include name="*.jar" /> |
| | |
| | | <mkdir dir="${classes.dir}" /> |
| | | |
| | | <javac srcdir="${src.dir}:${admin.src.dir}:${msg.src.dir}:${msg.javagen.dir}:${ads.src.dir}:${quicksetup.src.dir}:${guitools.src.dir}" |
| | | destdir="${classes.dir}" debug="on" debuglevel="${build.debuglevel}" |
| | | deprecation="true" fork="true" |
| | | memoryInitialSize="${MEM}" memoryMaximumSize="${MEM}"> |
| | | <compilerarg value="-Xlint:all" /> |
| | | |
| | | destdir="${classes.dir}"> |
| | | <classpath> |
| | | <fileset dir="${lib.dir}"> |
| | | <include name="*.jar" /> |
| | |
| | | |
| | | <!-- Compile the test cases --> |
| | | <mkdir dir="${unittest.classes.dir}" /> |
| | | <javac srcdir="${unittest.testng.src.dir}" destdir="${unittest.classes.dir}" |
| | | debug="on" debuglevel="${build.debuglevel}" |
| | | deprecation="true" fork="true" memoryInitialSize="${MEM}" |
| | | memoryMaximumSize="${MEM}" excludes="org/opends/server/snmp/**"> |
| | | <compilerarg value="-Xlint:all" /> |
| | | |
| | | <javac srcdir="${unittest.testng.src.dir}" destdir="${unittest.classes.dir}" excludes="org/opends/server/snmp/**"> |
| | | <classpath> |
| | | <fileset dir="${lib.dir}"> |
| | | <include name="*.jar" /> |
| | |
| | | org/opends/messages/MessagePropertyKey.java, |
| | | org/opends/messages/MessageDescriptor.java, |
| | | org/opends/server/types/PublicAPI.java, |
| | | org/opends/server/types/StabilityLevel.java" |
| | | debug="on" debuglevel="${build.debuglevel}" |
| | | deprecation="true" fork="true" memoryInitialSize="${MEM}" |
| | | memoryMaximumSize="${MEM}"/> |
| | | org/opends/server/types/StabilityLevel.java"/> |
| | | |
| | | |
| | | <javac srcdir="${buildtools.src.dir}" destdir="${buildtools.classes.dir}" |
| | | debug="on" debuglevel="${build.debuglevel}" |
| | | deprecation="true" fork="true" memoryInitialSize="${MEM}" |
| | | memoryMaximumSize="${MEM}"> |
| | | <compilerarg value="-Xlint:all" /> |
| | | |
| | | <javac srcdir="${buildtools.src.dir}" destdir="${buildtools.classes.dir}"> |
| | | <classpath> |
| | | <fileset dir="${ant.lib.dir}"> |
| | | <include name="*.jar" /> |
| | |
| | | |
| | | <mkdir dir="${classes.dir}" /> |
| | | |
| | | <javac srcdir="${snmp.gen.dir}" |
| | | destdir="${classes.dir}" debug="on" debuglevel="${build.debuglevel}" |
| | | source="1.4" target="1.4" deprecation="true" fork="true" nowarn="on" |
| | | memoryInitialSize="${MEM}" memoryMaximumSize="${MEM}"> |
| | | <compilerarg value="-Xlint:all" /> |
| | | |
| | | <javac srcdir="${snmp.gen.dir}" destdir="${classes.dir}" > |
| | | <compilerarg value="-Xlint:-serial" /> |
| | | <classpath> |
| | | <fileset dir="${lib.dir}"> |
| | | <include name="*.jar" /> |
| | |
| | | </classpath> |
| | | </javac> |
| | | |
| | | <javac srcdir="${snmp.src.dir}" |
| | | destdir="${classes.dir}" debug="on" debuglevel="${build.debuglevel}" |
| | | deprecation="true" fork="true" |
| | | memoryInitialSize="${MEM}" memoryMaximumSize="${MEM}"> |
| | | <compilerarg value="-Xlint:all" /> |
| | | |
| | | <javac srcdir="${snmp.src.dir}" destdir="${classes.dir}"> |
| | | <classpath> |
| | | <fileset dir="${lib.dir}"> |
| | | <include name="*.jar" /> |
| | |
| | | <!-- Compile the SNMP test cases --> |
| | | <mkdir dir="${unittest.classes.dir}" /> |
| | | <javac srcdir="${unittest.testng.src.dir}" destdir="${unittest.classes.dir}" |
| | | debug="on" debuglevel="${build.debuglevel}" |
| | | deprecation="true" fork="true" memoryInitialSize="${MEM}" |
| | | memoryMaximumSize="${MEM}" includes="org/opends/server/snmp/**"> |
| | | <compilerarg value="-Xlint:all" /> |
| | | |
| | | includes="org/opends/server/snmp/**"> |
| | | <classpath> |
| | | <fileset dir="${lib.dir}"> |
| | | <include name="*.jar" /> |
| | |
| | | * it returns <CODE>null</CODE> if the default ClassLoader is to be |
| | | * used. |
| | | */ |
| | | @SuppressWarnings("unused") |
| | | private static ClassLoader getClassLoader() |
| | | { |
| | | ClassLoader cl; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions copyright 2012 ForgeRock AS. |
| | | */ |
| | | package org.opends.build.tools; |
| | | |
| | |
| | | import java.util.LinkedList; |
| | | |
| | | import org.apache.tools.ant.BuildException; |
| | | import org.apache.tools.ant.DirectoryScanner; |
| | | import org.apache.tools.ant.Task; |
| | | import org.apache.tools.ant.types.FileSet; |
| | | |
| | | import org.tmatesoft.svn.core.SVNDepth; |
| | | import org.tmatesoft.svn.core.SVNException; |
| | | import org.tmatesoft.svn.core.wc.SVNPropertyData; |
| | |
| | | |
| | | try |
| | | { |
| | | long status = ourClientManager.getStatusClient().doStatus(workspacePath, SVNRevision.WORKING, |
| | | ourClientManager.getStatusClient().doStatus(workspacePath, SVNRevision.WORKING, |
| | | SVNDepth.INFINITY, false, false, false, false, this, null); |
| | | } |
| | | catch (Exception e) |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011 ForgeRock AS |
| | | * Portions Copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | package org.opends.build.tools; |
| | | |
| | |
| | | KEY_FORM_MSG); |
| | | } |
| | | |
| | | if (c == null) { |
| | | if (s == null) { |
| | | throw new BuildException( |
| | | "No severity could be assigned to message " + |
| | | key + ". The severity " + |
| | |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.build.tools; |
| | | import org.opends.messages.Message; |
| | | |
| | | import java.util.StringTokenizer; |
| | | |
| | | /** |
| | |
| | | ProgressDialog progressDialog = new ProgressDialog( |
| | | Utilities.createFrame(), |
| | | Utilities.getParentDialog(this), getTitle(), getInfo()); |
| | | @SuppressWarnings("deprecation") |
| | | Object[] backends = list.getSelectedValues(); |
| | | ArrayList<BackendDescriptor> backendsToDelete = |
| | | new ArrayList<BackendDescriptor>(); |
| | |
| | | */ |
| | | public void run() |
| | | { |
| | | @SuppressWarnings("deprecation") |
| | | Object[] s = list.getSelectedValues(); |
| | | Set<Object> selected = new HashSet<Object>(); |
| | | if (s != null) |
| | |
| | | ProgressDialog progressDialog = new ProgressDialog( |
| | | Utilities.createFrame(), |
| | | Utilities.getParentDialog(this), getTitle(), getInfo()); |
| | | @SuppressWarnings("deprecation") |
| | | Object[] dns = list.getSelectedValues(); |
| | | ArrayList<BaseDNDescriptor> baseDNsToDelete = |
| | | new ArrayList<BaseDNDescriptor>(); |
| | |
| | | |
| | | private void addClicked() |
| | | { |
| | | @SuppressWarnings("deprecation") |
| | | Object[] selectedObjects = availableList.getSelectedValues(); |
| | | for (int i=0; i<selectedObjects.length; i++) |
| | | { |
| | |
| | | |
| | | private void removeClicked() |
| | | { |
| | | @SuppressWarnings("deprecation") |
| | | Object[] selectedObjects = selectedList.getSelectedValues(); |
| | | for (int i=0; i<selectedObjects.length; i++) |
| | | { |
| | |
| | | |
| | | private void add1Clicked() |
| | | { |
| | | @SuppressWarnings("deprecation") |
| | | Object[] selectedObjects = availableList.getSelectedValues(); |
| | | for (int i=0; i<selectedObjects.length; i++) |
| | | { |
| | |
| | | |
| | | private void add2Clicked() |
| | | { |
| | | @SuppressWarnings("deprecation") |
| | | Object[] selectedObjects = availableList.getSelectedValues(); |
| | | for (int i=0; i<selectedObjects.length; i++) |
| | | { |
| | |
| | | |
| | | private void remove1Clicked() |
| | | { |
| | | @SuppressWarnings("deprecation") |
| | | Object[] selectedObjects = selectedList1.getSelectedValues(); |
| | | for (int i=0; i<selectedObjects.length; i++) |
| | | { |
| | |
| | | |
| | | private void remove2Clicked() |
| | | { |
| | | @SuppressWarnings("deprecation") |
| | | Object[] selectedObjects = selectedList2.getSelectedValues(); |
| | | for (int i=0; i<selectedObjects.length; i++) |
| | | { |
| | |
| | | database.getDatabaseName(), |
| | | txn.getId()); |
| | | } |
| | | entryContainer.transactionCommit(txn); |
| | | EntryContainer.transactionCommit(txn); |
| | | } |
| | | catch (DatabaseException e) |
| | | { |
| | | entryContainer.transactionAbort(txn); |
| | | EntryContainer.transactionAbort(txn); |
| | | throw e; |
| | | } |
| | | } |
| | |
| | | import static org.opends.messages.CoreMessages.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.protocols.internal.InternalClientConnection.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | |
| | | |
| | | |
| | | InternalSearchOperation internalSearch = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, nextOperationID(), |
| | | nextMessageID(), requestControls, |
| | | baseDN, |
| | | SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, |
| | |
| | | String output; |
| | | try |
| | | { |
| | | output = bsdmd5crypt.crypt(plaintext.toString()); |
| | | output = BSDMD5Crypt.crypt(plaintext.toString()); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | String storedString = storedPassword.toString(); |
| | | try |
| | | { |
| | | String userString = bsdmd5crypt.crypt(plaintextPassword.toString(), |
| | | String userString = BSDMD5Crypt.crypt(plaintextPassword.toString(), |
| | | storedString); |
| | | return userString.equals(storedString); |
| | | } |
| | |
| | | if ((entriesDeleted % 1000) == 0) |
| | | { |
| | | cacheWriteLock.unlock(); |
| | | Thread.currentThread().yield(); |
| | | Thread.currentThread(); |
| | | Thread.yield(); |
| | | cacheWriteLock.lock(); |
| | | } |
| | | } |
| | |
| | | if ((entriesExamined % 1000) == 0) |
| | | { |
| | | cacheWriteLock.unlock(); |
| | | Thread.currentThread().yield(); |
| | | Thread.currentThread(); |
| | | Thread.yield(); |
| | | cacheWriteLock.lock(); |
| | | } |
| | | } |
| | |
| | | entriesExamined++; |
| | | if ((entriesExamined % 1000) == 0) { |
| | | cacheWriteLock.unlock(); |
| | | Thread.currentThread().yield(); |
| | | Thread.currentThread(); |
| | | Thread.yield(); |
| | | cacheWriteLock.lock(); |
| | | } |
| | | } |
| | |
| | | entriesExamined++; |
| | | if ((entriesExamined % 1000) == 0) { |
| | | cacheWriteLock.unlock(); |
| | | Thread.currentThread().yield(); |
| | | Thread.currentThread(); |
| | | Thread.yield(); |
| | | cacheWriteLock.lock(); |
| | | } |
| | | } catch (Exception e) { |
| | |
| | | |
| | | import static org.opends.messages.ExtensionMessages.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.protocols.internal.InternalClientConnection.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.Validator.*; |
| | | |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | ModifyOperationBasis modifyOperation = |
| | | new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new ModifyOperationBasis(conn, nextOperationID(), |
| | | nextMessageID(), requestControls, |
| | | groupEntryDN, mods); |
| | | modifyOperation.run(); |
| | | if (modifyOperation.getResultCode() != ResultCode.SUCCESS) |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | ModifyOperationBasis modifyOperation = |
| | | new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new ModifyOperationBasis(conn, nextOperationID(), |
| | | nextMessageID(), requestControls, |
| | | groupEntryDN, mods); |
| | | modifyOperation.run(); |
| | | if (modifyOperation.getResultCode() != ResultCode.SUCCESS) |
| | |
| | | import org.opends.server.types.*; |
| | | |
| | | import static org.opends.messages.ProtocolMessages.*; |
| | | import static org.opends.server.protocols.internal.InternalClientConnection.*; |
| | | import static org.opends.server.protocols.ldap.LDAPConstants.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | |
| | |
| | | |
| | | InternalClientConnection conn = socket.getConnection(); |
| | | AddOperationBasis op = |
| | | new AddOperationBasis(conn, conn.nextOperationID(), |
| | | new AddOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | messageID, message.getControls(), |
| | | request.getDN(), |
| | | request.getAttributes()); |
| | |
| | | |
| | | InternalClientConnection conn = socket.getConnection(); |
| | | BindOperationBasis op = |
| | | new BindOperationBasis(conn, conn.nextOperationID(), |
| | | new BindOperationBasis(conn, nextOperationID(), |
| | | messageID, message.getControls(), |
| | | String.valueOf(request.getProtocolVersion()), |
| | | request.getDN(), request.getSimplePassword()); |
| | |
| | | |
| | | InternalClientConnection conn = socket.getConnection(); |
| | | CompareOperationBasis op = |
| | | new CompareOperationBasis(conn, conn.nextOperationID(), |
| | | new CompareOperationBasis(conn, nextOperationID(), |
| | | messageID, message.getControls(), request.getDN(), |
| | | request.getAttributeType(), |
| | | request.getAssertionValue()); |
| | |
| | | |
| | | InternalClientConnection conn = socket.getConnection(); |
| | | DeleteOperationBasis op = |
| | | new DeleteOperationBasis(conn, conn.nextOperationID(), |
| | | new DeleteOperationBasis(conn, nextOperationID(), |
| | | messageID, message.getControls(), request.getDN()); |
| | | op.run(); |
| | | |
| | |
| | | |
| | | InternalClientConnection conn = socket.getConnection(); |
| | | ExtendedOperationBasis op = |
| | | new ExtendedOperationBasis(conn, conn.nextOperationID(), |
| | | new ExtendedOperationBasis(conn, nextOperationID(), |
| | | messageID, message.getControls(), request.getOID(), |
| | | request.getValue()); |
| | | op.run(); |
| | |
| | | |
| | | InternalClientConnection conn = socket.getConnection(); |
| | | ModifyOperationBasis op = |
| | | new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | new ModifyOperationBasis(conn, nextOperationID(), |
| | | messageID, message.getControls(), request.getDN(), |
| | | request.getModifications()); |
| | | op.run(); |
| | |
| | | |
| | | InternalClientConnection conn = socket.getConnection(); |
| | | ModifyDNOperationBasis op = |
| | | new ModifyDNOperationBasis(conn, conn.nextOperationID(), |
| | | new ModifyDNOperationBasis(conn, nextOperationID(), |
| | | messageID, message.getControls(), request.getEntryDN(), |
| | | request.getNewRDN(), request.deleteOldRDN(), |
| | | request.getNewSuperior()); |
| | |
| | | |
| | | InternalClientConnection conn = socket.getConnection(); |
| | | InternalSearchOperation op = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | new InternalSearchOperation(conn, nextOperationID(), |
| | | messageID, message.getControls(), request.getBaseDN(), |
| | | request.getScope(), request.getDereferencePolicy(), |
| | | request.getSizeLimit(), request.getTimeLimit(), |
| | |
| | | |
| | | |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | import static org.opends.server.schema.StringPrepProfile.*; |
| | | |
| | | import java.util.Collection; |
| | |
| | | DirectoryServer directoryServer = DirectoryServer.getInstance(); |
| | | try |
| | | { |
| | | directoryServer.bootstrapClient(); |
| | | directoryServer.initializeJMX(); |
| | | DirectoryServer.bootstrapClient(); |
| | | DirectoryServer.initializeJMX(); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | try |
| | | { |
| | | // attempt masking at this rate |
| | | this.sleep(1); |
| | | Thread.sleep(1); |
| | | } |
| | | catch (InterruptedException iex) |
| | | { |
| | |
| | | { |
| | | // Bootstrap the Directory Server configuration for use as a client. |
| | | DirectoryServer directoryServer = DirectoryServer.getInstance(); |
| | | directoryServer.bootstrapClient(); |
| | | DirectoryServer.bootstrapClient(); |
| | | |
| | | |
| | | // If we're to use the configuration then initialize it, along with the |
| | |
| | | { |
| | | try |
| | | { |
| | | directoryServer.initializeJMX(); |
| | | DirectoryServer.initializeJMX(); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | { |
| | | try |
| | | { |
| | | directoryServer.bootstrapClient(); |
| | | directoryServer.initializeJMX(); |
| | | DirectoryServer.bootstrapClient(); |
| | | DirectoryServer.initializeJMX(); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | // Initialize the Directory Server configuration handler using the |
| | | // information that was provided. |
| | | DirectoryServer directoryServer = DirectoryServer.getInstance(); |
| | | directoryServer.bootstrapClient(); |
| | | DirectoryServer.bootstrapClient(); |
| | | |
| | | try |
| | | { |
| | | directoryServer.initializeJMX(); |
| | | DirectoryServer.initializeJMX(); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | extends OpenDsException |
| | | { |
| | | /** |
| | | * Generated serialization ID. |
| | | */ |
| | | private static final long serialVersionUID = 7071843225564003122L; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new identified exception. |
| | | */ |
| | | protected IdentifiedException() |
| | |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | |
| | | |
| | |
| | | extends Exception |
| | | { |
| | | |
| | | /** |
| | | * Generated serialization ID. |
| | | */ |
| | | private static final long serialVersionUID = 7310881401563732702L; |
| | | |
| | | /** Message that explains the problem. */ |
| | | Message message; |
| | | |
| | |
| | | import java.util.HashSet; |
| | | import java.util.Set; |
| | | |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | public static void initializeForClientUse() |
| | | { |
| | | DirectoryServer directoryServer = DirectoryServer.getInstance(); |
| | | directoryServer.bootstrapClient(); |
| | | DirectoryServer.bootstrapClient(); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | try |
| | | { |
| | | currentThread.sleep(1); |
| | | Thread.sleep(1); |
| | | } |
| | | catch (InterruptedException ie) |
| | | { |
| | |
| | | package org.opends.quicksetup; |
| | | |
| | | import org.testng.annotations.BeforeSuite; |
| | | import org.testng.annotations.AfterSuite; |
| | | import org.opends.server.TestCaseUtils; |
| | | import org.opends.server.DirectoryServerTestCase; |
| | | |
| | | import java.io.IOException; |
| | |
| | | import org.opends.server.types.OperatingSystem; |
| | | import org.opends.server.types.ByteStringBuilder; |
| | | |
| | | import java.io.BufferedReader; |
| | | import java.io.File; |
| | | import java.io.FileNotFoundException; |
| | | import java.io.FileWriter; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.io.InputStreamReader; |
| | | import java.io.PrintStream; |
| | | import java.net.ServerSocket; |
| | | import java.util.List; |
| | | import java.util.ArrayList; |
| | |
| | | |
| | | import static org.testng.Assert.*; |
| | | import org.testng.annotations.*; |
| | | import org.opends.quicksetup.Constants; |
| | | import org.opends.server.DirectoryServerTestCase; |
| | | |
| | | /** |
| | |
| | | import org.opends.server.api.AlertGenerator; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.extensions.DummyAlertHandler; |
| | | import org.opends.server.tools.dsconfig.DSConfig; |
| | | import org.opends.server.types.DN; |
| | | |
| | | import static org.testng.Assert.*; |
| | |
| | | |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import org.testng.annotations.BeforeClass; |
| | | import org.testng.annotations.DataProvider; |
| | | import org.testng.annotations.Test; |
| | | |
| | | import org.opends.server.TestCaseUtils; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.opends.server.config.ConfigAttribute; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.JMXMBean; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | |
| | | import static org.testng.Assert.*; |
| | | |
| | | |
| | |
| | | import org.opends.server.protocols.ldap.ModifyResponseProtocolOp; |
| | | import org.opends.server.tools.LDAPPasswordModify; |
| | | import org.opends.server.tools.LDAPWriter; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ModificationType; |
| | | import org.opends.server.types.RawModification; |
| | |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ByteString; |
| | | import static org.opends.server.config.ConfigConstants.ATTR_AUTHZ_GLOBAL_ACI; |
| | | import org.opends.server.TestCaseUtils; |
| | | import org.opends.server.protocols.ldap.LDAPResultCode; |
| | | import static org.testng.Assert.assertTrue; |
| | | import static org.testng.Assert.fail; |
| | | import org.testng.annotations.DataProvider; |
| | |
| | | import org.testng.annotations.BeforeClass; |
| | | import org.testng.Assert; |
| | | |
| | | import javax.naming.Context; |
| | | import java.util.Hashtable; |
| | | |
| | | public class TargetTestCase extends AciTestCase |
| | | { |
| | | private static final String testUser="uid=user.3,ou=People,o=test"; |
| | |
| | | import org.opends.server.tasks.TasksTestCase; |
| | | import org.opends.server.tools.LDAPModify; |
| | | import org.opends.server.tools.LDAPSearch; |
| | | import org.opends.server.tools.LDIFDiff; |
| | | import org.opends.server.types.ConditionResult; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.LDIFImportConfig; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.SearchScope; |
| | | |
| | | import static org.testng.Assert.*; |
| | | |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | AddOperationBasis addOperation = |
| | | new AddOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new AddOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | null, entry.getDN(), entry.getObjectClasses(), |
| | | entry.getUserAttributes(), |
| | | entry.getOperationalAttributes()); |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | DeleteOperationBasis deleteOperation = |
| | | new DeleteOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new DeleteOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | null, schemaDN); |
| | | |
| | | schemaBackend.deleteEntry(schemaDN, deleteOperation); |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | ModifyDNOperationBasis modifyDNOperation = |
| | | new ModifyDNOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), null, |
| | | new ModifyDNOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), null, |
| | | currentSchemaDN, newSchemaDN.getRDN(), |
| | | true, null); |
| | | |
| | |
| | | InternalClientConnection.getRootConnection(); |
| | | |
| | | DeleteOperationBasis delete = new DeleteOperationBasis(conn, |
| | | conn.nextOperationID(), |
| | | conn.nextMessageID(), |
| | | InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), |
| | | deleteSubTreeControl, |
| | | |
| | | DN.decode("dc=test1,dc=com")); |
| | |
| | | DN.decode("uid=user.539,ou=People,dc=test,dc=com"), LockMode.DEFAULT); |
| | | |
| | | DeleteOperationBasis delete = new DeleteOperationBasis(conn, |
| | | conn.nextOperationID(), |
| | | conn.nextMessageID(), |
| | | InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), |
| | | noControls, |
| | | |
| | | DN.decode("uid=user.539,ou=People,dc=test,dc=com")); |
| | |
| | | InternalClientConnection conn = InternalClientConnection |
| | | .getRootConnection(); |
| | | |
| | | ModifyOperationBasis modifyOp = new ModifyOperationBasis(conn, conn |
| | | .nextOperationID(), conn.nextMessageID(), noControls, DN |
| | | ModifyOperationBasis modifyOp = new ModifyOperationBasis(conn, InternalClientConnection |
| | | .nextOperationID(), InternalClientConnection.nextMessageID(), noControls, DN |
| | | .decode("uid=user.1,ou=People,dc=test,dc=com"), modifications); |
| | | |
| | | backend.replaceEntry(entry, newEntry, modifyOp); |
| | |
| | | InternalClientConnection.getRootConnection(); |
| | | |
| | | ModifyDNOperationBasis modifyDN = new ModifyDNOperationBasis(conn, |
| | | conn.nextOperationID(), |
| | | conn.nextMessageID(), |
| | | InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), |
| | | noControls, |
| | | DN.decode("ou=People,dc=test,dc=com"), |
| | | RDN.decode("ou=Good People"), |
| | |
| | | |
| | | import static org.testng.AssertJUnit.assertTrue; |
| | | |
| | | import java.io.File; |
| | | import java.util.List; |
| | | |
| | | import org.opends.server.TestCaseUtils; |
| | | import org.opends.server.api.Backend; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.admin.std.server.LocalDBBackendCfg; |
| | | import org.opends.server.admin.std.meta.LocalDBBackendCfgDefn; |
| | | import org.opends.server.admin.server.AdminTestCaseUtils; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.FilePermission; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.util.Base64; |
| | | import org.testng.annotations.Test; |
| | | import org.testng.annotations.BeforeClass; |
| | | import org.testng.annotations.AfterClass; |
| | |
| | | import static org.testng.Assert.*; |
| | | import org.opends.server.TestCaseUtils; |
| | | import org.opends.server.backends.jeb.RebuildConfig.RebuildMode; |
| | | import org.opends.server.config.ConfigConstants; |
| | | import org.opends.server.tasks.TaskUtils; |
| | | import static org.opends.server.util.ServerConstants.OC_TOP; |
| | | import static org.opends.server.util.ServerConstants.OC_EXTENSIBLE_OBJECT; |
| | |
| | | import org.opends.server.types.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.LinkedHashSet; |
| | | import java.util.HashMap; |
| | | import java.util.LinkedHashMap; |
| | | |
| | |
| | | import org.testng.annotations.Test; |
| | | import org.testng.annotations.AfterClass; |
| | | import static org.testng.Assert.*; |
| | | import static org.testng.Assert.assertEquals; |
| | | |
| | | import java.util.*; |
| | | |
| | | public class TestVLVIndex extends DirectoryServerTestCase { |
| | |
| | | requestControls.add(new VLVRequestControl(0, 3, 1, 0)); |
| | | |
| | | InternalSearchOperation internalSearch = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | DN.decode("dc=vlvtest,dc=com"), SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=*)"), |
| | |
| | | requestControls.add(new VLVRequestControl(0, 3, 0, 0)); |
| | | |
| | | InternalSearchOperation internalSearch = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | DN.decode("dc=vlvtest,dc=com"), SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=*)"), |
| | |
| | | requestControls.add(new VLVRequestControl(0, 3, 3, 0)); |
| | | |
| | | InternalSearchOperation internalSearch = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | DN.decode("dc=vlvtest,dc=com"), SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=*)"), |
| | |
| | | requestControls.add(new VLVRequestControl(0, 3, -1, 0)); |
| | | |
| | | InternalSearchOperation internalSearch = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | DN.decode("dc=vlvtest,dc=com"), SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=*)"), |
| | |
| | | requestControls.add(new VLVRequestControl(3, 3, 1, 0)); |
| | | |
| | | InternalSearchOperation internalSearch = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | DN.decode("dc=vlvtest,dc=com"), SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=*)"), |
| | |
| | | requestControls.add(new VLVRequestControl(3, 3, 30, 0)); |
| | | |
| | | InternalSearchOperation internalSearch = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | DN.decode("dc=vlvtest,dc=com"), SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=*)"), |
| | |
| | | requestControls.add(new VLVRequestControl(0, 4, 7, 0)); |
| | | |
| | | InternalSearchOperation internalSearch = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | DN.decode("dc=vlvtest,dc=com"), SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=*)"), |
| | |
| | | requestControls.add(new VLVRequestControl(0, 3, ByteString.valueOf("a"))); |
| | | |
| | | InternalSearchOperation internalSearch = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | DN.decode("dc=vlvtest,dc=com"), SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=*)"), |
| | |
| | | ByteString.valueOf("aaccf"))); |
| | | |
| | | InternalSearchOperation internalSearch = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | DN.decode("dc=vlvtest,dc=com"), SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=*)"), |
| | |
| | | ByteString.valueOf("albert"))); |
| | | |
| | | InternalSearchOperation internalSearch = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | DN.decode("dc=vlvtest,dc=com"), SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=*)"), |
| | |
| | | ByteString.valueOf("albert"))); |
| | | |
| | | InternalSearchOperation internalSearch = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | DN.decode("dc=vlvtest,dc=com"), SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=*)"), |
| | |
| | | requestControls.add(new VLVRequestControl(0, 3, ByteString.valueOf("zz"))); |
| | | |
| | | InternalSearchOperation internalSearch = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | DN.decode("dc=vlvtest,dc=com"), SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=*)"), |
| | |
| | | package org.opends.server.controls; |
| | | |
| | | import static org.opends.server.util.ServerConstants.OID_ECL_COOKIE_EXCHANGE_CONTROL; |
| | | import static org.opends.server.util.ServerConstants.OID_PERSISTENT_SEARCH; |
| | | import static org.testng.Assert.assertEquals; |
| | | import static org.testng.Assert.assertNotNull; |
| | | import static org.testng.Assert.assertTrue; |
| | |
| | | import org.opends.server.protocols.ldap.LDAPControl; |
| | | import org.opends.server.protocols.ldap.LDAPReader; |
| | | import org.opends.server.replication.common.MultiDomainServerState; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.ByteStringBuilder; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.testng.annotations.DataProvider; |
| | | import org.testng.annotations.Test; |
| | | |
| | |
| | | assertEquals(subInitialTestCurrent, mvf.getSubInitialElement()); |
| | | } |
| | | |
| | | if (subAnyTestCurrent == null) |
| | | { |
| | | assertNull(mvf.getSubAnyElements()); |
| | | } |
| | | else |
| | | { |
| | | ret = mvf.getSubAnyElements(); |
| | | assertNotNull(ret); |
| | | assertEquals(subAnyTestCurrent.size(), ret.size()); |
| | |
| | | { |
| | | assertTrue(subAnyTestCurrent.contains(r)); |
| | | } |
| | | } |
| | | |
| | | if (subFinalTestCurrent == null) |
| | | { |
| | | assertNull(mvf.getSubFinalElement()); |
| | |
| | | AttributeValue attVal = null ; |
| | | if (attType != null) |
| | | { |
| | | AttributeValues.create(attType, value); |
| | | attVal = AttributeValues.create(attType, value); |
| | | } |
| | | |
| | | // Check null, null |
| | |
| | | requestControls.add(new ServerSideSortRequestControl("givenName")); |
| | | |
| | | InternalSearchOperation internalSearch = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | DN.decode("dc=example,dc=com"), SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=person)"), |
| | |
| | | "givenName:caseExactOrderingMatch")); |
| | | |
| | | InternalSearchOperation internalSearch = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | DN.decode("dc=example,dc=com"), SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=person)"), |
| | |
| | | requestControls.add(new ServerSideSortRequestControl("-givenName")); |
| | | |
| | | InternalSearchOperation internalSearch = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | DN.decode("dc=example,dc=com"), SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=person)"), |
| | |
| | | "-givenName:caseExactOrderingMatch")); |
| | | |
| | | InternalSearchOperation internalSearch = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | DN.decode("dc=example,dc=com"), SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=person)"), |
| | |
| | | requestControls.add(new ServerSideSortRequestControl("givenName,sn")); |
| | | |
| | | InternalSearchOperation internalSearch = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | DN.decode("dc=example,dc=com"), SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=person)"), |
| | |
| | | requestControls.add(new ServerSideSortRequestControl("givenName,-sn")); |
| | | |
| | | InternalSearchOperation internalSearch = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | DN.decode("dc=example,dc=com"), SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=person)"), |
| | |
| | | requestControls.add(new ServerSideSortRequestControl(true, "undefined")); |
| | | |
| | | InternalSearchOperation internalSearch = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | DN.decode("dc=example,dc=com"), SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=person)"), |
| | |
| | | "givenName:undefinedOrderingMatch")); |
| | | |
| | | InternalSearchOperation internalSearch = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | DN.decode("dc=example,dc=com"), SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=person)"), |
| | |
| | | "bad_sort:caseExactOrderingMatch")); |
| | | |
| | | InternalSearchOperation internalSearch = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | DN.decode("dc=example,dc=com"), SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=person)"), |
| | |
| | | requestControls.add(new VLVRequestControl(0, 3, 1, 0)); |
| | | |
| | | InternalSearchOperation internalSearch = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | DN.decode("dc=example,dc=com"), SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=person)"), |
| | |
| | | requestControls.add(new VLVRequestControl(0, 3, 0, 0)); |
| | | |
| | | InternalSearchOperation internalSearch = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | DN.decode("dc=example,dc=com"), SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=person)"), |
| | |
| | | requestControls.add(new VLVRequestControl(0, 3, 3, 0)); |
| | | |
| | | InternalSearchOperation internalSearch = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | DN.decode("dc=example,dc=com"), SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=person)"), |
| | |
| | | requestControls.add(new VLVRequestControl(0, 3, -1, 0)); |
| | | |
| | | InternalSearchOperation internalSearch = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | DN.decode("dc=example,dc=com"), SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=person)"), |
| | |
| | | requestControls.add(new VLVRequestControl(3, 3, 1, 0)); |
| | | |
| | | InternalSearchOperation internalSearch = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | DN.decode("dc=example,dc=com"), SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=person)"), |
| | |
| | | requestControls.add(new VLVRequestControl(3, 3, 30, 0)); |
| | | |
| | | InternalSearchOperation internalSearch = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | DN.decode("dc=example,dc=com"), SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=person)"), |
| | |
| | | requestControls.add(new VLVRequestControl(0, 3, 7, 0)); |
| | | |
| | | InternalSearchOperation internalSearch = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | DN.decode("dc=example,dc=com"), SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=person)"), |
| | |
| | | requestControls.add(new VLVRequestControl(0, 3, ByteString.valueOf("a"))); |
| | | |
| | | InternalSearchOperation internalSearch = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | DN.decode("dc=example,dc=com"), SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=person)"), |
| | |
| | | ByteString.valueOf("aaccf"))); |
| | | |
| | | InternalSearchOperation internalSearch = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | DN.decode("dc=example,dc=com"), SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=person)"), |
| | |
| | | ByteString.valueOf("albert"))); |
| | | |
| | | InternalSearchOperation internalSearch = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | DN.decode("dc=example,dc=com"), SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=person)"), |
| | |
| | | ByteString.valueOf("albert"))); |
| | | |
| | | InternalSearchOperation internalSearch = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | DN.decode("dc=example,dc=com"), SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=person)"), |
| | |
| | | requestControls.add(new VLVRequestControl(0, 3, ByteString.valueOf("zz"))); |
| | | |
| | | InternalSearchOperation internalSearch = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | DN.decode("dc=example,dc=com"), SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=person)"), |
| | |
| | | import org.opends.messages.Message; |
| | | import org.opends.server.plugins.DelayPreOpPlugin; |
| | | import org.opends.server.plugins.DisconnectClientPlugin; |
| | | import org.opends.server.protocols.asn1.ASN1Reader; |
| | | import org.opends.server.protocols.asn1.ASN1Writer; |
| | | import org.opends.server.protocols.internal.InternalClientConnection; |
| | | import org.opends.server.protocols.ldap.AbandonRequestProtocolOp; |
| | | import org.opends.server.protocols.ldap.AddRequestProtocolOp; |
| | |
| | | |
| | | return new Operation[] |
| | | { |
| | | new AbandonOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), |
| | | new AbandonOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), |
| | | new ArrayList<Control>(), 1) |
| | | }; |
| | | } |
| | |
| | | InternalClientConnection.getRootConnection(); |
| | | |
| | | AbandonOperationBasis abandonOperation = |
| | | new AbandonOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), new ArrayList<Control>(), 1); |
| | | new AbandonOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), new ArrayList<Control>(), 1); |
| | | assertEquals(abandonOperation.getIDToAbandon(), 1); |
| | | } |
| | | |
| | |
| | | InternalClientConnection.getRootConnection(); |
| | | |
| | | AbandonOperationBasis abandonOperation = |
| | | new AbandonOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), new ArrayList<Control>(), 1); |
| | | new AbandonOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), new ArrayList<Control>(), 1); |
| | | |
| | | CancelRequest cancelRequest = new CancelRequest(true, |
| | | Message.raw("Test Cancel")); |
| | |
| | | InternalClientConnection.getRootConnection(); |
| | | |
| | | AbandonOperationBasis abandonOperation = |
| | | new AbandonOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), new ArrayList<Control>(), 1); |
| | | new AbandonOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), new ArrayList<Control>(), 1); |
| | | assertNull(abandonOperation.getCancelRequest()); |
| | | } |
| | | |
| | |
| | | InternalClientConnection.getRootConnection(); |
| | | |
| | | AbandonOperationBasis abandonOperation = |
| | | new AbandonOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), new ArrayList<Control>(), 1); |
| | | new AbandonOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), new ArrayList<Control>(), 1); |
| | | abandonOperation.run(); |
| | | assertEquals(abandonOperation.getResultCode(), |
| | | ResultCode.CANNOT_CANCEL); |
| | |
| | | import org.opends.server.plugins.DisconnectClientPlugin; |
| | | import org.opends.server.plugins.ShortCircuitPlugin; |
| | | import org.opends.server.plugins.UpdatePreOpPlugin; |
| | | import org.opends.server.protocols.asn1.ASN1Reader; |
| | | import org.opends.server.protocols.asn1.ASN1Writer; |
| | | import org.opends.server.protocols.internal.InternalClientConnection; |
| | | import org.opends.server.protocols.ldap.AddRequestProtocolOp; |
| | | import org.opends.server.protocols.ldap.AddResponseProtocolOp; |
| | |
| | | |
| | | Operation[] opArray = new Operation[] |
| | | { |
| | | new AddOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new AddOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | null, ByteString.valueOf("ou=People,o=test"), |
| | | ldapAttrList), |
| | | new AddOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new AddOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | noControls, ByteString.valueOf("ou=People,o=test"), |
| | | ldapAttrList), |
| | | new AddOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new AddOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | null, entry.getDN(), entry.getObjectClasses(), |
| | | entry.getUserAttributes(), |
| | | entry.getOperationalAttributes()), |
| | | new AddOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new AddOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | noControls, entry.getDN(), entry.getObjectClasses(), |
| | | entry.getUserAttributes(), |
| | | entry.getOperationalAttributes()), |
| | |
| | | ldapAttrList.add(new LDAPAttribute("ou", values)); |
| | | |
| | | AddOperationBasis addOperation = |
| | | new AddOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new AddOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | null, ByteString.valueOf("ou=People,o=test"), |
| | | ldapAttrList); |
| | | assertNotNull(addOperation.getEntryDN()); |
| | |
| | | "ou: People"); |
| | | |
| | | AddOperationBasis addOperation = |
| | | new AddOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new AddOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | null, entry.getDN(), entry.getObjectClasses(), |
| | | entry.getUserAttributes(), |
| | | entry.getOperationalAttributes()); |
| | |
| | | "ou: People"); |
| | | |
| | | AddOperationBasis addOperation = |
| | | new AddOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new AddOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | null, entry.getDN(), entry.getObjectClasses(), |
| | | entry.getUserAttributes(), |
| | | entry.getOperationalAttributes()); |
| | |
| | | InternalClientConnection.getRootConnection(); |
| | | |
| | | AddOperationBasis addOperation = |
| | | new AddOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new AddOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | null, entry.getDN(), entry.getObjectClasses(), |
| | | entry.getUserAttributes(), |
| | | entry.getOperationalAttributes()); |
| | |
| | | InternalClientConnection.getRootConnection(); |
| | | |
| | | AddOperationBasis addOperation = |
| | | new AddOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new AddOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | null, entry.getDN(), entry.getObjectClasses(), |
| | | entry.getUserAttributes(), |
| | | entry.getOperationalAttributes()); |
| | |
| | | rawAttrs.add(RawAttribute.create("o", "test")); |
| | | |
| | | AddOperationBasis addOperation = |
| | | new AddOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new AddOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | controls, ByteString.valueOf("o=test"), rawAttrs); |
| | | addOperation.run(); |
| | | assertEquals(addOperation.getResultCode(), ResultCode.SUCCESS); |
| | |
| | | import org.opends.server.api.Backend; |
| | | import org.opends.server.plugins.DisconnectClientPlugin; |
| | | import org.opends.server.plugins.ShortCircuitPlugin; |
| | | import org.opends.server.protocols.asn1.ASN1Reader; |
| | | import org.opends.server.protocols.asn1.ASN1Writer; |
| | | import org.opends.server.protocols.internal.InternalClientConnection; |
| | | import org.opends.server.protocols.ldap.BindRequestProtocolOp; |
| | | import org.opends.server.protocols.ldap.BindResponseProtocolOp; |
| | |
| | | import org.opends.server.workflowelement.localbackend.LocalBackendDeleteOperation; |
| | | |
| | | import static org.testng.Assert.*; |
| | | import static org.testng.Assert.assertEquals; |
| | | |
| | | import static org.opends.server.protocols.ldap.LDAPConstants.*; |
| | | |
| | | |
| | |
| | | |
| | | return new Operation[] |
| | | { |
| | | new DeleteOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new DeleteOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | new ArrayList<Control>(), ByteString.empty()), |
| | | new DeleteOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new DeleteOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | null, ByteString.empty()), |
| | | new DeleteOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new DeleteOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | new ArrayList<Control>(), |
| | | ByteString.valueOf("o=test")), |
| | | new DeleteOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new DeleteOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | null, ByteString.valueOf("o=test")), |
| | | new DeleteOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new DeleteOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | new ArrayList<Control>(), DN.nullDN()), |
| | | new DeleteOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new DeleteOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | null, DN.nullDN()), |
| | | new DeleteOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new DeleteOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | new ArrayList<Control>(), DN.decode("o=test")), |
| | | new DeleteOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new DeleteOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | null, DN.decode("o=test")) |
| | | }; |
| | | } |
| | |
| | | InternalClientConnection.getRootConnection(); |
| | | |
| | | DeleteOperation deleteOperation = |
| | | new DeleteOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new DeleteOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | null, ByteString.valueOf("o=test")); |
| | | assertNotNull(deleteOperation.getEntryDN()); |
| | | } |
| | |
| | | InternalClientConnection.getRootConnection(); |
| | | |
| | | DeleteOperation deleteOperation = |
| | | new DeleteOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new DeleteOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | null, DN.decode("o=test")); |
| | | assertNotNull(deleteOperation.getEntryDN()); |
| | | } |
| | |
| | | InternalClientConnection.getRootConnection(); |
| | | |
| | | DeleteOperation deleteOperation = |
| | | new DeleteOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new DeleteOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | null, DN.decode("o=test")); |
| | | assertNotNull(deleteOperation.getEntryDN()); |
| | | |
| | |
| | | InternalClientConnection.getRootConnection(); |
| | | |
| | | DeleteOperationBasis deleteOperation = |
| | | new DeleteOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new DeleteOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | null, ByteString.valueOf("o=test")); |
| | | |
| | | CancelRequest cancelRequest = new CancelRequest(false, |
| | |
| | | InternalClientConnection.getRootConnection(); |
| | | |
| | | DeleteOperationBasis deleteOperation = |
| | | new DeleteOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new DeleteOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | null, ByteString.valueOf("o=test")); |
| | | |
| | | deleteOperation.run(); |
| | |
| | | ShortCircuitPlugin.createShortCircuitControlList(0, "PreParse"); |
| | | |
| | | DeleteOperationBasis deleteOperation = |
| | | new DeleteOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new DeleteOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | controls, ByteString.valueOf("o=test")); |
| | | deleteOperation.run(); |
| | | assertEquals(deleteOperation.getResultCode(), ResultCode.SUCCESS); |
| | |
| | | // group operations correctly. |
| | | InternalClientConnection conn0 = new InternalClientConnection(DN.nullDN()); |
| | | InternalSearchOperation searchOperation = |
| | | new InternalSearchOperation(conn0, conn0.nextOperationID(), |
| | | conn0.nextMessageID(), null, DN.nullDN(), |
| | | new InternalSearchOperation(conn0, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), null, DN.nullDN(), |
| | | SearchScope.BASE_OBJECT, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=*)"), null, |
| | |
| | | // group operations correctly. |
| | | InternalClientConnection conn1 = new InternalClientConnection(user1DN); |
| | | searchOperation = |
| | | new InternalSearchOperation(conn1, conn1.nextOperationID(), |
| | | conn1.nextMessageID(), null, DN.nullDN(), |
| | | new InternalSearchOperation(conn1, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), null, DN.nullDN(), |
| | | SearchScope.BASE_OBJECT, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=*)"), null, |
| | |
| | | // group operations correctly. |
| | | InternalClientConnection conn2 = new InternalClientConnection(user2DN); |
| | | searchOperation = |
| | | new InternalSearchOperation(conn2, conn2.nextOperationID(), |
| | | conn2.nextMessageID(), null, DN.nullDN(), |
| | | new InternalSearchOperation(conn2, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), null, DN.nullDN(), |
| | | SearchScope.BASE_OBJECT, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=*)"), null, |
| | |
| | | // group operations correctly. |
| | | InternalClientConnection conn3 = new InternalClientConnection(user3DN); |
| | | searchOperation = |
| | | new InternalSearchOperation(conn3, conn3.nextOperationID(), |
| | | conn3.nextMessageID(), null, DN.nullDN(), |
| | | new InternalSearchOperation(conn3, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), null, DN.nullDN(), |
| | | SearchScope.BASE_OBJECT, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=*)"), null, |
| | |
| | | DN userDN = DN.decode("uid=test1,ou=people,dc=example,dc=com"); |
| | | InternalClientConnection conn = new InternalClientConnection(userDN); |
| | | InternalSearchOperation searchOperation = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), null, DN.nullDN(), |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), null, DN.nullDN(), |
| | | SearchScope.BASE_OBJECT, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=*)"), null, |
| | |
| | | InternalClientConnection conn1 = |
| | | new InternalClientConnection(userDN); |
| | | searchOperation = |
| | | new InternalSearchOperation(conn1, conn1.nextOperationID(), |
| | | conn1.nextMessageID(), null, DN.nullDN(), |
| | | new InternalSearchOperation(conn1, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), null, DN.nullDN(), |
| | | SearchScope.BASE_OBJECT, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=*)"), null, |
| | |
| | | DN userDN = DN.decode("uid=test1,ou=people,dc=example,dc=com"); |
| | | InternalClientConnection conn = new InternalClientConnection(userDN); |
| | | InternalSearchOperation searchOperation = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), null, DN.nullDN(), |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), null, DN.nullDN(), |
| | | SearchScope.BASE_OBJECT, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=*)"), null, |
| | |
| | | InternalClientConnection conn1 = |
| | | new InternalClientConnection(userDN); |
| | | searchOperation = |
| | | new InternalSearchOperation(conn1, conn1.nextOperationID(), |
| | | conn1.nextMessageID(), null, DN.nullDN(), |
| | | new InternalSearchOperation(conn1, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), null, DN.nullDN(), |
| | | SearchScope.BASE_OBJECT, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=*)"), null, |
| | |
| | | |
| | | import org.opends.server.TestCaseUtils; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.protocols.asn1.*; |
| | | import org.opends.server.protocols.ldap.*; |
| | | import org.opends.server.tools.dsconfig.DSConfig; |
| | | import org.opends.server.tools.LDAPWriter; |
| | | |
| | | import static org.testng.Assert.*; |
| | |
| | | LDAPAttribute ldapAttr = new LDAPAttribute("description", ldapValues); |
| | | ldapMods.add(new LDAPModification(ModificationType.ADD, ldapAttr)); |
| | | |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), null, |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), null, |
| | | ByteString.empty(), ldapMods)); |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), noControls, |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), noControls, |
| | | ByteString.empty(), ldapMods)); |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), null, |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), null, |
| | | ByteString.valueOf("o=test"), ldapMods)); |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), noControls, |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), noControls, |
| | | ByteString.valueOf("o=test"), ldapMods)); |
| | | |
| | | ldapMods = new ArrayList<RawModification>(); |
| | | ldapMods.add(new LDAPModification(ModificationType.DELETE, ldapAttr)); |
| | | |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), null, |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), null, |
| | | ByteString.empty(), ldapMods)); |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), noControls, |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), noControls, |
| | | ByteString.empty(), ldapMods)); |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), null, |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), null, |
| | | ByteString.valueOf("o=test"), ldapMods)); |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), noControls, |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), noControls, |
| | | ByteString.valueOf("o=test"), ldapMods)); |
| | | |
| | | ldapMods = new ArrayList<RawModification>(); |
| | | ldapMods.add(new LDAPModification(ModificationType.REPLACE, ldapAttr)); |
| | | |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), null, |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), null, |
| | | ByteString.empty(), ldapMods)); |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), noControls, |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), noControls, |
| | | ByteString.empty(), ldapMods)); |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), null, |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), null, |
| | | ByteString.valueOf("o=test"), ldapMods)); |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), noControls, |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), noControls, |
| | | ByteString.valueOf("o=test"), ldapMods)); |
| | | |
| | | ldapMods = new ArrayList<RawModification>(); |
| | |
| | | ldapMods.add(new LDAPModification(ModificationType.DELETE, ldapAttr)); |
| | | ldapMods.add(new LDAPModification(ModificationType.ADD, ldapAttr2)); |
| | | |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), null, |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), null, |
| | | ByteString.empty(), ldapMods)); |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), noControls, |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), noControls, |
| | | ByteString.empty(), ldapMods)); |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), null, |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), null, |
| | | ByteString.valueOf("o=test"), ldapMods)); |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), noControls, |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), noControls, |
| | | ByteString.valueOf("o=test"), ldapMods)); |
| | | |
| | | ldapMods = new ArrayList<RawModification>(); |
| | |
| | | ldapMods.add(new LDAPModification(ModificationType.REPLACE, ldapAttr)); |
| | | ldapMods.add(new LDAPModification(ModificationType.REPLACE, ldapAttr2)); |
| | | |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), null, |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), null, |
| | | ByteString.empty(), ldapMods)); |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), noControls, |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), noControls, |
| | | ByteString.empty(), ldapMods)); |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), null, |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), null, |
| | | ByteString.valueOf("o=test"), ldapMods)); |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), noControls, |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), noControls, |
| | | ByteString.valueOf("o=test"), ldapMods)); |
| | | |
| | | |
| | |
| | | mods.add(new Modification(ModificationType.ADD, |
| | | Attributes.create("description", "foo"))); |
| | | |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), null, DN.nullDN(), mods)); |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), noControls, DN.nullDN(), |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), null, DN.nullDN(), mods)); |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), noControls, DN.nullDN(), |
| | | mods)); |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), null, |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), null, |
| | | DN.decode("o=test"), mods)); |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), noControls, |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), noControls, |
| | | DN.decode("o=test"), mods)); |
| | | |
| | | mods = new ArrayList<Modification>(); |
| | | mods.add(new Modification(ModificationType.DELETE, |
| | | Attributes.create("description", "foo"))); |
| | | |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), null, DN.nullDN(), mods)); |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), noControls, DN.nullDN(), |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), null, DN.nullDN(), mods)); |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), noControls, DN.nullDN(), |
| | | mods)); |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), null, |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), null, |
| | | DN.decode("o=test"), mods)); |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), noControls, |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), noControls, |
| | | DN.decode("o=test"), mods)); |
| | | |
| | | mods = new ArrayList<Modification>(); |
| | | mods.add(new Modification(ModificationType.REPLACE, |
| | | Attributes.create("description", "foo"))); |
| | | |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), null, DN.nullDN(), mods)); |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), noControls, DN.nullDN(), |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), null, DN.nullDN(), mods)); |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), noControls, DN.nullDN(), |
| | | mods)); |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), null, |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), null, |
| | | DN.decode("o=test"), mods)); |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), noControls, |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), noControls, |
| | | DN.decode("o=test"), mods)); |
| | | |
| | | mods = new ArrayList<Modification>(); |
| | |
| | | mods.add(new Modification(ModificationType.ADD, |
| | | Attributes.create("description", "bar"))); |
| | | |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), null, DN.nullDN(), mods)); |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), noControls, DN.nullDN(), |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), null, DN.nullDN(), mods)); |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), noControls, DN.nullDN(), |
| | | mods)); |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), null, |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), null, |
| | | DN.decode("o=test"), mods)); |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), noControls, |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), noControls, |
| | | DN.decode("o=test"), mods)); |
| | | |
| | | mods = new ArrayList<Modification>(); |
| | |
| | | mods.add(new Modification(ModificationType.REPLACE, |
| | | Attributes.create("cn", "bar"))); |
| | | |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), null, DN.nullDN(), mods)); |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), noControls, DN.nullDN(), |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), null, DN.nullDN(), mods)); |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), noControls, DN.nullDN(), |
| | | mods)); |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), null, |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), null, |
| | | DN.decode("o=test"), mods)); |
| | | opList.add(new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), noControls, |
| | | opList.add(new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), noControls, |
| | | DN.decode("o=test"), mods)); |
| | | |
| | | |
| | |
| | | mods.add(new LDAPModification(ModificationType.REPLACE, attr)); |
| | | |
| | | ModifyOperation modifyOperation = |
| | | new ModifyOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | null, ByteString.empty(), mods); |
| | | assertNotNull(modifyOperation.getEntryDN()); |
| | | } |
| | |
| | | mods.add(new Modification(ModificationType.REPLACE, |
| | | Attributes.create("description", "foo"))); |
| | | ModifyOperation modifyOperation = |
| | | new ModifyOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | null, DN.nullDN(), mods); |
| | | assertNotNull(modifyOperation.getEntryDN()); |
| | | } |
| | |
| | | mods.add(new Modification(ModificationType.REPLACE, |
| | | Attributes.create("description", "foo"))); |
| | | ModifyOperation modifyOperation = |
| | | new ModifyOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | null, DN.nullDN(), mods); |
| | | assertNotNull(modifyOperation.getEntryDN()); |
| | | |
| | |
| | | mods.add(new LDAPModification(ModificationType.REPLACE, attr)); |
| | | |
| | | ModifyOperationBasis modifyOperation = |
| | | new ModifyOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | null, ByteString.valueOf(baseDN), mods); |
| | | |
| | | CancelRequest cancelRequest = new CancelRequest(false, |
| | |
| | | mods.add(new LDAPModification(ModificationType.REPLACE, attr)); |
| | | |
| | | ModifyOperationBasis modifyOperation = |
| | | new ModifyOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | null, ByteString.valueOf(baseDN), mods); |
| | | |
| | | modifyOperation.run(); |
| | |
| | | "foo")); |
| | | |
| | | ModifyOperationBasis modifyOperation = |
| | | new ModifyOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | controls, ByteString.valueOf("o=test"), mods); |
| | | modifyOperation.run(); |
| | | assertEquals(modifyOperation.getResultCode(), ResultCode.SUCCESS); |
| | |
| | | import org.testng.annotations.BeforeClass; |
| | | import org.testng.annotations.DataProvider; |
| | | import org.testng.annotations.Test; |
| | | import org.testng.annotations.BeforeMethod; |
| | | |
| | | import org.opends.server.TestCaseUtils; |
| | | import org.opends.server.api.plugin.DirectoryServerPlugin; |
| | | import org.opends.server.api.plugin.PluginType; |
| | |
| | | import org.opends.server.TestCaseUtils; |
| | | import org.opends.server.protocols.internal.InternalClientConnection; |
| | | import org.opends.server.types.*; |
| | | import org.opends.server.protocols.ldap.LDAPControl; |
| | | import org.opends.server.protocols.ldap.LDAPMessage; |
| | | import org.opends.server.protocols.ldap.UnbindRequestProtocolOp; |
| | | import org.opends.server.tools.*; |
| | |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ObjectClass; |
| | | import org.testng.annotations.BeforeClass; |
| | | import org.testng.annotations.AfterClass; |
| | | |
| | | /** |
| | | * An abstract base class for all subtree specification tests. |
| | |
| | | |
| | | ModifyDNOperationBasis[] modifies = new ModifyDNOperationBasis[] |
| | | { |
| | | new ModifyDNOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new ModifyDNOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | noControls, ByteString.valueOf("cn=test,ou=test"), |
| | | ByteString.valueOf("cn=test2"), true, |
| | | ByteString.valueOf("dc=example,dc=com")), |
| | | new ModifyDNOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new ModifyDNOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | noControls, DN.decode("cn=test,ou=test"), |
| | | RDN.decode("cn=test2"), true, |
| | | DN.decode("dc=example,dc=com")) |
| | |
| | | InternalClientConnection.getRootConnection(); |
| | | |
| | | ModifyDNOperationBasis modifyDNOperation = |
| | | new ModifyDNOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new ModifyDNOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | noControls, |
| | | ByteString.valueOf("uid=user.0,ou=People,dc=example,dc=com"), |
| | | ByteString.valueOf("uid=user.test0"), false, |
| | |
| | | InvocationCounterPlugin.resetAllCounters(); |
| | | |
| | | modifyDNOperation = |
| | | new ModifyDNOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new ModifyDNOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | noControls, |
| | | ByteString.valueOf("uid=user.test0,ou=People,dc=example,dc=com"), |
| | | ByteString.valueOf("uid=user.0"), true, |
| | |
| | | InternalClientConnection.getRootConnection(); |
| | | |
| | | ModifyDNOperationBasis modifyDNOperation = |
| | | new ModifyDNOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new ModifyDNOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | noControls, |
| | | DN.decode("uid=user.0,ou=People,dc=example,dc=com"), |
| | | RDN.decode("uid=user.test0"), false, |
| | |
| | | InvocationCounterPlugin.resetAllCounters(); |
| | | |
| | | modifyDNOperation = |
| | | new ModifyDNOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new ModifyDNOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | noControls, |
| | | DN.decode("uid=user.test0,ou=People,dc=example,dc=com"), |
| | | RDN.decode("uid=user.0"), true, |
| | |
| | | InternalClientConnection.getRootConnection(); |
| | | |
| | | ModifyDNOperationBasis modifyDNOperation = |
| | | new ModifyDNOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new ModifyDNOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | noControls, |
| | | ByteString.valueOf("uid=user.0,ou=People,dc=example,dc=com"), |
| | | ByteString.valueOf("uid=user.test0"), true, |
| | |
| | | InvocationCounterPlugin.resetAllCounters(); |
| | | |
| | | modifyDNOperation = |
| | | new ModifyDNOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new ModifyDNOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | noControls, |
| | | ByteString.valueOf("uid=user.test0,ou=People,dc=example,dc=com"), |
| | | ByteString.valueOf("uid=user.0"), true, |
| | |
| | | InternalClientConnection.getRootConnection(); |
| | | |
| | | ModifyDNOperationBasis modifyDNOperation = |
| | | new ModifyDNOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new ModifyDNOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | noControls, |
| | | DN.decode("uid=user.0,ou=People,dc=example,dc=com"), |
| | | RDN.decode("uid=user.test0"), true, |
| | |
| | | InvocationCounterPlugin.resetAllCounters(); |
| | | |
| | | modifyDNOperation = |
| | | new ModifyDNOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new ModifyDNOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | noControls, |
| | | DN.decode("uid=user.test0,ou=People,dc=example,dc=com"), |
| | | RDN.decode("uid=user.0"), true, |
| | |
| | | InternalClientConnection.getRootConnection(); |
| | | |
| | | ModifyDNOperationBasis modifyDNOperation = |
| | | new ModifyDNOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new ModifyDNOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | noControls, |
| | | ByteString.valueOf("uid=user.0,ou=People,dc=example,dc=com"), |
| | | ByteString.valueOf("uid=user.test0"), true, |
| | |
| | | InvocationCounterPlugin.resetAllCounters(); |
| | | |
| | | modifyDNOperation = |
| | | new ModifyDNOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new ModifyDNOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | noControls, |
| | | ByteString.valueOf("uid=user.test0,dc=example,dc=com"), |
| | | ByteString.valueOf("uid=user.0"), true, |
| | |
| | | InternalClientConnection.getRootConnection(); |
| | | |
| | | ModifyDNOperationBasis modifyDNOperation = |
| | | new ModifyDNOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new ModifyDNOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | noControls, |
| | | DN.decode("uid=user.0,ou=People,dc=example,dc=com"), |
| | | RDN.decode("uid=user.test0"), true, |
| | |
| | | InvocationCounterPlugin.resetAllCounters(); |
| | | |
| | | modifyDNOperation = |
| | | new ModifyDNOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new ModifyDNOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | noControls, |
| | | DN.decode("uid=user.test0,dc=example,dc=com"), |
| | | RDN.decode("uid=user.0"), true, |
| | |
| | | InternalClientConnection.getRootConnection(); |
| | | |
| | | ModifyDNOperationBasis modifyDNOperation = |
| | | new ModifyDNOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new ModifyDNOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | noControls, |
| | | DN.decode("uid=user.0,ou=People,dc=example,dc=com"), |
| | | RDN.decode("cn=Aaccf Amar Test"), true, |
| | |
| | | InvocationCounterPlugin.resetAllCounters(); |
| | | |
| | | modifyDNOperation = |
| | | new ModifyDNOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new ModifyDNOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | noControls, |
| | | DN.decode("cn=Aaccf Amar Test,dc=example,dc=com"), |
| | | RDN.decode("uid=user.0"), false, |
| | |
| | | InternalClientConnection.getRootConnection(); |
| | | |
| | | ModifyDNOperationBasis modifyDNOperation = |
| | | new ModifyDNOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new ModifyDNOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | noControls, |
| | | DN.decode("uid=user.invalid,ou=People,dc=example,dc=com"), |
| | | RDN.decode("uid=user.test0"), true, |
| | |
| | | InternalClientConnection.getRootConnection(); |
| | | |
| | | ModifyDNOperationBasis modifyDNOperation = |
| | | new ModifyDNOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new ModifyDNOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | noControls, |
| | | DN.decode("uid=user.0,ou=People,dc=example,dc=com"), |
| | | RDN.decode("invalid=invalid"), true, |
| | |
| | | InternalClientConnection.getRootConnection(); |
| | | |
| | | ModifyDNOperationBasis modifyDNOperation = |
| | | new ModifyDNOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new ModifyDNOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | noControls, |
| | | DN.decode("uid=user.0,ou=People,dc=example,dc=com"), |
| | | RDN.decode("uid=user.test0"), true, |
| | |
| | | InternalClientConnection.getRootConnection(); |
| | | |
| | | ModifyDNOperationBasis modifyDNOperation = |
| | | new ModifyDNOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new ModifyDNOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | noControls, |
| | | ByteString.valueOf("invalid DN"), |
| | | ByteString.valueOf("uid=user.test0"), true, |
| | |
| | | InternalClientConnection.getRootConnection(); |
| | | |
| | | ModifyDNOperationBasis modifyDNOperation = |
| | | new ModifyDNOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new ModifyDNOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | noControls, |
| | | ByteString.valueOf("uid=user.0,ou=People,dc=example,dc=com"), |
| | | ByteString.valueOf("invalid RDN"), true, |
| | |
| | | InternalClientConnection.getRootConnection(); |
| | | |
| | | ModifyDNOperationBasis modifyDNOperation = |
| | | new ModifyDNOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new ModifyDNOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | noControls, |
| | | ByteString.valueOf("uid=user.0,ou=People,dc=example,dc=com"), |
| | | ByteString.valueOf("uid=user.test0"), true, |
| | |
| | | InternalClientConnection.getRootConnection(); |
| | | |
| | | ModifyDNOperationBasis modifyDNOperation = |
| | | new ModifyDNOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new ModifyDNOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | noControls, |
| | | DN.decode("dc=example,dc=com"), |
| | | RDN.decode("dc=exampletest"), true, |
| | |
| | | InvocationCounterPlugin.resetAllCounters(); |
| | | |
| | | ModifyDNOperationBasis modifyDNOperation = |
| | | new ModifyDNOperationBasis(proxyUserConn, proxyUserConn.nextOperationID(), |
| | | proxyUserConn.nextMessageID(), controls, |
| | | new ModifyDNOperationBasis(proxyUserConn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), controls, |
| | | ByteString.valueOf("uid=user.0,ou=People,dc=example,dc=com"), |
| | | ByteString.valueOf("uid=user.test0"), false, |
| | | null); |
| | |
| | | InvocationCounterPlugin.resetAllCounters(); |
| | | |
| | | modifyDNOperation = |
| | | new ModifyDNOperationBasis(proxyUserConn, proxyUserConn.nextOperationID(), |
| | | proxyUserConn.nextMessageID(), controls, |
| | | new ModifyDNOperationBasis(proxyUserConn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), controls, |
| | | ByteString.valueOf("uid=user.test0,ou=People,dc=example,dc=com"), |
| | | ByteString.valueOf("uid=user.0"), true, |
| | | null); |
| | |
| | | InvocationCounterPlugin.resetAllCounters(); |
| | | |
| | | ModifyDNOperationBasis modifyDNOperation = |
| | | new ModifyDNOperationBasis(proxyUserConn, proxyUserConn.nextOperationID(), |
| | | proxyUserConn.nextMessageID(), controls, |
| | | new ModifyDNOperationBasis(proxyUserConn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), controls, |
| | | DN.decode("uid=user.0,ou=People,dc=example,dc=com"), |
| | | RDN.decode("uid=user.test0"), false, |
| | | null); |
| | |
| | | InvocationCounterPlugin.resetAllCounters(); |
| | | |
| | | modifyDNOperation = |
| | | new ModifyDNOperationBasis(proxyUserConn, proxyUserConn.nextOperationID(), |
| | | proxyUserConn.nextMessageID(), |
| | | new ModifyDNOperationBasis(proxyUserConn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), |
| | | controls, |
| | | DN.decode("uid=user.test0,ou=People,dc=example,dc=com"), |
| | | RDN.decode("uid=user.0"), true, |
| | |
| | | InvocationCounterPlugin.resetAllCounters(); |
| | | |
| | | ModifyDNOperationBasis modifyDNOperation = |
| | | new ModifyDNOperationBasis(proxyUserConn, proxyUserConn.nextOperationID(), |
| | | proxyUserConn.nextMessageID(), controls, |
| | | new ModifyDNOperationBasis(proxyUserConn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), controls, |
| | | DN.decode("uid=user.0,ou=People,dc=example,dc=com"), |
| | | RDN.decode("uid=user.test0"), false, |
| | | null); |
| | |
| | | InvocationCounterPlugin.resetAllCounters(); |
| | | |
| | | ModifyDNOperationBasis modifyDNOperation = |
| | | new ModifyDNOperationBasis(proxyUserConn, proxyUserConn.nextOperationID(), |
| | | proxyUserConn.nextMessageID(), controls, |
| | | new ModifyDNOperationBasis(proxyUserConn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), controls, |
| | | DN.decode("uid=user.0,ou=People,dc=example,dc=com"), |
| | | RDN.decode("uid=user.test0"), false, |
| | | null); |
| | |
| | | InvocationCounterPlugin.resetAllCounters(); |
| | | |
| | | modifyDNOperation = |
| | | new ModifyDNOperationBasis(proxyUserConn, proxyUserConn.nextOperationID(), |
| | | proxyUserConn.nextMessageID(), controls, |
| | | new ModifyDNOperationBasis(proxyUserConn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), controls, |
| | | DN.decode("uid=user.test0,ou=People,dc=example,dc=com"), |
| | | RDN.decode("uid=user.0"), true, |
| | | null); |
| | |
| | | InvocationCounterPlugin.resetAllCounters(); |
| | | |
| | | ModifyDNOperationBasis modifyDNOperation = |
| | | new ModifyDNOperationBasis(proxyUserConn, proxyUserConn.nextOperationID(), |
| | | proxyUserConn.nextMessageID(), controls, |
| | | new ModifyDNOperationBasis(proxyUserConn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), controls, |
| | | DN.decode("uid=user.0,ou=People,dc=example,dc=com"), |
| | | RDN.decode("uid=user.test0"), false, |
| | | null); |
| | |
| | | InvocationCounterPlugin.resetAllCounters(); |
| | | |
| | | ModifyDNOperationBasis modifyDNOperation = |
| | | new ModifyDNOperationBasis(proxyUserConn, proxyUserConn.nextOperationID(), |
| | | proxyUserConn.nextMessageID(), controls, |
| | | new ModifyDNOperationBasis(proxyUserConn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), controls, |
| | | DN.decode("uid=user.0,ou=People,dc=example,dc=com"), |
| | | RDN.decode("uid=user.test0"), false, |
| | | null); |
| | |
| | | InternalClientConnection.getRootConnection(); |
| | | |
| | | ModifyDNOperationBasis modifyDNOperation = |
| | | new ModifyDNOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new ModifyDNOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | controls, |
| | | DN.decode("uid=user.0,ou=People,dc=example,dc=com"), |
| | | RDN.decode("uid=user.test0"), false, |
| | |
| | | InternalClientConnection.getRootConnection(); |
| | | |
| | | ModifyDNOperationBasis modifyDNOperation = |
| | | new ModifyDNOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new ModifyDNOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | noControls, |
| | | DN.decode("uid=user.invalid,ou=People,dc=example,dc=com"), |
| | | RDN.decode("uid=user.test0"), true, |
| | |
| | | |
| | | import org.testng.annotations.Test; |
| | | |
| | | import org.opends.server.TestCaseUtils; |
| | | import org.opends.messages.Message; |
| | | import org.opends.server.plugins.InvocationCounterPlugin; |
| | | import org.opends.server.protocols.internal.InternalClientConnection; |
| | |
| | | |
| | | import static org.testng.Assert.*; |
| | | |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | |
| | | return new Operation[] |
| | | { |
| | | new UnbindOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new UnbindOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | null), |
| | | new UnbindOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new UnbindOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | new ArrayList<Control>()) |
| | | }; |
| | | } |
| | |
| | | InternalClientConnection.getRootConnection(); |
| | | |
| | | UnbindOperationBasis unbindOperation = |
| | | new UnbindOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), new ArrayList<Control>()); |
| | | new UnbindOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), new ArrayList<Control>()); |
| | | unbindOperation.run(); |
| | | examineCompletedOperation(unbindOperation); |
| | | |
| | |
| | | new CancelRequest(false, Message.raw("Test Unbind Cancel")); |
| | | |
| | | UnbindOperationBasis unbindOperation = |
| | | new UnbindOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), new ArrayList<Control>()); |
| | | new UnbindOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), new ArrayList<Control>()); |
| | | assertEquals(unbindOperation.cancel(cancelRequest).getResultCode(), |
| | | ResultCode.CANNOT_CANCEL); |
| | | } |
| | |
| | | new CancelRequest(false, Message.raw("Test Unbind Cancel")); |
| | | |
| | | UnbindOperationBasis unbindOperation = |
| | | new UnbindOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), new ArrayList<Control>()); |
| | | new UnbindOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), new ArrayList<Control>()); |
| | | assertNull(unbindOperation.getCancelRequest()); |
| | | |
| | | assertEquals(unbindOperation.cancel(cancelRequest).getResultCode(), |
| | |
| | | import org.opends.server.types.*; |
| | | import org.opends.server.util.StaticUtils; |
| | | import org.opends.server.util.UtilTestCase; |
| | | import org.opends.server.workflowelement.WorkflowElement; |
| | | import org.opends.server.workflowelement.localbackend.LocalBackendWorkflowElement; |
| | | import org.testng.annotations.BeforeClass; |
| | | import org.testng.annotations.Test; |
| | |
| | | import org.opends.messages.MessageBuilder; |
| | | import static org.testng.Assert.assertEquals; |
| | | import static org.testng.Assert.assertNull; |
| | | import static org.testng.Assert.assertNotNull; |
| | | |
| | | import java.util.ArrayList; |
| | | |
| | | import org.opends.server.TestCaseUtils; |
| | |
| | | import org.opends.server.protocols.internal.InternalSearchOperation; |
| | | import org.opends.admin.ads.ADSContext; |
| | | import static org.testng.Assert.*; |
| | | import static org.testng.Assert.assertEquals; |
| | | |
| | | import java.util.LinkedHashSet; |
| | | |
| | | /** |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | BindOperationBasis bindOperation = |
| | | new BindOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new BindOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | new ArrayList<Control>(), "3", DN.nullDN(), |
| | | SASL_MECHANISM_ANONYMOUS, null); |
| | | handler.processSASLBind(bindOperation); |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | BindOperationBasis bindOperation = |
| | | new BindOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new BindOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | new ArrayList<Control>(), "3", DN.nullDN(), |
| | | SASL_MECHANISM_ANONYMOUS, ByteString.empty()); |
| | | handler.processSASLBind(bindOperation); |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | BindOperationBasis bindOperation = |
| | | new BindOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new BindOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | new ArrayList<Control>(), "3", DN.nullDN(), |
| | | SASL_MECHANISM_ANONYMOUS, |
| | | ByteString.valueOf("Internal Trace String")); |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | ModifyOperationBasis modifyOperation = |
| | | new ModifyOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | new ArrayList<Control>(), |
| | | DN.decode("uid=test.user,o=test"), mods); |
| | | |
| | |
| | | |
| | | |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import org.testng.annotations.BeforeClass; |
| | |
| | | CramMD5SASLMechanismHandlerCfgDefn; |
| | | import org.opends.server.admin.std.server. |
| | | CramMD5SASLMechanismHandlerCfg; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.AddOperation; |
| | | import org.opends.server.core.BindOperation; |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | ModifyOperationBasis modifyOperation = |
| | | new ModifyOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | new ArrayList<Control>(), |
| | | DN.decode("uid=test.user,o=test"), mods); |
| | | |
| | |
| | | |
| | | cache.putEntry(testEntriesList.get(0), b, 1); |
| | | Entry testEntry = testEntriesList.get(1); |
| | | testEntry.setDN(testEntry.getDN().decode( |
| | | testEntry.getDN(); |
| | | testEntry.setDN(DN.decode( |
| | | testEntry.getDN().getRDN() + ",cn=config")); |
| | | cache.putEntry(testEntry, c, 1); |
| | | cache.clearSubtree(DN.decode("o=test")); |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | ModifyOperationBasis modifyOperation = |
| | | new ModifyOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | new ArrayList<Control>(), |
| | | DN.decode("uid=test.user,o=test"), mods); |
| | | |
| | |
| | | |
| | | |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import org.testng.annotations.AfterClass; |
| | |
| | | DigestMD5SASLMechanismHandlerCfgDefn; |
| | | import org.opends.server.admin.std.server. |
| | | DigestMD5SASLMechanismHandlerCfg; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.AddOperation; |
| | | import org.opends.server.core.BindOperation; |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | InternalSearchOperation searchOperation = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | entryDN, SearchScope.BASE_OBJECT, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, |
| | | 0, false, filter, attrList, null); |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | InternalSearchOperation searchOperation = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | entryDN, SearchScope.BASE_OBJECT, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, |
| | | 0, false, filter, attrList, null); |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | InternalSearchOperation searchOperation = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), null, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), null, |
| | | DN.decode("o=test"), |
| | | SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | InternalSearchOperation searchOperation = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), null, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), null, |
| | | DN.decode("o=test"), |
| | | SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | InternalSearchOperation searchOperation = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | entryDN, SearchScope.BASE_OBJECT, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, |
| | | 0, false, filter, attrList, null); |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | InternalSearchOperation searchOperation = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | entryDN, SearchScope.BASE_OBJECT, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, |
| | | 0, false, filter, attrList, null); |
| | |
| | | import org.opends.server.core.AddOperation; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.ModifyOperation; |
| | | import org.opends.server.protocols.asn1.ASN1Reader; |
| | | import org.opends.server.protocols.asn1.ASN1Writer; |
| | | import org.opends.server.protocols.internal.InternalClientConnection; |
| | | import org.opends.server.protocols.ldap.BindRequestProtocolOp; |
| | | import org.opends.server.protocols.ldap.BindResponseProtocolOp; |
| | |
| | | import java.io.File; |
| | | import java.io.FileWriter; |
| | | import java.util.List; |
| | | import javax.net.ssl.KeyManager; |
| | | |
| | | import org.testng.annotations.BeforeClass; |
| | | import org.testng.annotations.DataProvider; |
| | | import org.testng.annotations.Test; |
| | |
| | | import org.opends.server.admin.server.AdminTestCaseUtils; |
| | | import org.opends.server.admin.std.meta.FileBasedKeyManagerProviderCfgDefn; |
| | | import org.opends.server.admin.std.server.FileBasedKeyManagerProviderCfg; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.testng.Assert.*; |
| | | |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | |
| | | |
| | |
| | | import java.io.File; |
| | | import java.io.FileWriter; |
| | | import java.util.List; |
| | | import javax.net.ssl.TrustManager; |
| | | |
| | | import org.testng.annotations.BeforeClass; |
| | | import org.testng.annotations.DataProvider; |
| | | import org.testng.annotations.Test; |
| | |
| | | import org.opends.server.admin.server.AdminTestCaseUtils; |
| | | import org.opends.server.admin.std.meta.FileBasedTrustManagerProviderCfgDefn; |
| | | import org.opends.server.admin.std.server.FileBasedTrustManagerProviderCfg; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.testng.Assert.*; |
| | | |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | |
| | | |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | InternalSearchOperation searchOperation = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | entryDN, SearchScope.BASE_OBJECT, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, |
| | | 0, false, filter, attrList, null); |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | InternalSearchOperation searchOperation = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | entryDN, SearchScope.BASE_OBJECT, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, |
| | | 0, false, filter, attrList, null); |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | ModifyOperationBasis op = |
| | | new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), new ArrayList<Control>(), |
| | | new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), new ArrayList<Control>(), |
| | | DN.decode("cn=uid=test.user,o=test"), mods); |
| | | |
| | | MessageBuilder invalidReason = new MessageBuilder(); |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | ModifyOperationBasis op = |
| | | new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), new ArrayList<Control>(), |
| | | new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), new ArrayList<Control>(), |
| | | DN.decode("cn=uid=test.user,o=test"), mods); |
| | | |
| | | MessageBuilder invalidReason = new MessageBuilder(); |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | ModifyOperationBasis op = |
| | | new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), new ArrayList<Control>(), |
| | | new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), new ArrayList<Control>(), |
| | | DN.decode("cn=uid=test.user,o=test"), mods); |
| | | |
| | | MessageBuilder invalidReason = new MessageBuilder(); |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | ModifyOperationBasis op = |
| | | new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), new ArrayList<Control>(), |
| | | new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), new ArrayList<Control>(), |
| | | DN.decode("cn=uid=test.user,o=test"), mods); |
| | | |
| | | MessageBuilder invalidReason = new MessageBuilder(); |
| | |
| | | import static org.testng.Assert.assertNotNull; |
| | | |
| | | import org.opends.server.TestCaseUtils; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.testng.annotations.BeforeClass; |
| | | import org.testng.annotations.Test; |
| | | |
| | |
| | | |
| | | |
| | | |
| | | import java.security.cert.X509Certificate; |
| | | |
| | | import org.testng.annotations.BeforeClass; |
| | | import org.testng.annotations.Test; |
| | | |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | InternalSearchOperation searchOperation = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | entryDN, SearchScope.BASE_OBJECT, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, |
| | | 0, false, filter, attrList, null); |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | InternalSearchOperation searchOperation = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | entryDN, SearchScope.BASE_OBJECT, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, |
| | | 0, false, filter, attrList, null); |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | ModifyOperationBasis modifyOperation = |
| | | new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), |
| | | new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), |
| | | new ArrayList<Control>(), |
| | | DN.decode("uid=test.user,o=test"), mods); |
| | | |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | ModifyOperationBasis modifyOperation = |
| | | new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), |
| | | new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), |
| | | new ArrayList<Control>(), |
| | | DN.decode("uid=test.user,o=test"), mods); |
| | | |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | ModifyOperationBasis modifyOperation = |
| | | new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), |
| | | new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), |
| | | new ArrayList<Control>(), |
| | | DN.decode("uid=test.user,o=test"), mods); |
| | | |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | ModifyOperationBasis modifyOperation = |
| | | new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), |
| | | new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), |
| | | new ArrayList<Control>(), |
| | | DN.decode("uid=test.user,o=test"), mods); |
| | | |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | ModifyOperationBasis modifyOperation = |
| | | new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), |
| | | new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), |
| | | new ArrayList<Control>(), |
| | | DN.decode("uid=test.user,o=test"), mods); |
| | | |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | ModifyOperationBasis modifyOperation = |
| | | new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), |
| | | new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), |
| | | new ArrayList<Control>(), |
| | | DN.decode("uid=test.user,o=test"), mods); |
| | | |
| | |
| | | |
| | | scheme.initializePasswordStorageScheme(configuration); |
| | | |
| | | String passwordString = scheme.encodeOffline(plaintext.toByteArray()); |
| | | String passwordString = SaltedSHA1PasswordStorageScheme.encodeOffline(plaintext.toByteArray()); |
| | | String[] pwComps = UserPasswordSyntax.decodeUserPassword(passwordString); |
| | | ByteString encodedPassword = ByteString.valueOf(pwComps[1]); |
| | | |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | ModifyOperationBasis op = |
| | | new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), new ArrayList<Control>(), |
| | | new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), new ArrayList<Control>(), |
| | | DN.decode("cn=uid=test.user,o=test"), mods); |
| | | |
| | | MessageBuilder invalidReason = new MessageBuilder(); |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | ModifyOperationBasis op = |
| | | new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), new ArrayList<Control>(), |
| | | new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), new ArrayList<Control>(), |
| | | DN.decode("cn=uid=test.user,o=test"), mods); |
| | | |
| | | MessageBuilder invalidReason = new MessageBuilder(); |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | InternalSearchOperation searchOperation = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(),requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(),requestControls, |
| | | DN.decode("o=test"), |
| | | SearchScope.BASE_OBJECT, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | InternalSearchOperation searchOperation = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), requestControls, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), requestControls, |
| | | DN.decode("o=test"), |
| | | SearchScope.BASE_OBJECT, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | ModifyOperationBasis modifyOperation = |
| | | new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), |
| | | new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), |
| | | new ArrayList<Control>(), |
| | | DN.decode("uid=test.user,o=test"), mods); |
| | | |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | ModifyOperationBasis modifyOperation = |
| | | new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), |
| | | new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), |
| | | new ArrayList<Control>(), |
| | | DN.decode("uid=test.user,o=test"), mods); |
| | | |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | ModifyOperationBasis modifyOperation = |
| | | new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), |
| | | new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), |
| | | new ArrayList<Control>(), |
| | | DN.decode("uid=test.user,o=test"), mods); |
| | | |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | ModifyOperationBasis modifyOperation = |
| | | new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), |
| | | new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), |
| | | new ArrayList<Control>(), |
| | | DN.decode("uid=test.user,o=test"), mods); |
| | | |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | ModifyOperationBasis modifyOperation = |
| | | new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), |
| | | new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), |
| | | new ArrayList<Control>(), |
| | | DN.decode("uid=test.user,o=test"), mods); |
| | | |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | ModifyOperationBasis modifyOperation = |
| | | new ModifyOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), |
| | | new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), |
| | | new ArrayList<Control>(), |
| | | DN.decode("uid=test.user,o=test"), mods); |
| | | |
| | |
| | | |
| | | |
| | | import java.util.Collections; |
| | | import java.util.LinkedHashSet; |
| | | import java.util.LinkedList; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | InternalSearchOperation searchOperation = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), null, DN.decode("o=test"), |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), null, DN.decode("o=test"), |
| | | SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString( |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | InternalSearchOperation searchOperation = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), null, DN.decode("o=test"), |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), null, DN.decode("o=test"), |
| | | SearchScope.WHOLE_SUBTREE, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString( |
| | |
| | | import org.opends.server.TestCaseUtils; |
| | | import org.opends.server.controls.ProxiedAuthV2Control; |
| | | import org.opends.server.core.AddOperation; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.ExtendedOperation; |
| | | import org.opends.server.protocols.internal.InternalClientConnection; |
| | | import org.opends.server.protocols.ldap.ExtendedRequestProtocolOp; |
| | | import org.opends.server.protocols.ldap.ExtendedResponseProtocolOp; |
| | | import org.opends.server.protocols.ldap.LDAPControl; |
| | | import org.opends.server.protocols.ldap.LDAPMessage; |
| | | import org.opends.server.protocols.ldap.LDAPResultCode; |
| | | import org.opends.server.protocols.ldap.UnbindRequestProtocolOp; |
| | |
| | | import org.testng.annotations.AfterClass; |
| | | |
| | | import org.opends.server.TestCaseUtils; |
| | | import org.opends.server.DirectoryServerTestCase; |
| | | import org.opends.server.api.MonitorProvider; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.core.DirectoryServer; |
| | |
| | | import org.opends.server.admin.std.server.PluginCfg; |
| | | import org.opends.server.api.plugin.*; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.protocols.ldap.LDAPControl; |
| | | import org.opends.server.protocols.asn1.ASN1Reader; |
| | | import org.opends.server.protocols.asn1.ASN1; |
| | | import org.opends.server.protocols.asn1.ASN1Writer; |
| | | import static org.opends.server.protocols.asn1.ASN1Constants.UNIVERSAL_OCTET_STRING_TYPE; |
| | | import org.opends.server.types.*; |
| | | import org.opends.server.types.operation.*; |
| | | import org.opends.server.controls.ControlDecoder; |
| | |
| | | @Test(dataProvider = "internalConns") |
| | | public void testNextOperationID(InternalClientConnection conn) |
| | | { |
| | | long opID1 = conn.nextOperationID(); |
| | | long opID2 = conn.nextOperationID(); |
| | | long opID1 = InternalClientConnection.nextOperationID(); |
| | | long opID2 = InternalClientConnection.nextOperationID(); |
| | | assertEquals(opID2, (opID1 + 1)); |
| | | } |
| | | |
| | |
| | | @Test(dataProvider = "internalConns") |
| | | public void testNextMessageID(InternalClientConnection conn) |
| | | { |
| | | int msgID1 = conn.nextMessageID(); |
| | | int msgID2 = conn.nextMessageID(); |
| | | int msgID1 = InternalClientConnection.nextMessageID(); |
| | | int msgID2 = InternalClientConnection.nextMessageID(); |
| | | assertEquals(msgID2, (msgID1 + 1)); |
| | | } |
| | | |
| | |
| | | { |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), new ArrayList<Control>(), |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), new ArrayList<Control>(), |
| | | ByteString.empty(), SearchScope.BASE_OBJECT, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, |
| | | false, LDAPFilter.decode("(objectClass=*)"), |
| | |
| | | { |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), new ArrayList<Control>(), |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), new ArrayList<Control>(), |
| | | ByteString.empty(), SearchScope.BASE_OBJECT, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, |
| | | false, LDAPFilter.decode("(objectClass=*)"), |
| | |
| | | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), new ArrayList<Control>(), |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), new ArrayList<Control>(), |
| | | DN.nullDN(), SearchScope.BASE_OBJECT, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, |
| | | false, searchFilter, |
| | |
| | | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), new ArrayList<Control>(), |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), new ArrayList<Control>(), |
| | | DN.nullDN(), SearchScope.BASE_OBJECT, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, |
| | | false, searchFilter, |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | InternalSearchOperation searchOperation = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), |
| | | new ArrayList<Control>(), |
| | | ByteString.empty(), |
| | | SearchScope.BASE_OBJECT, |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | InternalSearchOperation searchOperation = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), |
| | | new ArrayList<Control>(), |
| | | ByteString.empty(), |
| | | SearchScope.BASE_OBJECT, |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | InternalSearchOperation searchOperation = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), |
| | | new ArrayList<Control>(), |
| | | ByteString.empty(), |
| | | SearchScope.BASE_OBJECT, |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | InternalSearchOperation searchOperation = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), |
| | | new ArrayList<Control>(), |
| | | ByteString.empty(), |
| | | SearchScope.BASE_OBJECT, |
| | |
| | | "ds-cfg-enabled", "true"))); |
| | | ModifyOperationBasis op = new ModifyOperationBasis( |
| | | conn, |
| | | conn.nextOperationID(), |
| | | conn.nextMessageID(), |
| | | InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), |
| | | new ArrayList<Control>(), |
| | | DN |
| | | .decode("cn=JMX Connection Handler,cn=Connection Handlers,cn=config"), |
| | |
| | | import org.opends.server.TestCaseUtils; |
| | | import org.opends.server.api.Backend; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.protocols.asn1.ASN1Reader; |
| | | import org.opends.server.protocols.asn1.ASN1Writer; |
| | | import org.opends.server.protocols.internal.InternalClientConnection; |
| | | import org.opends.server.protocols.internal.InternalSearchOperation; |
| | | import org.opends.server.tools.*; |
| | |
| | | |
| | | import java.net.InetSocketAddress; |
| | | import java.net.ServerSocket; |
| | | import java.util.ArrayList; |
| | | import java.util.LinkedList; |
| | | import java.util.ListIterator; |
| | | |
| | |
| | | package org.opends.server.protocols.ldap; |
| | | |
| | | import static org.testng.Assert.*; |
| | | import static org.testng.Assert.assertEquals; |
| | | |
| | | import org.testng.annotations.*; |
| | | import org.opends.server.protocols.asn1.*; |
| | | import org.opends.server.types.*; |
| | |
| | | import org.opends.server.protocols.asn1.ASN1Reader; |
| | | |
| | | import static org.testng.Assert.assertEquals; |
| | | import static org.testng.Assert.assertSame; |
| | | |
| | | import java.util.ArrayList; |
| | | |
| | | public class TestLDAPFilter extends LdapTestCase |
| | |
| | | import org.testng.annotations.Test; |
| | | import static org.testng.Assert.*; |
| | | |
| | | import java.util.ArrayList; |
| | | |
| | | /** |
| | | * This class defines a set of tests for the |
| | | * org.opends.server.protocol.ldap.ModifyDNRequestProtocolOp class. |
| | |
| | | |
| | | import java.util.LinkedHashSet; |
| | | import java.util.Arrays; |
| | | import java.util.ArrayList; |
| | | |
| | | /** |
| | | * Test class for LDAP Search protocol operation classes. |
| | |
| | | import org.testng.annotations.BeforeClass; |
| | | import org.testng.annotations.DataProvider; |
| | | |
| | | import java.util.ArrayList; |
| | | |
| | | public class TestSearchResultEntryProtocolOp extends LdapTestCase |
| | | { |
| | | @BeforeClass |
| | |
| | | import java.util.TreeSet; |
| | | |
| | | import org.opends.server.TestCaseUtils; |
| | | import org.opends.server.api.SynchronizationProvider; |
| | | import org.opends.server.backends.MemoryBackend; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.replication.service.ReplicationBroker; |
| | |
| | | // When problem found, we have to re-enable this test. |
| | | if (false) |
| | | { |
| | | |
| | | // ACI step |
| | | debugInfo(tn, "Starting ACI step"); |
| | | s = new Socket("127.0.0.1", TestCaseUtils.getServerLdapPort()); |
| | |
| | | import org.opends.server.types.SearchResultEntry; |
| | | import org.opends.server.types.SearchScope; |
| | | import org.opends.server.util.StaticUtils; |
| | | import org.opends.server.util.TimeThread; |
| | | import org.testng.annotations.BeforeClass; |
| | | import org.testng.annotations.Test; |
| | | |
| | |
| | | import org.opends.server.admin.std.server.ExternalChangelogDomainCfg; |
| | | import org.opends.server.admin.std.server.ReplicationDomainCfg; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.DirectoryException; |
| | | |
| | |
| | | import org.opends.server.replication.common.ChangeNumber; |
| | | import org.opends.server.replication.protocol.AddMsg; |
| | | import org.opends.server.replication.protocol.ModifyMsg; |
| | | import org.opends.server.schema.DirectoryStringSyntax; |
| | | import org.opends.server.TestCaseUtils; |
| | | import org.opends.server.protocols.internal.InternalClientConnection; |
| | | import org.opends.server.protocols.internal.InternalSearchOperation; |
| | |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.SearchResultEntry; |
| | | import org.opends.server.types.SearchScope; |
| | | import org.opends.server.types.operation.PluginOperation; |
| | | import org.opends.server.backends.task.TaskBackend; |
| | | import org.opends.server.backends.task.TaskState; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.testng.annotations.Test; |
| | | import org.testng.annotations.BeforeClass; |
| | |
| | | import static org.testng.Assert.assertEquals; |
| | | import static org.testng.Assert.assertTrue; |
| | | import static org.testng.Assert.fail; |
| | | import static org.opends.messages.ReplicationMessages.ERR_NO_MATCHING_DOMAIN; |
| | | import static org.opends.server.TestCaseUtils.*; |
| | | import static org.opends.server.config.ConfigConstants.ATTR_TASK_CONFLICTS_HIST_PURGE_COUNT; |
| | | import static org.opends.server.config.ConfigConstants.ATTR_TASK_CONFLICTS_HIST_PURGE_COMPLETED_IN_TIME; |
| | | |
| | | import java.net.ServerSocket; |
| | | import java.util.LinkedList; |
| | | import java.util.List; |
| | |
| | | import static org.testng.Assert.assertTrue; |
| | | |
| | | import org.opends.server.TestCaseUtils; |
| | | import org.opends.server.api.SynchronizationProvider; |
| | | import org.opends.server.core.AddOperationBasis; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.protocols.internal.InternalClientConnection; |
| | | import org.opends.server.replication.common.ServerState; |
| | | |
| | |
| | | import java.util.TreeSet; |
| | | import java.util.concurrent.atomic.AtomicBoolean; |
| | | |
| | | import javax.swing.text.html.HTMLDocument.HTMLReader.IsindexAction; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.ErrorLogger.logError; |
| | | import static org.opends.server.loggers.debug.DebugLogger.getTracer; |
| | |
| | | import org.opends.messages.Severity; |
| | | import org.opends.server.TestCaseUtils; |
| | | import org.opends.server.admin.server.ConfigurationChangeListener; |
| | | import org.opends.server.admin.std.server.ReplicationSynchronizationProviderCfg; |
| | | import org.opends.server.admin.std.server.SynchronizationProviderCfg; |
| | | import org.opends.server.api.SynchronizationProvider; |
| | | import org.opends.server.core.DirectoryServer; |
| | |
| | | import org.opends.server.TestCaseUtils; |
| | | import org.opends.server.backends.SchemaTestMatchingRule; |
| | | import org.opends.server.backends.task.Task; |
| | | import org.opends.server.backends.task.TaskBackend; |
| | | import org.opends.server.backends.task.TaskState; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.SchemaConfigManager; |
| | | import org.opends.server.tools.LDAPModify; |
| | | import org.opends.server.types.DN; |
| | | |
| | | import static org.testng.Assert.*; |
| | |
| | | |
| | | import org.opends.server.TestCaseUtils; |
| | | import org.opends.server.backends.task.Task; |
| | | import org.opends.server.backends.task.TaskBackend; |
| | | import org.opends.server.backends.task.TaskState; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.extensions.GetConnectionIDExtendedOperation; |
| | | import org.opends.server.protocols.ldap.LDAPResultCode; |
| | | import org.opends.server.tools.LDAPModify; |
| | | import org.opends.server.tools.dsconfig.DSConfig; |
| | | import org.opends.server.types.DN; |
| | | |
| | | import static org.testng.Assert.*; |
| | | |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | import org.opends.server.TestCaseUtils; |
| | | import org.opends.messages.Message; |
| | | import org.opends.server.backends.task.Task; |
| | | import org.opends.server.backends.task.TaskBackend; |
| | | import org.opends.server.backends.task.TaskState; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.extensions.GetConnectionIDExtendedOperation; |
| | | import org.opends.server.protocols.asn1.*; |
| | | import org.opends.server.protocols.ldap.*; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.ByteString; |
| | |
| | | import org.testng.annotations.BeforeClass; |
| | | |
| | | import org.opends.server.TestCaseUtils; |
| | | import org.opends.server.backends.SchemaTestMatchingRule; |
| | | import org.opends.server.backends.task.Task; |
| | | import org.opends.server.backends.task.TaskBackend; |
| | | import org.opends.server.backends.task.TaskState; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.tools.LDAPSearch; |
| | |
| | | import org.testng.annotations.AfterClass; |
| | | import org.testng.annotations.DataProvider; |
| | | import org.testng.annotations.Test; |
| | | import static org.testng.Assert.assertEquals; |
| | | import org.opends.server.TestCaseUtils; |
| | | import org.opends.server.api.TestTaskListener; |
| | | import org.opends.server.backends.task.TaskState; |
| | | import org.opends.server.backends.jeb.JebTestCase; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ObjectClass; |
| | | |
| | | import java.util.UUID; |
| | | |
| | | public class TestRebuildTask extends TasksTestCase |
| | |
| | | |
| | | import org.opends.server.TestCaseUtils; |
| | | import org.opends.messages.Message; |
| | | import org.opends.server.admin.std.server.DigestMD5SASLMechanismHandlerCfg; |
| | | import org.opends.server.api.SASLMechanismHandler; |
| | | import org.opends.server.controls.PasswordPolicyRequestControl; |
| | | import org.opends.server.core.AddOperation; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.extensions.AnonymousSASLMechanismHandler; |
| | | import org.opends.server.protocols.internal.InternalClientConnection; |
| | | import org.opends.server.protocols.ldap.LDAPControl; |
| | | import org.opends.server.types.*; |
| | | |
| | | import static org.testng.Assert.*; |
| | |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.protocols.internal.InternalClientConnection; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.OperatingSystem; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.util.Base64; |
| | | import org.opends.server.tools.dsconfig.DSConfig; |
| | | import static org.testng.Assert.*; |
| | | |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | import org.opends.server.protocols.internal.InternalClientConnection; |
| | | import org.opends.server.protocols.ldap.LDAPResultCode; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.OperatingSystem; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.util.Base64; |
| | | |
| | | import static org.testng.Assert.*; |
| | | |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | import org.testng.annotations.Test; |
| | | |
| | | import org.opends.server.TestCaseUtils; |
| | | import org.opends.server.core.AddOperation; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.protocols.internal.InternalClientConnection; |
| | | import org.opends.server.protocols.ldap.LDAPResultCode; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.testng.Assert.*; |
| | | |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | |
| | | import org.opends.server.TestCaseUtils; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.util.Base64; |
| | | |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | import static org.testng.Assert.*; |
| | | |
| | | |
| | |
| | | File newTargetFile = File.createTempFile("difftest", "newtarget.ldif"); |
| | | newTargetFile.deleteOnExit(); |
| | | |
| | | DirectoryServer.getInstance(); |
| | | args = new String[] |
| | | { |
| | | "-c", DirectoryServer.getInstance().getConfigFile(), |
| | | "-c", DirectoryServer.getConfigFile(), |
| | | "-s", sourceFile, |
| | | "-m", diffOutputFile.getAbsolutePath(), |
| | | "-t", newTargetFile.getAbsolutePath() |
| | |
| | | File newTargetFile = File.createTempFile("difftest", "newtarget.ldif"); |
| | | newTargetFile.deleteOnExit(); |
| | | |
| | | DirectoryServer.getInstance(); |
| | | args = new String[] |
| | | { |
| | | "-c", DirectoryServer.getInstance().getConfigFile(), |
| | | "-c", DirectoryServer.getConfigFile(), |
| | | "-s", sourceFile, |
| | | "-m", diffOutputFile.getAbsolutePath(), |
| | | "-t", newTargetFile.getAbsolutePath() |
| | |
| | | import org.testng.annotations.AfterClass; |
| | | import static org.testng.Assert.assertNotNull; |
| | | import static org.testng.Assert.assertNull; |
| | | import static org.testng.Assert.assertFalse; |
| | | import static org.testng.Assert.assertEquals; |
| | | import org.opends.server.TestCaseUtils; |
| | | import org.opends.server.types.LDIFImportConfig; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.util.LDIFReader; |
| | | import java.io.*; |
| | | import java.util.Map; |
| | | import java.util.HashMap; |
| | | |
| | | |
| | | /** |
| | |
| | | |
| | | |
| | | import java.io.File; |
| | | import java.io.FileWriter; |
| | | import java.util.ArrayList; |
| | | |
| | | import org.testng.annotations.BeforeClass; |
| | |
| | | import org.testng.annotations.Test; |
| | | |
| | | import org.opends.server.TestCaseUtils; |
| | | import org.opends.server.core.AddOperation; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.protocols.internal.InternalClientConnection; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.OperatingSystem; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.util.Base64; |
| | | |
| | | import static org.testng.Assert.*; |
| | | |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | |
| | | |
| | | |
| | | import java.io.File; |
| | | import java.io.FileWriter; |
| | | |
| | | import org.testng.annotations.AfterClass; |
| | | import org.testng.annotations.BeforeClass; |
| | | import org.testng.annotations.Test; |
| | | |
| | | import org.opends.server.TestCaseUtils; |
| | | import org.opends.server.DirectoryServerTestCase; |
| | | import org.opends.server.core.DirectoryServer; |
| | | |
| | | import static org.testng.Assert.*; |
| | | |
| | | import static org.opends.server.admin.client.cli.DsFrameworkCliReturnCode.*; |
| | |
| | | import org.testng.annotations.Test; |
| | | import org.testng.Assert; |
| | | |
| | | import java.util.Arrays; |
| | | import java.io.ByteArrayOutputStream; |
| | | |
| | | /** |
| | | * This class defines a set of tests for the |
| | | * org.opends.server.types.ByteString class. |
| | |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | | import org.testng.annotations.DataProvider; |
| | | import org.testng.annotations.Test; |
| | | |
| | | import org.opends.server.TestCaseUtils; |
| | | |
| | | import static org.testng.Assert.*; |
| | | |
| | | |
| | |
| | | import org.testng.annotations.DataProvider; |
| | | import org.testng.annotations.Test; |
| | | |
| | | import org.opends.server.TestCaseUtils; |
| | | import org.opends.messages.Message; |
| | | |
| | | import static org.testng.Assert.*; |
| | |
| | | |
| | | import org.testng.annotations.Test; |
| | | |
| | | import org.opends.server.TestCaseUtils; |
| | | import org.opends.messages.Message; |
| | | |
| | | import static org.testng.Assert.*; |
| | |
| | | // Try to add the entry. If this fails with the proxy control, then add it |
| | | // with a root connection so we can do other things with it. |
| | | AddOperationBasis addOperation = |
| | | new AddOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new AddOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | controls, e.getDN(), e.getObjectClasses(), |
| | | e.getUserAttributes(), e.getOperationalAttributes()); |
| | | addOperation.run(); |
| | |
| | | Attributes.create("description", "foo"))); |
| | | |
| | | ModifyOperationBasis modifyOperation = |
| | | new ModifyOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | controls, e.getDN(), mods); |
| | | modifyOperation.run(); |
| | | |
| | |
| | | |
| | | // Try to rename the entry. |
| | | ModifyDNOperationBasis modifyDNOperation = |
| | | new ModifyDNOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), controls, e.getDN(), |
| | | new ModifyDNOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), controls, e.getDN(), |
| | | RDN.decode("cn=Proxy V1 Test"), true, null); |
| | | modifyDNOperation.run(); |
| | | |
| | |
| | | // Try to delete the operation. If this fails, then delete it with a root |
| | | // connection so it gets cleaned up. |
| | | DeleteOperationBasis deleteOperation = |
| | | new DeleteOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new DeleteOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | controls, newEntryDN); |
| | | deleteOperation.run(); |
| | | |
| | |
| | | |
| | | // Test a compare operation against the PWReset Target user. |
| | | CompareOperationBasis compareOperation = |
| | | new CompareOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), controls, targetDN, |
| | | new CompareOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), controls, targetDN, |
| | | DirectoryServer.getAttributeType("cn", true), |
| | | ByteString.valueOf("PWReset Target")); |
| | | compareOperation.run(); |
| | |
| | | |
| | | // Test a search operation against the PWReset Target user. |
| | | InternalSearchOperation searchOperation = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), controls, targetDN, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), controls, targetDN, |
| | | SearchScope.BASE_OBJECT, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=*)"), null, |
| | |
| | | // with a root connection so we can do other things with it. |
| | | DN authDN = conn.getAuthenticationInfo().getAuthenticationDN(); |
| | | AddOperationBasis addOperation = |
| | | new AddOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new AddOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | controls, e.getDN(), e.getObjectClasses(), |
| | | e.getUserAttributes(), e.getOperationalAttributes()); |
| | | addOperation.run(); |
| | |
| | | Attributes.create("description", "foo"))); |
| | | |
| | | ModifyOperationBasis modifyOperation = |
| | | new ModifyOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new ModifyOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | controls, e.getDN(), mods); |
| | | modifyOperation.run(); |
| | | |
| | |
| | | |
| | | // Try to rename the entry. |
| | | ModifyDNOperationBasis modifyDNOperation = |
| | | new ModifyDNOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), controls, e.getDN(), |
| | | new ModifyDNOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), controls, e.getDN(), |
| | | RDN.decode("cn=Proxy V2 Test"), true, null); |
| | | modifyDNOperation.run(); |
| | | |
| | |
| | | // Try to delete the operation. If this fails, then delete it with a root |
| | | // connection so it gets cleaned up. |
| | | DeleteOperationBasis deleteOperation = |
| | | new DeleteOperationBasis(conn, conn.nextOperationID(), conn.nextMessageID(), |
| | | new DeleteOperationBasis(conn, InternalClientConnection.nextOperationID(), InternalClientConnection.nextMessageID(), |
| | | controls, newEntryDN); |
| | | deleteOperation.run(); |
| | | |
| | |
| | | |
| | | // Test a compare operation against the PWReset Target user. |
| | | CompareOperationBasis compareOperation = |
| | | new CompareOperationBasis(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), controls, targetDN, |
| | | new CompareOperationBasis(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), controls, targetDN, |
| | | DirectoryServer.getAttributeType("cn", true), |
| | | ByteString.valueOf("PWReset Target")); |
| | | compareOperation.run(); |
| | |
| | | |
| | | // Test a search operation against the PWReset Target user. |
| | | InternalSearchOperation searchOperation = |
| | | new InternalSearchOperation(conn, conn.nextOperationID(), |
| | | conn.nextMessageID(), controls, targetDN, |
| | | new InternalSearchOperation(conn, InternalClientConnection.nextOperationID(), |
| | | InternalClientConnection.nextMessageID(), controls, targetDN, |
| | | SearchScope.BASE_OBJECT, |
| | | DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false, |
| | | SearchFilter.createFilterFromString("(objectClass=*)"), null, |