public class InstagramActivityUtil extends Object
Constructor and Description |
---|
InstagramActivityUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
addImageObjects(List<ActivityObject> attachments,
org.jinstagram.entity.users.feed.MediaFeedData item)
Adds any image objects to the attachment field.
|
static void |
addInstagramExtensions(Activity activity,
org.jinstagram.entity.users.feed.MediaFeedData item)
Takes various parameters from the instagram object that are currently not part of the
activity schema and stores them in a generic extensions attribute.
|
static void |
addLocationExtension(Activity activity,
org.jinstagram.entity.users.feed.MediaFeedData item)
Adds the location extension and populates with the instagram data.
|
static void |
addVideoObjects(List<ActivityObject> attachments,
org.jinstagram.entity.users.feed.MediaFeedData item)
Adds any video objects to the attachment field.
|
static ActivityObject |
buildActivityObject(org.jinstagram.entity.users.feed.MediaFeedData item)
Builds the object.
|
static List<ActivityObject> |
buildActivityObjectAttachments(org.jinstagram.entity.users.feed.MediaFeedData item)
Builds all of the attachments associated with a MediaFeedData object.
|
static ActivityObject |
buildActor(org.jinstagram.entity.users.feed.MediaFeedData item)
Builds the actor.
|
static ActivityObject |
buildActor(org.jinstagram.entity.users.basicinfo.UserInfoData item)
Builds an Actor object given a UserInfoData object.
|
static String |
formatId(String... idparts)
Formats the ID to conform with the Apache Streams activity ID convention
|
static List<String> |
getLinks(org.jinstagram.entity.users.feed.MediaFeedData item)
Gets the links from the Instagram event.
|
static Provider |
getProvider()
Gets the common instagram
Provider object. |
static void |
updateActivity(org.jinstagram.entity.users.feed.MediaFeedData item,
Activity activity)
Updates the given Activity object with the values from the item
|
static void |
updateActivity(org.jinstagram.entity.users.basicinfo.UserInfoData item,
Activity activity)
Updates the given Activity object with the values from the item
|
public static void updateActivity(org.jinstagram.entity.users.feed.MediaFeedData item, Activity activity) throws ActivityConversionException
item
- the object to use as the sourceactivity
- the target of the updates. Will receive all values from the tweet.ActivityConversionException
- ActivityConversionExceptionpublic static void updateActivity(org.jinstagram.entity.users.basicinfo.UserInfoData item, Activity activity) throws ActivitySerializerException
item
- the object to use as the sourceactivity
- the target of the updates. Will receive all values from the tweet.ActivitySerializerException
- ActivitySerializerExceptionpublic static ActivityObject buildActor(org.jinstagram.entity.users.basicinfo.UserInfoData item)
item
- UserInfoData itempublic static ActivityObject buildActor(org.jinstagram.entity.users.feed.MediaFeedData item)
item
- MediaFeedData itempublic static ActivityObject buildActivityObject(org.jinstagram.entity.users.feed.MediaFeedData item)
item
- the itempublic static List<ActivityObject> buildActivityObjectAttachments(org.jinstagram.entity.users.feed.MediaFeedData item)
item
- itempublic static void addImageObjects(List<ActivityObject> attachments, org.jinstagram.entity.users.feed.MediaFeedData item)
attachments
- attachmentsitem
- itempublic static void addVideoObjects(List<ActivityObject> attachments, org.jinstagram.entity.users.feed.MediaFeedData item)
attachments
- attachmentsitem
- itempublic static List<String> getLinks(org.jinstagram.entity.users.feed.MediaFeedData item)
item
- the object to use as the sourcepublic static void addLocationExtension(Activity activity, org.jinstagram.entity.users.feed.MediaFeedData item)
activity
- the Activity object to updateitem
- the object to use as the sourcepublic static Provider getProvider()
Provider
object.public static String formatId(String... idparts)
idparts
- the parts of the ID to joinpublic static void addInstagramExtensions(Activity activity, org.jinstagram.entity.users.feed.MediaFeedData item)
activity
- Activity activityitem
- MediaFeedData itemCopyright © 2017 The Apache Software Foundation. All rights reserved.