/** * Checks the request payload for validity. * * @param payload The payload to check. * @return boolean The result of the check : {@link Boolean#TRUE} if the payload is valid, {@link Boolean#FALSE} otherwise. * @throws NullPointerException If the payload is {@code null}. */ private boolean isValidRequestPayload(final JsonObject payload) { return hasValidAdapterSpec(payload) && hasValidTrustedCaSpec(payload); }
private void getTenant(final RoutingContext ctx) { final String tenantId = getTenantIdFromContext(ctx); doTenantHttpRequest(ctx, tenantId, TenantConstants.TenantAction.get, status -> status == HttpURLConnection.HTTP_OK, null); }
/** * {@inheritDoc} * * This default implementation simply returns an empty result with status code 501 (Not Implemented). * Subclasses should override this method in order to provide a reasonable implementation. */ @Override public void get(final X500Principal subjectDn, final Handler<AsyncResult<TenantResult<JsonObject>>> resultHandler) { handleUnimplementedOperation(resultHandler); }
/** * {@inheritDoc} * * This default implementation simply returns an empty result with status code 501 (Not Implemented). * Subclasses should override this method in order to provide a reasonable implementation. */ @Override public void remove(final String tenantId, final Handler<AsyncResult<TenantResult<JsonObject>>> resultHandler) { handleUnimplementedOperation(resultHandler); } }
@Override public final void get(final X500Principal subjectDn, final Handler<AsyncResult<TenantResult<JsonObject>>> resultHandler) { get(subjectDn, NoopSpan.INSTANCE, resultHandler); }
@Override public void setConfig(final ServiceConfigProperties configuration) { setSpecificConfig(configuration); } };
@Override public void setConfig(final ServiceConfigProperties configuration) { setSpecificConfig(configuration); } };
private void updateTenant(final RoutingContext ctx) { final String tenantId = getTenantIdFromContext(ctx); doTenantHttpRequest(ctx, tenantId, TenantConstants.TenantAction.update, status -> status == HttpURLConnection.HTTP_NO_CONTENT, null); }
/** * {@inheritDoc} * * This default implementation simply returns an empty result with status code 501 (Not Implemented). * Subclasses should override this method in order to provide a reasonable implementation. */ @Override public void update(final String tenantId, final JsonObject tenantObj, final Handler<AsyncResult<TenantResult<JsonObject>>> resultHandler) { handleUnimplementedOperation(resultHandler); }
/** * {@inheritDoc} * * This default implementation simply returns an empty result with status code 501 (Not Implemented). * Subclasses should override this method in order to provide a reasonable implementation. */ @Override public void get(final String tenantId, final Span span, final Handler<AsyncResult<TenantResult<JsonObject>>> resultHandler) { handleUnimplementedOperation(resultHandler); }
private void removeTenant(final RoutingContext ctx) { final String tenantId = getTenantIdFromContext(ctx); doTenantHttpRequest(ctx, tenantId, TenantConstants.TenantAction.remove, status -> status == HttpURLConnection.HTTP_NO_CONTENT, null); }
/** * {@inheritDoc} * * This default implementation simply returns an empty result with status code 501 (Not Implemented). * Subclasses should override this method in order to provide a reasonable implementation. */ @Override public void remove(final String tenantId, final Handler<AsyncResult<TenantResult<JsonObject>>> resultHandler) { handleUnimplementedOperation(resultHandler); } }
/** * {@inheritDoc} * * This default implementation simply returns an empty result with status code 501 (Not Implemented). * Subclasses should override this method in order to provide a reasonable implementation. */ @Override public void get(final X500Principal subjectDn, final Span span, final Handler<AsyncResult<TenantResult<JsonObject>>> resultHandler) { handleUnimplementedOperation(resultHandler); }
private void updateTenant(final RoutingContext ctx) { final String tenantId = getTenantIdFromContext(ctx); doTenantHttpRequest(ctx, tenantId, TenantConstants.TenantAction.update, status -> status == HttpURLConnection.HTTP_NO_CONTENT, null); }
/** * {@inheritDoc} * * This default implementation simply returns an empty result with status code 501 (Not Implemented). * Subclasses should override this method in order to provide a reasonable implementation. */ @Override public void add(final String tenantId, final JsonObject tenantObj, final Handler<AsyncResult<TenantResult<JsonObject>>> resultHandler) { handleUnimplementedOperation(resultHandler); }
/** * {@inheritDoc} * * This default implementation simply returns an empty result with status code 501 (Not Implemented). * Subclasses should override this method in order to provide a reasonable implementation. */ @Override public void get(final String tenantId, final Handler<AsyncResult<TenantResult<JsonObject>>> resultHandler) { handleUnimplementedOperation(resultHandler); }
private void removeTenant(final RoutingContext ctx) { final String tenantId = getTenantIdFromContext(ctx); doTenantHttpRequest(ctx, tenantId, TenantConstants.TenantAction.remove, status -> status == HttpURLConnection.HTTP_NO_CONTENT, null); }
/** * {@inheritDoc} * * This default implementation simply returns an empty result with status code 501 (Not Implemented). * Subclasses should override this method in order to provide a reasonable implementation. */ @Override public void update(final String tenantId, final JsonObject tenantObj, final Handler<AsyncResult<TenantResult<JsonObject>>> resultHandler) { handleUnimplementedOperation(resultHandler); }
private void getTenant(final RoutingContext ctx) { final String tenantId = getTenantIdFromContext(ctx); doTenantHttpRequest(ctx, tenantId, TenantConstants.TenantAction.get, status -> status == HttpURLConnection.HTTP_OK, null); }
/** * {@inheritDoc} * * This default implementation simply returns an empty result with status code 501 (Not Implemented). * Subclasses should override this method in order to provide a reasonable implementation. */ @Override public void add(final String tenantId, final JsonObject tenantObj, final Handler<AsyncResult<TenantResult<JsonObject>>> resultHandler) { handleUnimplementedOperation(resultHandler); }