Restoring master branch (now includes latest work from SYNCOPE-156)
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/767a30aa Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/767a30aa Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/767a30aa Branch: refs/heads/master Commit: 767a30aa211904eb50998a022abb04fa2b83d9eb Parents: 5287331 Author: Francesco Chicchiriccò <[email protected]> Authored: Mon Sep 21 16:50:10 2015 +0200 Committer: Francesco Chicchiriccò <[email protected]> Committed: Mon Sep 21 16:50:10 2015 +0200 ---------------------------------------------------------------------- .../client/console/pages/StatusModalPage.java | 32 ++++++++++---------- .../client/console/panels/GroupModalPanel.java | 11 +------ .../console/rest/AnyObjectRestClient.java | 11 +++++-- .../client/console/rest/GroupRestClient.java | 5 ++- pom.xml | 3 +- 5 files changed, 28 insertions(+), 34 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/syncope/blob/767a30aa/client/console/src/main/java/org/apache/syncope/client/console/pages/StatusModalPage.java ---------------------------------------------------------------------- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/StatusModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/StatusModalPage.java index 57e5a0c..1357cad 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/pages/StatusModalPage.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/StatusModalPage.java @@ -564,22 +564,22 @@ public class StatusModalPage<T extends AnyTO> extends AbstractStatusModalPage { final BulkActionResult bulkActionResult; switch (type) { - case ASSIGN: - bulkActionResult = userRestClient.assign( - anyTO.getETagValue(), - anyTO.getKey(), - new ArrayList<>(selection), - changepwd.getModelObject(), - password.getModelObject()); - break; - case PROVISION: - bulkActionResult = userRestClient.provision( - anyTO.getETagValue(), - anyTO.getKey(), - new ArrayList<>(selection), - changepwd.getModelObject(), - password.getModelObject()); - break; +// case ASSIGN: +// bulkActionResult = userRestClient.assign( +// anyTO.getETagValue(), +// anyTO.getKey(), +// new ArrayList<>(selection), +// changepwd.getModelObject(), +// password.getModelObject()); +// break; +// case PROVISION: +// bulkActionResult = userRestClient.provision( +// anyTO.getETagValue(), +// anyTO.getKey(), +// new ArrayList<>(selection), +// changepwd.getModelObject(), +// password.getModelObject()); +// break; default: bulkActionResult = null; // ignore http://git-wip-us.apache.org/repos/asf/syncope/blob/767a30aa/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupModalPanel.java ---------------------------------------------------------------------- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupModalPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupModalPanel.java index 5bfbe13..8c0e0ae 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupModalPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupModalPanel.java @@ -22,8 +22,6 @@ import org.apache.commons.lang3.SerializationUtils; import org.apache.syncope.client.console.commons.Constants; import org.apache.syncope.client.console.commons.Mode; import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal; -import org.apache.syncope.common.lib.AnyOperations; -import org.apache.syncope.common.lib.mod.GroupMod; import org.apache.syncope.common.lib.to.GroupTO; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.ajax.markup.html.form.AjaxButton; @@ -106,14 +104,7 @@ public class GroupModalPanel extends AbstractModalPanel { if (createFlag) { result = groupRestClient.create(groupTO); } else { - GroupMod groupMod = AnyOperations.diff(groupTO, groupTO); - - // update group just if it is changed - if (groupMod.isEmpty()) { - result = groupTO; - } else { - result = groupRestClient.update(originalGroupTO.getETagValue(), groupMod); - } + result = groupRestClient.update(originalGroupTO.getETagValue(), groupTO); } //setResponsePage(new ResultStatusModal.Builder(window, result).build()); http://git-wip-us.apache.org/repos/asf/syncope/blob/767a30aa/client/console/src/main/java/org/apache/syncope/client/console/rest/AnyObjectRestClient.java ---------------------------------------------------------------------- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/AnyObjectRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/AnyObjectRestClient.java index b4a4642..4c29faa 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/rest/AnyObjectRestClient.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/AnyObjectRestClient.java @@ -22,7 +22,6 @@ import java.util.List; import javax.ws.rs.core.Response; import org.apache.syncope.client.lib.SyncopeClient; import org.apache.syncope.common.lib.SyncopeClientException; -import org.apache.syncope.common.lib.mod.AnyObjectMod; import org.apache.syncope.common.lib.to.AnyObjectTO; import org.apache.syncope.common.lib.to.AnyTO; import org.apache.syncope.common.lib.to.BulkAction; @@ -30,6 +29,7 @@ import org.apache.syncope.common.lib.to.BulkActionResult; import org.apache.syncope.common.lib.to.ConnObjectTO; import org.apache.syncope.common.lib.to.PagedResult; import org.apache.syncope.common.rest.api.service.AnyObjectService; +import org.apache.syncope.common.rest.api.service.AnyService; import org.apache.wicket.extensions.markup.html.repeater.util.SortParam; import org.springframework.stereotype.Component; @@ -42,6 +42,11 @@ public class AnyObjectRestClient extends AbstractAnyRestClient { private static final long serialVersionUID = -8874495991295283249L; @Override + protected Class<? extends AnyService<?, ?>> getAnyServiceClass() { + return AnyObjectService.class; + } + + @Override public int count(final String realm) { return getService(AnyObjectService.class).list(SyncopeClient.getAnyListQueryBuilder().realm(realm).page(1).size( 1).build()).getTotalCount(); @@ -90,11 +95,11 @@ public class AnyObjectRestClient extends AbstractAnyRestClient { return response.readEntity(AnyObjectTO.class); } - public AnyObjectTO update(final String etag, final AnyObjectMod anyObjectMod) { + public AnyObjectTO update(final String etag, final AnyObjectTO anyObjectTO) { AnyObjectTO result; synchronized (this) { AnyObjectService service = getService(etag, AnyObjectService.class); - result = service.update(anyObjectMod).readEntity(AnyObjectTO.class); + result = service.update(anyObjectTO).readEntity(AnyObjectTO.class); resetClient(AnyObjectService.class); } return result; http://git-wip-us.apache.org/repos/asf/syncope/blob/767a30aa/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 96286d4..f631810 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 @@ -22,7 +22,6 @@ import java.util.List; import javax.ws.rs.core.Response; import org.apache.syncope.client.lib.SyncopeClient; -import org.apache.syncope.common.lib.patch.GroupPatch; import org.apache.syncope.common.lib.to.BulkAction; import org.apache.syncope.common.lib.to.BulkActionResult; import org.apache.syncope.common.lib.to.ConnObjectTO; @@ -95,11 +94,11 @@ public class GroupRestClient extends AbstractAnyRestClient { return getService(GroupService.class).read(key); } - public GroupTO update(final String etag, final GroupPatch groupPatch) { + public GroupTO update(final String etag, final GroupTO updated) { GroupTO result; synchronized (this) { GroupService service = getService(etag, GroupService.class); - result = service.update(groupPatch).readEntity(GroupTO.class); + result = service.update(updated).readEntity(GroupTO.class); resetClient(GroupService.class); } return result; http://git-wip-us.apache.org/repos/asf/syncope/blob/767a30aa/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index b9b1839..685996f 100644 --- a/pom.xml +++ b/pom.xml @@ -372,8 +372,7 @@ under the License. <activiti-modeler.directory>${project.build.directory}/activiti-modeler</activiti-modeler.directory> <jquery.version>2.1.4</jquery.version> - <!-- to be updated as soon as fix for https://github.com/l0rdn1kk0n/wicket-bootstrap/issues/549 is released --> - <jquery-ui.version>1.10.3</jquery-ui.version> + <jquery-ui.version>1.11.4</jquery-ui.version> <jquery-cookie.version>1.4.1-1</jquery-cookie.version> <bootstrap.version>3.3.5</bootstrap.version>
