You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2015/06/08 13:19:00 UTC
syncope git commit: [SYNCOPE-666] Tests working as application/xml as
well
Repository: syncope
Updated Branches:
refs/heads/SYNCOPE-666 54de39847 -> 64d475e52
[SYNCOPE-666] Tests working as application/xml as well
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/64d475e5
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/64d475e5
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/64d475e5
Branch: refs/heads/SYNCOPE-666
Commit: 64d475e528edf8c9cbd2d9959a07a9124c23431a
Parents: 54de398
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Mon Jun 8 13:18:46 2015 +0200
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Mon Jun 8 13:18:46 2015 +0200
----------------------------------------------------------------------
.../console/rest/ConnectorRestClient.java | 4 +--
.../client/console/rest/GroupRestClient.java | 14 ++++-----
.../client/console/rest/UserRestClient.java | 23 +++++++--------
client/lib/pom.xml | 6 +++-
.../common/lib/mod/ResourceAssociationMod.java | 6 ++--
.../syncope/common/lib/to/BulkActionResult.java | 2 ++
.../syncope/common/lib/to/NotificationTO.java | 3 --
.../apache/syncope/common/lib/wrap/AnyKey.java | 5 ++++
.../syncope/common/lib/wrap/BooleanWrap.java | 30 ++++++++++++++++++++
.../syncope/common/lib/wrap/ResourceKey.java | 30 ++++++++++++++++++++
.../syncope/common/lib/wrap/ResourceName.java | 30 --------------------
.../common/rest/api/CollectionWrapper.java | 6 ++--
.../rest/api/service/ConnectorService.java | 3 +-
.../common/rest/api/service/GroupService.java | 6 ++--
.../rest/api/service/ResourceService.java | 4 ++-
.../common/rest/api/service/UserService.java | 4 +--
.../rest/cxf/service/ConnectorServiceImpl.java | 7 +++--
.../core/rest/cxf/service/GroupServiceImpl.java | 10 +++----
.../rest/cxf/service/ResourceServiceImpl.java | 7 +++--
.../core/rest/cxf/service/UserServiceImpl.java | 8 +++---
.../core/reference/AuthenticationITCase.java | 4 +--
.../fit/core/reference/ConnectorITCase.java | 12 ++++----
.../syncope/fit/core/reference/GroupITCase.java | 18 ++++++------
.../fit/core/reference/SyncTaskITCase.java | 6 ++--
.../syncope/fit/core/reference/UserITCase.java | 18 ++++++------
pom.xml | 5 ++++
26 files changed, 160 insertions(+), 111 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/64d475e5/client/console/src/main/java/org/apache/syncope/client/console/rest/ConnectorRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/ConnectorRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/ConnectorRestClient.java
index e6f8488..70ef70e 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/rest/ConnectorRestClient.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/ConnectorRestClient.java
@@ -159,7 +159,7 @@ public class ConnectorRestClient extends BaseRestClient {
boolean check = false;
try {
- check = getService(ConnectorService.class).check(toBeChecked);
+ check = getService(ConnectorService.class).check(toBeChecked).getElement();
} catch (Exception e) {
LOG.error("While checking {}", toBeChecked, e);
}
@@ -170,7 +170,7 @@ public class ConnectorRestClient extends BaseRestClient {
public boolean check(final ResourceTO resourceTO) {
boolean check = false;
try {
- check = getService(ResourceService.class).check(resourceTO);
+ check = getService(ResourceService.class).check(resourceTO).getElement();
} catch (Exception e) {
LOG.error("Connector not found {}", resourceTO.getConnector(), e);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/64d475e5/client/console/src/main/java/org/apache/syncope/client/console/rest/GroupRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/GroupRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/GroupRestClient.java
index 073e7c3..ef490e2 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/rest/GroupRestClient.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/GroupRestClient.java
@@ -32,7 +32,7 @@ import org.apache.syncope.common.lib.to.GroupTO;
import org.apache.syncope.common.lib.types.AnyTypeKind;
import org.apache.syncope.common.lib.types.ResourceAssociationActionType;
import org.apache.syncope.common.lib.types.ResourceDeassociationActionType;
-import org.apache.syncope.common.lib.wrap.ResourceName;
+import org.apache.syncope.common.lib.wrap.ResourceKey;
import org.apache.syncope.common.rest.api.CollectionWrapper;
import org.apache.syncope.common.rest.api.service.ResourceService;
import org.apache.syncope.common.rest.api.service.GroupService;
@@ -124,7 +124,7 @@ public class GroupRestClient extends AbstractAnyRestClient {
GroupService service = getService(etag, GroupService.class);
service.bulkDeassociation(groupId, ResourceDeassociationActionType.UNLINK,
CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(),
- ResourceName.class));
+ ResourceKey.class));
resetClient(GroupService.class);
}
}
@@ -134,7 +134,7 @@ public class GroupRestClient extends AbstractAnyRestClient {
GroupService service = getService(etag, GroupService.class);
service.bulkAssociation(groupId, ResourceAssociationActionType.LINK,
CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(),
- ResourceName.class));
+ ResourceKey.class));
resetClient(GroupService.class);
}
}
@@ -145,7 +145,7 @@ public class GroupRestClient extends AbstractAnyRestClient {
GroupService service = getService(etag, GroupService.class);
result = service.bulkDeassociation(groupId, ResourceDeassociationActionType.DEPROVISION,
CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(),
- ResourceName.class)).
+ ResourceKey.class)).
readEntity(BulkActionResult.class);
resetClient(GroupService.class);
}
@@ -158,7 +158,7 @@ public class GroupRestClient extends AbstractAnyRestClient {
GroupService service = getService(etag, GroupService.class);
result = service.bulkAssociation(groupId, ResourceAssociationActionType.PROVISION,
CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(),
- ResourceName.class)).
+ ResourceKey.class)).
readEntity(BulkActionResult.class);
resetClient(GroupService.class);
}
@@ -171,7 +171,7 @@ public class GroupRestClient extends AbstractAnyRestClient {
GroupService service = getService(etag, GroupService.class);
result = service.bulkDeassociation(groupId, ResourceDeassociationActionType.UNASSIGN,
CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(),
- ResourceName.class)).
+ ResourceKey.class)).
readEntity(BulkActionResult.class);
resetClient(GroupService.class);
}
@@ -184,7 +184,7 @@ public class GroupRestClient extends AbstractAnyRestClient {
GroupService service = getService(etag, GroupService.class);
result = service.bulkAssociation(groupId, ResourceAssociationActionType.ASSIGN,
CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(),
- ResourceName.class)).
+ ResourceKey.class)).
readEntity(BulkActionResult.class);
resetClient(GroupService.class);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/64d475e5/client/console/src/main/java/org/apache/syncope/client/console/rest/UserRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/UserRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/UserRestClient.java
index 45272c3..b2fb4e3 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/rest/UserRestClient.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/UserRestClient.java
@@ -34,7 +34,7 @@ import org.apache.syncope.common.lib.to.UserTO;
import org.apache.syncope.common.lib.types.AnyTypeKind;
import org.apache.syncope.common.lib.types.ResourceAssociationActionType;
import org.apache.syncope.common.lib.types.ResourceDeassociationActionType;
-import org.apache.syncope.common.lib.wrap.ResourceName;
+import org.apache.syncope.common.lib.wrap.ResourceKey;
import org.apache.syncope.common.rest.api.CollectionWrapper;
import org.apache.syncope.common.rest.api.service.ResourceService;
import org.apache.syncope.common.rest.api.service.UserService;
@@ -152,7 +152,7 @@ public class UserRestClient extends AbstractAnyRestClient {
UserService service = getService(etag, UserService.class);
service.bulkDeassociation(userId, ResourceDeassociationActionType.UNLINK,
CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(),
- ResourceName.class));
+ ResourceKey.class));
resetClient(UserService.class);
}
}
@@ -162,9 +162,8 @@ public class UserRestClient extends AbstractAnyRestClient {
UserService service = getService(etag, UserService.class);
final ResourceAssociationMod associationMod = new ResourceAssociationMod();
- associationMod.getTargetResources().addAll(
- CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(),
- ResourceName.class));
+ associationMod.getTargetResources().addAll(CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(),
+ ResourceKey.class));
service.bulkAssociation(userId, ResourceAssociationActionType.LINK, associationMod);
resetClient(UserService.class);
@@ -177,7 +176,7 @@ public class UserRestClient extends AbstractAnyRestClient {
UserService service = getService(etag, UserService.class);
result = service.bulkDeassociation(userId, ResourceDeassociationActionType.DEPROVISION,
CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(),
- ResourceName.class)).
+ ResourceKey.class)).
readEntity(BulkActionResult.class);
resetClient(UserService.class);
}
@@ -192,9 +191,8 @@ public class UserRestClient extends AbstractAnyRestClient {
UserService service = getService(etag, UserService.class);
final ResourceAssociationMod associationMod = new ResourceAssociationMod();
- associationMod.getTargetResources().addAll(
- CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(),
- ResourceName.class));
+ associationMod.getTargetResources().addAll(CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(),
+ ResourceKey.class));
associationMod.setChangePwd(changepwd);
associationMod.setPassword(password);
@@ -211,7 +209,7 @@ public class UserRestClient extends AbstractAnyRestClient {
UserService service = getService(etag, UserService.class);
result = service.bulkDeassociation(userId, ResourceDeassociationActionType.UNASSIGN,
CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(),
- ResourceName.class)).
+ ResourceKey.class)).
readEntity(BulkActionResult.class);
resetClient(UserService.class);
}
@@ -226,9 +224,8 @@ public class UserRestClient extends AbstractAnyRestClient {
UserService service = getService(etag, UserService.class);
final ResourceAssociationMod associationMod = new ResourceAssociationMod();
- associationMod.getTargetResources().addAll(
- CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(),
- ResourceName.class));
+ associationMod.getTargetResources().addAll(CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(),
+ ResourceKey.class));
associationMod.setChangePwd(changepwd);
associationMod.setPassword(password);
http://git-wip-us.apache.org/repos/asf/syncope/blob/64d475e5/client/lib/pom.xml
----------------------------------------------------------------------
diff --git a/client/lib/pom.xml b/client/lib/pom.xml
index 3de5d20..a119827 100644
--- a/client/lib/pom.xml
+++ b/client/lib/pom.xml
@@ -47,7 +47,11 @@ under the License.
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-client</artifactId>
</dependency>
-
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-databinding-jaxb</artifactId>
+ </dependency>
+
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
http://git-wip-us.apache.org/repos/asf/syncope/blob/64d475e5/common/lib/src/main/java/org/apache/syncope/common/lib/mod/ResourceAssociationMod.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/mod/ResourceAssociationMod.java b/common/lib/src/main/java/org/apache/syncope/common/lib/mod/ResourceAssociationMod.java
index f381104..f894c26 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/mod/ResourceAssociationMod.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/mod/ResourceAssociationMod.java
@@ -26,7 +26,7 @@ import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import org.apache.syncope.common.lib.AbstractBaseBean;
-import org.apache.syncope.common.lib.wrap.ResourceName;
+import org.apache.syncope.common.lib.wrap.ResourceKey;
/**
* This class is used to specify the willing to create associations between user and external references.
@@ -43,7 +43,7 @@ public class ResourceAssociationMod extends AbstractBaseBean {
/**
* Target external resources.
*/
- private final List<ResourceName> targetResources = new ArrayList<ResourceName>();
+ private final List<ResourceKey> targetResources = new ArrayList<ResourceKey>();
/**
* Indicate the willing to change password on target external resources.
@@ -58,7 +58,7 @@ public class ResourceAssociationMod extends AbstractBaseBean {
@XmlElementWrapper(name = "resources")
@XmlElement(name = "resource")
@JsonProperty("resources")
- public List<ResourceName> getTargetResources() {
+ public List<ResourceKey> getTargetResources() {
return targetResources;
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/64d475e5/common/lib/src/main/java/org/apache/syncope/common/lib/to/BulkActionResult.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/BulkActionResult.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/BulkActionResult.java
index 9b44b3f..03710ce 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/BulkActionResult.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/BulkActionResult.java
@@ -29,6 +29,7 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.apache.syncope.common.lib.AbstractBaseBean;
@@ -37,6 +38,7 @@ import org.apache.syncope.common.lib.jaxb.XmlGenericMapAdapter;
@XmlRootElement(name = "bulkActionResult")
@XmlType
@XmlAccessorType(XmlAccessType.FIELD)
+@XmlSeeAlso(BulkActionResult.Status.class)
public class BulkActionResult extends AbstractBaseBean {
private static final long serialVersionUID = 2868894178821778133L;
http://git-wip-us.apache.org/repos/asf/syncope/blob/64d475e5/common/lib/src/main/java/org/apache/syncope/common/lib/to/NotificationTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/NotificationTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/NotificationTO.java
index 7cb6556..5487410 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/NotificationTO.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/NotificationTO.java
@@ -24,8 +24,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
@@ -38,7 +36,6 @@ import org.apache.syncope.common.lib.types.TraceLevel;
@XmlRootElement(name = "notification")
@XmlType
-@XmlAccessorType(XmlAccessType.FIELD)
public class NotificationTO extends AbstractBaseBean {
private static final long serialVersionUID = -6145117115632592612L;
http://git-wip-us.apache.org/repos/asf/syncope/blob/64d475e5/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/AnyKey.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/AnyKey.java b/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/AnyKey.java
index 6db8870..0eb6eef 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/AnyKey.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/AnyKey.java
@@ -18,6 +18,11 @@
*/
package org.apache.syncope.common.lib.wrap;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "anyKey")
+@XmlType
public class AnyKey extends AbstractWrappable<Long> {
private static final long serialVersionUID = -8664228651057889297L;
http://git-wip-us.apache.org/repos/asf/syncope/blob/64d475e5/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/BooleanWrap.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/BooleanWrap.java b/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/BooleanWrap.java
new file mode 100644
index 0000000..3be7643
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/BooleanWrap.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.common.lib.wrap;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "booleanWrap")
+@XmlType
+public class BooleanWrap extends AbstractWrappable<Boolean> {
+
+ private static final long serialVersionUID = 3762310846902669241L;
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/64d475e5/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/ResourceKey.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/ResourceKey.java b/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/ResourceKey.java
new file mode 100644
index 0000000..1b06c5b
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/ResourceKey.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.common.lib.wrap;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "resourceKey")
+@XmlType
+public class ResourceKey extends AbstractWrappable<String> {
+
+ private static final long serialVersionUID = -175720097924079573L;
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/64d475e5/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/ResourceName.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/ResourceName.java b/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/ResourceName.java
deleted file mode 100644
index 42b77ca..0000000
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/wrap/ResourceName.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.common.lib.wrap;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlRootElement(name = "resourceName")
-@XmlType
-public class ResourceName extends AbstractWrappable<String> {
-
- private static final long serialVersionUID = -175720097924079573L;
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/64d475e5/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/CollectionWrapper.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/CollectionWrapper.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/CollectionWrapper.java
index e493f94..94bf21f 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/CollectionWrapper.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/CollectionWrapper.java
@@ -40,7 +40,7 @@ public final class CollectionWrapper {
public static <E, T extends AbstractWrappable<E>> List<T> wrap(
final Collection<E> collection, final Class<T> reference) {
- List<T> response = new ArrayList<T>();
+ List<T> response = new ArrayList<>();
for (E element : collection) {
response.add(AbstractWrappable.getInstance(reference, element));
}
@@ -48,7 +48,7 @@ public final class CollectionWrapper {
}
public static <T extends AbstractWrappable<String>> List<String> unwrap(final Collection<T> collection) {
- List<String> response = new ArrayList<String>();
+ List<String> response = new ArrayList<>();
for (T item : collection) {
response.add(item.getElement());
}
@@ -56,7 +56,7 @@ public final class CollectionWrapper {
}
public static List<AuditLoggerName> wrapLogger(final Collection<LoggerTO> logger) {
- List<AuditLoggerName> respons = new ArrayList<AuditLoggerName>();
+ List<AuditLoggerName> respons = new ArrayList<>();
for (LoggerTO l : logger) {
try {
respons.add(AuditLoggerName.fromLoggerName(l.getKey()));
http://git-wip-us.apache.org/repos/asf/syncope/blob/64d475e5/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java
index ede49be..c4de80a 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ConnectorService.java
@@ -42,6 +42,7 @@ import org.apache.syncope.common.lib.to.ConnIdObjectClassTO;
import org.apache.syncope.common.lib.to.ConnInstanceTO;
import org.apache.syncope.common.lib.to.PlainSchemaTO;
import org.apache.syncope.common.lib.types.ConnConfProperty;
+import org.apache.syncope.common.lib.wrap.BooleanWrap;
/**
* REST operations for connector bundles and instances.
@@ -178,7 +179,7 @@ public interface ConnectorService extends JAXRSService {
@Path("check")
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- boolean check(@NotNull ConnInstanceTO connInstanceTO);
+ BooleanWrap check(@NotNull ConnInstanceTO connInstanceTO);
/**
* Reload all connector bundles and instances.
http://git-wip-us.apache.org/repos/asf/syncope/blob/64d475e5/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/GroupService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/GroupService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/GroupService.java
index 635be02..001d71c 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/GroupService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/GroupService.java
@@ -40,7 +40,7 @@ import org.apache.syncope.common.lib.to.PagedResult;
import org.apache.syncope.common.lib.to.GroupTO;
import org.apache.syncope.common.lib.types.ResourceAssociationActionType;
import org.apache.syncope.common.lib.types.ResourceDeassociationActionType;
-import org.apache.syncope.common.lib.wrap.ResourceName;
+import org.apache.syncope.common.lib.wrap.ResourceKey;
import org.apache.syncope.common.rest.api.beans.AnyListQuery;
import org.apache.syncope.common.rest.api.beans.AnySearchQuery;
@@ -172,7 +172,7 @@ public interface GroupService extends JAXRSService {
Response bulkDeassociation(
@NotNull @PathParam("groupKey") Long groupKey,
@NotNull @PathParam("type") ResourceDeassociationActionType type,
- @NotNull List<ResourceName> resourceNames);
+ @NotNull List<ResourceKey> resourceNames);
/**
* Executes resource-related operations on given group.
@@ -193,7 +193,7 @@ public interface GroupService extends JAXRSService {
Response bulkAssociation(
@NotNull @PathParam("groupKey") Long groupKey,
@NotNull @PathParam("type") ResourceAssociationActionType type,
- @NotNull List<ResourceName> resourceNames);
+ @NotNull List<ResourceKey> resourceNames);
/**
* Executes the provided bulk action.
http://git-wip-us.apache.org/repos/asf/syncope/blob/64d475e5/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java
index 4656dce..41204a0 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ResourceService.java
@@ -39,6 +39,7 @@ import org.apache.syncope.common.lib.to.ConnObjectTO;
import org.apache.syncope.common.lib.to.ResourceTO;
import org.apache.syncope.common.lib.types.ResourceDeassociationActionType;
import org.apache.syncope.common.lib.wrap.AnyKey;
+import org.apache.syncope.common.lib.wrap.BooleanWrap;
/**
* REST operations for external resources.
@@ -123,8 +124,9 @@ public interface ResourceService extends JAXRSService {
*/
@POST
@Path("check")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- boolean check(@NotNull ResourceTO resourceTO);
+ BooleanWrap check(@NotNull ResourceTO resourceTO);
/**
* De-associate any objects from the given resource.
http://git-wip-us.apache.org/repos/asf/syncope/blob/64d475e5/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserService.java
index 8f9363cb..4866f95 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/UserService.java
@@ -45,7 +45,7 @@ import org.apache.syncope.common.lib.to.PagedResult;
import org.apache.syncope.common.lib.to.UserTO;
import org.apache.syncope.common.lib.types.ResourceAssociationActionType;
import org.apache.syncope.common.lib.types.ResourceDeassociationActionType;
-import org.apache.syncope.common.lib.wrap.ResourceName;
+import org.apache.syncope.common.lib.wrap.ResourceKey;
import org.apache.syncope.common.rest.api.beans.AnyListQuery;
import org.apache.syncope.common.rest.api.beans.AnySearchQuery;
@@ -209,7 +209,7 @@ public interface UserService extends JAXRSService {
Response bulkDeassociation(
@NotNull @PathParam("userKey") Long userKey,
@NotNull @PathParam("type") ResourceDeassociationActionType type,
- @NotNull List<ResourceName> resourceNames);
+ @NotNull List<ResourceKey> resourceNames);
/**
* Executes resource-related operations on given user.
http://git-wip-us.apache.org/repos/asf/syncope/blob/64d475e5/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConnectorServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConnectorServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConnectorServiceImpl.java
index ac26aad..bd24f22 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConnectorServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ConnectorServiceImpl.java
@@ -31,6 +31,7 @@ import org.apache.syncope.common.lib.to.ConnIdObjectClassTO;
import org.apache.syncope.common.lib.to.ConnInstanceTO;
import org.apache.syncope.common.lib.to.PlainSchemaTO;
import org.apache.syncope.common.lib.types.ConnConfProperty;
+import org.apache.syncope.common.lib.wrap.BooleanWrap;
import org.apache.syncope.common.rest.api.RESTHeaders;
import org.apache.syncope.common.rest.api.service.ConnectorService;
import org.apache.syncope.core.logic.ConnectorLogic;
@@ -121,8 +122,10 @@ public class ConnectorServiceImpl extends AbstractServiceImpl implements Connect
}
@Override
- public boolean check(final ConnInstanceTO connInstanceTO) {
- return logic.check(connInstanceTO);
+ public BooleanWrap check(final ConnInstanceTO connInstanceTO) {
+ BooleanWrap result = new BooleanWrap();
+ result.setElement(logic.check(connInstanceTO));
+ return result;
}
@Override
http://git-wip-us.apache.org/repos/asf/syncope/blob/64d475e5/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/GroupServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/GroupServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/GroupServiceImpl.java
index 5c640f0..98a23a6 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/GroupServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/GroupServiceImpl.java
@@ -32,7 +32,7 @@ import org.apache.syncope.common.lib.to.PropagationStatus;
import org.apache.syncope.common.lib.to.GroupTO;
import org.apache.syncope.common.lib.types.ResourceAssociationActionType;
import org.apache.syncope.common.lib.types.ResourceDeassociationActionType;
-import org.apache.syncope.common.lib.wrap.ResourceName;
+import org.apache.syncope.common.lib.wrap.ResourceKey;
import org.apache.syncope.common.rest.api.CollectionWrapper;
import org.apache.syncope.common.rest.api.beans.AnyListQuery;
import org.apache.syncope.common.rest.api.beans.AnySearchQuery;
@@ -131,7 +131,7 @@ public class GroupServiceImpl extends AbstractServiceImpl implements GroupServic
@Override
public Response bulkDeassociation(
- final Long groupKey, final ResourceDeassociationActionType type, final List<ResourceName> resourceNames) {
+ final Long groupKey, final ResourceDeassociationActionType type, final List<ResourceKey> resourceNames) {
GroupTO group = logic.read(groupKey);
@@ -158,7 +158,7 @@ public class GroupServiceImpl extends AbstractServiceImpl implements GroupServic
BulkActionResult result = new BulkActionResult();
if (type == ResourceDeassociationActionType.UNLINK) {
- for (ResourceName resourceName : resourceNames) {
+ for (ResourceKey resourceName : resourceNames) {
result.getResults().put(resourceName.getElement(),
updated.getResources().contains(resourceName.getElement())
? BulkActionResult.Status.FAILURE
@@ -176,7 +176,7 @@ public class GroupServiceImpl extends AbstractServiceImpl implements GroupServic
@Override
public Response bulkAssociation(
- final Long groupKey, final ResourceAssociationActionType type, final List<ResourceName> resourceNames) {
+ final Long groupKey, final ResourceAssociationActionType type, final List<ResourceKey> resourceNames) {
GroupTO group = logic.read(groupKey);
@@ -203,7 +203,7 @@ public class GroupServiceImpl extends AbstractServiceImpl implements GroupServic
BulkActionResult result = new BulkActionResult();
if (type == ResourceAssociationActionType.LINK) {
- for (ResourceName resourceName : resourceNames) {
+ for (ResourceKey resourceName : resourceNames) {
result.getResults().put(resourceName.getElement(),
updated.getResources().contains(resourceName.getElement())
? BulkActionResult.Status.FAILURE
http://git-wip-us.apache.org/repos/asf/syncope/blob/64d475e5/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ResourceServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ResourceServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ResourceServiceImpl.java
index 48d6445..b6c3f50 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ResourceServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ResourceServiceImpl.java
@@ -31,6 +31,7 @@ import org.apache.syncope.common.lib.to.ResourceTO;
import org.apache.syncope.common.lib.types.AnyTypeKind;
import org.apache.syncope.common.lib.types.ResourceDeassociationActionType;
import org.apache.syncope.common.lib.wrap.AnyKey;
+import org.apache.syncope.common.lib.wrap.BooleanWrap;
import org.apache.syncope.common.rest.api.RESTHeaders;
import org.apache.syncope.common.rest.api.service.ResourceService;
import org.apache.syncope.core.logic.AbstractResourceAssociator;
@@ -92,8 +93,10 @@ public class ResourceServiceImpl extends AbstractServiceImpl implements Resource
}
@Override
- public boolean check(final ResourceTO resourceTO) {
- return logic.check(resourceTO);
+ public BooleanWrap check(final ResourceTO resourceTO) {
+ BooleanWrap result = new BooleanWrap();
+ result.setElement(logic.check(resourceTO));
+ return result;
}
@Override
http://git-wip-us.apache.org/repos/asf/syncope/blob/64d475e5/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserServiceImpl.java
index 9ea1279..192b4e0 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserServiceImpl.java
@@ -35,7 +35,7 @@ import org.apache.syncope.common.lib.to.PropagationStatus;
import org.apache.syncope.common.lib.to.UserTO;
import org.apache.syncope.common.lib.types.ResourceAssociationActionType;
import org.apache.syncope.common.lib.types.ResourceDeassociationActionType;
-import org.apache.syncope.common.lib.wrap.ResourceName;
+import org.apache.syncope.common.lib.wrap.ResourceKey;
import org.apache.syncope.common.rest.api.CollectionWrapper;
import org.apache.syncope.common.rest.api.RESTHeaders;
import org.apache.syncope.common.rest.api.beans.AnyListQuery;
@@ -155,7 +155,7 @@ public class UserServiceImpl extends AbstractServiceImpl implements UserService
@Override
public Response bulkDeassociation(
- final Long userKey, final ResourceDeassociationActionType type, final List<ResourceName> resourceNames) {
+ final Long userKey, final ResourceDeassociationActionType type, final List<ResourceKey> resourceNames) {
final UserTO user = logic.read(userKey);
@@ -182,7 +182,7 @@ public class UserServiceImpl extends AbstractServiceImpl implements UserService
BulkActionResult result = new BulkActionResult();
if (type == ResourceDeassociationActionType.UNLINK) {
- for (ResourceName resourceName : resourceNames) {
+ for (ResourceKey resourceName : resourceNames) {
result.getResults().put(
resourceName.getElement(), updated.getResources().contains(resourceName.getElement())
? BulkActionResult.Status.FAILURE
@@ -237,7 +237,7 @@ public class UserServiceImpl extends AbstractServiceImpl implements UserService
BulkActionResult result = new BulkActionResult();
if (type == ResourceAssociationActionType.LINK) {
- for (ResourceName resourceName : associationMod.getTargetResources()) {
+ for (ResourceKey resourceName : associationMod.getTargetResources()) {
result.getResults().put(resourceName.getElement(),
updated.getResources().contains(resourceName.getElement())
? BulkActionResult.Status.FAILURE
http://git-wip-us.apache.org/repos/asf/syncope/blob/64d475e5/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/AuthenticationITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/AuthenticationITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/AuthenticationITCase.java
index 6ea8cb0..5102e9b 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/AuthenticationITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/AuthenticationITCase.java
@@ -52,7 +52,7 @@ import org.apache.syncope.common.lib.types.ClientExceptionType;
import org.apache.syncope.common.lib.types.Entitlement;
import org.apache.syncope.common.lib.types.ResourceDeassociationActionType;
import org.apache.syncope.common.lib.types.SchemaType;
-import org.apache.syncope.common.lib.wrap.ResourceName;
+import org.apache.syncope.common.lib.wrap.ResourceKey;
import org.apache.syncope.common.rest.api.CollectionWrapper;
import org.apache.syncope.common.rest.api.service.SchemaService;
import org.apache.syncope.common.rest.api.service.UserService;
@@ -354,7 +354,7 @@ public class AuthenticationITCase extends AbstractITCase {
// 2. unlink the resource from the created user
assertNotNull(userService.bulkDeassociation(user.getKey(),
ResourceDeassociationActionType.UNLINK,
- CollectionWrapper.wrap(RESOURCE_NAME_TESTDB, ResourceName.class)).
+ CollectionWrapper.wrap(RESOURCE_NAME_TESTDB, ResourceKey.class)).
readEntity(BulkActionResult.class));
// 3. change password on Syncope
http://git-wip-us.apache.org/repos/asf/syncope/blob/64d475e5/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ConnectorITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ConnectorITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ConnectorITCase.java
index 2cd33a5..1136f02 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ConnectorITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ConnectorITCase.java
@@ -449,7 +449,7 @@ public class ConnectorITCase extends AbstractITCase {
connectorTO.setDisplayName("H2Test");
// set the connector configuration using PropertyTO
- Set<ConnConfProperty> conf = new HashSet<ConnConfProperty>();
+ Set<ConnConfProperty> conf = new HashSet<>();
ConnConfPropSchema jdbcDriverSchema = new ConnConfPropSchema();
jdbcDriverSchema.setName("jdbcDriver");
@@ -517,14 +517,14 @@ public class ConnectorITCase extends AbstractITCase {
// set connector configuration
connectorTO.getConfiguration().addAll(conf);
- assertTrue(connectorService.check(connectorTO));
+ assertTrue(connectorService.check(connectorTO).getElement());
conf.remove(password);
password.getValues().clear();
password.getValues().add("password");
conf.add(password);
- assertFalse(connectorService.check(connectorTO));
+ assertFalse(connectorService.check(connectorTO).getElement());
}
@Test
@@ -594,7 +594,7 @@ public class ConnectorITCase extends AbstractITCase {
connectorTO.setDisplayName("WSSoap");
// set the connector configuration using PropertyTO
- Set<ConnConfProperty> conf = new HashSet<ConnConfProperty>();
+ Set<ConnConfProperty> conf = new HashSet<>();
ConnConfPropSchema userSchema = new ConnConfPropSchema();
userSchema.setName("endpoint");
@@ -621,7 +621,7 @@ public class ConnectorITCase extends AbstractITCase {
connectorTO.getConfiguration().addAll(conf);
try {
- assertFalse(connectorService.check(connectorTO));
+ assertFalse(connectorService.check(connectorTO).getElement());
Response response = connectorService.create(connectorTO);
if (response.getStatusInfo().getStatusCode() != Response.Status.CREATED.getStatusCode()) {
@@ -667,7 +667,7 @@ public class ConnectorITCase extends AbstractITCase {
// ----------------------------------------
// Check connection without saving the resource ....
// ----------------------------------------
- assertTrue(resourceService.check(resourceTO));
+ assertTrue(resourceService.check(resourceTO).getElement());
// ----------------------------------------
} finally {
// Remove connector from db to make test re-runnable
http://git-wip-us.apache.org/repos/asf/syncope/blob/64d475e5/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/GroupITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/GroupITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/GroupITCase.java
index 6cf1313..017f802 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/GroupITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/GroupITCase.java
@@ -62,7 +62,7 @@ import org.apache.syncope.common.lib.types.MappingPurpose;
import org.apache.syncope.common.lib.types.ResourceAssociationActionType;
import org.apache.syncope.common.lib.types.ResourceDeassociationActionType;
import org.apache.syncope.common.lib.types.SchemaType;
-import org.apache.syncope.common.lib.wrap.ResourceName;
+import org.apache.syncope.common.lib.wrap.ResourceKey;
import org.apache.syncope.common.rest.api.CollectionWrapper;
import org.apache.syncope.common.rest.api.Preference;
import org.apache.syncope.common.rest.api.RESTHeaders;
@@ -326,7 +326,7 @@ public class GroupITCase extends AbstractITCase {
assertNotNull(groupService.bulkDeassociation(actual.getKey(),
ResourceDeassociationActionType.UNLINK,
- CollectionWrapper.wrap(RESOURCE_NAME_LDAP, ResourceName.class)).
+ CollectionWrapper.wrap(RESOURCE_NAME_LDAP, ResourceKey.class)).
readEntity(BulkActionResult.class));
actual = groupService.read(actual.getKey());
@@ -353,7 +353,7 @@ public class GroupITCase extends AbstractITCase {
assertNotNull(groupService.bulkAssociation(actual.getKey(),
ResourceAssociationActionType.LINK,
- CollectionWrapper.wrap(RESOURCE_NAME_LDAP, ResourceName.class)).
+ CollectionWrapper.wrap(RESOURCE_NAME_LDAP, ResourceKey.class)).
readEntity(BulkActionResult.class));
actual = groupService.read(actual.getKey());
@@ -376,7 +376,7 @@ public class GroupITCase extends AbstractITCase {
assertNotNull(groupService.bulkDeassociation(actual.getKey(),
ResourceDeassociationActionType.UNASSIGN,
- CollectionWrapper.wrap(RESOURCE_NAME_LDAP, ResourceName.class)).
+ CollectionWrapper.wrap(RESOURCE_NAME_LDAP, ResourceKey.class)).
readEntity(BulkActionResult.class));
actual = groupService.read(actual.getKey());
@@ -408,7 +408,7 @@ public class GroupITCase extends AbstractITCase {
assertNotNull(groupService.bulkAssociation(actual.getKey(),
ResourceAssociationActionType.ASSIGN,
- CollectionWrapper.wrap(RESOURCE_NAME_LDAP, ResourceName.class)).
+ CollectionWrapper.wrap(RESOURCE_NAME_LDAP, ResourceKey.class)).
readEntity(BulkActionResult.class));
actual = groupService.read(actual.getKey());
@@ -426,7 +426,7 @@ public class GroupITCase extends AbstractITCase {
assertNotNull(groupService.bulkDeassociation(actual.getKey(),
ResourceDeassociationActionType.DEPROVISION,
- CollectionWrapper.wrap(RESOURCE_NAME_LDAP, ResourceName.class)).
+ CollectionWrapper.wrap(RESOURCE_NAME_LDAP, ResourceKey.class)).
readEntity(BulkActionResult.class));
actual = groupService.read(actual.getKey());
@@ -458,7 +458,7 @@ public class GroupITCase extends AbstractITCase {
assertNotNull(groupService.bulkAssociation(actual.getKey(),
ResourceAssociationActionType.PROVISION,
- CollectionWrapper.wrap(RESOURCE_NAME_LDAP, ResourceName.class)).
+ CollectionWrapper.wrap(RESOURCE_NAME_LDAP, ResourceKey.class)).
readEntity(BulkActionResult.class));
actual = groupService.read(actual.getKey());
@@ -484,7 +484,7 @@ public class GroupITCase extends AbstractITCase {
assertNotNull(groupService.bulkAssociation(actual.getKey(),
ResourceAssociationActionType.PROVISION,
- CollectionWrapper.wrap("resource-ldap", ResourceName.class)).
+ CollectionWrapper.wrap("resource-ldap", ResourceKey.class)).
readEntity(BulkActionResult.class));
actual = groupService.read(actual.getKey());
@@ -494,7 +494,7 @@ public class GroupITCase extends AbstractITCase {
assertNotNull(groupService.bulkDeassociation(actual.getKey(),
ResourceDeassociationActionType.DEPROVISION,
- CollectionWrapper.wrap(RESOURCE_NAME_LDAP, ResourceName.class)).
+ CollectionWrapper.wrap(RESOURCE_NAME_LDAP, ResourceKey.class)).
readEntity(BulkActionResult.class));
actual = groupService.read(actual.getKey());
http://git-wip-us.apache.org/repos/asf/syncope/blob/64d475e5/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/SyncTaskITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/SyncTaskITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/SyncTaskITCase.java
index 1d809ea..ee02b26 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/SyncTaskITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/SyncTaskITCase.java
@@ -55,7 +55,7 @@ import org.apache.syncope.common.lib.types.PropagationTaskExecStatus;
import org.apache.syncope.common.lib.types.ResourceDeassociationActionType;
import org.apache.syncope.common.lib.types.SyncPolicySpecItem;
import org.apache.syncope.common.lib.types.TaskType;
-import org.apache.syncope.common.lib.wrap.ResourceName;
+import org.apache.syncope.common.lib.wrap.ResourceKey;
import org.apache.syncope.common.rest.api.CollectionWrapper;
import org.apache.syncope.common.rest.api.service.TaskService;
import org.apache.syncope.core.misc.security.Encryptor;
@@ -290,7 +290,7 @@ public class SyncTaskITCase extends AbstractTaskITCase {
for (GroupTO group : matchingGroups.getResult()) {
groupService.bulkDeassociation(group.getKey(),
ResourceDeassociationActionType.UNLINK,
- CollectionWrapper.wrap(RESOURCE_NAME_LDAP, ResourceName.class));
+ CollectionWrapper.wrap(RESOURCE_NAME_LDAP, ResourceKey.class));
groupService.delete(group.getKey());
}
}
@@ -302,7 +302,7 @@ public class SyncTaskITCase extends AbstractTaskITCase {
for (UserTO user : matchingUsers.getResult()) {
userService.bulkDeassociation(user.getKey(),
ResourceDeassociationActionType.UNLINK,
- CollectionWrapper.wrap(RESOURCE_NAME_LDAP, ResourceName.class));
+ CollectionWrapper.wrap(RESOURCE_NAME_LDAP, ResourceKey.class));
userService.delete(user.getKey());
}
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/64d475e5/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/UserITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/UserITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/UserITCase.java
index 4574b5b..c0ab43d 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/UserITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/UserITCase.java
@@ -73,7 +73,7 @@ import org.apache.syncope.common.lib.types.PropagationTaskExecStatus;
import org.apache.syncope.common.lib.types.ResourceAssociationActionType;
import org.apache.syncope.common.lib.types.ResourceDeassociationActionType;
import org.apache.syncope.common.lib.types.TaskType;
-import org.apache.syncope.common.lib.wrap.ResourceName;
+import org.apache.syncope.common.lib.wrap.ResourceKey;
import org.apache.syncope.common.rest.api.CollectionWrapper;
import org.apache.syncope.common.rest.api.Preference;
import org.apache.syncope.common.rest.api.RESTHeaders;
@@ -1766,7 +1766,7 @@ public class UserITCase extends AbstractITCase {
assertNotNull(userService.bulkDeassociation(actual.getKey(),
ResourceDeassociationActionType.UNLINK,
- CollectionWrapper.wrap(RESOURCE_NAME_CSV, ResourceName.class)).
+ CollectionWrapper.wrap(RESOURCE_NAME_CSV, ResourceKey.class)).
readEntity(BulkActionResult.class));
actual = userService.read(actual.getKey());
@@ -1798,7 +1798,7 @@ public class UserITCase extends AbstractITCase {
}
final ResourceAssociationMod associationMod = new ResourceAssociationMod();
- associationMod.getTargetResources().addAll(CollectionWrapper.wrap(RESOURCE_NAME_CSV, ResourceName.class));
+ associationMod.getTargetResources().addAll(CollectionWrapper.wrap(RESOURCE_NAME_CSV, ResourceKey.class));
assertNotNull(userService.bulkAssociation(
actual.getKey(), ResourceAssociationActionType.LINK, associationMod).readEntity(BulkActionResult.class));
@@ -1832,7 +1832,7 @@ public class UserITCase extends AbstractITCase {
assertNotNull(userService.bulkDeassociation(actual.getKey(),
ResourceDeassociationActionType.UNASSIGN,
- CollectionWrapper.wrap(RESOURCE_NAME_CSV, ResourceName.class)).
+ CollectionWrapper.wrap(RESOURCE_NAME_CSV, ResourceKey.class)).
readEntity(BulkActionResult.class));
actual = userService.read(actual.getKey());
@@ -1869,7 +1869,7 @@ public class UserITCase extends AbstractITCase {
}
final ResourceAssociationMod associationMod = new ResourceAssociationMod();
- associationMod.getTargetResources().addAll(CollectionWrapper.wrap(RESOURCE_NAME_CSV, ResourceName.class));
+ associationMod.getTargetResources().addAll(CollectionWrapper.wrap(RESOURCE_NAME_CSV, ResourceKey.class));
associationMod.setChangePwd(true);
associationMod.setPassword("password");
@@ -1899,7 +1899,7 @@ public class UserITCase extends AbstractITCase {
assertNotNull(userService.bulkDeassociation(actual.getKey(),
ResourceDeassociationActionType.DEPROVISION,
- CollectionWrapper.wrap(RESOURCE_NAME_CSV, ResourceName.class)).
+ CollectionWrapper.wrap(RESOURCE_NAME_CSV, ResourceKey.class)).
readEntity(BulkActionResult.class));
actual = userService.read(actual.getKey());
@@ -1936,7 +1936,7 @@ public class UserITCase extends AbstractITCase {
}
final ResourceAssociationMod associationMod = new ResourceAssociationMod();
- associationMod.getTargetResources().addAll(CollectionWrapper.wrap(RESOURCE_NAME_CSV, ResourceName.class));
+ associationMod.getTargetResources().addAll(CollectionWrapper.wrap(RESOURCE_NAME_CSV, ResourceKey.class));
associationMod.setChangePwd(true);
associationMod.setPassword("password");
@@ -1972,7 +1972,7 @@ public class UserITCase extends AbstractITCase {
}
final ResourceAssociationMod associationMod = new ResourceAssociationMod();
- associationMod.getTargetResources().addAll(CollectionWrapper.wrap(RESOURCE_NAME_CSV, ResourceName.class));
+ associationMod.getTargetResources().addAll(CollectionWrapper.wrap(RESOURCE_NAME_CSV, ResourceKey.class));
associationMod.setChangePwd(true);
associationMod.setPassword("password");
@@ -1987,7 +1987,7 @@ public class UserITCase extends AbstractITCase {
assertNotNull(userService.bulkDeassociation(actual.getKey(),
ResourceDeassociationActionType.DEPROVISION,
- CollectionWrapper.wrap(RESOURCE_NAME_CSV, ResourceName.class)).
+ CollectionWrapper.wrap(RESOURCE_NAME_CSV, ResourceKey.class)).
readEntity(BulkActionResult.class));
actual = userService.read(actual.getKey());
http://git-wip-us.apache.org/repos/asf/syncope/blob/64d475e5/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index f094962..fae9f6e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -493,6 +493,11 @@ under the License.
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-databinding-jaxb</artifactId>
+ <version>${cxf.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-client</artifactId>
<version>${cxf.version}</version>
</dependency>