Use this. Prefix in Core Tests

Issue gh-745
This commit is contained in:
Josh Cummings
2023-05-09 15:35:39 -06:00
parent 706ce5e074
commit 847e4d00e1
14 changed files with 89 additions and 89 deletions

View File

@@ -37,7 +37,7 @@ public class LdapGroupDao implements BaseLdapPathAware {
}
public Name getBasePath() {
return basePath;
return this.basePath;
}
}

View File

@@ -35,7 +35,7 @@ public class Person {
private String phone;
public String getDescription() {
return description;
return this.description;
}
public void setDescription(String description) {
@@ -43,7 +43,7 @@ public class Person {
}
public String getFullname() {
return fullname;
return this.fullname;
}
public void setFullname(String fullname) {
@@ -51,7 +51,7 @@ public class Person {
}
public String getLastname() {
return lastname;
return this.lastname;
}
public void setLastname(String lastname) {
@@ -59,7 +59,7 @@ public class Person {
}
public String getPhone() {
return phone;
return this.phone;
}
public void setPhone(String phone) {

View File

@@ -28,7 +28,7 @@ public class DummyDistinguishedNameConsumer {
private DistinguishedName distinguishedName;
public DistinguishedName getDistinguishedName() {
return distinguishedName;
return this.distinguishedName;
}
public void setDistinguishedName(DistinguishedName distinguishedName) {

View File

@@ -33,7 +33,7 @@ public class DummyBaseLdapNameAware implements BaseLdapNameAware {
}
public LdapName getBaseLdapPath() {
return baseLdapPath;
return this.baseLdapPath;
}
}

View File

@@ -32,7 +32,7 @@ public class DummyBaseLdapPathAware implements BaseLdapPathAware {
}
public DistinguishedName getBase() {
return base;
return this.base;
}
}

View File

@@ -27,7 +27,7 @@ public class DummyFilterConsumer {
private Filter filter;
public Filter getFilter() {
return filter;
return this.filter;
}
public void setFilter(Filter filter) {

View File

@@ -42,7 +42,7 @@ public class Group {
private Set<Name> members;
public Name getDn() {
return dn;
return this.dn;
}
public void setDn(Name dn) {
@@ -50,7 +50,7 @@ public class Group {
}
public Set<Name> getMembers() {
return members;
return this.members;
}
public void setMembers(Set<Name> members) {
@@ -58,7 +58,7 @@ public class Group {
}
public String getName() {
return name;
return this.name;
}
public void setName(String name) {
@@ -66,11 +66,11 @@ public class Group {
}
public void addMember(Name member) {
members.add(member);
this.members.add(member);
}
public void removeMember(Name member) {
members.remove(member);
this.members.remove(member);
}
}

View File

@@ -63,16 +63,16 @@ public class Person implements Persistable<Name> {
}
public void setNew() {
isNew = true;
this.isNew = true;
}
@Override
public boolean isNew() {
return isNew;
return this.isNew;
}
public Name getDn() {
return dn;
return this.dn;
}
public void setDn(Name dn) {
@@ -80,7 +80,7 @@ public class Person implements Persistable<Name> {
}
public String getCommonName() {
return commonName;
return this.commonName;
}
public void setCommonName(String commonName) {
@@ -88,7 +88,7 @@ public class Person implements Persistable<Name> {
}
public String getSurname() {
return surname;
return this.surname;
}
public void setSurname(String surname) {
@@ -96,7 +96,7 @@ public class Person implements Persistable<Name> {
}
public List<String> getDesc() {
return desc;
return this.desc;
}
public void setDesc(List<String> desc) {
@@ -104,7 +104,7 @@ public class Person implements Persistable<Name> {
}
public List<String> getUserId() {
return userId;
return this.userId;
}
public void setUserId(List<String> userId) {
@@ -112,7 +112,7 @@ public class Person implements Persistable<Name> {
}
public String getTelephoneNumber() {
return telephoneNumber;
return this.telephoneNumber;
}
public void setTelephoneNumber(String telephoneNumber) {
@@ -120,7 +120,7 @@ public class Person implements Persistable<Name> {
}
public String getEntryUuid() {
return entryUuid;
return this.entryUuid;
}
}

View File

@@ -64,7 +64,7 @@ public class PersonWithDnAnnotations {
private String entryUuid;
public Name getDn() {
return dn;
return this.dn;
}
public void setDn(Name dn) {
@@ -72,7 +72,7 @@ public class PersonWithDnAnnotations {
}
public String getCommonName() {
return commonName;
return this.commonName;
}
public void setCommonName(String commonName) {
@@ -80,7 +80,7 @@ public class PersonWithDnAnnotations {
}
public String getSurname() {
return surname;
return this.surname;
}
public void setSurname(String surname) {
@@ -88,7 +88,7 @@ public class PersonWithDnAnnotations {
}
public List<String> getDesc() {
return desc;
return this.desc;
}
public void setDesc(List<String> desc) {
@@ -96,7 +96,7 @@ public class PersonWithDnAnnotations {
}
public List<String> getUserId() {
return userId;
return this.userId;
}
public void setUserId(List<String> userId) {
@@ -104,7 +104,7 @@ public class PersonWithDnAnnotations {
}
public String getTelephoneNumber() {
return telephoneNumber;
return this.telephoneNumber;
}
public void setTelephoneNumber(String telephoneNumber) {
@@ -112,7 +112,7 @@ public class PersonWithDnAnnotations {
}
public String getCompany() {
return company;
return this.company;
}
public void setCompany(String company) {
@@ -120,7 +120,7 @@ public class PersonWithDnAnnotations {
}
public String getCountry() {
return country;
return this.country;
}
public void setCountry(String country) {
@@ -128,7 +128,7 @@ public class PersonWithDnAnnotations {
}
public String getEntryUuid() {
return entryUuid;
return this.entryUuid;
}
}

View File

@@ -27,7 +27,7 @@ public class MethodSecurityExpressionHandler extends DefaultMethodSecurityExpres
private LdapGroupDao groupDao;
public LdapGroupDao getGroupDao() {
return groupDao;
return this.groupDao;
}
public void setGroupDao(LdapGroupDao groupDao) {

View File

@@ -67,8 +67,8 @@ public class LdapAndJdbcDummyDaoImpl implements DummyDao {
ctx.setAttributeValue("cn", fullname);
ctx.setAttributeValue("sn", lastname);
ctx.setAttributeValue("description", description);
ldapTemplate.bind(dn, ctx, null);
jdbcTemplate.update("insert into PERSON values(?, ?, ?)", new Object[] { fullname, lastname, description });
this.ldapTemplate.bind(dn, ctx, null);
this.jdbcTemplate.update("insert into PERSON values(?, ?, ?)", new Object[] { fullname, lastname, description });
}
/*
@@ -78,12 +78,12 @@ public class LdapAndJdbcDummyDaoImpl implements DummyDao {
* java.lang.String, java.lang.String)
*/
public void update(String dn, String fullname, String lastname, String description) {
DirContextAdapter ctx = (DirContextAdapter) ldapTemplate.lookup(dn);
DirContextAdapter ctx = (DirContextAdapter) this.ldapTemplate.lookup(dn);
ctx.setAttributeValue("sn", lastname);
ctx.setAttributeValue("description", description);
ldapTemplate.modifyAttributes(ctx);
jdbcTemplate.update("update PERSON set lastname=?, description = ? where fullname = ?",
this.ldapTemplate.modifyAttributes(ctx);
this.jdbcTemplate.update("update PERSON set lastname=?, description = ? where fullname = ?",
new Object[] { lastname, description, fullname });
}
@@ -107,11 +107,11 @@ public class LdapAndJdbcDummyDaoImpl implements DummyDao {
* String, java.lang.String, java.lang.String)
*/
public void updateAndRename(String dn, String newDn, String description) {
DirContextAdapter ctx = (DirContextAdapter) ldapTemplate.lookup(dn);
DirContextAdapter ctx = (DirContextAdapter) this.ldapTemplate.lookup(dn);
ctx.setAttributeValue("description", description);
ldapTemplate.modifyAttributes(ctx);
ldapTemplate.rename(dn, newDn);
this.ldapTemplate.modifyAttributes(ctx);
this.ldapTemplate.rename(dn, newDn);
}
/*
@@ -134,11 +134,11 @@ public class LdapAndJdbcDummyDaoImpl implements DummyDao {
* String, java.lang.String, java.lang.String)
*/
public void modifyAttributes(String dn, String lastName, String description) {
DirContextAdapter ctx = (DirContextAdapter) ldapTemplate.lookup(dn);
DirContextAdapter ctx = (DirContextAdapter) this.ldapTemplate.lookup(dn);
ctx.setAttributeValue("sn", lastName);
ctx.setAttributeValue("description", description);
ldapTemplate.modifyAttributes(dn, ctx.getModificationItems());
this.ldapTemplate.modifyAttributes(dn, ctx.getModificationItems());
}
/*
@@ -159,8 +159,8 @@ public class LdapAndJdbcDummyDaoImpl implements DummyDao {
* @see org.springframework.ldap.transaction.support.DummyDao#unbind(java.lang.String)
*/
public void unbind(String dn, String fullname) {
ldapTemplate.unbind(dn);
jdbcTemplate.update("delete from PERSON where fullname=?", new Object[] { fullname });
this.ldapTemplate.unbind(dn);
this.jdbcTemplate.update("delete from PERSON where fullname=?", new Object[] { fullname });
}
/*

View File

@@ -62,7 +62,7 @@ public class LdapDummyDaoImpl implements DummyDao {
ctx.setAttributeValue("cn", fullname);
ctx.setAttributeValue("sn", lastname);
ctx.setAttributeValue("description", description);
ldapTemplate.bind(dn, ctx, null);
this.ldapTemplate.bind(dn, ctx, null);
}
/*
@@ -72,11 +72,11 @@ public class LdapDummyDaoImpl implements DummyDao {
* java.lang.String, java.lang.String)
*/
public void update(String dn, String fullname, String lastname, String description) {
DirContextAdapter ctx = (DirContextAdapter) ldapTemplate.lookup(dn);
DirContextAdapter ctx = (DirContextAdapter) this.ldapTemplate.lookup(dn);
ctx.setAttributeValue("sn", lastname);
ctx.setAttributeValue("description", description);
ldapTemplate.modifyAttributes(ctx);
this.ldapTemplate.modifyAttributes(ctx);
}
/*
@@ -99,11 +99,11 @@ public class LdapDummyDaoImpl implements DummyDao {
* String, java.lang.String, java.lang.String)
*/
public void updateAndRename(String dn, String newDn, String description) {
DirContextAdapter ctx = (DirContextAdapter) ldapTemplate.lookup(dn);
DirContextAdapter ctx = (DirContextAdapter) this.ldapTemplate.lookup(dn);
ctx.setAttributeValue("description", description);
ldapTemplate.modifyAttributes(ctx);
ldapTemplate.rename(dn, newDn);
this.ldapTemplate.modifyAttributes(ctx);
this.ldapTemplate.rename(dn, newDn);
}
/*
@@ -126,11 +126,11 @@ public class LdapDummyDaoImpl implements DummyDao {
* String, java.lang.String, java.lang.String)
*/
public void modifyAttributes(String dn, String lastName, String description) {
DirContextAdapter ctx = (DirContextAdapter) ldapTemplate.lookup(dn);
DirContextAdapter ctx = (DirContextAdapter) this.ldapTemplate.lookup(dn);
ctx.setAttributeValue("sn", lastName);
ctx.setAttributeValue("description", description);
ldapTemplate.modifyAttributes(dn, ctx.getModificationItems());
this.ldapTemplate.modifyAttributes(dn, ctx.getModificationItems());
}
/*
@@ -151,7 +151,7 @@ public class LdapDummyDaoImpl implements DummyDao {
* @see org.springframework.ldap.transaction.support.DummyDao#unbind(java.lang.String)
*/
public void unbind(String dn, String fullname) {
ldapTemplate.unbind(dn);
this.ldapTemplate.unbind(dn);
}
/*
@@ -168,7 +168,7 @@ public class LdapDummyDaoImpl implements DummyDao {
@Override
public void deleteRecursively(String dn) {
ldapTemplate.unbind(dn, RECURSIVE);
this.ldapTemplate.unbind(dn, RECURSIVE);
}
@Override
@@ -184,10 +184,10 @@ public class LdapDummyDaoImpl implements DummyDao {
ctx.setAttributeValue("ou", "dummy");
ctx.setAttributeValue("description", "dummy description");
ldapTemplate.bind("ou=dummy", ctx, null);
ldapTemplate.bind("ou=dummy,ou=dummy", ctx, null);
ldapTemplate.unbind("ou=dummy,ou=dummy");
ldapTemplate.unbind("ou=dummy");
this.ldapTemplate.bind("ou=dummy", ctx, null);
this.ldapTemplate.bind("ou=dummy,ou=dummy", ctx, null);
this.ldapTemplate.unbind("ou=dummy,ou=dummy");
this.ldapTemplate.unbind("ou=dummy");
}
@Override

View File

@@ -42,7 +42,7 @@ public class DummyDaoLdapAndHibernateImpl extends HibernateDaoSupport implements
ctx.setAttributeValue("cn", person.getFullname());
ctx.setAttributeValue("sn", person.getLastname());
ctx.setAttributeValue("description", person.getDescription());
ldapTemplate.bind(dn, ctx, null);
this.ldapTemplate.bind(dn, ctx, null);
this.getHibernateTemplate().saveOrUpdate(person);
}
@@ -54,11 +54,11 @@ public class DummyDaoLdapAndHibernateImpl extends HibernateDaoSupport implements
}
public void modifyAttributes(String dn, String lastName, String description) {
DirContextAdapter ctx = (DirContextAdapter) ldapTemplate.lookup(dn);
DirContextAdapter ctx = (DirContextAdapter) this.ldapTemplate.lookup(dn);
ctx.setAttributeValue("sn", lastName);
ctx.setAttributeValue("description", description);
ldapTemplate.modifyAttributes(dn, ctx.getModificationItems());
this.ldapTemplate.modifyAttributes(dn, ctx.getModificationItems());
}
public void modifyAttributesWithException(String dn, String lastName, String description) {
@@ -68,7 +68,7 @@ public class DummyDaoLdapAndHibernateImpl extends HibernateDaoSupport implements
public void unbind(OrgPerson person) {
String dn = prepareDn(person);
ldapTemplate.unbind(dn);
this.ldapTemplate.unbind(dn);
this.getHibernateTemplate().delete(person);
}
@@ -80,11 +80,11 @@ public class DummyDaoLdapAndHibernateImpl extends HibernateDaoSupport implements
public void update(OrgPerson person) {
String dn = prepareDn(person);
DirContextAdapter ctx = (DirContextAdapter) ldapTemplate.lookup(dn);
DirContextAdapter ctx = (DirContextAdapter) this.ldapTemplate.lookup(dn);
ctx.setAttributeValue("sn", person.getLastname());
ctx.setAttributeValue("description", person.getDescription());
ldapTemplate.modifyAttributes(ctx);
this.ldapTemplate.modifyAttributes(ctx);
this.getHibernateTemplate().saveOrUpdate(person);
}
@@ -96,11 +96,11 @@ public class DummyDaoLdapAndHibernateImpl extends HibernateDaoSupport implements
public void updateAndRename(String dn, String newDn, String updatedDescription) {
DirContextAdapter ctx = (DirContextAdapter) ldapTemplate.lookup(dn);
DirContextAdapter ctx = (DirContextAdapter) this.ldapTemplate.lookup(dn);
ctx.setAttributeValue("description", updatedDescription);
ldapTemplate.modifyAttributes(ctx);
ldapTemplate.rename(dn, newDn);
this.ldapTemplate.modifyAttributes(ctx);
this.ldapTemplate.rename(dn, newDn);
}

View File

@@ -37,7 +37,7 @@ public class OrgPerson {
private String description;
public Integer getId() {
return id;
return this.id;
}
public void setId(Integer id) {
@@ -45,7 +45,7 @@ public class OrgPerson {
}
public String getFullname() {
return fullname;
return this.fullname;
}
public void setFullname(String fullname) {
@@ -53,7 +53,7 @@ public class OrgPerson {
}
public String getLastname() {
return lastname;
return this.lastname;
}
public void setLastname(String lastname) {
@@ -61,7 +61,7 @@ public class OrgPerson {
}
public String getCountry() {
return country;
return this.country;
}
public void setCountry(String country) {
@@ -69,7 +69,7 @@ public class OrgPerson {
}
public String getCompany() {
return company;
return this.company;
}
public void setCompany(String company) {
@@ -77,7 +77,7 @@ public class OrgPerson {
}
public String getDescription() {
return description;
return this.description;
}
public void setDescription(String description) {
@@ -87,11 +87,11 @@ public class OrgPerson {
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((company == null) ? 0 : company.hashCode());
result = prime * result + ((country == null) ? 0 : country.hashCode());
result = prime * result + ((description == null) ? 0 : description.hashCode());
result = prime * result + ((fullname == null) ? 0 : fullname.hashCode());
result = prime * result + ((lastname == null) ? 0 : lastname.hashCode());
result = prime * result + ((this.company == null) ? 0 : this.company.hashCode());
result = prime * result + ((this.country == null) ? 0 : this.country.hashCode());
result = prime * result + ((this.description == null) ? 0 : this.description.hashCode());
result = prime * result + ((this.fullname == null) ? 0 : this.fullname.hashCode());
result = prime * result + ((this.lastname == null) ? 0 : this.lastname.hashCode());
return result;
}
@@ -103,35 +103,35 @@ public class OrgPerson {
if (getClass() != obj.getClass())
return false;
final OrgPerson other = (OrgPerson) obj;
if (company == null) {
if (this.company == null) {
if (other.company != null)
return false;
}
else if (!company.equals(other.company))
else if (!this.company.equals(other.company))
return false;
if (country == null) {
if (this.country == null) {
if (other.country != null)
return false;
}
else if (!country.equals(other.country))
else if (!this.country.equals(other.country))
return false;
if (description == null) {
if (this.description == null) {
if (other.description != null)
return false;
}
else if (!description.equals(other.description))
else if (!this.description.equals(other.description))
return false;
if (fullname == null) {
if (this.fullname == null) {
if (other.fullname != null)
return false;
}
else if (!fullname.equals(other.fullname))
else if (!this.fullname.equals(other.fullname))
return false;
if (lastname == null) {
if (this.lastname == null) {
if (other.lastname != null)
return false;
}
else if (!lastname.equals(other.lastname))
else if (!this.lastname.equals(other.lastname))
return false;
return true;
}