use of fi.otavanopisto.muikku.plugins.schooldatapyramus.entities.PyramusCurriculum in project muikku by otavanopisto.
the class PyramusCourseMetaSchoolDataBridge method listCurriculums.
@Override
public List<Curriculum> listCurriculums() {
List<Curriculum> result = new ArrayList<>();
fi.otavanopisto.pyramus.rest.model.Curriculum[] curriculums = pyramusClient.get("/common/curriculums?filterArchived=true", fi.otavanopisto.pyramus.rest.model.Curriculum[].class);
if (curriculums != null) {
for (fi.otavanopisto.pyramus.rest.model.Curriculum curriculum : curriculums) {
SchoolDataIdentifier identifier = pyramusIdentifierMapper.getCurriculumIdentifier(curriculum.getId());
result.add(new PyramusCurriculum(identifier, curriculum.getName()));
}
}
return result;
}
use of fi.otavanopisto.muikku.plugins.schooldatapyramus.entities.PyramusCurriculum in project muikku by otavanopisto.
the class PyramusCourseMetaSchoolDataBridge method findCurriculum.
@Override
public Curriculum findCurriculum(String identifier) {
Long curriculumId = pyramusIdentifierMapper.getPyramusCurriculumId(identifier);
fi.otavanopisto.pyramus.rest.model.Curriculum curriculum = pyramusClient.get("/common/curriculums/" + curriculumId, fi.otavanopisto.pyramus.rest.model.Curriculum.class);
if (curriculum != null) {
return new PyramusCurriculum(new SchoolDataIdentifier(identifier, getSchoolDataSource()), curriculum.getName());
}
return null;
}
Aggregations