com.vodafone360.people.engine.contactsync
Class SyncStatus

java.lang.Object
  extended by com.vodafone360.people.engine.contactsync.SyncStatus

public class SyncStatus
extends java.lang.Object

In memory store for the current state of the Contacts sync engine.


Nested Class Summary
static class SyncStatus.Task
          Sync tasks, each of which corresponds to a specific processor.
static class SyncStatus.TaskStatus
          Sync task status.
 
Field Summary
private  int mProgress
          Percentage of sync progress in current task (e.g. 53).
private  ServiceStatus mServiceStatus
          ServiceStatus of sync outcome.
private  SyncStatus.Task mTask
          Current task (e.g.
private  SyncStatus.TaskStatus mTaskStatus
          Current task status (e.g.
private  int mTaskStatusDone
          Current task done (e.g.
private  int mTaskStatusTotal
          Current task total (e.g.
private  java.lang.String mTextContact
          Current contact name (e.g.
 
Constructor Summary
  SyncStatus(int progress, java.lang.String textContact, SyncStatus.Task task)
          Construct with the current state of the Contacts sync engine, with the task status set to TaskStatus.NONE.
  SyncStatus(int progress, java.lang.String textContact, SyncStatus.Task task, SyncStatus.TaskStatus taskStatus, int taskStatusDone, int taskStatusTotal)
          Construct with the current state of the Contacts sync engine.
protected SyncStatus(ServiceStatus serviceStatus)
          Construct with only the ServiceStatus of the Contacts sync engine.
 
Method Summary
 int getProgress()
          Get the current sync progress percentage for the current task.
 ServiceStatus getServiceStatus()
          Gets the ServiceStatus of sync outcome.
 SyncStatus.Task getTask()
          Get the current task (e.g.
 SyncStatus.TaskStatus getTaskStatus()
          Get the current task status (e.g.
 int getTaskStatusDone()
          Get the current task done (e.g.
 int getTaskStatusTotal()
          Get the current task total (e.g.
 java.lang.String getTextContact()
          Get the current contact name (e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mServiceStatus

private ServiceStatus mServiceStatus
ServiceStatus of sync outcome.


mProgress

private int mProgress
Percentage of sync progress in current task (e.g. 53).


mTextContact

private java.lang.String mTextContact
Current contact name (e.g. John Doe).


mTask

private SyncStatus.Task mTask
Current task (e.g. Uploading server contacts).


mTaskStatus

private SyncStatus.TaskStatus mTaskStatus
Current task status (e.g. Sent 25 of 500 contacts).


mTaskStatusDone

private int mTaskStatusDone
Current task done (e.g. Sent X of 500 contacts).


mTaskStatusTotal

private int mTaskStatusTotal
Current task total (e.g. Sent 25 of X contacts).

Constructor Detail

SyncStatus

protected SyncStatus(ServiceStatus serviceStatus)
Construct with only the ServiceStatus of the Contacts sync engine.

Parameters:
serviceStatus - ServiceStatus of sync outcome.

SyncStatus

public SyncStatus(int progress,
                  java.lang.String textContact,
                  SyncStatus.Task task,
                  SyncStatus.TaskStatus taskStatus,
                  int taskStatusDone,
                  int taskStatusTotal)
Construct with the current state of the Contacts sync engine.

Parameters:
progress - Percentage of sync progress in current task (e.g. 53).
textContact - Current contact name (e.g. John Doe).
task - Current task (e.g. Uploading server contacts).
taskStatus - Current task status (e.g. Sent 25 of 500 contacts).
taskStatusDone - Current task done (e.g. Sent X of 500 contacts).
taskStatusTotal - Current task total (e.g. Sent 25 of X contacts).

SyncStatus

public SyncStatus(int progress,
                  java.lang.String textContact,
                  SyncStatus.Task task)
Construct with the current state of the Contacts sync engine, with the task status set to TaskStatus.NONE.

Parameters:
progress - Percentage of sync progress in current task (e.g. 53).
textContact - Current contact name (e.g. John Doe).
task - Current task (e.g. Uploading server contacts).
Method Detail

getServiceStatus

public final ServiceStatus getServiceStatus()
Gets the ServiceStatus of sync outcome.

Returns:
Sync outcome as a ServiceStatus object.

getProgress

public final int getProgress()
Get the current sync progress percentage for the current task.

Returns:
Current sync progress percentage.

getTextContact

public final java.lang.String getTextContact()
Get the current contact name (e.g. John Doe).

Returns:
Current contact name.

getTask

public final SyncStatus.Task getTask()
Get the current task (e.g. Uploading server contacts)

Returns:
Current task.

getTaskStatus

public final SyncStatus.TaskStatus getTaskStatus()
Get the current task status (e.g. Sent 25 of 500 contacts).

Returns:
Current task status.

getTaskStatusDone

public final int getTaskStatusDone()
Get the current task done (e.g. Sent X of 500 contacts).

Returns:
Current task done.

getTaskStatusTotal

public final int getTaskStatusTotal()
Get the current task total (e.g. Sent 25 of X contacts).

Returns:
Current task total.


JavaDoc