2023-10-23 10:16:58 +02:00
|
|
|
package eu.eudat.service.dmp;
|
2023-10-20 15:48:55 +02:00
|
|
|
|
2023-11-02 17:12:36 +01:00
|
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
2023-11-13 15:46:35 +01:00
|
|
|
import eu.eudat.data.DmpUserEntity;
|
2023-10-23 11:51:11 +02:00
|
|
|
import eu.eudat.model.Dmp;
|
2023-11-09 13:10:32 +01:00
|
|
|
import eu.eudat.model.persist.CloneDmpPersist;
|
2023-10-23 11:51:11 +02:00
|
|
|
import eu.eudat.model.persist.DmpPersist;
|
2023-11-13 15:46:35 +01:00
|
|
|
import eu.eudat.model.persist.DmpUserPersist;
|
2023-11-08 16:13:07 +01:00
|
|
|
import eu.eudat.model.persist.NewVersionDmpPersist;
|
2023-10-23 11:51:11 +02:00
|
|
|
import gr.cite.tools.exception.MyApplicationException;
|
|
|
|
import gr.cite.tools.exception.MyForbiddenException;
|
|
|
|
import gr.cite.tools.exception.MyNotFoundException;
|
|
|
|
import gr.cite.tools.exception.MyValidationException;
|
|
|
|
import gr.cite.tools.fieldset.FieldSet;
|
2023-11-02 17:12:36 +01:00
|
|
|
import jakarta.xml.bind.JAXBException;
|
2023-11-14 10:44:01 +01:00
|
|
|
import org.springframework.http.ResponseEntity;
|
2023-10-23 11:51:11 +02:00
|
|
|
|
|
|
|
import javax.management.InvalidApplicationException;
|
2023-11-02 17:12:36 +01:00
|
|
|
import javax.xml.parsers.ParserConfigurationException;
|
|
|
|
import javax.xml.transform.TransformerException;
|
2023-11-14 12:41:57 +01:00
|
|
|
import java.io.IOException;
|
2023-11-13 15:46:35 +01:00
|
|
|
import java.util.List;
|
2023-10-23 11:51:11 +02:00
|
|
|
import java.util.UUID;
|
|
|
|
|
2023-10-23 10:31:07 +02:00
|
|
|
public interface DmpService {
|
2023-10-20 15:48:55 +02:00
|
|
|
|
2023-11-14 10:44:01 +01:00
|
|
|
enum DmpExportType {
|
|
|
|
Word, Json, Xml;
|
|
|
|
}
|
|
|
|
|
2023-11-03 15:02:47 +01:00
|
|
|
Dmp persist(DmpPersist model, FieldSet fields) throws MyForbiddenException, MyValidationException, MyApplicationException, MyNotFoundException, InvalidApplicationException, JsonProcessingException;
|
2023-10-23 11:51:11 +02:00
|
|
|
|
2023-11-14 12:41:57 +01:00
|
|
|
void deleteAndSave(UUID id) throws MyForbiddenException, InvalidApplicationException, IOException;
|
2023-10-23 11:51:11 +02:00
|
|
|
|
2023-11-08 16:13:07 +01:00
|
|
|
Dmp createNewVersion(NewVersionDmpPersist model, FieldSet fields) throws MyForbiddenException, MyValidationException, MyApplicationException, MyNotFoundException, InvalidApplicationException, JAXBException, ParserConfigurationException, JsonProcessingException, TransformerException;
|
2023-11-02 17:12:36 +01:00
|
|
|
|
2023-11-09 13:10:32 +01:00
|
|
|
Dmp buildClone(CloneDmpPersist model, FieldSet fields) throws MyForbiddenException, MyValidationException, MyApplicationException, MyNotFoundException;
|
|
|
|
|
2023-11-13 15:46:35 +01:00
|
|
|
List<DmpUserEntity> assignUsers(UUID dmp, List<DmpUserPersist> model, FieldSet fields) throws InvalidApplicationException;
|
|
|
|
|
2023-11-14 10:44:01 +01:00
|
|
|
ResponseEntity<byte[]> export(UUID id, DmpExportType exportType);
|
|
|
|
|
2023-10-20 15:48:55 +02:00
|
|
|
}
|