Improve XJC-binding (Issue 73) #74

Merged
ansv7779 merged 9 commits from 73-improve-xjc-binding into develop 2025-01-16 13:55:39 +01:00
35 changed files with 173 additions and 72 deletions

View File

@ -17,7 +17,7 @@ import se.su.dsv.scipro.checklist.ChecklistAnswerServiceImpl;
import se.su.dsv.scipro.checklist.ChecklistServiceImpl; import se.su.dsv.scipro.checklist.ChecklistServiceImpl;
import se.su.dsv.scipro.checklist.ChecklistTemplateService; import se.su.dsv.scipro.checklist.ChecklistTemplateService;
import se.su.dsv.scipro.checklist.ChecklistTemplateServiceImpl; import se.su.dsv.scipro.checklist.ChecklistTemplateServiceImpl;
import se.su.dsv.scipro.daisyExternal.http.DaisyAPIImpl; import se.su.dsv.scipro.daisyexternal.http.DaisyAPIImpl;
import se.su.dsv.scipro.date.DateServiceImpl; import se.su.dsv.scipro.date.DateServiceImpl;
import se.su.dsv.scipro.file.FileDescriptionRepo; import se.su.dsv.scipro.file.FileDescriptionRepo;
import se.su.dsv.scipro.file.FileReferenceRepository; import se.su.dsv.scipro.file.FileReferenceRepository;

View File

