use of org.eyeseetea.malariacare.domain.exception.PullConversionException in project pictureapp by EyeSeeTea.
the class PullController method convertMetaData.
private void convertMetaData(final Callback callback) {
if (cancelPull) {
callback.onCancel();
return;
}
callback.onStep(PullStep.CONVERT_METADATA);
Log.d(TAG, "Converting organisationUnits...");
try {
List<OrganisationUnitExtended> assignedOrganisationsUnits = OrganisationUnitExtended.getExtendedList((SdkQueries.getAssignedOrganisationUnits()));
for (OrganisationUnitExtended assignedOrganisationsUnit : assignedOrganisationsUnits) {
assignedOrganisationsUnit.accept(mConverter);
}
OrgUnitToOptionConverter.convert();
mPullControllerStrategy.convertMetadata(mConverter);
} catch (NullPointerException ex) {
callback.onError(new PullConversionException(ex));
}
}
Aggregations