use of org.hisp.dhis.android.core.category.ResponseValidator in project dhis2-android-sdk by dhis2.
the class CategoryCallFactory method create.
@NonNull
public static CategoryEndpointCall create(Retrofit retrofit, DatabaseAdapter databaseAdapter) {
CategoryService categoryService = retrofit.create(CategoryService.class);
ResponseValidator<Category> categoryResponseValidator = new ResponseValidator<>();
CategoryHandler categoryHandler = HandlerFactory.createCategoryHandler(databaseAdapter);
ResourceHandler resourceHandler = HandlerFactory.createResourceHandler(databaseAdapter);
CategoryQuery categoryQuery = CategoryQuery.defaultQuery();
CategoryEndpointCall categoryEndpointCall = new CategoryEndpointCall(categoryQuery, categoryService, categoryResponseValidator, categoryHandler, resourceHandler, databaseAdapter, new Date());
return categoryEndpointCall;
}
use of org.hisp.dhis.android.core.category.ResponseValidator in project dhis2-android-sdk by dhis2.
the class CategoryComboCallFactory method create.
@NonNull
public static CategoryComboEndpointCall create(Retrofit retrofit, DatabaseAdapter databaseAdapter) {
CategoryComboService categoryComboService = retrofit.create(CategoryComboService.class);
ResponseValidator<CategoryCombo> categoryComboResponseValidator = new ResponseValidator<>();
CategoryComboHandler categoryComboHandler = HandlerFactory.createCategoryComboHandler(databaseAdapter);
ResourceHandler resourceHandler = HandlerFactory.createResourceHandler(databaseAdapter);
CategoryComboQuery categoryComboQuery = CategoryComboQuery.defaultQuery();
CategoryComboEndpointCall categoryComboEndpointCall = new CategoryComboEndpointCall(categoryComboQuery, categoryComboService, categoryComboResponseValidator, categoryComboHandler, resourceHandler, databaseAdapter, new Date());
return categoryComboEndpointCall;
}
Aggregations