Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix JavaDoc warnings and errors

  • Loading branch information...
commit 94afd2cd15c4a1d8c382f1d6b6de2435cd557df0 1 parent eb43054
Craig Walls authored
Showing with 189 additions and 99 deletions.
  1. +52 −14 build.gradle
  2. +2 −2 gradle/wrapper/gradle-wrapper.properties
  3. +4 −4 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/CursoredList.java
  4. +3 −2 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/DirectMessageOperations.java
  5. +2 −4 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/Entities.java
  6. +4 −4 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/FriendOperations.java
  7. +3 −3 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/GeoCode.java
  8. +2 −4 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/HashTagEntity.java
  9. +2 −4 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/MediaEntity.java
  10. +2 −4 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/MentionEntity.java
  11. +7 −0 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/OEmbedOptions.java
  12. +13 −12 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/Place.java
  13. +1 −0  spring-social-twitter/src/main/java/org/springframework/social/twitter/api/RateLimitStatus.java
  14. +9 −0 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/SearchParameters.java
  15. +4 −4 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/SearchResults.java
  16. +1 −0  spring-social-twitter/src/main/java/org/springframework/social/twitter/api/SimilarPlaces.java
  17. +2 −2 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/StreamDeleteEvent.java
  18. +4 −2 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/StreamListener.java
  19. +5 −0 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/StreamingOperations.java
  20. +20 −5 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/TimelineOperations.java
  21. +1 −0  spring-social-twitter/src/main/java/org/springframework/social/twitter/api/Tweet.java
  22. +10 −9 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/Twitter.java
  23. +25 −14 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/TwitterProfile.java
  24. +2 −4 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/UrlEntity.java
  25. +7 −0 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/UserOperations.java
  26. +2 −2 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/impl/RateLimitStatusHolder.java
