public class ConflictContext extends Object
This class represents meta information available while resolving conflicts. When conflict arises, the conflict framework will build this object and it will be available while resolving custom conflicts.
Ideally setters are not supposed to be used in custom code. These are used
internally to prepare the ContextObject
while processing conflict.
CustomConflictResolver
Constructor and Description |
---|
ConflictContext() |
Modifier and Type | Method and Description |
---|---|
ActionType |
getClientAction()
Returns the
ActionType of the client
data |
String |
getConflictType()
Returns the type of the conflict
|
String |
getDeltaContextFieldName()
Returns the name of the field representing the lastupdate tracking value.
|
Set<String> |
getFields()
Returns the unmodifiable set of all the field of the current object
|
String |
getObjectId()
Returns the name of the object
|
List<String> |
getPrimaryKeys()
Returns the unmodifiable list of primary keys of the current object
|
Map<String,String> |
getQueryParams()
Returns the unmodifiable map of queryPrams
|
ActionType |
getServerAction()
Returns the
ActionType of the server
data |
String |
getServiceId()
Returns the objectService name of the current object
|
String |
getSoftDeleteActiveValue()
Returns the value which represents the non deleted value of the softDelete
field.
|
String |
getSoftDeleteDeletedValue()
Returns the value which represents the delete value of the softDelete
field.
|
String |
getSoftDeleteFieldName()
Returns the softDelete field name of the current object.
|
String |
getVersion()
Returns the version of the Application being invoked
|
boolean |
isOffline()
Returns true if the object is offline
|
boolean |
isServerDataSoftDeleted()
Returns whether the record if present at backend server is soft deleted or
not
|
void |
setClientAction(ActionType clientAction)
Sets the ActionType of the client data
|
void |
setConflictType(String conflictType)
Sets the type of the conflict
|
void |
setDeltaContextFieldName(String deltaContextFieldName)
Sets the name of the field representing the last update tracking value.
|
void |
setFields(Set<String> fields)
Sets the fields of the current object
|
void |
setObjectId(String objectId)
Sets the name of the object
|
void |
setOffline(boolean isOffline)
Sets whether the object is offline
|
void |
setPrimaryKeys(List<String> primaryKeys)
Sets the list of primary keys of the object
|
void |
setQueryParams(Map<String,String> queryParams)
Sets the map of queryPrams
|
void |
setServerAction(ActionType serverAction)
Sets the ActionType of the server data
|
void |
setServerDataSoftDeleted(boolean serverDataSoftDeleted)
Sets whether the current record if present at backend server is soft
deleted or not
|
void |
setServiceId(String serviceId)
Sets the objectService name of the current object
|
void |
setSoftDeleteActiveValue(String softDeleteactiveValue)
Sets the value which represents the non deleted value of the softDelete
field
|
void |
setSoftDeleteDeletedValue(String softDeletedeletedValue)
Sets the value which represents the delete value of the softDelete field.
|
void |
setSoftDeleteFieldName(String softDeleteFieldName)
Sets the softDelete field name of the current object.
|
void |
setVersion(String version)
Sets the version of the Application being invoked
|
public String getServiceId()
public String getObjectId()
public boolean isOffline()
public String getVersion()
public Set<String> getFields()
public List<String> getPrimaryKeys()
public String getConflictType()
public Map<String,String> getQueryParams()
public String getSoftDeleteFieldName()
public String getSoftDeleteDeletedValue()
public String getSoftDeleteActiveValue()
public String getDeltaContextFieldName()
public ActionType getClientAction()
ActionType
of the client
dataActionType
of client
datapublic ActionType getServerAction()
ActionType
of the server
dataActionType
of server
datapublic boolean isServerDataSoftDeleted()
public void setServerDataSoftDeleted(boolean serverDataSoftDeleted)
FOR INTERNAL USE ONLY
serverDataSoftDeleted
- Sets the current record at backend is soft
deleted or notpublic void setServiceId(String serviceId)
FOR INTERNAL USE ONLY
serviceId
- Sets the name of the objectServicepublic void setObjectId(String objectId)
FOR INTERNAL USE ONLY
objectId
- The name of the objectpublic void setOffline(boolean isOffline)
FOR INTERNAL USE ONLY
isOffline
- object is offline or onlinepublic void setVersion(String version)
FOR INTERNAL USE ONLY
version
- The version of applicationpublic void setFields(Set<String> fields)
FOR INTERNAL USE ONLY
fields
- set of fields of current objectpublic void setPrimaryKeys(List<String> primaryKeys)
FOR INTERNAL USE ONLY
primaryKeys
- list of primary keys of the objectpublic void setSoftDeleteFieldName(String softDeleteFieldName)
FOR INTERNAL USE ONLY
softDeleteFieldName
- The softDelete field name.public void setSoftDeleteDeletedValue(String softDeletedeletedValue)
FOR INTERNAL USE ONLY
softDeletedeletedValue
- The value representing softDelete delete
value.public void setSoftDeleteActiveValue(String softDeleteactiveValue)
FOR INTERNAL USE ONLY
softDeleteactiveValue
- The value representing softDelete field active
value.public void setDeltaContextFieldName(String deltaContextFieldName)
FOR INTERNAL USE ONLY
deltaContextFieldName
- LastUpdatetime field namepublic void setClientAction(ActionType clientAction)
FOR INTERNAL USE ONLY
clientAction
- ActionType of clientpublic void setServerAction(ActionType serverAction)
FOR INTERNAL USE ONLY
serverAction
- ActionType of serverpublic void setConflictType(String conflictType)
FOR INTERNAL USE ONLY
conflictType
- conflictTypeCopyright © 2019. All rights reserved.