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 2016/10/03 15:10:28 UTC
[1/8] syncope git commit: Upgrading Bootstrap FileInput
Repository: syncope
Updated Branches:
refs/heads/2_0_X baa7600b6 -> d8a5918bb
refs/heads/master f68588007 -> b9caa5ff7
Upgrading Bootstrap FileInput
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/2aa62555
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/2aa62555
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/2aa62555
Branch: refs/heads/2_0_X
Commit: 2aa62555cc2ff742ae5d85b4581972a19d37fcee
Parents: baa7600
Author: Francesco Chicchiricc� <il...@apache.org>
Authored: Mon Oct 3 14:54:06 2016 +0200
Committer: Francesco Chicchiricc� <il...@apache.org>
Committed: Mon Oct 3 14:54:06 2016 +0200
----------------------------------------------------------------------
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/2aa62555/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 7bb6e95..8473ad2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -411,7 +411,7 @@ under the License.
<bootstrap.version>3.3.7</bootstrap.version>
<bootstrap-select.version>1.7.3</bootstrap-select.version>
- <bootstrap-fileinput.version>4.3.4</bootstrap-fileinput.version>
+ <bootstrap-fileinput.version>4.3.5</bootstrap-fileinput.version>
<bootbox.version>4.4.0</bootbox.version>
<font-awesome.version>4.6.3</font-awesome.version>
<ionicons.version>2.0.1</ionicons.version>
[6/8] syncope git commit: More tweaks for enduser tests
Posted by il...@apache.org.
More tweaks for enduser tests
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/60803a59
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/60803a59
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/60803a59
Branch: refs/heads/master
Commit: 60803a59616fca0adb034ef0a6d0bbd50bdf2459
Parents: 9748b28
Author: Francesco Chicchiricc� <il...@apache.org>
Authored: Mon Oct 3 15:28:20 2016 +0200
Committer: Francesco Chicchiricc� <il...@apache.org>
Committed: Mon Oct 3 17:10:06 2016 +0200
----------------------------------------------------------------------
.../client/enduser/protractor/tests/create.js | 2 +
.../client/enduser/protractor/tests/edit.js | 100 +++++++++++++++++++
.../client/enduser/protractor/tests/edituser.js | 98 ------------------
3 files changed, 102 insertions(+), 98 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/60803a59/fit/enduser-reference/src/test/resources/org/apache/syncope/client/enduser/protractor/tests/create.js
----------------------------------------------------------------------
diff --git a/fit/enduser-reference/src/test/resources/org/apache/syncope/client/enduser/protractor/tests/create.js b/fit/enduser-reference/src/test/resources/org/apache/syncope/client/enduser/protractor/tests/create.js
index 27ead15..f1428c7 100644
--- a/fit/enduser-reference/src/test/resources/org/apache/syncope/client/enduser/protractor/tests/create.js
+++ b/fit/enduser-reference/src/test/resources/org/apache/syncope/client/enduser/protractor/tests/create.js
@@ -40,6 +40,8 @@ describe('syncope enduser user create', function () {
element.all(by.id('next')).first().click();
//groups
+ abstract.waitSpinner();
+ browser.wait(element(by.model('dynamicForm.selectedGroups')).isPresent());
var group = element(by.model('dynamicForm.selectedGroups'));
var selectedGroup = group.element(by.css('.ui-select-search'));
group.click();
http://git-wip-us.apache.org/repos/asf/syncope/blob/60803a59/fit/enduser-reference/src/test/resources/org/apache/syncope/client/enduser/protractor/tests/edit.js
----------------------------------------------------------------------
diff --git a/fit/enduser-reference/src/test/resources/org/apache/syncope/client/enduser/protractor/tests/edit.js b/fit/enduser-reference/src/test/resources/org/apache/syncope/client/enduser/protractor/tests/edit.js
new file mode 100644
index 0000000..00f2770
--- /dev/null
+++ b/fit/enduser-reference/src/test/resources/org/apache/syncope/client/enduser/protractor/tests/edit.js
@@ -0,0 +1,100 @@
+/*
+ * 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.
+ */
+
+var abstract = require('./abstract.js');
+describe('syncope enduser user edit', function () {
+ it('should edit user', function () {
+
+ console.log("");
+ console.log("user edit");
+ abstract.goHome();
+
+ //login
+ element(by.model('credentials.username')).sendKeys('bellini');
+ element(by.model('credentials.password')).sendKeys('password');
+ element.all(by.options('language.name for language in languages.availableLanguages track by language.id')).
+ then(function (language) {
+ expect(language.length).toBe(3);
+ });
+ element.all(by.options('language.name for language in languages.availableLanguages track by language.id')).
+ get(1).click();
+
+ element(by.id('login-btn')).click();
+
+ //credential
+ browser.wait(element(by.id('user.username')).isPresent());
+ element(by.model('user.username')).clear();
+ element(by.model('user.username')).sendKeys('bellini');
+ element(by.model('user.password')).clear();
+ element(by.model('user.password')).sendKeys('Password123');
+ element(by.model('confirmPassword.value')).sendKeys('Password123');
+ var secQuestion = element(by.model('user.securityQuestion'));
+ var selectedSecQuestion = secQuestion.all(by.options
+ ('securityQuestion.key as securityQuestion.content for securityQuestion in availableSecurityQuestions'))
+ .last();
+ selectedSecQuestion.click();
+ element(by.model('user.securityAnswer')).sendKeys('Agata Ferlito');
+ abstract.doNext();
+
+ //groups
+ abstract.waitSpinner();
+ browser.wait(element(by.model('dynamicForm.selectedGroups')).isPresent());
+ var group = element(by.model('dynamicForm.selectedGroups'));
+ var selectedGroup = group.element(by.css('.ui-select-search'));
+ group.click();
+
+ //adds group root
+ selectedGroup.sendKeys('root');
+ element.all(by.css('.ui-select-choices-row-inner span')).first().click();
+ abstract.waitSpinner();
+ abstract.doNext();
+
+ //plainSchemas
+ element.all(by.repeater('groupSchema in dynamicForm.groupSchemas')).then(function (groupSchema) {
+ expect(groupSchema.length).toBe(1);
+ });
+
+ element(by.css('[name="fullname"]')).clear();
+ element(by.css('[name="fullname"]')).sendKeys('Vincenzo Bellini');
+ element(by.css('[name="userId"]')).clear();
+ element(by.css('[name="userId"]')).sendKeys('bellini@apache.org');
+
+ var selectedDate = element(by.model('selectedDate'));
+ selectedDate.clear();
+ selectedDate.sendKeys('2009-06-21');
+ element(by.css('[name="firstname"]')).clear();
+ element(by.css('[name="firstname"]')).sendKeys('Vincenzo');
+ element(by.css('[name="ctype"]')).clear();
+ element(by.css('[name="ctype"]')).sendKeys('bellinictype');
+
+ abstract.doNext();
+
+ //derSchemas
+ abstract.doNext();
+ //virSchemas
+ abstract.doNext();
+ //Resources
+ abstract.doNext();
+ //Captcha
+ abstract.waitSpinner();
+ element.all(by.id('save')).last().click();
+ abstract.waitSpinner();
+ });
+});
+
http://git-wip-us.apache.org/repos/asf/syncope/blob/60803a59/fit/enduser-reference/src/test/resources/org/apache/syncope/client/enduser/protractor/tests/edituser.js
----------------------------------------------------------------------
diff --git a/fit/enduser-reference/src/test/resources/org/apache/syncope/client/enduser/protractor/tests/edituser.js b/fit/enduser-reference/src/test/resources/org/apache/syncope/client/enduser/protractor/tests/edituser.js
deleted file mode 100644
index 189dc0d..0000000
--- a/fit/enduser-reference/src/test/resources/org/apache/syncope/client/enduser/protractor/tests/edituser.js
+++ /dev/null
@@ -1,98 +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.
- */
-
-var abstract = require('./abstract.js');
-describe('syncope enduser user edit', function () {
- it('should edit user', function () {
-
- console.log("");
- console.log("user edit");
- abstract.goHome();
-
- //login
- element(by.model('credentials.username')).sendKeys('bellini');
- element(by.model('credentials.password')).sendKeys('password');
- element.all(by.options('language.name for language in languages.availableLanguages track by language.id')).
- then(function (language) {
- expect(language.length).toBe(3);
- });
- element.all(by.options('language.name for language in languages.availableLanguages track by language.id')).
- get(1).click();
-
- element(by.id('login-btn')).click();
-
- //credential
- browser.wait(element(by.id('user.username')).isPresent());
- element(by.model('user.username')).clear();
- element(by.model('user.username')).sendKeys('bellini');
- element(by.model('user.password')).clear();
- element(by.model('user.password')).sendKeys('Password123');
- element(by.model('confirmPassword.value')).sendKeys('Password123');
- var secQuestion = element(by.model('user.securityQuestion'));
- var selectedSecQuestion = secQuestion.all(by.options
- ('securityQuestion.key as securityQuestion.content for securityQuestion in availableSecurityQuestions'))
- .last();
- selectedSecQuestion.click();
- element(by.model('user.securityAnswer')).sendKeys('Agata Ferlito');
- abstract.doNext();
-
- //groups
- var group = element(by.model('dynamicForm.selectedGroups'));
- var selectedGroup = group.element(by.css('.ui-select-search'));
- group.click();
-
- //adds group root
- selectedGroup.sendKeys('root');
- element.all(by.css('.ui-select-choices-row-inner span')).first().click();
- abstract.waitSpinner();
- abstract.doNext();
-
- //plainSchemas
- element.all(by.repeater('groupSchema in dynamicForm.groupSchemas')).then(function (groupSchema) {
- expect(groupSchema.length).toBe(1);
- });
-
- element(by.css('[name="fullname"]')).clear();
- element(by.css('[name="fullname"]')).sendKeys('Vincenzo Bellini');
- element(by.css('[name="userId"]')).clear();
- element(by.css('[name="userId"]')).sendKeys('bellini@apache.org');
-
- var selectedDate = element(by.model('selectedDate'));
- selectedDate.clear();
- selectedDate.sendKeys('2009-06-21');
- element(by.css('[name="firstname"]')).clear();
- element(by.css('[name="firstname"]')).sendKeys('Vincenzo');
- element(by.css('[name="ctype"]')).clear();
- element(by.css('[name="ctype"]')).sendKeys('bellinictype');
-
- abstract.doNext();
-
- //derSchemas
- abstract.doNext();
- //virSchemas
- abstract.doNext();
- //Resources
- abstract.doNext();
- //Captcha
- abstract.waitSpinner();
- element.all(by.id('save')).last().click();
- abstract.waitSpinner();
- });
-});
-
[4/8] syncope git commit: Cleaning up unused bulk REST endpoints +
adding notes about bulk operations into the reference guide
Posted by il...@apache.org.
Cleaning up unused bulk REST endpoints + adding notes about bulk operations into the reference guide
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/d8a5918b
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/d8a5918b
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/d8a5918b
Branch: refs/heads/2_0_X
Commit: d8a5918bbe9d89049d6fa38b48cec3728603e1c0
Parents: 6e341c8
Author: Francesco Chicchiricc� <il...@apache.org>
Authored: Mon Oct 3 17:09:32 2016 +0200
Committer: Francesco Chicchiricc� <il...@apache.org>
Committed: Mon Oct 3 17:09:32 2016 +0200
----------------------------------------------------------------------
.../console/rest/ConnectorRestClient.java | 6 ---
.../client/console/rest/ResourceRestClient.java | 5 ---
.../rest/api/service/ConnectorService.java | 14 ------
.../rest/api/service/ResourceService.java | 13 ------
.../rest/cxf/service/ConnectorServiceImpl.java | 20 ---------
.../rest/cxf/service/ResourceServiceImpl.java | 19 ---------
.../syncope/fit/core/ConnectorITCase.java | 45 --------------------
.../apache/syncope/fit/core/ResourceITCase.java | 30 -------------
.../restfulservices.adoc | 31 ++++++++++++++
9 files changed, 31 insertions(+), 152 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/d8a5918b/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 f6df407..e506a77 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
@@ -29,8 +29,6 @@ import org.apache.commons.collections4.Predicate;
import org.apache.commons.lang3.tuple.Pair;
import org.apache.syncope.client.console.SyncopeConsoleSession;
import org.apache.syncope.common.lib.SyncopeClientException;
-import org.apache.syncope.common.lib.to.BulkAction;
-import org.apache.syncope.common.lib.to.BulkActionResult;
import org.apache.syncope.common.lib.to.ConnBundleTO;
import org.apache.syncope.common.lib.to.ConnIdObjectClassTO;
import org.apache.syncope.common.lib.to.ConnInstanceTO;
@@ -187,8 +185,4 @@ public class ConnectorRestClient extends BaseRestClient {
public void reload() {
getService(ConnectorService.class).reload();
}
-
- public BulkActionResult bulkAction(final BulkAction action) {
- return getService(ConnectorService.class).bulk(action);
- }
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/d8a5918b/client/console/src/main/java/org/apache/syncope/client/console/rest/ResourceRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/ResourceRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/ResourceRestClient.java
index b6b8db2..46e7d3e 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/rest/ResourceRestClient.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/ResourceRestClient.java
@@ -26,7 +26,6 @@ import javax.ws.rs.core.Response;
import org.apache.commons.collections4.ComparatorUtils;
import org.apache.commons.lang3.tuple.Pair;
import org.apache.syncope.common.lib.patch.ResourceDeassociationPatch;
-import org.apache.syncope.common.lib.to.BulkAction;
import org.apache.syncope.common.lib.to.BulkActionResult;
import org.apache.syncope.common.lib.to.ConnObjectTO;
import org.apache.syncope.common.lib.to.PagedConnObjectTOResult;
@@ -118,10 +117,6 @@ public class ResourceRestClient extends BaseRestClient {
getService(ResourceService.class).delete(name);
}
- public BulkActionResult bulkAction(final BulkAction action) {
- return getService(ResourceService.class).bulk(action);
- }
-
public BulkActionResult bulkAssociationAction(
final String resourceName, final String anyTypeName,
final ResourceDeassociationAction action, final List<String> anyKeys) {
http://git-wip-us.apache.org/repos/asf/syncope/blob/d8a5918b/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 d080648..4c63bd2 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
@@ -32,8 +32,6 @@ import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
-import org.apache.syncope.common.lib.to.BulkAction;
-import org.apache.syncope.common.lib.to.BulkActionResult;
import org.apache.syncope.common.lib.to.ConnBundleTO;
import org.apache.syncope.common.lib.to.ConnIdObjectClassTO;
import org.apache.syncope.common.lib.to.ConnInstanceTO;
@@ -156,16 +154,4 @@ public interface ConnectorService extends JAXRSService {
@POST
@Path("reload")
void reload();
-
- /**
- * Executes the provided bulk action.
- *
- * @param bulkAction list of connector instance keys against which the bulk action will be performed.
- * @return Bulk action result
- */
- @POST
- @Path("bulk")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- BulkActionResult bulk(@NotNull BulkAction bulkAction);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/d8a5918b/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 0de2619..1ec1f4f 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
@@ -32,7 +32,6 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import org.apache.syncope.common.lib.patch.ResourceDeassociationPatch;
-import org.apache.syncope.common.lib.to.BulkAction;
import org.apache.syncope.common.lib.to.BulkActionResult;
import org.apache.syncope.common.lib.to.ConnObjectTO;
import org.apache.syncope.common.lib.to.PagedConnObjectTOResult;
@@ -171,16 +170,4 @@ public interface ResourceService extends JAXRSService {
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
BulkActionResult bulkDeassociation(@NotNull ResourceDeassociationPatch patch);
-
- /**
- * Executes the provided bulk action.
- *
- * @param bulkAction list of resource names against which the bulk action will be performed
- * @return Bulk action result
- */
- @POST
- @Path("bulk")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- BulkActionResult bulk(@NotNull BulkAction bulkAction);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/d8a5918b/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 a5ebee1..7d1b849 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
@@ -21,8 +21,6 @@ package org.apache.syncope.core.rest.cxf.service;
import java.net.URI;
import java.util.List;
import javax.ws.rs.core.Response;
-import org.apache.syncope.common.lib.to.BulkAction;
-import org.apache.syncope.common.lib.to.BulkActionResult;
import org.apache.syncope.common.lib.to.ConnBundleTO;
import org.apache.syncope.common.lib.to.ConnIdObjectClassTO;
import org.apache.syncope.common.lib.to.ConnInstanceTO;
@@ -93,22 +91,4 @@ public class ConnectorServiceImpl extends AbstractServiceImpl implements Connect
public void reload() {
logic.reload();
}
-
- @Override
- public BulkActionResult bulk(final BulkAction bulkAction) {
- BulkActionResult result = new BulkActionResult();
-
- if (bulkAction.getType() == BulkAction.Type.DELETE) {
- for (String key : bulkAction.getTargets()) {
- try {
- result.getResults().put(logic.delete(key).getKey(), BulkActionResult.Status.SUCCESS);
- } catch (Exception e) {
- LOG.error("Error performing delete for connector {}", key, e);
- result.getResults().put(key, BulkActionResult.Status.FAILURE);
- }
- }
- }
-
- return result;
- }
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/d8a5918b/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 2bfba5a..ed0df7c 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
@@ -30,7 +30,6 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
import org.apache.syncope.common.lib.patch.ResourceDeassociationPatch;
import org.apache.syncope.common.lib.to.AnyTO;
-import org.apache.syncope.common.lib.to.BulkAction;
import org.apache.syncope.common.lib.to.BulkActionResult;
import org.apache.syncope.common.lib.to.ConnObjectTO;
import org.apache.syncope.common.lib.to.PagedConnObjectTOResult;
@@ -181,22 +180,4 @@ public class ResourceServiceImpl extends AbstractServiceImpl implements Resource
return result;
}
-
- @Override
- public BulkActionResult bulk(final BulkAction bulkAction) {
- BulkActionResult result = new BulkActionResult();
-
- if (bulkAction.getType() == BulkAction.Type.DELETE) {
- for (String key : bulkAction.getTargets()) {
- try {
- result.getResults().put(logic.delete(key).getKey(), BulkActionResult.Status.SUCCESS);
- } catch (Exception e) {
- LOG.error("Error performing delete for resource {}", key, e);
- result.getResults().put(key, BulkActionResult.Status.FAILURE);
- }
- }
- }
-
- return result;
- }
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/d8a5918b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ConnectorITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ConnectorITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ConnectorITCase.java
index cfc2cd1..45616f8 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ConnectorITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ConnectorITCase.java
@@ -31,7 +31,6 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.EnumSet;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
@@ -44,7 +43,6 @@ import org.apache.commons.collections4.Transformer;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.apache.syncope.common.lib.SyncopeClientException;
-import org.apache.syncope.common.lib.to.BulkAction;
import org.apache.syncope.common.lib.to.ConnBundleTO;
import org.apache.syncope.common.lib.to.ConnIdObjectClassTO;
import org.apache.syncope.common.lib.to.ConnInstanceTO;
@@ -695,49 +693,6 @@ public class ConnectorITCase extends AbstractITCase {
}
@Test
- public void bulkAction() {
- BulkAction bulkAction = new BulkAction();
- bulkAction.setType(BulkAction.Type.DELETE);
-
- ConnInstanceTO conn = connectorService.read(
- "5aa5b8be-7521-481a-9651-c557aea078c1", Locale.ENGLISH.getLanguage());
-
- conn.setKey(null);
- conn.setDisplayName("forBulk1");
-
- bulkAction.getTargets().add(String.valueOf(getObject(
- connectorService.create(conn).getLocation(), ConnectorService.class, ConnInstanceTO.class).getKey()));
-
- conn.setDisplayName("forBulk2");
-
- bulkAction.getTargets().add(String.valueOf(getObject(
- connectorService.create(conn).getLocation(), ConnectorService.class, ConnInstanceTO.class).getKey()));
-
- Iterator<String> itor = bulkAction.getTargets().iterator();
-
- assertNotNull(connectorService.read(itor.next(), Locale.ENGLISH.getLanguage()));
- assertNotNull(connectorService.read(itor.next(), Locale.ENGLISH.getLanguage()));
-
- connectorService.bulk(bulkAction);
-
- itor = bulkAction.getTargets().iterator();
-
- try {
- connectorService.read(itor.next(), Locale.ENGLISH.getLanguage());
- fail();
- } catch (SyncopeClientException e) {
- assertNotNull(e);
- }
-
- try {
- connectorService.read(itor.next(), Locale.ENGLISH.getLanguage());
- fail();
- } catch (SyncopeClientException e) {
- assertNotNull(e);
- }
- }
-
- @Test
public void issueSYNCOPE605() {
ConnInstanceTO connectorInstanceTO = connectorService.read(
"fcf9f2b0-f7d6-42c9-84a6-61b28255a42b", Locale.ENGLISH.getLanguage());
http://git-wip-us.apache.org/repos/asf/syncope/blob/d8a5918b/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 c2d23b8..ca568da 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
@@ -37,7 +37,6 @@ import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.Transformer;
import org.apache.syncope.common.lib.SyncopeClientException;
import org.apache.syncope.common.lib.to.AnyObjectTO;
-import org.apache.syncope.common.lib.to.BulkAction;
import org.apache.syncope.common.lib.to.ConnObjectTO;
import org.apache.syncope.common.lib.to.GroupTO;
import org.apache.syncope.common.lib.to.MappingItemTO;
@@ -520,35 +519,6 @@ public class ResourceITCase extends AbstractITCase {
}
@Test
- public void bulkAction() {
- resourceService.create(buildResourceTO("forBulk1"));
- resourceService.create(buildResourceTO("forBulk2"));
-
- assertNotNull(resourceService.read("forBulk1"));
- assertNotNull(resourceService.read("forBulk2"));
-
- final BulkAction bulkAction = new BulkAction();
- bulkAction.setType(BulkAction.Type.DELETE);
-
- bulkAction.getTargets().add(String.valueOf("forBulk1"));
- bulkAction.getTargets().add(String.valueOf("forBulk2"));
-
- resourceService.bulk(bulkAction);
-
- try {
- resourceService.read("forBulk1");
- fail();
- } catch (SyncopeClientException e) {
- }
-
- try {
- resourceService.read("forBulk2");
- fail();
- } catch (SyncopeClientException e) {
- }
- }
-
- @Test
public void anonymous() {
ResourceService unauthenticated = clientFactory.create().getService(ResourceService.class);
try {
http://git-wip-us.apache.org/repos/asf/syncope/blob/d8a5918b/src/main/asciidoc/reference-guide/workingwithapachesyncope/restfulservices.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/reference-guide/workingwithapachesyncope/restfulservices.adoc b/src/main/asciidoc/reference-guide/workingwithapachesyncope/restfulservices.adoc
index 816b912..9663cdb 100644
--- a/src/main/asciidoc/reference-guide/workingwithapachesyncope/restfulservices.adoc
+++ b/src/main/asciidoc/reference-guide/workingwithapachesyncope/restfulservices.adoc
@@ -111,6 +111,37 @@ Groups and Any Objects operations.
When invoking the REST endpoint `/users/self` in `GET`, the `X-Syncope-Entitlements` response header will list all
the <<entitlements,entitlements>> owned by the requesting user.
+==== Bulk Operations
+
+Some REST endpoints feature the _bulk mode_, e.g. the capability to perform a given operation onto several items at the
+same time.
+
+The table below shows the bulk operations available.
+
+[cols="1,5a"]
+|===
+
+|Any Objects
+| * `DELETE` - remove several any objects at once
+
+|Groups
+| * `PROVISION` - provision all members of the given group onto all the associated external resources
+ * `DEPROVISION` - deprovision all members of the given group from all the associated external resources
+ * `DELETE` - remove several groups at once
+
+|Users
+| * `SUSPEND` - suspend several users at once
+* `REACTIVATE` - set several users at once back to the active state
+* `MUSTCHANGEPASSWORD` - force several users at once to change their passwords
+* `DELETE` - remove several users at once
+
+| Tasks
+| * `DRYRUN` - executes several tasks at once, with the <<dryrun>> option set
+* `EXECUTE` - executes several tasks at once
+* `DELETE` - remove several tasks at once
+
+|===
+
==== Client Library
The Java client library simplifies the interaction with the <<core>> by hiding the underlying HTTP
[7/8] syncope git commit: Adding log and bunldes location for deb
Posted by il...@apache.org.
Adding log and bunldes location for deb
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/a42c4080
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/a42c4080
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/a42c4080
Branch: refs/heads/master
Commit: a42c408026e2e4feb6be55f316054ea9b09c60b2
Parents: 60803a5
Author: Francesco Chicchiricc� <il...@apache.org>
Authored: Mon Oct 3 15:42:56 2016 +0200
Committer: Francesco Chicchiricc� <il...@apache.org>
Committed: Mon Oct 3 17:10:09 2016 +0200
----------------------------------------------------------------------
src/main/asciidoc/getting-started/obtain.adoc | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/a42c4080/src/main/asciidoc/getting-started/obtain.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/getting-started/obtain.adoc b/src/main/asciidoc/getting-started/obtain.adoc
index 361bd59..9439496 100644
--- a/src/main/asciidoc/getting-started/obtain.adoc
+++ b/src/main/asciidoc/getting-started/obtain.adoc
@@ -59,7 +59,7 @@ instructions.
[[standalone-components]]
==== Components
-The set of available components, including access URLs and credentials, is the same as reported for
+The set of provided components, including access URLs and credentials, is the same as reported for
<<paths-and-components,embedded mode>>, with the exception of log files, available here under `$CATALINA_HOME/logs`.
[TIP]
@@ -159,6 +159,12 @@ CAUTION: The following assumes that `protocol`, `host` and `port` reflect your A
[cols="1,2"]
|===
+| Log files
+| Available under `/var/log/apache-syncope`
+
+| ConnId bundles
+| Available under `/var/lib/apache-syncope/bundles`
+
| Complete REST API reference
| protocol://host:port/syncope/index.html
[3/8] syncope git commit: Adding log and bunldes location for deb
Posted by il...@apache.org.
Adding log and bunldes location for deb
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/6e341c8c
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/6e341c8c
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/6e341c8c
Branch: refs/heads/2_0_X
Commit: 6e341c8cca2e31c9cd641cd42c8caf6e7bc87c78
Parents: b6f1f82
Author: Francesco Chicchiricc� <il...@apache.org>
Authored: Mon Oct 3 15:42:56 2016 +0200
Committer: Francesco Chicchiricc� <il...@apache.org>
Committed: Mon Oct 3 15:42:56 2016 +0200
----------------------------------------------------------------------
src/main/asciidoc/getting-started/obtain.adoc | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/6e341c8c/src/main/asciidoc/getting-started/obtain.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/getting-started/obtain.adoc b/src/main/asciidoc/getting-started/obtain.adoc
index 711eb67..ff9a3c2 100644
--- a/src/main/asciidoc/getting-started/obtain.adoc
+++ b/src/main/asciidoc/getting-started/obtain.adoc
@@ -59,7 +59,7 @@ instructions.
[[standalone-components]]
==== Components
-The set of available components, including access URLs and credentials, is the same as reported for
+The set of provided components, including access URLs and credentials, is the same as reported for
<<paths-and-components,embedded mode>>, with the exception of log files, available here under `$CATALINA_HOME/logs`.
[TIP]
@@ -160,6 +160,12 @@ CAUTION: The following assumes that `protocol`, `host` and `port` reflect your A
[cols="1,2"]
|===
+| Log files
+| Available under `/var/log/apache-syncope`
+
+| ConnId bundles
+| Available under `/var/lib/apache-syncope/bundles`
+
| Complete REST API reference
| protocol://host:port/syncope/index.html
[2/8] syncope git commit: More tweaks for enduser tests
Posted by il...@apache.org.
More tweaks for enduser tests
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/b6f1f821
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/b6f1f821
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/b6f1f821
Branch: refs/heads/2_0_X
Commit: b6f1f8219bbaac1cb16cd725e398de73a0884179
Parents: 2aa6255
Author: Francesco Chicchiricc� <il...@apache.org>
Authored: Mon Oct 3 15:28:20 2016 +0200
Committer: Francesco Chicchiricc� <il...@apache.org>
Committed: Mon Oct 3 15:28:20 2016 +0200
----------------------------------------------------------------------
.../client/enduser/protractor/tests/create.js | 2 +
.../client/enduser/protractor/tests/edit.js | 100 +++++++++++++++++++
.../client/enduser/protractor/tests/edituser.js | 98 ------------------
3 files changed, 102 insertions(+), 98 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/b6f1f821/fit/enduser-reference/src/test/resources/org/apache/syncope/client/enduser/protractor/tests/create.js
----------------------------------------------------------------------
diff --git a/fit/enduser-reference/src/test/resources/org/apache/syncope/client/enduser/protractor/tests/create.js b/fit/enduser-reference/src/test/resources/org/apache/syncope/client/enduser/protractor/tests/create.js
index 27ead15..f1428c7 100644
--- a/fit/enduser-reference/src/test/resources/org/apache/syncope/client/enduser/protractor/tests/create.js
+++ b/fit/enduser-reference/src/test/resources/org/apache/syncope/client/enduser/protractor/tests/create.js
@@ -40,6 +40,8 @@ describe('syncope enduser user create', function () {
element.all(by.id('next')).first().click();
//groups
+ abstract.waitSpinner();
+ browser.wait(element(by.model('dynamicForm.selectedGroups')).isPresent());
var group = element(by.model('dynamicForm.selectedGroups'));
var selectedGroup = group.element(by.css('.ui-select-search'));
group.click();
http://git-wip-us.apache.org/repos/asf/syncope/blob/b6f1f821/fit/enduser-reference/src/test/resources/org/apache/syncope/client/enduser/protractor/tests/edit.js
----------------------------------------------------------------------
diff --git a/fit/enduser-reference/src/test/resources/org/apache/syncope/client/enduser/protractor/tests/edit.js b/fit/enduser-reference/src/test/resources/org/apache/syncope/client/enduser/protractor/tests/edit.js
new file mode 100644
index 0000000..00f2770
--- /dev/null
+++ b/fit/enduser-reference/src/test/resources/org/apache/syncope/client/enduser/protractor/tests/edit.js
@@ -0,0 +1,100 @@
+/*
+ * 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.
+ */
+
+var abstract = require('./abstract.js');
+describe('syncope enduser user edit', function () {
+ it('should edit user', function () {
+
+ console.log("");
+ console.log("user edit");
+ abstract.goHome();
+
+ //login
+ element(by.model('credentials.username')).sendKeys('bellini');
+ element(by.model('credentials.password')).sendKeys('password');
+ element.all(by.options('language.name for language in languages.availableLanguages track by language.id')).
+ then(function (language) {
+ expect(language.length).toBe(3);
+ });
+ element.all(by.options('language.name for language in languages.availableLanguages track by language.id')).
+ get(1).click();
+
+ element(by.id('login-btn')).click();
+
+ //credential
+ browser.wait(element(by.id('user.username')).isPresent());
+ element(by.model('user.username')).clear();
+ element(by.model('user.username')).sendKeys('bellini');
+ element(by.model('user.password')).clear();
+ element(by.model('user.password')).sendKeys('Password123');
+ element(by.model('confirmPassword.value')).sendKeys('Password123');
+ var secQuestion = element(by.model('user.securityQuestion'));
+ var selectedSecQuestion = secQuestion.all(by.options
+ ('securityQuestion.key as securityQuestion.content for securityQuestion in availableSecurityQuestions'))
+ .last();
+ selectedSecQuestion.click();
+ element(by.model('user.securityAnswer')).sendKeys('Agata Ferlito');
+ abstract.doNext();
+
+ //groups
+ abstract.waitSpinner();
+ browser.wait(element(by.model('dynamicForm.selectedGroups')).isPresent());
+ var group = element(by.model('dynamicForm.selectedGroups'));
+ var selectedGroup = group.element(by.css('.ui-select-search'));
+ group.click();
+
+ //adds group root
+ selectedGroup.sendKeys('root');
+ element.all(by.css('.ui-select-choices-row-inner span')).first().click();
+ abstract.waitSpinner();
+ abstract.doNext();
+
+ //plainSchemas
+ element.all(by.repeater('groupSchema in dynamicForm.groupSchemas')).then(function (groupSchema) {
+ expect(groupSchema.length).toBe(1);
+ });
+
+ element(by.css('[name="fullname"]')).clear();
+ element(by.css('[name="fullname"]')).sendKeys('Vincenzo Bellini');
+ element(by.css('[name="userId"]')).clear();
+ element(by.css('[name="userId"]')).sendKeys('bellini@apache.org');
+
+ var selectedDate = element(by.model('selectedDate'));
+ selectedDate.clear();
+ selectedDate.sendKeys('2009-06-21');
+ element(by.css('[name="firstname"]')).clear();
+ element(by.css('[name="firstname"]')).sendKeys('Vincenzo');
+ element(by.css('[name="ctype"]')).clear();
+ element(by.css('[name="ctype"]')).sendKeys('bellinictype');
+
+ abstract.doNext();
+
+ //derSchemas
+ abstract.doNext();
+ //virSchemas
+ abstract.doNext();
+ //Resources
+ abstract.doNext();
+ //Captcha
+ abstract.waitSpinner();
+ element.all(by.id('save')).last().click();
+ abstract.waitSpinner();
+ });
+});
+
http://git-wip-us.apache.org/repos/asf/syncope/blob/b6f1f821/fit/enduser-reference/src/test/resources/org/apache/syncope/client/enduser/protractor/tests/edituser.js
----------------------------------------------------------------------
diff --git a/fit/enduser-reference/src/test/resources/org/apache/syncope/client/enduser/protractor/tests/edituser.js b/fit/enduser-reference/src/test/resources/org/apache/syncope/client/enduser/protractor/tests/edituser.js
deleted file mode 100644
index 189dc0d..0000000
--- a/fit/enduser-reference/src/test/resources/org/apache/syncope/client/enduser/protractor/tests/edituser.js
+++ /dev/null
@@ -1,98 +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.
- */
-
-var abstract = require('./abstract.js');
-describe('syncope enduser user edit', function () {
- it('should edit user', function () {
-
- console.log("");
- console.log("user edit");
- abstract.goHome();
-
- //login
- element(by.model('credentials.username')).sendKeys('bellini');
- element(by.model('credentials.password')).sendKeys('password');
- element.all(by.options('language.name for language in languages.availableLanguages track by language.id')).
- then(function (language) {
- expect(language.length).toBe(3);
- });
- element.all(by.options('language.name for language in languages.availableLanguages track by language.id')).
- get(1).click();
-
- element(by.id('login-btn')).click();
-
- //credential
- browser.wait(element(by.id('user.username')).isPresent());
- element(by.model('user.username')).clear();
- element(by.model('user.username')).sendKeys('bellini');
- element(by.model('user.password')).clear();
- element(by.model('user.password')).sendKeys('Password123');
- element(by.model('confirmPassword.value')).sendKeys('Password123');
- var secQuestion = element(by.model('user.securityQuestion'));
- var selectedSecQuestion = secQuestion.all(by.options
- ('securityQuestion.key as securityQuestion.content for securityQuestion in availableSecurityQuestions'))
- .last();
- selectedSecQuestion.click();
- element(by.model('user.securityAnswer')).sendKeys('Agata Ferlito');
- abstract.doNext();
-
- //groups
- var group = element(by.model('dynamicForm.selectedGroups'));
- var selectedGroup = group.element(by.css('.ui-select-search'));
- group.click();
-
- //adds group root
- selectedGroup.sendKeys('root');
- element.all(by.css('.ui-select-choices-row-inner span')).first().click();
- abstract.waitSpinner();
- abstract.doNext();
-
- //plainSchemas
- element.all(by.repeater('groupSchema in dynamicForm.groupSchemas')).then(function (groupSchema) {
- expect(groupSchema.length).toBe(1);
- });
-
- element(by.css('[name="fullname"]')).clear();
- element(by.css('[name="fullname"]')).sendKeys('Vincenzo Bellini');
- element(by.css('[name="userId"]')).clear();
- element(by.css('[name="userId"]')).sendKeys('bellini@apache.org');
-
- var selectedDate = element(by.model('selectedDate'));
- selectedDate.clear();
- selectedDate.sendKeys('2009-06-21');
- element(by.css('[name="firstname"]')).clear();
- element(by.css('[name="firstname"]')).sendKeys('Vincenzo');
- element(by.css('[name="ctype"]')).clear();
- element(by.css('[name="ctype"]')).sendKeys('bellinictype');
-
- abstract.doNext();
-
- //derSchemas
- abstract.doNext();
- //virSchemas
- abstract.doNext();
- //Resources
- abstract.doNext();
- //Captcha
- abstract.waitSpinner();
- element.all(by.id('save')).last().click();
- abstract.waitSpinner();
- });
-});
-
[8/8] syncope git commit: Cleaning up unused bulk REST endpoints +
adding notes about bulk operations into the reference guide
Posted by il...@apache.org.
Cleaning up unused bulk REST endpoints + adding notes about bulk operations into the reference guide
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/b9caa5ff
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/b9caa5ff
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/b9caa5ff
Branch: refs/heads/master
Commit: b9caa5ff78aa8186299c99b43f39f8f780e6649f
Parents: a42c408
Author: Francesco Chicchiricc� <il...@apache.org>
Authored: Mon Oct 3 17:09:32 2016 +0200
Committer: Francesco Chicchiricc� <il...@apache.org>
Committed: Mon Oct 3 17:10:13 2016 +0200
----------------------------------------------------------------------
.../console/rest/ConnectorRestClient.java | 6 ---
.../client/console/rest/ResourceRestClient.java | 5 ---
.../rest/api/service/ConnectorService.java | 14 ------
.../rest/api/service/ResourceService.java | 13 ------
.../rest/cxf/service/ConnectorServiceImpl.java | 20 ---------
.../rest/cxf/service/ResourceServiceImpl.java | 19 ---------
.../syncope/fit/core/ConnectorITCase.java | 45 --------------------
.../apache/syncope/fit/core/ResourceITCase.java | 30 -------------
.../restfulservices.adoc | 31 ++++++++++++++
9 files changed, 31 insertions(+), 152 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/b9caa5ff/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 f6df407..e506a77 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
@@ -29,8 +29,6 @@ import org.apache.commons.collections4.Predicate;
import org.apache.commons.lang3.tuple.Pair;
import org.apache.syncope.client.console.SyncopeConsoleSession;
import org.apache.syncope.common.lib.SyncopeClientException;
-import org.apache.syncope.common.lib.to.BulkAction;
-import org.apache.syncope.common.lib.to.BulkActionResult;
import org.apache.syncope.common.lib.to.ConnBundleTO;
import org.apache.syncope.common.lib.to.ConnIdObjectClassTO;
import org.apache.syncope.common.lib.to.ConnInstanceTO;
@@ -187,8 +185,4 @@ public class ConnectorRestClient extends BaseRestClient {
public void reload() {
getService(ConnectorService.class).reload();
}
-
- public BulkActionResult bulkAction(final BulkAction action) {
- return getService(ConnectorService.class).bulk(action);
- }
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b9caa5ff/client/console/src/main/java/org/apache/syncope/client/console/rest/ResourceRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/ResourceRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/ResourceRestClient.java
index b6b8db2..46e7d3e 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/rest/ResourceRestClient.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/ResourceRestClient.java
@@ -26,7 +26,6 @@ import javax.ws.rs.core.Response;
import org.apache.commons.collections4.ComparatorUtils;
import org.apache.commons.lang3.tuple.Pair;
import org.apache.syncope.common.lib.patch.ResourceDeassociationPatch;
-import org.apache.syncope.common.lib.to.BulkAction;
import org.apache.syncope.common.lib.to.BulkActionResult;
import org.apache.syncope.common.lib.to.ConnObjectTO;
import org.apache.syncope.common.lib.to.PagedConnObjectTOResult;
@@ -118,10 +117,6 @@ public class ResourceRestClient extends BaseRestClient {
getService(ResourceService.class).delete(name);
}
- public BulkActionResult bulkAction(final BulkAction action) {
- return getService(ResourceService.class).bulk(action);
- }
-
public BulkActionResult bulkAssociationAction(
final String resourceName, final String anyTypeName,
final ResourceDeassociationAction action, final List<String> anyKeys) {
http://git-wip-us.apache.org/repos/asf/syncope/blob/b9caa5ff/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 d080648..4c63bd2 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
@@ -32,8 +32,6 @@ import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
-import org.apache.syncope.common.lib.to.BulkAction;
-import org.apache.syncope.common.lib.to.BulkActionResult;
import org.apache.syncope.common.lib.to.ConnBundleTO;
import org.apache.syncope.common.lib.to.ConnIdObjectClassTO;
import org.apache.syncope.common.lib.to.ConnInstanceTO;
@@ -156,16 +154,4 @@ public interface ConnectorService extends JAXRSService {
@POST
@Path("reload")
void reload();
-
- /**
- * Executes the provided bulk action.
- *
- * @param bulkAction list of connector instance keys against which the bulk action will be performed.
- * @return Bulk action result
- */
- @POST
- @Path("bulk")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- BulkActionResult bulk(@NotNull BulkAction bulkAction);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b9caa5ff/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 0de2619..1ec1f4f 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
@@ -32,7 +32,6 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import org.apache.syncope.common.lib.patch.ResourceDeassociationPatch;
-import org.apache.syncope.common.lib.to.BulkAction;
import org.apache.syncope.common.lib.to.BulkActionResult;
import org.apache.syncope.common.lib.to.ConnObjectTO;
import org.apache.syncope.common.lib.to.PagedConnObjectTOResult;
@@ -171,16 +170,4 @@ public interface ResourceService extends JAXRSService {
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
BulkActionResult bulkDeassociation(@NotNull ResourceDeassociationPatch patch);
-
- /**
- * Executes the provided bulk action.
- *
- * @param bulkAction list of resource names against which the bulk action will be performed
- * @return Bulk action result
- */
- @POST
- @Path("bulk")
- @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- BulkActionResult bulk(@NotNull BulkAction bulkAction);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b9caa5ff/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 a5ebee1..7d1b849 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
@@ -21,8 +21,6 @@ package org.apache.syncope.core.rest.cxf.service;
import java.net.URI;
import java.util.List;
import javax.ws.rs.core.Response;
-import org.apache.syncope.common.lib.to.BulkAction;
-import org.apache.syncope.common.lib.to.BulkActionResult;
import org.apache.syncope.common.lib.to.ConnBundleTO;
import org.apache.syncope.common.lib.to.ConnIdObjectClassTO;
import org.apache.syncope.common.lib.to.ConnInstanceTO;
@@ -93,22 +91,4 @@ public class ConnectorServiceImpl extends AbstractServiceImpl implements Connect
public void reload() {
logic.reload();
}
-
- @Override
- public BulkActionResult bulk(final BulkAction bulkAction) {
- BulkActionResult result = new BulkActionResult();
-
- if (bulkAction.getType() == BulkAction.Type.DELETE) {
- for (String key : bulkAction.getTargets()) {
- try {
- result.getResults().put(logic.delete(key).getKey(), BulkActionResult.Status.SUCCESS);
- } catch (Exception e) {
- LOG.error("Error performing delete for connector {}", key, e);
- result.getResults().put(key, BulkActionResult.Status.FAILURE);
- }
- }
- }
-
- return result;
- }
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b9caa5ff/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 2bfba5a..ed0df7c 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
@@ -30,7 +30,6 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
import org.apache.syncope.common.lib.patch.ResourceDeassociationPatch;
import org.apache.syncope.common.lib.to.AnyTO;
-import org.apache.syncope.common.lib.to.BulkAction;
import org.apache.syncope.common.lib.to.BulkActionResult;
import org.apache.syncope.common.lib.to.ConnObjectTO;
import org.apache.syncope.common.lib.to.PagedConnObjectTOResult;
@@ -181,22 +180,4 @@ public class ResourceServiceImpl extends AbstractServiceImpl implements Resource
return result;
}
-
- @Override
- public BulkActionResult bulk(final BulkAction bulkAction) {
- BulkActionResult result = new BulkActionResult();
-
- if (bulkAction.getType() == BulkAction.Type.DELETE) {
- for (String key : bulkAction.getTargets()) {
- try {
- result.getResults().put(logic.delete(key).getKey(), BulkActionResult.Status.SUCCESS);
- } catch (Exception e) {
- LOG.error("Error performing delete for resource {}", key, e);
- result.getResults().put(key, BulkActionResult.Status.FAILURE);
- }
- }
- }
-
- return result;
- }
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b9caa5ff/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ConnectorITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ConnectorITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ConnectorITCase.java
index cfc2cd1..45616f8 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ConnectorITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ConnectorITCase.java
@@ -31,7 +31,6 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.EnumSet;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
@@ -44,7 +43,6 @@ import org.apache.commons.collections4.Transformer;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.apache.syncope.common.lib.SyncopeClientException;
-import org.apache.syncope.common.lib.to.BulkAction;
import org.apache.syncope.common.lib.to.ConnBundleTO;
import org.apache.syncope.common.lib.to.ConnIdObjectClassTO;
import org.apache.syncope.common.lib.to.ConnInstanceTO;
@@ -695,49 +693,6 @@ public class ConnectorITCase extends AbstractITCase {
}
@Test
- public void bulkAction() {
- BulkAction bulkAction = new BulkAction();
- bulkAction.setType(BulkAction.Type.DELETE);
-
- ConnInstanceTO conn = connectorService.read(
- "5aa5b8be-7521-481a-9651-c557aea078c1", Locale.ENGLISH.getLanguage());
-
- conn.setKey(null);
- conn.setDisplayName("forBulk1");
-
- bulkAction.getTargets().add(String.valueOf(getObject(
- connectorService.create(conn).getLocation(), ConnectorService.class, ConnInstanceTO.class).getKey()));
-
- conn.setDisplayName("forBulk2");
-
- bulkAction.getTargets().add(String.valueOf(getObject(
- connectorService.create(conn).getLocation(), ConnectorService.class, ConnInstanceTO.class).getKey()));
-
- Iterator<String> itor = bulkAction.getTargets().iterator();
-
- assertNotNull(connectorService.read(itor.next(), Locale.ENGLISH.getLanguage()));
- assertNotNull(connectorService.read(itor.next(), Locale.ENGLISH.getLanguage()));
-
- connectorService.bulk(bulkAction);
-
- itor = bulkAction.getTargets().iterator();
-
- try {
- connectorService.read(itor.next(), Locale.ENGLISH.getLanguage());
- fail();
- } catch (SyncopeClientException e) {
- assertNotNull(e);
- }
-
- try {
- connectorService.read(itor.next(), Locale.ENGLISH.getLanguage());
- fail();
- } catch (SyncopeClientException e) {
- assertNotNull(e);
- }
- }
-
- @Test
public void issueSYNCOPE605() {
ConnInstanceTO connectorInstanceTO = connectorService.read(
"fcf9f2b0-f7d6-42c9-84a6-61b28255a42b", Locale.ENGLISH.getLanguage());
http://git-wip-us.apache.org/repos/asf/syncope/blob/b9caa5ff/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 c2d23b8..ca568da 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
@@ -37,7 +37,6 @@ import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.Transformer;
import org.apache.syncope.common.lib.SyncopeClientException;
import org.apache.syncope.common.lib.to.AnyObjectTO;
-import org.apache.syncope.common.lib.to.BulkAction;
import org.apache.syncope.common.lib.to.ConnObjectTO;
import org.apache.syncope.common.lib.to.GroupTO;
import org.apache.syncope.common.lib.to.MappingItemTO;
@@ -520,35 +519,6 @@ public class ResourceITCase extends AbstractITCase {
}
@Test
- public void bulkAction() {
- resourceService.create(buildResourceTO("forBulk1"));
- resourceService.create(buildResourceTO("forBulk2"));
-
- assertNotNull(resourceService.read("forBulk1"));
- assertNotNull(resourceService.read("forBulk2"));
-
- final BulkAction bulkAction = new BulkAction();
- bulkAction.setType(BulkAction.Type.DELETE);
-
- bulkAction.getTargets().add(String.valueOf("forBulk1"));
- bulkAction.getTargets().add(String.valueOf("forBulk2"));
-
- resourceService.bulk(bulkAction);
-
- try {
- resourceService.read("forBulk1");
- fail();
- } catch (SyncopeClientException e) {
- }
-
- try {
- resourceService.read("forBulk2");
- fail();
- } catch (SyncopeClientException e) {
- }
- }
-
- @Test
public void anonymous() {
ResourceService unauthenticated = clientFactory.create().getService(ResourceService.class);
try {
http://git-wip-us.apache.org/repos/asf/syncope/blob/b9caa5ff/src/main/asciidoc/reference-guide/workingwithapachesyncope/restfulservices.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/reference-guide/workingwithapachesyncope/restfulservices.adoc b/src/main/asciidoc/reference-guide/workingwithapachesyncope/restfulservices.adoc
index d765788..0de2832 100644
--- a/src/main/asciidoc/reference-guide/workingwithapachesyncope/restfulservices.adoc
+++ b/src/main/asciidoc/reference-guide/workingwithapachesyncope/restfulservices.adoc
@@ -111,6 +111,37 @@ Groups and Any Objects operations.
When invoking the REST endpoint `/users/self` in `GET`, the `X-Syncope-Entitlements` response header will list all
the <<entitlements,entitlements>> owned by the requesting user.
+==== Bulk Operations
+
+Some REST endpoints feature the _bulk mode_, e.g. the capability to perform a given operation onto several items at the
+same time.
+
+The table below shows the bulk operations available.
+
+[cols="1,5a"]
+|===
+
+|Any Objects
+| * `DELETE` - remove several any objects at once
+
+|Groups
+| * `PROVISION` - provision all members of the given group onto all the associated external resources
+ * `DEPROVISION` - deprovision all members of the given group from all the associated external resources
+ * `DELETE` - remove several groups at once
+
+|Users
+| * `SUSPEND` - suspend several users at once
+* `REACTIVATE` - set several users at once back to the active state
+* `MUSTCHANGEPASSWORD` - force several users at once to change their passwords
+* `DELETE` - remove several users at once
+
+| Tasks
+| * `DRYRUN` - executes several tasks at once, with the <<dryrun>> option set
+* `EXECUTE` - executes several tasks at once
+* `DELETE` - remove several tasks at once
+
+|===
+
==== Client Library
The Java client library simplifies the interaction with the <<core>> by hiding the underlying HTTP
[5/8] syncope git commit: Upgrading Bootstrap FileInput
Posted by il...@apache.org.
Upgrading Bootstrap FileInput
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/9748b284
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/9748b284
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/9748b284
Branch: refs/heads/master
Commit: 9748b2849d7eea0e99a83c09491ce6872a818136
Parents: f685880
Author: Francesco Chicchiricc� <il...@apache.org>
Authored: Mon Oct 3 14:54:06 2016 +0200
Committer: Francesco Chicchiricc� <il...@apache.org>
Committed: Mon Oct 3 17:10:03 2016 +0200
----------------------------------------------------------------------
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/9748b284/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 09379b7..bc9eea9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -411,7 +411,7 @@ under the License.
<bootstrap.version>3.3.7</bootstrap.version>
<bootstrap-select.version>1.7.3</bootstrap-select.version>
- <bootstrap-fileinput.version>4.3.4</bootstrap-fileinput.version>
+ <bootstrap-fileinput.version>4.3.5</bootstrap-fileinput.version>
<bootbox.version>4.4.0</bootbox.version>
<font-awesome.version>4.6.3</font-awesome.version>
<ionicons.version>2.0.1</ionicons.version>