View
66 build.gradle
@@ -24,16 +24,42 @@ configure(allprojects - docProjects) {
group = 'org.springframework.social'
- sourceCompatibility=1.5
- targetCompatibility=1.5
-
- [compileJava, compileTestJava]*.options*.compilerArgs = ['-Xlint:none']
-
- sourceSets.test.resources.srcDirs = ['src/test/resources', 'src/test/java']
-
- tasks.withType(Test).all {
- systemProperty("java.awt.headless", "true")
+ compileJava {
+ sourceCompatibility=1.5
+ targetCompatibility=1.5
}
+ compileTestJava {
+ sourceCompatibility=1.7
+ targetCompatibility=1.7
+ }
+
+ [compileJava, compileTestJava]*.options*.compilerArgs = [
+ "-Xlint:serial",
+ "-Xlint:varargs",
+ "-Xlint:cast",
+ "-Xlint:classfile",
+ "-Xlint:dep-ann",
+ "-Xlint:divzero",
+ "-Xlint:empty",
+ "-Xlint:finally",
+ "-Xlint:overrides",
+ "-Xlint:path",
+ "-Xlint:processing",
+ "-Xlint:static",
+ "-Xlint:try",
+ "-Xlint:-options", // intentionally disabled
+ "-Xlint:-fallthrough", // intentionally disabled
+ "-Xlint:rawtypes",
+ "-Xlint:deprecation",
+ "-Xlint:unchecked"
+ ]
+
+ sourceSets.test.resources.srcDirs = [
+ "src/test/resources",
+ "src/test/java"
+ ]
+
+ test.systemProperty("java.awt.headless", "true")
repositories {
maven { url "http://repo.spring.io/libs-snapshot" }
@@ -47,6 +73,13 @@ configure(allprojects - docProjects) {
testCompile ("org.springframework:spring-test:$springVersion")
}
+ ext.javadocLinks = [
+ "http://docs.oracle.com/javase/7/docs/api/",
+ "http://docs.oracle.com/javaee/7/api/",
+ "http://docs.spring.io/spring/docs/${springVersion}/javadoc-api/",
+ "http://docs.jboss.org/jbossas/javadoc/4.0.5/connector/"
+ ] as String[]
+
// servlet-api (2.5) and tomcat-servlet-api (3.0) classpath entries should not be
// exported to dependent projects in Eclipse to avoid false compilation errors due
// to changing APIs across these versions
@@ -55,10 +88,6 @@ configure(allprojects - docProjects) {
}
}
-ext.javadocLinks = [
- "http://docs.jboss.org/jbossas/javadoc/4.0.5/connector"
-] as String[]
-
configure(subprojects - docProjects) { subproject ->
apply from: "${rootProject.projectDir}/publish-maven.gradle"
@@ -87,9 +116,15 @@ configure(subprojects - docProjects) { subproject ->
}
javadoc {
+ description = "Generates project-level javadoc for use in -javadoc jar"
+
options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
options.author = true
options.header = project.name
+ options.links(project.ext.javadocLinks)
+ if (JavaVersion.current().isJava8Compatible()) {
+ options.addStringOption('Xdoclint:none', '-quiet')
+ }
//options.overview = "${projectDir}/src/main/java/overview.html"
}
@@ -189,6 +224,9 @@ configure(rootProject) {
options.header = rootProject.description
options.overview = "src/api/overview.html"
options.links(project.ext.javadocLinks)
+ if (JavaVersion.current().isJava8Compatible()) {
+ options.addStringOption('Xdoclint:none', '-quiet')
+ }
source subprojects.collect { project ->
project.sourceSets.main.allJava
@@ -233,7 +271,7 @@ configure(rootProject) {
}
task wrapper(type: Wrapper) {
- gradleVersion = '1.11'
+ gradleVersion = '1.12'
}
}
View
4 gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Tue Apr 22 13:56:44 CDT 2014
+#Wed Jun 18 11:11:02 CDT 2014
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.11-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-bin.zip
View
8 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/CursoredList.java
@@ -43,28 +43,28 @@ public CursoredList(int initialCapacity, long previousCursor, long nextCursor) {
}
/**
- * The cursor to retrieve the previous page of results.
+ * @return the cursor to retrieve the previous page of results.
*/
public long getPreviousCursor() {
return previousCursor;
}
/**
- * The cursor to retrieve the next page of results.
+ * @return the cursor value to retrieve the next page of results.
*/
public long getNextCursor() {
return nextCursor;
}
/**
- * Returns true if there is a previous page of results.
+ * @return true if there is a previous page of results.
*/
public boolean hasPrevious() {
return previousCursor > 0;
}
/**
- * Returns true if there is a next page of results.
+ * @return true if there is a next page of results.
*/
public boolean hasNext() {
return nextCursor > 0;
View
5 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/DirectMessageOperations.java
@@ -18,6 +18,7 @@
import java.util.List;
import org.springframework.social.ApiException;
+import org.springframework.social.DuplicateStatusException;
import org.springframework.social.MissingAuthorizationException;
@@ -107,7 +108,7 @@
* @return the {@link DirectMessage}
* @throws ApiException if there is an error while communicating with Twitter.
* @throws InvalidMessageRecipientException if the recipient is not following the authenticating user.
- * @throws DuplicateTweetException if the message duplicates a previously sent message.
+ * @throws DuplicateStatusException if the message duplicates a previously sent message.
* @throws MessageTooLongException if the message length exceeds Twitter's 140 character limit.
* @throws MissingAuthorizationException if TwitterTemplate was not created with OAuth credentials.
*/
@@ -123,7 +124,7 @@
* @return the {@link DirectMessage}
* @throws ApiException if there is an error while communicating with Twitter.
* @throws InvalidMessageRecipientException if the recipient is not following the authenticating user.
- * @throws DuplicateTweetException if the message duplicates a previously sent message.
+ * @throws DuplicateStatusException if the message duplicates a previously sent message.
* @throws MessageTooLongException if the message length exceeds Twitter's 140 character limit.
* @throws MissingAuthorizationException if TwitterTemplate was not created with OAuth credentials.
*/
View
6 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/Entities.java
@@ -21,10 +21,8 @@
import java.util.List;
/**
- * A json representation of entities found within twitter status objects.
- * <p/>
- * User: bowen
- * Date: 12/26/11
+ * <p>A json representation of entities found within twitter status objects.<p>
+ * @author bowen
*/
public class Entities extends TwitterObject implements Serializable {
View
8 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/FriendOperations.java
@@ -370,14 +370,14 @@
TwitterProfile disableNotifications(String screenName);
/**
- * Returns an array of numeric IDs for every user who has a pending request to follow the authenticating user.
+ * @return an array of numeric IDs for every user who has a pending request to follow the authenticating user.
* @throws ApiException if there is an error while communicating with Twitter.
* @throws MissingAuthorizationException if TwitterTemplate was not created with OAuth credentials.
*/
CursoredList<Long> getIncomingFriendships();
/**
- * Returns an array of numeric IDs for every user who has a pending request to follow the authenticating user.
+ * @return an array of numeric IDs for every user who has a pending request to follow the authenticating user.
* @param cursor the cursor of the page to retrieve.
* @throws ApiException if there is an error while communicating with Twitter.
* @throws MissingAuthorizationException if TwitterTemplate was not created with OAuth credentials.
@@ -385,14 +385,14 @@
CursoredList<Long> getIncomingFriendships(long cursor);
/**
- * Returns an array of numeric IDs for every protected user for whom the authenticating user has a pending follow request.
+ * @return an array of numeric IDs for every protected user for whom the authenticating user has a pending follow request.
* @throws ApiException if there is an error while communicating with Twitter.
* @throws MissingAuthorizationException if TwitterTemplate was not created with OAuth credentials.
*/
CursoredList<Long> getOutgoingFriendships();
/**
- * Returns an array of numeric IDs for every protected user for whom the authenticating user has a pending follow request.
+ * @return an array of numeric IDs for every protected user for whom the authenticating user has a pending follow request.
* @param cursor the cursor of the page to retrieve.
* @throws ApiException if there is an error while communicating with Twitter.
* @throws MissingAuthorizationException if TwitterTemplate was not created with OAuth credentials.
View
6 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/GeoCode.java
@@ -28,9 +28,9 @@
/**
* Creates GeoCode object with the default unit of measure is Unit.KILOMETER
*
- * @param latitude
- * @param longitude
- * @param radius
+ * @param latitude the location's latitude
+ * @param longitude the location's longitude
+ * @param radius the radius of the area to cover by this location
*/
public GeoCode(double latitude, double longitude, int radius) {
this(latitude, longitude, radius, Unit.KILOMETER);
View
6 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/HashTagEntity.java
@@ -19,10 +19,8 @@
import java.util.Arrays;
/**
- * A representation of tweet hashtags.
- * <p/>
- * User: bowen
- * Date: 12/26/11
+ * <p>A representation of tweet hashtags.</p>
+ * @author bowen
*/
public class HashTagEntity extends TwitterObject implements Serializable {
private static final long serialVersionUID = 1L;
View
6 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/MediaEntity.java
@@ -19,10 +19,8 @@
import java.util.Arrays;
/**
- * A representation of embedded media entity.
- * <p/>
- * User: bowen
- * Date: 12/26/11
+ * <p>A representation of embedded media entity.</p>
+ * @author bowen
*/
public class MediaEntity extends TwitterObject implements Serializable {
View
6 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/MentionEntity.java
@@ -21,10 +21,8 @@
import com.fasterxml.jackson.annotation.JsonProperty;
/**
- * A user mention entity.
- * <p/>
- * User: bowen
- * Date: 12/26/11
+ * <p>A user mention entity.</p>
+ * @author bowen
*/
public class MentionEntity extends TwitterObject implements Serializable {
private static final long serialVersionUID = 1L;
View
7 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/OEmbedOptions.java
@@ -31,6 +31,7 @@
/**
* Specify the maximum width in pixels that the embedded tweet should be rendered at.
* @param maxWidth the maximum width. Must be between 250 and 550.
+ * @return the same OEmbedOptions for additional configuration
*/
public OEmbedOptions maxWidth(int maxWidth) {
this.maxWidth = maxWidth;
@@ -40,6 +41,7 @@ public OEmbedOptions maxWidth(int maxWidth) {
/**
* Specify that the embedded Tweet should not show images that were posted with the tweet.
* By default, images will be shown.
+ * @return the same OEmbedOptions for additional configuration
*/
public OEmbedOptions hideMedia() {
this.hideMedia = true;
@@ -49,6 +51,7 @@ public OEmbedOptions hideMedia() {
/**
* Specify that the embedded Tweet should not show the original message if the tweet is a reply.
* By default, the thread will be shown.
+ * @return the same OEmbedOptions for additional configuration
*/
public OEmbedOptions hideThread() {
this.hideThread = true;
@@ -59,6 +62,7 @@ public OEmbedOptions hideThread() {
* Specify that the embedded Tweet should not include a &lt;script&gt; element pointing to widgets.js.
* This avoids the script from being redundantly loaded in the case that 2 or more embedded tweets are rendered on a page.
* By default, the script will be included.
+ * @return the same OEmbedOptions for additional configuration
*/
public OEmbedOptions omitScript() {
this.omitScript = true;
@@ -68,6 +72,7 @@ public OEmbedOptions omitScript() {
/**
* Specifies how the embedded tweet should be aligned.
* @param align The alignment value. Either left, right, center, or none. Defaults to none.
+ * @return the same OEmbedOptions for additional configuration
*/
public OEmbedOptions align(String align) {
this.align = align;
@@ -78,6 +83,7 @@ public OEmbedOptions align(String align) {
* Suggested Twitter accounts that might be related to the embedded tweet.
* Used by Web Intents (https://dev.twitter.com/docs/intents) to render suggestions to the reader.
* @param related A comma-separated list of Twitter screen names to recommend.
+ * @return the same OEmbedOptions for additional configuration
*/
public OEmbedOptions related(String related) {
this.related = related;
@@ -87,6 +93,7 @@ public OEmbedOptions related(String related) {
/**
* Specifies the language code for the embedded tweet.
* @param lang The language code. Example: "fr"
+ * @return the same OEmbedOptions for additional configuration
*/
public OEmbedOptions language(String lang) {
this.lang = lang;
View
25 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/Place.java
@@ -54,70 +54,70 @@ public Place(String id, String name, String fullName, String streetAddress, Stri
}
/**
- * The place's ID.
+ * @return the place's ID.
*/
public String getId() {
return id;
}
/**
- * A brief name for the place.
+ * @return a brief name for the place.
*/
public String getName() {
return name;
}
/**
- * The full name for the place.
+ * @return the full name for the place.
*/
public String getFullName() {
return fullName;
}
/**
- * The place's street address. May be null.
+ * @return the place's street address. May be null.
*/
public String getStreetAddress() {
return streetAddress;
}
/**
- * The place's country.
+ * @return the place's country.
*/
public String getCountry() {
return country;
}
/**
- * The place's country code.
+ * @return the place's country code.
*/
public String getCountryCode() {
return countryCode;
}
/**
- * The place type.
+ * @return the place type.
*/
public PlaceType getPlaceType() {
return placeType;
}
/**
- * A list of other places that this place is contained within.
+ * @return a list of other places that this place is contained within.
*/
public List<Place> getContainedWithin() {
return containedWithin;
}
/**
- * A list of points defining a box that fully contains the place's geometry.
+ * @return a list of points defining a box that fully contains the place's geometry.
*/
public List<GeoPoint> getBoundingBox() {
return boundingBox;
}
/**
- * The place's geometry.
+ * @return the place's geometry.
*/
public Geometry getGeometry() {
return geometry;
@@ -157,7 +157,7 @@ public Geometry(GeometryType type, List<List<GeoPoint>> coordinates) {
}
/**
- * The geometry's type, either POINT, POLYGON, or MULTIPOLYGON.
+ * @return the geometry's type, either POINT, POLYGON, or MULTIPOLYGON.
*/
public GeometryType getType() {
return type;
@@ -167,7 +167,8 @@ public GeometryType getType() {
* The coordinates defining a place's geometry.
* If type is POINT, then it is a List containing a single List containing a single point.
* If type is POLYGON, then it is a List containing a List of points that define the polygon.
- * If type is MULTIPOLYGON, then it is a List of polygon-defining Lists.
+ * If type is MULTIPOLYGON, then it is a List of polygon-defining Lists.
+ * @return the coordinates defining a place's geometry.
*/
public List<List<GeoPoint>> getCoordinates() {
return coordinates;
View
1  spring-social-twitter/src/main/java/org/springframework/social/twitter/api/RateLimitStatus.java
@@ -63,6 +63,7 @@ public Date getResetTime() {
/**
* The approximate number of seconds until the rate limits are reset.
* Note that this method recalculates the seconds until reset on each call.
+ * @return the approximate number of seconds until the rate limits are reset.
*/
public int getSecondsUntilReset() {
return (int) (resetTimeInSeconds - System.currentTimeMillis() / 1000);
View
9 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/SearchParameters.java
@@ -51,6 +51,7 @@ public SearchParameters(String query) {
*
* @param geoCode GeoCode object stuffed with coordinates and radius
* @see GeoCode
+ * @return The same SearchParameters for additional configuration.
*/
public SearchParameters geoCode(GeoCode geoCode) {
this.geoCode = geoCode;
@@ -61,6 +62,7 @@ public SearchParameters geoCode(GeoCode geoCode) {
* Sets optional <code>lang</code> parameter. Restricts tweets to the given language, given by an ISO 639-1 code.
*
* @param lang an ISO 639-1 language code
+ * @return The same SearchParameters for additional configuration.
*/
public SearchParameters lang(String lang) {
this.lang = lang;
@@ -72,6 +74,7 @@ public SearchParameters lang(String lang) {
* (only ja is currently effective).
*
* @param locale locale
+ * @return The same SearchParameters for additional configuration.
*/
public SearchParameters locale(String locale) {
this.locale = locale;
@@ -82,6 +85,7 @@ public SearchParameters locale(String locale) {
* Sets optional <code>result_type</code> parameter. Specifies what type of search results. Default is <code>mixed</code>.
*
* @param resultType type of preferred result type
+ * @return The same SearchParameters for additional configuration.
* @see ResultType
*/
public SearchParameters resultType(ResultType resultType) {
@@ -94,6 +98,7 @@ public SearchParameters resultType(ResultType resultType) {
* Defaults to 15.
*
* @param count number of tweets to return
+ * @return The same SearchParameters for additional configuration.
*/
public SearchParameters count(int count) {
this.count = count;
@@ -104,6 +109,7 @@ public SearchParameters count(int count) {
* Sets optional <code>until</code> parameter. Restricts search to tweets generated before the given date.
*
* @param untilDate date to search until
+ * @return The same SearchParameters for additional configuration.
*/
public SearchParameters until(Date untilDate) {
this.untilDate = untilDate;
@@ -114,6 +120,7 @@ public SearchParameters until(Date untilDate) {
* Sets optional <code>since_id</code> parameter. Restricts search results with an ID greater than the specified one.
*
* @param sinceId The minimum {@link org.springframework.social.twitter.api.Tweet} ID to return in the results
+ * @return The same SearchParameters for additional configuration.
*/
public SearchParameters sinceId(long sinceId) {
this.sinceId = sinceId;
@@ -124,6 +131,7 @@ public SearchParameters sinceId(long sinceId) {
* Sets optional <code>max_id</code> parameter. Restricts search results with an ID less or equel than the specified one.
*
* @param maxId The maximum {@link org.springframework.social.twitter.api.Tweet} ID to return in the results
+ * @return The same SearchParameters for additional configuration.
*/
public SearchParameters maxId(long maxId) {
this.maxId = maxId;
@@ -134,6 +142,7 @@ public SearchParameters maxId(long maxId) {
* Sets optional <code>include_entities</code> parameter. The entities node will be excluded when set to false.
*
* @param includeEntities Include entities node
+ * @return The same SearchParameters for additional configuration.
*/
public SearchParameters includeEntities(boolean includeEntities) {
this.includeEntities = includeEntities;
View
8 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/SearchResults.java
@@ -39,26 +39,26 @@ public SearchResults(List<Tweet> tweets, SearchMetadata metaData, boolean lastPa
}
/**
- * Returns the list of matching {@link Tweet}s
+ * @return the list of matching {@link Tweet}s
*/
public List<Tweet> getTweets() {
return tweets;
}
/**
- * Returns the {@link SearchMetadata} associated with a
- * particular search
+ * @return the {@link SearchMetadata} associated with a particular search
*/
public SearchMetadata getSearchMetadata() {
return metadata;
}
/**
- * Returns <code>true</code> if this is the last page of matching
+ * @return <code>true</code> if this is the last page of matching
* {@link Tweet}s; <code>false</code> if there are more pages that follow
* this one.
*/
public boolean isLastPage() {
return lastPage;
}
+
}
View
1  spring-social-twitter/src/main/java/org/springframework/social/twitter/api/SimilarPlaces.java
@@ -43,6 +43,7 @@ public SimilarPlaces(List<Place> places, PlacePrototype placePrototype) {
/**
* A prototype place that matches the criteria for the call to {@link GeoOperations#findSimilarPlaces(double, double, String)},
* including a create token that can be used to create the place.
+ * @return the PlacePrototype
*/
public PlacePrototype getPlacePrototype() {
return placePrototype;
View
4 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/StreamDeleteEvent.java
@@ -26,14 +26,14 @@
private final long userId;
/**
- * The ID of the tweet to delete
+ * @return the ID of the tweet to delete
*/
public long getTweetId() {
return tweetId;
}
/**
- * The ID of the user who posted the tweet
+ * @return the ID of the user who posted the tweet
*/
public long getUserId() {
return userId;
View
6 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/StreamListener.java
@@ -23,23 +23,25 @@
/**
* Called when a new Tweet is available on the stream
- * @param tweet
+ * @param tweet a tweet available on the stream
*/
void onTweet(Tweet tweet);
/**
* Called when a delete message is available on the stream
+ * @param deleteEvent a delete event
*/
void onDelete(StreamDeleteEvent deleteEvent);
/**
* Called when the stream is being track limited.
- * @param numberOfLimitedTweets
+ * @param numberOfLimitedTweets the number of tweets being limited on the stream
*/
void onLimit(int numberOfLimitedTweets);
/**
* Called when a client is stalling and the stream is in danger of being disconnected.
+ * @param warningEvent a warning event
*/
void onWarning(StreamWarningEvent warningEvent);
View
5 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/StreamingOperations.java
@@ -27,6 +27,7 @@
* Monitor the firehose stream, given a set of listeners.
* Per the documentation at https://dev.twitter.com/docs/api/1.1/get/statuses/firehose, the firehose stream requires special permission.
* @param listeners the listeners to monitor the stream
+ * @return the firehose stream
*/
Stream firehose(List<StreamListener> listeners);
@@ -39,12 +40,14 @@
* Per the documentation at https://dev.twitter.com/docs/api/1.1/get/statuses/firehose, the firehose stream requires special permission.
* @param backfill the number of messages to backfill. Valid values 1 to 150000 or -1 to -150000.
* @param listeners the listeners to monitor the stream
+ * @return the firehose stream
*/
Stream firehose(int backfill, List<StreamListener> listeners);
/**
* Monitor the sample stream, given a set of listeners.
* @param listeners the listeners to monitor the stream
+ * @return the sample stream
*/
Stream sample(List<StreamListener> listeners);
@@ -52,6 +55,7 @@
* Monitor a filtered stream, given a set of listeners.
* @param trackKeywords the terms to track in the stream
* @param listeners the listeners to monitor the stream
+ * @return the filtered stream
*/
Stream filter(String trackKeywords, List<StreamListener> listeners);
@@ -59,6 +63,7 @@
* Monitor a filtered stream, given a set of listeners.
* @param parameters the stream's filter parameters
* @param listeners the listeners to monitor the stream
+ * @return the filtered stream
*/
Stream filter(FilterStreamParameters parameters, List<StreamListener> listeners);
View
25 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/TimelineOperations.java
@@ -21,6 +21,7 @@
import org.springframework.core.io.FileSystemResource;
import org.springframework.core.io.Resource;
import org.springframework.social.ApiException;
+import org.springframework.social.DuplicateStatusException;
import org.springframework.social.MissingAuthorizationException;
import org.springframework.social.OperationNotPermittedException;
@@ -163,6 +164,7 @@
/**
* Retrieve the 20 most recent tweets of the authenticated user that have been retweeted by others.
+ * @return a list of Tweets
* @throws ApiException if there is an error while communicating with Twitter.
* @throws MissingAuthorizationException if TwitterTemplate was not created with OAuth credentials.
*/
@@ -172,6 +174,7 @@
* Retrieve tweets of the authenticated user that have been retweeted by others. The most recent tweets are listed first.
* @param page The page to return
* @param pageSize The number of {@link Tweet}s per page. Should be less than or equal to 100. (Will return at most 100 entries, even if pageSize is greater than 100.)
+ * @return a list of Tweets
* @throws ApiException if there is an error while communicating with Twitter.
* @throws MissingAuthorizationException if TwitterTemplate was not created with OAuth credentials.
*/
@@ -183,6 +186,7 @@
* @param pageSize The number of {@link Tweet}s per page. Should be less than or equal to 100. (Will return at most 100 entries, even if pageSize is greater than 100.)
* @param sinceId The minimum {@link Tweet} ID to return in the results.
* @param maxId The maximum {@link Tweet} ID to return in the results.
+ * @return a list of Tweets
* @throws ApiException if there is an error while communicating with Twitter.
* @throws MissingAuthorizationException if TwitterTemplate was not created with OAuth credentials.
*/
@@ -220,6 +224,7 @@
* Returns a single tweet.
* Supports either user or application authorization.
* @param tweetId the tweet's ID
+ * @return the Tweet object
* @throws ApiException if there is an error while communicating with Twitter.
* @throws MissingAuthorizationException if TwitterTemplate was not created with OAuth credentials or an application access token.
*/
@@ -229,6 +234,7 @@
* Returns a single tweet as an oEmbed representation.
* Supports either user or application authorization.
* @param tweetId the tweet's ID
+ * @return the Tweet object
* @throws ApiException if there is an error while communicating with Twitter.
* @throws MissingAuthorizationException if TwitterTemplate was not created with OAuth credentials or an application access token.
*/
@@ -239,6 +245,7 @@
* Supports either user or application authorization.
* @param tweetId the tweet's ID
* @param options options for the embedded tweet
+ * @return an OEmbedTweet representing the tweet in oEmbed form
* @throws ApiException if there is an error while communicating with Twitter.
* @throws MissingAuthorizationException if TwitterTemplate was not created with OAuth credentials or an application access token.
*/
@@ -247,8 +254,9 @@
/**
* Updates the user's status.
* @param status The status message
+ * @return the Tweet object
* @throws ApiException if there is an error while communicating with Twitter.
- * @throws DuplicateTweetException if the status message duplicates a previously posted status.
+ * @throws DuplicateStatusException if the status message duplicates a previously posted status.
* @throws MessageTooLongException if the length of the status message exceeds Twitter's 140 character limit.
* @throws MissingAuthorizationException if TwitterTemplate was not created with OAuth credentials.
*/
@@ -258,8 +266,9 @@
* Updates the user's status along with a picture.
* @param status The status message
* @param photo A {@link Resource} for the photo data. The given Resource must implement the getFilename() method (such as {@link FileSystemResource} or {@link ClassPathResource}) and must contain GIF, JPG, or PNG data.
+ * @return the Tweet object
* @throws ApiException if there is an error while communicating with Twitter.
- * @throws DuplicateTweetException if the status message duplicates a previously posted status.
+ * @throws DuplicateStatusException if the status message duplicates a previously posted status.
* @throws MessageTooLongException if the length of the status message exceeds Twitter's 140 character limit.
* @throws OperationNotPermittedException if the photo resource isn't a GIF, JPG, or PNG.
* @throws MissingAuthorizationException if TwitterTemplate was not created with OAuth credentials.
@@ -272,8 +281,9 @@
* Updates the user's status, including additional metadata concerning the status.
* @param status The status message
* @param details Metadata pertaining to the status
+ * @return the Tweet object
* @throws ApiException if there is an error while communicating with Twitter.
- * @throws DuplicateTweetException if the status message duplicates a previously posted status.
+ * @throws DuplicateStatusException if the status message duplicates a previously posted status.
* @throws MessageTooLongException if the length of the status message exceeds Twitter's 140 character limit.
* @throws MissingAuthorizationException if TwitterTemplate was not created with OAuth credentials.
* @deprecated Use {@link TimelineOperations#updateStatus(TweetData)} instead.
@@ -286,8 +296,9 @@
* @param status The status message
* @param photo A {@link Resource} for the photo data. The given Resource must implement the getFilename() method (such as {@link FileSystemResource} or {@link ClassPathResource}) and must contain GIF, JPG, or PNG data.
* @param details Metadata pertaining to the status
+ * @return the Tweet object
* @throws ApiException if there is an error while communicating with Twitter.
- * @throws DuplicateTweetException if the status message duplicates a previously posted status.
+ * @throws DuplicateStatusException if the status message duplicates a previously posted status.
* @throws MessageTooLongException if the length of the status message exceeds Twitter's 140 character limit.
* @throws OperationNotPermittedException if the photo resource isn't a GIF, JPG, or PNG.
* @throws MissingAuthorizationException if TwitterTemplate was not created with OAuth credentials.
@@ -299,8 +310,9 @@
/**
* Updates the user's status, including any additional metadata about the status carried in TweetData
* @param tweetData The data defining the status.
+ * @return the Tweet object
* @throws ApiException if there is an error while communicating with Twitter.
- * @throws DuplicateTweetException if the status message duplicates a previously posted status.
+ * @throws DuplicateStatusException if the status message duplicates a previously posted status.
* @throws MessageTooLongException if the length of the status message exceeds Twitter's 140 character limit.
* @throws OperationNotPermittedException if the photo resource isn't a GIF, JPG, or PNG.
* @throws MissingAuthorizationException if TwitterTemplate was not created with OAuth credentials.
@@ -318,6 +330,7 @@
/**
* Posts a retweet of an existing tweet.
* @param tweetId The ID of the tweet to be retweeted
+ * @return the Tweet object representing the retweet
* @throws ApiException if there is an error while communicating with Twitter.
* @throws MissingAuthorizationException if TwitterTemplate was not created with OAuth credentials.
*/
@@ -327,6 +340,7 @@
* Retrieves up to 100 retweets of a specific tweet.
* Supports either user or application authorization.
* @param tweetId the tweet's ID
+ * @return A list of Tweet objects representing the retweets
* @throws ApiException if there is an error while communicating with Twitter.
* @throws MissingAuthorizationException if TwitterTemplate was not created with OAuth credentials or an application access token.
*/
@@ -337,6 +351,7 @@
* Supports either user or application authorization.
* @param tweetId the tweet's ID
* @param count The maximum number of retweets to return. Should be less than or equal to 100. (Will return at most 100 entries, even if pageSize is greater than 100.)
+ * @return A list of Tweet objects representing the retweets
* @throws ApiException if there is an error while communicating with Twitter.
* @throws MissingAuthorizationException if TwitterTemplate was not created with OAuth credentials or an application access token.
*/
View
1  spring-social-twitter/src/main/java/org/springframework/social/twitter/api/Tweet.java
@@ -148,6 +148,7 @@ public void setRetweetCount(Integer retweetCount) {
* The number of times this tweet has been retweeted.
* Only available in timeline results.
* getRetweetCount() will return null for Tweet objects returned in search results.
+ * @return the number of times the tweet has been retweeted or null if that information is unavailable
*/
public Integer getRetweetCount() {
return retweetCount;
View
19 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/Twitter.java
@@ -28,53 +28,54 @@
public interface Twitter extends ApiBinding {
/**
- * Returns the portion of the Twitter API containing the block operations.
+ * @return the portion of the Twitter API containing the block operations.
*/
BlockOperations blockOperations();
/**
- * Returns the portion of the Twitter API containing the direct message operations.
+ * @return the portion of the Twitter API containing the direct message operations.
*/
DirectMessageOperations directMessageOperations();
/**
- * Returns the portion of the Twitter API containing the friends and followers operations.
+ * @return the portion of the Twitter API containing the friends and followers operations.
*/
FriendOperations friendOperations();
/**
- * Returns the portion of the Twitter API containing the geo location operations.
+ * @return the portion of the Twitter API containing the geo location operations.
*/
GeoOperations geoOperations();
/**
- * Returns the portion of the Twitter API containing the user list operations.
+ * @return the portion of the Twitter API containing the user list operations.
*/
ListOperations listOperations();
/**
- * Returns the portion of the Twitter API containing the search operations.
+ * @return the portion of the Twitter API containing the search operations.
*/
SearchOperations searchOperations();
/**
- * Returns the portion of the Twitter API containing the streaming operations.
+ * @return the portion of the Twitter API containing the streaming operations.
*/
StreamingOperations streamingOperations();
/**
- * Returns the portion of the Twitter API containing the tweet and timeline operations.
+ * @return the portion of the Twitter API containing the tweet and timeline operations.
*/
TimelineOperations timelineOperations();
/**
- * Returns the portion of the Twitter API containing the user operations.
+ * @return the portion of the Twitter API containing the user operations.
*/
UserOperations userOperations();
/**
* Returns the underlying {@link RestOperations} object allowing for consumption of Twitter endpoints that may not be otherwise covered by the API binding.
* The RestOperations object returned is configured to include an OAuth "Authorization" header on all requests.
+ * @return a RestOperations object instrumented for including an OAuth Authorization header on requests.
*/
RestOperations restOperations();
View
39 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/TwitterProfile.java
@@ -162,6 +162,7 @@ public Date getCreatedDate() {
/**
* Whether or not the user has mobile notifications enabled.
+ * @return true if the user has mobile notifications enabled
*/
public boolean isNotificationsEnabled() {
return notificationsEnabled;
@@ -170,6 +171,7 @@ public boolean isNotificationsEnabled() {
/**
* Whether or not the user is verified with Twitter.
* See http://support.twitter.com/groups/31-twitter-basics/topics/111-features/articles/119135-about-verified-accounts.
+ * @return true if the user is verified
*/
public boolean isVerified() {
return verified;
@@ -177,41 +179,42 @@ public boolean isVerified() {
/**
* Whether or not the user has enabled their account with geo location.
+ * @return true if geo-location is enabled
*/
public boolean isGeoEnabled() {
return geoEnabled;
}
/**
- * The user's preferred language.
+ * @return the user's preferred language.
*/
public String getLanguage() {
return language;
}
/**
- * The number of tweets this user has posted.
+ * @return the number of tweets this user has posted.
*/
public int getStatusesCount() {
return statusesCount;
}
/**
- * The number of lists the user is listed on.
+ * @return the number of lists the user is listed on.
*/
public int getListedCount() {
return listedCount;
}
/**
- * The number of friends the user has (the number of users this user follows).
+ * @return the number of friends the user has (the number of users this user follows).
*/
public int getFriendsCount() {
return friendsCount;
}
/**
- * The number of followers the user has.
+ * @return the number of followers the user has.
*/
public int getFollowersCount() {
return followersCount;
@@ -219,6 +222,7 @@ public int getFollowersCount() {
/**
* Whether or not the authenticated user is following this user.
+ * @return true if the authenticated user is following this user
*/
public boolean isFollowing() {
return following;
@@ -226,13 +230,14 @@ public boolean isFollowing() {
/**
* Whether or not a request has been sent by the authenticating user to follow this user.
+ * @return true if a follow request has been sent to this user
*/
public boolean isFollowRequestSent() {
return followRequestSent;
}
/**
- * The number of tweets that the user has marked as favorites.
+ * @return the number of tweets that the user has marked as favorites.
*/
public int getFavoritesCount() {
return favoritesCount;
@@ -240,20 +245,21 @@ public int getFavoritesCount() {
/**
* Whether or not the user's tweets are protected.
+ * @return true if the user's tweets are protected
*/
public boolean isProtected() {
return isProtected;
}
/**
- * The user's time zone.
+ * @return the user's time zone.
*/
public String getTimeZone() {
return timeZone;
}
/**
- * The user's UTC offset in seconds.
+ * @return the user's UTC offset in seconds.
*/
public int getUtcOffset() {
return utcOffset;
@@ -261,6 +267,7 @@ public int getUtcOffset() {
/**
* Whether or not this profile is enabled for contributors.
+ * @return true if contributors are enabled
*/
public boolean isContributorsEnabled() {
return contributorsEnabled;
@@ -268,27 +275,28 @@ public boolean isContributorsEnabled() {
/**
* Whether or not this user is a translator.
+ * @return true if the user is a translator
*/
public boolean isTranslator() {
return translator;
}
/**
- * The color of the sidebar border on the user's Twitter profile page.
+ * @return the color of the sidebar border on the user's Twitter profile page.
*/
public String getSidebarBorderColor() {
return sidebarBorderColor;
}
/**
- * The color of the sidebar fill on the user's Twitter profile page.
+ * @return the color of the sidebar fill on the user's Twitter profile page.
*/
public String getSidebarFillColor() {
return sidebarFillColor;
}
/**
- * The color of the background of the user's Twitter profile page.
+ * @return the color of the background of the user's Twitter profile page.
*/
public String getBackgroundColor() {
return backgroundColor;
@@ -296,13 +304,14 @@ public String getBackgroundColor() {
/**
* Whether or not the user's Twitter profile page uses a background image.
+ * @return true if the user's profile page uses a background image
*/
public boolean useBackgroundImage() {
return useBackgroundImage;
}
/**
- * The URL to a background image shown on the user's Twitter profile page.
+ * @return the URL to a background image shown on the user's Twitter profile page.
*/
public String getBackgroundImageUrl() {
return backgroundImageUrl;
@@ -310,20 +319,21 @@ public String getBackgroundImageUrl() {
/**
* Whether or not the background image is tiled.
+ * @return true if the background images is tiled
*/
public boolean isBackgroundImageTiled() {
return backgroundImageTiled;
}
/**
- * The text color on the user's Twitter profile page.
+ * @return the text color on the user's Twitter profile page.
*/
public String getTextColor() {
return textColor;
}
/**
- * The link color on the user's Twitter profile page.
+ * @return the link color on the user's Twitter profile page.
*/
public String getLinkColor() {
return linkColor;
@@ -332,6 +342,7 @@ public String getLinkColor() {
/**
* Whether or not the user has selected to see all inline media from everyone.
* If false, they will only see inline media from the users they follow.
+ * @return true if the user wats to see all inline media
*/
public boolean showAllInlineMedia() {
return showAllInlineMedia;
View
6 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/UrlEntity.java
@@ -19,10 +19,8 @@
import java.util.Arrays;
/**
- * A representation of a URL found within a tweet entity.
- * <p/>
- * User: bowen
- * Date: 12/26/11
+ * <p>A representation of a URL found within a tweet entity.</p>
+ * @author bowen
*/
public class UrlEntity extends TwitterObject implements Serializable {
View
7 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/UserOperations.java
@@ -76,6 +76,7 @@
/**
* Retrieves a list of Twitter profiles for the given list of user IDs.
* Supports either user or application authorization.
+ * @return a list of Twitter profiles
* @throws ApiException if there is an error while communicating with Twitter.
* @throws MissingAuthorizationException if TwitterTemplate was not created with OAuth credentials or an application access token.
*/
@@ -84,6 +85,7 @@
/**
* Retrieves a list of Twitter profiles for the given list of screen names.
* Supports either user or application authorization.
+ * @return a list of Twitter profiles
* @throws ApiException if there is an error while communicating with Twitter.
* @throws MissingAuthorizationException if TwitterTemplate was not created with OAuth credentials or an application access token.
*/
@@ -91,6 +93,7 @@
/**
* Searches for up to 20 users that match a given query.
+ * @return a list of Twitter profiles
* @throws ApiException if there is an error while communicating with Twitter.
* @throws MissingAuthorizationException if TwitterTemplate was not created with OAuth credentials.
*/
@@ -100,6 +103,7 @@
* Searches for users that match a given query.
* @param page the page of search results to return
* @param pageSize the number of {@link TwitterProfile}s per page. Maximum of 20 per page.
+ * @return a list of Twitter profiles
* @throws ApiException if there is an error while communicating with Twitter.
* @throws MissingAuthorizationException if TwitterTemplate was not created with OAuth credentials.
*/
@@ -108,6 +112,7 @@
/**
* Retrieves a list of categories from which suggested users to follow may be found.
* Supports either user or application authorization.
+ * @return a list of categories of suggested users
* @throws ApiException if there is an error while communicating with Twitter.
* @throws MissingAuthorizationException if TwitterTemplate was not created with OAuth credentials or an application access token.
*/
@@ -117,6 +122,7 @@
* Retrieves a list of suggestions of users to follow for a given category.
* Supports either user or application authorization.
* @param slug the category's slug
+ * @return a list of Twitter profiles
* @throws ApiException if there is an error while communicating with Twitter.
* @throws MissingAuthorizationException if TwitterTemplate was not created with OAuth credentials or an application access token.
*/
@@ -126,6 +132,7 @@
* Retrieves the rate limit statuses for each of the resource families passed as arguments
* Supports either user or application authorization.
* @param resources the list of resource families to inquire about
+ * @return a Map of resource families to rate limit statuses
* @throws ApiException if there is an error while communicating with Twitter.
* @throws MissingAuthorizationException if TwitterTemplate was not created with OAuth credentials or an application access token.
*/
View
4 spring-social-twitter/src/main/java/org/springframework/social/twitter/api/impl/RateLimitStatusHolder.java
@@ -25,7 +25,7 @@
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
/**
- * Holds a Map<ResourceFamily, List<RateLimitStatus>> object deserialized from Twitter's rate limit status
+ * Holds a Map&lt;ResourceFamily, List&lt;RateLimitStatus&gt;&gt; object deserialized from Twitter's rate limit status
* JSON structure.
* @author Jeremy Appel
*/
@@ -41,7 +41,7 @@ public RateLimitStatusHolder(Map<ResourceFamily, List<RateLimitStatus>> rateLimi
/**
* The map of rate limit statuses per resource family
- * @return Map<ResourceFamily, List<RateLimitStatus>>
+ * @return Map&lt;ResourceFamily, List&lt;RateLimitStatus&gt;&gt;
*/
public Map<ResourceFamily, List<RateLimitStatus>> getRateLimits() {
return rateLimitsResultMap;
Please sign in to comment.
Something went wrong with that request. Please try again.