Moved the LDAP-specific transaction support classes from ldap.transaction.core to ldap.transaction.
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.ldap.transaction.core;
|
||||
package org.springframework.ldap.transaction;
|
||||
|
||||
import javax.naming.Name;
|
||||
import javax.naming.directory.Attributes;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.ldap.transaction.core;
|
||||
package org.springframework.ldap.transaction;
|
||||
|
||||
import javax.naming.Name;
|
||||
import javax.naming.directory.Attributes;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.ldap.transaction.core;
|
||||
package org.springframework.ldap.transaction;
|
||||
|
||||
import javax.naming.directory.DirContext;
|
||||
|
||||
@@ -13,10 +13,12 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.ldap.transaction.core;
|
||||
package org.springframework.ldap.transaction;
|
||||
|
||||
import javax.naming.directory.DirContext;
|
||||
|
||||
import org.springframework.ldap.transaction.core.TransactionAwareContextSourceProxy;
|
||||
|
||||
/**
|
||||
* Helper interface to be able to get hold of the target DirContext from proxies
|
||||
* created by {@link TransactionAwareContextSourceProxy}.
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.ldap.transaction.core;
|
||||
package org.springframework.ldap.transaction;
|
||||
|
||||
import java.lang.reflect.InvocationHandler;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.ldap.transaction.core;
|
||||
package org.springframework.ldap.transaction;
|
||||
|
||||
import javax.naming.Name;
|
||||
import javax.naming.directory.ModificationItem;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.ldap.transaction.core;
|
||||
package org.springframework.ldap.transaction;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.ldap.transaction.core;
|
||||
package org.springframework.ldap.transaction;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.ldap.transaction.core;
|
||||
package org.springframework.ldap.transaction;
|
||||
|
||||
import org.springframework.transaction.compensating.CompensatingTransactionOperationExecutor;
|
||||
import org.springframework.transaction.compensating.CompensatingTransactionOperationManager;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.ldap.transaction.core;
|
||||
package org.springframework.ldap.transaction;
|
||||
|
||||
import javax.naming.Name;
|
||||
import javax.naming.directory.Attributes;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.ldap.transaction.core;
|
||||
package org.springframework.ldap.transaction;
|
||||
|
||||
import javax.naming.Name;
|
||||
import javax.naming.directory.Attributes;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.ldap.transaction.core;
|
||||
package org.springframework.ldap.transaction;
|
||||
|
||||
import javax.naming.Name;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.ldap.transaction.core;
|
||||
package org.springframework.ldap.transaction;
|
||||
|
||||
import javax.naming.Name;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.ldap.transaction.core;
|
||||
package org.springframework.ldap.transaction;
|
||||
|
||||
import javax.naming.Name;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.ldap.transaction.core;
|
||||
package org.springframework.ldap.transaction;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.ldap.transaction.core;
|
||||
package org.springframework.ldap.transaction;
|
||||
|
||||
import javax.naming.Name;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.ldap.transaction.core;
|
||||
package org.springframework.ldap.transaction;
|
||||
|
||||
import javax.naming.Name;
|
||||
|
||||
@@ -17,6 +17,7 @@ package org.springframework.ldap.transaction.core;
|
||||
|
||||
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
|
||||
import org.springframework.ldap.core.ContextSource;
|
||||
import org.springframework.ldap.transaction.TempEntryRenamingStrategy;
|
||||
import org.springframework.transaction.TransactionDefinition;
|
||||
import org.springframework.transaction.TransactionException;
|
||||
import org.springframework.transaction.TransactionSuspensionNotSupportedException;
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
package org.springframework.ldap.transaction.core;
|
||||
|
||||
import org.springframework.ldap.core.ContextSource;
|
||||
import org.springframework.ldap.transaction.TempEntryRenamingStrategy;
|
||||
import org.springframework.ldap.transaction.UnbindOperationExecutor;
|
||||
import org.springframework.transaction.TransactionDefinition;
|
||||
import org.springframework.transaction.TransactionException;
|
||||
import org.springframework.transaction.compensating.CompensatingTransactionOperationExecutor;
|
||||
|
||||
@@ -21,6 +21,8 @@ import javax.naming.directory.DirContext;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.ldap.core.ContextSource;
|
||||
import org.springframework.ldap.transaction.DirContextHolder;
|
||||
import org.springframework.ldap.transaction.TempEntryRenamingStrategy;
|
||||
import org.springframework.transaction.TransactionDefinition;
|
||||
import org.springframework.transaction.TransactionException;
|
||||
import org.springframework.transaction.support.DefaultTransactionStatus;
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
*/
|
||||
package org.springframework.ldap.transaction.core;
|
||||
|
||||
import org.springframework.ldap.transaction.DirContextHolder;
|
||||
|
||||
/**
|
||||
* Transaction object for ContextSourceTransactionManager. Keeps a reference to
|
||||
* the {@link DirContextHolder} associated with the current transaction.
|
||||
|
||||
@@ -22,6 +22,7 @@ import javax.naming.Name;
|
||||
import org.springframework.ldap.core.DistinguishedName;
|
||||
import org.springframework.ldap.core.LdapRdn;
|
||||
import org.springframework.ldap.core.LdapRdnComponent;
|
||||
import org.springframework.ldap.transaction.TempEntryRenamingStrategy;
|
||||
|
||||
/**
|
||||
* Default implementation of {@link TempEntryRenamingStrategy}. This
|
||||
|
||||
@@ -22,6 +22,7 @@ import javax.naming.Name;
|
||||
import org.springframework.ldap.core.DistinguishedName;
|
||||
import org.springframework.ldap.core.LdapRdn;
|
||||
import org.springframework.ldap.core.LdapRdnComponent;
|
||||
import org.springframework.ldap.transaction.TempEntryRenamingStrategy;
|
||||
|
||||
/**
|
||||
* A {@link TempEntryRenamingStrategy} that moves the entry to a different
|
||||
|
||||
@@ -21,6 +21,9 @@ import javax.naming.directory.DirContext;
|
||||
|
||||
import org.springframework.ldap.NamingException;
|
||||
import org.springframework.ldap.core.ContextSource;
|
||||
import org.springframework.ldap.transaction.DirContextHolder;
|
||||
import org.springframework.ldap.transaction.DirContextProxy;
|
||||
import org.springframework.ldap.transaction.TransactionUtils;
|
||||
import org.springframework.transaction.support.TransactionSynchronizationManager;
|
||||
|
||||
/**
|
||||
|
||||
@@ -22,6 +22,8 @@ import java.lang.reflect.Method;
|
||||
import javax.naming.directory.DirContext;
|
||||
|
||||
import org.springframework.ldap.core.ContextSource;
|
||||
import org.springframework.ldap.transaction.DirContextHolder;
|
||||
import org.springframework.ldap.transaction.TransactionUtils;
|
||||
|
||||
/**
|
||||
* Proxy implementation for DirContext, making sure that the instance is not
|
||||
|
||||
@@ -9,8 +9,8 @@ import junit.framework.TestCase;
|
||||
|
||||
import org.easymock.MockControl;
|
||||
import org.springframework.ldap.core.ContextSource;
|
||||
import org.springframework.ldap.transaction.core.DirContextHolder;
|
||||
import org.springframework.ldap.transaction.core.TransactionUtils;
|
||||
import org.springframework.ldap.transaction.DirContextHolder;
|
||||
import org.springframework.ldap.transaction.TransactionUtils;
|
||||
import org.springframework.transaction.compensating.CompensatingTransactionOperationManager;
|
||||
import org.springframework.transaction.support.TransactionSynchronizationManager;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.ldap.transaction.core;
|
||||
package org.springframework.ldap.transaction;
|
||||
|
||||
import javax.naming.directory.BasicAttributes;
|
||||
|
||||
@@ -7,7 +7,7 @@ import junit.framework.TestCase;
|
||||
import org.easymock.MockControl;
|
||||
import org.springframework.ldap.core.DistinguishedName;
|
||||
import org.springframework.ldap.core.LdapOperations;
|
||||
import org.springframework.ldap.transaction.core.BindOperationExecutor;
|
||||
import org.springframework.ldap.transaction.BindOperationExecutor;
|
||||
|
||||
public class BindOperationExecutorTest extends TestCase {
|
||||
private MockControl ldapOperationsControl;
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.ldap.transaction.core;
|
||||
package org.springframework.ldap.transaction;
|
||||
|
||||
import javax.naming.directory.BasicAttributes;
|
||||
|
||||
@@ -7,8 +7,8 @@ import junit.framework.TestCase;
|
||||
import org.easymock.MockControl;
|
||||
import org.springframework.ldap.core.DistinguishedName;
|
||||
import org.springframework.ldap.core.LdapOperations;
|
||||
import org.springframework.ldap.transaction.core.BindOperationExecutor;
|
||||
import org.springframework.ldap.transaction.core.BindOperationRecorder;
|
||||
import org.springframework.ldap.transaction.BindOperationExecutor;
|
||||
import org.springframework.ldap.transaction.BindOperationRecorder;
|
||||
import org.springframework.transaction.compensating.CompensatingTransactionOperationExecutor;
|
||||
|
||||
public class BindOperationRecorderTest extends TestCase {
|
||||
@@ -1,16 +1,16 @@
|
||||
package org.springframework.ldap.transaction.core;
|
||||
package org.springframework.ldap.transaction;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.easymock.MockControl;
|
||||
import org.springframework.ldap.core.LdapOperations;
|
||||
import org.springframework.ldap.transaction.core.BindOperationRecorder;
|
||||
import org.springframework.ldap.transaction.core.LdapCompensatingTransactionOperationFactory;
|
||||
import org.springframework.ldap.transaction.core.ModifyAttributesOperationRecorder;
|
||||
import org.springframework.ldap.transaction.core.RebindOperationRecorder;
|
||||
import org.springframework.ldap.transaction.core.RenameOperationRecorder;
|
||||
import org.springframework.ldap.transaction.core.TempEntryRenamingStrategy;
|
||||
import org.springframework.ldap.transaction.core.UnbindOperationRecorder;
|
||||
import org.springframework.ldap.transaction.BindOperationRecorder;
|
||||
import org.springframework.ldap.transaction.LdapCompensatingTransactionOperationFactory;
|
||||
import org.springframework.ldap.transaction.ModifyAttributesOperationRecorder;
|
||||
import org.springframework.ldap.transaction.RebindOperationRecorder;
|
||||
import org.springframework.ldap.transaction.RenameOperationRecorder;
|
||||
import org.springframework.ldap.transaction.TempEntryRenamingStrategy;
|
||||
import org.springframework.ldap.transaction.UnbindOperationRecorder;
|
||||
import org.springframework.transaction.compensating.CompensatingTransactionOperationRecorder;
|
||||
|
||||
public class LdapCompensatingTransactionOperationFactoryTest extends TestCase {
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.ldap.transaction.core;
|
||||
package org.springframework.ldap.transaction;
|
||||
|
||||
import javax.naming.Name;
|
||||
import javax.naming.directory.ModificationItem;
|
||||
@@ -6,7 +6,7 @@ import javax.naming.directory.ModificationItem;
|
||||
import org.easymock.MockControl;
|
||||
import org.springframework.ldap.core.DistinguishedName;
|
||||
import org.springframework.ldap.core.LdapOperations;
|
||||
import org.springframework.ldap.transaction.core.ModifyAttributesOperationExecutor;
|
||||
import org.springframework.ldap.transaction.ModifyAttributesOperationExecutor;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.ldap.transaction.core;
|
||||
package org.springframework.ldap.transaction;
|
||||
|
||||
import javax.naming.NamingException;
|
||||
import javax.naming.directory.Attribute;
|
||||
@@ -14,8 +14,8 @@ import org.easymock.MockControl;
|
||||
import org.springframework.ldap.core.AttributesMapper;
|
||||
import org.springframework.ldap.core.DistinguishedName;
|
||||
import org.springframework.ldap.core.LdapOperations;
|
||||
import org.springframework.ldap.transaction.core.ModifyAttributesOperationExecutor;
|
||||
import org.springframework.ldap.transaction.core.ModifyAttributesOperationRecorder;
|
||||
import org.springframework.ldap.transaction.ModifyAttributesOperationExecutor;
|
||||
import org.springframework.ldap.transaction.ModifyAttributesOperationRecorder;
|
||||
import org.springframework.transaction.compensating.CompensatingTransactionOperationExecutor;
|
||||
|
||||
public class ModifyAttributesOperationRecorderTest extends TestCase {
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.ldap.transaction.core;
|
||||
package org.springframework.ldap.transaction;
|
||||
|
||||
import javax.naming.directory.BasicAttributes;
|
||||
|
||||
@@ -7,7 +7,7 @@ import junit.framework.TestCase;
|
||||
import org.easymock.MockControl;
|
||||
import org.springframework.ldap.core.DistinguishedName;
|
||||
import org.springframework.ldap.core.LdapOperations;
|
||||
import org.springframework.ldap.transaction.core.RebindOperationExecutor;
|
||||
import org.springframework.ldap.transaction.RebindOperationExecutor;
|
||||
|
||||
public class RebindOperationExecutorTest extends TestCase {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.ldap.transaction.core;
|
||||
package org.springframework.ldap.transaction;
|
||||
|
||||
import javax.naming.directory.BasicAttributes;
|
||||
|
||||
@@ -7,9 +7,9 @@ import junit.framework.TestCase;
|
||||
import org.easymock.MockControl;
|
||||
import org.springframework.ldap.core.DistinguishedName;
|
||||
import org.springframework.ldap.core.LdapOperations;
|
||||
import org.springframework.ldap.transaction.core.RebindOperationExecutor;
|
||||
import org.springframework.ldap.transaction.core.RebindOperationRecorder;
|
||||
import org.springframework.ldap.transaction.core.TempEntryRenamingStrategy;
|
||||
import org.springframework.ldap.transaction.RebindOperationExecutor;
|
||||
import org.springframework.ldap.transaction.RebindOperationRecorder;
|
||||
import org.springframework.ldap.transaction.TempEntryRenamingStrategy;
|
||||
import org.springframework.transaction.compensating.CompensatingTransactionOperationExecutor;
|
||||
|
||||
public class RebindOperationRecorderTest extends TestCase {
|
||||
@@ -1,9 +1,9 @@
|
||||
package org.springframework.ldap.transaction.core;
|
||||
package org.springframework.ldap.transaction;
|
||||
|
||||
import org.easymock.MockControl;
|
||||
import org.springframework.ldap.core.DistinguishedName;
|
||||
import org.springframework.ldap.core.LdapOperations;
|
||||
import org.springframework.ldap.transaction.core.RenameOperationExecutor;
|
||||
import org.springframework.ldap.transaction.RenameOperationExecutor;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package org.springframework.ldap.transaction.core;
|
||||
package org.springframework.ldap.transaction;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.easymock.MockControl;
|
||||
import org.springframework.ldap.core.LdapOperations;
|
||||
import org.springframework.ldap.transaction.core.RenameOperationExecutor;
|
||||
import org.springframework.ldap.transaction.core.RenameOperationRecorder;
|
||||
import org.springframework.ldap.transaction.RenameOperationExecutor;
|
||||
import org.springframework.ldap.transaction.RenameOperationRecorder;
|
||||
import org.springframework.transaction.compensating.CompensatingTransactionOperationExecutor;
|
||||
|
||||
public class RenameOperationRecorderTest extends TestCase {
|
||||
@@ -1,11 +1,11 @@
|
||||
package org.springframework.ldap.transaction.core;
|
||||
package org.springframework.ldap.transaction;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.easymock.MockControl;
|
||||
import org.springframework.ldap.core.DistinguishedName;
|
||||
import org.springframework.ldap.core.LdapOperations;
|
||||
import org.springframework.ldap.transaction.core.UnbindOperationExecutor;
|
||||
import org.springframework.ldap.transaction.UnbindOperationExecutor;
|
||||
|
||||
public class UnbindOperationExecutorTest extends TestCase {
|
||||
private MockControl ldapOperationsControl;
|
||||
@@ -1,13 +1,13 @@
|
||||
package org.springframework.ldap.transaction.core;
|
||||
package org.springframework.ldap.transaction;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.easymock.MockControl;
|
||||
import org.springframework.ldap.core.DistinguishedName;
|
||||
import org.springframework.ldap.core.LdapOperations;
|
||||
import org.springframework.ldap.transaction.core.TempEntryRenamingStrategy;
|
||||
import org.springframework.ldap.transaction.core.UnbindOperationExecutor;
|
||||
import org.springframework.ldap.transaction.core.UnbindOperationRecorder;
|
||||
import org.springframework.ldap.transaction.TempEntryRenamingStrategy;
|
||||
import org.springframework.ldap.transaction.UnbindOperationExecutor;
|
||||
import org.springframework.ldap.transaction.UnbindOperationRecorder;
|
||||
import org.springframework.transaction.compensating.CompensatingTransactionOperationExecutor;
|
||||
|
||||
public class UnbindOperationRecorderTest extends TestCase {
|
||||
@@ -6,10 +6,10 @@ import junit.framework.TestCase;
|
||||
|
||||
import org.easymock.MockControl;
|
||||
import org.springframework.ldap.core.ContextSource;
|
||||
import org.springframework.ldap.transaction.DirContextHolder;
|
||||
import org.springframework.ldap.transaction.TempEntryRenamingStrategy;
|
||||
import org.springframework.ldap.transaction.core.ContextSourceTransactionManager;
|
||||
import org.springframework.ldap.transaction.core.ContextSourceTransactionObject;
|
||||
import org.springframework.ldap.transaction.core.DirContextHolder;
|
||||
import org.springframework.ldap.transaction.core.TempEntryRenamingStrategy;
|
||||
import org.springframework.ldap.transaction.core.TransactionAwareContextSourceProxy;
|
||||
import org.springframework.transaction.TransactionDefinition;
|
||||
import org.springframework.transaction.compensating.CompensatingTransactionOperationManager;
|
||||
|
||||
@@ -22,6 +22,7 @@ import junit.framework.TestCase;
|
||||
|
||||
import org.easymock.MockControl;
|
||||
import org.springframework.ldap.core.ContextSource;
|
||||
import org.springframework.ldap.transaction.DirContextProxy;
|
||||
|
||||
/**
|
||||
* Tests for {@link TransactionAwareContextSourceProxy}.
|
||||
|
||||
Reference in New Issue
Block a user