argos/dmp-backend/core/src/main/java/eu/eudat/service/dmp/DmpService.java

44 lines
1.9 KiB
Java
Raw Normal View History

package eu.eudat.service.dmp;
2023-10-20 15:48:55 +02:00
import com.fasterxml.jackson.core.JsonProcessingException;
import eu.eudat.data.DmpUserEntity;
2023-10-23 11:51:11 +02:00
import eu.eudat.model.Dmp;
import eu.eudat.model.persist.CloneDmpPersist;
2023-10-23 11:51:11 +02:00
import eu.eudat.model.persist.DmpPersist;
import eu.eudat.model.persist.DmpUserPersist;
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;
import jakarta.xml.bind.JAXBException;
import org.springframework.http.ResponseEntity;
2023-10-23 11:51:11 +02:00
import javax.management.InvalidApplicationException;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.TransformerException;
2023-11-14 12:41:57 +01:00
import java.io.IOException;
import java.util.List;
2023-10-23 11:51:11 +02:00
import java.util.UUID;
public interface DmpService {
2023-10-20 15:48:55 +02:00
enum DmpExportType {
Word, Json, Xml;
}
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
Dmp createNewVersion(NewVersionDmpPersist model, FieldSet fields) throws MyForbiddenException, MyValidationException, MyApplicationException, MyNotFoundException, InvalidApplicationException, JAXBException, ParserConfigurationException, JsonProcessingException, TransformerException;
Dmp buildClone(CloneDmpPersist model, FieldSet fields) throws MyForbiddenException, MyValidationException, MyApplicationException, MyNotFoundException;
List<DmpUserEntity> assignUsers(UUID dmp, List<DmpUserPersist> model, FieldSet fields) throws InvalidApplicationException;
ResponseEntity<byte[]> export(UUID id, DmpExportType exportType);
2023-10-20 15:48:55 +02:00
}