FetchDisabledLandDataWorker runs from Home, limited by an interval (KEY_DISABLED_LAND_DATA_LAST_FETCH_TIME). It fetches land asset codes that were disabled on the server for the cadre's farmers and stores them as JSON in SharedPreferences. The land screens call AppUtils.checkIfLandHasBeenDisabled(assetCode) to mark those lands disabled. A failed response saves an empty list, and an exception fails the worker.
Headers
Header
Value
Notes
X-SESSIONID
<session token>
Passed explicitly as @Header from AndroidSessionManager.sessionId. AuthInterceptor still retries once with a fresh token on 401 or 400.
Parameters
Param
In
Required
Example
Notes
datasetName
path
Yes
DisabledAssetCodeForCadre
Dataset name in the path of commons-report-service /api/v1/datasets/name/{name}/execute.
version
query
Yes
1
Dataset version. Always 1.
format
query
Yes
json
Response format. Always json, so the body is a JSON array of row objects.
params
query
Yes
CADRE_LOGIN=9XXXXXXXX1
Dataset input parameters as KEY=value pairs joined with "--". CADRE_LOGIN = the user login before "@@" (cadre mobile/login id).
Farmer the land belongs to; used to match against local farmer_assets.owningEntityId.
DisabledAssetCode
string
Asset code to show as disabled (compared with farmer_assets.assetCode).
is_active, inactive_reason, id
string
Stored in the cached JSON; not read by the app.
Errors
Status
When
What the app does
401 / 400
Session token expired or rejected
AuthInterceptor refreshes the token and retries once; if the retry also fails, Non-2xx: an empty list is cached (no lands shown as disabled). Exception: Result.failure(), cache unchanged.
5xx
Dataset query failed on the server
Non-2xx: an empty list is cached (no lands shown as disabled). Exception: Result.failure(), cache unchanged.
network error
No connectivity or timeout
Non-2xx: an empty list is cached (no lands shown as disabled). Exception: Result.failure(), cache unchanged.