Merge pull request #314 from mposolda/ldap

Fixing testsuite failures with mongo model
This commit is contained in:
Stian Thorgersen 2014-04-03 10:26:54 +01:00
commit fcfbf156ce
3 changed files with 8 additions and 44 deletions

View file

@ -1143,16 +1143,17 @@ public class RealmAdapter extends AbstractMongoAdapter<RealmEntity> implements R
@Override @Override
public Set<String> getAuditListeners() { public Set<String> getAuditListeners() {
return realm.getAuditListeners() != null ? new HashSet<String>(realm.getAuditListeners()) : null; return new HashSet<String>(realm.getAuditListeners());
} }
@Override @Override
public void setAuditListeners(Set<String> listeners) { public void setAuditListeners(Set<String> listeners) {
if (listeners != null) { if (listeners != null) {
realm.setAuditListeners(new LinkedList<String>(listeners)); realm.setAuditListeners(new ArrayList<String>(listeners));
} else { } else {
realm.setAuditListeners(null); realm.setAuditListeners(Collections.EMPTY_LIST);
} }
updateRealm();
} }
@Override @Override

View file

@ -57,7 +57,7 @@ public class RealmEntity extends AbstractMongoIdentifiableEntity implements Mong
private Map<String, String> socialConfig = new HashMap<String, String>(); private Map<String, String> socialConfig = new HashMap<String, String>();
private Map<String, String> ldapServerConfig; private Map<String, String> ldapServerConfig;
private List<String> auditListeners = new LinkedList<String>(); private List<String> auditListeners = new ArrayList<String>();
@MongoField @MongoField
public String getName() { public String getName() {

View file

@ -175,41 +175,4 @@ public class UserEntity extends AbstractMongoIdentifiableEntity implements Mongo
public void setAuthenticationLink(AuthenticationLinkEntity authenticationLink) { public void setAuthenticationLink(AuthenticationLinkEntity authenticationLink) {
this.authenticationLink = authenticationLink; this.authenticationLink = authenticationLink;
} }
@MongoField
public int getFailedLoginNotBefore() {
return failedLoginNotBefore;
}
public void setFailedLoginNotBefore(int failedLoginNotBefore) {
this.failedLoginNotBefore = failedLoginNotBefore;
}
@MongoField
public int getNumFailures() {
return numFailures;
}
public void setNumFailures(int numFailures) {
this.numFailures = numFailures;
}
@MongoField
public long getLastFailure() {
return lastFailure;
}
public void setLastFailure(long lastFailure) {
this.lastFailure = lastFailure;
}
@MongoField
public String getLastIPFailure() {
return lastIPFailure;
}
public void setLastIPFailure(String lastIPFailure) {
this.lastIPFailure = lastIPFailure;
}
} }