Interface ConcurrentModificationError
- All Superinterfaces:
ErrorObject
The request conflicts with the current state of the involved resources. This error typically occurs when the request attempts to modify a resource that is out of date, that is, it has been modified by another client since the last time it was retrieved by the system attempting to update it. The client application should resolve the conflict (with or without involving the end-user) before retrying the request.
Example to create an instance using the builder pattern
ConcurrentModificationError concurrentModificationError = ConcurrentModificationError.builder()
.message("{message}")
.currentVersion(1)
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for ConcurrentModificationError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for ConcurrentModificationErrorbuilder
(ConcurrentModificationError template) create builder for ConcurrentModificationError instancestatic ConcurrentModificationError
deepCopy
(ConcurrentModificationError template) factory method to create a deep copy of ConcurrentModificationErrorThe resource in conflict.@NotNull Long
The current version of the resource.The version specified in the failed request.static ConcurrentModificationError
of()
factory methodstatic ConcurrentModificationError
of
(ConcurrentModificationError template) factory method to create a shallow copy ConcurrentModificationErrorvoid
setConflictedResource
(Object conflictedResource) The resource in conflict.void
setCurrentVersion
(Long currentVersion) The current version of the resource.void
setSpecifiedVersion
(Long specifiedVersion) The version specified in the failed request.static com.fasterxml.jackson.core.type.TypeReference<ConcurrentModificationError>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.importapi.models.errors.ErrorObject
getCode, getMessage, setMessage, withErrorObject
-
Field Details
-
CONCURRENT_MODIFICATION
discriminator value for ConcurrentModificationError- See Also:
-
-
Method Details
-
getSpecifiedVersion
Long getSpecifiedVersion()The version specified in the failed request.
- Returns:
- specifiedVersion
-
getCurrentVersion
The current version of the resource.
- Returns:
- currentVersion
-
getConflictedResource
Object getConflictedResource()The resource in conflict.
- Returns:
- conflictedResource
-
setSpecifiedVersion
The version specified in the failed request.
- Parameters:
specifiedVersion
- value to be set
-
setCurrentVersion
The current version of the resource.
- Parameters:
currentVersion
- value to be set
-
setConflictedResource
The resource in conflict.
- Parameters:
conflictedResource
- value to be set
-
of
factory method- Returns:
- instance of ConcurrentModificationError
-
of
factory method to create a shallow copy ConcurrentModificationError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static ConcurrentModificationError deepCopy(@Nullable ConcurrentModificationError template) factory method to create a deep copy of ConcurrentModificationError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ConcurrentModificationError- Returns:
- builder
-
builder
create builder for ConcurrentModificationError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withConcurrentModificationError
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-