com.sap.ip.me.api.smartsync
Interface SyncBoResolver


public interface SyncBoResolver

SyncBoResolver resolves either the conflict or error to the server or client state. Also gives the access to the contrary data that is to be resolved.

The SyncBo Resolver can be retrieve from the Syncbo Response

Example: Resolve to client state for a given syncbo.


ErrorConflictInbox errorConflictInbox= SmartSyncRuntime.getInstance().getErrorConflictInbox();

//For the given synbo.

MeIterator it = errorConflictInbox.getAllSyncBoResponses(syncBoDescriptor);

while(it.hasNext()){

SyncBoResponse resp = (SyncBoResponse)it.next();

SyncBoResolver resolver = resp.getSyncBoResolver();

resolver.keepClientData();

}

Copyright: Copyright (c) 2003

Company: SAP AG

Since:
2.5
Version:
2.5
Author:
Jo Gel
See Also:
ErrorConflictInbox, SyncBoResolver, SyncBoResponseType, SyncBoResponseLog

Method Summary
 SyncBo getContrarySyncBo()
          Returns the contrary data that is to be resolved.
 boolean isContrarySyncBoAServerSyncBo()
          Returns the flag to distinguish whether the contrary data is of server or not.
 void keepClientData()
          The client data is kept and the server data is discarded.
 void revertToServerData()
          Reverts the client data to the server state; the client data is discarded.
 

Method Detail

getContrarySyncBo

public SyncBo getContrarySyncBo()
                         throws SmartSyncException,
                                PersistenceException
Returns the contrary data that is to be resolved.

Returns:
SyncBo the contrary SyncBo
Throws:
SmartSyncException - thrown for any exceptions caught in the SmartSync layer
PersistenceException - thrown for any exceptions caught in the Persistence layer

isContrarySyncBoAServerSyncBo

public boolean isContrarySyncBoAServerSyncBo()
Returns the flag to distinguish whether the contrary data is of server or not.

Returns:
boolean

revertToServerData

public void revertToServerData()
                        throws SmartSyncException,
                               PersistenceException
Reverts the client data to the server state; the client data is discarded.

Throws:
SmartSyncException - thrown for any exceptions caught in the SmartSync layer
PersistenceException - thrown for any exceptions caught in the Persistence layer

keepClientData

public void keepClientData()
                    throws SmartSyncException,
                           PersistenceException
The client data is kept and the server data is discarded.

Throws:
SmartSyncException - thrown for any exceptions caught in the SmartSync layer
PersistenceException - thrown for any exceptions caught in the Persistence layer


Copyright © 2003 SAP AG. All Rights Reserved.