danger.app
Class GalleryItemIPCPayload

java.lang.Object
  extended by danger.app.GalleryItemIPCPayload
Direct Known Subclasses:
PhotoRecordIPCPayload


public class GalleryItemIPCPayload
extends Object

The GalleryItemIPCPayload class encapuslates GalleryItem objects that are returned from the camera gallery.

Since:
4.5

Field Summary
protected  Vector<GalleryItem> mRecords
           
 
Constructor Summary
GalleryItemIPCPayload()
          Class constructor for passing multiple record types over IPC.
 
Method Summary
 void addRecord(GalleryItem galleryItem)
          Add a gallery item into the IPC payload.
 void addRecordList(List<GalleryItem> galleryItems)
          Add multiple records into the IPC payload.
 void addRecords(Vector records)
          Add multiple records into the IPC payload.
 Date getDateCreated()
          Returns a timestamp representing when this GalleryItem was created.
 GalleryItem getGalleryItemAt(int index)
          Get a GalleryItem in the IPC payload.
 long getPayloadByteCount()
          Get the size in bytes of all the GalleryItem in the payload.
 int getRecordCount()
          Get the number of GalleryItems in the payload.
 IPCRegistryRecord getRegistryRecord()
          Get the IPCRegistryRecord corresponding to the IPC target.
 String getTargetProvider()
          Get the name of the IPC target.
 void setRegistryRecord(IPCRegistryRecord ipcRegistryRecord)
          Set the IPCRegistryRecord corresponding to the IPC target.
 void setTargetProvider(String provider)
          Set the name of the IPC target.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mRecords

protected Vector<GalleryItem> mRecords
Constructor Detail

GalleryItemIPCPayload

public GalleryItemIPCPayload()
Class constructor for passing multiple record types over IPC.

Method Detail

addRecord

public final void addRecord(GalleryItem galleryItem)
Add a gallery item into the IPC payload.

Parameters:
galleryItem - gallery item to add to IPC payload.

addRecords

public final void addRecords(Vector records)
Add multiple records into the IPC payload.

Parameters:
records - Vector of records to add to IPC payload.

addRecordList

public final void addRecordList(List<GalleryItem> galleryItems)
Add multiple records into the IPC payload.

Parameters:
galleryItems - List of records to add to IPC payload.

getGalleryItemAt

public final GalleryItem getGalleryItemAt(int index)
Get a GalleryItem in the IPC payload.

Parameters:
index - index of a GalleryItem in the IPC payload.
Returns:
The gallery item at the index specified.

getPayloadByteCount

public final long getPayloadByteCount()
Get the size in bytes of all the GalleryItem in the payload.

Returns:
size in bytes of all the GalleryItem in the payload.

getRecordCount

public final int getRecordCount()
Get the number of GalleryItems in the payload.

Returns:
number of GalleryItems in the payload.

getDateCreated

public final Date getDateCreated()
Returns a timestamp representing when this GalleryItem was created.

Returns:
Date representing when this GalleryItem was created.

getTargetProvider

public final String getTargetProvider()
Get the name of the IPC target.

Returns:
the name of the IPC target.
See Also:
setTargetProvider(java.lang.String)

setTargetProvider

public final void setTargetProvider(String provider)
Set the name of the IPC target.

Parameters:
provider - name of the IPC target.
See Also:
getTargetProvider()

getRegistryRecord

public final IPCRegistryRecord getRegistryRecord()
Get the IPCRegistryRecord corresponding to the IPC target.

Returns:
the IPCRegistryRecord of the IPC target.
See Also:
setRegistryRecord(danger.app.IPCRegistryRecord)

setRegistryRecord

public final void setRegistryRecord(IPCRegistryRecord ipcRegistryRecord)
Set the IPCRegistryRecord corresponding to the IPC target.

Parameters:
ipcRegistryRecord - the IPCRegistryRecord of the IPC target.
See Also:
setRegistryRecord(danger.app.IPCRegistryRecord)