本文整理了Java中org.apache.streams.pojo.json.Activity.setAdditionalProperty()
方法的一些代码示例,展示了Activity.setAdditionalProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Activity.setAdditionalProperty()
方法的具体详情如下:
包路径:org.apache.streams.pojo.json.Activity
类名称:Activity
方法名:setAdditionalProperty
暂无
代码示例来源:origin: apache/streams
public void setExtensions(Activity activity, Map<String, Object> extensions) {
activity.setAdditionalProperty(extensionProperty, extensions);
}
代码示例来源:origin: apache/streams
/**
* Creates a standard extension property.
* @param activity activity to create the property in
* @return the Map representing the extensions property
*/
@SuppressWarnings("unchecked")
@Deprecated
public static Map<String, Object> ensureExtensions(Activity activity) {
Map<String, Object> extensions = (Map)activity.getAdditionalProperties().get(EXTENSION_PROPERTY);
if (extensions == null) {
extensions = new HashMap<>();
activity.setAdditionalProperty(EXTENSION_PROPERTY, extensions);
}
return extensions;
}
代码示例来源:origin: apache/streams
/**
* Given a {@link Channel} object and an
* {@link Activity} object, fill out the appropriate details
*
* @param channel Channel
* @param activity Activity
* @throws ActivitySerializerException ActivitySerializerException
*/
public static void updateActivity(Channel channel, Activity activity, String channelId) throws ActivitySerializerException {
try {
activity.setProvider(getProvider());
activity.setVerb("post");
activity.setActor(createActorForChannel(channel));
Map<String, Object> extensions = new HashMap<>();
extensions.put("youtube", channel);
activity.setAdditionalProperty("extensions", extensions);
} catch (Throwable throwable) {
throw new ActivitySerializerException(throwable);
}
}
代码示例来源:origin: apache/streams
FileInputStream testActivityFileStream = new FileInputStream(docPath.toFile());
Activity activity = MAPPER.readValue(testActivityFileStream, Activity.class);
activity.setAdditionalProperty("updated", Boolean.TRUE);
StreamsDatum datum = new StreamsDatum(activity, activity.getVerb());
if( !StringUtils.isEmpty(activity.getObject().getObjectType())) {
代码示例来源:origin: apache/streams
Activity activity = MAPPER.readValue(testActivityFileStream, Activity.class);
Activity update = new Activity();
update.setAdditionalProperty("updated", Boolean.TRUE);
update.setAdditionalProperty("str", "str");
update.setAdditionalProperty("long", 10L);
update.setActor(
new ActivityObject()
内容来源于网络,如有侵权,请联系作者删除!