You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by mm...@apache.org on 2020/03/05 16:03:56 UTC

[syncope] branch SYNCOPE-163-1 updated: move components to oidc/saml2 packages to avoid conflicts after rename

This is an automated email from the ASF dual-hosted git repository.

mmoayyed pushed a commit to branch SYNCOPE-163-1
in repository https://gitbox.apache.org/repos/asf/syncope.git


The following commit(s) were added to refs/heads/SYNCOPE-163-1 by this push:
     new beebd24  move components to oidc/saml2 packages to avoid conflicts after rename
beebd24 is described below

commit beebd24084b4d8a94165780445c942ebcd77bfb0
Author: Misagh Moayyed <mm...@gmail.com>
AuthorDate: Thu Mar 5 19:33:38 2020 +0330

    move components to oidc/saml2 packages to avoid conflicts after rename
---
 .../client/console/rest/OIDCRelyingPartyRestClient.java     |  2 +-
 .../syncope/client/console/rest/SAML2SPRestClient.java      | 12 ++++++------
 .../api/service/{ => oidc}/OIDCRelyingPartyService.java     |  3 ++-
 .../SAML2SPService.java}                                    |  5 +++--
 .../core/logic/{ => oidc}/OIDCRelyingPartyLogic.java        |  3 ++-
 .../apache/syncope/core/logic/{ => saml}/SAML2SPLogic.java  |  3 ++-
 .../cxf/service/{ => oidc}/OIDCRelyingPartyServiceImpl.java |  7 ++++---
 .../rest/cxf/service/{ => saml}/SAML2SPServiceImpl.java     |  9 +++++----
 .../test/java/org/apache/syncope/fit/AbstractITCase.java    | 13 ++++++-------
 9 files changed, 31 insertions(+), 26 deletions(-)

diff --git a/client/am/console/src/main/java/org/apache/syncope/client/console/rest/OIDCRelyingPartyRestClient.java b/client/am/console/src/main/java/org/apache/syncope/client/console/rest/OIDCRelyingPartyRestClient.java
index 13888f7..9d3b5bf 100644
--- a/client/am/console/src/main/java/org/apache/syncope/client/console/rest/OIDCRelyingPartyRestClient.java
+++ b/client/am/console/src/main/java/org/apache/syncope/client/console/rest/OIDCRelyingPartyRestClient.java
@@ -19,7 +19,7 @@
 package org.apache.syncope.client.console.rest;
 
 import org.apache.syncope.common.lib.to.client.OIDCRelyingPartyTO;
-import org.apache.syncope.common.rest.api.service.OIDCRelyingPartyService;
+import org.apache.syncope.common.rest.api.service.oidc.OIDCRelyingPartyService;
 
 import java.util.List;
 
diff --git a/client/am/console/src/main/java/org/apache/syncope/client/console/rest/SAML2SPRestClient.java b/client/am/console/src/main/java/org/apache/syncope/client/console/rest/SAML2SPRestClient.java
index 10bd1f9..becfc8b 100644
--- a/client/am/console/src/main/java/org/apache/syncope/client/console/rest/SAML2SPRestClient.java
+++ b/client/am/console/src/main/java/org/apache/syncope/client/console/rest/SAML2SPRestClient.java
@@ -19,7 +19,7 @@
 package org.apache.syncope.client.console.rest;
 
 import org.apache.syncope.common.lib.to.client.SAML2SPTO;
-import org.apache.syncope.common.rest.api.service.SAML2ServiceProviderService;
+import org.apache.syncope.common.rest.api.service.saml.SAML2SPService;
 
 import java.util.List;
 
