camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acosent...@apache.org
Subject [2/3] camel git commit: [CAMEL-9140] Add missing configuration properties in camel-facebook
Date Tue, 15 Sep 2015 19:14:57 GMT
[CAMEL-9140] Add missing configuration properties in camel-facebook


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/8f38e02b
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/8f38e02b
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/8f38e02b

Branch: refs/heads/master
Commit: 8f38e02ba8e465462a64e3ba52a69499b28759b8
Parents: ea53dce
Author: Manuel Holzleitner <manuel.holzleitner@gmail.com>
Authored: Tue Sep 15 14:05:17 2015 +0200
Committer: Andrea Cosentino <ancosen@gmail.com>
Committed: Tue Sep 15 21:08:57 2015 +0200

----------------------------------------------------------------------
 .../config/FacebookEndpointConfiguration.java   | 83 ++++++++++++++++++++
 .../facebook/data/FacebookMethodsType.java      | 14 ++--
 .../facebook/data/FacebookMethodsTypeTest.java  |  2 +-
 3 files changed, 91 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/8f38e02b/components/camel-facebook/src/main/java/org/apache/camel/component/facebook/config/FacebookEndpointConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-facebook/src/main/java/org/apache/camel/component/facebook/config/FacebookEndpointConfiguration.java
