use of org.motechproject.mds.dto.FieldInstanceDto in project motech by motech.
the class InstanceServiceImpl method getInstanceFields.
@Override
public List<FieldInstanceDto> getInstanceFields(Long entityId, Long instanceId) {
EntityDto entity = entityService.getEntity(entityId);
validateCredentialsForReading(entity);
List<FieldDto> fields = entityService.getEntityFieldsForUI(entityId);
List<FieldInstanceDto> result = new ArrayList<>();
for (FieldDto field : fields) {
FieldInstanceDto fieldInstanceDto = new FieldInstanceDto(field.getId(), instanceId, field.getBasic());
result.add(fieldInstanceDto);
}
return result;
}
Aggregations