Codota Logo
ActivityStreamService.updateActivityEntry
Code IndexAdd Codota to your IDE (free)

How to use
updateActivityEntry
method
in
org.apache.shindig.social.opensocial.spi.ActivityStreamService

Best Java code snippets using org.apache.shindig.social.opensocial.spi.ActivityStreamService.updateActivityEntry (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
origin: org.apache.shindig/shindig-social-api

/**
 * Allowed end-points /activitystreams/{userId}/@self/{appId}/{activityId}
 *
 * Examples: /activitystreams/john.doe/@self/1/object2 - postBody is an activity object
 *
 * @param request a {@link org.apache.shindig.social.opensocial.service.SocialRequestItem} object.
 * @return a {@link java.util.concurrent.Future} object.
 * @throws org.apache.shindig.protocol.ProtocolException if any.
 */
@Operation(httpMethods="PUT", bodyParam = "activity")
public Future<?> update(SocialRequestItem request) throws ProtocolException {
 Set<UserId> userIds = request.getUsers();
 List<String> activityIds = request.getListParameter("activityId");
 HandlerPreconditions.requireNotEmpty(userIds, "No userId specified");
 HandlerPreconditions.requireSingular(userIds, "Multiple userIds not supported");
 HandlerPreconditions.requireSingular(activityIds, "Must specify exactly one activity ID");
 return service.updateActivityEntry(Iterables.getOnlyElement(userIds), request.getGroup(),
   request.getAppId(), request.getFields(),
   request.getTypedParameter("activity", ActivityEntry.class),
   activityIds.iterator().next(),
   request.getToken());
}
origin: org.wso2.org.apache.shindig/shindig-social-api

/**
 * Allowed end-points /activitystreams/{userId}/@self/{appId}/{activityId}
 *
 * Examples: /activitystreams/john.doe/@self/1/object2 - postBody is an activity object
 *
 * @param request a {@link org.apache.shindig.social.opensocial.service.SocialRequestItem} object.
 * @return a {@link java.util.concurrent.Future} object.
 * @throws org.apache.shindig.protocol.ProtocolException if any.
 */
@Operation(httpMethods="PUT", bodyParam = "activity")
public Future<?> update(SocialRequestItem request) throws ProtocolException {
 Set<UserId> userIds = request.getUsers();
 List<String> activityIds = request.getListParameter("activityId");
 HandlerPreconditions.requireNotEmpty(userIds, "No userId specified");
 HandlerPreconditions.requireSingular(userIds, "Multiple userIds not supported");
 HandlerPreconditions.requireSingular(activityIds, "Must specify exactly one activity ID");
 return service.updateActivityEntry(Iterables.getOnlyElement(userIds), request.getGroup(),
   request.getAppId(), request.getFields(),
   request.getTypedParameter("activity", ActivityEntry.class),
   activityIds.iterator().next(),
   request.getToken());
}
origin: org.apache.shindig/shindig-social-api

@Test
public void testHandlePut() throws Exception {
 String jsonActivityEntry = "{title: 'hi mom!', object: {id: 'testObject'}}";
 String path = "/activitystreams/john.doe/@self/@app/testObject";
 RestHandler operation = registry.getRestHandler(path, "PUT");
 ActivityEntry entry = new ActivityEntryImpl();
 org.easymock.EasyMock.expect(converter.convertToObject(eq(jsonActivityEntry), eq(ActivityEntry.class)))
   .andReturn(entry);
 org.easymock.EasyMock.expect(service.updateActivityEntry(eq(JOHN_DOE.iterator().next()),
   eq(new GroupId(GroupId.Type.self, null)), eq("appId"), eq(ImmutableSet.<String>of()),
   eq(entry), eq("testObject"), eq(token))).andReturn(Futures.immediateFuture((ActivityEntry) null));
 replay();
 Future<?> future = operation.execute(Maps.<String, String[]>newHashMap(),
   new StringReader(jsonActivityEntry), token, converter);
 assertNull(future.get());
 verify();
 reset();
}
origin: org.wso2.org.apache.shindig/shindig-social-api

@Test
public void testHandlePut() throws Exception {
 String jsonActivityEntry = "{title: 'hi mom!', object: {id: 'testObject'}}";
 String path = "/activitystreams/john.doe/@self/@app/testObject";
 RestHandler operation = registry.getRestHandler(path, "PUT");
 ActivityEntry entry = new ActivityEntryImpl();
 org.easymock.EasyMock.expect(converter.convertToObject(eq(jsonActivityEntry), eq(ActivityEntry.class)))
   .andReturn(entry);
 org.easymock.EasyMock.expect(service.updateActivityEntry(eq(JOHN_DOE.iterator().next()),
   eq(new GroupId(GroupId.Type.self, null)), eq("appId"), eq(ImmutableSet.<String>of()),
   eq(entry), eq("testObject"), eq(token))).andReturn(Futures.immediateFuture((ActivityEntry) null));
 replay();
 Future<?> future = operation.execute(Maps.<String, String[]>newHashMap(),
   new StringReader(jsonActivityEntry), token, converter);
 assertNull(future.get());
 verify();
 reset();
}
org.apache.shindig.social.opensocial.spiActivityStreamServiceupdateActivityEntry

Javadoc

Updates the specified Activity.

Popular methods of ActivityStreamService

  • createActivityEntry
    Creates the passed in activity for the passed in user and group. Once createActivity is called, getA
  • deleteActivityEntries
    Deletes the activity for the passed in user and group that corresponds to the activityId.
  • getActivityEntries
    Returns a set of activities for the passed in user and group that corresponds to a list of activityI
  • getActivityEntry
    Returns an activity for the passed in user and group that corresponds to a single activityId.

Popular in Java

  • Making http post requests using okhttp
  • startActivity (Activity)
  • getSharedPreferences (Context)
  • onCreateOptionsMenu (Activity)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now