b/components/camel-facebook/src/main/java/org/apache/camel/component/facebook/config/FacebookEndpointConfiguration.java
index a8375af..261ea8b 100644
--- a/components/camel-facebook/src/main/java/org/apache/camel/component/facebook/config/FacebookEndpointConfiguration.java
+++ b/components/camel-facebook/src/main/java/org/apache/camel/component/facebook/config/FacebookEndpointConfiguration.java
@@ -159,6 +159,22 @@ public class FacebookEndpointConfiguration extends FacebookConfiguration
{
     private String userLocale;
     @UriParam
     private String videoId;
+    @UriParam
+    private Integer pictureId;
+    @UriParam
+    private Integer pictureId2;
+    @UriParam
+    private PictureSize pictureSize;
+    @UriParam
+    private String pageId;
+    @UriParam
+    private String tabId;
+    @UriParam
+    private Boolean isHidden;
+    @UriParam
+    private String offerId;
+    @UriParam
+    private String milestoneId;
 
     public URL getAchievementURL() {
         return achievementURL;
@@ -822,4 +838,71 @@ public class FacebookEndpointConfiguration extends FacebookConfiguration
{
         this.videoId = videoId;
     }
 
+    public Boolean getIncludeRead() {
+        return includeRead;
+    }
+
+    public Integer getPictureId() {
+        return pictureId;
+    }
+
+    public void setPictureId(Integer pictureId) {
+        this.pictureId = pictureId;
+    }
+
+    public Integer getPictureId2() {
+        return pictureId2;
+    }
+
+    public void setPictureId2(Integer pictureId2) {
+        this.pictureId2 = pictureId2;
+    }
+
+    public PictureSize getPictureSize() {
+        return pictureSize;
+    }
+
+    public void setPictureSize(PictureSize pictureSize) {
+        this.pictureSize = pictureSize;
+    }
+
+    public String getPageId() {
+        return pageId;
+    }
+
+    public void setPageId(String pageId) {
+        this.pageId = pageId;
+    }
+
+    public String getTabId() {
+        return tabId;
+    }
+
+    public void setTabId(String tabId) {
+        this.tabId = tabId;
+    }
+
+    public Boolean isHidden() {
+        return isHidden;
+    }
+
+    public void setIsHidden(Boolean isHidden) {
+        this.isHidden = isHidden;
+    }
+
+    public String getOfferId() {
+        return offerId;
+    }
+
+    public void setOfferId(String offerId) {
+        this.offerId = offerId;
+    }
+
+    public String getMilestoneId() {
+        return milestoneId;
+    }
+
+    public void setMilestoneId(String milestoneId) {
+        this.milestoneId = milestoneId;
+    }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/8f38e02b/components/camel-facebook/src/main/java/org/apache/camel/component/facebook/data/FacebookMethodsType.java
----------------------------------------------------------------------
diff --git a/components/camel-facebook/src/main/java/org/apache/camel/component/facebook/data/FacebookMethodsType.java
b/components/camel-facebook/src/main/java/org/apache/camel/component/facebook/data/FacebookMethodsType.java
index f46bed6..b5f3dd5 100644
--- a/components/camel-facebook/src/main/java/org/apache/camel/component/facebook/data/FacebookMethodsType.java
+++ b/components/camel-facebook/src/main/java/org/apache/camel/component/facebook/data/FacebookMethodsType.java
@@ -201,9 +201,9 @@ public enum FacebookMethodsType {
     GETGAMES_WITH_ID(ResponseList.class, "getGames", String.class, "userId"),
     GETGAMES_WITH_ID_OPTIONS(ResponseList.class, "getGames", String.class, "userId", Reading.class,
FacebookConstants.READING_PPROPERTY),
     GETINTERESTS(ResponseList.class, "getInterests"),
-    GETINTERESTS_WITH_OPTIONS(ResponseList.class, "getInterests", Reading.class, FacebookConstants.READING_PPROPERTY),
     GETINTERESTS_WITH_ID(ResponseList.class, "getInterests", String.class, "userId"),
-    GETINTERESTS_WITH_ID_OPTIONS(ResponseList.class, "getInterests", String.class, "userId",
Reading.class, FacebookConstants.READING_PPROPERTY),
+    GETINTERESTS_WITH_OPTIONS(ResponseList.class, "getInterests", Reading.class, FacebookConstants.READING_PPROPERTY),
+    GETINTERESTS_WITH_ID_OPTIONS(ResponseList.class, "getInterests",  String.class, "userId",
Reading.class, FacebookConstants.READING_PPROPERTY),
     GETMOVIES(ResponseList.class, "getMovies"),
     GETMOVIES_WITH_OPTIONS(ResponseList.class, "getMovies", Reading.class, FacebookConstants.READING_PPROPERTY),
     GETMOVIES_WITH_ID(ResponseList.class, "getMovies", String.class, "userId"),
@@ -481,11 +481,11 @@ public enum FacebookMethodsType {
     GETME(User.class,  "getMe"),
     GETME_WITH_OPTIONS(User.class,  "getMe", Reading.class, FacebookConstants.READING_PPROPERTY),
     GETPICTUREURL(URL.class,  "getPictureURL"),
-    GETPICTUREURL_WITH_DIM(URL.class,  "getPictureURL", int.class, "pictureid", int.class,
"pictureid2"),
+    GETPICTUREURL_WITH_DIM(URL.class,  "getPictureURL", int.class, "pictureId", int.class,
"pictureId2"),
     GETPICTUREURL_WITH_PICTURESIZE(URL.class,  "getPictureURL", PictureSize.class, "size"),
     GETPICTUREURL_WITH_ID(URL.class,  "getPictureURL", String.class, "userId"),
     GETPICTUREURL_WITH_ID_PICTURESIZE(URL.class,  "getPictureURL", String.class, "userId",
PictureSize.class, "size"),
-    GETPICTUREURL_WITH_ID_AND_DIM(URL.class,  "getPictureURL", String.class, "userId", int.class,
"pictureid", int.class, "pictureid2"),
+    GETPICTUREURL_WITH_ID_AND_DIM(URL.class,  "getPictureURL", String.class, "userId", int.class,
"pictureId", int.class, "pictureId2"),
     GETSSLPICTUREURL(URL.class,  "getSSLPictureURL"),
     GETSSLPICTUREURL_WITH_PICTURESIZE(URL.class,  "getSSLPictureURL", PictureSize.class,
"size"),
     GETSSLPICTUREURL_WITH_ID(URL.class,  "getSSLPictureURL", String.class, "userId"),
@@ -530,8 +530,8 @@ public enum FacebookMethodsType {
     SEARCHPOSTS(ResponseList.class, "searchPosts", String.class, "query"),
     SEARCHPOSTS_WITH_OPTIONS(ResponseList.class, "searchPosts", String.class, "query", Reading.class,
FacebookConstants.READING_PPROPERTY),
     SEARCHUSERS(ResponseList.class, "searchUsers", String.class, "query"),
-    SEARCHUSERS_WITH_OPTIONS(ResponseList.class, "searchUsers", String.class, "query", Reading.class,
FacebookConstants.READING_PPROPERTY),    
-    
+    SEARCHUSERS_WITH_OPTIONS(ResponseList.class, "searchUsers", String.class, "query", Reading.class,
FacebookConstants.READING_PPROPERTY),
+
     // FROM UPDATE to 2.2.2 API
     BLOCK_USERLIST(Map.class, "block", List.class, "list"),
     BLOCK_USERLIST_WITH_PAGEID(Map.class, "block", String.class, "pageId", List.class, "list"),
@@ -552,7 +552,7 @@ public enum FacebookMethodsType {
     GET_PAGE_PICTURE_URL_WITH_PAGEID(URL.class, "getPagePictureURL", String.class, "pageId"),
     GET_PAGE_PICTURE_URL_WITH_PAGEID_AND_SIZE(URL.class, "getPagePictureURL", String.class,
"pageId", PictureSize.class, "pictureSize"),
     UPDATE_PAGE_BASIC_ATTRIBUTES(Boolean.class, "updatePageBasicAttributes", PageUpdate.class,
"pageUpdate"),
-    UPDATE_PAGE_BASIC_ATTRIBUTES_WITH_PAGEID(boolean.class, "updatePageBasicAttributes",
String.class, "pageId", PageUpdate.class, "pageUpdate"),   
+    UPDATE_PAGE_BASIC_ATTRIBUTES_WITH_PAGEID(boolean.class, "updatePageBasicAttributes",
String.class, "pageId", PageUpdate.class, "pageUpdate"),
     UPDATE_PAGE_PROFILE_PHOTO(boolean.class, "updatePageProfilePhoto", Media.class, "source"),
     UPDATE_PAGE_PROFILE_PHOTO_WITH_PAGEID(boolean.class, "updatePageProfilePhoto", String.class,
"pageId", Media.class, "source"),
     UPDATE_PAGE_PROFILE_PHOTO_WITH_PAGEID_AND_URL(boolean.class, "updatePageProfilePhoto",
String.class, "pageId", URL.class, "picture"),

http://git-wip-us.apache.org/repos/asf/camel/blob/8f38e02b/components/camel-facebook/src/test/java/org/apache/camel/component/facebook/data/FacebookMethodsTypeTest.java
----------------------------------------------------------------------
diff --git a/components/camel-facebook/src/test/java/org/apache/camel/component/facebook/data/FacebookMethodsTypeTest.java
b/components/camel-facebook/src/test/java/org/apache/camel/component/facebook/data/FacebookMethodsTypeTest.java
index 8c3c523..608d5b4 100644
--- a/components/camel-facebook/src/test/java/org/apache/camel/component/facebook/data/FacebookMethodsTypeTest.java
+++ b/components/camel-facebook/src/test/java/org/apache/camel/component/facebook/data/FacebookMethodsTypeTest.java
@@ -39,7 +39,7 @@ public class FacebookMethodsTypeTest {
                 // check all methods of this *Methods interface
                 for (Method method : clazz.getDeclaredMethods()) {
                     final FacebookMethodsType methodsType = FacebookMethodsType.findMethod(method.getName(),
method.getParameterTypes());
-                    assertNotNull(methodsType);
+                    assertNotNull("Expected method mapping not found:" + method.getName(),
methodsType);
                     assertEquals("Methods are not equal", method, methodsType.getMethod());
                 }
             }


Mime
View raw message