Skip to content

Commit

Permalink
DATALDAP-9 - Adapt API in LdapRepositoryFactoryBean.
Browse files Browse the repository at this point in the history
Related ticket: DATACMNS-891.
  • Loading branch information
odrotbohm committed Dec 15, 2016
1 parent dbd4bf2 commit 4a65f19
Showing 1 changed file with 14 additions and 3 deletions.
Expand Up @@ -28,25 +28,37 @@
* {@link org.springframework.data.ldap.repository.LdapRepository} instances.
*
* @author Mattias Hellborg Arthursson
* @author Oliver Gierke
*/
public class LdapRepositoryFactoryBean<T extends Repository<S, Name>, S>
extends RepositoryFactoryBeanSupport<T, S, Name> {

private LdapOperations ldapOperations;

/**
* Creates a new {@link LdapRepositoryFactoryBean} for the given repository interface.
*
* @param repositoryInterface must not be {@literal null}.
*/
public LdapRepositoryFactoryBean(Class<? extends T> repositoryInterface) {
super(repositoryInterface);
}

public void setLdapOperations(LdapOperations ldapOperations) {
this.ldapOperations = ldapOperations;
}

/* (non-Javadoc)
/*
* (non-Javadoc)
* @see org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport#createRepositoryFactory()
*/
@Override
protected RepositoryFactorySupport createRepositoryFactory() {
return new LdapRepositoryFactory(ldapOperations);
}

/* (non-Javadoc)
/*
* (non-Javadoc)
* @see org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport#afterPropertiesSet()
*/
@Override
Expand All @@ -55,6 +67,5 @@ public void afterPropertiesSet() {
Assert.notNull(ldapOperations, "LdapOperations must be set");

super.afterPropertiesSet();

}
}

0 comments on commit 4a65f19

Please sign in to comment.