forked from bwerquin/Knowledge-Back-Office
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from ddecrulle/new-data-model
New data model
- Loading branch information
Showing
20 changed files
with
313 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/main/java/fr/insee/knowledge/controller/errors/ErrorResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package fr.insee.knowledge.controller.errors; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
import lombok.Setter; | ||
|
||
import java.util.List; | ||
|
||
@Getter | ||
@Setter | ||
@RequiredArgsConstructor | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class ErrorResponse { | ||
private final int status; | ||
private final String message; | ||
private final List<String> errors; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
package fr.insee.knowledge.domain; | ||
|
||
import java.util.List; | ||
|
||
public class RawFunction extends GenericIDLabel { | ||
private Boolean dispo; | ||
private String gsbpm; | ||
private String idProduct; | ||
private List<String> users; | ||
private List<String> products; | ||
private List<Task> tasks; | ||
private Service service; | ||
|
||
public RawFunction(String id, String label, String description, Boolean dispo, String gsbpm, String idProduct, List<String> users, List<String> products, List<Task> tasks, Service service) { | ||
super(id, label, description); | ||
this.dispo = dispo; | ||
this.gsbpm = gsbpm; | ||
this.idProduct = idProduct; | ||
this.users = users; | ||
this.products = products; | ||
this.tasks = tasks; | ||
this.service = service; | ||
} | ||
|
||
public RawFunction() { | ||
} | ||
|
||
public Boolean getDispo() { | ||
return dispo; | ||
} | ||
|
||
public void setDispo(Boolean dispo) { | ||
this.dispo = dispo; | ||
} | ||
|
||
public String getGsbpm() { | ||
return gsbpm; | ||
} | ||
|
||
public void setGsbpm(String gsbpm) { | ||
this.gsbpm = gsbpm; | ||
} | ||
|
||
public String getIdProduct() { | ||
return idProduct; | ||
} | ||
|
||
public void setIdProduct(String idProduct) { | ||
this.idProduct = idProduct; | ||
} | ||
|
||
public List<String> getUsers() { | ||
return users; | ||
} | ||
|
||
public void setUsers(List<String> users) { | ||
this.users = users; | ||
} | ||
|
||
public List<String> getProducts() { | ||
return products; | ||
} | ||
|
||
public void setProducts(List<String> products) { | ||
this.products = products; | ||
} | ||
|
||
public List<Task> getTasks() { | ||
return tasks; | ||
} | ||
|
||
public void setTasks(List<Task> tasks) { | ||
this.tasks = tasks; | ||
} | ||
|
||
public Service getService() { | ||
return service; | ||
} | ||
|
||
public void setService(Service service) { | ||
this.service = service; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,4 @@ | |
public interface InitializerService { | ||
|
||
void createCollections(); | ||
|
||
void importDataFromGithub() throws IOException; | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/fr/insee/knowledge/service/exceptions/FunctionValidationException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package fr.insee.knowledge.service.exceptions; | ||
|
||
import lombok.Getter; | ||
|
||
import java.util.List; | ||
|
||
@Getter | ||
public class FunctionValidationException extends RuntimeException { | ||
private final List<String> errorMessages; | ||
|
||
public FunctionValidationException(String message, List<String> errorMessages) { | ||
super(message); | ||
this.errorMessages = errorMessages; | ||
} | ||
} |
Oops, something went wrong.