Tabnine Logo
ActivityStreamService.deleteActivityEntries
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.wso2.org.apache.shindig/shindig-social-api

/**
 * Allowed end-points /activitystreams/{userId}/@self/{appId}/{activityId}+
 *
 * Examples: /activitystreams/john.doe/@self/1/object1,object2
 *
 * @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="DELETE")
public Future<?> delete(SocialRequestItem request)
  throws ProtocolException {
 Set<UserId> userIds = request.getUsers();
 Set<String> activityIds = ImmutableSet.copyOf(request.getListParameter("activityId"));
 HandlerPreconditions.requireNotEmpty(userIds, "No userId specified");
 HandlerPreconditions.requireSingular(userIds, "Multiple userIds not supported");
 HandlerPreconditions.requireNotEmpty(activityIds, "At least one activity ID must be specified");
 return service.deleteActivityEntries(Iterables.getOnlyElement(userIds), request.getGroup(),
   request.getAppId(), activityIds, request.getToken());
}
origin: org.apache.shindig/shindig-social-api

/**
 * Allowed end-points /activitystreams/{userId}/@self/{appId}/{activityId}+
 *
 * Examples: /activitystreams/john.doe/@self/1/object1,object2
 *
 * @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="DELETE")
public Future<?> delete(SocialRequestItem request)
  throws ProtocolException {
 Set<UserId> userIds = request.getUsers();
 Set<String> activityIds = ImmutableSet.copyOf(request.getListParameter("activityId"));
 HandlerPreconditions.requireNotEmpty(userIds, "No userId specified");
 HandlerPreconditions.requireSingular(userIds, "Multiple userIds not supported");
 HandlerPreconditions.requireNotEmpty(activityIds, "At least one activity ID must be specified");
 return service.deleteActivityEntries(Iterables.getOnlyElement(userIds), request.getGroup(),
   request.getAppId(), activityIds, request.getToken());
}
origin: org.apache.shindig/shindig-social-api

@Test
public void testHandleDelete() throws Exception {
 String path = "/activitystreams/john.doe/@self/@app/myObjectId123";
 RestHandler operation = registry.getRestHandler(path, "DELETE");
 org.easymock.EasyMock.expect(service.deleteActivityEntries(eq(JOHN_DOE.iterator().next()),
   eq(new GroupId(GroupId.Type.self, null)), eq("appId"), eq(ImmutableSet.of("myObjectId123")),
   eq(token))).andReturn(Futures.immediateFuture((Void) null));
 replay();
 assertNull(operation.execute(Maps.<String, String[]>newHashMap(), null,
   token, converter).get());
 verify();
 reset();
}
origin: org.wso2.org.apache.shindig/shindig-social-api

@Test
public void testHandleDelete() throws Exception {
 String path = "/activitystreams/john.doe/@self/@app/myObjectId123";
 RestHandler operation = registry.getRestHandler(path, "DELETE");
 org.easymock.EasyMock.expect(service.deleteActivityEntries(eq(JOHN_DOE.iterator().next()),
   eq(new GroupId(GroupId.Type.self, null)), eq("appId"), eq(ImmutableSet.of("myObjectId123")),
   eq(token))).andReturn(Futures.immediateFuture((Void) null));
 replay();
 assertNull(operation.execute(Maps.<String, String[]>newHashMap(), null,
   token, converter).get());
 verify();
 reset();
}
org.apache.shindig.social.opensocial.spiActivityStreamServicedeleteActivityEntries

Javadoc

Deletes the activity for the passed in user and group that corresponds to the activityId.

Popular methods of ActivityStreamService

  • createActivityEntry
    Creates the passed in activity for the passed in user and group. Once createActivity is called, getA
  • 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.
  • updateActivityEntry
    Updates the specified Activity.

Popular in Java

  • Making http post requests using okhttp
  • putExtra (Intent)
  • getSystemService (Context)
  • startActivity (Activity)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now