This is an automated email from the ASF dual-hosted git repository.
yasith pushed a commit to branch service-layer-improvements
in repository https://gitbox.apache.org/repos/asf/airavata.git
The following commit(s) were added to refs/heads/service-layer-improvements by
this push:
new 079f448ba2 fix compile issues after service separation
079f448ba2 is described below
commit 079f448ba24d3e9144a27c6dbab9824e44f7d74a
Author: yasithdev <[email protected]>
AuthorDate: Fri Dec 12 09:42:43 2025 -0600
fix compile issues after service separation
---
.../airavata/api/thrift/client/TestSSLClient.java | 2 +-
.../server/TestOrchestratorServiceServer.java | 4 +-
.../security/GatewayGroupsInitializerTest.java | 4 +-
.../security/KeyCloakSecurityManagerTest.java | 2 +-
.../AiravataServiceIntegrationTest.java | 2 +-
.../CredentialStoreServiceIntegrationTest.java | 48 +---------------------
.../GroupManagerServiceIntegrationTest.java | 13 +-----
.../IamAdminServiceIntegrationTest.java | 6 +--
.../OrchestratorServiceIntegrationTest.java | 4 +-
.../RegistryServiceIntegrationTest.java | 2 +-
.../TenantProfileServiceIntegrationTest.java | 2 +-
.../UserProfileServiceIntegrationTest.java | 2 +-
.../file/server/service/AirvataFileService.java | 31 ++++++--------
.../file/server/service/ProcessDataManager.java | 6 +--
.../airavata/research/service/AiravataService.java | 2 +-
15 files changed, 35 insertions(+), 95 deletions(-)
diff --git
a/airavata-api/src/test/java/org/apache/airavata/api/thrift/client/TestSSLClient.java
b/airavata-api/src/test/java/org/apache/airavata/api/thrift/client/TestSSLClient.java
index 925cea0c92..3e4b0869b2 100644
---
a/airavata-api/src/test/java/org/apache/airavata/api/thrift/client/TestSSLClient.java
+++
b/airavata-api/src/test/java/org/apache/airavata/api/thrift/client/TestSSLClient.java
@@ -26,7 +26,7 @@ import java.security.cert.X509Certificate;
import org.apache.airavata.model.credential.store.CertificateCredential;
import org.apache.airavata.model.credential.store.CommunityUser;
import org.apache.airavata.model.credential.store.SSHCredential;
-import org.apache.airavata.service.CredentialStoreService;
+import org.apache.airavata.service.security.CredentialStoreService;
import org.apache.commons.codec.binary.Base64;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
diff --git
a/airavata-api/src/test/java/org/apache/airavata/api/thrift/server/TestOrchestratorServiceServer.java
b/airavata-api/src/test/java/org/apache/airavata/api/thrift/server/TestOrchestratorServiceServer.java
index 67b6cc640d..51c36922f0 100644
---
a/airavata-api/src/test/java/org/apache/airavata/api/thrift/server/TestOrchestratorServiceServer.java
+++
b/airavata-api/src/test/java/org/apache/airavata/api/thrift/server/TestOrchestratorServiceServer.java
@@ -31,8 +31,8 @@ import org.apache.airavata.model.util.ExperimentModelUtil;
import org.apache.airavata.config.AiravataServerProperties;
import org.apache.airavata.orchestrator.exception.OrchestratorException;
import org.apache.airavata.registry.api.exception.RegistryServiceException;
-import org.apache.airavata.service.OrchestratorService;
-import org.apache.airavata.service.RegistryService;
+import org.apache.airavata.service.orchestrator.OrchestratorService;
+import org.apache.airavata.service.registry.RegistryService;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
diff --git
a/airavata-api/src/test/java/org/apache/airavata/security/GatewayGroupsInitializerTest.java
b/airavata-api/src/test/java/org/apache/airavata/security/GatewayGroupsInitializerTest.java
index 1caef02619..6d1a52260c 100644
---
a/airavata-api/src/test/java/org/apache/airavata/security/GatewayGroupsInitializerTest.java
+++
b/airavata-api/src/test/java/org/apache/airavata/security/GatewayGroupsInitializerTest.java
@@ -27,8 +27,8 @@ import
org.apache.airavata.model.appcatalog.gatewaygroups.GatewayGroups;
import
org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile;
import org.apache.airavata.model.credential.store.PasswordCredential;
import org.apache.airavata.registry.api.exception.RegistryServiceException;
-import org.apache.airavata.service.CredentialStoreService;
-import org.apache.airavata.service.RegistryService;
+import org.apache.airavata.service.security.CredentialStoreService;
+import org.apache.airavata.service.registry.RegistryService;
import org.apache.airavata.service.SharingRegistryService;
import org.apache.airavata.sharing.models.GroupCardinality;
import org.apache.airavata.sharing.models.SharingRegistryException;
diff --git
a/airavata-api/src/test/java/org/apache/airavata/security/KeyCloakSecurityManagerTest.java
b/airavata-api/src/test/java/org/apache/airavata/security/KeyCloakSecurityManagerTest.java
index f3d67e2be3..78e7a365a3 100644
---
a/airavata-api/src/test/java/org/apache/airavata/security/KeyCloakSecurityManagerTest.java
+++
b/airavata-api/src/test/java/org/apache/airavata/security/KeyCloakSecurityManagerTest.java
@@ -37,7 +37,7 @@ import
org.apache.airavata.security.authzcache.AuthzCacheIndex;
import org.apache.airavata.security.authzcache.AuthzCacheManager;
import org.apache.airavata.security.authzcache.AuthzCacheManagerFactory;
import org.apache.airavata.security.authzcache.AuthzCachedStatus;
-import org.apache.airavata.service.RegistryService;
+import org.apache.airavata.service.registry.RegistryService;
import org.apache.airavata.service.SharingRegistryService;
import org.apache.airavata.sharing.models.UserGroup;
import org.junit.jupiter.api.BeforeEach;
diff --git
a/airavata-api/src/test/java/org/apache/airavata/service/integration/AiravataServiceIntegrationTest.java
b/airavata-api/src/test/java/org/apache/airavata/service/integration/AiravataServiceIntegrationTest.java
index 89d068a80c..2d1ba50a1c 100644
---
a/airavata-api/src/test/java/org/apache/airavata/service/integration/AiravataServiceIntegrationTest.java
+++
b/airavata-api/src/test/java/org/apache/airavata/service/integration/AiravataServiceIntegrationTest.java
@@ -24,7 +24,7 @@ import static org.assertj.core.api.Assertions.assertThat;
import org.apache.airavata.model.experiment.ExperimentModel;
import org.apache.airavata.model.workspace.Project;
import org.apache.airavata.service.AiravataService;
-import org.apache.airavata.service.RegistryService;
+import org.apache.airavata.service.registry.RegistryService;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
diff --git
a/airavata-api/src/test/java/org/apache/airavata/service/integration/CredentialStoreServiceIntegrationTest.java
b/airavata-api/src/test/java/org/apache/airavata/service/integration/CredentialStoreServiceIntegrationTest.java
index 91b0ed3bc5..9329115cb9 100644
---
a/airavata-api/src/test/java/org/apache/airavata/service/integration/CredentialStoreServiceIntegrationTest.java
+++
b/airavata-api/src/test/java/org/apache/airavata/service/integration/CredentialStoreServiceIntegrationTest.java
@@ -23,13 +23,12 @@ import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import java.util.List;
-import java.util.Map;
import org.apache.airavata.credential.exceptions.CredentialStoreException;
import org.apache.airavata.model.credential.store.CredentialSummary;
import org.apache.airavata.model.credential.store.PasswordCredential;
import org.apache.airavata.model.credential.store.SSHCredential;
import org.apache.airavata.model.credential.store.SummaryType;
-import org.apache.airavata.service.CredentialStoreService;
+import org.apache.airavata.service.security.CredentialStoreService;
import org.junit.jupiter.api.Test;
/**
@@ -247,51 +246,6 @@ public class CredentialStoreServiceIntegrationTest extends
ServiceIntegrationTes
assertThat(credentialStoreService).isNotNull();
}
- @Test
- public void shouldGetAllCredentialSummariesForGateway() throws
CredentialStoreException {
- // Arrange
- SSHCredential sshCredential =
TestDataFactory.createSSHCredential(TEST_GATEWAY_ID, TEST_USERNAME);
- credentialStoreService.addSSHCredential(sshCredential);
-
- // Act
- List<CredentialSummary> summaries =
-
credentialStoreService.getAllCredentialSummaryForGateway(SummaryType.SSH,
TEST_GATEWAY_ID);
-
- // Assert
- assertThat(summaries).isNotNull();
- }
-
- @Test
- public void shouldGetAllCredentialSummariesForUserInGateway() throws
CredentialStoreException {
- // Arrange
- SSHCredential sshCredential =
TestDataFactory.createSSHCredential(TEST_GATEWAY_ID, TEST_USERNAME);
- credentialStoreService.addSSHCredential(sshCredential);
-
- // Act
- List<CredentialSummary> summaries =
credentialStoreService.getAllCredentialSummaryForUserInGateway(
- SummaryType.SSH, TEST_GATEWAY_ID, TEST_USERNAME);
-
- // Assert
- assertThat(summaries).isNotNull();
- }
-
- @Test
- public void shouldGetAllPWDCredentialsForGateway() throws
CredentialStoreException {
- // Arrange
- PasswordCredential passwordCredential = new PasswordCredential();
- passwordCredential.setGatewayId(TEST_GATEWAY_ID);
- passwordCredential.setPortalUserName(TEST_USERNAME);
- passwordCredential.setLoginUserName("login-user");
- passwordCredential.setPassword("test-password");
- credentialStoreService.addPasswordCredential(passwordCredential);
-
- // Act
- Map<String, String> credentials =
credentialStoreService.getAllPWDCredentialsForGateway(TEST_GATEWAY_ID);
-
- // Assert
- assertThat(credentials).isNotNull();
- }
-
@Test
public void shouldEnforceGatewayBasedAccessControl() throws
CredentialStoreException {
// Arrange
diff --git
a/airavata-api/src/test/java/org/apache/airavata/service/integration/GroupManagerServiceIntegrationTest.java
b/airavata-api/src/test/java/org/apache/airavata/service/integration/GroupManagerServiceIntegrationTest.java
index 4737982ff0..b34f13a6a9 100644
---
a/airavata-api/src/test/java/org/apache/airavata/service/integration/GroupManagerServiceIntegrationTest.java
+++
b/airavata-api/src/test/java/org/apache/airavata/service/integration/GroupManagerServiceIntegrationTest.java
@@ -26,9 +26,7 @@ import java.util.List;
import org.apache.airavata.model.error.AuthorizationException;
import org.apache.airavata.model.group.GroupModel;
import
org.apache.airavata.profile.groupmanager.cpi.exception.GroupManagerServiceException;
-import org.apache.airavata.service.GroupManagerService;
-import org.apache.airavata.service.SharingRegistryService;
-import org.apache.airavata.service.UserProfileService;
+import org.apache.airavata.service.security.GroupManagerService;
import org.apache.airavata.sharing.models.SharingRegistryException;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
@@ -42,16 +40,9 @@ import org.junit.jupiter.api.Test;
public class GroupManagerServiceIntegrationTest extends
ServiceIntegrationTestBase {
private final GroupManagerService groupManagerService;
- private final SharingRegistryService sharingRegistryService;
- private final UserProfileService userProfileService;
- public GroupManagerServiceIntegrationTest(
- GroupManagerService groupManagerService,
- SharingRegistryService sharingRegistryService,
- UserProfileService userProfileService) {
+ public GroupManagerServiceIntegrationTest(GroupManagerService
groupManagerService) {
this.groupManagerService = groupManagerService;
- this.sharingRegistryService = sharingRegistryService;
- this.userProfileService = userProfileService;
}
private String testGroupId;
diff --git
a/airavata-api/src/test/java/org/apache/airavata/service/integration/IamAdminServiceIntegrationTest.java
b/airavata-api/src/test/java/org/apache/airavata/service/integration/IamAdminServiceIntegrationTest.java
index 88ce34e3b8..45648056ec 100644
---
a/airavata-api/src/test/java/org/apache/airavata/service/integration/IamAdminServiceIntegrationTest.java
+++
b/airavata-api/src/test/java/org/apache/airavata/service/integration/IamAdminServiceIntegrationTest.java
@@ -27,9 +27,9 @@ import org.apache.airavata.model.user.UserProfile;
import org.apache.airavata.model.workspace.Gateway;
import
org.apache.airavata.profile.iam.admin.services.cpi.exception.IamAdminServicesException;
import org.apache.airavata.registry.api.exception.RegistryServiceException;
-import org.apache.airavata.service.CredentialStoreService;
-import org.apache.airavata.service.IamAdminService;
-import org.apache.airavata.service.RegistryService;
+import org.apache.airavata.service.security.CredentialStoreService;
+import org.apache.airavata.service.security.IamAdminService;
+import org.apache.airavata.service.registry.RegistryService;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
diff --git
a/airavata-api/src/test/java/org/apache/airavata/service/integration/OrchestratorServiceIntegrationTest.java
b/airavata-api/src/test/java/org/apache/airavata/service/integration/OrchestratorServiceIntegrationTest.java
index 4859843191..767fc80fb3 100644
---
a/airavata-api/src/test/java/org/apache/airavata/service/integration/OrchestratorServiceIntegrationTest.java
+++
b/airavata-api/src/test/java/org/apache/airavata/service/integration/OrchestratorServiceIntegrationTest.java
@@ -24,8 +24,8 @@ import static org.assertj.core.api.Assertions.assertThat;
import org.apache.airavata.model.experiment.ExperimentModel;
import org.apache.airavata.model.workspace.Project;
import org.apache.airavata.service.AiravataService;
-import org.apache.airavata.service.OrchestratorService;
-import org.apache.airavata.service.RegistryService;
+import org.apache.airavata.service.orchestrator.OrchestratorService;
+import org.apache.airavata.service.registry.RegistryService;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
diff --git
a/airavata-api/src/test/java/org/apache/airavata/service/integration/RegistryServiceIntegrationTest.java
b/airavata-api/src/test/java/org/apache/airavata/service/integration/RegistryServiceIntegrationTest.java
index 7520eaf0ad..a0d93f337f 100644
---
a/airavata-api/src/test/java/org/apache/airavata/service/integration/RegistryServiceIntegrationTest.java
+++
b/airavata-api/src/test/java/org/apache/airavata/service/integration/RegistryServiceIntegrationTest.java
@@ -31,7 +31,7 @@ import org.apache.airavata.model.workspace.Project;
import org.apache.airavata.registry.api.exception.RegistryServiceException;
import org.apache.airavata.registry.exceptions.AppCatalogException;
import org.apache.airavata.registry.services.ComputeResourceService;
-import org.apache.airavata.service.RegistryService;
+import org.apache.airavata.service.registry.RegistryService;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
diff --git
a/airavata-api/src/test/java/org/apache/airavata/service/integration/TenantProfileServiceIntegrationTest.java
b/airavata-api/src/test/java/org/apache/airavata/service/integration/TenantProfileServiceIntegrationTest.java
index 78159a70c1..764e4fb8da 100644
---
a/airavata-api/src/test/java/org/apache/airavata/service/integration/TenantProfileServiceIntegrationTest.java
+++
b/airavata-api/src/test/java/org/apache/airavata/service/integration/TenantProfileServiceIntegrationTest.java
@@ -27,7 +27,7 @@ import
org.apache.airavata.credential.exceptions.CredentialStoreException;
import org.apache.airavata.model.workspace.Gateway;
import org.apache.airavata.model.workspace.GatewayApprovalStatus;
import
org.apache.airavata.profile.tenant.cpi.exception.TenantProfileServiceException;
-import org.apache.airavata.service.TenantProfileService;
+import org.apache.airavata.service.profile.TenantProfileService;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
diff --git
a/airavata-api/src/test/java/org/apache/airavata/service/integration/UserProfileServiceIntegrationTest.java
b/airavata-api/src/test/java/org/apache/airavata/service/integration/UserProfileServiceIntegrationTest.java
index f2c84abacd..932f8ea899 100644
---
a/airavata-api/src/test/java/org/apache/airavata/service/integration/UserProfileServiceIntegrationTest.java
+++
b/airavata-api/src/test/java/org/apache/airavata/service/integration/UserProfileServiceIntegrationTest.java
@@ -26,7 +26,7 @@ import org.apache.airavata.model.user.Status;
import org.apache.airavata.model.user.UserProfile;
import
org.apache.airavata.profile.iam.admin.services.cpi.exception.IamAdminServicesException;
import
org.apache.airavata.profile.user.cpi.exception.UserProfileServiceException;
-import org.apache.airavata.service.UserProfileService;
+import org.apache.airavata.service.profile.UserProfileService;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
diff --git
a/modules/file-server/src/main/java/org/apache/airavata/file/server/service/AirvataFileService.java
b/modules/file-server/src/main/java/org/apache/airavata/file/server/service/AirvataFileService.java
index c874ff2fdc..e98668c5b7 100644
---
a/modules/file-server/src/main/java/org/apache/airavata/file/server/service/AirvataFileService.java
+++
b/modules/file-server/src/main/java/org/apache/airavata/file/server/service/AirvataFileService.java
@@ -29,9 +29,9 @@ import org.apache.airavata.agents.api.FileMetadata;
import org.apache.airavata.file.server.model.AiravataDirectory;
import org.apache.airavata.file.server.model.AiravataFile;
import org.apache.airavata.helix.task.api.support.AdaptorSupport;
-import org.apache.airavata.service.CredentialStoreService;
-import org.apache.airavata.service.RegistryService;
-import org.apache.airavata.service.UserProfileService;
+import org.apache.airavata.service.security.CredentialStoreService;
+import org.apache.airavata.service.registry.RegistryService;
+import org.apache.airavata.service.profile.UserProfileService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
@@ -74,9 +74,8 @@ public class AirvataFileService {
}
public FileMetadata getInfo(String processId, String subPath) throws
Exception {
- ProcessDataManager dataManager = new ProcessDataManager(
- applicationContext, registryService, userProfileService,
credentialStoreService, processId, adaptorSupport);
- AgentAdaptor agentAdaptor = getAgentAdaptor(dataManager, processId);
+ var dataManager = new ProcessDataManager(applicationContext,
registryService, userProfileService, credentialStoreService, processId,
adaptorSupport);
+ var agentAdaptor = getAgentAdaptor(dataManager, processId);
String absPath = dataManager.getBaseDir() + subPath;
logger.info("Getting metadata for path {}", absPath);
@@ -84,9 +83,8 @@ public class AirvataFileService {
}
public AiravataDirectory listDir(String processId, String subPath) throws
Exception {
- ProcessDataManager dataManager = new ProcessDataManager(
- applicationContext, registryService, userProfileService,
credentialStoreService, processId, adaptorSupport);
- AgentAdaptor agentAdaptor = getAgentAdaptor(dataManager, processId);
+ var dataManager = new ProcessDataManager(applicationContext,
registryService, userProfileService, credentialStoreService, processId,
adaptorSupport);
+ var agentAdaptor = getAgentAdaptor(dataManager, processId);
String absPath = dataManager.getBaseDir() + subPath;
logger.info("Getting metadata for path {}", absPath);
@@ -112,9 +110,8 @@ public class AirvataFileService {
}
public AiravataFile listFile(String processId, String subPath) throws
Exception {
- ProcessDataManager dataManager = new ProcessDataManager(
- applicationContext, registryService, userProfileService,
credentialStoreService, processId, adaptorSupport);
- AgentAdaptor agentAdaptor = getAgentAdaptor(dataManager, processId);
+ var dataManager = new ProcessDataManager(applicationContext,
registryService, userProfileService, credentialStoreService, processId,
adaptorSupport);
+ var agentAdaptor = getAgentAdaptor(dataManager, processId);
String absPath = dataManager.getBaseDir() + subPath;
@@ -130,9 +127,8 @@ public class AirvataFileService {
metadata.setSize(file.getSize());
Files.copy(file.getInputStream(), tempPath,
StandardCopyOption.REPLACE_EXISTING);
- ProcessDataManager dataManager = new ProcessDataManager(
- applicationContext, registryService, userProfileService,
credentialStoreService, processId, adaptorSupport);
- AgentAdaptor agentAdaptor = getAgentAdaptor(dataManager, processId);
+ var dataManager = new ProcessDataManager(applicationContext,
registryService, userProfileService, credentialStoreService, processId,
adaptorSupport);
+ var agentAdaptor = getAgentAdaptor(dataManager, processId);
String absPath = dataManager.getBaseDir() + subPath;
try {
@@ -151,9 +147,8 @@ public class AirvataFileService {
public Path downloadFile(String processId, String subPath) throws
Exception {
- ProcessDataManager dataManager = new ProcessDataManager(
- applicationContext, registryService, userProfileService,
credentialStoreService, processId, adaptorSupport);
- AgentAdaptor agentAdaptor = getAgentAdaptor(dataManager, processId);
+ var dataManager = new ProcessDataManager(applicationContext,
registryService, userProfileService, credentialStoreService, processId,
adaptorSupport);
+ var agentAdaptor = getAgentAdaptor(dataManager, processId);
String absPath = dataManager.getBaseDir() + subPath;
if (agentAdaptor.doesFileExist(absPath)) {
diff --git
a/modules/file-server/src/main/java/org/apache/airavata/file/server/service/ProcessDataManager.java
b/modules/file-server/src/main/java/org/apache/airavata/file/server/service/ProcessDataManager.java
index be0a6445f5..111d169679 100644
---
a/modules/file-server/src/main/java/org/apache/airavata/file/server/service/ProcessDataManager.java
+++
b/modules/file-server/src/main/java/org/apache/airavata/file/server/service/ProcessDataManager.java
@@ -29,9 +29,9 @@ import
org.apache.airavata.model.appcatalog.groupresourceprofile.ResourceType;
import org.apache.airavata.model.credential.store.SSHCredential;
import org.apache.airavata.model.experiment.ExperimentModel;
import org.apache.airavata.model.process.ProcessModel;
-import org.apache.airavata.service.CredentialStoreService;
-import org.apache.airavata.service.RegistryService;
-import org.apache.airavata.service.UserProfileService;
+import org.apache.airavata.service.security.CredentialStoreService;
+import org.apache.airavata.service.registry.RegistryService;
+import org.apache.airavata.service.profile.UserProfileService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
diff --git
a/modules/research-framework/research-service/src/main/java/org/apache/airavata/research/service/AiravataService.java
b/modules/research-framework/research-service/src/main/java/org/apache/airavata/research/service/AiravataService.java
index f152981f67..4d64bacdbc 100644
---
a/modules/research-framework/research-service/src/main/java/org/apache/airavata/research/service/AiravataService.java
+++
b/modules/research-framework/research-service/src/main/java/org/apache/airavata/research/service/AiravataService.java
@@ -22,7 +22,7 @@ package org.apache.airavata.research.service;
import org.apache.airavata.model.security.AuthzToken;
import org.apache.airavata.model.user.UserProfile;
import org.apache.airavata.research.service.model.UserContext;
-import org.apache.airavata.service.UserProfileService;
+import org.apache.airavata.service.profile.UserProfileService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;