org.shredzone.flattr4j.model
Class Activity

java.lang.Object
  extended by org.shredzone.flattr4j.model.Resource
      extended by org.shredzone.flattr4j.model.Activity
All Implemented Interfaces:
Serializable

public class Activity
extends Resource

Represents a single activity.

Handling Activity Streams is beyond the scope of this library. However, this class gives basic access to the Activity Stream item.

Since:
2.0
Author:
Richard "Shred" Körber
See Also:
Activity Streams Specs, Serialized Form

Nested Class Summary
static class Activity.Type
          Available activity types.
 
Field Summary
 
Fields inherited from class org.shredzone.flattr4j.model.Resource
data
 
Constructor Summary
Activity(FlattrObject data)
           
 
Method Summary
 String getActivityId()
          Returns a unique activity ID.
 String getActor(String key)
          Gets a property of the "Actor" object.
 String getObject(String key)
          Gets a property of the "Object" object.
 Date getPublished()
          Returns the activity publication date.
 String getTitle()
          Returns the activity title.
 String getVerb()
          Returns the activity verb.
 
Methods inherited from class org.shredzone.flattr4j.model.Resource
toFlattrObject, toJSON
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Activity

public Activity(FlattrObject data)
Method Detail

getPublished

public Date getPublished()
Returns the activity publication date.


getTitle

public String getTitle()
Returns the activity title.


getVerb

public String getVerb()
Returns the activity verb.


getActivityId

public String getActivityId()
Returns a unique activity ID.


getActor

public String getActor(String key)
Gets a property of the "Actor" object.

Parameters:
key - property name (e.g. "objectType", "url", "displayName")
Returns:
Property value, or null if there is no such property
See Also:
Activity Stream Objects

getObject

public String getObject(String key)
Gets a property of the "Object" object.

Parameters:
key - property name (e.g. "objectType", "url", "displayName")
Returns:
Property value, or null if there is no such property
See Also:
Activity Stream Objects


Copyright © 2010-2012. All Rights Reserved.