LDAP-329: Additional Depenency Updates

This commit is contained in:
Rob Winch
2015-04-28 15:53:27 -05:00
parent b271b1fd66
commit f4fac6d8bf
3 changed files with 30 additions and 23 deletions

View File

@@ -35,7 +35,7 @@ import java.util.Hashtable;
/**
* Default implementation of the DirObjectFactory interface. Creates a
* {@link DirContextAdapter} from the supplied arguments.
*
*
* @author Mattias Hellborg Arthursson
*/
public class DefaultDirObjectFactory implements DirObjectFactory {
@@ -44,7 +44,7 @@ public class DefaultDirObjectFactory implements DirObjectFactory {
/**
* Key to use in the ContextSource implementation to store the value of the
* base path suffix, if any, in the Ldap Environment.
*
*
* @deprecated Use {@link BaseLdapNameAware} and
* {@link BaseLdapPathBeanPostProcessor} instead.
*/
@@ -102,7 +102,7 @@ public class DefaultDirObjectFactory implements DirObjectFactory {
* Names. Also, the name might contain referral information, in which case
* we need to separate the server information from the actual Distinguished
* Name so that we can create a representing DirContextAdapter.
*
*
* @param attrs the attributes
* @param name the Name, typically a <code>CompositeName</code>, possibly
* including referral information.
@@ -149,17 +149,10 @@ public class DefaultDirObjectFactory implements DirObjectFactory {
nameString = pathString;
}
catch (URISyntaxException e) {
if (JdkVersion.isAtLeastJava15()) {
throw new IllegalArgumentException(
"Supplied name starts with protocol prefix indicating a referral,"
+ " but is not possible to parse to an URI",
e);
} else {
throw new IllegalArgumentException(
"Supplied name starts with protocol prefix indicating a referral,"
+ " but is not possible to parse to an URI: " +
e.getMessage());
}
throw new IllegalArgumentException(
"Supplied name starts with protocol prefix indicating a referral,"
+ " but is not possible to parse to an URI",
e);
}
if (LOG.isDebugEnabled()) {
LOG.debug("Resulting name after removal of referral information: '" + nameString + "'");

View File

@@ -18,8 +18,10 @@ package org.springframework.ldap.repository.support;
import com.mysema.query.types.OrderSpecifier;
import com.mysema.query.types.Predicate;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.querydsl.QueryDslPredicateExecutor;
import org.springframework.ldap.core.LdapOperations;
import org.springframework.ldap.odm.core.ObjectDirectoryMapper;
@@ -55,11 +57,23 @@ public class QueryDslLdapRepository<T> extends SimpleLdapRepository<T> implement
return findAll(predicate).size();
}
public boolean exists(Predicate predicate) {
return count(predicate) > 0;
}
public Iterable<T> findAll(Predicate predicate, Sort sort) {
throw new UnsupportedOperationException();
}
private QueryDslLdapQuery<T> queryFor(Predicate predicate) {
return new QueryDslLdapQuery<T>(getLdapOperations(), getClazz())
.where(predicate);
}
public Iterable<T> findAll(OrderSpecifier<?>... orders) {
throw new UnsupportedOperationException();
}
@Override
public Iterable<T> findAll(Predicate predicate, OrderSpecifier<?>... orders) {
throw new UnsupportedOperationException();

View File

@@ -5,20 +5,20 @@ sourceCompatibility = '1.6'
targetCompatibility = '1.6'
ext.apacheDsVersion = '1.5.5'
ext.springVersion = '3.2.8.RELEASE'
ext.springDataVersion = '1.6.5.RELEASE'
ext.springVersion = '3.2.13.RELEASE'
ext.springDataVersion = '1.10.0.RELEASE'
ext.springBatchVersion = '2.0.4.RELEASE'
ext.junitVersion = '4.11'
ext.commonsIoVersion = '2.4'
ext.commonsPoolVersion = '1.5.4'
ext.commonsLangVersion = '2.4'
ext.commonsLoggingVersion = '1.1.3'
ext.commonsPoolVersion = '1.6'
ext.commonsLangVersion = '2.6'
ext.commonsLoggingVersion = '1.2'
ext.gsbaseVersion = '2.0.1'
ext.log4jVersion = '1.2.17'
ext.mockitoVersion = '1.9.5'
ext.queryDslVersion = '3.2.4'
ext.slf4jVersion = '1.7.7'
ext.powerMockVersion = '1.5.4'
ext.mockitoVersion = '1.10.19'
ext.queryDslVersion = '3.6.3'
ext.slf4jVersion = '1.7.12'
ext.powerMockVersion = '1.6.2'
ext.powerMockDependencies = [
"org.powermock:powermock-core:$powerMockVersion",