streams-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfranklin <...@git.apache.org>
Subject [GitHub] incubator-streams pull request: STREAMS-93 | Updated the Hashtag P...
Date Tue, 27 May 2014 14:17:02 GMT
Github user mfranklin commented on a diff in the pull request:

    https://github.com/apache/incubator-streams/pull/25#discussion_r13079542
  
    --- Diff: streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/serializer/TwitterJsonActivitySerializer.java
---
    @@ -81,6 +87,86 @@ else if( documentSubType == Delete.class )
             throw new NotImplementedException();
         }
     
    +    public static Actor buildActorRetweet(Retweet tweet) {
    +        return buildActor(tweet.getUser());
    +    }
    +
    +    public static Actor buildActorTweet(Tweet tweet) {
    +        return buildActor(tweet.getUser());
    +    }
    +
    +    public static Actor buildActor(User user) {
    +        Actor actor = new Actor();
    +
    +        actor.setId(formatId(
    +                Optional.fromNullable(
    +                        user.getIdStr())
    +                        .or(Optional.of(user.getId().toString()))
    +                        .orNull()
    +        ));
    +        actor.setDisplayName(user.getScreenName());
    --- End diff --
    
    This is overridden below.  I think we need to keep both in the object.  In this case,
an extensions may not make sense. I think we update the activity to have a handle property
that stores screen names.  


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message