Conveted Booleans to booleans

pull/210/head
Amanda Anganes 2012-09-20 11:32:59 -04:00
parent 29862f15bd
commit 2a0602863e
3 changed files with 54 additions and 42 deletions

View File

@ -63,10 +63,10 @@ public class ClientDetailsEntity implements ClientDetails {
/** Our own fields **/ /** Our own fields **/
private String clientDescription = ""; // human-readable description private String clientDescription = ""; // human-readable description
private Boolean allowRefresh = false; // do we allow refresh tokens for this client? private boolean allowRefresh = false; // do we allow refresh tokens for this client?
private Boolean allowMultipleAccessTokens = false; // do we allow multiple access tokens, or not? private boolean allowMultipleAccessTokens = false; // do we allow multiple access tokens, or not?
private Boolean reuseRefreshToken = false; // do we let someone reuse a refresh token? private boolean reuseRefreshToken = false; // do we let someone reuse a refresh token?
private Boolean dynamicallyRegistered = false; // was this client dynamically registered? private boolean dynamicallyRegistered = false; // was this client dynamically registered?
private Integer idTokenValiditySeconds; //timeout for id tokens private Integer idTokenValiditySeconds; //timeout for id tokens
/** Fields from ClientDetails interface **/ /** Fields from ClientDetails interface **/
@ -110,7 +110,7 @@ public class ClientDetailsEntity implements ClientDetails {
private JweAlgorithms idTokenEncryptedResponseInt; private JweAlgorithms idTokenEncryptedResponseInt;
private Integer defaultMaxAge; private Integer defaultMaxAge;
private Boolean requireAuthTime = false; private boolean requireAuthTime = false;
private String defaultACR; private String defaultACR;
@ -226,9 +226,9 @@ public class ClientDetailsEntity implements ClientDetails {
/** /**
* @param allowRefresh * @param allowRefresh
* @see org.mitre.oauth2.model.ClientDetailsEntity#setAllowRefresh(Boolean) * @see org.mitre.oauth2.model.ClientDetailsEntity#setAllowRefresh(boolean)
*/ */
public ClientDetailsEntityBuilder setAllowRefresh(Boolean allowRefresh) { public ClientDetailsEntityBuilder setAllowRefresh(boolean allowRefresh) {
instance.setAllowRefresh(allowRefresh); instance.setAllowRefresh(allowRefresh);
return this; return this;
} }
@ -237,7 +237,7 @@ public class ClientDetailsEntity implements ClientDetails {
* @param allow * @param allow
* @see * @see
*/ */
public ClientDetailsEntityBuilder setAllowMultipleAccessTokens(Boolean allow) { public ClientDetailsEntityBuilder setAllowMultipleAccessTokens(boolean allow) {
instance.setAllowMultipleAccessTokens(allow); instance.setAllowMultipleAccessTokens(allow);
return this; return this;
} }
@ -377,34 +377,34 @@ public class ClientDetailsEntity implements ClientDetails {
*/ */
@Basic @Basic
@Column(name="allow_refresh") @Column(name="allow_refresh")
public Boolean isAllowRefresh() { public boolean isAllowRefresh() {
return allowRefresh; return allowRefresh;
} }
/** /**
* @param allowRefresh Whether to allow for issuance of refresh tokens or not (defaults to false) * @param allowRefresh Whether to allow for issuance of refresh tokens or not (defaults to false)
*/ */
public void setAllowRefresh(Boolean allowRefresh) { public void setAllowRefresh(boolean allowRefresh) {
this.allowRefresh = allowRefresh; this.allowRefresh = allowRefresh;
} }
@Basic @Basic
@Column(name="allow_multiple_access_tokens") @Column(name="allow_multiple_access_tokens")
public Boolean isAllowMultipleAccessTokens() { public boolean isAllowMultipleAccessTokens() {
return allowMultipleAccessTokens; return allowMultipleAccessTokens;
} }
public void setAllowMultipleAccessTokens(Boolean allowMultipleAccessTokens) { public void setAllowMultipleAccessTokens(boolean allowMultipleAccessTokens) {
this.allowMultipleAccessTokens = allowMultipleAccessTokens; this.allowMultipleAccessTokens = allowMultipleAccessTokens;
} }
@Basic @Basic
@Column(name="reuse_refresh_tokens") @Column(name="reuse_refresh_tokens")
public Boolean isReuseRefreshToken() { public boolean isReuseRefreshToken() {
return reuseRefreshToken; return reuseRefreshToken;
} }
public void setReuseRefreshToken(Boolean reuseRefreshToken) { public void setReuseRefreshToken(boolean reuseRefreshToken) {
this.reuseRefreshToken = reuseRefreshToken; this.reuseRefreshToken = reuseRefreshToken;
} }
@ -429,14 +429,14 @@ public class ClientDetailsEntity implements ClientDetails {
*/ */
@Basic @Basic
@Column(name="dynamically_registered") @Column(name="dynamically_registered")
public Boolean isDynamicallyRegistered() { public boolean isDynamicallyRegistered() {
return dynamicallyRegistered; return dynamicallyRegistered;
} }
/** /**
* @param dynamicallyRegistered the dynamicallyRegistered to set * @param dynamicallyRegistered the dynamicallyRegistered to set
*/ */
public void setDynamicallyRegistered(Boolean dynamicallyRegistered) { public void setDynamicallyRegistered(boolean dynamicallyRegistered) {
this.dynamicallyRegistered = dynamicallyRegistered; this.dynamicallyRegistered = dynamicallyRegistered;
} }
@ -875,11 +875,11 @@ public class ClientDetailsEntity implements ClientDetails {
@Basic @Basic
@Column(name="require_auth_time") @Column(name="require_auth_time")
public Boolean getRequireAuthTime() { public boolean getRequireAuthTime() {
return requireAuthTime; return requireAuthTime;
} }
public void setRequireAuthTime(Boolean requireAuthTime) { public void setRequireAuthTime(boolean requireAuthTime) {
this.requireAuthTime = requireAuthTime; this.requireAuthTime = requireAuthTime;
} }
@ -893,7 +893,10 @@ public class ClientDetailsEntity implements ClientDetails {
this.defaultACR = defaultACR; this.defaultACR = defaultACR;
} }
@Override /* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
public String toString() { public String toString() {
return "ClientDetailsEntity [" return "ClientDetailsEntity ["
+ (id != null ? "id=" + id + ", " : "") + (id != null ? "id=" + id + ", " : "")
@ -905,7 +908,11 @@ public class ClientDetailsEntity implements ClientDetails {
+ allowMultipleAccessTokens + allowMultipleAccessTokens
+ ", reuseRefreshToken=" + ", reuseRefreshToken="
+ reuseRefreshToken + reuseRefreshToken
+ ", dynamicallyRegistered="
+ dynamicallyRegistered
+ ", " + ", "
+ (idTokenValiditySeconds != null ? "idTokenValiditySeconds="
+ idTokenValiditySeconds + ", " : "")
+ (clientId != null ? "clientId=" + clientId + ", " : "") + (clientId != null ? "clientId=" + clientId + ", " : "")
+ (clientSecret != null ? "clientSecret=" + clientSecret + ", " + (clientSecret != null ? "clientSecret=" + clientSecret + ", "
: "") : "")
@ -972,10 +979,9 @@ public class ClientDetailsEntity implements ClientDetails {
+ idTokenEncryptedResponseInt + ", " + idTokenEncryptedResponseInt + ", "
: "") : "")
+ (defaultMaxAge != null ? "defaultMaxAge=" + defaultMaxAge + (defaultMaxAge != null ? "defaultMaxAge=" + defaultMaxAge
+ ", " : "") + ", " : "") + "requireAuthTime=" + requireAuthTime
+ (requireAuthTime != null ? "requireAuthTime=" + ", " + (defaultACR != null ? "defaultACR=" + defaultACR : "")
+ requireAuthTime + ", " : "") + "]";
+ (defaultACR != null ? "defaultACR=" + defaultACR : "") + "]";
} }
/* (non-Javadoc) /* (non-Javadoc)
@ -1019,6 +1025,7 @@ public class ClientDetailsEntity implements ClientDetails {
+ ((defaultACR == null) ? 0 : defaultACR.hashCode()); + ((defaultACR == null) ? 0 : defaultACR.hashCode());
result = prime * result result = prime * result
+ ((defaultMaxAge == null) ? 0 : defaultMaxAge.hashCode()); + ((defaultMaxAge == null) ? 0 : defaultMaxAge.hashCode());
result = prime * result + (dynamicallyRegistered ? 1231 : 1237);
result = prime * result + ((id == null) ? 0 : id.hashCode()); result = prime * result + ((id == null) ? 0 : id.hashCode());
result = prime result = prime
* result * result
@ -1036,6 +1043,10 @@ public class ClientDetailsEntity implements ClientDetails {
* result * result
+ ((idTokenSignedResponseAlg == null) ? 0 + ((idTokenSignedResponseAlg == null) ? 0
: idTokenSignedResponseAlg.hashCode()); : idTokenSignedResponseAlg.hashCode());
result = prime
* result
+ ((idTokenValiditySeconds == null) ? 0
: idTokenValiditySeconds.hashCode());
result = prime result = prime
* result * result
+ ((jwkEncryptionUrl == null) ? 0 : jwkEncryptionUrl.hashCode()); + ((jwkEncryptionUrl == null) ? 0 : jwkEncryptionUrl.hashCode());
@ -1051,8 +1062,7 @@ public class ClientDetailsEntity implements ClientDetails {
* result * result
+ ((registeredRedirectUri == null) ? 0 : registeredRedirectUri + ((registeredRedirectUri == null) ? 0 : registeredRedirectUri
.hashCode()); .hashCode());
result = prime * result result = prime * result + (requireAuthTime ? 1231 : 1237);
+ ((requireAuthTime == null) ? 0 : requireAuthTime.hashCode());
result = prime result = prime
* result * result
+ ((requireSignedRequestObject == null) ? 0 + ((requireSignedRequestObject == null) ? 0
@ -1106,7 +1116,7 @@ public class ClientDetailsEntity implements ClientDetails {
if (obj == null) { if (obj == null) {
return false; return false;
} }
if (getClass() != obj.getClass()) { if (!(obj instanceof ClientDetailsEntity)) {
return false; return false;
} }
ClientDetailsEntity other = (ClientDetailsEntity) obj; ClientDetailsEntity other = (ClientDetailsEntity) obj;
@ -1197,6 +1207,9 @@ public class ClientDetailsEntity implements ClientDetails {
} else if (!defaultMaxAge.equals(other.defaultMaxAge)) { } else if (!defaultMaxAge.equals(other.defaultMaxAge)) {
return false; return false;
} }
if (dynamicallyRegistered != other.dynamicallyRegistered) {
return false;
}
if (id == null) { if (id == null) {
if (other.id != null) { if (other.id != null) {
return false; return false;
@ -1216,6 +1229,13 @@ public class ClientDetailsEntity implements ClientDetails {
if (idTokenSignedResponseAlg != other.idTokenSignedResponseAlg) { if (idTokenSignedResponseAlg != other.idTokenSignedResponseAlg) {
return false; return false;
} }
if (idTokenValiditySeconds == null) {
if (other.idTokenValiditySeconds != null) {
return false;
}
} else if (!idTokenValiditySeconds.equals(other.idTokenValiditySeconds)) {
return false;
}
if (jwkEncryptionUrl == null) { if (jwkEncryptionUrl == null) {
if (other.jwkEncryptionUrl != null) { if (other.jwkEncryptionUrl != null) {
return false; return false;
@ -1259,11 +1279,7 @@ public class ClientDetailsEntity implements ClientDetails {
} else if (!registeredRedirectUri.equals(other.registeredRedirectUri)) { } else if (!registeredRedirectUri.equals(other.registeredRedirectUri)) {
return false; return false;
} }
if (requireAuthTime == null) { if (requireAuthTime != other.requireAuthTime) {
if (other.requireAuthTime != null) {
return false;
}
} else if (!requireAuthTime.equals(other.requireAuthTime)) {
return false; return false;
} }
if (requireSignedRequestObject != other.requireSignedRequestObject) { if (requireSignedRequestObject != other.requireSignedRequestObject) {
@ -1296,11 +1312,7 @@ public class ClientDetailsEntity implements ClientDetails {
if (tokenEndpointAuthType != other.tokenEndpointAuthType) { if (tokenEndpointAuthType != other.tokenEndpointAuthType) {
return false; return false;
} }
if (userIdType == null) { if (userIdType != other.userIdType) {
if (other.userIdType != null) {
return false;
}
} else if (!userIdType.equals(other.userIdType)) {
return false; return false;
} }
if (userInfoEncryptedResponseAlg != other.userInfoEncryptedResponseAlg) { if (userInfoEncryptedResponseAlg != other.userInfoEncryptedResponseAlg) {

View File

@ -48,7 +48,7 @@ public class DefaultUserInfo implements UserInfo {
private String picture; private String picture;
private String website; private String website;
private String email; private String email;
private Boolean emailVerified; private boolean emailVerified;
private String gender; private String gender;
private String zoneinfo; private String zoneinfo;
private String locale; private String locale;
@ -234,14 +234,14 @@ public class DefaultUserInfo implements UserInfo {
@Override @Override
@Basic @Basic
@Column(name="email_verified") @Column(name="email_verified")
public Boolean getEmailVerified() { public boolean getEmailVerified() {
return emailVerified; return emailVerified;
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.mitre.openid.connect.model.UserInfo#setVerified(java.lang.Boolean) * @see org.mitre.openid.connect.model.UserInfo#setVerified(java.lang.boolean)
*/ */
@Override @Override
public void setEmailVerified(Boolean emailVerified) { public void setEmailVerified(boolean emailVerified) {
this.emailVerified = emailVerified; this.emailVerified = emailVerified;
} }
/* (non-Javadoc) /* (non-Javadoc)

View File

@ -145,12 +145,12 @@ public interface UserInfo {
*/ */
@Basic @Basic
@Column(name="email_verified") @Column(name="email_verified")
public abstract Boolean getEmailVerified(); public abstract boolean getEmailVerified();
/** /**
* @param verified the verified to set * @param verified the verified to set
*/ */
public abstract void setEmailVerified(Boolean emailVerified); public abstract void setEmailVerified(boolean emailVerified);
/** /**
* @return the gender * @return the gender