Spring LDAP

org.springframework.ldap.transaction.compensating
Class LdapTransactionUtils

java.lang.Object
  extended by org.springframework.ldap.transaction.compensating.LdapTransactionUtils

public final class LdapTransactionUtils
extends Object

Utility methods for working with LDAP transactions.

Since:
1.2
Author:
Mattias Hellborg Arthursson

Field Summary
static String BIND_METHOD_NAME
           
static String MODIFY_ATTRIBUTES_METHOD_NAME
           
static String REBIND_METHOD_NAME
           
static String RENAME_METHOD_NAME
           
static String UNBIND_METHOD_NAME
           
 
Method Summary
static Name getArgumentAsName(Object arg)
          Get the argument as a Name.
static Name getFirstArgumentAsName(Object[] args)
          Get the first parameter in the argument list as a Name.
static boolean isSupportedWriteTransactionOperation(String methodName)
          Check whether the supplied method is a method for which transactions is supported (and which should be recorded for possible rollback later).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REBIND_METHOD_NAME

public static final String REBIND_METHOD_NAME
See Also:
Constant Field Values

BIND_METHOD_NAME

public static final String BIND_METHOD_NAME
See Also:
Constant Field Values

RENAME_METHOD_NAME

public static final String RENAME_METHOD_NAME
See Also:
Constant Field Values

UNBIND_METHOD_NAME

public static final String UNBIND_METHOD_NAME
See Also:
Constant Field Values

MODIFY_ATTRIBUTES_METHOD_NAME

public static final String MODIFY_ATTRIBUTES_METHOD_NAME
See Also:
Constant Field Values
Method Detail

getFirstArgumentAsName

public static Name getFirstArgumentAsName(Object[] args)
Get the first parameter in the argument list as a Name.

Parameters:
args - arguments supplied to a ldap operation.
Returns:
a Name representation of the first argument, or the Name itself if it is a name.

getArgumentAsName

public static Name getArgumentAsName(Object arg)
Get the argument as a Name.

Parameters:
arg - an argument supplied to an Ldap operation.
Returns:
a Name representation of the argument, or the Name itself if it is a Name.

isSupportedWriteTransactionOperation

public static boolean isSupportedWriteTransactionOperation(String methodName)
Check whether the supplied method is a method for which transactions is supported (and which should be recorded for possible rollback later).

Parameters:
methodName - name of the method to check.
Returns:
true if this is a supported transaction operation, false otherwise.

Spring LDAP