23
23
public interface AsyncProjectService {
24
24
25
25
/**
26
- * Submits a project update request and returns a reactive {@link Mono<ProjectUpdateResponse>}
26
+ * Submits a project update request and returns a reactive {@link Mono< ProjectUpdateResponse >}
27
27
* object immediately.
28
28
* <p>
29
29
* The method is non-blocking.
@@ -46,13 +46,18 @@ Mono<ProjectUpdateResponse> update(
46
46
ProjectUpdateRequest request )
47
47
throws UnknownRequestException , RequestFailedException , AccessDeniedException ;
48
48
49
+
50
+ Mono <ProjectCreationResponse > create (ProjectCreationRequest request )
51
+ throws UnknownRequestException , RequestFailedException , AccessDeniedException ;
52
+
53
+
49
54
/**
50
55
* Container of an update request for a service call and part of the
51
56
* {@link ProjectUpdateRequest}.
52
57
*
53
58
* @since 1.9.0
54
59
*/
55
- sealed interface UpdateRequestBody permits ProjectDesign {
60
+ sealed interface UpdateRequestBody permits FundingInformation , ProjectContacts , ProjectDesign {
56
61
57
62
}
58
63
@@ -62,7 +67,7 @@ sealed interface UpdateRequestBody permits ProjectDesign {
62
67
*
63
68
* @since 1.9.0
64
69
*/
65
- sealed interface UpdateResponseBody permits ProjectDesign {
70
+ sealed interface UpdateResponseBody permits FundingInformation , ProjectContacts , ProjectDesign {
66
71
67
72
}
68
73
@@ -97,6 +102,68 @@ record ProjectDesign(String title, String objective) implements UpdateRequestBod
97
102
98
103
}
99
104
105
+ /**
106
+ * Container for passing information about the different project contacts.
107
+ *
108
+ * @param investigator the principal investigator
109
+ * @param manager the project manager
110
+ * @param responsible the responsible person
111
+ * @since 1.9.0
112
+ */
113
+ record ProjectContacts (ProjectContact investigator , ProjectContact manager ,
114
+ ProjectContact responsible ) implements UpdateRequestBody ,
115
+ UpdateResponseBody {
116
+
117
+ }
118
+
119
+ /**
120
+ * A project contact.
121
+ *
122
+ * @param fullName the full name of the person
123
+ * @param email a valid email address for contact
124
+ * @since 1.9.0
125
+ */
126
+ record ProjectContact (String fullName , String email ) {
127
+
128
+ }
129
+
130
+ /**
131
+ * Container for funding information of a project.
132
+ *
133
+ * @param grant the grant name
134
+ * @param grantId the grant ID
135
+ * @since 1.9.0
136
+ */
137
+ record FundingInformation (String grant , String grantId ) implements UpdateRequestBody ,
138
+ UpdateResponseBody {
139
+
140
+ }
141
+
142
+ /**
143
+ * A service request to create a project.
144
+ *
145
+ * @param design the title and objective of a project
146
+ * @param contacts the different contact persons of a project
147
+ * @param funding some funding information
148
+ * @since 1.9.0
149
+ */
150
+ record ProjectCreationRequest (ProjectDesign design , ProjectContacts contacts ,
151
+ FundingInformation funding ) {
152
+
153
+ }
154
+
155
+
156
+ /**
157
+ * A service response from a project creation request
158
+ *
159
+ * @param projectId
160
+ * @since 1.9, 0
161
+ */
162
+ record ProjectCreationResponse (String projectId ) {
163
+
164
+ }
165
+
166
+
100
167
/**
101
168
* A service request to update project information.
102
169
*
0 commit comments