com.vodafone360.people.datatypes
Class ActivityItem

java.lang.Object
  extended by com.vodafone360.people.datatypes.BaseDataType
      extended by com.vodafone360.people.datatypes.ActivityItem

public class ActivityItem
extends BaseDataType

BaseDataType encapsulating an ActivityItem retrieved from, or to be issued to, Now + server


Nested Class Summary
static class ActivityItem.Flag
          Flags identifying ActivityItems as Status or Timeline events and already read
private static class ActivityItem.Tags
          Tags associated with ActivityItem representing data items associated with Activities returned from server.
static class ActivityItem.Type
          Activity types, a number of these types are not currently handled by People client but will be as more activity events are supported.
static class ActivityItem.Visibility
          Visibility flags for ActivityItem
 
Field Summary
private static int ADDRESSBOOK
           
static int ALREADY_READ
           
private static int BUSINESSCONTACTS
           
private static int CONNECTED_FRIENDS
           
private static int KNOWUSER
           
 java.lang.Integer mActivityFlags
           
 java.lang.Long mActivityId
           
 java.util.List<ActivityContact> mContactList
          Defines the contact information of the counter-parties in the activity.
 java.lang.String mDescription
          Long text description of the activity.
 java.util.List<ActivityItem.Flag> mFlagList
          Miscellaneous flags.
 java.lang.Boolean mHasChildren
          Indicates wether this activity 'groups' several child activities.
 java.lang.Long mLocalActivityId
          local id for db
 java.lang.Long mParentActivity
          The parent activity for 'grouped' or aggregated activities.
 java.nio.ByteBuffer mPreview
          Defines a binary preview for the activity.
 java.lang.String mPreviewMime
          Defines the MIME type of the preview binary data.
 java.lang.String mPreviewUrl
          Defines an http url that the client can use to retrieve preview binary data.
 java.lang.String mStore
          Name of the store type for this message.
 java.lang.Long mTime
           
 java.lang.String mTitle
          Short text description of the activity.
 ActivityItem.Type mType
          Defines the type of the activity.
 java.lang.String mUri
           
 java.util.List<ActivityItem.Visibility> mVisibility
          Defines the visibility of the activity.
 java.lang.Integer mVisibilityFlags
           
private static int ORIGINATOR
           
private static int RECIPIENT
           
static int STATUS_ITEM
           
static int TIMELINE_ITEM
           
 
Constructor Summary
ActivityItem()
           
 
Method Summary
static ActivityItem createFromHashtable(java.util.Hashtable<java.lang.String,java.lang.Object> hash)
          Create ActivityItem from HashTable generated by Hessian-decoder
 java.lang.String name()
          Return name of the current Data-type.
private  void setValue(ActivityItem.Tags tag, java.lang.Object value)
          Sets the value of the member data item associated with the specified tag.
 java.lang.String toString()
          
private  void updateMiscFlags(ActivityItem.Flag flagValue)
          Set values for mActivityFlags flag.
private  void updateVisibilityFlags(ActivityItem.Visibility flagValue)
          Update visibility flag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ALREADY_READ

public static final int ALREADY_READ
See Also:
Constant Field Values

TIMELINE_ITEM

public static final int TIMELINE_ITEM
See Also:
Constant Field Values

STATUS_ITEM

public static final int STATUS_ITEM
See Also:
Constant Field Values

ORIGINATOR

private static final int ORIGINATOR
See Also:
Constant Field Values

RECIPIENT

private static final int RECIPIENT
See Also:
Constant Field Values

ADDRESSBOOK

private static final int ADDRESSBOOK
See Also:
Constant Field Values

BUSINESSCONTACTS

private static final int BUSINESSCONTACTS
See Also:
Constant Field Values

KNOWUSER

private static final int KNOWUSER
See Also:
Constant Field Values

CONNECTED_FRIENDS

private static final int CONNECTED_FRIENDS
See Also:
Constant Field Values

mLocalActivityId

public java.lang.Long mLocalActivityId
local id for db


mActivityId

public java.lang.Long mActivityId

mTime

public java.lang.Long mTime

mType

public ActivityItem.Type mType
Defines the type of the activity.


mUri

public java.lang.String mUri

mTitle

public java.lang.String mTitle
Short text description of the activity.


mDescription

public java.lang.String mDescription
Long text description of the activity.


mPreview

public java.nio.ByteBuffer mPreview
Defines a binary preview for the activity. The preview can be a small thumbnail of the activity. The type of the binary data is defined into the previewmime field.


mPreviewMime

public java.lang.String mPreviewMime
Defines the MIME type of the preview binary data.


mPreviewUrl

public java.lang.String mPreviewUrl
Defines an http url that the client can use to retrieve preview binary data. Can be used to embed the url into an IMG HTML tag.


mStore

public java.lang.String mStore
Name of the store type for this message. This field contains information about the originator network (local or external community activity). By default, should be set to local


mFlagList

public java.util.List<ActivityItem.Flag> mFlagList
Miscellaneous flags.


mActivityFlags

public java.lang.Integer mActivityFlags

mParentActivity

public java.lang.Long mParentActivity
The parent activity for 'grouped' or aggregated activities. This must be empty for normal activities that can be retrieved normally. Normally, a GetActivities without filter will not yield any 'grouped' or 'child' activities. To get activities that have a mParentActivity set, the 'children' filter must be used with a value of the parent Activity's id.


mHasChildren

public java.lang.Boolean mHasChildren
Indicates wether this activity 'groups' several child activities. When set, there must be child activities set that refer the main activity. Normally, a GetActivities without filter will not yield any 'grouped' or 'child' activities. To get activities that have a parentactivity set, the 'children' filter must be used with a value of the parent Activity's id.


mVisibility

public java.util.List<ActivityItem.Visibility> mVisibility
Defines the visibility of the activity.


mVisibilityFlags

public java.lang.Integer mVisibilityFlags

mContactList

public java.util.List<ActivityContact> mContactList
Defines the contact information of the counter-parties in the activity. This field is not mandatory, because some activity types are not related to contacts, but required if known..

Constructor Detail

ActivityItem

public ActivityItem()
Method Detail

name

public java.lang.String name()
Return name of the current Data-type.

Specified by:
name in class BaseDataType
Returns:
String containing name of the data-type.

createFromHashtable

public static ActivityItem createFromHashtable(java.util.Hashtable<java.lang.String,java.lang.Object> hash)
Create ActivityItem from HashTable generated by Hessian-decoder

Parameters:
hash - Hashtable representing ActivityItem
Returns:
ActivityItem created from Hashtable

setValue

private void setValue(ActivityItem.Tags tag,
                      java.lang.Object value)
Sets the value of the member data item associated with the specified tag.

Parameters:
tag - Current tag
val - Value associated with the tag

updateMiscFlags

private void updateMiscFlags(ActivityItem.Flag flagValue)
Set values for mActivityFlags flag. This actually stores whether the ActivityItem is a Status or Timeline event, and whether item is unread.

Parameters:
flagValue - Value to add to mActivityFlags item.

updateVisibilityFlags

private void updateVisibilityFlags(ActivityItem.Visibility flagValue)
Update visibility flag. This can take on a number of values as defined by the online API documentation associated with the getactivities API.

Parameters:
flagValue - visibility value to add to mVisibilityFlags.

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object


JavaDoc