Skip to content
Snippets Groups Projects
Commit 04e23380 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-6162 configure OzgCloudUserProfileService

parent 169a03aa
No related branches found
No related tags found
No related merge requests found
......@@ -32,12 +32,16 @@ import de.ozgcloud.apilib.common.command.grpc.GrpcOzgCloudCommandService;
import de.ozgcloud.apilib.file.OzgCloudFileService;
import de.ozgcloud.apilib.file.grpc.GrpcOzgCloudFileService;
import de.ozgcloud.apilib.file.grpc.OzgCloudFileMapper;
import de.ozgcloud.apilib.user.GrpcOzgCloudUserProfileService;
import de.ozgcloud.apilib.user.OzgCloudUserProfileService;
import de.ozgcloud.apilib.user.UserProfileMapper;
import de.ozgcloud.apilib.vorgang.OzgCloudVorgangService;
import de.ozgcloud.apilib.vorgang.grpc.GrpcOzgCloudVorgangService;
import de.ozgcloud.apilib.vorgang.grpc.OzgCloudVorgangMapper;
import de.ozgcloud.apilib.vorgang.grpc.OzgCloudVorgangQueryMapper;
import de.ozgcloud.apilib.vorgang.grpc.OzgCloudVorgangStubMapper;
import de.ozgcloud.collaboration.common.callcontext.CollaborationManagerCallContextProvider;
import de.ozgcloud.user.grpc.userprofile.UserProfileServiceGrpc.UserProfileServiceBlockingStub;
import de.ozgcloud.vorgang.grpc.binaryFile.BinaryFileServiceGrpc.BinaryFileServiceBlockingStub;
import de.ozgcloud.vorgang.grpc.binaryFile.BinaryFileServiceGrpc.BinaryFileServiceStub;
import de.ozgcloud.vorgang.grpc.command.CommandServiceGrpc.CommandServiceBlockingStub;
......@@ -50,6 +54,7 @@ public class CollaborationManagerConfiguration {
public static final String COMMAND_SERVICE_NAME = "collaboration_OzgCloudCommandService";
public static final String FILE_SERVICE_NAME = "collaboration_OzgCloudFileService";
public static final String CURRENT_USER_SERVICE_NAME = "collaboration_CurrentUserService";
public static final String OZG_CLOUD_USER_PROFILE_SERVICE_NAME = "collaboration_OzgCloudUserProfileService";
public static final String USER_PROFILE_SERVICE_NAME = "collaboration_UserProfileService";
public static final String VORGANG_SERVICE_NAME = "collaboration_VorgangService";
public static final String VORGANG_REMOTE_SERVICE_NAME = "collaboration_VorgangRemoteService";
......@@ -66,6 +71,7 @@ public class CollaborationManagerConfiguration {
public static final String GRPC_VORGANG_MANAGER_NAME = "vorgang-manager";
public static final String GRPC_COMMAND_MANAGER_NAME = "command-manager";
public static final String GRPC_FILE_MANAGER_NAME = "file-manager";
public static final String GRPC_USER_MANAGER_NAME = "user-manager";
public static final String GRPC_VORGANG_ATTACHED_ITEM_SERVICE_NAME = "vorgang-attached-item";
@GrpcClient(GRPC_COMMAND_MANAGER_NAME)
......@@ -79,6 +85,9 @@ public class CollaborationManagerConfiguration {
@GrpcClient(GRPC_FILE_MANAGER_NAME)
private BinaryFileServiceStub binaryFileServiceAsyncStub;
@GrpcClient(GRPC_USER_MANAGER_NAME)
private UserProfileServiceBlockingStub userProfileServiceStub;
@Bean(COMMAND_SERVICE_NAME) // NOSONAR
OzgCloudCommandService grpcOzgCloudCommandService(CommandMapper commandMapper, CollaborationManagerCallContextProvider contextProvider) {
return new GrpcOzgCloudCommandService(commandServiceStub, commandMapper, contextProvider,
......@@ -95,4 +104,10 @@ public class CollaborationManagerConfiguration {
OzgCloudVorgangQueryMapper vorgangQueryMapper, CollaborationManagerCallContextProvider contextProvider) {
return new GrpcOzgCloudVorgangService(vorgangServiceStub, vorgangMapper, vorgangStubMapper, vorgangQueryMapper, contextProvider);
}
@Bean(OZG_CLOUD_USER_PROFILE_SERVICE_NAME)
OzgCloudUserProfileService grpcOzgCloudUserProfileService(UserProfileMapper userProfileMapper,
CollaborationManagerCallContextProvider contextProvider) {
return new GrpcOzgCloudUserProfileService(userProfileServiceStub, userProfileMapper, contextProvider);
}
}
\ No newline at end of file
......@@ -41,6 +41,7 @@ public class UserProfileService {
@Qualifier(CollaborationManagerConfiguration.CURRENT_USER_SERVICE_NAME) // NOSONAR
private final CurrentUserService currentUserService;
@Qualifier(CollaborationManagerConfiguration.OZG_CLOUD_USER_PROFILE_SERVICE_NAME)
private final Optional<OzgCloudUserProfileService> ozgCloudUserProfileService;
private final CollaborationUserProfileMapper mapper;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment