congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ActivityEntry
Code IndexAdd Tabnine to your IDE (free)

How to use
ActivityEntry
in
org.apache.shindig.social.opensocial.model

Best Java code snippets using org.apache.shindig.social.opensocial.model.ActivityEntry (Showing top 8 results out of 315)

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

 /**
  * Sorts ActivityEntries in ascending order based on publish date.
  *
  * @param that is the ActivityEntry to compare to this ActivityEntry
  *
  * @return int represents how the ActivityEntries compare
  */
 public int compareTo(ActivityEntry that) {
  if (this.getPublished() == null && that.getPublished() == null) {
   return 0;   // both are null, equal
  } else if (this.getPublished() == null) {
   return -1;  // this is null, comes before real date
  } else if (that.getPublished() == null) {
   return 1;   // that is null, this comes after
  } else {      // compare publish dates in lexicographical order
   return this.getPublished().compareTo(that.getPublished());
  }
 }
}
origin: org.wso2.org.apache.shindig/shindig-social-api

 /**
  * @param activityEntry
  */
 public AtomAuthor(ActivityEntry activityEntry) {
  uri = activityEntry.getActor().getUrl();
  name = activityEntry.getActor().getDisplayName();
  if (name == null) {
   name = activityEntry.getActor().getId();
  }
 }
}
origin: org.apache.shindig/shindig-social-api

} else if (o instanceof ActivityEntry) {
 ActivityEntry activity = (ActivityEntry)o;
 id = activity.getId();
 title = activity.getTitle();
 summary = new AtomSummary(activity.getObject().getSummary());
 link = new AtomLink("alternate", activity.getObject().getUrl());
 author = new AtomAuthor(activity);
 content = new AtomContent(activity);
 try {
  updated = new SimpleDateFormat().parse(activity.getPublished());
 } catch (ParseException e) {
origin: org.apache.shindig/shindig-social-api

@Test
public void testGetExpectedActivityEntry() throws Exception {
 ActivityEntry entry = db.getActivityEntry(JOHN_DOE, SELF_GROUP, APP_ID,
   ImmutableSet.of("title"), "activity2", new FakeGadgetToken()).get();
 assertNotNull(entry);
 // Check that some fields are fetched and others are not
 assertNotNull(entry.getTitle());
 assertNull(entry.getPublished());
}
origin: org.wso2.org.apache.shindig/shindig-social-api

} else if (o instanceof ActivityEntry) {
 ActivityEntry activity = (ActivityEntry)o;
 id = activity.getId();
 title = activity.getTitle();
 summary = new AtomSummary(activity.getObject().getSummary());
 link = new AtomLink("alternate", activity.getObject().getUrl());
 author = new AtomAuthor(activity);
 content = new AtomContent(activity);
 try {
  updated = new SimpleDateFormat().parse(activity.getPublished());
 } catch (ParseException e) {
origin: org.wso2.org.apache.shindig/shindig-social-api

@Test
public void testGetExpectedActivityEntry() throws Exception {
 ActivityEntry entry = db.getActivityEntry(JOHN_DOE, SELF_GROUP, APP_ID,
   ImmutableSet.of("title"), "activity2", new FakeGadgetToken()).get();
 assertNotNull(entry);
 // Check that some fields are fetched and others are not
 assertNotNull(entry.getTitle());
 assertNull(entry.getPublished());
}
origin: org.wso2.org.apache.shindig/shindig-social-api

 /**
  * Sorts ActivityEntries in ascending order based on publish date.
  *
  * @param that is the ActivityEntry to compare to this ActivityEntry
  *
  * @return int represents how the ActivityEntries compare
  */
 public int compareTo(ActivityEntry that) {
  if (this.getPublished() == null && that.getPublished() == null) {
   return 0;   // both are null, equal
  } else if (this.getPublished() == null) {
   return -1;  // this is null, comes before real date
  } else if (that.getPublished() == null) {
   return 1;   // that is null, this comes after
  } else {      // compare publish dates in lexicographical order
   return this.getPublished().compareTo(that.getPublished());
  }
 }
}
origin: org.apache.shindig/shindig-social-api

 /**
  * @param activityEntry
  */
 public AtomAuthor(ActivityEntry activityEntry) {
  uri = activityEntry.getActor().getUrl();
  name = activityEntry.getActor().getDisplayName();
  if (name == null) {
   name = activityEntry.getActor().getId();
  }
 }
}
org.apache.shindig.social.opensocial.modelActivityEntry

Javadoc

Represents an 'Activity' within the Activity Streams JSON 1.0 specification. Refer to http://activitystrea.ms/head/json-activity.html

Most used methods

  • getPublished
    getPublished
  • getTitle
    getTitle
  • getActor
    getActor
  • getId
    getId
  • getObject
    getObject

Popular in Java

  • Finding current android device location
  • onRequestPermissionsResult (Fragment)
  • setRequestProperty (URLConnection)
  • runOnUiThread (Activity)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • String (java.lang)
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Best IntelliJ plugins
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