2023-10-23 09:21:25 +02:00
|
|
|
package eu.eudat.service.dmpblueprint;
|
|
|
|
|
2023-10-24 17:00:11 +02:00
|
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
2023-10-23 17:13:34 +02:00
|
|
|
import eu.eudat.commons.enums.DmpBlueprintSystemFieldType;
|
|
|
|
import eu.eudat.data.DmpBlueprintEntity;
|
2023-10-23 09:21:25 +02:00
|
|
|
import eu.eudat.model.DmpBlueprint;
|
2023-10-23 14:58:33 +02:00
|
|
|
import eu.eudat.model.persist.DmpBlueprintPersist;
|
2024-02-02 13:59:11 +01:00
|
|
|
import eu.eudat.model.persist.NewVersionDmpBlueprintPersist;
|
2023-10-23 09:21:25 +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-10-24 17:00:11 +02:00
|
|
|
import jakarta.xml.bind.JAXBException;
|
|
|
|
import org.springframework.http.ResponseEntity;
|
|
|
|
import org.xml.sax.SAXException;
|
2023-10-23 09:21:25 +02:00
|
|
|
|
|
|
|
import javax.management.InvalidApplicationException;
|
2023-10-24 17:00:11 +02:00
|
|
|
import javax.xml.parsers.ParserConfigurationException;
|
|
|
|
import javax.xml.transform.TransformerException;
|
|
|
|
import java.io.IOException;
|
2023-10-23 09:21:25 +02:00
|
|
|
import java.util.UUID;
|
|
|
|
|
|
|
|
public interface DmpBlueprintService {
|
|
|
|
|
2023-10-24 17:00:11 +02:00
|
|
|
DmpBlueprint persist(DmpBlueprintPersist model, FieldSet fields) throws MyForbiddenException, MyValidationException, MyApplicationException, MyNotFoundException, InvalidApplicationException, JAXBException, JsonProcessingException, TransformerException, ParserConfigurationException;
|
2023-10-23 09:21:25 +02:00
|
|
|
|
|
|
|
void deleteAndSave(UUID id) throws MyForbiddenException, InvalidApplicationException;
|
2023-10-23 17:13:34 +02:00
|
|
|
boolean fieldInBlueprint(DmpBlueprintEntity dmpBlueprintEntity, DmpBlueprintSystemFieldType type);
|
2023-10-23 09:21:25 +02:00
|
|
|
|
2024-04-01 17:36:03 +02:00
|
|
|
boolean fieldInBlueprint(UUID id, DmpBlueprintSystemFieldType type) throws InvalidApplicationException;
|
2023-10-24 17:00:11 +02:00
|
|
|
|
|
|
|
DmpBlueprint buildClone(UUID id, FieldSet fields) throws MyForbiddenException, MyValidationException, MyApplicationException, MyNotFoundException;
|
|
|
|
|
2024-02-02 13:59:11 +01:00
|
|
|
DmpBlueprint createNewVersion(NewVersionDmpBlueprintPersist model, FieldSet fieldSet) throws MyForbiddenException, MyValidationException, MyApplicationException, MyNotFoundException, InvalidApplicationException, JAXBException, ParserConfigurationException, JsonProcessingException, TransformerException;
|
|
|
|
|
2023-11-02 13:13:13 +01:00
|
|
|
ResponseEntity<byte[]> exportXml(UUID id) throws MyForbiddenException, MyNotFoundException, JAXBException, ParserConfigurationException, IOException, InstantiationException, IllegalAccessException, SAXException, TransformerException, InvalidApplicationException;
|
2023-10-27 17:46:34 +02:00
|
|
|
DmpBlueprint importXml(byte[] bytes, String label, FieldSet fields) throws MyForbiddenException, MyNotFoundException, JAXBException, ParserConfigurationException, TransformerException, InvalidApplicationException, IOException, InstantiationException, IllegalAccessException, SAXException;
|
2023-10-23 09:21:25 +02:00
|
|
|
}
|