|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
SyncBoRepsonse
represents the error/conflict response information,
which corresponds to a specific quarantined SyncBo. This has the following
information:
1. SyncBoResponse type i.e. Error or Conflict.
2. SyncKey.
3. Current and history log.
4. SyncBoDescriptor instance
5. SyncBoResolver used to resolve the quarantined state by either
reverting to server state or keeping the client state.
The SyncBoResponse
s can be retrieved from the ErrorConflictInbox
Example: Resolve to server 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();
resp.acceptServerSyncBo();
}
Copyright: Copyright (c) 2003
Company: SAP AG
ErrorConflictInbox
,
SyncBoResponseType
Method Summary | |
void |
acceptClientSyncBo()
The client data is kept and the server data is discarded. |
void |
acceptServerSyncBo()
Reverts the client data to the server state; the client data is discarded. |
void |
delete()
Delete this SyncBoResponse object from database. |
SyncBoChangeActionType |
getActionType()
Returns the server action type of the response. |
SyncBoResponseLog |
getCurrentLog()
Deprecated. use instead to access the same information. This method will be removed in next MI releases. |
java.lang.String |
getMessageClass()
Returns the messageClass from the server. |
int |
getMessageNumber()
Returns the messageNumber from the server. |
SyncBoResponseType |
getResponseType()
Returns the SyncBoResponseType of this SyncBoResponse; either ERROR or CONFLICT |
SyncBo |
getServerSyncBo()
Returns the contrary SyncBo with the server data. |
SyncBoDescriptor |
getSyncBoDescriptor()
Returns the SyncBoDescriptor of this SyncBoResponse |
java.math.BigInteger |
getSyncBoKey()
Returns the syncKey of this SyncBoResponse |
SyncBoResolver |
getSyncBoResolver()
Deprecated. This method will be removed in next MI releases. Use
|
SyncBoResponseState |
getSyncBoResponseState()
Returns the current state of this instance. |
java.lang.String |
getSyncKey()
Deprecated. use getSyncBoKey() instead.
This method will be removed in next MI releases. |
java.lang.String |
getText()
Returns the text message from the server. |
void |
merge()
Replaces the current client SyncBo by a merged version which is a mixture of client data and server data. |
Method Detail |
public SyncBoResponseType getResponseType()
public java.lang.String getSyncKey()
getSyncBoKey()
instead.
This method will be removed in next MI releases.
public java.math.BigInteger getSyncBoKey()
public SyncBoResponseLog getCurrentLog()
public java.lang.String getText()
public java.lang.String getMessageClass()
public int getMessageNumber()
public SyncBoDescriptor getSyncBoDescriptor()
public SyncBoResolver getSyncBoResolver()
acceptServerSyncBo()
SyncBoResponse#acceptClientSyncBo())
public SyncBo getServerSyncBo() throws SmartSyncException, PersistenceException
SmartSyncException
- thrown if this instance is either in already resolved
(SyncBoResponseState.RESOLVED
) or already deleted (SyncBoResponseState.DELETED
).
PersistenceException
- thrown for any exceptions caught in the Persistence layerpublic void acceptServerSyncBo() throws SmartSyncException, PersistenceException
SmartSyncException
- thrown if this instance is either in already resolved
(SyncBoResponseState.RESOLVED
) or already deleted (SyncBoResponseState.DELETED
).
PersistenceException
- thrown for any exceptions caught in the Persistence layerpublic void acceptClientSyncBo() throws SmartSyncException, PersistenceException
SmartSyncException
- thrown if this instance is either in already resolved
(SyncBoResponseState.RESOLVED
) or already deleted (SyncBoResponseState.DELETED
)
PersistenceException
- thrown for any exceptions caught in the Persistence layerpublic SyncBoChangeActionType getActionType()
public void merge() throws SmartSyncException, PersistenceException
SyncBoDataFacade
and can be retreived as normal. The SyncBo is still
locked for modification until
SyncBoResponse#keepClientData()
orSyncBoResponse#revertToServerData()
getSyncBoResponseState()
.
to get feedback if the merge was successfull or not.
SmartSyncException
- thrown if this instance is not in state
{@link SyncBoResponseState#INITIAL).
PersistenceException
- thrown if there is an error while storing the
merged version.public void delete() throws SmartSyncException, PersistenceException
SmartSyncException
- thrown if the SyncBoResponse is not in state
{@link SyncBoResponseState#RESOLVED).
PersistenceException
- thrown if the delete operation fails.public SyncBoResponseState getSyncBoResponseState()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |