109
109
import io .airbyte .config .persistence .ConfigRepository ;
110
110
import io .airbyte .config .persistence .SecretsRepositoryReader ;
111
111
import io .airbyte .config .persistence .SecretsRepositoryWriter ;
112
- import io .airbyte .config .persistence .StatePersistence ;
113
112
import io .airbyte .persistence .job .JobPersistence ;
114
113
import io .airbyte .persistence .job .WorkspaceHelper ;
115
114
import io .airbyte .server .errors .BadObjectSchemaKnownException ;
118
117
import io .airbyte .server .handlers .DestinationDefinitionsHandler ;
119
118
import io .airbyte .server .handlers .DestinationHandler ;
120
119
import io .airbyte .server .handlers .JobHistoryHandler ;
121
- import io .airbyte .server .handlers .OperationsHandler ;
122
120
import io .airbyte .server .handlers .SchedulerHandler ;
123
121
import io .airbyte .server .handlers .SourceDefinitionsHandler ;
124
122
import io .airbyte .server .handlers .SourceHandler ;
125
- import io .airbyte .server .handlers .StateHandler ;
126
- import io .airbyte .server .handlers .WebBackendConnectionsHandler ;
127
- import io .airbyte .server .handlers .WebBackendGeographiesHandler ;
128
123
import io .airbyte .server .handlers .WorkspacesHandler ;
129
124
import io .airbyte .server .scheduler .EventRunner ;
130
125
import io .airbyte .server .scheduler .SynchronousSchedulerClient ;
@@ -146,19 +141,14 @@ public class ConfigurationApi implements io.airbyte.api.generated.V1Api {
146
141
private final DestinationDefinitionsHandler destinationDefinitionsHandler ;
147
142
private final DestinationHandler destinationHandler ;
148
143
private final ConnectionsHandler connectionsHandler ;
149
- private final OperationsHandler operationsHandler ;
150
144
private final SchedulerHandler schedulerHandler ;
151
- private final StateHandler stateHandler ;
152
145
private final JobHistoryHandler jobHistoryHandler ;
153
- private final WebBackendConnectionsHandler webBackendConnectionsHandler ;
154
- private final WebBackendGeographiesHandler webBackendGeographiesHandler ;
155
146
156
147
public ConfigurationApi (final ConfigRepository configRepository ,
157
148
final JobPersistence jobPersistence ,
158
149
final SecretsRepositoryReader secretsRepositoryReader ,
159
150
final SecretsRepositoryWriter secretsRepositoryWriter ,
160
151
final SynchronousSchedulerClient synchronousSchedulerClient ,
161
- final StatePersistence statePersistence ,
162
152
final TrackingClient trackingClient ,
163
153
final WorkerEnvironment workerEnvironment ,
164
154
final LogConfigs logConfigs ,
@@ -186,15 +176,13 @@ public ConfigurationApi(final ConfigRepository configRepository,
186
176
eventRunner ,
187
177
connectionsHandler );
188
178
189
- stateHandler = new StateHandler (statePersistence );
190
179
sourceHandler = new SourceHandler (
191
180
configRepository ,
192
181
secretsRepositoryReader ,
193
182
secretsRepositoryWriter ,
194
183
schemaValidator ,
195
184
connectionsHandler );
196
185
sourceDefinitionsHandler = new SourceDefinitionsHandler (configRepository , synchronousSchedulerClient , sourceHandler );
197
- operationsHandler = new OperationsHandler (configRepository );
198
186
destinationHandler = new DestinationHandler (
199
187
configRepository ,
200
188
secretsRepositoryReader ,
@@ -210,17 +198,6 @@ public ConfigurationApi(final ConfigRepository configRepository,
210
198
sourceHandler );
211
199
jobHistoryHandler = new JobHistoryHandler (jobPersistence , workerEnvironment , logConfigs , connectionsHandler , sourceHandler ,
212
200
sourceDefinitionsHandler , destinationHandler , destinationDefinitionsHandler , airbyteVersion );
213
- webBackendConnectionsHandler = new WebBackendConnectionsHandler (
214
- connectionsHandler ,
215
- stateHandler ,
216
- sourceHandler ,
217
- destinationHandler ,
218
- jobHistoryHandler ,
219
- schedulerHandler ,
220
- operationsHandler ,
221
- eventRunner ,
222
- configRepository );
223
- webBackendGeographiesHandler = new WebBackendGeographiesHandler ();
224
201
}
225
202
226
203
// WORKSPACE
@@ -417,7 +394,7 @@ public void revokeSourceDefinitionFromWorkspace(final SourceDefinitionIdWithWork
417
394
418
395
@ Override
419
396
public InternalOperationResult saveStats (final SaveStatsRequestBody saveStatsRequestBody ) {
420
- throw new UnsupportedOperationException ();
397
+ throw new NotImplementedException ();
421
398
}
422
399
423
400
// SOURCE SPECIFICATION
@@ -1116,39 +1093,67 @@ public HealthCheckRead getHealthCheck() {
1116
1093
1117
1094
// WEB BACKEND
1118
1095
1096
+ /**
1097
+ * This implementation has been moved to {@link HealthApiController}. Since the path of
1098
+ * {@link HealthApiController} is more granular, it will override this implementation
1099
+ */
1119
1100
@ Override
1120
1101
public WebBackendConnectionReadList webBackendListConnectionsForWorkspace (final WorkspaceIdRequestBody workspaceIdRequestBody ) {
1121
- return execute (() -> webBackendConnectionsHandler . webBackendListConnectionsForWorkspace ( workspaceIdRequestBody ) );
1102
+ throw new NotImplementedException ( );
1122
1103
}
1123
1104
1105
+ /**
1106
+ * This implementation has been moved to {@link HealthApiController}. Since the path of
1107
+ * {@link HealthApiController} is more granular, it will override this implementation
1108
+ */
1124
1109
@ Override
1125
1110
public WebBackendGeographiesListResult webBackendListGeographies () {
1126
- return execute ( webBackendGeographiesHandler :: listGeographiesOSS );
1111
+ throw new NotImplementedException ( );
1127
1112
}
1128
1113
1114
+ /**
1115
+ * This implementation has been moved to {@link HealthApiController}. Since the path of
1116
+ * {@link HealthApiController} is more granular, it will override this implementation
1117
+ */
1129
1118
@ Override
1130
1119
public WebBackendConnectionRead webBackendGetConnection (final WebBackendConnectionRequestBody webBackendConnectionRequestBody ) {
1131
- return execute (() -> webBackendConnectionsHandler . webBackendGetConnection ( webBackendConnectionRequestBody ) );
1120
+ throw new NotImplementedException ( );
1132
1121
}
1133
1122
1123
+ /**
1124
+ * This implementation has been moved to {@link HealthApiController}. Since the path of
1125
+ * {@link HealthApiController} is more granular, it will override this implementation
1126
+ */
1134
1127
@ Override
1135
1128
public WebBackendConnectionRead webBackendCreateConnection (final WebBackendConnectionCreate webBackendConnectionCreate ) {
1136
- return execute (() -> webBackendConnectionsHandler . webBackendCreateConnection ( webBackendConnectionCreate ) );
1129
+ throw new NotImplementedException ( );
1137
1130
}
1138
1131
1132
+ /**
1133
+ * This implementation has been moved to {@link HealthApiController}. Since the path of
1134
+ * {@link HealthApiController} is more granular, it will override this implementation
1135
+ */
1139
1136
@ Override
1140
1137
public WebBackendConnectionRead webBackendUpdateConnection (final WebBackendConnectionUpdate webBackendConnectionUpdate ) {
1141
- return execute (() -> webBackendConnectionsHandler . webBackendUpdateConnection ( webBackendConnectionUpdate ) );
1138
+ throw new NotImplementedException ( );
1142
1139
}
1143
1140
1141
+ /**
1142
+ * This implementation has been moved to {@link HealthApiController}. Since the path of
1143
+ * {@link HealthApiController} is more granular, it will override this implementation
1144
+ */
1144
1145
@ Override
1145
1146
public ConnectionStateType getStateType (final ConnectionIdRequestBody connectionIdRequestBody ) {
1146
- return ConfigurationApi . execute (() -> webBackendConnectionsHandler . getStateType ( connectionIdRequestBody ) );
1147
+ throw new NotImplementedException ( );
1147
1148
}
1148
1149
1150
+ /**
1151
+ * This implementation has been moved to {@link HealthApiController}. Since the path of
1152
+ * {@link HealthApiController} is more granular, it will override this implementation
1153
+ */
1149
1154
@ Override
1150
1155
public WebBackendWorkspaceStateResult webBackendGetWorkspaceState (final WebBackendWorkspaceState webBackendWorkspaceState ) {
1151
- return execute (() -> webBackendConnectionsHandler . getWorkspaceState ( webBackendWorkspaceState ) );
1156
+ throw new NotImplementedException ( );
1152
1157
}
1153
1158
1154
1159
// TODO: Move to common when all the api are moved
0 commit comments