http://git-wip-us.apache.org/repos/asf/syncope/blob/a4afd4a2/fit/core-reference/src/test/java/org/apache/syncope/fit/core/NotificationITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/NotificationITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/NotificationITCase.java index 70d55ba..012acb9 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/NotificationITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/NotificationITCase.java @@ -30,7 +30,6 @@ import org.apache.syncope.common.lib.SyncopeClientException; import org.apache.syncope.common.lib.to.NotificationTO; import org.apache.syncope.common.lib.types.AnyTypeKind; import org.apache.syncope.common.lib.types.ClientExceptionType; -import org.apache.syncope.common.lib.types.IntMappingType; import org.apache.syncope.common.lib.types.TraceLevel; import org.apache.syncope.common.rest.api.service.NotificationService; import org.apache.syncope.fit.AbstractITCase; @@ -51,7 +50,6 @@ public class NotificationITCase extends AbstractITCase { is("fullname").equalTo("*o*").and("fullname").equalTo("*i*").query()); notificationTO.setRecipientAttrName("email"); - notificationTO.setRecipientAttrType(IntMappingType.UserPlainSchema); notificationTO.setSender("sync...@syncope.apache.org"); notificationTO.setSubject("Test notification");
http://git-wip-us.apache.org/repos/asf/syncope/blob/a4afd4a2/fit/core-reference/src/test/java/org/apache/syncope/fit/core/NotificationTaskITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/NotificationTaskITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/NotificationTaskITCase.java index 5493282..665d38b 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/NotificationTaskITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/NotificationTaskITCase.java @@ -46,7 +46,6 @@ import org.apache.syncope.common.lib.to.NotificationTaskTO; import org.apache.syncope.common.lib.to.ExecTO; import org.apache.syncope.common.lib.to.UserTO; import org.apache.syncope.common.lib.types.AnyTypeKind; -import org.apache.syncope.common.lib.types.IntMappingType; import org.apache.syncope.common.lib.types.TaskType; import org.apache.syncope.common.lib.types.TraceLevel; import org.apache.syncope.common.rest.api.beans.ExecuteQuery; @@ -322,7 +321,6 @@ public class NotificationTaskITCase extends AbstractTaskITCase { inGroups("f779c0d4-633b-4be5-8f57-32eb478a3ca5").query()); notification.setSelfAsRecipient(false); notification.setRecipientAttrName("email"); - notification.setRecipientAttrType(IntMappingType.UserPlainSchema); notification.getStaticRecipients().add(MAIL_ADDRESS); notification.setRecipientsProviderClassName(TestNotificationRecipientsProvider.class.getName()); @@ -395,7 +393,6 @@ public class NotificationTaskITCase extends AbstractTaskITCase { inGroups("f779c0d4-633b-4be5-8f57-32eb478a3ca5").query()); notification.setSelfAsRecipient(true); notification.setRecipientAttrName("email"); - notification.setRecipientAttrType(IntMappingType.UserPlainSchema); if (staticRecipients != null) { CollectionUtils.addAll(notification.getStaticRecipients(), staticRecipients); } http://git-wip-us.apache.org/repos/asf/syncope/blob/a4afd4a2/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PlainSchemaITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PlainSchemaITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PlainSchemaITCase.java index 3f9ac6d..36fe888 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PlainSchemaITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PlainSchemaITCase.java @@ -88,7 +88,7 @@ public class PlainSchemaITCase extends AbstractITCase { boolean entityViolationTypeCheck = false; for (String element : e.getElements()) { if (!entityViolationTypeCheck) { - entityViolationTypeCheck = element.contains(EntityViolationType.InvalidName.name()); + entityViolationTypeCheck = element.contains(EntityViolationType.InvalidKey.name()); } } assertTrue(entityViolationTypeCheck); @@ -334,7 +334,7 @@ public class PlainSchemaITCase extends AbstractITCase { fail(); } catch (SyncopeClientException e) { assertEquals(ClientExceptionType.InvalidPlainSchema, e.getType()); - assertTrue(e.getElements().iterator().next().contains(EntityViolationType.InvalidName.name())); + assertTrue(e.getElements().iterator().next().contains(EntityViolationType.InvalidKey.name())); } } } http://git-wip-us.apache.org/repos/asf/syncope/blob/a4afd4a2/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PushTaskITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PushTaskITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PushTaskITCase.java index ed9b603..243aff7 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PushTaskITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PushTaskITCase.java @@ -44,7 +44,6 @@ import org.apache.syncope.common.lib.to.ProvisionTO; import org.apache.syncope.common.lib.to.ExecTO; import org.apache.syncope.common.lib.types.AnyTypeKind; import org.apache.syncope.common.lib.types.AttrSchemaType; -import org.apache.syncope.common.lib.types.IntMappingType; import org.apache.syncope.common.lib.types.MappingPurpose; import org.apache.syncope.common.lib.types.MatchingRule; import org.apache.syncope.common.lib.types.PropagationTaskExecStatus; @@ -317,7 +316,6 @@ public class PushTaskITCase extends AbstractTaskITCase { provisionTO.setMapping(mapping); MappingItemTO item = new MappingItemTO(); - item.setIntMappingType(IntMappingType.GroupPlainSchema); item.setExtAttrName("cn"); item.setIntAttrName(schemaTO.getKey()); item.setConnObjectKey(true); @@ -387,7 +385,6 @@ public class PushTaskITCase extends AbstractTaskITCase { notification.getStaticRecipients().add("issueyncope...@syncope.apache.org"); notification.setSelfAsRecipient(false); notification.setRecipientAttrName("email"); - notification.setRecipientAttrType(IntMappingType.UserPlainSchema); notification.setSender("syncope...@syncope.apache.org"); String subject = "Test notification"; http://git-wip-us.apache.org/repos/asf/syncope/blob/a4afd4a2/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ResourceITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ResourceITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ResourceITCase.java index ffd2a4f..f509611 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ResourceITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ResourceITCase.java @@ -50,7 +50,6 @@ import org.apache.syncope.common.lib.types.ClientExceptionType; import org.apache.syncope.common.lib.types.ConnConfPropSchema; import org.apache.syncope.common.lib.types.ConnConfProperty; import org.apache.syncope.common.lib.types.EntityViolationType; -import org.apache.syncope.common.lib.types.IntMappingType; import org.apache.syncope.common.lib.types.MappingPurpose; import org.apache.syncope.common.rest.api.beans.ConnObjectTOListQuery; import org.apache.syncope.common.rest.api.service.ResourceService; @@ -80,21 +79,18 @@ public class ResourceITCase extends AbstractITCase { MappingItemTO item = new MappingItemTO(); item.setExtAttrName("userId"); item.setIntAttrName("userId"); - item.setIntMappingType(IntMappingType.UserPlainSchema); item.setPurpose(MappingPurpose.BOTH); mapping.add(item); item = new MappingItemTO(); item.setExtAttrName("username"); - item.setIntAttrName("fullname"); - item.setIntMappingType(IntMappingType.UserKey); + item.setIntAttrName("key"); item.setPurpose(MappingPurpose.BOTH); mapping.setConnObjectKeyItem(item); item = new MappingItemTO(); item.setExtAttrName("fullname"); item.setIntAttrName("cn"); - item.setIntMappingType(IntMappingType.UserDerivedSchema); item.setConnObjectKey(false); item.setPurpose(MappingPurpose.PROPAGATION); mapping.add(item); @@ -139,14 +135,12 @@ public class ResourceITCase extends AbstractITCase { MappingItemTO item = new MappingItemTO(); item.setExtAttrName("uid"); item.setIntAttrName("userId"); - item.setIntMappingType(IntMappingType.UserPlainSchema); item.setPurpose(MappingPurpose.BOTH); mapping.add(item); item = new MappingItemTO(); item.setExtAttrName("username"); - item.setIntAttrName("fullname"); - item.setIntMappingType(IntMappingType.UserKey); + item.setIntAttrName("key"); item.setConnObjectKey(true); item.setPurpose(MappingPurpose.BOTH); mapping.setConnObjectKeyItem(item); @@ -154,7 +148,6 @@ public class ResourceITCase extends AbstractITCase { item = new MappingItemTO(); item.setExtAttrName("fullname"); item.setIntAttrName("cn"); - item.setIntMappingType(IntMappingType.UserDerivedSchema); item.setConnObjectKey(false); item.setPurpose(MappingPurpose.PROPAGATION); mapping.add(item); @@ -198,7 +191,7 @@ public class ResourceITCase extends AbstractITCase { provisionTO.setMapping(mapping); MappingItemTO item = new MappingItemTO(); - item.setIntMappingType(IntMappingType.UserKey); + item.setIntAttrName("key"); item.setExtAttrName("userId"); item.setConnObjectKey(true); item.setPurpose(MappingPurpose.PROPAGATION); @@ -212,7 +205,7 @@ public class ResourceITCase extends AbstractITCase { mapping = new MappingTO(); provisionTO.setMapping(mapping); item = new MappingItemTO(); - item.setIntMappingType(IntMappingType.GroupKey); + item.setIntAttrName("key"); item.setExtAttrName("groupId"); item.setConnObjectKey(true); item.setPurpose(MappingPurpose.PULL); @@ -248,13 +241,12 @@ public class ResourceITCase extends AbstractITCase { provisionTO.setMapping(mapping); MappingItemTO item = new MappingItemTO(); - item.setIntMappingType(IntMappingType.UserKey); + item.setIntAttrName("key"); item.setExtAttrName("userId"); item.setConnObjectKey(true); mapping.setConnObjectKeyItem(item); item = new MappingItemTO(); - item.setIntMappingType(IntMappingType.UserPlainSchema); item.setExtAttrName("email"); // missing intAttrName ... mapping.add(item); @@ -286,13 +278,12 @@ public class ResourceITCase extends AbstractITCase { provisionTO.setMapping(mapping); MappingItemTO item = new MappingItemTO(); - item.setIntMappingType(IntMappingType.UserKey); + item.setIntAttrName("key"); item.setExtAttrName("userId"); item.setConnObjectKey(true); mapping.setConnObjectKeyItem(item); item = new MappingItemTO(); - item.setIntMappingType(IntMappingType.UserPlainSchema); item.setIntAttrName("usernane"); // missing extAttrName ... mapping.add(item); @@ -319,7 +310,6 @@ public class ResourceITCase extends AbstractITCase { MappingItemTO item = new MappingItemTO(); item.setExtAttrName("userId"); item.setIntAttrName("userId"); - item.setIntMappingType(IntMappingType.UserPlainSchema); item.setConnObjectKey(true); item.setPurpose(MappingPurpose.BOTH); mapping.setConnObjectKeyItem(item); @@ -368,7 +358,6 @@ public class ResourceITCase extends AbstractITCase { item.setKey("cc973ed6-d031-4790-adab-fc059ac0c818"); item.setExtAttrName("test3"); item.setIntAttrName("fullname"); - item.setIntMappingType(IntMappingType.UserPlainSchema); item.setPurpose(MappingPurpose.BOTH); mapping.add(item); @@ -377,14 +366,12 @@ public class ResourceITCase extends AbstractITCase { item = new MappingItemTO(); item.setExtAttrName("test" + i); item.setIntAttrName("fullname"); - item.setIntMappingType(IntMappingType.UserPlainSchema); item.setPurpose(MappingPurpose.BOTH); mapping.add(item); } item = new MappingItemTO(); item.setExtAttrName("username"); - item.setIntAttrName("fullname"); - item.setIntMappingType(IntMappingType.UserKey); + item.setIntAttrName("key"); item.setConnObjectKey(true); item.setPurpose(MappingPurpose.BOTH); mapping.setConnObjectKeyItem(item); @@ -642,13 +629,13 @@ public class ResourceITCase extends AbstractITCase { provisionTO.setMapping(mapping); MappingItemTO item = new MappingItemTO(); - item.setIntMappingType(IntMappingType.GroupName); + item.setIntAttrName("name"); item.setExtAttrName("cn"); item.setPurpose(MappingPurpose.BOTH); mapping.setConnObjectKeyItem(item); item = new MappingItemTO(); - item.setIntMappingType(IntMappingType.GroupOwnerSchema); + item.setIntAttrName("owner"); item.setExtAttrName("owner"); item.setPurpose(MappingPurpose.BOTH); mapping.add(item); @@ -666,7 +653,7 @@ public class ResourceITCase extends AbstractITCase { fail(); } catch (SyncopeClientException e) { assertEquals(ClientExceptionType.InvalidExternalResource, e.getType()); - assertTrue(e.getElements().iterator().next().contains(EntityViolationType.InvalidName.name())); + assertTrue(e.getElements().iterator().next().contains(EntityViolationType.InvalidKey.name())); } } @@ -687,14 +674,13 @@ public class ResourceITCase extends AbstractITCase { provisionTO.setMapping(mapping); MappingItemTO item = new MappingItemTO(); - item.setIntMappingType(IntMappingType.UserKey); + item.setIntAttrName("key"); item.setExtAttrName("userId"); item.setConnObjectKey(true); item.setPurpose(MappingPurpose.PROPAGATION); mapping.setConnObjectKeyItem(item); MappingItemTO item2 = new MappingItemTO(); - item2.setIntMappingType(IntMappingType.UserPlainSchema); item2.setConnObjectKey(false); item2.setIntAttrName("gender"); item2.setExtAttrName("gender"); http://git-wip-us.apache.org/repos/asf/syncope/blob/a4afd4a2/fit/core-reference/src/test/java/org/apache/syncope/fit/core/VirAttrITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/VirAttrITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/VirAttrITCase.java index 413d80d..37fc276 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/VirAttrITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/VirAttrITCase.java @@ -50,7 +50,6 @@ import org.apache.syncope.common.lib.to.UserTO; import org.apache.syncope.common.lib.to.VirSchemaTO; import org.apache.syncope.common.lib.types.AnyTypeKind; import org.apache.syncope.common.lib.types.ConnConfProperty; -import org.apache.syncope.common.lib.types.IntMappingType; import org.apache.syncope.common.lib.types.MappingPurpose; import org.apache.syncope.common.lib.types.PatchOperation; import org.apache.syncope.common.lib.types.PropagationTaskExecStatus; @@ -506,7 +505,6 @@ public class VirAttrITCase extends AbstractITCase { MappingItemTO item = new MappingItemTO(); item.setIntAttrName("fullname"); - item.setIntMappingType(IntMappingType.UserPlainSchema); item.setExtAttrName("ID"); item.setPurpose(MappingPurpose.PROPAGATION); item.setConnObjectKey(true); @@ -515,14 +513,12 @@ public class VirAttrITCase extends AbstractITCase { item = new MappingItemTO(); item.setExtAttrName("USERNAME"); item.setIntAttrName("username"); - item.setIntMappingType(IntMappingType.Username); item.setPurpose(MappingPurpose.PROPAGATION); mapping.getItems().add(item); item = new MappingItemTO(); item.setExtAttrName("EMAIL"); item.setIntAttrName("rvirtualdata"); - item.setIntMappingType(IntMappingType.GroupVirtualSchema); item.setPurpose(MappingPurpose.PROPAGATION); mapping.getItems().add(item); http://git-wip-us.apache.org/repos/asf/syncope/blob/a4afd4a2/fit/core-reference/src/test/java/org/apache/syncope/fit/core/VirSchemaITCase.java ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/VirSchemaITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/VirSchemaITCase.java index fbe264e..b7ab0ce 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/VirSchemaITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/VirSchemaITCase.java @@ -148,7 +148,7 @@ public class VirSchemaITCase extends AbstractITCase { } catch (SyncopeClientException e) { assertEquals(ClientExceptionType.InvalidVirSchema, e.getType()); - assertTrue(e.getElements().iterator().next().contains(EntityViolationType.InvalidName.name())); + assertTrue(e.getElements().iterator().next().contains(EntityViolationType.InvalidKey.name())); } } }