Skip to content
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.

Commit

Permalink
Resolve build warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig Walls committed May 15, 2015
1 parent 258b921 commit 6d61bcb
Show file tree
Hide file tree
Showing 30 changed files with 94 additions and 11 deletions.
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ version = 1.1.1.BUILD-SNAPSHOT
h2Version = 1.3.175
hamcrestVersion = 1.3
httpComponentsVersion = 4.3.1
jacksonVersion = 2.3.2
jacksonVersion = 2.4.5
javaxInjectVersion = 1
junitVersion = 4.11
mockitoVersion = 1.9.5
mockitoVersion = 1.10.8
servletApiVersion = 3.0.1
springVersion = 4.0.6.BUILD-SNAPSHOT
springVersion = 4.1.6.BUILD-SNAPSHOT
springReleaseVersion = latest.release
springSnapshotVersion = latest.integration
springSecurityVersion = 3.2.3.RELEASE
springSecurityVersion = 3.2.7.RELEASE
thymeleafVersion = 2.1.2.RELEASE
jspApiVersion = 2.2.1
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public interface ApiBinding {
* If not, API calls do not contain any user authorization information.
* Callers can use this status flag to determine if API operations requiring authorization can be invoked.
* @see MissingAuthorizationException
* @return true if this API binding has been authorized on behalf of a specific user.
*/
public boolean isAuthorized();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public ApiException(String providerId, String message, Throwable cause) {

/**
* The ID of the provider for which the API exception occurred.
* @return The ID of the provider for which the API exception occurred.
*/
public String getProviderId() {
return providerId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public InsufficientPermissionException(String providerId, String requiredPermiss
/**
* The permission required to access the resource.
* May be null if the required permission is unknown.
* @return the permission required to access the resource
*/
public String getRequiredPermission() {
return requiredPermission;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,41 +62,47 @@ public ConnectionData(String providerId, String providerUserId, String displayNa

/**
* The id of the provider the connection is associated with.
* @return The id of the provider the connection is associated with.
*/
public String getProviderId() {
return providerId;
}

/**
* The id of the provider user this connection is connected to.
* @return The id of the provider user this connection is connected to.
*/
public String getProviderUserId() {
return providerUserId;
}

/**
* A display name for the connection.
* @return A display name for the connection.
*/
public String getDisplayName() {
return displayName;
}

/**
* A link to the provider's user profile page.
* @return A link to the provider's user profile page.
*/
public String getProfileUrl() {
return profileUrl;
}

/**
* An image visualizing the connection.
* @return An image visualizing the connection.
*/
public String getImageUrl() {
return imageUrl;
}

/**
* The access token required to make authorized API calls.
* @return The access token required to make authorized API calls.
*/
public String getAccessToken() {
return accessToken;
Expand All @@ -105,6 +111,7 @@ public String getAccessToken() {
/**
* The secret token needed to make authorized API calls.
* Required for OAuth1-based connections.
* @return The secret token needed to make authorized API calls.
*/
public String getSecret() {
return secret;
Expand All @@ -113,6 +120,7 @@ public String getSecret() {
/**
* A token use to renew this connection. Optional.
* Always null for OAuth1-based connections.
* @return A token use to renew this connection. Optional.
*/
public String getRefreshToken() {
return refreshToken;
Expand All @@ -121,6 +129,7 @@ public String getRefreshToken() {
/**
* The time the connection expires. Optional.
* Always null for OAuth1-based connections.
* @return The time the connection expires. Optional.
*/
public Long getExpireTime() {
return expireTime;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public ConnectionKey(String providerId, String providerUserId) {
* The id of the provider as it is registered in the system.
* This value should never change.
* Never null.
* @return The id of the provider as it is registered in the system.
*/
public String getProviderId() {
return providerId;
Expand All @@ -55,6 +56,7 @@ public String getProviderId() {
* This value should never change.
* Must be present to support sign-in by the provider user.
* Must be present to establish multiple connections with the provider.
* @return The id of the external provider user representing the remote end of the connection.
*/
public String getProviderUserId() {
return providerUserId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public interface ConnectionRepository {
* </pre>
* The returned map is sorted by providerId and entry values are ordered by rank.
* Returns an empty map if the user has no connections.
* @return all connections the current user has across all providers.
*/
MultiValueMap<String, Connection<?>> findAllConnections();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,25 @@ public interface ConnectionValues {

/**
* Sets value mapped to {@link ConnectionKey#getProviderUserId()}.
* @param providerUserId the user's identity on the provider
*/
public void setProviderUserId(String providerUserId);

/**
* Sets value mapped to {@link Connection#getDisplayName()}.
* @param displayName the user's display name
*/
public void setDisplayName(String displayName);

/**
* Sets value mapped to {@link Connection#getProfileUrl()}
* @param profileUrl the user's profile URL
*/
public void setProfileUrl(String profileUrl);

/**
* Sets value mapped to {@link Connection#getImageUrl()}
* @param imageUrl the user's image URL
*/
public void setImageUrl(String imageUrl);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public DuplicateConnectionException(ConnectionKey connectionKey) {

/**
* The connection key that already exists.
* @return The connection key that already exists.
*/
public ConnectionKey getConnectionKey() {
return connectionKey;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public NoSuchConnectionException(ConnectionKey connectionKey) {

/**
* The invalid key value.
* @return The invalid key value.
*/
public ConnectionKey getConnectionKey() {
return connectionKey;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public NotConnectedException(String providerId) {

/**
* The id of the provider the current user is not connected to.
* @return The id of the provider the current user is not connected to.
*/
public String getProviderId() {
return providerId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public class UserProfile implements Serializable {
/**
* The user's registered full name e.g. Keith Donald.
* May be null if not exposed/supported by the provider.
* @return the user's registered full name
*/
public String getName() {
return name;
Expand All @@ -54,6 +55,7 @@ public String getName() {
/**
* The user's registered first name e.g. Keith.
* May be null if not exposed/supported by the provider.
* @return The user's registered first name
*/
public String getFirstName() {
return firstName;
Expand All @@ -62,6 +64,7 @@ public String getFirstName() {
/**
* The user's registered last name e.g. Donald.
* May be null if not exposed/supported by the provider.
* @return The user's registered last name
*/
public String getLastName() {
return lastName;
Expand All @@ -70,6 +73,7 @@ public String getLastName() {
/**
* The user's registered email address.
* May be null if not exposed/supported by the provider.
* @return The user's registered email address.
*/
public String getEmail() {
return email;
Expand All @@ -78,6 +82,7 @@ public String getEmail() {
/**
* The user's registered username e.g. kdonald.
* May be null if not exposed/supported by the provider.
* @return The user's registered username
*/
public String getUsername() {
return username;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public class UserProfileBuilder {
/**
* Sets the profile name field.
* Note: parses the name string and sets the individual firstName and lastName fields as well.
* @param name the user's name
* @return this {@link UserProfileBuilder} for setting more properties
*/
public UserProfileBuilder setName(String name) {
this.name = name;
Expand All @@ -48,6 +50,8 @@ public UserProfileBuilder setName(String name) {

/**
* Sets the profile firstName field.
* @param firstName the user's first name
* @return this {@link UserProfileBuilder} for setting more properties
*/
public UserProfileBuilder setFirstName(String firstName) {
this.firstName = firstName;
Expand All @@ -56,6 +60,8 @@ public UserProfileBuilder setFirstName(String firstName) {

/**
* Sets the profile lastName field.
* @param lastName the user's last name
* @return this {@link UserProfileBuilder} for setting more properties
*/
public UserProfileBuilder setLastName(String lastName) {
this.lastName = lastName;
Expand All @@ -64,6 +70,8 @@ public UserProfileBuilder setLastName(String lastName) {

/**
* Sets the profile email field.
* @param email the user's email address
* @return this {@link UserProfileBuilder} for setting more properties
*/
public UserProfileBuilder setEmail(String email) {
this.email = email;
Expand All @@ -72,6 +80,8 @@ public UserProfileBuilder setEmail(String email) {

/**
* Sets the profile username field.
* @param username the user's username
* @return this {@link UserProfileBuilder} for setting more properties
*/
public UserProfileBuilder setUsername(String username) {
this.username = username;
Expand All @@ -81,6 +91,7 @@ public UserProfileBuilder setUsername(String username) {
/**
* Builds the user profile.
* Call this method after setting all profile field values.
* @return the {@link UserProfile}
*/
public UserProfile build() {
return new UserProfile(name, firstName, lastName, email, username);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public JdbcUsersConnectionRepository(DataSource dataSource, ConnectionFactoryLoc
* The command to execute to create a new local user profile in the event no user id could be mapped to a connection.
* Allows for implicitly creating a user profile from connection data during a provider sign-in attempt.
* Defaults to null, indicating explicit sign-up will be required to complete the provider sign-in attempt.
* @param connectionSignUp a {@link ConnectionSignUp} object
* @see #findUserIdsWithConnection(Connection)
*/
public void setConnectionSignUp(ConnectionSignUp connectionSignUp) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public boolean isAuthorized() {
* During construction, subclasses may apply customizations to the RestTemplate needed to invoke a specific API.
* @see RestTemplate#setMessageConverters(java.util.List)
* @see RestTemplate#setErrorHandler(org.springframework.web.client.ResponseErrorHandler)
* @return a reference to the REST client backing this API binding and used to perform API calls.
*/
public RestTemplate getRestTemplate() {
return restTemplate;
Expand All @@ -115,6 +116,7 @@ protected void configureRestTemplate(RestTemplate restTemplate) {
* By default, this includes a {@link StringHttpMessageConverter}, a {@link MappingJackson2HttpMessageConverter}, a {@link ByteArrayHttpMessageConverter}, and a {@link FormHttpMessageConverter}.
* The {@link FormHttpMessageConverter} is set to use "UTF-8" character encoding.
* Override this method to add additional message converters or to replace the default list of message converters.
* @return a list of {@link HttpMessageConverter}s to be used by the internal {@link RestTemplate}.
*/
protected List<HttpMessageConverter<?>> getMessageConverters() {
List<HttpMessageConverter<?>> messageConverters = new ArrayList<HttpMessageConverter<?>>();
Expand All @@ -130,6 +132,7 @@ protected List<HttpMessageConverter<?>> getMessageConverters() {
* By default, the message converter is set to use "UTF-8" character encoding.
* Override to customize the message converter (for example, to set supported media types or message converters for the parts of a multipart message).
* To remove/replace this or any of the other message converters that are registered by default, override the getMessageConverters() method instead.
* @return an {@link FormHttpMessageConverter} to be used by the internal {@link RestTemplate}.
*/
protected FormHttpMessageConverter getFormMessageConverter() {
FormHttpMessageConverter converter = new FormHttpMessageConverter();
Expand All @@ -148,6 +151,7 @@ protected FormHttpMessageConverter getFormMessageConverter() {
* Returns a {@link MappingJackson2HttpMessageConverter} to be used by the internal {@link RestTemplate}.
* Override to customize the message converter (for example, to set a custom object mapper or supported media types).
* To remove/replace this or any of the other message converters that are registered by default, override the getMessageConverters() method instead.
* @return a {@link MappingJackson2HttpMessageConverter} to be used by the internal {@link RestTemplate}.
*/
protected MappingJackson2HttpMessageConverter getJsonMessageConverter() {
return new MappingJackson2HttpMessageConverter();
Expand All @@ -157,7 +161,8 @@ protected MappingJackson2HttpMessageConverter getJsonMessageConverter() {
* Returns a {@link ByteArrayHttpMessageConverter} to be used by the internal {@link RestTemplate} when consuming image or other binary resources.
* By default, the message converter supports "image/jpeg", "image/gif", and "image/png" media types.
* Override to customize the message converter (for example, to set supported media types).
* To remove/replace this or any of the other message converters that are registered by default, override the getMessageConverters() method instead.
* To remove/replace this or any of the other message converters that are registered by default, override the getMessageConverters() method instead.
* @return a {@link ByteArrayHttpMessageConverter} to be used by the internal {@link RestTemplate} when consuming image or other binary resources.
*/
protected ByteArrayHttpMessageConverter getByteArrayMessageConverter() {
ByteArrayHttpMessageConverter converter = new ByteArrayHttpMessageConverter();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public final OAuth1Operations getOAuthOperations() {
* The consumer (or client) key assigned to the application by the provider.
* Exposed to subclasses to support constructing service API instances.
* @see #getApi(String, String)
* @return The consumer (or client) key assigned to the application by the provider.
*/
protected final String getConsumerKey() {
return consumerKey;
Expand All @@ -66,6 +67,7 @@ protected final String getConsumerKey() {
* The consumer (or client) secret assigned to the application by the provider.
* Exposed to subclasses to support constructing service API instances.
* @see #getApi(String, String)
* @return The consumer (or client) secret assigned to the application by the provider.
*/
protected final String getConsumerSecret() {
return consumerSecret;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public class AuthorizedRequestToken {
/**
* Creates an authorized request token.
* @param requestToken the request token object
* @param verifier the token verifier
*/
public AuthorizedRequestToken(OAuthToken requestToken, String verifier) {
this.requestToken = requestToken;
Expand All @@ -39,20 +40,23 @@ public AuthorizedRequestToken(OAuthToken requestToken, String verifier) {

/**
* The request token value.
* @return the token's value
*/
public String getValue() {
return requestToken.getValue();
}

/**
* The request token secret.
* @return the token's secret
*/
public String getSecret() {
return requestToken.getSecret();
}

/**
* The verifier string generated by the provider.
* @return The verifier string generated by the provider.
*/
public String getVerifier() {
return verifier;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public interface OAuth1Operations {
* The version of OAuth1 implemented by this operations instance.
* @see OAuth1Version#CORE_10
* @see OAuth1Version#CORE_10_REVISION_A
* @return The version of OAuth1 implemented by this operations instance.
*/
OAuth1Version getVersion();

Expand Down
Loading

0 comments on commit 6d61bcb

Please sign in to comment.