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/04/07 16:57:48 UTC
[3/3] syncope git commit: [SYNCOPE-788] Feature provided
[SYNCOPE-788] Feature provided
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/93cf2296
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/93cf2296
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/93cf2296
Branch: refs/heads/master
Commit: 93cf22969741764d711435a00ba38583484151a7
Parents: 62aa8f7
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Thu Apr 7 16:57:34 2016 +0200
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Thu Apr 7 16:57:34 2016 +0200
----------------------------------------------------------------------
.../console/commons/TaskDataProvider.java | 10 +-
.../console/panels/AjaxDataTablePanel.java | 21 +--
.../console/panels/AnyObjectDirectoryPanel.java | 105 ++++++++------
.../syncope/client/console/panels/AnyPanel.java | 8 +-
.../client/console/panels/DirectoryPanel.java | 3 +-
.../console/panels/GroupDirectoryPanel.java | 140 ++++++++++---------
.../console/panels/UserDirectoryPanel.java | 97 +++++++------
.../search/AnySelectionDirectoryPanel.java | 59 ++++----
.../client/console/rest/ReportRestClient.java | 3 +-
.../client/console/rest/TaskRestClient.java | 41 ++++--
.../client/console/rest/UserRestClient.java | 4 +-
.../console/tasks/AbstractPropagationTasks.java | 29 ++++
.../tasks/AnyPropagationTaskDirectoryPanel.java | 79 +++++++++++
.../console/tasks/AnyPropagationTasks.java | 58 ++++++++
.../tasks/PropagationTaskDirectoryPanel.java | 9 +-
.../client/console/tasks/PropagationTasks.java | 17 ++-
.../tasks/ProvisioningTaskDirectoryPanel.java | 4 +-
.../console/topology/TopologyTogglePanel.java | 2 +-
.../wicket/markup/html/form/ActionLink.java | 3 +-
.../markup/html/form/ActionLinksPanel.java | 69 ++++-----
.../client/console/wizards/WizardMgtPanel.java | 13 +-
.../console/wizards/any/Relationships.java | 6 +-
.../META-INF/resources/css/syncopeConsole.css | 2 +-
.../console/bulk/BulkActionModal.properties | 18 ---
.../console/bulk/BulkActionModal_it.properties | 18 ---
.../bulk/BulkActionModal_pt_BR.properties | 18 ---
.../console/panels/DirectoryPanel.properties | 2 +
.../console/panels/DirectoryPanel_it.properties | 2 +
.../panels/DirectoryPanel_pt_BR.properties | 2 +
.../console/status/StatusModal.properties | 1 -
.../console/status/StatusModal_it.properties | 1 -
.../console/status/StatusModal_pt_BR.properties | 1 -
.../PropagationTaskDirectoryPanel.properties | 6 +-
.../PropagationTaskDirectoryPanel_it.properties | 6 +-
...opagationTaskDirectoryPanel_pt_BR.properties | 6 +-
.../markup/html/form/ActionLinksPanel.html | 13 +-
.../client/console/wizards/WizardMgtPanel.html | 48 +++----
.../common/lib/types/AnyEntitlement.java | 3 +
.../syncope/core/logic/AnyObjectLogic.java | 70 ++++------
.../core/persistence/api/dao/TaskDAO.java | 4 +-
.../persistence/jpa/dao/JPAAnyObjectDAO.java | 5 +-
.../core/persistence/jpa/dao/JPATaskDAO.java | 24 ++--
.../provisioning/api/EntitlementsHolder.java | 8 +-
43 files changed, 583 insertions(+), 455 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/93cf2296/client/console/src/main/java/org/apache/syncope/client/console/commons/TaskDataProvider.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/TaskDataProvider.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/TaskDataProvider.java
index f56805a..9f6db89 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/commons/TaskDataProvider.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/TaskDataProvider.java
@@ -31,18 +31,18 @@ public abstract class TaskDataProvider<T extends AbstractTaskTO> extends Directo
private final SortableDataProviderComparator<T> comparator;
- protected final TaskType id;
+ protected final TaskType taskType;
private final TaskRestClient taskRestClient;
- public TaskDataProvider(final int paginatorRows, final TaskType id, final TaskRestClient taskRestClient) {
+ public TaskDataProvider(final int paginatorRows, final TaskType taskType, final TaskRestClient taskRestClient) {
super(paginatorRows);
this.taskRestClient = taskRestClient;
//Default sorting
setSort("key", SortOrder.DESCENDING);
- comparator = new SortableDataProviderComparator<T>(this);
- this.id = id;
+ comparator = new SortableDataProviderComparator<>(this);
+ this.taskType = taskType;
}
public SortableDataProviderComparator<T> getComparator() {
@@ -51,7 +51,7 @@ public abstract class TaskDataProvider<T extends AbstractTaskTO> extends Directo
@Override
public long size() {
- return taskRestClient.count(id);
+ return taskRestClient.count(taskType);
}
@Override
http://git-wip-us.apache.org/repos/asf/syncope/blob/93cf2296/client/console/src/main/java/org/apache/syncope/client/console/panels/AjaxDataTablePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AjaxDataTablePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AjaxDataTablePanel.java
index 5ed0c7e..017659b 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AjaxDataTablePanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AjaxDataTablePanel.java
@@ -215,7 +215,7 @@ public final class AjaxDataTablePanel<T extends Serializable, S> extends DataTab
target.add(bulkModal.setContent(new BulkActionModal<>(
bulkModal,
builder.pageRef,
- new ArrayList<T>(group.getModelObject()),
+ new ArrayList<>(group.getModelObject()),
// serialization problem with sublist only
new ArrayList<>(builder.columns.subList(1, builder.columns.size() - 1)),
builder.bulkActions,
@@ -224,14 +224,17 @@ public final class AjaxDataTablePanel<T extends Serializable, S> extends DataTab
bulkModal.show(true);
} else {
- builder.multiLevelPanel.next("bulk.action", new BulkContent<>(
- builder.baseModal,
- new ArrayList<T>(group.getModelObject()),
- // serialization problem with sublist only
- new ArrayList<>(builder.columns.subList(1, builder.columns.size() - 1)),
- builder.bulkActions,
- builder.bulkActionExecutor,
- builder.itemKeyField), target);
+ builder.multiLevelPanel.next(
+ getString("bulk.action"),
+ new BulkContent<>(
+ builder.baseModal,
+ new ArrayList<>(group.getModelObject()),
+ // serialization problem with sublist only
+ new ArrayList<>(builder.columns.subList(1, builder.columns.size() - 1)),
+ builder.bulkActions,
+ builder.bulkActionExecutor,
+ builder.itemKeyField),
+ target);
}
group.setModelObject(Collections.<T>emptyList());
target.add(group);
http://git-wip-us.apache.org/repos/asf/syncope/blob/93cf2296/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyObjectDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyObjectDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyObjectDirectoryPanel.java
index 0f5d517..7c67ab0 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyObjectDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyObjectDirectoryPanel.java
@@ -30,9 +30,11 @@ import org.apache.syncope.client.console.SyncopeConsoleSession;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.rest.AnyObjectRestClient;
import org.apache.syncope.client.console.status.StatusModal;
+import org.apache.syncope.client.console.tasks.AnyPropagationTasks;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.AttrColumn;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink.ActionType;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
import org.apache.syncope.client.console.wizards.AjaxWizard;
import org.apache.syncope.client.console.wizards.WizardMgtPanel;
@@ -41,6 +43,7 @@ import org.apache.syncope.common.lib.SyncopeClientException;
import org.apache.syncope.common.lib.to.AnyObjectTO;
import org.apache.syncope.common.lib.to.AnyTypeClassTO;
import org.apache.syncope.common.lib.types.AnyEntitlement;
+import org.apache.syncope.common.lib.types.AnyTypeKind;
import org.apache.syncope.common.lib.types.SchemaType;
import org.apache.syncope.common.lib.types.StandardEntitlement;
import org.apache.wicket.PageReference;
@@ -52,6 +55,7 @@ import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.model.StringResourceModel;
import org.springframework.util.ReflectionUtils;
public class AnyObjectDirectoryPanel extends AnyDirectoryPanel<AnyObjectTO> {
@@ -138,50 +142,59 @@ public class AnyObjectDirectoryPanel extends AnyDirectoryPanel<AnyObjectTO> {
altDefaultModal.show(true);
}
- }, ActionLink.ActionType.MANAGE_RESOURCES, StandardEntitlement.USER_READ).
- add(new ActionLink<AnyObjectTO>() {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final AnyObjectTO ignore) {
- send(AnyObjectDirectoryPanel.this, Broadcast.EXACT,
- new AjaxWizard.EditItemActionEvent<>(
- new AnyHandler<>(new AnyObjectRestClient().read(model.getObject().
- getKey())),
- target));
- }
- }, ActionLink.ActionType.EDIT, String.format("%s_%s", type, AnyEntitlement.READ)).
- add(new ActionLink<AnyObjectTO>() {
-
- private static final long serialVersionUID = -7978723352517770645L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final AnyObjectTO ignore) {
- final AnyObjectTO clone = SerializationUtils.clone(model.getObject());
- clone.setKey(0L);
- send(AnyObjectDirectoryPanel.this, Broadcast.EXACT,
- new AjaxWizard.NewItemActionEvent<>(new AnyHandler<>(clone), target));
- }
- }, ActionLink.ActionType.CLONE, StandardEntitlement.USER_CREATE).
- add(new ActionLink<AnyObjectTO>() {
-
- private static final long serialVersionUID = -7978723352517770646L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final AnyObjectTO ignore) {
- try {
- restClient.delete(model.getObject().getETagValue(), model.getObject().getKey());
- info(getString(Constants.OPERATION_SUCCEEDED));
- target.add(container);
- } catch (SyncopeClientException e) {
- LOG.error("While deleting object {}", model.getObject().getKey(), e);
- error(StringUtils.isBlank(e.getMessage())
- ? e.getClass().getName() : e.getMessage());
- }
- SyncopeConsoleSession.get().getNotificationPanel().refresh(target);
- }
- }, ActionLink.ActionType.DELETE, String.format("%s_%s", type, AnyEntitlement.DELETE));
+ }, ActionType.MANAGE_RESOURCES, AnyEntitlement.READ.getFor(type)).add(new ActionLink<AnyObjectTO>() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final AnyObjectTO ignore) {
+ send(AnyObjectDirectoryPanel.this, Broadcast.EXACT,
+ new AjaxWizard.EditItemActionEvent<>(
+ new AnyHandler<>(new AnyObjectRestClient().read(model.getObject().
+ getKey())),
+ target));
+ }
+ }, ActionType.EDIT, AnyEntitlement.READ.getFor(type)).add(new ActionLink<AnyObjectTO>() {
+
+ private static final long serialVersionUID = -7978723352517770645L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final AnyObjectTO ignore) {
+ final AnyObjectTO clone = SerializationUtils.clone(model.getObject());
+ clone.setKey(0L);
+ send(AnyObjectDirectoryPanel.this, Broadcast.EXACT,
+ new AjaxWizard.NewItemActionEvent<>(new AnyHandler<>(clone), target));
+ }
+ }, ActionType.CLONE, AnyEntitlement.CREATE.getFor(type)).add(new ActionLink<AnyObjectTO>() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final AnyObjectTO ignore) {
+ target.add(utilityModal.setContent(new AnyPropagationTasks(
+ utilityModal, AnyTypeKind.ANY_OBJECT, model.getObject().getKey(), pageRef)));
+
+ utilityModal.header(new StringResourceModel("any.propagation.tasks", model));
+ utilityModal.show(true);
+ }
+ }, ActionType.PROPAGATION_TASKS, StandardEntitlement.TASK_LIST).add(new ActionLink<AnyObjectTO>() {
+
+ private static final long serialVersionUID = -7978723352517770646L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final AnyObjectTO ignore) {
+ try {
+ restClient.delete(model.getObject().getETagValue(), model.getObject().getKey());
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ target.add(container);
+ } catch (SyncopeClientException e) {
+ LOG.error("While deleting object {}", model.getObject().getKey(), e);
+ error(StringUtils.isBlank(e.getMessage())
+ ? e.getClass().getName() : e.getMessage());
+ }
+ SyncopeConsoleSession.get().getNotificationPanel().refresh(target);
+ }
+ }, ActionType.DELETE, AnyEntitlement.DELETE.getFor(type));
return panel.build(componentId, model.getObject());
}
@@ -202,7 +215,7 @@ public class AnyObjectDirectoryPanel extends AnyDirectoryPanel<AnyObjectTO> {
displayAttributeModal.header(new ResourceModel("any.attr.display"));
displayAttributeModal.show(true);
}
- }, ActionLink.ActionType.CHANGE_VIEW, String.format("%s_%s", type, AnyEntitlement.READ)).add(
+ }, ActionType.CHANGE_VIEW, AnyEntitlement.READ.getFor(type)).add(
new ActionLink<Serializable>() {
private static final long serialVersionUID = -7978723352517770644L;
@@ -213,7 +226,7 @@ public class AnyObjectDirectoryPanel extends AnyDirectoryPanel<AnyObjectTO> {
target.add(container);
}
}
- }, ActionLink.ActionType.RELOAD, String.format("%s_%s", type, AnyEntitlement.SEARCH));
+ }, ActionType.RELOAD, AnyEntitlement.SEARCH.getFor(type));
return panel.build(componentId);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/93cf2296/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyPanel.java
index 57f6e42..3ff36bd 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyPanel.java
@@ -178,8 +178,8 @@ public class AnyPanel extends Panel {
case ANY_OBJECT:
panel = new AnyObjectSearchPanel.Builder(anyTypeTO.getKey(),
new ListModel<>(new ArrayList<SearchClause>())).required(false).enableSearch().build(id);
- MetaDataRoleAuthorizationStrategy.authorize(panel, WebPage.RENDER,
- String.format("%s_%s", anyTypeTO.getKey(), AnyEntitlement.LIST));
+ MetaDataRoleAuthorizationStrategy.authorize(
+ panel, WebPage.RENDER, AnyEntitlement.LIST.getFor(anyTypeTO.getKey()));
break;
default:
panel = null;
@@ -227,8 +227,8 @@ public class AnyPanel extends Panel {
pageRef).setRealm(realmTO.getFullPath()).setFiltered(true).
setFiql(fiql).addNewItemPanelBuilder(new AnyObjectWizardBuilder(
BaseModal.CONTENT_ID, anyObjectTO, anyTypeTO.getClasses(), pageRef)).build(id);
- MetaDataRoleAuthorizationStrategy.authorize(panel, WebPage.RENDER,
- String.format("%s_%s", anyObjectTO.getType(), AnyEntitlement.LIST));
+ MetaDataRoleAuthorizationStrategy.authorize(
+ panel, WebPage.RENDER, AnyEntitlement.LIST.getFor(anyTypeTO.getKey()));
break;
default:
panel = new LabelPanel(id, null);
http://git-wip-us.apache.org/repos/asf/syncope/blob/93cf2296/client/console/src/main/java/org/apache/syncope/client/console/panels/DirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/DirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/DirectoryPanel.java
index e4c8dad..b2b3b7f 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/DirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/DirectoryPanel.java
@@ -146,9 +146,11 @@ public abstract class DirectoryPanel<
setWindowClosedReloadCallback(modal);
setWindowClosedReloadCallback(altDefaultModal);
setWindowClosedReloadCallback(displayAttributeModal);
+ setWindowClosedReloadCallback(utilityModal);
altDefaultModal.size(Modal.Size.Medium);
displayAttributeModal.size(Modal.Size.Medium);
+ utilityModal.size(Modal.Size.Large);
}
protected abstract DP dataProvider();
@@ -234,7 +236,6 @@ public abstract class DirectoryPanel<
* @param resultTableBuilder result table builder.
*/
protected void resultTableCustomChanges(final AjaxDataTablePanel.Builder<T, String> resultTableBuilder) {
-
}
public DirectoryPanel<T, W, DP, E> disableCheckBoxes() {
http://git-wip-us.apache.org/repos/asf/syncope/blob/93cf2296/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupDirectoryPanel.java
index 29cb080..0d1b489 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupDirectoryPanel.java
@@ -30,10 +30,12 @@ import org.apache.syncope.client.console.SyncopeConsoleSession;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.rest.GroupRestClient;
import org.apache.syncope.client.console.status.StatusModal;
+import org.apache.syncope.client.console.tasks.AnyPropagationTasks;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.AttrColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink.ActionType;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
import org.apache.syncope.client.console.wizards.AjaxWizard;
import org.apache.syncope.client.console.wizards.WizardMgtPanel;
@@ -42,6 +44,7 @@ import org.apache.syncope.client.console.wizards.any.GroupHandler;
import org.apache.syncope.common.lib.SyncopeClientException;
import org.apache.syncope.common.lib.to.AnyTypeClassTO;
import org.apache.syncope.common.lib.to.GroupTO;
+import org.apache.syncope.common.lib.types.AnyTypeKind;
import org.apache.syncope.common.lib.types.SchemaType;
import org.apache.syncope.common.lib.types.StandardEntitlement;
import org.apache.wicket.PageReference;
@@ -53,6 +56,7 @@ import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.model.StringResourceModel;
import org.springframework.util.ReflectionUtils;
public class GroupDirectoryPanel extends AnyDirectoryPanel<GroupTO> {
@@ -114,68 +118,76 @@ public class GroupDirectoryPanel extends AnyDirectoryPanel<GroupTO> {
public ActionLinksPanel<GroupTO> getActions(final String componentId, final IModel<GroupTO> model) {
final ActionLinksPanel.Builder<GroupTO> panel = ActionLinksPanel.builder();
- panel.
- add(new ActionLink<GroupTO>() {
-
- private static final long serialVersionUID = -7978723352517770645L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final GroupTO ignore) {
- final IModel<AnyHandler<GroupTO>> formModel =
- new CompoundPropertyModel<>(new AnyHandler<>(model.getObject()));
- altDefaultModal.setFormModel(formModel);
-
- target.add(altDefaultModal.setContent(new StatusModal<>(
- altDefaultModal, pageRef, formModel.getObject().getInnerObject(), false)));
-
- altDefaultModal.header(new Model<>(
- getString("any.edit", new Model<>(new AnyHandler<>(model.getObject())))));
-
- altDefaultModal.show(true);
- }
- }, ActionLink.ActionType.MANAGE_RESOURCES, StandardEntitlement.USER_READ).
- add(new ActionLink<GroupTO>() {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final GroupTO ignore) {
- send(GroupDirectoryPanel.this, Broadcast.EXACT,
- new AjaxWizard.EditItemActionEvent<>(
- new GroupHandler(new GroupRestClient().read(model.getObject().
- getKey())), target));
- }
- }, ActionLink.ActionType.EDIT, StandardEntitlement.GROUP_READ).
- add(new ActionLink<GroupTO>() {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final GroupTO ignore) {
- final GroupTO clone = SerializationUtils.clone(model.getObject());
- clone.setKey(0L);
- send(GroupDirectoryPanel.this, Broadcast.EXACT,
- new AjaxWizard.NewItemActionEvent<>(new GroupHandler(clone), target));
- }
- }, ActionLink.ActionType.CLONE, StandardEntitlement.GROUP_CREATE).
- add(new ActionLink<GroupTO>() {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final GroupTO ignore) {
- try {
- restClient.delete(model.getObject().getETagValue(), model.getObject().getKey());
- info(getString(Constants.OPERATION_SUCCEEDED));
- target.add(container);
- } catch (SyncopeClientException e) {
- LOG.error("While deleting object {}", model.getObject().getKey(), e);
- error(StringUtils.isBlank(e.getMessage())
- ? e.getClass().getName() : e.getMessage());
- }
- SyncopeConsoleSession.get().getNotificationPanel().refresh(target);
- }
- }, ActionLink.ActionType.DELETE, StandardEntitlement.GROUP_DELETE);
+ panel.add(new ActionLink<GroupTO>() {
+
+ private static final long serialVersionUID = -7978723352517770645L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final GroupTO ignore) {
+ final IModel<AnyHandler<GroupTO>> formModel =
+ new CompoundPropertyModel<>(new AnyHandler<>(model.getObject()));
+ altDefaultModal.setFormModel(formModel);
+
+ target.add(altDefaultModal.setContent(new StatusModal<>(
+ altDefaultModal, pageRef, formModel.getObject().getInnerObject(), false)));
+
+ altDefaultModal.header(new Model<>(
+ getString("any.edit", new Model<>(new AnyHandler<>(model.getObject())))));
+
+ altDefaultModal.show(true);
+ }
+ }, ActionType.MANAGE_RESOURCES, StandardEntitlement.GROUP_READ).add(new ActionLink<GroupTO>() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final GroupTO ignore) {
+ send(GroupDirectoryPanel.this, Broadcast.EXACT,
+ new AjaxWizard.EditItemActionEvent<>(
+ new GroupHandler(new GroupRestClient().read(model.getObject().
+ getKey())), target));
+ }
+ }, ActionType.EDIT, StandardEntitlement.GROUP_READ).add(new ActionLink<GroupTO>() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final GroupTO ignore) {
+ final GroupTO clone = SerializationUtils.clone(model.getObject());
+ clone.setKey(0L);
+ send(GroupDirectoryPanel.this, Broadcast.EXACT,
+ new AjaxWizard.NewItemActionEvent<>(new GroupHandler(clone), target));
+ }
+ }, ActionType.CLONE, StandardEntitlement.GROUP_CREATE).add(new ActionLink<GroupTO>() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final GroupTO ignore) {
+ target.add(utilityModal.setContent(new AnyPropagationTasks(
+ utilityModal, AnyTypeKind.GROUP, model.getObject().getKey(), pageRef)));
+
+ utilityModal.header(new StringResourceModel("any.propagation.tasks", model));
+ utilityModal.show(true);
+ }
+ }, ActionType.PROPAGATION_TASKS, StandardEntitlement.TASK_LIST).add(new ActionLink<GroupTO>() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final GroupTO ignore) {
+ try {
+ restClient.delete(model.getObject().getETagValue(), model.getObject().getKey());
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ target.add(container);
+ } catch (SyncopeClientException e) {
+ LOG.error("While deleting object {}", model.getObject().getKey(), e);
+ error(StringUtils.isBlank(e.getMessage())
+ ? e.getClass().getName() : e.getMessage());
+ }
+ SyncopeConsoleSession.get().getNotificationPanel().refresh(target);
+ }
+ }, ActionType.DELETE, StandardEntitlement.GROUP_DELETE);
return panel.build(componentId);
}
@@ -196,7 +208,7 @@ public class GroupDirectoryPanel extends AnyDirectoryPanel<GroupTO> {
displayAttributeModal.header(new ResourceModel("any.attr.display"));
displayAttributeModal.show(true);
}
- }, ActionLink.ActionType.CHANGE_VIEW, StandardEntitlement.GROUP_READ).add(
+ }, ActionType.CHANGE_VIEW, StandardEntitlement.GROUP_READ).add(
new ActionLink<Serializable>() {
private static final long serialVersionUID = -7978723352517770644L;
@@ -207,7 +219,7 @@ public class GroupDirectoryPanel extends AnyDirectoryPanel<GroupTO> {
target.add(container);
}
}
- }, ActionLink.ActionType.RELOAD, StandardEntitlement.GROUP_SEARCH).build(componentId);
+ }, ActionType.RELOAD, StandardEntitlement.GROUP_SEARCH).build(componentId);
}
});
http://git-wip-us.apache.org/repos/asf/syncope/blob/93cf2296/client/console/src/main/java/org/apache/syncope/client/console/panels/UserDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/UserDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/UserDirectoryPanel.java
index 8fb9f66..e852764 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/UserDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/UserDirectoryPanel.java
@@ -31,12 +31,14 @@ import org.apache.syncope.client.console.SyncopeConsoleSession;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.rest.UserRestClient;
import org.apache.syncope.client.console.status.StatusModal;
+import org.apache.syncope.client.console.tasks.AnyPropagationTasks;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.AttrColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.BooleanPropertyColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.TokenColumn;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink.ActionType;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
import org.apache.syncope.client.console.wizards.AjaxWizard;
import org.apache.syncope.client.console.wizards.WizardMgtPanel;
@@ -44,6 +46,7 @@ import org.apache.syncope.client.console.wizards.any.AnyHandler;
import org.apache.syncope.common.lib.SyncopeClientException;
import org.apache.syncope.common.lib.to.AnyTypeClassTO;
import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.syncope.common.lib.types.AnyTypeKind;
import org.apache.syncope.common.lib.types.SchemaType;
import org.apache.syncope.common.lib.types.StandardEntitlement;
import org.apache.wicket.PageReference;
@@ -55,6 +58,7 @@ import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.model.StringResourceModel;
import org.springframework.util.ReflectionUtils;
public class UserDirectoryPanel extends AnyDirectoryPanel<UserTO> {
@@ -71,13 +75,13 @@ public class UserDirectoryPanel extends AnyDirectoryPanel<UserTO> {
}
@Override
- protected Collection<ActionLink.ActionType> getBulkActions() {
- final List<ActionLink.ActionType> bulkActions = new ArrayList<>();
+ protected Collection<ActionType> getBulkActions() {
+ List<ActionType> bulkActions = new ArrayList<>();
- bulkActions.add(ActionLink.ActionType.MUSTCHANGEPASSWORD);
- bulkActions.add(ActionLink.ActionType.DELETE);
- bulkActions.add(ActionLink.ActionType.SUSPEND);
- bulkActions.add(ActionLink.ActionType.REACTIVATE);
+ bulkActions.add(ActionType.MUSTCHANGEPASSWORD);
+ bulkActions.add(ActionType.DELETE);
+ bulkActions.add(ActionType.SUSPEND);
+ bulkActions.add(ActionType.REACTIVATE);
return bulkActions;
}
@@ -141,8 +145,10 @@ public class UserDirectoryPanel extends AnyDirectoryPanel<UserTO> {
@Override
public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
try {
- UserRestClient.class.cast(restClient).
- mustChangePassword(model.getObject().getETagValue(), model.getObject().getKey());
+ UserRestClient.class.cast(restClient).mustChangePassword(
+ model.getObject().getETagValue(),
+ !model.getObject().isMustChangePassword(),
+ model.getObject().getKey());
info(getString(Constants.OPERATION_SUCCEEDED));
target.add(container);
} catch (SyncopeClientException e) {
@@ -151,8 +157,7 @@ public class UserDirectoryPanel extends AnyDirectoryPanel<UserTO> {
}
SyncopeConsoleSession.get().getNotificationPanel().refresh(target);
}
- }, ActionLink.ActionType.MUSTCHANGEPASSWORD, StandardEntitlement.USER_UPDATE).add(
- new ActionLink<UserTO>() {
+ }, ActionType.MUSTCHANGEPASSWORD, StandardEntitlement.USER_UPDATE).add(new ActionLink<UserTO>() {
private static final long serialVersionUID = -7978723352517770644L;
@@ -171,49 +176,61 @@ public class UserDirectoryPanel extends AnyDirectoryPanel<UserTO> {
altDefaultModal.show(true);
}
- }, ActionLink.ActionType.MANAGE_RESOURCES, StandardEntitlement.USER_READ).add(
- new ActionLink<UserTO>() {
+ }, ActionType.MANAGE_RESOURCES, StandardEntitlement.USER_READ).add(new ActionLink<UserTO>() {
- private static final long serialVersionUID = -7978723352517770644L;
+ private static final long serialVersionUID = -7978723352517770644L;
- @Override
- public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
- final IModel<AnyHandler<UserTO>> formModel = new CompoundPropertyModel<>(
- new AnyHandler<>(model.
- getObject()));
- altDefaultModal.setFormModel(formModel);
+ @Override
+ public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
+ final IModel<AnyHandler<UserTO>> formModel = new CompoundPropertyModel<>(
+ new AnyHandler<>(model.
+ getObject()));
+ altDefaultModal.setFormModel(formModel);
- target.add(altDefaultModal.setContent(new StatusModal<>(
- altDefaultModal, pageRef, formModel.getObject().getInnerObject(), true)));
+ target.add(altDefaultModal.setContent(new StatusModal<>(
+ altDefaultModal, pageRef, formModel.getObject().getInnerObject(), true)));
- altDefaultModal.header(new Model<>(
- getString("any.edit", new Model<>(new AnyHandler<>(model.getObject())))));
+ altDefaultModal.header(new Model<>(
+ getString("any.edit", new Model<>(new AnyHandler<>(model.getObject())))));
- altDefaultModal.show(true);
- }
- }, ActionLink.ActionType.ENABLE, StandardEntitlement.USER_READ).add(new ActionLink<UserTO>() {
+ altDefaultModal.show(true);
+ }
+ }, ActionType.ENABLE, StandardEntitlement.USER_READ).add(new ActionLink<UserTO>() {
- private static final long serialVersionUID = -7978723352517770644L;
+ private static final long serialVersionUID = -7978723352517770644L;
- @Override
- public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
- send(UserDirectoryPanel.this, Broadcast.EXACT,
- new AjaxWizard.EditItemActionEvent<>(
- new AnyHandler<>(new UserRestClient().read(model.getObject().getKey())),
- target));
- }
- }, ActionLink.ActionType.EDIT, StandardEntitlement.USER_READ).add(new ActionLink<UserTO>() {
+ @Override
+ public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
+ send(UserDirectoryPanel.this, Broadcast.EXACT,
+ new AjaxWizard.EditItemActionEvent<>(
+ new AnyHandler<>(new UserRestClient().read(model.getObject().getKey())),
+ target));
+ }
+ }, ActionType.EDIT, StandardEntitlement.USER_READ).add(new ActionLink<UserTO>() {
private static final long serialVersionUID = -7978723352517770644L;
@Override
public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
- final UserTO clone = SerializationUtils.clone(model.getObject());
+ UserTO clone = SerializationUtils.clone(model.getObject());
clone.setKey(0L);
+ clone.setUsername(model.getObject().getUsername() + "_clone");
send(UserDirectoryPanel.this, Broadcast.EXACT,
new AjaxWizard.NewItemActionEvent<>(new AnyHandler<>(clone), target));
}
- }, ActionLink.ActionType.CLONE, StandardEntitlement.USER_CREATE).add(new ActionLink<UserTO>() {
+ }, ActionType.CLONE, StandardEntitlement.USER_CREATE).add(new ActionLink<UserTO>() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
+ target.add(utilityModal.setContent(new AnyPropagationTasks(
+ utilityModal, AnyTypeKind.USER, model.getObject().getKey(), pageRef)));
+
+ utilityModal.header(new StringResourceModel("any.propagation.tasks", model));
+ utilityModal.show(true);
+ }
+ }, ActionType.PROPAGATION_TASKS, StandardEntitlement.TASK_LIST).add(new ActionLink<UserTO>() {
private static final long serialVersionUID = -7978723352517770644L;
@@ -229,7 +246,7 @@ public class UserDirectoryPanel extends AnyDirectoryPanel<UserTO> {
}
SyncopeConsoleSession.get().getNotificationPanel().refresh(target);
}
- }, ActionLink.ActionType.DELETE, StandardEntitlement.USER_DELETE);
+ }, ActionType.DELETE, StandardEntitlement.USER_DELETE);
return panel.build(componentId, model.getObject());
}
@@ -251,7 +268,7 @@ public class UserDirectoryPanel extends AnyDirectoryPanel<UserTO> {
displayAttributeModal.addSumbitButton();
displayAttributeModal.show(true);
}
- }, ActionLink.ActionType.CHANGE_VIEW, StandardEntitlement.USER_READ).add(
+ }, ActionType.CHANGE_VIEW, StandardEntitlement.USER_READ).add(
new ActionLink<Serializable>() {
private static final long serialVersionUID = -7978723352517770644L;
@@ -262,7 +279,7 @@ public class UserDirectoryPanel extends AnyDirectoryPanel<UserTO> {
target.add(container);
}
}
- }, ActionLink.ActionType.RELOAD, StandardEntitlement.USER_SEARCH).build(componentId);
+ }, ActionType.RELOAD, StandardEntitlement.USER_SEARCH).build(componentId);
}
});
http://git-wip-us.apache.org/repos/asf/syncope/blob/93cf2296/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AnySelectionDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AnySelectionDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AnySelectionDirectoryPanel.java
index 56c6109..7e1db89 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AnySelectionDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AnySelectionDirectoryPanel.java
@@ -35,6 +35,7 @@ import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.TokenColumn;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink.ActionType;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
import org.apache.syncope.common.lib.to.AnyTypeClassTO;
import org.apache.syncope.common.lib.to.AnyObjectTO;
@@ -122,7 +123,7 @@ public abstract class AnySelectionDirectoryPanel<T extends AnyTO> extends AnyDir
send(AnySelectionDirectoryPanel.this,
Broadcast.BUBBLE, new ItemSelection<>(target, model.getObject()));
}
- }, ActionLink.ActionType.SELECT, String.format("%s_%s", type, AnyEntitlement.READ));
+ }, ActionType.SELECT, AnyEntitlement.READ.getFor(type));
return panel.build(componentId, model.getObject());
}
@@ -131,33 +132,31 @@ public abstract class AnySelectionDirectoryPanel<T extends AnyTO> extends AnyDir
public ActionLinksPanel<T> getHeader(final String componentId) {
final ActionLinksPanel.Builder<T> panel = ActionLinksPanel.builder();
- return panel.
- add(new ActionLink<T>() {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final T ignore) {
- // still missing content
- target.add(altDefaultModal.setContent(new AnyObjectDisplayAttributesModalPanel<>(
- altDefaultModal, page.getPageReference(), pSchemaNames, dSchemaNames, type)));
-
- altDefaultModal.addSumbitButton();
- altDefaultModal.header(new ResourceModel("any.attr.display"));
- altDefaultModal.show(true);
- }
- }, ActionLink.ActionType.CHANGE_VIEW, String.format("%s_%s", type, AnyEntitlement.READ)).
- add(new ActionLink<T>() {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final T ignore) {
- if (target != null) {
- target.add(container);
- }
- }
- }, ActionLink.ActionType.RELOAD, String.format("%s_%s", type, AnyEntitlement.SEARCH)).
+ return panel.add(new ActionLink<T>() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final T ignore) {
+ // still missing content
+ target.add(altDefaultModal.setContent(new AnyObjectDisplayAttributesModalPanel<>(
+ altDefaultModal, page.getPageReference(), pSchemaNames, dSchemaNames, type)));
+
+ altDefaultModal.addSumbitButton();
+ altDefaultModal.header(new ResourceModel("any.attr.display"));
+ altDefaultModal.show(true);
+ }
+ }, ActionType.CHANGE_VIEW, AnyEntitlement.READ.getFor(type)).add(new ActionLink<T>() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final T ignore) {
+ if (target != null) {
+ target.add(container);
+ }
+ }
+ }, ActionType.RELOAD, AnyEntitlement.SEARCH.getFor(type)).
build(componentId);
}
});
@@ -166,8 +165,8 @@ public abstract class AnySelectionDirectoryPanel<T extends AnyTO> extends AnyDir
}
@Override
- protected Collection<ActionLink.ActionType> getBulkActions() {
- return Collections.<ActionLink.ActionType>emptyList();
+ protected Collection<ActionType> getBulkActions() {
+ return Collections.<ActionType>emptyList();
}
protected abstract String[] getDisplayAttributes();
http://git-wip-us.apache.org/repos/asf/syncope/blob/93cf2296/client/console/src/main/java/org/apache/syncope/client/console/rest/ReportRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/ReportRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/ReportRestClient.java
index 4a9b28e..9c2b86b 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/rest/ReportRestClient.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/ReportRestClient.java
@@ -21,7 +21,6 @@ package org.apache.syncope.client.console.rest;
import java.util.Date;
import java.util.List;
import javax.ws.rs.core.Response;
-import org.apache.syncope.client.console.SyncopeConsoleSession;
import org.apache.syncope.common.lib.to.ExecTO;
import org.apache.syncope.common.lib.to.ReportTO;
import org.apache.syncope.common.lib.types.ReportExecExportFormat;
@@ -69,7 +68,7 @@ public class ReportRestClient extends BaseRestClient implements ExecutionRestCli
@Override
public List<ExecTO> listRecentExecutions(final int max) {
- return SyncopeConsoleSession.get().getService(ReportService.class).listRecentExecutions(max);
+ return getService(ReportService.class).listRecentExecutions(max);
}
public Response exportExecutionResult(final long executionId, final ReportExecExportFormat fmt) {
http://git-wip-us.apache.org/repos/asf/syncope/blob/93cf2296/client/console/src/main/java/org/apache/syncope/client/console/rest/TaskRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/TaskRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/TaskRestClient.java
index 95c5456..e21b63b 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/rest/TaskRestClient.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/TaskRestClient.java
@@ -20,7 +20,6 @@ package org.apache.syncope.client.console.rest;
import java.util.Date;
import java.util.List;
-import org.apache.syncope.client.console.SyncopeConsoleSession;
import org.apache.syncope.common.lib.to.AbstractTaskTO;
import org.apache.syncope.common.lib.to.BulkAction;
import org.apache.syncope.common.lib.to.BulkActionResult;
@@ -30,6 +29,7 @@ import org.apache.syncope.common.lib.to.PushTaskTO;
import org.apache.syncope.common.lib.to.SchedTaskTO;
import org.apache.syncope.common.lib.to.PullTaskTO;
import org.apache.syncope.common.lib.to.ExecTO;
+import org.apache.syncope.common.lib.types.AnyTypeKind;
import org.apache.syncope.common.lib.types.TaskType;
import org.apache.syncope.common.rest.api.beans.ExecuteQuery;
import org.apache.syncope.common.rest.api.beans.TaskExecQuery;
@@ -44,25 +44,26 @@ public class TaskRestClient extends BaseRestClient implements ExecutionRestClien
private static final long serialVersionUID = 6284485820911028843L;
- /**
- * Return the number of tasks.
- *
- * @param kind of task (propagation, sched, sync).
- * @return number of stored tasks.
- */
public int count(final TaskType kind) {
- return getService(TaskService.class).
- list(new TaskQuery.Builder().type(kind).page(1).size(1).build()).getTotalCount();
+ return getService(TaskService.class).list(
+ new TaskQuery.Builder().type(kind).page(1).size(1).build()).getTotalCount();
}
public int count(final String resource, final TaskType kind) {
- return getService(TaskService.class).
- list(new TaskQuery.Builder().resource(resource).type(kind).page(1).size(1).build()).getTotalCount();
+ return getService(TaskService.class).list(
+ new TaskQuery.Builder().resource(resource).type(kind).page(1).size(1).
+ build()).getTotalCount();
+ }
+
+ public int count(final AnyTypeKind anyTypeKind, final Long anyTypeKey, final TaskType kind) {
+ return getService(TaskService.class).list(
+ new TaskQuery.Builder().anyTypeKind(anyTypeKind).anyTypeKey(anyTypeKey).type(kind).page(1).size(1).
+ build()).getTotalCount();
}
- public int countExecutions(final Long taskId) {
+ public int countExecutions(final Long taskKey) {
return getService(TaskService.class).
- listExecutions(new TaskExecQuery.Builder().key(taskId).page(1).size(1).build()).getTotalCount();
+ listExecutions(new TaskExecQuery.Builder().key(taskKey).page(1).size(1).build()).getTotalCount();
}
public List<PropagationTaskTO> listPropagationTasks(
@@ -76,6 +77,18 @@ public class TaskRestClient extends BaseRestClient implements ExecutionRestClien
getResult();
}
+ public List<PropagationTaskTO> listPropagationTasks(
+ final AnyTypeKind anyTypeKind, final Long anyTypeKey,
+ final int page, final int size, final SortParam<String> sort) {
+
+ return getService(TaskService.class).
+ <PropagationTaskTO>list(new TaskQuery.Builder().type(TaskType.PROPAGATION).
+ anyTypeKind(anyTypeKind).anyTypeKey(anyTypeKey).
+ page(page).size(size).
+ orderBy(toOrderBy(sort)).build()).
+ getResult();
+ }
+
@SuppressWarnings("unchecked")
public <T extends AbstractTaskTO> List<T> list(
final Class<T> reference, final int page, final int size, final SortParam<String> sort) {
@@ -154,7 +167,7 @@ public class TaskRestClient extends BaseRestClient implements ExecutionRestClien
@Override
public List<ExecTO> listRecentExecutions(final int max) {
- return SyncopeConsoleSession.get().getService(TaskService.class).listRecentExecutions(max);
+ return getService(TaskService.class).listRecentExecutions(max);
}
public void create(final SchedTaskTO taskTO) {
http://git-wip-us.apache.org/repos/asf/syncope/blob/93cf2296/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 b26d31b..95069a26 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
@@ -116,10 +116,10 @@ public class UserRestClient extends AbstractAnyRestClient<UserTO> {
return getService(ResourceService.class).readConnObject(resourceName, AnyTypeKind.USER.name(), id);
}
- public ProvisioningResult<UserTO> mustChangePassword(final String etag, final Long key) {
+ public ProvisioningResult<UserTO> mustChangePassword(final String etag, final boolean value, final Long key) {
final UserPatch userPatch = new UserPatch();
userPatch.setKey(key);
- userPatch.setMustChangePassword(new BooleanReplacePatchItem.Builder().value(true).build());
+ userPatch.setMustChangePassword(new BooleanReplacePatchItem.Builder().value(value).build());
return update(etag, userPatch);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/93cf2296/client/console/src/main/java/org/apache/syncope/client/console/tasks/AbstractPropagationTasks.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/tasks/AbstractPropagationTasks.java b/client/console/src/main/java/org/apache/syncope/client/console/tasks/AbstractPropagationTasks.java
new file mode 100644
index 0000000..e59c8f2
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/tasks/AbstractPropagationTasks.java
@@ -0,0 +1,29 @@
+/*
+ * 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.client.console.tasks;
+
+public abstract class AbstractPropagationTasks extends AbstractTasks {
+
+ private static final long serialVersionUID = -2138947447603621523L;
+
+ public AbstractPropagationTasks(final String id) {
+ super(id);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/93cf2296/client/console/src/main/java/org/apache/syncope/client/console/tasks/AnyPropagationTaskDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/tasks/AnyPropagationTaskDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/tasks/AnyPropagationTaskDirectoryPanel.java
new file mode 100644
index 0000000..c8ea264
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/tasks/AnyPropagationTaskDirectoryPanel.java
@@ -0,0 +1,79 @@
+/*
+ * 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.client.console.tasks;
+
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import org.apache.syncope.client.console.panels.MultilevelPanel;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
+import org.apache.syncope.common.lib.to.PropagationTaskTO;
+import org.apache.syncope.common.lib.types.AnyTypeKind;
+import org.apache.wicket.PageReference;
+
+public abstract class AnyPropagationTaskDirectoryPanel extends PropagationTaskDirectoryPanel {
+
+ private static final long serialVersionUID = -6784307338127527803L;
+
+ private final AnyTypeKind anyTypeKind;
+
+ private final Long anyTypeKey;
+
+ protected AnyPropagationTaskDirectoryPanel(
+ final BaseModal<?> baseModal,
+ final MultilevelPanel multiLevelPanelRef,
+ final AnyTypeKind anyTypeKind,
+ final Long anyTypeKey,
+ final PageReference pageRef) {
+
+ super(baseModal, multiLevelPanelRef, null, pageRef);
+ this.anyTypeKind = anyTypeKind;
+ this.anyTypeKey = anyTypeKey;
+ }
+
+ @Override
+ protected PropagationTasksProvider dataProvider() {
+ return new AnyPropagationTasksProvider(rows);
+ }
+
+ protected class AnyPropagationTasksProvider extends PropagationTasksProvider {
+
+ private static final long serialVersionUID = 8975514657807398110L;
+
+ public AnyPropagationTasksProvider(final int paginatorRows) {
+ super(paginatorRows);
+ }
+
+ @Override
+ public long size() {
+ return restClient.count(anyTypeKind, anyTypeKey, taskType);
+ }
+
+ @Override
+ public Iterator<PropagationTaskTO> iterator(final long first, final long count) {
+ final int page = ((int) first / paginatorRows);
+
+ final List<PropagationTaskTO> tasks = restClient.listPropagationTasks(
+ anyTypeKind, anyTypeKey, (page < 0 ? 0 : page) + 1, paginatorRows, getSort());
+
+ Collections.sort(tasks, getComparator());
+ return tasks.iterator();
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/93cf2296/client/console/src/main/java/org/apache/syncope/client/console/tasks/AnyPropagationTasks.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/tasks/AnyPropagationTasks.java b/client/console/src/main/java/org/apache/syncope/client/console/tasks/AnyPropagationTasks.java
new file mode 100644
index 0000000..d59ee81
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/tasks/AnyPropagationTasks.java
@@ -0,0 +1,58 @@
+/*
+ * 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.client.console.tasks;
+
+import org.apache.syncope.client.console.panels.MultilevelPanel;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
+import org.apache.syncope.common.lib.to.AnyTO;
+import org.apache.syncope.common.lib.to.PropagationTaskTO;
+import org.apache.syncope.common.lib.types.AnyTypeKind;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.StringResourceModel;
+
+public class AnyPropagationTasks extends AbstractPropagationTasks {
+
+ private static final long serialVersionUID = -4013796607157549641L;
+
+ public <T extends AnyTO> AnyPropagationTasks(
+ final BaseModal<?> baseModal,
+ final AnyTypeKind anyTypeKind,
+ final Long anyTypeKey,
+ final PageReference pageReference) {
+
+ super(BaseModal.CONTENT_ID);
+
+ final MultilevelPanel mlp = new MultilevelPanel("tasks");
+ mlp.setFirstLevel(new AnyPropagationTaskDirectoryPanel(baseModal, mlp, anyTypeKind, anyTypeKey, pageReference) {
+
+ private static final long serialVersionUID = -2195387360323687302L;
+
+ @Override
+ protected void viewTask(final PropagationTaskTO taskTO, final AjaxRequestTarget target) {
+ mlp.next(
+ new StringResourceModel("task.view", this, new Model<>(taskTO)).getObject(),
+ new TaskExecutionDetails<>(baseModal, taskTO, pageReference),
+ target);
+ }
+ });
+ add(mlp);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/93cf2296/client/console/src/main/java/org/apache/syncope/client/console/tasks/PropagationTaskDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/tasks/PropagationTaskDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/tasks/PropagationTaskDirectoryPanel.java
index 12a2523..eff8620 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/tasks/PropagationTaskDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/tasks/PropagationTaskDirectoryPanel.java
@@ -192,7 +192,7 @@ public abstract class PropagationTaskDirectoryPanel
@Override
protected PropagationTasksProvider dataProvider() {
- return new PropagationTasksProvider(rows, this.resource);
+ return new PropagationTasksProvider(rows);
}
@Override
@@ -200,15 +200,12 @@ public abstract class PropagationTaskDirectoryPanel
return Constants.PREF_PROPAGATION_TASKS_PAGINATOR_ROWS;
}
- public class PropagationTasksProvider extends TaskDataProvider<PropagationTaskTO> {
+ protected class PropagationTasksProvider extends TaskDataProvider<PropagationTaskTO> {
private static final long serialVersionUID = 4725679400450513556L;
- private final String resource;
-
- public PropagationTasksProvider(final int paginatorRows, final String resource) {
+ public PropagationTasksProvider(final int paginatorRows) {
super(paginatorRows, TaskType.PROPAGATION, restClient);
- this.resource = resource;
}
@Override
http://git-wip-us.apache.org/repos/asf/syncope/blob/93cf2296/client/console/src/main/java/org/apache/syncope/client/console/tasks/PropagationTasks.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/tasks/PropagationTasks.java b/client/console/src/main/java/org/apache/syncope/client/console/tasks/PropagationTasks.java
index c49bdf3..25e6741 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/tasks/PropagationTasks.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/tasks/PropagationTasks.java
@@ -24,26 +24,33 @@ import org.apache.syncope.common.lib.to.AnyTO;
import org.apache.syncope.common.lib.to.PropagationTaskTO;
import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.StringResourceModel;
-public class PropagationTasks extends AbstractTasks {
+public class PropagationTasks extends AbstractPropagationTasks {
private static final long serialVersionUID = -4013796607157549641L;
public <T extends AnyTO> PropagationTasks(
- final BaseModal<?> baseModal, final PageReference pageReference, final String resource) {
+ final BaseModal<?> baseModal,
+ final String resource,
+ final PageReference pageReference) {
+
super(BaseModal.CONTENT_ID);
final MultilevelPanel mlp = new MultilevelPanel("tasks");
- add(mlp);
-
mlp.setFirstLevel(new PropagationTaskDirectoryPanel(baseModal, mlp, resource, pageReference) {
private static final long serialVersionUID = -2195387360323687302L;
@Override
protected void viewTask(final PropagationTaskTO taskTO, final AjaxRequestTarget target) {
- mlp.next("task.view", new TaskExecutionDetails<>(baseModal, taskTO, pageReference), target);
+ mlp.next(
+ new StringResourceModel("task.view", this, new Model<>(taskTO)).getObject(),
+ new TaskExecutionDetails<>(baseModal, taskTO, pageReference),
+ target);
}
});
+ add(mlp);
}
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/93cf2296/client/console/src/main/java/org/apache/syncope/client/console/tasks/ProvisioningTaskDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/tasks/ProvisioningTaskDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/tasks/ProvisioningTaskDirectoryPanel.java
index a42a22d..0d8538f 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/tasks/ProvisioningTaskDirectoryPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/tasks/ProvisioningTaskDirectoryPanel.java
@@ -98,7 +98,7 @@ public abstract class ProvisioningTaskDirectoryPanel<T extends AbstractProvision
return columns;
}
- public class ProvisioningTasksProvider<T extends AbstractProvisioningTaskTO> extends SchedTasksProvider<T> {
+ protected class ProvisioningTasksProvider<T extends AbstractProvisioningTaskTO> extends SchedTasksProvider<T> {
private static final long serialVersionUID = 4725679400450513556L;
@@ -111,7 +111,7 @@ public abstract class ProvisioningTaskDirectoryPanel<T extends AbstractProvision
@Override
public long size() {
- return restClient.count(resource, id);
+ return restClient.count(resource, taskType);
}
@Override
http://git-wip-us.apache.org/repos/asf/syncope/blob/93cf2296/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyTogglePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyTogglePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyTogglePanel.java
index 22ec34b..92c384b 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyTogglePanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyTogglePanel.java
@@ -302,7 +302,7 @@ public class TopologyTogglePanel extends TogglePanel<Serializable> {
@Override
@SuppressWarnings("unchecked")
public void onClick(final AjaxRequestTarget target) {
- target.add(taskModal.setContent(new PropagationTasks(taskModal, pageRef, node.getKey().toString())));
+ target.add(taskModal.setContent(new PropagationTasks(taskModal, node.getKey().toString(), pageRef)));
taskModal.header(new ResourceModel("task.propagation.list", "Propagation tasks"));
taskModal.show(true);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/93cf2296/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLink.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLink.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLink.java
index ed30b69..8243d22 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLink.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLink.java
@@ -46,8 +46,6 @@ public abstract class ActionLink<T extends Serializable> implements Serializable
CLONE("create"),
CREATE("create"),
EDIT("read"),
- USER_TEMPLATE("read"),
- GROUP_TEMPLATE("read"),
RESET("update"),
ENABLE("update"),
NOT_FOND("read"),
@@ -73,6 +71,7 @@ public abstract class ActionLink<T extends Serializable> implements Serializable
MANAGE_RESOURCES("update"),
MANAGE_USERS("update"),
MANAGE_GROUPS("update"),
+ PROPAGATION_TASKS("read"),
ZOOM_IN("zoomin"),
ZOOM_OUT("zoomout");
http://git-wip-us.apache.org/repos/asf/syncope/blob/93cf2296/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksPanel.java
index 4040bf6..5474291 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLinksPanel.java
@@ -62,8 +62,6 @@ public final class ActionLinksPanel<T extends Serializable> extends Panel {
super.add(new Fragment("panelCreate", "emptyFragment", this));
super.add(new Fragment("panelEdit", "emptyFragment", this));
super.add(new Fragment("panelReset", "emptyFragment", this));
- super.add(new Fragment("panelUserTemplate", "emptyFragment", this));
- super.add(new Fragment("panelGroupTemplate", "emptyFragment", this));
super.add(new Fragment("panelEnable", "emptyFragment", this));
super.add(new Fragment("panelNotFound", "emptyFragment", this));
super.add(new Fragment("panelView", "emptyFragment", this));
@@ -84,6 +82,7 @@ public final class ActionLinksPanel<T extends Serializable> extends Panel {
super.add(new Fragment("panelAssign", "emptyFragment", this));
super.add(new Fragment("panelDeprovision", "emptyFragment", this));
super.add(new Fragment("panelProvision", "emptyFragment", this));
+ super.add(new Fragment("panelPropagationTasks", "emptyFragment", this));
super.add(new Fragment("panelZoomIn", "emptyFragment", this));
super.add(new Fragment("panelZoomOut", "emptyFragment", this));
}
@@ -307,44 +306,6 @@ public final class ActionLinksPanel<T extends Serializable> extends Panel {
}.setVisible(link.isEnabled(model.getObject())));
break;
- case USER_TEMPLATE:
- fragment = new Fragment("panelUserTemplate", "fragmentUserTemplate", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("userTemplateLink") {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
- case GROUP_TEMPLATE:
- fragment = new Fragment("panelGroupTemplate", "fragmentGroupTemplate", this);
-
- fragment.addOrReplace(new IndicatingAjaxLink<Void>("groupTemplateLink") {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- link.onClick(target, model.getObject());
- }
-
- @Override
- public String getAjaxIndicatorMarkupId() {
- return disableIndicator ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
- }
- }.setVisible(link.isEnabled(model.getObject())));
- break;
-
case ENABLE:
fragment = new Fragment("panelEnable", "fragmentEnable", this);
@@ -699,7 +660,26 @@ public final class ActionLinksPanel<T extends Serializable> extends Panel {
fragment.addOrReplace(new IndicatingAjaxLink<Void>("provisionLink") {
- private static final long serialVersionUID = -6957616042924610305L;
+ private static final long serialVersionUID = -1876519166660008562L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ link.onClick(target, model.getObject());
+ }
+
+ @Override
+ public String getAjaxIndicatorMarkupId() {
+ return disableIndicator ? StringUtils.EMPTY : super.getAjaxIndicatorMarkupId();
+ }
+ }.setVisible(link.isEnabled(model.getObject())));
+ break;
+
+ case PROPAGATION_TASKS:
+ fragment = new Fragment("panelPropagationTasks", "fragmentPropagationTasks", this);
+
+ fragment.addOrReplace(new IndicatingAjaxLink<Void>("propagationTasksLink") {
+
+ private static final long serialVersionUID = -1876519166660008562L;
@Override
public void onClick(final AjaxRequestTarget target) {
@@ -808,10 +788,6 @@ public final class ActionLinksPanel<T extends Serializable> extends Panel {
super.addOrReplace(new Fragment("panelEdit", "emptyFragment", this));
break;
- case USER_TEMPLATE:
- super.addOrReplace(new Fragment("panelUserTemplate", "emptyFragment", this));
- break;
-
case VIEW:
super.addOrReplace(new Fragment("panelView", "emptyFragment", this));
break;
@@ -883,12 +859,15 @@ public final class ActionLinksPanel<T extends Serializable> extends Panel {
case PROVISION:
super.addOrReplace(new Fragment("panelProvision", "emptyFragment", this));
break;
+
case ZOOM_IN:
super.addOrReplace(new Fragment("panelZoomIn", "emptyFragment", this));
break;
+
case ZOOM_OUT:
super.addOrReplace(new Fragment("panelZoomOut", "emptyFragment", this));
break;
+
default:
// do nothing
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/93cf2296/client/console/src/main/java/org/apache/syncope/client/console/wizards/WizardMgtPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/WizardMgtPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/WizardMgtPanel.java
index dbb99bc..e8bc981 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/WizardMgtPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/WizardMgtPanel.java
@@ -44,7 +44,7 @@ import org.apache.wicket.model.StringResourceModel;
public abstract class WizardMgtPanel<T extends Serializable> extends Panel implements IEventSource {
- private static final long serialVersionUID = 1L;
+ private static final long serialVersionUID = -4152438633429194882L;
private final WebMarkupContainer container;
@@ -64,12 +64,9 @@ public abstract class WizardMgtPanel<T extends Serializable> extends Panel imple
protected boolean showResultPage = false;
- /**
- * Modal window.
- */
protected final BaseModal<T> modal = new BaseModal<T>("modal") {
- private static final long serialVersionUID = 1L;
+ private static final long serialVersionUID = 389935548143327858L;
@Override
protected void onConfigure() {
@@ -79,13 +76,12 @@ public abstract class WizardMgtPanel<T extends Serializable> extends Panel imple
};
- /**
- * Modal window.
- */
protected final BaseModal<T> altDefaultModal = new BaseModal<>("alternativeDefaultModal");
protected final BaseModal<T> displayAttributeModal = new BaseModal<>("displayAttributeModal");
+ protected final BaseModal<Serializable> utilityModal = new BaseModal<>("utilityModal");
+
protected WizardMgtPanel(final String id) {
this(id, false);
}
@@ -99,6 +95,7 @@ public abstract class WizardMgtPanel<T extends Serializable> extends Panel imple
super.add(modal);
super.add(altDefaultModal);
super.add(displayAttributeModal);
+ super.add(utilityModal);
container = new WebMarkupContainer("container");
container.setOutputMarkupPlaceholderTag(true).setOutputMarkupId(true);
http://git-wip-us.apache.org/repos/asf/syncope/blob/93cf2296/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Relationships.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Relationships.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Relationships.java
index fb1494f..e6c9c89 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Relationships.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Relationships.java
@@ -45,6 +45,7 @@ import org.apache.syncope.client.console.rest.AnyTypeRestClient;
import org.apache.syncope.client.console.wicket.ajax.form.IndicatorAjaxFormComponentUpdatingBehavior;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.tabs.Accordion;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink.ActionType;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
import org.apache.syncope.client.console.wizards.WizardMgtPanel;
@@ -134,8 +135,7 @@ public class Relationships extends WizardStep {
removeRelationships(relationships, modelObject);
send(Relationships.this, Broadcast.DEPTH, new ListViewReload(target));
}
- }, ActionLink.ActionType.DELETE,
- String.format("%s_%s", anyTO.getType(), AnyEntitlement.UPDATE)).
+ }, ActionType.DELETE, AnyEntitlement.UPDATE.getFor(anyTO.getType())).
build(panelId);
}
};
@@ -165,7 +165,7 @@ public class Relationships extends WizardStep {
addFragment.add(new Specification().setRenderBodyOnly(true));
target.add(Relationships.this);
}
- }, ActionLink.ActionType.CREATE, String.format("%s_%s", anyTO.getType(), AnyEntitlement.UPDATE)).
+ }, ActionType.CREATE, AnyEntitlement.UPDATE.getFor(anyTO.getType())).
build("actions"));
return viewFragment;
http://git-wip-us.apache.org/repos/asf/syncope/blob/93cf2296/client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css b/client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css
index 44a5086..cc1a8ea 100644
--- a/client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css
+++ b/client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css
@@ -297,7 +297,7 @@ span.overridable div.checkbox label div div.toggle-group label {
padding-left: 7px;
}
-div#outer.modal-lg {
+div#outer.modal-lg, div#utilityModal.modal-lg {
width: 1200px;
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/93cf2296/client/console/src/main/resources/org/apache/syncope/client/console/bulk/BulkActionModal.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/bulk/BulkActionModal.properties b/client/console/src/main/resources/org/apache/syncope/client/console/bulk/BulkActionModal.properties
deleted file mode 100644
index 44780b6..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/bulk/BulkActionModal.properties
+++ /dev/null
@@ -1,18 +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.
-bulk.action=Bulk action
-close=Close