@ -1,4 +1,4 @@
package se.su.dsv.scipro.daisyExternal.exceptions; package se.su.dsv.scipro.daisyexternal.exceptions;
public class ExternalImportException extends RuntimeException { public class ExternalImportException extends RuntimeException {

View File

@ -1,4 +1,4 @@
package se.su.dsv.scipro.daisyExternal.http; package se.su.dsv.scipro.daisyexternal.http;
import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.Response;
import java.io.InputStream; import java.io.InputStream;
@ -6,7 +6,26 @@ import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
import java.util.Set; import java.util.Set;
import se.su.dsv.scipro.io.dto.*; import se.su.dsv.scipro.io.dto.AddThesisAuthor;
import se.su.dsv.scipro.io.dto.AuthorProjectParticipant;
import se.su.dsv.scipro.io.dto.CourseRegistration;
import se.su.dsv.scipro.io.dto.Employee;
import se.su.dsv.scipro.io.dto.Person;
import se.su.dsv.scipro.io.dto.Program;
import se.su.dsv.scipro.io.dto.ProgramAdmission;
import se.su.dsv.scipro.io.dto.ProjectParticipant;
import se.su.dsv.scipro.io.dto.PublishingConsent;
import se.su.dsv.scipro.io.dto.PublishingConsentLevel;
import se.su.dsv.scipro.io.dto.ResearchArea;
import se.su.dsv.scipro.io.dto.ResearchSubject;
import se.su.dsv.scipro.io.dto.StudentProgramAdmission;
import se.su.dsv.scipro.io.dto.Thesis;
import se.su.dsv.scipro.io.dto.ThesisPublication;
import se.su.dsv.scipro.io.dto.ThesisRejection;
import se.su.dsv.scipro.io.dto.ThesisToBeCreated;
import se.su.dsv.scipro.io.dto.ThesisToBeUpdated;
import se.su.dsv.scipro.io.dto.Unit;
import se.su.dsv.scipro.io.dto.UserName;
public interface DaisyAPI { public interface DaisyAPI {
Set<ProjectParticipant> getContributors(Integer projectId); Set<ProjectParticipant> getContributors(Integer projectId);

View File

@ -1,4 +1,4 @@
package se.su.dsv.scipro.daisyExternal.http; package se.su.dsv.scipro.daisyexternal.http;
import static jakarta.ws.rs.client.Entity.xml; import static jakarta.ws.rs.client.Entity.xml;
@ -16,9 +16,33 @@ import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.Response;
import java.io.InputStream; import java.io.InputStream;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Optional;
import java.util.Set;
import org.glassfish.jersey.client.authentication.HttpAuthenticationFeature; import org.glassfish.jersey.client.authentication.HttpAuthenticationFeature;
import se.su.dsv.scipro.io.dto.*; import se.su.dsv.scipro.io.dto.AddThesisAuthor;
import se.su.dsv.scipro.io.dto.AuthorProjectParticipant;
import se.su.dsv.scipro.io.dto.CourseRegistration;
import se.su.dsv.scipro.io.dto.Employee;
import se.su.dsv.scipro.io.dto.ObjectFactory;
import se.su.dsv.scipro.io.dto.Person;
import se.su.dsv.scipro.io.dto.Program;
import se.su.dsv.scipro.io.dto.ProgramAdmission;
import se.su.dsv.scipro.io.dto.ProjectParticipant;
import se.su.dsv.scipro.io.dto.PublishingConsent;
import se.su.dsv.scipro.io.dto.PublishingConsentLevel;
import se.su.dsv.scipro.io.dto.ResearchArea;
import se.su.dsv.scipro.io.dto.ResearchSubject;
import se.su.dsv.scipro.io.dto.StudentProgramAdmission;
import se.su.dsv.scipro.io.dto.Thesis;
import se.su.dsv.scipro.io.dto.ThesisPublication;
import se.su.dsv.scipro.io.dto.ThesisRejection;
import se.su.dsv.scipro.io.dto.ThesisToBeCreated;
import se.su.dsv.scipro.io.dto.ThesisToBeUpdated;
import se.su.dsv.scipro.io.dto.Unit;
import se.su.dsv.scipro.io.dto.UserName;
public class DaisyAPIImpl implements DaisyAPI { public class DaisyAPIImpl implements DaisyAPI {
@ -364,8 +388,7 @@ public class DaisyAPIImpl implements DaisyAPI {
@Override @Override
public OrganisationalUnit orgunit(final int unitId) { public OrganisationalUnit orgunit(final int unitId) {
return () -> return () ->
target() units()
.path("orgunit")
.path(Integer.toString(unitId)) .path(Integer.toString(unitId))
.path("researchAreas") .path("researchAreas")
.request(MediaType.APPLICATION_XML_TYPE) .request(MediaType.APPLICATION_XML_TYPE)

View File

@ -1,4 +1,4 @@
package se.su.dsv.scipro.daisyExternal.http; package se.su.dsv.scipro.daisyexternal.http;
import java.util.List; import java.util.List;
import se.su.dsv.scipro.io.dto.ResearchArea; import se.su.dsv.scipro.io.dto.ResearchArea;

View File

@ -1,4 +1,4 @@
package se.su.dsv.scipro.daisyExternal.http; package se.su.dsv.scipro.daisyexternal.http;
import java.io.InputStream; import java.io.InputStream;
import java.util.function.Function; import java.util.function.Function;

View File

@ -1,4 +1,4 @@
package se.su.dsv.scipro.daisyExternal.http; package se.su.dsv.scipro.daisyexternal.http;
public abstract class Semester { public abstract class Semester {

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<jaxb:bindings xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb" xmlns:xs="http://www.w3.org/2001/XMLSchema" <jaxb:bindings xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
version="3.0"> version="3.0">
<jaxb:globalBindings> <jaxb:globalBindings>
<!-- Use java.util.Calendar instead of javax.xml.datatype.XMLGregorianCalendar for xs:dateTime --> <!-- Use java.util.Calendar instead of javax.xml.datatype.XMLGregorianCalendar for xs:dateTime -->
@ -12,4 +13,11 @@
<xjc:simple /> <xjc:simple />
<xjc:serializable uid="1" /> <xjc:serializable uid="1" />
</jaxb:globalBindings> </jaxb:globalBindings>
<jaxb:bindings schemaLocation="../xsd/daisy_api.xsd" node="/xs:schema">
<jaxb:bindings node="xs:simpleType[@name='status']" >
<jaxb:typesafeEnumClass name="Status2" />
</jaxb:bindings>
</jaxb:bindings>
</jaxb:bindings> </jaxb:bindings>

View File

@ -1,7 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<xs:schema version="1.0" <xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="addThesisAuthor" type="addThesisAuthor"/> <xs:element name="addThesisAuthor" type="addThesisAuthor"/>
<xs:element name="courseRegistrationForCourse" type="courseRegistrationGet"/> <xs:element name="courseRegistrationForCourse" type="courseRegistrationGet"/>
@ -62,6 +60,7 @@
<xs:element name="degree" type="degree"/> <xs:element name="degree" type="degree"/>
<xs:element name="programAdmission" type="programAdmission"/> <xs:element name="programAdmission" type="programAdmission"/>
<xs:element name="student" type="student"/> <xs:element name="student" type="student"/>
<xs:complexType name="addThesisAuthor"> <xs:complexType name="addThesisAuthor">
<xs:sequence> <xs:sequence>
<xs:element name="student" type="AddThesisAuthorStudent" minOccurs="1"> <xs:element name="student" type="AddThesisAuthorStudent" minOccurs="1">

View File

@ -1,4 +1,4 @@
package se.su.dsv.scipro.daisyExternal.http; package se.su.dsv.scipro.daisyexternal.http;
import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.hasSize;

View File

@ -1,4 +1,4 @@
package se.su.dsv.scipro.daisyExternal; package se.su.dsv.scipro.daisyexternal;
/** /**
* Specifies interaction of an importing service component. * Specifies interaction of an importing service component.

View File

@ -1,4 +1,4 @@
package se.su.dsv.scipro.daisyExternal; package se.su.dsv.scipro.daisyexternal;
import java.util.Map; import java.util.Map;
import se.su.dsv.scipro.io.dto.Person; import se.su.dsv.scipro.io.dto.Person;

View File

@ -1,4 +1,4 @@
package se.su.dsv.scipro.daisyExternal.impl; package se.su.dsv.scipro.daisyexternal.impl;
import jakarta.inject.Inject; import jakarta.inject.Inject;
import jakarta.transaction.Transactional; import jakarta.transaction.Transactional;
@ -6,10 +6,10 @@ import jakarta.ws.rs.ClientErrorException;
import java.util.*; import java.util.*;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import se.su.dsv.scipro.daisyExternal.ExternalImporter; import se.su.dsv.scipro.daisyexternal.ExternalImporter;
import se.su.dsv.scipro.daisyExternal.ImporterTransactions; import se.su.dsv.scipro.daisyexternal.ImporterTransactions;
import se.su.dsv.scipro.daisyExternal.exceptions.ExternalImportException; import se.su.dsv.scipro.daisyexternal.exceptions.ExternalImportException;
import se.su.dsv.scipro.daisyExternal.http.DaisyAPI; import se.su.dsv.scipro.daisyexternal.http.DaisyAPI;
import se.su.dsv.scipro.io.dto.Employee; import se.su.dsv.scipro.io.dto.Employee;
import se.su.dsv.scipro.io.dto.Person; import se.su.dsv.scipro.io.dto.Person;
import se.su.dsv.scipro.io.dto.Thesis; import se.su.dsv.scipro.io.dto.Thesis;

View File

@ -1,23 +1,43 @@
package se.su.dsv.scipro.daisyExternal.impl; package se.su.dsv.scipro.daisyexternal.impl;
import jakarta.inject.Inject; import jakarta.inject.Inject;
import jakarta.inject.Named; import jakarta.inject.Named;
import jakarta.transaction.Transactional; import jakarta.transaction.Transactional;
import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.Response;
import java.util.*; import java.util.Comparator;
import java.util.EnumSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Stream; import java.util.stream.Stream;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import se.su.dsv.scipro.daisyExternal.ImporterTransactions; import se.su.dsv.scipro.daisyexternal.ImporterTransactions;
import se.su.dsv.scipro.daisyExternal.http.DaisyAPI; import se.su.dsv.scipro.daisyexternal.http.DaisyAPI;
import se.su.dsv.scipro.io.dto.*; import se.su.dsv.scipro.io.dto.AuthorProjectParticipant;
import se.su.dsv.scipro.io.dto.Course;
import se.su.dsv.scipro.io.dto.CourseRegistration;
import se.su.dsv.scipro.io.dto.EducationalLevel;
import se.su.dsv.scipro.io.dto.Person;
import se.su.dsv.scipro.io.dto.ProgramType;
import se.su.dsv.scipro.io.dto.ResearchArea; import se.su.dsv.scipro.io.dto.ResearchArea;
import se.su.dsv.scipro.io.dto.StudentProgramAdmission;
import se.su.dsv.scipro.io.dto.Thesis;
import se.su.dsv.scipro.io.dto.UserName;
import se.su.dsv.scipro.match.ProgramService; import se.su.dsv.scipro.match.ProgramService;
import se.su.dsv.scipro.project.Project; import se.su.dsv.scipro.project.Project;
import se.su.dsv.scipro.project.ProjectService; import se.su.dsv.scipro.project.ProjectService;
import se.su.dsv.scipro.security.auth.roles.Roles; import se.su.dsv.scipro.security.auth.roles.Roles;
import se.su.dsv.scipro.system.*; import se.su.dsv.scipro.system.DegreeType;
import se.su.dsv.scipro.system.Language;
import se.su.dsv.scipro.system.Program; import se.su.dsv.scipro.system.Program;
import se.su.dsv.scipro.system.ResearchAreaService;
import se.su.dsv.scipro.system.User;
import se.su.dsv.scipro.system.UserNameService;
import se.su.dsv.scipro.system.UserService;
import se.su.dsv.scipro.system.Username;
import se.su.dsv.scipro.util.Pair; import se.su.dsv.scipro.util.Pair;
@Named @Named

View File

@ -4,7 +4,7 @@ import jakarta.inject.Inject;
import jakarta.ws.rs.ProcessingException; import jakarta.ws.rs.ProcessingException;
import jakarta.ws.rs.WebApplicationException; import jakarta.ws.rs.WebApplicationException;
import java.util.List; import java.util.List;
import se.su.dsv.scipro.daisyExternal.http.DaisyAPI; import se.su.dsv.scipro.daisyexternal.http.DaisyAPI;
import se.su.dsv.scipro.finalthesis.PublishingConsentService; import se.su.dsv.scipro.finalthesis.PublishingConsentService;
import se.su.dsv.scipro.io.dto.PublishingConsentLevel; import se.su.dsv.scipro.io.dto.PublishingConsentLevel;
import se.su.dsv.scipro.project.Project; import se.su.dsv.scipro.project.Project;

View File

@ -5,11 +5,11 @@ import jakarta.inject.Provider;
import jakarta.persistence.EntityManager; import jakarta.persistence.EntityManager;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import se.su.dsv.scipro.daisyExternal.ExternalImporter; import se.su.dsv.scipro.daisyexternal.ExternalImporter;
import se.su.dsv.scipro.daisyExternal.ImporterTransactions; import se.su.dsv.scipro.daisyexternal.ImporterTransactions;
import se.su.dsv.scipro.daisyExternal.http.DaisyAPI; import se.su.dsv.scipro.daisyexternal.http.DaisyAPI;
import se.su.dsv.scipro.daisyExternal.impl.ExternalImporterDaisyImpl; import se.su.dsv.scipro.daisyexternal.impl.ExternalImporterDaisyImpl;
import se.su.dsv.scipro.daisyExternal.impl.ImporterTransactionsImpl; import se.su.dsv.scipro.daisyexternal.impl.ImporterTransactionsImpl;
import se.su.dsv.scipro.finalseminar.FinalSeminarService; import se.su.dsv.scipro.finalseminar.FinalSeminarService;
import se.su.dsv.scipro.finalthesis.FinalThesisService; import se.su.dsv.scipro.finalthesis.FinalThesisService;
import se.su.dsv.scipro.forum.ProjectForumService; import se.su.dsv.scipro.forum.ProjectForumService;

View File

@ -9,7 +9,7 @@ import java.util.Objects;
import java.util.Set; import java.util.Set;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import se.su.dsv.scipro.daisyExternal.http.DaisyAPI; import se.su.dsv.scipro.daisyexternal.http.DaisyAPI;
import se.su.dsv.scipro.security.auth.roles.Roles; import se.su.dsv.scipro.security.auth.roles.Roles;
import se.su.dsv.scipro.system.User; import se.su.dsv.scipro.system.User;
import se.su.dsv.scipro.system.UserSearchProvider; import se.su.dsv.scipro.system.UserSearchProvider;

View File

@ -6,7 +6,7 @@ import jakarta.inject.Inject;
import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.Response;
import java.util.Objects; import java.util.Objects;
import java.util.Set; import java.util.Set;
import se.su.dsv.scipro.daisyExternal.http.DaisyAPI; import se.su.dsv.scipro.daisyexternal.http.DaisyAPI;
import se.su.dsv.scipro.io.dto.Person; import se.su.dsv.scipro.io.dto.Person;
import se.su.dsv.scipro.io.dto.ProjectParticipant; import se.su.dsv.scipro.io.dto.ProjectParticipant;
import se.su.dsv.scipro.io.dto.Role; import se.su.dsv.scipro.io.dto.Role;

View File

@ -9,7 +9,7 @@ import java.util.Optional;
import java.util.Set; import java.util.Set;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import se.su.dsv.scipro.daisyExternal.http.DaisyAPI; import se.su.dsv.scipro.daisyexternal.http.DaisyAPI;
import se.su.dsv.scipro.grading.GradingCompletedEvent; import se.su.dsv.scipro.grading.GradingCompletedEvent;
import se.su.dsv.scipro.io.dto.AuthorProjectParticipant; import se.su.dsv.scipro.io.dto.AuthorProjectParticipant;
import se.su.dsv.scipro.io.dto.Course; import se.su.dsv.scipro.io.dto.Course;

View File

@ -3,7 +3,7 @@ package se.su.dsv.scipro.integration.daisy.workers;
import jakarta.inject.Inject; import jakarta.inject.Inject;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
import se.su.dsv.scipro.daisyExternal.http.DaisyAPI; import se.su.dsv.scipro.daisyexternal.http.DaisyAPI;
import se.su.dsv.scipro.grading.NationalSubjectCategory; import se.su.dsv.scipro.grading.NationalSubjectCategory;
import se.su.dsv.scipro.grading.NationalSubjectCategoryService; import se.su.dsv.scipro.grading.NationalSubjectCategoryService;
import se.su.dsv.scipro.io.dto.ResearchSubject; import se.su.dsv.scipro.io.dto.ResearchSubject;

View File

@ -16,14 +16,22 @@ import java.util.function.Predicate;
import java.util.stream.Stream; import java.util.stream.Stream;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import se.su.dsv.scipro.daisyExternal.http.DaisyAPI; import se.su.dsv.scipro.daisyexternal.http.DaisyAPI;
import se.su.dsv.scipro.finalseminar.FinalSeminar; import se.su.dsv.scipro.finalseminar.FinalSeminar;
import se.su.dsv.scipro.finalseminar.FinalSeminarParticipation; import se.su.dsv.scipro.finalseminar.FinalSeminarParticipation;
import se.su.dsv.scipro.finalseminar.FinalSeminarService; import se.su.dsv.scipro.finalseminar.FinalSeminarService;
import se.su.dsv.scipro.finalthesis.FinalThesis; import se.su.dsv.scipro.finalthesis.FinalThesis;
import se.su.dsv.scipro.finalthesis.FinalThesisService; import se.su.dsv.scipro.finalthesis.FinalThesisService;
import se.su.dsv.scipro.io.ExternalExporter; import se.su.dsv.scipro.io.ExternalExporter;
import se.su.dsv.scipro.io.dto.*; import se.su.dsv.scipro.io.dto.AuthorProjectParticipant;
import se.su.dsv.scipro.io.dto.Person;
import se.su.dsv.scipro.io.dto.ProjectParticipant;
import se.su.dsv.scipro.io.dto.ResearchAreaWithID;
import se.su.dsv.scipro.io.dto.ResearchAreas;
import se.su.dsv.scipro.io.dto.Role;
import se.su.dsv.scipro.io.dto.Thesis;
import se.su.dsv.scipro.io.dto.ThesisToBeUpdated;
import se.su.dsv.scipro.io.dto.UnitWithID;
import se.su.dsv.scipro.io.exceptions.ExternalExportException; import se.su.dsv.scipro.io.exceptions.ExternalExportException;
import se.su.dsv.scipro.io.facade.ExporterFacade; import se.su.dsv.scipro.io.facade.ExporterFacade;
import se.su.dsv.scipro.project.Project; import se.su.dsv.scipro.project.Project;

View File

@ -6,7 +6,7 @@ import java.time.Instant;
import java.util.Optional; import java.util.Optional;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import se.su.dsv.scipro.daisyExternal.http.DaisyAPI; import se.su.dsv.scipro.daisyexternal.http.DaisyAPI;
import se.su.dsv.scipro.grading.ThesisApprovedHistoryService; import se.su.dsv.scipro.grading.ThesisApprovedHistoryService;
import se.su.dsv.scipro.io.dto.STATUS; import se.su.dsv.scipro.io.dto.STATUS;
import se.su.dsv.scipro.project.Project; import se.su.dsv.scipro.project.Project;

View File

@ -4,7 +4,7 @@ import jakarta.inject.Inject;
import java.util.Collections; import java.util.Collections;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import se.su.dsv.scipro.daisyExternal.http.DaisyAPI; import se.su.dsv.scipro.daisyexternal.http.DaisyAPI;
import se.su.dsv.scipro.finalthesis.FinalThesis; import se.su.dsv.scipro.finalthesis.FinalThesis;
import se.su.dsv.scipro.finalthesis.FinalThesisService; import se.su.dsv.scipro.finalthesis.FinalThesisService;
import se.su.dsv.scipro.forum.ProjectForumService; import se.su.dsv.scipro.forum.ProjectForumService;

View File

@ -8,10 +8,10 @@ import java.util.*;
import java.util.stream.Stream; import java.util.stream.Stream;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import se.su.dsv.scipro.daisyExternal.ExternalImporter; import se.su.dsv.scipro.daisyexternal.ExternalImporter;
import se.su.dsv.scipro.daisyExternal.ImporterTransactions; import se.su.dsv.scipro.daisyexternal.ImporterTransactions;
import se.su.dsv.scipro.daisyExternal.http.DaisyAPI; import se.su.dsv.scipro.daisyexternal.http.DaisyAPI;
import se.su.dsv.scipro.daisyExternal.http.Semester; import se.su.dsv.scipro.daisyexternal.http.Semester;
import se.su.dsv.scipro.io.dto.Person; import se.su.dsv.scipro.io.dto.Person;
import se.su.dsv.scipro.io.dto.Program; import se.su.dsv.scipro.io.dto.Program;
import se.su.dsv.scipro.io.dto.ProgramAdmission; import se.su.dsv.scipro.io.dto.ProgramAdmission;

View File

@ -6,9 +6,19 @@ import java.math.BigDecimal;
import java.util.Calendar; import java.util.Calendar;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import se.su.dsv.scipro.daisyExternal.http.DaisyAPI; import se.su.dsv.scipro.daisyexternal.http.DaisyAPI;
import se.su.dsv.scipro.io.ExternalExporter; import se.su.dsv.scipro.io.ExternalExporter;
import se.su.dsv.scipro.io.dto.*; import se.su.dsv.scipro.io.dto.AddThesisAuthor;
import se.su.dsv.scipro.io.dto.AddThesisAuthorCourse;
import se.su.dsv.scipro.io.dto.AddThesisAuthorStudent;
import se.su.dsv.scipro.io.dto.EducationalLevel;
import se.su.dsv.scipro.io.dto.Person;
import se.su.dsv.scipro.io.dto.ProjectParticipant;
import se.su.dsv.scipro.io.dto.ResearchAreaWithID;
import se.su.dsv.scipro.io.dto.ResearchAreas;
import se.su.dsv.scipro.io.dto.Role;
import se.su.dsv.scipro.io.dto.ThesisToBeCreated;
import se.su.dsv.scipro.io.dto.UnitWithID;
import se.su.dsv.scipro.io.exceptions.ExternalExportException; import se.su.dsv.scipro.io.exceptions.ExternalExportException;
import se.su.dsv.scipro.project.Project; import se.su.dsv.scipro.project.Project;
import se.su.dsv.scipro.reusable.SciProUtilities; import se.su.dsv.scipro.reusable.SciProUtilities;

View File

@ -1,4 +1,4 @@
package se.su.dsv.scipro.daisyExternal.impl; package se.su.dsv.scipro.daisyexternal.impl;
import static org.junit.jupiter.api.Assertions.*; import static org.junit.jupiter.api.Assertions.*;
import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.anyString;
@ -9,8 +9,8 @@ import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock; import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension; import org.mockito.junit.jupiter.MockitoExtension;
import se.su.dsv.scipro.daisyExternal.ImporterTransactions; import se.su.dsv.scipro.daisyexternal.ImporterTransactions;
import se.su.dsv.scipro.daisyExternal.http.DaisyAPI; import se.su.dsv.scipro.daisyexternal.http.DaisyAPI;
import se.su.dsv.scipro.io.dto.Person; import se.su.dsv.scipro.io.dto.Person;
import se.su.dsv.scipro.springdata.services.UnitService; import se.su.dsv.scipro.springdata.services.UnitService;
import se.su.dsv.scipro.system.UserImportService; import se.su.dsv.scipro.system.UserImportService;

View File

@ -1,4 +1,4 @@
package se.su.dsv.scipro.daisyExternal.impl; package se.su.dsv.scipro.daisyexternal.impl;
import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockito.AdditionalAnswers.returnsFirstArg; import static org.mockito.AdditionalAnswers.returnsFirstArg;
@ -12,12 +12,17 @@ import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.ArgumentCaptor; import org.mockito.ArgumentCaptor;
import org.mockito.Mock; import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension; import org.mockito.junit.jupiter.MockitoExtension;
import se.su.dsv.scipro.daisyExternal.http.DaisyAPI; import se.su.dsv.scipro.daisyexternal.http.DaisyAPI;
import se.su.dsv.scipro.io.dto.Person; import se.su.dsv.scipro.io.dto.Person;
import se.su.dsv.scipro.io.dto.UserName; import se.su.dsv.scipro.io.dto.UserName;
import se.su.dsv.scipro.match.ProgramService; import se.su.dsv.scipro.match.ProgramService;
import se.su.dsv.scipro.project.ProjectService; import se.su.dsv.scipro.project.ProjectService;
import se.su.dsv.scipro.system.*; import se.su.dsv.scipro.system.ProjectTypeService;
import se.su.dsv.scipro.system.ResearchAreaService;
import se.su.dsv.scipro.system.User;
import se.su.dsv.scipro.system.UserNameService;
import se.su.dsv.scipro.system.UserService;
import se.su.dsv.scipro.system.Username;
@ExtendWith(MockitoExtension.class) @ExtendWith(MockitoExtension.class)
public class ImporterTransactionsImplTest { public class ImporterTransactionsImplTest {

View File

@ -11,7 +11,7 @@ import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock; import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension; import org.mockito.junit.jupiter.MockitoExtension;
import se.su.dsv.scipro.daisyExternal.http.DaisyAPI; import se.su.dsv.scipro.daisyexternal.http.DaisyAPI;
import se.su.dsv.scipro.grading.GradingCompletedEvent; import se.su.dsv.scipro.grading.GradingCompletedEvent;
import se.su.dsv.scipro.io.dto.AuthorProjectParticipant; import se.su.dsv.scipro.io.dto.AuthorProjectParticipant;
import se.su.dsv.scipro.io.dto.Course; import se.su.dsv.scipro.io.dto.Course;

View File

@ -14,11 +14,16 @@ import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.ArgumentCaptor; import org.mockito.ArgumentCaptor;
import org.mockito.Mock; import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension; import org.mockito.junit.jupiter.MockitoExtension;
import se.su.dsv.scipro.daisyExternal.http.DaisyAPI; import se.su.dsv.scipro.daisyexternal.http.DaisyAPI;
import se.su.dsv.scipro.finalseminar.FinalSeminarService; import se.su.dsv.scipro.finalseminar.FinalSeminarService;
import se.su.dsv.scipro.finalthesis.FinalThesisService; import se.su.dsv.scipro.finalthesis.FinalThesisService;
import se.su.dsv.scipro.io.ExternalExporter; import se.su.dsv.scipro.io.ExternalExporter;
import se.su.dsv.scipro.io.dto.*; import se.su.dsv.scipro.io.dto.AuthorProjectParticipant;
import se.su.dsv.scipro.io.dto.Person;
import se.su.dsv.scipro.io.dto.ProjectParticipant;
import se.su.dsv.scipro.io.dto.Role;
import se.su.dsv.scipro.io.dto.Thesis;
import se.su.dsv.scipro.io.dto.ThesisToBeUpdated;
import se.su.dsv.scipro.io.facade.ExporterFacade; import se.su.dsv.scipro.io.facade.ExporterFacade;
import se.su.dsv.scipro.project.Project; import se.su.dsv.scipro.project.Project;
import se.su.dsv.scipro.project.ProjectRepo; import se.su.dsv.scipro.project.ProjectRepo;

View File

@ -13,7 +13,7 @@ import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock; import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension; import org.mockito.junit.jupiter.MockitoExtension;
import se.su.dsv.scipro.daisyExternal.http.DaisyAPI; import se.su.dsv.scipro.daisyexternal.http.DaisyAPI;
import se.su.dsv.scipro.grading.ThesisApprovedHistoryService; import se.su.dsv.scipro.grading.ThesisApprovedHistoryService;
import se.su.dsv.scipro.io.dto.STATUS; import se.su.dsv.scipro.io.dto.STATUS;
import se.su.dsv.scipro.io.dto.Thesis; import se.su.dsv.scipro.io.dto.Thesis;

View File

@ -4,15 +4,19 @@ import static java.util.Arrays.asList;
import static org.mockito.Mockito.*; import static org.mockito.Mockito.*;
import jakarta.persistence.EntityManager; import jakarta.persistence.EntityManager;
import java.util.*; import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Optional;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock; import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension; import org.mockito.junit.jupiter.MockitoExtension;
import se.su.dsv.scipro.daisyExternal.ExternalImporter; import se.su.dsv.scipro.daisyexternal.ExternalImporter;
import se.su.dsv.scipro.daisyExternal.ImporterTransactions; import se.su.dsv.scipro.daisyexternal.ImporterTransactions;
import se.su.dsv.scipro.daisyExternal.http.DaisyAPI; import se.su.dsv.scipro.daisyexternal.http.DaisyAPI;
import se.su.dsv.scipro.io.dto.Person; import se.su.dsv.scipro.io.dto.Person;
import se.su.dsv.scipro.io.dto.Thesis; import se.su.dsv.scipro.io.dto.Thesis;
import se.su.dsv.scipro.match.ProgramService; import se.su.dsv.scipro.match.ProgramService;

View File

@ -16,7 +16,7 @@ import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.ArgumentCaptor; import org.mockito.ArgumentCaptor;
import org.mockito.Mock; import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension; import org.mockito.junit.jupiter.MockitoExtension;
import se.su.dsv.scipro.daisyExternal.http.DaisyAPI; import se.su.dsv.scipro.daisyexternal.http.DaisyAPI;
import se.su.dsv.scipro.io.dto.ThesisToBeCreated; import se.su.dsv.scipro.io.dto.ThesisToBeCreated;
import se.su.dsv.scipro.project.Project; import se.su.dsv.scipro.project.Project;
import se.su.dsv.scipro.reusable.SciProUtilities; import se.su.dsv.scipro.reusable.SciProUtilities;

View File

@ -20,7 +20,7 @@ import org.apache.wicket.model.IModel;
import org.apache.wicket.model.LoadableDetachableModel; import org.apache.wicket.model.LoadableDetachableModel;
import org.apache.wicket.model.Model; import org.apache.wicket.model.Model;
import se.su.dsv.scipro.components.BootstrapDatePicker; import se.su.dsv.scipro.components.BootstrapDatePicker;
import se.su.dsv.scipro.daisyExternal.http.DaisyAPI; import se.su.dsv.scipro.daisyexternal.http.DaisyAPI;
import se.su.dsv.scipro.file.FileDescription; import se.su.dsv.scipro.file.FileDescription;
import se.su.dsv.scipro.file.FileService; import se.su.dsv.scipro.file.FileService;
import se.su.dsv.scipro.finalseminar.FinalSeminar; import se.su.dsv.scipro.finalseminar.FinalSeminar;

View File

@ -14,8 +14,8 @@ import org.apache.wicket.injection.Injector;
import org.apache.wicket.request.resource.AbstractResource; import org.apache.wicket.request.resource.AbstractResource;
import org.apache.wicket.request.resource.IResource; import org.apache.wicket.request.resource.IResource;
import org.apache.wicket.request.resource.ResourceReference; import org.apache.wicket.request.resource.ResourceReference;
import se.su.dsv.scipro.daisyExternal.http.DaisyAPI; import se.su.dsv.scipro.daisyexternal.http.DaisyAPI;
import se.su.dsv.scipro.daisyExternal.http.PhotoResult; import se.su.dsv.scipro.daisyexternal.http.PhotoResult;
import se.su.dsv.scipro.data.dataobjects.Member; import se.su.dsv.scipro.data.dataobjects.Member;
import se.su.dsv.scipro.finalseminar.FinalSeminarService; import se.su.dsv.scipro.finalseminar.FinalSeminarService;
import se.su.dsv.scipro.project.Project; import se.su.dsv.scipro.project.Project;

View File

@ -30,8 +30,8 @@ import se.su.dsv.scipro.checklist.ChecklistCategoryRepo;
import se.su.dsv.scipro.checklist.ChecklistQuestionRepo; import se.su.dsv.scipro.checklist.ChecklistQuestionRepo;
import se.su.dsv.scipro.checklist.ChecklistService; import se.su.dsv.scipro.checklist.ChecklistService;
import se.su.dsv.scipro.checklist.ChecklistTemplateService; import se.su.dsv.scipro.checklist.ChecklistTemplateService;
import se.su.dsv.scipro.daisyExternal.http.DaisyAPI; import se.su.dsv.scipro.daisyexternal.http.DaisyAPI;
import se.su.dsv.scipro.daisyExternal.http.PhotoResult; import se.su.dsv.scipro.daisyexternal.http.PhotoResult;
import se.su.dsv.scipro.data.enums.DateStyle; import se.su.dsv.scipro.data.enums.DateStyle;
import se.su.dsv.scipro.date.DateService; import se.su.dsv.scipro.date.DateService;
import se.su.dsv.scipro.examiner.pages.ExaminerStartPage; import se.su.dsv.scipro.examiner.pages.ExaminerStartPage;