@@ -31,23 +31,23 @@ public class SAML2SPRestClient extends BaseRestClient {
     private static final long serialVersionUID = -3161863874876938094L;
 
     public static void delete(final String key) {
-        getService(SAML2ServiceProviderService.class).delete(key);
+        getService(SAML2SPService.class).delete(key);
     }
 
     public static SAML2SPTO read(final String key) {
-        return getService(SAML2ServiceProviderService.class).read(key);
+        return getService(SAML2SPService.class).read(key);
     }
 
     public static void update(final SAML2SPTO applicationTO) {
-        getService(SAML2ServiceProviderService.class).update(applicationTO);
+        getService(SAML2SPService.class).update(applicationTO);
     }
 
     public static void create(final SAML2SPTO applicationTO) {
-        getService(SAML2ServiceProviderService.class).create(applicationTO);
+        getService(SAML2SPService.class).create(applicationTO);
     }
 
     public static List<SAML2SPTO> list() {
-        return getService(SAML2ServiceProviderService.class).list();
+        return getService(SAML2SPService.class).list();
     }
 
 }
diff --git a/common/am/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/OIDCRelyingPartyService.java b/common/am/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/oidc/OIDCRelyingPartyService.java
similarity index 91%
rename from common/am/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/OIDCRelyingPartyService.java
rename to common/am/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/oidc/OIDCRelyingPartyService.java
index b93d9df..9e540e5 100644
--- a/common/am/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/OIDCRelyingPartyService.java
+++ b/common/am/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/oidc/OIDCRelyingPartyService.java
@@ -17,12 +17,13 @@
  *
  */
 
-package org.apache.syncope.common.rest.api.service;
+package org.apache.syncope.common.rest.api.service.oidc;
 
 import io.swagger.v3.oas.annotations.security.SecurityRequirement;
 import io.swagger.v3.oas.annotations.security.SecurityRequirements;
 import io.swagger.v3.oas.annotations.tags.Tag;
 import org.apache.syncope.common.lib.to.client.OIDCRelyingPartyTO;
+import org.apache.syncope.common.rest.api.service.ClientAppService;
 
 import javax.ws.rs.Path;
 
diff --git a/common/am/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2ServiceProviderService.java b/common/am/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/saml/SAML2SPService.java
similarity index 86%
rename from common/am/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2ServiceProviderService.java
rename to common/am/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/saml/SAML2SPService.java
index abd6319..9d8b2b7 100644
--- a/common/am/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SAML2ServiceProviderService.java
+++ b/common/am/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/saml/SAML2SPService.java
@@ -17,12 +17,13 @@
  *
  */
 
-package org.apache.syncope.common.rest.api.service;
+package org.apache.syncope.common.rest.api.service.saml;
 
 import io.swagger.v3.oas.annotations.security.SecurityRequirement;
 import io.swagger.v3.oas.annotations.security.SecurityRequirements;
 import io.swagger.v3.oas.annotations.tags.Tag;
 import org.apache.syncope.common.lib.to.client.SAML2SPTO;
+import org.apache.syncope.common.rest.api.service.ClientAppService;
 
 import javax.ws.rs.Path;
 
@@ -31,5 +32,5 @@ import javax.ws.rs.Path;
     @SecurityRequirement(name = "BasicAuthentication"),
     @SecurityRequirement(name = "Bearer")})
 @Path("saml2ServiceProviders")
