use of fi.otavanopisto.muikku.plugins.schooldatapyramus.entities.PyramusEducationType in project muikku by otavanopisto.
the class PyramusCourseMetaSchoolDataBridge method findEducationType.
@Override
public EducationType findEducationType(String identifier) {
Long educationTypeId = pyramusIdentifierMapper.getPyramusEducationTypeId(identifier);
fi.otavanopisto.pyramus.rest.model.EducationType restEducationType = pyramusClient.get("/common/educationTypes/" + educationTypeId, fi.otavanopisto.pyramus.rest.model.EducationType.class);
if (restEducationType != null) {
return new PyramusEducationType(new SchoolDataIdentifier(identifier, getSchoolDataSource()), restEducationType.getName());
}
return null;
}
use of fi.otavanopisto.muikku.plugins.schooldatapyramus.entities.PyramusEducationType in project muikku by otavanopisto.
the class PyramusCourseMetaSchoolDataBridge method listEducationTypes.
@Override
public List<EducationType> listEducationTypes() {
List<EducationType> result = new ArrayList<>();
fi.otavanopisto.pyramus.rest.model.EducationType[] types = pyramusClient.get("/common/educationTypes", fi.otavanopisto.pyramus.rest.model.EducationType[].class);
if (types != null) {
for (fi.otavanopisto.pyramus.rest.model.EducationType type : types) {
SchoolDataIdentifier identifier = pyramusIdentifierMapper.getEducationTypeIdentifier(type.getId());
result.add(new PyramusEducationType(identifier, type.getName()));
}
}
return result;
}
Aggregations