-public interface SAML2ServiceProviderService extends ClientAppService<SAML2SPTO> {
+public interface SAML2SPService extends ClientAppService<SAML2SPTO> {
 }
diff --git a/core/am/logic/src/main/java/org/apache/syncope/core/logic/OIDCRelyingPartyLogic.java b/core/am/logic/src/main/java/org/apache/syncope/core/logic/oidc/OIDCRelyingPartyLogic.java
similarity index 97%
rename from core/am/logic/src/main/java/org/apache/syncope/core/logic/OIDCRelyingPartyLogic.java
rename to core/am/logic/src/main/java/org/apache/syncope/core/logic/oidc/OIDCRelyingPartyLogic.java
index 1e37959..35c7aac 100644
--- a/core/am/logic/src/main/java/org/apache/syncope/core/logic/OIDCRelyingPartyLogic.java
+++ b/core/am/logic/src/main/java/org/apache/syncope/core/logic/oidc/OIDCRelyingPartyLogic.java
@@ -16,10 +16,11 @@
  * under the License.
  *
  */
-package org.apache.syncope.core.logic;
+package org.apache.syncope.core.logic.oidc;
 
 import org.apache.syncope.common.lib.to.client.OIDCRelyingPartyTO;
 import org.apache.syncope.common.lib.types.IdRepoEntitlement;
+import org.apache.syncope.core.logic.AbstractClientAppLogic;
 import org.apache.syncope.core.persistence.api.dao.NotFoundException;
 import org.apache.syncope.core.persistence.api.dao.authentication.OIDCRelyingPartyDAO;
 import org.apache.syncope.core.persistence.api.entity.authentication.OIDCRelyingParty;
diff --git a/core/am/logic/src/main/java/org/apache/syncope/core/logic/SAML2SPLogic.java b/core/am/logic/src/main/java/org/apache/syncope/core/logic/saml/SAML2SPLogic.java
similarity index 97%
rename from core/am/logic/src/main/java/org/apache/syncope/core/logic/SAML2SPLogic.java
rename to core/am/logic/src/main/java/org/apache/syncope/core/logic/saml/SAML2SPLogic.java
index fdea4b8..7cd7a9d 100644
--- a/core/am/logic/src/main/java/org/apache/syncope/core/logic/SAML2SPLogic.java
+++ b/core/am/logic/src/main/java/org/apache/syncope/core/logic/saml/SAML2SPLogic.java
@@ -16,10 +16,11 @@
  * under the License.
  *
  */
-package org.apache.syncope.core.logic;
+package org.apache.syncope.core.logic.saml;
 
 import org.apache.syncope.common.lib.to.client.SAML2SPTO;
 import org.apache.syncope.common.lib.types.IdRepoEntitlement;
+import org.apache.syncope.core.logic.AbstractClientAppLogic;
 import org.apache.syncope.core.persistence.api.dao.NotFoundException;
 import org.apache.syncope.core.persistence.api.dao.authentication.SAML2SPDAO;
 import org.apache.syncope.core.persistence.api.entity.authentication.SAML2SP;
diff --git a/core/am/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/OIDCRelyingPartyServiceImpl.java b/core/am/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/oidc/OIDCRelyingPartyServiceImpl.java
similarity index 83%
rename from core/am/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/OIDCRelyingPartyServiceImpl.java
rename to core/am/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/oidc/OIDCRelyingPartyServiceImpl.java
index 8d2c842..aab10d6 100644
--- a/core/am/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/OIDCRelyingPartyServiceImpl.java
+++ b/core/am/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/oidc/OIDCRelyingPartyServiceImpl.java
@@ -17,12 +17,13 @@
  *
  */
 
-package org.apache.syncope.core.rest.cxf.service;
+package org.apache.syncope.core.rest.cxf.service.oidc;
 
-import org.apache.syncope.common.rest.api.service.OIDCRelyingPartyService;
+import org.apache.syncope.common.rest.api.service.oidc.OIDCRelyingPartyService;
 import org.apache.syncope.common.lib.to.client.OIDCRelyingPartyTO;
 import org.apache.syncope.core.logic.AbstractClientAppLogic;
-import org.apache.syncope.core.logic.OIDCRelyingPartyLogic;
+import org.apache.syncope.core.logic.oidc.OIDCRelyingPartyLogic;
+import org.apache.syncope.core.rest.cxf.service.AbstractClientAppServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
diff --git a/core/am/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2SPServiceImpl.java b/core/am/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/saml/SAML2SPServiceImpl.java
similarity index 81%
rename from core/am/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2SPServiceImpl.java
rename to core/am/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/saml/SAML2SPServiceImpl.java
index c9502e7..18d7967 100644
--- a/core/am/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SAML2SPServiceImpl.java
+++ b/core/am/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/saml/SAML2SPServiceImpl.java
@@ -17,19 +17,20 @@
  *
  */
 
-package org.apache.syncope.core.rest.cxf.service;
+package org.apache.syncope.core.rest.cxf.service.saml;
 
-import org.apache.syncope.common.rest.api.service.SAML2ServiceProviderService;
+import org.apache.syncope.common.rest.api.service.saml.SAML2SPService;
 import org.apache.syncope.common.lib.to.client.SAML2SPTO;
 import org.apache.syncope.core.logic.AbstractClientAppLogic;
-import org.apache.syncope.core.logic.SAML2SPLogic;
+import org.apache.syncope.core.logic.saml.SAML2SPLogic;
+import org.apache.syncope.core.rest.cxf.service.AbstractClientAppServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 @Service
 public class SAML2SPServiceImpl
     extends AbstractClientAppServiceImpl<SAML2SPTO>
-    implements SAML2ServiceProviderService {
+    implements SAML2SPService {
     
     @Autowired
     private SAML2SPLogic logic;
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/AbstractITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/AbstractITCase.java
index 8290678..b1f1008 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/AbstractITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/AbstractITCase.java
@@ -92,7 +92,7 @@ import org.apache.syncope.common.rest.api.service.ConnectorService;
 import org.apache.syncope.common.rest.api.service.DynRealmService;
 import org.apache.syncope.common.rest.api.service.LoggerService;
 import org.apache.syncope.common.rest.api.service.NotificationService;
-import org.apache.syncope.common.rest.api.service.OIDCRelyingPartyService;
+import org.apache.syncope.common.rest.api.service.oidc.OIDCRelyingPartyService;
 import org.apache.syncope.common.rest.api.service.PolicyService;
 import org.apache.syncope.common.rest.api.service.ReportService;
 import org.apache.syncope.common.rest.api.service.ResourceService;
@@ -108,8 +108,7 @@ import org.apache.syncope.common.rest.api.service.RemediationService;
 import org.apache.syncope.common.rest.api.service.ReportTemplateService;
 import org.apache.syncope.common.rest.api.service.RoleService;
 import org.apache.syncope.common.rest.api.service.SAML2IdPService;
-import org.apache.syncope.common.rest.api.service.SAML2SPService;
-import org.apache.syncope.common.rest.api.service.SAML2ServiceProviderService;
+import org.apache.syncope.common.rest.api.service.saml.SAML2SPService;
 import org.apache.syncope.common.rest.api.service.SCIMConfService;
 import org.apache.syncope.common.rest.api.service.SchemaService;
 import org.apache.syncope.common.rest.api.service.SecurityQuestionService;
@@ -280,7 +279,7 @@ public abstract class AbstractITCase {
 
     protected static CamelRouteService camelRouteService;
 
-    protected static SAML2SPService saml2SpService;
+    protected static org.apache.syncope.common.rest.api.service.SAML2SPService saml2SpService;
 
     protected static SAML2IdPService saml2IdPService;
 
@@ -292,7 +291,7 @@ public abstract class AbstractITCase {
 
     protected static OIDCRelyingPartyService openIdConnectRelyingPartyService;
 
-    protected static SAML2ServiceProviderService saml2ServiceProviderService;
+    protected static SAML2SPService saml2ServiceProviderService;
 
     @BeforeAll
     public static void securitySetup() {
@@ -358,13 +357,13 @@ public abstract class AbstractITCase {
         remediationService = adminClient.getService(RemediationService.class);
         gatewayRouteService = adminClient.getService(GatewayRouteService.class);
         camelRouteService = adminClient.getService(CamelRouteService.class);
-        saml2SpService = adminClient.getService(SAML2SPService.class);
+        saml2SpService = adminClient.getService(org.apache.syncope.common.rest.api.service.SAML2SPService.class);
         saml2IdPService = adminClient.getService(SAML2IdPService.class);
         oidcClientService = adminClient.getService(OIDCClientService.class);
         oidcProviderService = adminClient.getService(OIDCProviderService.class);
         scimConfService = adminClient.getService(SCIMConfService.class);
         openIdConnectRelyingPartyService = adminClient.getService(OIDCRelyingPartyService.class);
-        saml2ServiceProviderService = adminClient.getService(SAML2ServiceProviderService.class);
+        saml2ServiceProviderService = adminClient.getService(SAML2SPService.class);
     }
 
     @Autowired