You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by fm...@apache.org on 2015/10/30 12:42:08 UTC
[01/28] syncope git commit: [SYNCOPE-156] fix for ajax component
panels
Repository: syncope
Updated Branches:
refs/heads/master 11ce3630a -> c8ebb3479
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxTextFieldPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxTextFieldPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxTextFieldPanel.java
index f42b67f..08de6f8 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxTextFieldPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxTextFieldPanel.java
@@ -70,7 +70,7 @@ public class AjaxTextFieldPanel extends FieldPanel<String> implements Cloneable
return result.iterator();
}
};
-
+
add(field.setLabel(new ResourceModel(name, name)).setOutputMarkupId(true));
if (enableOnChange && !isReadOnly()) {
@@ -84,7 +84,7 @@ public class AjaxTextFieldPanel extends FieldPanel<String> implements Cloneable
}
});
}
-
+
add(new Label("label", new ResourceModel(name, name)));
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/CheckBoxMultipleChoiceFieldPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/CheckBoxMultipleChoiceFieldPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/CheckBoxMultipleChoiceFieldPanel.java
index dc7bfec..9d0afea 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/CheckBoxMultipleChoiceFieldPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/CheckBoxMultipleChoiceFieldPanel.java
@@ -35,7 +35,7 @@ public class CheckBoxMultipleChoiceFieldPanel<E> extends AbstractFieldPanel<List
public CheckBoxMultipleChoiceFieldPanel(
final String id, final IModel<List<E>> model, final IModel<List<E>> choices) {
- super(id, model);
+ super(id, id, model);
field = new CheckBoxMultipleChoice<E>("checkBoxMultipleChoice", model, choices);
add(field.
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/FieldPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/FieldPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/FieldPanel.java
index 3a48d38..5bf1cdc 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/FieldPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/FieldPanel.java
@@ -31,7 +31,7 @@ import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.ResourceModel;
-public abstract class FieldPanel<T> extends AbstractFieldPanel<T> implements Cloneable {
+public abstract class FieldPanel<T extends Serializable> extends AbstractFieldPanel<T> implements Cloneable {
private static final long serialVersionUID = -198988924922541273L;
@@ -42,12 +42,14 @@ public abstract class FieldPanel<T> extends AbstractFieldPanel<T> implements Clo
protected boolean isRequiredLabelAdded = false;
public FieldPanel(final String id, final IModel<T> model) {
- super(id, model);
+ this(id, id, model);
+ }
+
+ public FieldPanel(final String id, final String name, final IModel<T> model) {
+ super(id, name, model);
final Fragment fragment = new Fragment("required", "notRequiredFragment", this);
add(fragment);
-
- setOutputMarkupId(true);
}
public FormComponent<T> getField() {
@@ -97,9 +99,7 @@ public abstract class FieldPanel<T> extends AbstractFieldPanel<T> implements Clo
}
final Fragment fragment = new Fragment("required", "requiredFragment", this);
-
fragment.add(new Label("requiredLabel", "*"));
-
replace(fragment);
this.isRequiredLabelAdded = true;
@@ -128,11 +128,11 @@ public abstract class FieldPanel<T> extends AbstractFieldPanel<T> implements Clo
}
public T getModelObject() {
- return field.getModelObject();
+ return this.field.getModelObject();
}
public FieldPanel<T> setNewModel(final IModel<T> model) {
- field.setModel(model);
+ field.setModel(model == null ? new Model<T>() : model);
return this;
}
@@ -196,6 +196,7 @@ public abstract class FieldPanel<T> extends AbstractFieldPanel<T> implements Clo
public FieldPanel<T> clone() {
final FieldPanel<T> panel = SerializationUtils.clone(this);
panel.setModelObject(null);
+ panel.addLabel();
return panel;
}
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.java
index f35321f..ccffd20 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.java
@@ -18,6 +18,7 @@
*/
package org.apache.syncope.client.console.wicket.markup.html.form;
+import java.io.Serializable;
import java.util.List;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.wicket.ajax.AjaxRequestTarget;
@@ -26,27 +27,41 @@ import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.event.Broadcast;
import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxLink;
import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.ListView;
import org.apache.wicket.markup.html.panel.Fragment;
import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.ResourceModel;
-public class MultiFieldPanel<E> extends AbstractFieldPanel<List<E>> {
+public class MultiFieldPanel<E extends Serializable> extends AbstractFieldPanel<List<E>> {
private static final long serialVersionUID = -6322397761456513324L;
private ListView<E> view;
+ private final FieldPanel<E> panelTemplate;
+
+ private final boolean eventTemplate;
+
private WebMarkupContainer container;
- public MultiFieldPanel(final String id, final IModel<List<E>> model, final FieldPanel<E> panelTemplate) {
- this(id, model, panelTemplate, false);
+ public MultiFieldPanel(
+ final String id, final String name, final IModel<List<E>> model, final FieldPanel<E> panelTemplate) {
+ this(id, name, model, panelTemplate, false);
}
- public MultiFieldPanel(final String id, final IModel<List<E>> model, final FieldPanel<E> panelTemplate,
+ public MultiFieldPanel(
+ final String id,
+ final String name,
+ final IModel<List<E>> model,
+ final FieldPanel<E> panelTemplate,
final boolean eventTemplate) {
- super(id, model);
+ super(id, name, model);
+
+ this.panelTemplate = panelTemplate;
+ this.eventTemplate = eventTemplate;
// -----------------------
// Object container definition
@@ -56,12 +71,30 @@ public class MultiFieldPanel<E> extends AbstractFieldPanel<List<E>> {
add(container);
// -----------------------
+ if (model.getObject().isEmpty()) {
+ container.add(getNoDataFragment(model, name));
+ } else {
+ container.addOrReplace(getDataFragment(model, name));
+ }
+ }
+
+ private Fragment getNoDataFragment(final IModel<List<E>> model, final String label) {
+ final Fragment fragment = new Fragment("content", "noDataFragment", MultiFieldPanel.this);
+ fragment.add(new Label("field-label", new ResourceModel(label, label)));
+ fragment.add(getPlusFragment(model, label));
+ return fragment;
+ }
+
+ private Fragment getDataFragment(final IModel<List<E>> model, final String label) {
+ final Fragment contentFragment = new Fragment("content", "dataFragment", MultiFieldPanel.this);
+
view = new ListView<E>("view", model) {
private static final long serialVersionUID = -9180479401817023838L;
@Override
protected void populateItem(final ListItem<E> item) {
+
final FieldPanel<E> fieldPanel = panelTemplate.clone();
if (eventTemplate) {
@@ -86,9 +119,9 @@ public class MultiFieldPanel<E> extends AbstractFieldPanel<List<E>> {
});
fieldPanel.setNewModel(item);
- item.add(fieldPanel);
+ item.add(fieldPanel.hideLabel().setRenderBodyOnly(true));
- AjaxLink<Void> minus = new IndicatingAjaxLink<Void>("drop") {
+ final AjaxLink<Void> minus = new IndicatingAjaxLink<Void>("drop") {
private static final long serialVersionUID = -7978723352517770644L;
@@ -97,6 +130,11 @@ public class MultiFieldPanel<E> extends AbstractFieldPanel<List<E>> {
//Drop current component
model.getObject().remove(item.getModelObject());
fieldPanel.getField().clearInput();
+
+ if (model.getObject().isEmpty()) {
+ container.addOrReplace(getNoDataFragment(model, label));
+ }
+
target.add(container);
if (eventTemplate) {
@@ -107,40 +145,45 @@ public class MultiFieldPanel<E> extends AbstractFieldPanel<List<E>> {
item.add(minus);
- if (model.getObject().size() <= 1) {
- minus.setVisible(false);
- minus.setEnabled(false);
+ final Fragment fragment;
+ if (item.getIndex() == model.getObject().size() - 1) {
+ fragment = getPlusFragment(model, label);
} else {
- minus.setVisible(true);
- minus.setEnabled(true);
+ fragment = new Fragment("panelPlus", "emptyFragment", MultiFieldPanel.this);
}
- final Fragment fragment;
- if (item.getIndex() == model.getObject().size() - 1) {
- final AjaxLink<Void> plus = new IndicatingAjaxLink<Void>("add") {
+ item.add(fragment);
+ }
+ };
- private static final long serialVersionUID = -7978723352517770644L;
+ contentFragment.add(view.setOutputMarkupId(true));
- @Override
- public void onClick(final AjaxRequestTarget target) {
- //Add current component
- model.getObject().add(null);
- target.add(container);
- }
- };
+ return contentFragment;
+ }
- fragment = new Fragment("panelPlus", "fragmentPlus", container);
+ private Fragment getPlusFragment(final IModel<List<E>> model, final String label) {
+ final AjaxLink<Void> plus = new IndicatingAjaxLink<Void>("add") {
- fragment.add(plus);
- } else {
- fragment = new Fragment("panelPlus", "emptyFragment", container);
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ //Add current component
+ model.getObject().add(null);
+
+ if (model.getObject().size() == 1) {
+ container.addOrReplace(getDataFragment(model, label));
}
- item.add(fragment);
+
+ target.add(container);
}
};
- container.add(view.setOutputMarkupId(true));
- setOutputMarkupId(true);
+ final Fragment fragment = new Fragment("panelPlus", "fragmentPlus", MultiFieldPanel.this);
+ fragment.add(plus);
+ fragment.setRenderBodyOnly(true);
+
+ return fragment;
}
public ListView<E> getView() {
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/SpinnerFieldPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/SpinnerFieldPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/SpinnerFieldPanel.java
index 4f71f81..4eb7270 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/SpinnerFieldPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/SpinnerFieldPanel.java
@@ -18,170 +18,72 @@
*/
package org.apache.syncope.client.console.wicket.markup.html.form;
-import java.io.Serializable;
-import java.util.List;
-import java.util.UUID;
-import org.apache.commons.lang3.math.NumberUtils;
-import org.apache.syncope.client.console.commons.Constants;
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
-import org.apache.wicket.markup.html.basic.Label;
-import org.apache.wicket.markup.html.form.TextField;
-import org.apache.wicket.markup.html.list.ListItem;
+import de.agilecoders.wicket.extensions.markup.html.bootstrap.form.spinner.Spinner;
+import de.agilecoders.wicket.extensions.markup.html.bootstrap.form.spinner.SpinnerConfig;
import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.Model;
-import org.springframework.util.StringUtils;
public class SpinnerFieldPanel<T extends Number> extends FieldPanel<T> {
private static final long serialVersionUID = 6413819574530703577L;
- private final String name;
+ private String name;
- private final Class<T> reference;
+ private Class<T> reference;
- private final IModel<T> model;
+ private IModel<T> model;
- private final T min;
+ private SpinnerConfig conf;
- private final T max;
-
- @SuppressWarnings("unchecked")
- public SpinnerFieldPanel(final String id, final String name, final Class<T> reference, final IModel<T> model,
+ public SpinnerFieldPanel(
+ final String id,
+ final String name,
+ final Class<T> reference,
+ final IModel<T> model,
final T min, final T max) {
+ super(id, name, model);
- super(id, model);
- this.name = name;
- this.reference = reference;
- this.model = model;
- this.min = min;
- this.max = max;
-
- String uuid = UUID.randomUUID().toString();
- field = new TextField<T>("spinnerField", model, reference);
- field.setMarkupId(uuid);
- add(field.setLabel(new Model<String>(name)));
+ final SpinnerConfig config = new SpinnerConfig();
+ config.withMax(max);
+ config.withMin(min);
- if (!isReadOnly()) {
- field.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+ init(name, reference, model, config);
+ }
- private static final long serialVersionUID = -1107858522700306810L;
+ public SpinnerFieldPanel(
+ final String id,
+ final String name,
+ final Class<T> reference,
+ final IModel<T> model) {
+ this(id, name, reference, model, new SpinnerConfig());
+ }
- @Override
- protected void onUpdate(final AjaxRequestTarget target) {
- // nothing to do
- }
- });
- }
+ public SpinnerFieldPanel(
+ final String id,
+ final String name,
+ final Class<T> reference,
+ final IModel<T> model,
+ final SpinnerConfig conf) {
- final StringBuilder statements = new StringBuilder();
- statements.append("jQuery(function() {").
- append("var spinner = $('#").append(uuid).append("').spinner();").
- append("$('#").append(uuid).append("').spinner(").
- append("'option', 'stop', function(event, ui) { $(this).change(); });");
- if (this.min != null) {
- statements.
- append("$('#").append(uuid).append("').spinner(").
- append("'option', 'min', ").append(this.min).append(");");
- }
- if (this.max != null) {
- statements.
- append("$('#").append(uuid).append("').spinner(").
- append("'option', 'max', ").append(this.max).append(");");
- }
- statements.append("});");
- Label spinnerFieldJS = new Label("spinnerFieldJS", statements.toString());
- spinnerFieldJS.setEscapeModelStrings(false);
- add(spinnerFieldJS);
+ super(id, name, model);
+ init(name, reference, model, conf);
}
- @Override
- public SpinnerFieldPanel<T> setNewModel(final List<Serializable> list) {
- setNewModel(new Model<T>() {
-
- private static final long serialVersionUID = 527651414610325237L;
-
- @Override
- public T getObject() {
- T value = null;
-
- if (list != null && !list.isEmpty() && StringUtils.hasText(list.get(0).toString())) {
- value = reference.equals(Integer.class)
- ? reference.cast(NumberUtils.toInt(list.get(0).toString()))
- : reference.equals(Long.class)
- ? reference.cast(NumberUtils.toLong(list.get(0).toString()))
- : reference.equals(Short.class)
- ? reference.cast(NumberUtils.toShort(list.get(0).toString()))
- : reference.equals(Float.class)
- ? reference.cast(NumberUtils.toFloat(list.get(0).toString()))
- : reference.equals(byte.class)
- ? reference.cast(NumberUtils.toByte(list.get(0).toString()))
- : reference.cast(NumberUtils.toDouble(list.get(0).toString()));
- }
-
- return value;
- }
-
- @Override
- public void setObject(final T object) {
- list.clear();
- if (object != null) {
- list.add(object.toString());
- }
- }
- });
-
- return this;
- }
+ private void init(final String name, final Class<T> reference, final IModel<T> model, final SpinnerConfig conf) {
+ final Spinner<T> spinner = new Spinner<>("spinner", model, conf);
+ add(spinner);
- @SuppressWarnings("rawtypes")
- @Override
- public SpinnerFieldPanel<T> setNewModel(final ListItem item) {
- field.setModel(new Model<T>() {
-
- private static final long serialVersionUID = 6799404673615637845L;
-
- @Override
- public T getObject() {
- T number = null;
-
- final Object obj = item.getModelObject();
-
- if (obj != null && !obj.toString().isEmpty()) {
- if (obj instanceof String) {
- number = reference.equals(Integer.class)
- ? reference.cast(Integer.valueOf((String) obj))
- : reference.equals(Long.class)
- ? reference.cast(Long.valueOf((String) obj))
- : reference.equals(Short.class)
- ? reference.cast(Short.valueOf((String) obj))
- : reference.equals(Float.class)
- ? reference.cast(Float.valueOf((String) obj))
- : reference.equals(byte.class)
- ? reference.cast(Byte.valueOf((String) obj))
- : reference.cast(Double.valueOf((String) obj));
- } else if (obj instanceof Number) {
- // Don't parse anything
- number = reference.cast(obj);
- }
- }
-
- return number;
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public void setObject(final T object) {
- item.setModelObject(object == null ? null : object.toString());
- }
- });
-
- return this;
+ this.name = name;
+ this.model = model;
+ this.conf = conf;
+ this.reference = reference;
+
+ this.conf.withMouseWheel(true);
+ this.conf.withVerticalbuttons(true);
}
@Override
public SpinnerFieldPanel<T> clone() {
- SpinnerFieldPanel<T> panel = new SpinnerFieldPanel<T>(getId(), name, reference, model, min, max);
+ SpinnerFieldPanel<T> panel = new SpinnerFieldPanel<T>(getId(), name, reference, model, conf);
panel.setRequired(isRequired());
panel.setReadOnly(isReadOnly());
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/ConnConfPropertyListView.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/ConnConfPropertyListView.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/ConnConfPropertyListView.java
index 3fef056..d7dddec 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/ConnConfPropertyListView.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/ConnConfPropertyListView.java
@@ -85,8 +85,8 @@ public class ConnConfPropertyListView extends AltListView<ConnConfProperty> {
} else {
Class<?> propertySchemaClass;
try {
- propertySchemaClass =
- ClassUtils.forName(property.getSchema().getType(), ClassUtils.getDefaultClassLoader());
+ propertySchemaClass = ClassUtils.forName(property.getSchema().getType(), ClassUtils.
+ getDefaultClassLoader());
if (ClassUtils.isPrimitiveOrWrapper(propertySchemaClass)) {
propertySchemaClass = org.apache.commons.lang3.ClassUtils.primitiveToWrapper(propertySchemaClass);
}
@@ -128,7 +128,7 @@ public class ConnConfPropertyListView extends AltListView<ConnConfProperty> {
property.getValues().add(null);
}
- final MultiFieldPanel multiFieldPanel = new MultiFieldPanel("panel",
+ final MultiFieldPanel multiFieldPanel = new MultiFieldPanel("panel", "connPropAttrSchema",
new PropertyModel<List<String>>(property, "values"), field);
item.add(multiFieldPanel);
} else {
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/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 fcdc8db..039f845 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
@@ -191,7 +191,10 @@ div.basepage-content{
}
.modal-content {
- overflow: hidden;
+ max-height: 600px;
+ max-width: 1240px;
+ overflow-x: hidden;
+ overflow-y: auto;
}
.modal-open .modal {
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/resources/org/apache/syncope/client/console/pages/Login.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Login.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Login.html
index ce13f8f..ed5aae3 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Login.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Login.html
@@ -32,7 +32,6 @@ under the License.
<link href="webjars/ionicons/${ionicons.version}/css/ionicons.min.css" rel="stylesheet" type="text/css" />
<link href="css/login.css" rel="stylesheet" type="text/css" />
<link href="css/syncopeConsole.css" rel="stylesheet" type="text/css" />
- <script type="text/javascript" src="webjars/bootstrap-select/${bootstrap-select.version}/js/bootstrap-select.min.js"></script>
</head>
<body class="skin-green">
<div class="container">
@@ -42,23 +41,21 @@ under the License.
<div wicket:id="feedback" role="alert"/>
<form class="form-signin" wicket:id="login">
- <input type="text" wicket:id="username" id="username" class="form-control"
- wicket:message="placeholder:username" required="required" autofocus="autofocus" />
- <input type="password" wicket:id="password" id="password" class="form-control"
- wicket:message="placeholder:password" required="required" />
- <select wicket:id="language" id="language" class="selectpicker"/>
- <select wicket:id="domain" id="domain" class="selectpicker"/>
- <button wicket:id="submit" type="submit"
- class="btn btn-lg btn-primary btn-block btn-signin"><wicket:message key="submit"/></button>
+ <fieldset class="form-group input-group">
+ <input type="text" wicket:id="username" class="form-control"
+ wicket:message="placeholder:username" required="required" autofocus="autofocus" />
+ <input type="password" wicket:id="password" class="form-control"
+ wicket:message="placeholder:password" required="required" />
+
+ <select wicket:id="language"/>
+ <div />
+ <select wicket:id="domain"/>
+
+ <button wicket:id="submit" type="submit"
+ class="btn btn-lg btn-primary btn-block btn-signin"><wicket:message key="submit"/></button>
+ </fieldset>
</form>
</div>
</div>
-
- <script type="text/javascript">
- $('.selectpicker').selectpicker({
- width: '100%'
- });
- </script>
-
</body>
</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnectorModal.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnectorModal.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnectorModal.html
index a07a8dc..2580a91 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnectorModal.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnectorModal.html
@@ -18,137 +18,130 @@ under the License.
-->
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
<wicket:extend>
- <form wicket:id="form">
- <div class="tabbable tabs-left">
- <ul class="nav nav-tabs">
- <li class="active"><a data-toggle="tab" href="#tabs-1"><span><wicket:message key="tab1"/></span></a></li>
- <li><a data-toggle="tab" href="#tabs-2"><span><wicket:message key="tab2"/></span></a></li>
- <li><a data-toggle="tab" href="#tabs-3"><span><wicket:message key="tab3"/></span></a></li>
- </ul>
- <div class="tab-content">
- <div id="tabs-1" class="tab-pane active">
- <div id="formtable">
- <div class="tablerow alt">
- <div class="tablecolumn_label short_dynamicsize">
- <label for="displayName"><wicket:message key="displayName"/></label>
- </div>
- <div class="tablecolumn_field short_dynamicsize">
- <span wicket:id="displayName">[displayName]</span>
- </div>
+ <div class="tabbable tabs-left">
+ <ul class="nav nav-tabs">
+ <li class="active"><a data-toggle="tab" href="#tabs-1"><span><wicket:message key="tab1"/></span></a></li>
+ <li><a data-toggle="tab" href="#tabs-2"><span><wicket:message key="tab2"/></span></a></li>
+ <li><a data-toggle="tab" href="#tabs-3"><span><wicket:message key="tab3"/></span></a></li>
+ </ul>
+ <div class="tab-content">
+ <div id="tabs-1" class="tab-pane active">
+ <div id="formtable">
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="displayName"><wicket:message key="displayName"/></label>
</div>
+ <div class="tablecolumn_field short_dynamicsize">
+ <span wicket:id="displayName">[displayName]</span>
+ </div>
+ </div>
- <div class="tablerow">
- <div class="tablecolumn_label short_dynamicsize">
- <label for="location"><wicket:message key="location"/></label>
- </div>
- <div class="tablecolumn_field short_dynamicsize">
- <span wicket:id="location">[location]</span>
- </div>
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="location"><wicket:message key="location"/></label>
+ </div>
+ <div class="tablecolumn_field short_dynamicsize">
+ <span wicket:id="location">[location]</span>
</div>
+ </div>
- <div class="tablerow alt">
- <div class="tablecolumn_label short_dynamicsize">
- <label for="name"><wicket:message key="name"/></label>
- </div>
- <div class="tablecolumn_field medium_dynamicsize">
- <span wicket:id="connectorName">[connectorName]</span>
- </div>
+ <div class="tablerow alt">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="name"><wicket:message key="name"/></label>
</div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="connectorName">[connectorName]</span>
+ </div>
+ </div>
- <div class="tablerow">
- <div class="tablecolumn_label short_dynamicsize">
- <label for="version"><wicket:message key="version"/></label>
- </div>
- <div class="tablecolumn_field short_dynamicsize">
- <span wicket:id="version">[version]</span>
- </div>
+ <div class="tablerow">
+ <div class="tablecolumn_label short_dynamicsize">
+ <label for="version"><wicket:message key="version"/></label>
+ </div>
+ <div class="tablecolumn_field short_dynamicsize">
+ <span wicket:id="version">[version]</span>
</div>
</div>
- <div style="display: table; border: 1px solid #BBBBBB;">
- <div class="tablerow2 alt">
- <div class="tablecolumn2_label short_dynamicsize">
- <label for="connRequestTimeout"><wicket:message key="connRequestTimeout"/></label>
- </div>
- <div class="tablecolumn2_field short_dynamicsize">
- <span wicket:id="connRequestTimeout">[connRequestTimeout]</span>
- </div>
- <div class="tablecolumn2_label short_dynamicsize">
- <label for="poolMaxObjects"><wicket:message key="poolMaxObjects"/></label>
- </div>
- <div class="tablecolumn2_field short_dynamicsize">
- <span wicket:id="poolMaxObjects">[poolMaxObjects]</span>
- </div>
+ </div>
+ <div style="display: table; border: 1px solid #BBBBBB;">
+ <div class="tablerow2 alt">
+ <div class="tablecolumn2_label short_dynamicsize">
+ <label for="connRequestTimeout"><wicket:message key="connRequestTimeout"/></label>
</div>
- <div class="tablerow2">
- <div class="tablecolumn2_label short_dynamicsize">
- <label for="poolMinIdle"><wicket:message key="poolMinIdle"/></label>
- </div>
- <div class="tablecolumn2_field short_dynamicsize">
- <span wicket:id="poolMinIdle">[poolMinIdle]</span>
- </div>
- <div class="tablecolumn2_label short_dynamicsize">
- <label for="poolMaxIdle"><wicket:message key="poolMaxIdle"/></label>
- </div>
- <div class="tablecolumn2_field short_dynamicsize">
- <span wicket:id="poolMaxIdle">[poolMaxIdle]</span>
- </div>
+ <div class="tablecolumn2_field short_dynamicsize">
+ <span wicket:id="connRequestTimeout">[connRequestTimeout]</span>
</div>
- <div class="tablerow2 alt">
- <div class="tablecolumn2_label short_dynamicsize">
- <label for="poolMaxWait"><wicket:message key="poolMaxWait"/></label>
- </div>
- <div class="tablecolumn2_field short_dynamicsize">
- <span wicket:id="poolMaxWait">[poolMaxWait]</span>
- </div>
- <div class="tablecolumn2_label short_dynamicsize">
- <label for="poolMinEvictableIdleTime"><wicket:message key="poolMinEvictableIdleTime"/></label>
- </div>
- <div class="tablecolumn2_field short_dynamicsize">
- <span wicket:id="poolMinEvictableIdleTime">[poolMinEvictableIdleTime]</span>
- </div>
+ <div class="tablecolumn2_label short_dynamicsize">
+ <label for="poolMaxObjects"><wicket:message key="poolMaxObjects"/></label>
+ </div>
+ <div class="tablecolumn2_field short_dynamicsize">
+ <span wicket:id="poolMaxObjects">[poolMaxObjects]</span>
+ </div>
+ </div>
+ <div class="tablerow2">
+ <div class="tablecolumn2_label short_dynamicsize">
+ <label for="poolMinIdle"><wicket:message key="poolMinIdle"/></label>
+ </div>
+ <div class="tablecolumn2_field short_dynamicsize">
+ <span wicket:id="poolMinIdle">[poolMinIdle]</span>
+ </div>
+ <div class="tablecolumn2_label short_dynamicsize">
+ <label for="poolMaxIdle"><wicket:message key="poolMaxIdle"/></label>
+ </div>
+ <div class="tablecolumn2_field short_dynamicsize">
+ <span wicket:id="poolMaxIdle">[poolMaxIdle]</span>
+ </div>
+ </div>
+ <div class="tablerow2 alt">
+ <div class="tablecolumn2_label short_dynamicsize">
+ <label for="poolMaxWait"><wicket:message key="poolMaxWait"/></label>
+ </div>
+ <div class="tablecolumn2_field short_dynamicsize">
+ <span wicket:id="poolMaxWait">[poolMaxWait]</span>
+ </div>
+ <div class="tablecolumn2_label short_dynamicsize">
+ <label for="poolMinEvictableIdleTime"><wicket:message key="poolMinEvictableIdleTime"/></label>
+ </div>
+ <div class="tablecolumn2_field short_dynamicsize">
+ <span wicket:id="poolMinEvictableIdleTime">[poolMinEvictableIdleTime]</span>
</div>
</div>
</div>
- <div id="tabs-2" class="tab-pane">
- <div id="formtable">
- <span wicket:id="container">
- <div style="border-bottom: 10px">
- <div style="width: 40px; text-align: center; font-size: 7px">
- <label for="version"><wicket:message key="overridable"/></label>
- </div>
+ </div>
+ <div id="tabs-2" class="tab-pane">
+ <div id="formtable">
+ <span wicket:id="container">
+ <div style="border-bottom: 10px">
+ <div style="width: 40px; text-align: center; font-size: 7px">
+ <label for="version"><wicket:message key="overridable"/></label>
</div>
- <form wicket:id="connectorPropForm">
- <div class="tablerow connectorProp" wicket:id="connectorProperties">
- <div class="tablecolumn_check" style="width: 27px; text-align: center; margin-right: 10px">
- <span wicket:id="connPropAttrOverridable">[connPropAttrOverridable]</span>
- </div>
- <div class="tablecolumn_connPropAttr">
- <span wicket:id="connPropAttrSchema">[connPropAttrSchema]</span>
- </div>
- <div class="tablecolumn_field veryshort_fixedsize">
- <span wicket:id="panel">[panel]</span>
- </div>
+ </div>
+ <form wicket:id="connectorPropForm">
+ <div class="tablerow connectorProp" wicket:id="connectorProperties">
+ <div class="tablecolumn_check" style="width: 27px; text-align: center; margin-right: 10px">
+ <span wicket:id="connPropAttrOverridable">[connPropAttrOverridable]</span>
</div>
- <div>
- <a style="position: absolute; top: 2px; right:20px;" wicket:id="check">
- <img src="img/ping.png"width="30" height="30"
- alt="ping" title="title" wicket:message="title:check"/>
- </a>
+ <div class="tablecolumn_connPropAttr">
+ <span wicket:id="connPropAttrSchema">[connPropAttrSchema]</span>
</div>
- </form>
- </span>
- </div>
- </div>
- <div id="tabs-3" class="tab-pane">
- <span wicket:id="capabilitiesPalette"/>
+ <div class="tablecolumn_field veryshort_fixedsize">
+ <span wicket:id="panel">[panel]</span>
+ </div>
+ </div>
+ <div>
+ <a style="position: absolute; top: 2px; right:20px;" wicket:id="check">
+ <img src="img/ping.png"width="30" height="30"
+ alt="ping" title="title" wicket:message="title:check"/>
+ </a>
+ </div>
+ </form>
+ </span>
</div>
</div>
+ <div id="tabs-3" class="tab-pane">
+ <span wicket:id="capabilitiesPalette"/>
+ </div>
</div>
-
- <div class="modal-footer">
- <input type="submit" class="btn btn-primary" wicket:id="apply"/>
- <input type="button" class="btn btn-default" wicket:id="cancel"/>
- </div>
- </form>
+ </div>
</wicket:extend>
</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/resources/org/apache/syncope/client/console/panels/ModalContent.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ModalContent.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ModalContent.html
deleted file mode 100644
index e1fbeff..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ModalContent.html
+++ /dev/null
@@ -1,45 +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.
--->
-<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
-
- <wicket:head>
- <script type="text/javascript">
- var notificationShownTimes = 0;
-
- function showNotification(componentId, messagecount) {
- notificationShownTimes++;
- timeout = 1700 + (messagecount * 500) + notificationShownTimes * 200;
- $('div#' + componentId).fadeTo('normal', 1.0);
- setTimeout("$('div#" + componentId + "').fadeOut('normal')", timeout);
- }
- </script>
-
- <style type="text/css">
- table.palette td.header {
- background:url("images/ui-bg_glass_75_e6e6e6_1x400.png")
- repeat-x scroll 50% 50% #E6E6E6 !important;
- }
- </style>
- </wicket:head>
-
- <wicket:panel>
- <div wicket:id="feedback"/>
- <wicket:child />
- </wicket:panel>
-</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/resources/org/apache/syncope/client/console/panels/ModalContent.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ModalContent.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ModalContent.properties
deleted file mode 100644
index e696256..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ModalContent.properties
+++ /dev/null
@@ -1,20 +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.
-submit=Save
-add=Add
-remove=Delete
-cancel=Cancel
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/resources/org/apache/syncope/client/console/panels/ModalContent_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ModalContent_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ModalContent_it.properties
deleted file mode 100644
index 58e0aa0..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ModalContent_it.properties
+++ /dev/null
@@ -1,20 +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.
-submit=Salva
-add=Aggiungi
-remove=Elimina
-cancel=Annulla
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/resources/org/apache/syncope/client/console/panels/ModalContent_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ModalContent_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ModalContent_pt_BR.properties
deleted file mode 100644
index 490fe30..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ModalContent_pt_BR.properties
+++ /dev/null
@@ -1,20 +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.
-submit=Salvar
-add=Adicionar
-remove=Remover
-cancel=Cancelar
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceDetailsPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceDetailsPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceDetailsPanel.html
index 0b7ca7f..660449a 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceDetailsPanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceDetailsPanel.html
@@ -16,122 +16,32 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
-<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
- <wicket:panel>
- <div id="formtable">
- <div class="tablerow alt">
- <div class="tablecolumn_label medium_fixedsize">
- <label for="name"><wicket:message key="name"/></label>
- </div>
- <div class="tablecolumn_field medium_dynamicsize">
- <span wicket:id="name">[name]</span>
- </div>
- </div>
-
- <div class="tablerow">
- <div class="tablecolumn_label medium_fixedsize">
- <label for="connector"><wicket:message key="connector"/></label>
- </div>
- <div class="tablecolumn_field medium_dynamicsize">
- <span wicket:id="connector">[connector]</span>
- </div>
- </div>
-
- <div class="tablerow alt">
- <div class="tablecolumn_label medium_fixedsize">
- <label for="enforceMandatoryCondition"><wicket:message key="enforceMandatoryCondition"/></label>
- </div>
- <div class="tablecolumn_field medium_dynamicsize">
- <span wicket:id="enforceMandatoryCondition">[enforceMandatoryCondition]</span>
- </div>
- </div>
-
- <div class="tablerow">
- <div class="tablecolumn_label medium_fixedsize">
- <label for="propagationPrimary"><wicket:message key="propagationPrimary"/></label>
- </div>
- <div class="tablecolumn_field medium_dynamicsize">
- <span wicket:id="propagationPrimary">[propagationPrimary]</span>
- </div>
- </div>
-
- <div class="tablerow alt">
- <div class="tablecolumn_label medium_fixedsize">
- <label for="propagationPriority"><wicket:message key="propagationPriority"/></label>
- </div>
- <div class="tablecolumn_field medium_dynamicsize">
- <span wicket:id="propagationPriority">[propagationPriority]</span>
- </div>
- </div>
-
- <div class="tablerow">
- <div class="tablecolumn_label medium_fixedsize">
- <label for="propagationMode"><wicket:message key="propagationMode"/></label>
- </div>
- <div class="tablecolumn_field medium_dynamicsize">
- <span wicket:id="propagationMode">[propagationMode]</span>
- </div>
- </div>
-
- <div class="tablerow alt">
- <div class="tablecolumn_label medium_fixedsize">
- <label for="randomPwdIfNotProvided"><wicket:message key="randomPwdIfNotProvided"/></label>
- </div>
- <div class="tablecolumn_field medium_dynamicsize">
- <span wicket:id="randomPwdIfNotProvided">[randomPwdIfNotProvided]</span>
- </div>
- </div>
-
- <div class="tablerow">
- <div class="tablecolumn_label short_dynamicsize">
- <label for="propagationActionsClassNames"><wicket:message key="actionsClasses"/></label>
- </div>
- <span wicket:id="propagationActionsClassNames">
- <span wicket:id="actionsClasses">
- <select class="text ui-widget-content ui-corner-all" wicket:id="actionsClass"/>
- <a wicket:id="drop"><i class="fa fa-minus"></i></a>
- <a wicket:id="add"><i class="fa fa-plus"></i></a>
- <br/>
- </span>
- <a wicket:id="first"><i class="fa fa-plus"></i></a>
- </span>
- </div>
-
- <div class="tablerow alt">
- <div class="tablecolumn_label medium_fixedsize">
- <label for="createTraceLevel"><wicket:message key="createTraceLevel"/></label>
- </div>
- <div class="tablecolumn_field medium_dynamicsize">
- <span wicket:id="createTraceLevel">[createTraceLevel]</span>
- </div>
- </div>
-
- <div class="tablerow">
- <div class="tablecolumn_label medium_fixedsize">
- <label for="updateTraceLevel"><wicket:message key="updateTraceLevel"/></label>
- </div>
- <div class="tablecolumn_field medium_dynamicsize">
- <span wicket:id="updateTraceLevel">[updateTraceLevel]</span>
- </div>
- </div>
-
- <div class="tablerow alt">
- <div class="tablecolumn_label medium_fixedsize">
- <label for="deleteTraceLevel"><wicket:message key="deleteTraceLevel"/></label>
- </div>
- <div class="tablecolumn_field medium_dynamicsize">
- <span wicket:id="deleteTraceLevel">[deleteTraceLevel]</span>
- </div>
- </div>
-
- <div class="tablerow">
- <div class="tablecolumn_label medium_fixedsize">
- <label for="syncTraceLevel"><wicket:message key="syncTraceLevel"/></label>
- </div>
- <div class="tablecolumn_field medium_dynamicsize">
- <span wicket:id="syncTraceLevel">[syncTraceLevel]</span>
- </div>
- </div>
- </div>
- </wicket:panel>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://xmlns.jcp.org/jsf/composite">
+ <head>
+ <title>Resource details panel</title>
+ </head>
+ <body>
+ <wicket:panel>
+
+ <div wicket:id="container" class="summarize">
+ <span wicket:id="name">[name]</span>
+ <span wicket:id="connector">[connector]</span>
+ <span wicket:id="enforceMandatoryCondition">[enforceMandatoryCondition]</span>
+ <span wicket:id="propagationPrimary">[propagationPrimary]</span>
+ <span wicket:id="propagationPriority">[propagationPriority]</span>
+ <span wicket:id="propagationMode">[propagationMode]</span>
+ <span wicket:id="randomPwdIfNotProvided">[randomPwdIfNotProvided]</span>
+ <span wicket:id="actionsClasses">[actionsClasses]</span>
+ <span wicket:id="createTraceLevel">[createTraceLevel]</span>
+ <span wicket:id="updateTraceLevel">[updateTraceLevel]</span>
+ <span wicket:id="deleteTraceLevel">[deleteTraceLevel]</span>
+ <span wicket:id="syncTraceLevel">[syncTraceLevel]</span>
+ </div>
+
+ <span wicket:id="systeminformation">[System Information]</span>
+ </wicket:panel>
+ </body>
</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal.html
index 2d4f7b4..bd4cd4b 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal.html
@@ -18,37 +18,6 @@ under the License.
-->
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
<wicket:extend>
- <form wicket:id="form">
- <div class="tabbable tabs-left">
- <ul class="nav nav-tabs">
- <li class="active"><a data-toggle="tab" href="#resource"><span><wicket:message key="resource"/></span></a></li>
- <li><a data-toggle="tab" href="#provisions"><span><wicket:message key="provisions"/></span></a></li>
- <li><a data-toggle="tab" href="#connectorProperties"><span><wicket:message key="connectorProperties"/></span></a></li>
- <li><a data-toggle="tab" href="#security"><span><wicket:message key="security"/></span></a></li>
- </ul>
- <div class="tab-content">
- <div id="resource" class="tab-pane active">
- <span wicket:id="details">[details]</span>
- <span wicket:id="systeminformation">[System Information]</span>
- </div>
- <div id="provisions" class="tab-pane">
- <span wicket:id="pcontainer">
- <span wicket:id="provisions">[provisions]</span>
- </span>
- </div>
- <div id="connectorProperties" class="tab-pane">
- <span wicket:id="connconf">[connconf]</span>
- </div>
- <div id="security" class="tab-pane">
- <span wicket:id="security">[security]</span>
- </div>
- </div>
- </div>
-
- <div class="modal-footer">
- <input type="submit" class="btn btn-primary" wicket:id="apply"/>
- <input type="button" class="btn btn-default" wicket:id="cancel"/>
- </div>
- </form>
+ <div wicket:id="tabbedPanel"></div>
</wicket:extend>
</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceSecurityPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceSecurityPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceSecurityPanel.html
index ddabe05..10cfb54 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceSecurityPanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceSecurityPanel.html
@@ -18,39 +18,16 @@ under the License.
-->
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
<wicket:panel>
- <div id="formtable" wicket:id="security">
- <div class="tablerow alt">
- <div class="tablecolumn_label short_dynamicsize">
- <label for="passwordPolicy"><wicket:message key="passwordPolicy"/></label>
- </div>
- <div class="tablecolumn_field medium_dynamicsize">
- <span wicket:id="passwordPolicy">
- [panel for dynamic input type markup]
- </span>
- </div>
- </div>
-
- <div class="tablerow">
- <div class="tablecolumn_label short_dynamicsize">
- <label for="accountPolicy"><wicket:message key="accountPolicy"/></label>
- </div>
- <div class="tablecolumn_field medium_dynamicsize">
- <span wicket:id="accountPolicy">
- [panel for dynamic input type markup]
- </span>
- </div>
- </div>
-
- <div class="tablerow alt">
- <div class="tablecolumn_label short_dynamicsize">
- <label for="syncPolicy"><wicket:message key="syncPolicy"/></label>
- </div>
- <div class="tablecolumn_field medium_dynamicsize">
- <span wicket:id="syncPolicy">
- [panel for dynamic input type markup]
- </span>
- </div>
- </div>
+ <div wicket:id="container" class="summarize">
+ <span wicket:id="passwordPolicy">
+ [panel for dynamic input type markup]
+ </span>
+ <span wicket:id="accountPolicy">
+ [panel for dynamic input type markup]
+ </span>
+ <span wicket:id="syncPolicy">
+ [panel for dynamic input type markup]
+ </span>
</div>
</wicket:panel>
</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.html
index fc7596f..ccb8d5e 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.html
@@ -16,6 +16,18 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
-<wicket:extend>
- <input type="checkbox" class="checkbox" wicket:id="checkboxField"/>
-</wicket:extend>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <head>
+ <title>Ajax checkbox panel</title>
+ </head>
+ <body>
+ <wicket:extend>
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" wicket:id="checkboxField">
+ <label wicket:id="label">[LABEL]</label>
+ </label>
+ </div>
+ </wicket:extend>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDropDownChoicePanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDropDownChoicePanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDropDownChoicePanel.html
index 12d5bf2..e1ff5da 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDropDownChoicePanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDropDownChoicePanel.html
@@ -17,8 +17,15 @@ specific language governing permissions and limitations
under the License.
-->
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <head>
+ <title>Drop down choice</title>
+ </head>
<wicket:extend>
- <select class="ui-widget-content ui-corner-all medium_dynamicsize"
- wicket:id="dropDownChoiceField" />
+ <wicket:enclosure child="field-label">
+ <label wicket:id="field-label">[LABEL]</label><span wicket:id="required"/>
+ </wicket:enclosure>
+ <fieldset class="input-group">
+ <select wicket:id="dropDownChoiceField" />
+ </fieldset>
</wicket:extend>
</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxTextFieldPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxTextFieldPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxTextFieldPanel.html
index 28d897d..f2b0cd3 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxTextFieldPanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxTextFieldPanel.html
@@ -17,10 +17,17 @@ specific language governing permissions and limitations
under the License.
-->
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
- <wicket:extend>
- <div class="form-group">
- <label wicket:id="label">[LABEL]</label><span wicket:id="required"/>
- <input type="text" class="form-control" wicket:id="textField"/>
- </div>
- </wicket:extend>
+ <head>
+ <title>Ajaxt text field panel</title>
+ </head>
+ <body>
+ <wicket:extend>
+ <wicket:enclosure child="field-label">
+ <label wicket:id="field-label">[LABEL]</label><span wicket:id="required"/>
+ </wicket:enclosure>
+ <fieldset class="form-group input-group">
+ <input type="text" class="form-control" wicket:id="textField"/>
+ </fieldset>
+ </wicket:extend>
+ </body>
</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.html
index e35205c..8dc7fd0 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.html
@@ -17,19 +17,48 @@ specific language governing permissions and limitations
under the License.
-->
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
- <wicket:panel>
- <span wicket:id="multiValueContainer">
- <span wicket:id="view">
- <span wicket:id="panel">[form field]</span>
- <a wicket:id="drop"><img src="img/minus-icon.png" alt="remove icon" class="drop_button" /></a>
- <span wicket:id="panelPlus">[plus]</span>
- <br />
+ <head>
+ <title>Multivalue conatiner</title>
+ </head>
+ <body>
+ <wicket:panel>
+ <wicket:enclosure child="field-label">
+ <!--<label wicket:id="field-label">[LABEL]</label><span wicket:id="required"/>-->
+ <label wicket:id="field-label">[LABEL]</label>
+ </wicket:enclosure>
+ <span wicket:id="multiValueContainer">
+ <span wicket:id="content">[content]</span>
</span>
+
+ <wicket:fragment wicket:id="noDataFragment">
+ <div class="input-group form-group">
+ <div class="form-control" style="background-color:#EEE">
+ <label wicket:id="field-label">[LABEL]</label>
+ </div>
+ <span wicket:id="panelPlus">[plus]</span>
+ </div>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="dataFragment">
+ <span wicket:id="view">
+ <div class="input-group form-group">
+ <span wicket:id="panel">[form field]</span>
+ <div class="input-group-addon">
+ <a wicket:id="drop"><i class="fa fa-minus"></i></a>
+ </div>
+ <span wicket:id="panelPlus">[plus]</span>
+ </div>
+ </span>
+ </wicket:fragment>
+
<wicket:fragment wicket:id="fragmentPlus">
- <a wicket:id="add"><i class="fa fa-plus"></i></a>
+ <div class="input-group-addon">
+ <a wicket:id="add"><i class="fa fa-plus"></i></a>
+ </div>
</wicket:fragment>
+
<wicket:fragment wicket:id="emptyFragment">
</wicket:fragment>
- </span>
- </wicket:panel>
+ </wicket:panel>
+ </body>
</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/SpinnerFieldPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/SpinnerFieldPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/SpinnerFieldPanel.html
index a6f0e51..c9ee0e1 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/SpinnerFieldPanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/SpinnerFieldPanel.html
@@ -18,12 +18,9 @@ under the License.
-->
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
<wicket:extend>
- <script type="text/javascript" wicket:id="spinnerFieldJS">
- </script>
- <div style="display: inline-table;">
- <div style="display: table-cell;">
- <input wicket:id="spinnerField"/>
- </div>
- </div>
+ <wicket:enclosure child="field-label">
+ <label wicket:id="field-label">[LABEL]</label><span wicket:id="required"/>
+ </wicket:enclosure>
+ <input wicket:id="spinner"/>
</wicket:extend>
</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 685996f..2d5aa1a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -372,7 +372,8 @@ under the License.
<activiti-modeler.directory>${project.build.directory}/activiti-modeler</activiti-modeler.directory>
<jquery.version>2.1.4</jquery.version>
- <jquery-ui.version>1.11.4</jquery-ui.version>
+ <!-- upgrade jquery-ui version after wicket bootstrap upgrading -->
+ <jquery-ui.version>1.10.3</jquery-ui.version>
<jquery-cookie.version>1.4.1-1</jquery-cookie.version>
<bootstrap.version>3.3.5</bootstrap.version>
[19/28] syncope git commit: increase heap space to start with jrebel
Posted by fm...@apache.org.
increase heap space to start with jrebel
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/66d3a505
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/66d3a505
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/66d3a505
Branch: refs/heads/master
Commit: 66d3a50565eff9718b07760f9f14f0d03a869b27
Parents: 49caab3
Author: fmartelli <fa...@gmail.com>
Authored: Fri Oct 23 14:28:02 2015 +0200
Committer: fmartelli <fa...@gmail.com>
Committed: Fri Oct 23 14:28:02 2015 +0200
----------------------------------------------------------------------
fit/console-reference/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/66d3a505/fit/console-reference/pom.xml
----------------------------------------------------------------------
diff --git a/fit/console-reference/pom.xml b/fit/console-reference/pom.xml
index 3c89990..b52ba7f 100644
--- a/fit/console-reference/pom.xml
+++ b/fit/console-reference/pom.xml
@@ -561,7 +561,7 @@ ORYX.Editor.createByUrl = function(modelUrl){"/>
<properties>
<cargo.jvmargs>-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
-noverify -javaagent:${env.REBEL_HOME}/jrebel.jar -Drebel.spring_plugin=true
- -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:MaxPermSize=512m</cargo.jvmargs>
+ -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:MaxPermSize=512m -Xmx1024m -Xms512m</cargo.jvmargs>
</properties>
</configuration>
</configuration>
[18/28] syncope git commit: Merge branch 'master' into SYNCOPE-156
Posted by fm...@apache.org.
Merge branch 'master' into SYNCOPE-156
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/49caab31
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/49caab31
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/49caab31
Branch: refs/heads/master
Commit: 49caab314a24a3e47de38ebf7efc4a2e3e2057be
Parents: 973cd50 7a11bf3
Author: fmartelli <fa...@gmail.com>
Authored: Fri Oct 23 12:30:34 2015 +0200
Committer: fmartelli <fa...@gmail.com>
Committed: Fri Oct 23 12:30:34 2015 +0200
----------------------------------------------------------------------
.../cli/commands/CommonsResultManager.java | 6 +-
.../client/cli/commands/ReportCommand.java | 352 -------------------
.../ConfigurationResultManager.java | 2 +-
.../commands/logger/LoggerResultManager.java | 2 +-
.../notification/NotificationDelete.java | 2 +-
.../commands/policy/PolicyResultManager.java | 6 +-
.../commands/report/AbstractReportCommand.java | 30 ++
.../cli/commands/report/ReportCommand.java | 137 ++++++++
.../cli/commands/report/ReportDelete.java | 58 +++
.../commands/report/ReportDeleteExecution.java | 61 ++++
.../cli/commands/report/ReportExecute.java | 64 ++++
.../commands/report/ReportExportExecution.java | 100 ++++++
.../client/cli/commands/report/ReportList.java | 33 ++
.../cli/commands/report/ReportListJobs.java | 35 ++
.../client/cli/commands/report/ReportRead.java | 59 ++++
.../commands/report/ReportReadExecution.java | 62 ++++
.../commands/report/ReportResultManager.java | 75 ++++
.../commands/schema/SchemaResultManager.java | 2 +-
.../syncope/client/cli/messages/Messages.java | 94 -----
.../syncope/client/cli/messages/Table.java | 194 ----------
.../client/cli/messages/TwoColumnTable.java | 262 --------------
.../syncope/client/cli/view/Messages.java | 94 +++++
.../apache/syncope/client/cli/view/Table.java | 194 ++++++++++
23 files changed, 1014 insertions(+), 910 deletions(-)
----------------------------------------------------------------------
[10/28] syncope git commit: [SYNCOPE-156] Add confirm dialog
Posted by fm...@apache.org.
[SYNCOPE-156] Add confirm dialog
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/21262a6f
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/21262a6f
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/21262a6f
Branch: refs/heads/master
Commit: 21262a6f3c87bd4c4aebe07400ed8bac78b06239
Parents: af8f263
Author: Marco Di Sabatino Di Diodoro <md...@apache.org>
Authored: Wed Sep 30 11:14:46 2015 +0200
Committer: Marco Di Sabatino Di Diodoro <md...@apache.org>
Committed: Wed Sep 30 11:14:46 2015 +0200
----------------------------------------------------------------------
client/console/pom.xml | 4 ++
.../syncope/client/console/pages/Realms.java | 10 ++-
.../confirmation/ConfirmationModalBehavior.java | 70 ++++++++++++++++++++
.../markup/html/form/ActionLinksPanel.java | 1 -
.../html/form/IndicatingOnConfirmAjaxLink.java | 26 ++------
.../syncope/client/console/pages/BasePage.html | 2 +
.../syncope/client/console/pages/Realms.html | 8 +--
pom.xml | 6 ++
8 files changed, 97 insertions(+), 30 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/21262a6f/client/console/pom.xml
----------------------------------------------------------------------
diff --git a/client/console/pom.xml b/client/console/pom.xml
index 759ba78..fb78280 100644
--- a/client/console/pom.xml
+++ b/client/console/pom.xml
@@ -108,6 +108,10 @@ under the License.
</dependency>
<dependency>
<groupId>org.webjars</groupId>
+ <artifactId>bootbox</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.webjars</groupId>
<artifactId>highlightjs</artifactId>
</dependency>
<dependency>
http://git-wip-us.apache.org/repos/asf/syncope/blob/21262a6f/client/console/src/main/java/org/apache/syncope/client/console/pages/Realms.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/Realms.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/Realms.java
index 3c5f0ea..300db13 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/Realms.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/Realms.java
@@ -28,6 +28,7 @@ import org.apache.syncope.client.console.panels.RealmSidebarPanel;
import org.apache.syncope.client.console.panels.RealmSidebarPanel.ControlSidebarClick;
import org.apache.syncope.client.console.rest.RealmRestClient;
import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicatingAjaxLink;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.confirmation.ConfirmationModalBehavior;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.common.lib.to.RealmTO;
import org.apache.syncope.common.lib.types.Entitlement;
@@ -119,12 +120,13 @@ public class Realms extends BasePage {
private void setupDeleteLink() {
- final AjaxLink<Void> deleteLink = new ClearIndicatingAjaxLink<Void>("deleteLink", getPageReference()) {
+ @SuppressWarnings("unchecked")
+ final AjaxLink<Void> deleteLink = new AjaxLink("deleteLink", Model.of("deleteLink")) {
- private static final long serialVersionUID = -7978723352517770644L;
+ private static final long serialVersionUID = 3776750333491622263L;
@Override
- protected void onClickInternal(final AjaxRequestTarget target) {
+ public void onClick(final AjaxRequestTarget target) {
try {
final RealmTO toBeDeleted = realmSidebarPanel.getCurrentRealm();
@@ -147,6 +149,8 @@ public class Realms extends BasePage {
}
};
+ deleteLink.add(new ConfirmationModalBehavior());
+
if (SyncopeConsoleSession.get().owns(Entitlement.REALM_DELETE)) {
MetaDataRoleAuthorizationStrategy.authorize(deleteLink, ENABLE, Entitlement.REALM_DELETE);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/21262a6f/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/bootstrap/confirmation/ConfirmationModalBehavior.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/bootstrap/confirmation/ConfirmationModalBehavior.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/bootstrap/confirmation/ConfirmationModalBehavior.java
new file mode 100644
index 0000000..7996766
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/bootstrap/confirmation/ConfirmationModalBehavior.java
@@ -0,0 +1,70 @@
+/*
+ * 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.wicket.markup.html.bootstrap.confirmation;
+
+import static de.agilecoders.wicket.jquery.JQuery.$;
+
+import de.agilecoders.wicket.jquery.function.JavaScriptInlineFunction;
+import org.apache.wicket.Component;
+import org.apache.wicket.behavior.Behavior;
+import org.apache.wicket.markup.head.IHeaderResponse;
+import org.apache.wicket.markup.head.JavaScriptHeaderItem;
+import org.apache.wicket.model.ResourceModel;
+
+/**
+ * A behavior that shows a modal with OK/Cancel buttons to confirm an action.
+ *
+ */
+public class ConfirmationModalBehavior extends Behavior {
+
+ private static final long serialVersionUID = 1741536820040325586L;
+
+ private final String message;
+
+ public ConfirmationModalBehavior() {
+ this("confirmDelete");
+ }
+
+ public ConfirmationModalBehavior(final String msg) {
+ message = new ResourceModel(msg, "Are you sure?").getObject();
+ }
+
+ @Override
+ public void renderHead(final Component component, final IHeaderResponse response) {
+ super.renderHead(component, response);
+
+ response.render(JavaScriptHeaderItem.forScript("var confirm = false;", null));
+ response.render($(component).on("click",
+ new JavaScriptInlineFunction(""
+ + "var element = $(this);"
+ + "evt.preventDefault();"
+ + "if(confirm == false){"
+ + "evt.stopImmediatePropagation();"
+ + "bootbox.confirm(\"" + message + "\", function(result){"
+ + "if(result == true){"
+ + "confirm = true;"
+ + "element.click();"
+ + "}"
+ + "else{confirm = false;}"
+ + "return true;"
+ + "})} "
+ + "else {confirm = false;};"
+ )).asDomReadyScript());
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/21262a6f/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 3986090..8ad55f6 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
@@ -25,7 +25,6 @@ import java.util.Map.Entry;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.Triple;
import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicatingAjaxLink;
-import org.apache.syncope.client.console.wicket.ajax.markup.html.IndicatingOnConfirmAjaxLink;
import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
http://git-wip-us.apache.org/repos/asf/syncope/blob/21262a6f/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/IndicatingOnConfirmAjaxLink.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/IndicatingOnConfirmAjaxLink.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/IndicatingOnConfirmAjaxLink.java
index 86db915..4aea243 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/IndicatingOnConfirmAjaxLink.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/IndicatingOnConfirmAjaxLink.java
@@ -16,12 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.syncope.client.console.wicket.ajax.markup.html;
+package org.apache.syncope.client.console.wicket.markup.html.form;
-import org.apache.wicket.Component;
+import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicatingAjaxLink;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.confirmation.ConfirmationModalBehavior;
import org.apache.wicket.PageReference;
-import org.apache.wicket.ajax.attributes.AjaxCallListener;
-import org.apache.wicket.ajax.attributes.AjaxRequestAttributes;
public abstract class IndicatingOnConfirmAjaxLink<T> extends ClearIndicatingAjaxLink<T> {
@@ -36,23 +35,6 @@ public abstract class IndicatingOnConfirmAjaxLink<T> extends ClearIndicatingAjax
public IndicatingOnConfirmAjaxLink(final String id, final PageReference pageRef, final String msg) {
super(id, pageRef);
this.msg = msg;
- }
-
- @Override
- protected void updateAjaxAttributes(final AjaxRequestAttributes attributes) {
- super.updateAjaxAttributes(attributes);
-
- final AjaxCallListener ajaxCallListener = new AjaxCallListener() {
-
- private static final long serialVersionUID = 7160235486520935153L;
-
- @Override
- public CharSequence getPrecondition(final Component component) {
- return "if (!confirm('"
- + getString(IndicatingOnConfirmAjaxLink.this.msg)
- + "')) {return false;} else {return true;}";
- }
- };
- attributes.getAjaxCallListeners().add(ajaxCallListener);
+ this.add(new ConfirmationModalBehavior(msg));
}
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/21262a6f/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html
index 790c201..e74af55 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html
@@ -32,6 +32,8 @@ under the License.
<link href="css/AdminLTE_skins/skin-green.css" rel="stylesheet" type="text/css" />
<link href="css/syncopeConsole.css" rel="stylesheet" type="text/css" />
<link href="css/fieldstyle.css" rel="stylesheet" type="text/css" />
+
+ <script type="text/javascript" src="webjars/bootbox/${bootbox.version}/bootbox.js"></script>
<script type="text/javascript">
var notificationShownTimes = 0;
http://git-wip-us.apache.org/repos/asf/syncope/blob/21262a6f/client/console/src/main/resources/org/apache/syncope/client/console/pages/Realms.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Realms.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Realms.html
index 890db34..47c136e 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Realms.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Realms.html
@@ -29,19 +29,19 @@ under the License.
<div class="box-tools pull-right">
<ul class="nav navbar-nav actions">
<li>
- <a href="#" wicket:id="editLink">
+ <a wicket:id="editLink">
<i class="fa fa-pencil-square-o"></i>
</a>
</li>
<li>
- <a href="#" wicket:id="createLink">
+ <a wicket:id="createLink">
<i class="fa fa-plus"></i>
</a>
</li>
<li>
- <a href="#" wicket:id="deleteLink">
+ <a wicket:id="deleteLink" data-bb="confirm">
<i class="fa fa-minus"></i>
- </a>
+ </a>
</li>
</ul>
</div><!-- /.box-tools -->
http://git-wip-us.apache.org/repos/asf/syncope/blob/21262a6f/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index df64cc1..495ce10 100644
--- a/pom.xml
+++ b/pom.xml
@@ -377,6 +377,7 @@ under the License.
<bootstrap.version>3.3.5</bootstrap.version>
<wicket-bootstrap.version>0.10.4-SNAPSHOT</wicket-bootstrap.version>
+ <bootbox.version>4.4.0</bootbox.version>
<font-awesome.version>4.4.0</font-awesome.version>
<ionicons.version>2.0.1</ionicons.version>
@@ -953,6 +954,11 @@ under the License.
</dependency>
<dependency>
<groupId>org.webjars</groupId>
+ <artifactId>bootbox</artifactId>
+ <version>${bootbox.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.webjars</groupId>
<artifactId>ionicons</artifactId>
<version>${ionicons.version}</version>
</dependency>
[12/28] syncope git commit: [SYNCOPE-156] removed every reference to
the oldest modal mechanisms
Posted by fm...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupSearchResultPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupSearchResultPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupSearchResultPanel.java
index 60fb1b7..458298b 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupSearchResultPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupSearchResultPanel.java
@@ -26,11 +26,11 @@ import java.util.Collection;
import java.util.Date;
import java.util.List;
import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.pages.GroupDisplayAttributesModalPage;
import org.apache.syncope.client.console.rest.AbstractAnyRestClient;
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.bootstrap.dialog.BaseModal;
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;
@@ -39,35 +39,25 @@ import org.apache.syncope.common.lib.to.AnyTO;
import org.apache.syncope.common.lib.to.AnyTypeClassTO;
import org.apache.syncope.common.lib.to.GroupTO;
import org.apache.syncope.common.lib.types.SchemaType;
-import org.apache.wicket.Page;
import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.ResourceModel;
import org.springframework.util.ReflectionUtils;
-public class GroupSearchResultPanel extends AnySearchResultPanel {
+public class GroupSearchResultPanel extends AnySearchResultPanel<GroupTO> {
private static final long serialVersionUID = -1100228004207271270L;
private final String entitlement = "GROUP_READ";
- private final BaseModal<?> editModal;
-
public GroupSearchResultPanel(final String type, final String parentId,
final boolean filtered, final String fiql, final PageReference callerRef,
final AbstractAnyRestClient restClient, final List<AnyTypeClassTO> anyTypeClassTOs, final String realm) {
super(type, parentId, filtered, fiql, callerRef, restClient, anyTypeClassTOs, realm);
-
- editModal = new BaseModal<>("editModal");
-// editModal.addCloseButton();
-// editModal.setFooterVisible(true);
-// editModal.setHeaderVisible(true);
-// editModal.setOutputMarkupId(true);
}
@Override
@@ -125,11 +115,11 @@ public class GroupSearchResultPanel extends AnySearchResultPanel {
@Override
public void onClick(final AjaxRequestTarget target, final AnyTO anyTO) {
- editModal.addOrReplace(new GroupModalPanel(
- editModal, getPage().getPageReference(), GroupTO.class.cast(model.getObject())));
+ modal.addOrReplace(new GroupModalPanel(
+ modal, getPage().getPageReference(), GroupTO.class.cast(model.getObject())));
- target.add(editModal);
- editModal.show(target);
+ target.add(modal);
+ modal.show(target);
}
}, ActionLink.ActionType.EDIT, entitlement).add(new ActionLink<AnyTO>() {
@@ -138,19 +128,39 @@ public class GroupSearchResultPanel extends AnySearchResultPanel {
@Override
public void onClick(final AjaxRequestTarget target, final AnyTO anyTO) {
try {
- final GroupTO groupTO = (GroupTO) restClient.
- delete(model.getObject().getETagValue(), model.getObject().getKey());
+ restClient.delete(model.getObject().getETagValue(), model.getObject().getKey());
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ target.add(container);
+ } catch (SyncopeClientException e) {
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ LOG.error("While deleting object {}", anyTO.getKey(), e);
+ }
+ ((BasePage) getPage()).getFeedbackPanel().refresh(target);
- //editmodal.setContent(new ResultStatusModal.Builder(editmodal, groupTO).build());
-// editModal.addOrReplace(new GroupModalPanel(
-// BaseModal.getModalContentId(), editModal, (GroupTO) model.getObject()));
+// try {
+// final GroupTO modelObject = (GroupTO) restClient.
+// delete(model.getObject().getETagValue(), model.getObject().getKey());
//
-// target.add(editModal);
-// editModal.show(target);
- } catch (SyncopeClientException scce) {
- error(getString(Constants.OPERATION_ERROR) + ": " + scce.getMessage());
- feedbackPanel.refresh(target);
- }
+// final IModel<GroupTO> model = new CompoundPropertyModel<>(modelObject);
+// modal.setFormModel(model);
+//
+// target.add(modal.setContent(new ResultStatusModal.Builder<GroupTO>(
+// modal, getPage().getPageReference(), modelObject).build()));
+//
+// modal.header(
+// new Model<String>(MessageFormat.format(getString("any.delete"), anyTO.getKey())));
+// modal.show(true);
+//
+// //editmodal.setContent(new ResultStatusModal.Builder(editmodal, groupTO).build());
+//// editModal.addOrReplace(new GroupModalPanel(
+//// BaseModal.getModalContentId(), editModal, (GroupTO) model.getObject()));
+////
+//// target.add(editModal);
+//// editModal.show(target);
+// } catch (SyncopeClientException scce) {
+// error(getString(Constants.ERROR) + ": " + scce.getMessage());
+// LOG.error("While deleting object {}", anyTO.getKey(), scce);
+// }
}
}, ActionLink.ActionType.DELETE, entitlement);
@@ -167,18 +177,11 @@ public class GroupSearchResultPanel extends AnySearchResultPanel {
@Override
public void onClick(final AjaxRequestTarget target, final Serializable ignore) {
- displaymodal.setPageCreator(new ModalWindow.PageCreator() {
-
- private static final long serialVersionUID = -7834632442532690940L;
-
- @Override
- public Page createPage() {
- return new GroupDisplayAttributesModalPage(
- page.getPageReference(), displaymodal, schemaNames, dSchemaNames);
- }
- });
+ target.add(modal.setContent(new GroupDisplayAttributesModalPage(
+ modal, page.getPageReference(), schemaNames, dSchemaNames)));
- displaymodal.show(target);
+ modal.header(new ResourceModel("any.attr.display", ""));
+ modal.show(true);
}
}, ActionLink.ActionType.CHANGE_VIEW, entitlement);
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/java/org/apache/syncope/client/console/panels/ImagePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ImagePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ImagePanel.java
index b805a54..aa6ffb1 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ImagePanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ImagePanel.java
@@ -28,11 +28,13 @@ public class ImagePanel extends Panel {
private static final long serialVersionUID = 5564818820574092960L;
+ private static final String IMG = "img";
+
private final Image img;
public ImagePanel(final String id, final ContextRelativeResource img) {
super(id);
- this.img = new Image("img", img);
+ this.img = new Image(IMG, img);
add(this.img);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/java/org/apache/syncope/client/console/panels/UserSearchResultPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/UserSearchResultPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/UserSearchResultPanel.java
index de4d65a..06725cf 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/UserSearchResultPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/UserSearchResultPanel.java
@@ -20,12 +20,14 @@ package org.apache.syncope.client.console.panels;
import java.io.Serializable;
import java.lang.reflect.Field;
+import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.pages.StatusModalPage;
import org.apache.syncope.client.console.pages.UserDisplayAttributesModalPage;
import org.apache.syncope.client.console.rest.AbstractAnyRestClient;
@@ -40,24 +42,20 @@ import org.apache.syncope.common.lib.to.AnyTO;
import org.apache.syncope.common.lib.to.AnyTypeClassTO;
import org.apache.syncope.common.lib.to.UserTO;
import org.apache.syncope.common.lib.types.SchemaType;
-import org.apache.wicket.Page;
import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
+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.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.springframework.util.ReflectionUtils;
-public class UserSearchResultPanel extends AnySearchResultPanel {
+public class UserSearchResultPanel extends AnySearchResultPanel<UserTO> {
private static final long serialVersionUID = -1100228004207271270L;
- protected static final Logger LOG = LoggerFactory.getLogger(UserSearchResultPanel.class);
-
private final String entitlement = "USER_LIST";
public UserSearchResultPanel(final String type, final String parentId,
@@ -113,7 +111,7 @@ public class UserSearchResultPanel extends AnySearchResultPanel {
private static final long serialVersionUID = -3503023501954863131L;
@Override
- public ActionLinksPanel getActions(final String componentId, final IModel<AnyTO> model) {
+ public ActionLinksPanel<AnyTO> getActions(final String componentId, final IModel<AnyTO> model) {
final ActionLinksPanel.Builder<AnyTO> panel = ActionLinksPanel.builder(page.getPageReference());
@@ -123,18 +121,16 @@ public class UserSearchResultPanel extends AnySearchResultPanel {
@Override
public void onClick(final AjaxRequestTarget target, final AnyTO anyTO) {
- statusmodal.setPageCreator(new ModalWindow.PageCreator() {
+ final UserTO modelObject = UserTO.class.cast(model.getObject());
- private static final long serialVersionUID = -7834632442532690940L;
+ final IModel<UserTO> model = new CompoundPropertyModel<>(modelObject);
+ modal.setFormModel(model);
- @Override
- public Page createPage() {
- return new StatusModalPage<>(
- page.getPageReference(), statusmodal, (UserTO) model.getObject());
- }
- });
+ target.add(modal.setContent(
+ new StatusModalPage<UserTO>(modal, page.getPageReference(), model.getObject())));
- statusmodal.show(target);
+ modal.header(new Model<String>(MessageFormat.format(getString("any.edit"), anyTO.getKey())));
+ modal.show(true);
}
}, ActionLink.ActionType.MANAGE_RESOURCES, entitlement).add(new ActionLink<AnyTO>() {
@@ -142,18 +138,16 @@ public class UserSearchResultPanel extends AnySearchResultPanel {
@Override
public void onClick(final AjaxRequestTarget target, final AnyTO anyTO) {
- statusmodal.setPageCreator(new ModalWindow.PageCreator() {
+ final UserTO modelObject = UserTO.class.cast(model.getObject());
- private static final long serialVersionUID = -7834632442532690940L;
+ final IModel<UserTO> model = new CompoundPropertyModel<>(modelObject);
+ modal.setFormModel(model);
- @Override
- public Page createPage() {
- return new StatusModalPage<>(
- page.getPageReference(), statusmodal, (UserTO) model.getObject(), true);
- }
- });
+ target.add(modal.setContent(
+ new StatusModalPage<UserTO>(modal, page.getPageReference(), model.getObject(), true)));
- statusmodal.show(target);
+ modal.header(new Model<String>(MessageFormat.format(getString("any.edit"), anyTO.getKey())));
+ modal.show(true);
}
}, ActionLink.ActionType.ENABLE, entitlement).add(new ActionLink<AnyTO>() {
@@ -161,19 +155,15 @@ public class UserSearchResultPanel extends AnySearchResultPanel {
@Override
public void onClick(final AjaxRequestTarget target, final AnyTO anyTO) {
- editmodal.setPageCreator(new ModalWindow.PageCreator() {
+ final UserTO modelObject = ((UserRestClient) restClient).read(model.getObject().getKey());
- private static final long serialVersionUID = -7834632442532690940L;
+ final IModel<UserTO> model = new CompoundPropertyModel<>(modelObject);
+ modal.setFormModel(model);
- @Override
- public Page createPage() {
- // SYNCOPE-294: re-read userTO before edit
- UserTO userTO = ((UserRestClient) restClient).read(model.getObject().getKey());
- return null;
- }
- });
+ target.add(modal);
- editmodal.show(target);
+ modal.header(new Model<String>(MessageFormat.format(getString("any.edit"), anyTO.getKey())));
+ modal.show(true);
}
}, ActionLink.ActionType.EDIT, entitlement).add(new ActionLink<AnyTO>() {
@@ -183,24 +173,13 @@ public class UserSearchResultPanel extends AnySearchResultPanel {
public void onClick(final AjaxRequestTarget target, final AnyTO anyTO) {
try {
restClient.delete(model.getObject().getETagValue(), model.getObject().getKey());
-
- page.setModalResult(true);
-
- editmodal.setPageCreator(new ModalWindow.PageCreator() {
-
- private static final long serialVersionUID = -7834632442532690940L;
-
- @Override
- public Page createPage() {
- return null;
- }
- });
-
- editmodal.show(target);
- } catch (SyncopeClientException scce) {
- error(getString(Constants.OPERATION_ERROR) + ": " + scce.getMessage());
- feedbackPanel.refresh(target);
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ target.add(container);
+ } catch (SyncopeClientException e) {
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ LOG.error("While deleting object {}", anyTO.getKey(), e);
}
+ ((BasePage) getPage()).getFeedbackPanel().refresh(target);
}
}, ActionLink.ActionType.DELETE, entitlement);
@@ -208,7 +187,7 @@ public class UserSearchResultPanel extends AnySearchResultPanel {
}
@Override
- public ActionLinksPanel getHeader(final String componentId) {
+ public ActionLinksPanel<Serializable> getHeader(final String componentId) {
final ActionLinksPanel.Builder<Serializable> panel = ActionLinksPanel.builder(page.getPageReference());
panel.add(new ActionLink<Serializable>() {
@@ -217,18 +196,11 @@ public class UserSearchResultPanel extends AnySearchResultPanel {
@Override
public void onClick(final AjaxRequestTarget target, final Serializable ignore) {
- displaymodal.setPageCreator(new ModalWindow.PageCreator() {
-
- private static final long serialVersionUID = -7834632442532690940L;
-
- @Override
- public Page createPage() {
- return new UserDisplayAttributesModalPage(
- page.getPageReference(), displaymodal, schemaNames, dSchemaNames);
- }
- });
+ target.add(modal.setContent(new UserDisplayAttributesModalPage(
+ modal, page.getPageReference(), schemaNames, dSchemaNames)));
- displaymodal.show(target);
+ modal.header(new ResourceModel("any.attr.display", ""));
+ modal.show(true);
}
}, ActionLink.ActionType.CHANGE_VIEW, entitlement).add(new ActionLink<Serializable>() {
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/java/org/apache/syncope/client/console/rest/AbstractAnyRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/AbstractAnyRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/AbstractAnyRestClient.java
index 42eae37..8ca57ab 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/rest/AbstractAnyRestClient.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/AbstractAnyRestClient.java
@@ -51,6 +51,17 @@ public abstract class AbstractAnyRestClient extends BaseRestClient {
public abstract AnyTO delete(String etag, Long key);
+ protected <T extends AnyTO, E extends AnyService<T, ?>> T delete(
+ final Class<E> serviceClass, final Class<T> objectType, final String etag, final Long key) {
+ T result;
+ synchronized (this) {
+ final E service = getService(etag, serviceClass);
+ result = service.delete(key).readEntity(objectType);
+ resetClient(serviceClass);
+ }
+ return result;
+ }
+
public abstract BulkActionResult bulkAction(BulkAction action);
protected abstract Class<? extends AnyService<?, ?>> getAnyServiceClass();
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/java/org/apache/syncope/client/console/rest/AnyObjectRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/AnyObjectRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/AnyObjectRestClient.java
index 4c29faa..589f140 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/rest/AnyObjectRestClient.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/AnyObjectRestClient.java
@@ -80,10 +80,11 @@ public class AnyObjectRestClient extends AbstractAnyRestClient {
throw new UnsupportedOperationException("Not supported yet.");
}
- public AnyObjectTO read(final Long id) {
- AnyObjectTO anyObjectTO = null;
+ @SuppressWarnings("unchecked")
+ public <T extends AnyTO> T read(final long id) {
+ T anyObjectTO = null;
try {
- anyObjectTO = getService(AnyObjectService.class).read(id);
+ anyObjectTO = (T) getService(AnyObjectService.class).read(id);
} catch (SyncopeClientException e) {
LOG.error("While reading any object", e);
}
@@ -106,8 +107,8 @@ public class AnyObjectRestClient extends AbstractAnyRestClient {
}
@Override
- public AnyTO delete(final String etag, final Long key) {
- throw new UnsupportedOperationException("Not supported yet.");
+ public AnyObjectTO delete(final String etag, final Long key) {
+ return delete(AnyObjectService.class, AnyObjectTO.class, etag, key);
}
@Override
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/java/org/apache/syncope/client/console/rest/BaseRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/BaseRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/BaseRestClient.java
index 650818b..15f9c9b 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/rest/BaseRestClient.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/BaseRestClient.java
@@ -67,7 +67,6 @@ public abstract class BaseRestClient implements Serializable {
protected <E extends JAXRSService, T> T getObject(final E service, final URI location, final Class<T> resultClass) {
WebClient webClient = WebClient.fromClient(WebClient.client(service));
webClient.accept(SyncopeConsoleSession.get().getMediaType()).to(location.toASCIIString(), false);
-
return webClient.get(resultClass);
}
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/java/org/apache/syncope/client/console/rest/GroupRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/GroupRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/GroupRestClient.java
index f631810..a026119 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/rest/GroupRestClient.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/GroupRestClient.java
@@ -106,13 +106,7 @@ public class GroupRestClient extends AbstractAnyRestClient {
@Override
public GroupTO delete(final String etag, final Long key) {
- GroupTO result;
- synchronized (this) {
- GroupService service = getService(etag, GroupService.class);
- result = service.delete(key).readEntity(GroupTO.class);
- resetClient(GroupService.class);
- }
- return result;
+ return delete(GroupService.class, GroupTO.class, etag, key);
}
@Override
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/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 a780453..cf92dad 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
@@ -83,14 +83,8 @@ public class UserRestClient extends AbstractAnyRestClient {
}
@Override
- public UserTO delete(final String etag, final Long id) {
- UserTO result;
- synchronized (this) {
- UserService service = getService(etag, UserService.class);
- result = service.delete(id).readEntity(UserTO.class);
- resetClient(UserService.class);
- }
- return result;
+ public UserTO delete(final String etag, final Long key) {
+ return delete(UserService.class, UserTO.class, etag, key);
}
public UserTO read(final Long id) {
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/BinaryFieldPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/BinaryFieldPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/BinaryFieldPanel.java
index 40a88ac..f0c7093 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/BinaryFieldPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/BinaryFieldPanel.java
@@ -25,7 +25,7 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.syncope.client.console.commons.PreviewUtils;
import org.apache.syncope.client.console.commons.HttpResourceStream;
import org.apache.syncope.client.console.commons.Constants;
-import org.apache.syncope.client.console.pages.BaseModalPage;
+import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.wicket.Component;
import org.apache.wicket.ajax.AjaxRequestTarget;
@@ -140,7 +140,7 @@ public class BinaryFieldPanel extends FieldPanel<String> {
target.add(uploadForm);
} catch (Exception e) {
error(getString(Constants.ERROR) + ": " + e.getMessage());
- ((BaseModalPage) getPage()).getFeedbackPanel().refresh(target);
+ ((BasePage) getPage()).getFeedbackPanel().refresh(target);
LOG.error("While saving uploaded file", e);
}
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/resources/org/apache/syncope/client/console/pages/AbstractStatusModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/AbstractStatusModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/AbstractStatusModalPage.properties
index 0f1fcdc..badba8d 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/AbstractStatusModalPage.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/AbstractStatusModalPage.properties
@@ -17,3 +17,7 @@
title=Global Status
changePwdLabel=Password propagation
passwordMismatch=Password mismatch
+
+resourceName=Resource
+connObjectLink=Connector Object Link
+status=Status
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/resources/org/apache/syncope/client/console/pages/AbstractStatusModalPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/AbstractStatusModalPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/AbstractStatusModalPage_it.properties
index d30c99c..ddda78c 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/AbstractStatusModalPage_it.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/AbstractStatusModalPage_it.properties
@@ -17,3 +17,8 @@
title=Stato Globale
changePwdLabel=Propagazione password
passwordMismatch=Password non corrispondenti
+
+resourceName=Risorsa
+connObjectLink=Connector Object Link
+status=Stato
+
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/resources/org/apache/syncope/client/console/pages/AbstractStatusModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/AbstractStatusModalPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/AbstractStatusModalPage_pt_BR.properties
index 36d86e8..27b8dce 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/AbstractStatusModalPage_pt_BR.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/AbstractStatusModalPage_pt_BR.properties
@@ -17,3 +17,8 @@
title=Estatus Global
changePwdLabel=Password propagation
passwordMismatch=Password mismatch
+
+resourceName=Recurso
+connObjectLink=Connector Object Link
+status=Estado
+
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage.html
deleted file mode 100644
index 8f4527c..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage.html
+++ /dev/null
@@ -1,55 +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.
--->
-<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
- <head>
- <title></title>
-
- <link href="webjars/font-awesome/${font-awesome.version}/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
- <link href="webjars/ionicons/${ionicons.version}/css/ionicons.min.css" rel="stylesheet" type="text/css" />
-
- <link href="css/AdminLTE_plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet" type="text/css" />
- <link href="css/AdminLTE_skins/skin-green.css" rel="stylesheet" type="text/css" />
- <link href="css/syncopeConsole.css" rel="stylesheet" type="text/css" />
- <link href="css/fieldstyle.css" rel="stylesheet" type="text/css" />
-
- <script type="text/javascript" src="webjars/jquery-ui/${jquery-ui.version}/jquery-ui.min.js"></script>>
-
- <script type="text/javascript">
- var notificationShownTimes = 0;
-
- function showNotification(componentId, messagecount) {
- notificationShownTimes++;
- timeout = 1700 + (messagecount * 500) + notificationShownTimes * 200;
- $('div#' + componentId).fadeTo('normal', 1.0);
- setTimeout("$('div#" + componentId + "').fadeOut('normal')", timeout);
- }
- </script>
-
- <style type="text/css">
- table.palette td.header {
- background:url("images/ui-bg_glass_75_e6e6e6_1x400.png")
- repeat-x scroll 50% 50% #E6E6E6 !important;
- }
- </style>
- </head>
- <body onload="setTimeout('window.focus();', 0);">
- <div wicket:id="feedback"/>
- <wicket:child />
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage.properties
deleted file mode 100644
index e696256..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage.properties
+++ /dev/null
@@ -1,20 +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.
-submit=Save
-add=Add
-remove=Delete
-cancel=Cancel
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage_it.properties
deleted file mode 100644
index 58e0aa0..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage_it.properties
+++ /dev/null
@@ -1,20 +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.
-submit=Salva
-add=Aggiungi
-remove=Elimina
-cancel=Annulla
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage_pt_BR.properties
deleted file mode 100644
index 490fe30..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage_pt_BR.properties
+++ /dev/null
@@ -1,20 +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.
-submit=Salvar
-add=Adicionar
-remove=Remover
-cancel=Cancelar
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResourceModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResourceModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResourceModalPage.html
deleted file mode 100644
index 8cb22f0..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResourceModalPage.html
+++ /dev/null
@@ -1,56 +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.
--->
-<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
- <wicket:extend>
- <form wicket:id="form">
- <div class="tabbable tabs-left">
- <ul class="nav nav-tabs">
- <li class="active"><a data-toggle="tab" href="#resource"><span><wicket:message key="resource"/></span></a></li>
- <li><a data-toggle="tab" href="#umapping"><span><wicket:message key="umapping"/></span></a></li>
- <li><a data-toggle="tab" href="#gmapping"><span><wicket:message key="gmapping"/></span></a></li>
- <li><a data-toggle="tab" href="#connectorProperties"><span><wicket:message key="connectorProperties"/></span></a></li>
- <li><a data-toggle="tab" href="#security"><span><wicket:message key="security"/></span></a></li>
- </ul>
- <div class="tab-content">
- <div id="resource" class="tab-pane active">
- <span wicket:id="details">[details]</span>
- <span wicket:id="systeminformation">[System Information]</span>
- </div>
- <div id="umapping" class="tab-pane">
- <span wicket:id="umapping">[umapping]</span>
- </div>
- <div id="gmapping" class="tab-pane">
- <span wicket:id="gmapping">[gmapping]</span>
- </div>
- <div id="connectorProperties" class="tab-pane">
- <span wicket:id="connconf">[connconf]</span>
- </div>
- <div id="security" class="tab-pane">
- <span wicket:id="security">[security]</span>
- </div>
- </div>
- </div>
-
- <div class="modal-footer">
- <input type="submit" class="btn btn-primary" wicket:id="apply"/>
- <input type="button" class="btn btn-default" wicket:id="cancel"/>
- </div>
- </form>
- </wicket:extend>
-</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResourceModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResourceModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResourceModalPage.properties
deleted file mode 100644
index 789919b..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResourceModalPage.properties
+++ /dev/null
@@ -1,60 +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.
-resource=Resource details
-umapping=User mapping
-connectorProperties=Connector properties
-security=Security
-required_alert=All form fields are required
-connector=Connector
-existing_resources=Existing resources
-action=Action
-edit_attribute=Edit resource
-title=Resource
-extAttrNames=External attributes
-intMappingTypes=Internal mapping types
-entity=Entity
-groupSchema=Group Schema
-connObjectKey=ConnObjectKey
-mandatoryCondition=Mandatory
-password=Password
-purpose=Purpose
-mappingUserSchema=Mapping User Schema
-mappingGroupSchema=Mapping Group Schema
-delete=Delete
-intAttrNames=Internal attributes
-enforceMandatoryCondition=Enforce mandatory condition
-fieldName=Field name
-
-connObjectKeyValidation=There must be exactly one ConnObjectKey
-propagationMode=Propagation mode
-connObjectLink=ConnObjectLink
-enable=Enable
-
-createTraceLevel=Create trace level
-updateTraceLevel=Update trace level
-deleteTraceLevel=Delete trace level
-syncTraceLevel=Synchronization trace level
-propagationPriority=Propagation priority
-propagationPrimary=Propagation primary
-
-success_connection=Successful connection
-error_connection=Connection failure
-check=Check connection
-actionsClasses=Actions classes
-gmapping=Group mapping
-new=New resource
-randomPwdIfNotProvided=Generate random passwords when missing
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResourceModalPage_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResourceModalPage_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResourceModalPage_it.properties
deleted file mode 100644
index 54179a5..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResourceModalPage_it.properties
+++ /dev/null
@@ -1,60 +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.
-resource=Dettagli Risorsa
-umapping=Mapping utenti
-connectorProperties=Propriet\u00e0\u00a0 Connettore
-security=Sicurezza
-required_alert=Tutti i campi sono richiesti
-connector=Connettore
-existing_resources=Risorse esistenti
-action=Azione
-edit_attribute=Modifica risorsa
-title=Risorsa
-extAttrNames=Attributi esterni
-intMappingTypes=Tipo mapping interno
-entity=Entità
-groupSchema=Schema Gruppo
-connObjectKey=ConnObjectKey
-mandatoryCondition=Obbligatorio
-password=Password
-purpose=Scopo
-mappingUserSchema=Mapping User Schema
-mappingGroupSchema=Mapping Group Schema
-delete=Rimuovi
-intAttrNames=Attributi interni
-enforceMandatoryCondition=Abilita mandatory condition
-fieldName=Nome campo
-
-connObjectKeyValidation=Deve essere definito esattamente un ConnObjectKey
-propagationMode=Modalit\u00e0 di propagazione
-connObjectLink=ConnObjectLink
-enable=Abilita
-
-createTraceLevel=Livello di tracciamento delle creazioni
-updateTraceLevel=Livello di tracciamento degli aggiornamenti
-deleteTraceLevel=Livello di tracciamento delle cancellazioni
-syncTraceLevel=Livello di tracciamento delle sincronizzazioni
-propagationPriority=Priorit\u00e0 in propagazione
-propagationPrimary=Primaria in propagazione
-
-success_connection=Connessione avvenuta con successo
-error_connection=Connessione non riuscita
-check=Verifica connessione
-actionsClasses=Classi azioni
-gmapping=Mapping gruppi
-new=Nuova risorsa
-randomPwdIfNotProvided=Genera password casuali se mancanti
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResourceModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResourceModalPage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResourceModalPage_pt_BR.properties
deleted file mode 100644
index 45c3616..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResourceModalPage_pt_BR.properties
+++ /dev/null
@@ -1,60 +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.
-resource=Detalhes de Recursos
-umapping=Mapeamento de usu\u00e1rios
-connectorProperties=Propriedades de Conectores
-security=Seguran\u00e7a
-required_alert=Todos os campos deste formul\u00e1rio s\u00e3o obrigat\u00f3rios
-connector=Conector
-existing_resources=Recursos Existentes
-action=A\u00e7\u00e3o
-edit_attribute=Alterar Recurso
-title=Recurso
-extAttrNames=Atributos Externos
-intMappingTypes=Tipos internos de mapeamentos
-entity=Entidade
-groupSchema=Esquema de Grupo
-connObjectKey=ConnObjectKey
-mandatoryCondition=Obrigat\u00f3rio
-password=Senha
-purpose=Prop\u00f3sito
-mappingUserSchema=Esquema de mapeamento de usu\u00e1rio
-mappingGroupSchema=Esquema de mapeamento de grupo
-delete=Excluir
-intAttrNames=Atributos internos
-enforceMandatoryCondition=Aplicar condi\u00e7\u00e3o obrigat\u00f3ria
-fieldName=Nome do Campo
-
-connObjectKeyValidation=Precisa ser exatamente um ConnObjectKey
-propagationMode=Modo de propaga\u00e7\u00e3o
-connObjectLink=ConnObjectLink
-enable=Habilitado
-
-createTraceLevel=Criar n\u00edvel de trace
-updateTraceLevel=Atualizar n\u00edvel de trace
-deleteTraceLevel=Excluir n\u00edvel de trace
-syncTraceLevel=N\u00edvel de trace de sincroniza\u00e7\u00e3o
-propagationPriority=Prioridade de propaga\u00e7\u00e3o
-propagationPrimary=Propaga\u00e7\u00e3o prim\u00e1ria
-
-success_connection=Conex\u00e3o com sucesso
-error_connection=Conex\u00e3o sem sucesso
-check=Verificar a conex\u00e3o
-actionsClasses=Classes de a\u00e7\u00f5es
-gmapping=Mapeamento de grupos
-new=Novo recurso
-randomPwdIfNotProvided=Gerar senhas aleat\u00f3rias quando n\u00e3o houver
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResultStatusModal.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResultStatusModal.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResultStatusModal.html
new file mode 100644
index 0000000..647a311
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResultStatusModal.html
@@ -0,0 +1,226 @@
+<!--
+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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:head>
+ <style>
+ div#propagation {
+ font-size: 8px;
+ height: auto;
+ margin-top: 3px;
+ text-align: left;
+ }
+
+ div#status {
+ float: left;
+ height: 25px;
+ margin-top: 3px;
+ text-align: center;
+ width: 8%;
+ }
+
+ div.assignment {
+ border: 1px solid #DDDDDD;
+ display: inline-table;
+ margin-bottom: 20px;
+ width: 100%;
+ }
+
+ div.assignments {
+ color: #555555;
+ display: inline-table;
+ margin-top: 20px;
+ width: 100%;
+ }
+
+ div.header {
+ display: inline-table;
+ margin: 5px;
+ width: 98%;
+ }
+
+ div.profile div#row{
+ display: inline-table;
+ width:100%;
+ vertical-align: middle;
+ }
+
+ div.profile {
+ background-color: #EEEEEE;
+ color: #555555;
+ display: inline-table;
+ margin: 0px 5px 5px 5px;
+ width: 98%;
+ }
+
+ div#name {
+ border-bottom: 1px solid #DDDDDD;
+ display: table-cell;
+ height: 15px;
+ width: 220px;
+ padding: 0px 5px 0px 5px;
+ vertical-align: middle;
+ }
+
+ div#value {
+ border-bottom: 1px solid #DDDDDD;
+ border-left: 1px solid #DDDDDD;
+ display: table-cell;
+ height: 15px;
+ width: 38%;
+ padding: 0px 5px 0px 5px;
+ overflow: hidden;
+ vertical-align: middle;
+ }
+
+ div#resource {
+ display: table-cell;
+ width: 220px;
+ height: 30px;
+ padding: 10px 0px 5px 0px;
+ }
+
+ div#resource img{
+ width: 12px;
+ height: 12px;
+ position: relative;
+ left: 3px;
+ top: 1px;
+ opacity: 1;
+ }
+
+ div#attrhead {
+ display: table-cell;
+ border-left: 1px solid #DDDDDD;
+ width: 38%;
+ height: 30px;
+ padding: 3px 0px 5px 0px;
+ text-align: center;
+ vertical-align: middle;
+ font-size: 11px;
+ }
+ </style>
+ </wicket:head>
+ <wicket:extend>
+
+ <wicket:fragment wicket:id="propagationResultFrag">
+ <p class="ui-widget ui-corner-all ui-widget-header">
+ <wicket:message key="operationResult"/> <span wicket:id="info"/>
+ </p>
+
+ <div class="assignments">
+ <div wicket:id="resources" class="assignment">
+
+ <span wicket:id="attrhead">[Attributes head]</span>
+
+ <div class="profile">
+ <span wicket:id="attrs">
+ <div id="row">
+ <div id="name">
+ <span wicket:id="attrName">[Attribute name]</span>
+ </div>
+ <div id="value">
+ <span wicket:id="beforeValue">[Before value]</span>
+ </div>
+ <div id="value">
+ <span wicket:id="afterValue">[After value]</span>
+ </div>
+ </div>
+ </span>
+ </div>
+ </div>
+ </div>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="userSelfResultFrag">
+ <p><wicket:message key="selfResult"/></p>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="remoteStatusFrag">
+ <img wicket:id="status"/>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="attrValueFrag">
+ <span wicket:id="value">[After value]</span>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="attrHeadFrag">
+ <div class="header alt">
+ <div id="resource">
+ <div>
+ <span wicket:id="resource">[resource name]</span>
+ <a wicket:id="showFailureWindow" href="#">
+ <img wicket:id="icon"/>
+ </a>
+
+ <div id="propagation">
+ <wicket:message key="propresult">[propagation result message]</wicket:message>
+
+ <span wicket:id="propagation">[propagation result]</span>
+ </div>
+
+ <div wicket:id="failureWindow"></div>
+
+ </div>
+ </div>
+
+ <div id="attrhead">
+ <wicket:message key="before">[before]</wicket:message>
+ </div>
+
+ <div id="attrhead">
+ <wicket:message key="after">[after]</wicket:message>
+ </div>
+ </div>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="emptyAttrHeadFrag">
+ <div class="header alt">
+ <div id="resource">
+ <div>
+ <span wicket:id="resource">[resource name]</span>
+ <a wicket:id="showFailureWindow" href="#">
+ <img wicket:id="icon"/>
+ </a>
+
+ <div id="propagation">
+ <wicket:message key="propresult">[propagation result message]</wicket:message>
+
+ <span wicket:id="propagation">[propagation result]</span>
+ <div wicket:id="failureWindow"></div>
+
+ </div>
+
+ </div>
+ </div>
+ </div>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="emptyFrag">
+ </wicket:fragment>
+
+ <div wicket:id="container" id="users-contain" class="ui-widget" style="margin:30px; width:inherit">
+
+ <span wicket:id="resultFrag"/>
+
+ <a class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" wicket:id="close">
+ <wicket:message key="close"/>
+ </a>
+ </div>
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResultStatusModal.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResultStatusModal.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResultStatusModal.properties
new file mode 100644
index 0000000..3ee25f8
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResultStatusModal.properties
@@ -0,0 +1,26 @@
+# 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.
+operationResult=Operation result for
+close=Close
+selfResult=Your request has been registered: depending on configuration, approval might be required.
+__NAME__=Account Link
+__UID__=Account Id
+__PASSWORD__=Password
+__ENABLE__=Enabled
+propresult=Propagation:
+before=Before propagation
+after=After propagation
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResultStatusModal_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResultStatusModal_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResultStatusModal_it.properties
new file mode 100644
index 0000000..92ee70e
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResultStatusModal_it.properties
@@ -0,0 +1,26 @@
+# 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.
+operationResult=Risultato dell'operazione per
+close=Chiudi
+selfResult=La sua richiesta \u00e8 stata presa in carico: se la configurazione lo prevede, sar\u00e0 necessaria l'approvazione.
+__NAME__=Account Link
+__UID__=Account Id
+__PASSWORD__=Password
+__ENABLE__=Abilitato
+propresult=Propagazione:
+before=Prima della propagazione
+after=Dopo la propagazione
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResultStatusModal_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResultStatusModal_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResultStatusModal_pt_BR.properties
new file mode 100644
index 0000000..319d1c9
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/ResultStatusModal_pt_BR.properties
@@ -0,0 +1,26 @@
+# 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.
+operationResult=Resultado de opera\u00E7\u00E3o para\:
+close=Fechar
+selfResult=Sua requis\u00E7\u00E3o foi registrada e ser\u00E1 encaminhada ao administrador respons\u00E1vel. Obrigado
+__NAME__=Link de conta
+__UID__=Identificador de Conta
+__PASSWORD__=Senha
+__ENABLE__=Habilitado
+propresult=Propaga\u00E7\u00E3o
+before=Antes da Propaga\u00E7\u00E3o
+after=Depois da Propaga\u00E7\u00E3o
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.html
index e543318..457ccc8 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.html
@@ -17,32 +17,31 @@ specific language governing permissions and limitations
under the License.
-->
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
- <wicket:panel>
- <div wicket:id="container">
- <span wicket:id="resultTable">[Table]</span>
-
- <span style="float:right">
- <form wicket:id="paginator" style="display:inline">
- <div class="col-sm-6">
- <div class="dataTables_length">
- <label>
- <wicket:message key="displayRows"/>
- <select class="form-control input-sm" wicket:id="rowsChooser"/>
- </label>
- </div>
- </div>
- </form>
- </span>
- </div>
-
- <div wicket:id="editModal">
- </div>
+ <head>
+ <title>Search result panel</title>
+ </head>
+ <body>
+ <wicket:panel>
+ <div wicket:id="container">
+ <span wicket:id="resultTable">[Table]</span>
- <div wicket:id="displayModal">
- </div>
+ <span style="float:right">
+ <form wicket:id="paginator" style="display:inline">
+ <div class="col-sm-6">
+ <div class="dataTables_length">
+ <label>
+ <wicket:message key="displayRows"/>
+ <select class="form-control input-sm" wicket:id="rowsChooser"/>
+ </label>
+ </div>
+ </div>
+ </form>
+ </span>
+ </div>
- <div wicket:id="statusModal">
- </div>
+ <div wicket:id="modal">
+ </div>
- </wicket:panel>
+ </wicket:panel>
+ </body>
</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.properties
index 6f016a4..07db51e 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.properties
@@ -28,3 +28,7 @@ username=Username
creationDate=Creation Date
tokenValued=Valued
tokenNotValued=Not valued
+
+any.edit=Edit object {0}
+any.new=New object
+any.attr.display=Attributes to be displayed
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel_it.properties
index 02b3b57..0d0d580 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel_it.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel_it.properties
@@ -28,3 +28,7 @@ username=Username
creationDate=Data Creazione
tokenValued=Valued
tokenNotValued=Not valued
+
+any.edit=Edit object {0}
+any.new=New object
+any.attr.display=Attributes to be displayed
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel_pt_BR.properties
index 1591edc..e06e38e 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel_pt_BR.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel_pt_BR.properties
@@ -18,13 +18,17 @@ displayRows=Mostrar linhas
firstname=Nome
surname=Sobrenome
-userId=Identificador do Usu\u00E1rio
+userId=Identificador do Usu\u00e1rio
edit=Alterar
delete=Excluir
id=Identificador
status=Estatus
token=Token
-username=Nome de Usu\u00E1rio
-creationDate=Data de Cria\u00E7\u00E3o
-tokenValued=Atribu\u00EDdo
-tokenNotValued=N\u00E3o Atribu\u00EDdo
+username=Nome de Usu\u00e1rio
+creationDate=Data de Cria\u00e7\u00e3o
+tokenValued=Atribu\u00eddo
+tokenNotValued=N\u00e3o Atribu\u00eddo
+
+any.edit=Edit object {0}
+any.new=New object
+any.attr.display=Attributes to be displayed
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/resources/org/apache/syncope/client/console/panels/ImagePanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ImagePanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ImagePanel.html
new file mode 100644
index 0000000..8eba8b8
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ImagePanel.html
@@ -0,0 +1,28 @@
+<!--
+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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <head>
+ <title>Image panel</title>
+ </head>
+ <body>
+ <wicket:panel>
+ <img wicket:id="img" />
+ </wicket:panel>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/resources/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder$ConnObjectLink.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder$ConnObjectLink.html b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder$ConnObjectLink.html
index 0dc5137..cb4d27f 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder$ConnObjectLink.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder$ConnObjectLink.html
@@ -20,10 +20,10 @@ under the License.
xmlns:wicket="http://xmlns.jcp.org/jsf/composite">
<wicket:panel>
<span wicket:id="connObjectLinkContainer">
- <div>
+ <div class="form-group">
<span wicket:id="connObjectLinkCheckbox">[connObjectLinkCheckbox]</span>
</div>
- <div>
+ <div class="form-group">
<span wicket:id="connObjectLink">[connObjectLink]</span>
</div>
</span>
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/pages/CamelRouteModalPage.java
----------------------------------------------------------------------
diff --git a/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/pages/CamelRouteModalPage.java b/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/pages/CamelRouteModalPage.java
index 301c310..b24e360 100644
--- a/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/pages/CamelRouteModalPage.java
+++ b/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/pages/CamelRouteModalPage.java
@@ -19,7 +19,9 @@
package org.apache.syncope.client.console.pages;
import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.panels.AbstractModalPanel;
import org.apache.syncope.client.console.rest.CamelRouteRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.common.lib.SyncopeClientException;
import org.apache.syncope.common.lib.to.CamelRouteTO;
import org.apache.syncope.common.lib.types.Entitlement;
@@ -28,7 +30,6 @@ import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.form.AjaxButton;
import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
-import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.TextArea;
import org.apache.wicket.model.CompoundPropertyModel;
@@ -36,20 +37,24 @@ import org.apache.wicket.model.Model;
import org.apache.wicket.model.PropertyModel;
import org.apache.wicket.spring.injection.annot.SpringBean;
-public class CamelRouteModalPage extends BaseModalPage {
+public class CamelRouteModalPage extends AbstractModalPanel {
private static final long serialVersionUID = -1438441210568592931L;
@SpringBean
private CamelRouteRestClient restClient;
- public CamelRouteModalPage(final PageReference pageRef, final ModalWindow window,
- final CamelRouteTO routeTO, final boolean createFlag) {
+ public CamelRouteModalPage(
+ final BaseModal<?> modal,
+ final PageReference pageRef,
+ final CamelRouteTO routeTO,
+ final boolean createFlag) {
+
+ super(modal, pageRef);
Form<CamelRouteTO> routeForm = new Form<>("routeDefForm");
- final TextArea<String> routeDefArea =
- new TextArea<>("content", new PropertyModel<String>(routeTO, "content"));
+ final TextArea<String> routeDefArea = new TextArea<>("content", new PropertyModel<String>(routeTO, "content"));
routeForm.add(routeDefArea);
routeForm.setModel(new CompoundPropertyModel<>(routeTO));
@@ -67,16 +72,16 @@ public class CamelRouteModalPage extends BaseModalPage {
// Uncomment with something similar once SYNCOPE-156 is completed
// Configuration callerPage = (Configuration) pageRef.getPage();
// callerPage.setModalResult(true);
- window.close(target);
+ modal.close(target);
} catch (SyncopeClientException scee) {
error(getString(Constants.ERROR) + ": " + scee.getMessage());
}
- target.add(feedbackPanel);
+ modal.getFeedbackPanel().refresh(target);
}
@Override
protected void onError(final AjaxRequestTarget target, final Form<?> form) {
- target.add(feedbackPanel);
+ modal.getFeedbackPanel().refresh(target);
}
};
[25/28] syncope git commit: provides wizard to create users,
groups and any objects + several changes merged from master
Posted by fm...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/bootstrap/dialog/BaseModal.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/bootstrap/dialog/BaseModal.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/bootstrap/dialog/BaseModal.java
index 2b3c49d..e030ef7 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/bootstrap/dialog/BaseModal.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/bootstrap/dialog/BaseModal.java
@@ -27,6 +27,7 @@ import java.util.ArrayList;
import java.util.List;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.panels.AbstractModalPanel;
+import org.apache.syncope.client.console.panels.ModalPanel;
import org.apache.syncope.client.console.panels.NotificationPanel;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.buttons.DefaultModalCloseButton;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.buttons.PrimaryModalButton;
@@ -39,6 +40,7 @@ import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.model.IModel;
import org.slf4j.Logger;
@@ -63,7 +65,7 @@ public class BaseModal<T extends Serializable> extends Modal<T> {
private WindowClosedCallback windowClosedCallback;
- private AbstractModalPanel content;
+ private Panel content;
private PrimaryModalButton submitButton;
@@ -127,11 +129,19 @@ public class BaseModal<T extends Serializable> extends Modal<T> {
return form.getModelObject();
}
- public AbstractModalPanel getContent() {
- return content;
+ public ModalPanel getContent() {
+ return ModalPanel.class.cast(content);
}
- public BaseModal<T> setContent(final AbstractModalPanel component) {
+ public BaseModal<T> setContent(final ModalPanel component) {
+ if (component instanceof Panel) {
+ return setInternalContent(Panel.class.cast(component));
+ }
+ throw new IllegalArgumentException("Panel instance is required");
+
+ }
+
+ private BaseModal<T> setInternalContent(final Panel component) {
if (!component.getId().equals(getContentId())) {
throw new WicketRuntimeException(
"Modal content id is wrong. Component ID:" + component.getId() + "; content ID: " + getContentId());
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/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 8ad55f6..fda21bf 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
@@ -53,6 +53,8 @@ public final class ActionLinksPanel<T extends Serializable> extends Panel {
this.model = model;
this.pageRef = pageRef;
+ setOutputMarkupId(true);
+
super.add(new Fragment("panelClaim", "emptyFragment", this));
super.add(new Fragment("panelManageResources", "emptyFragment", this));
super.add(new Fragment("panelManageUsers", "emptyFragment", this));
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/BinaryFieldPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/BinaryFieldPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/BinaryFieldPanel.java
index b7a524a..1311980 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/BinaryFieldPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/BinaryFieldPanel.java
@@ -19,6 +19,7 @@
package org.apache.syncope.client.console.wicket.markup.html.form;
import java.io.ByteArrayInputStream;
+import java.lang.reflect.InvocationTargetException;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import org.apache.commons.lang3.StringUtils;
@@ -61,7 +62,7 @@ public class BinaryFieldPanel extends FieldPanel<String> {
private final Fragment emptyFragment;
- private final PreviewUtils previewUtils = PreviewUtils.getInstance();
+ private final transient PreviewUtils previewUtils = PreviewUtils.getInstance();
public BinaryFieldPanel(final String id, final String name, final IModel<String> model, final String mimeType) {
super(id, model);
@@ -135,7 +136,7 @@ public class BinaryFieldPanel extends FieldPanel<String> {
uploadForm.addOrReplace(fileUpload);
downloadLink.setEnabled(StringUtils.isNotBlank(uploaded));
target.add(uploadForm);
- } catch (Exception e) {
+ } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) {
error(getString(Constants.ERROR) + ": " + e.getMessage());
((BasePage) getPage()).getFeedbackPanel().refresh(target);
LOG.error("While saving uploaded file", e);
@@ -198,7 +199,7 @@ public class BinaryFieldPanel extends FieldPanel<String> {
if (panelPreview != null) {
changePreviewer(panelPreview);
}
- } catch (Exception e) {
+ } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) {
LOG.error("While loading saved file", e);
}
downloadLink.setEnabled(StringUtils.isNotBlank(model.getObject()));
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/SpinnerFieldPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/SpinnerFieldPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/SpinnerFieldPanel.java
index 3370cd7..3d923c6 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/SpinnerFieldPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/SpinnerFieldPanel.java
@@ -67,8 +67,8 @@ public class SpinnerFieldPanel<T extends Number> extends FieldPanel<T> {
}
private void init(final String name, final Class<T> reference, final IModel<T> model, final SpinnerConfig conf) {
- final Spinner<T> spinner = new Spinner<>("spinner", model, conf);
- add(spinner);
+ field = new Spinner<>("spinner", model, conf);
+ add(field);
this.name = name;
this.model = model;
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/wizards/AjaxWizard.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/AjaxWizard.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/AjaxWizard.java
index caa3857..1a1cdc5 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/AjaxWizard.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/AjaxWizard.java
@@ -16,6 +16,7 @@
package org.apache.syncope.client.console.wizards;
import java.io.Serializable;
+import org.apache.syncope.client.console.panels.ModalPanel;
import org.apache.syncope.client.console.panels.NotificationPanel;
import org.apache.wicket.Component;
import org.apache.wicket.PageReference;
@@ -23,13 +24,18 @@ import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.event.Broadcast;
import org.apache.wicket.extensions.wizard.Wizard;
import org.apache.wicket.extensions.wizard.WizardModel;
+import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.request.cycle.RequestCycle;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
-public abstract class AjaxWizard<T extends Serializable> extends Wizard {
+public abstract class AjaxWizard<T extends Serializable> extends Wizard implements ModalPanel {
private static final long serialVersionUID = 1L;
+ protected static final Logger LOG = LoggerFactory.getLogger(AjaxWizard.class);
+
private final PageReference pageRef;
private T item;
@@ -87,9 +93,15 @@ public abstract class AjaxWizard<T extends Serializable> extends Wizard {
*/
@Override
public final void onCancel() {
- onCancelInternal();
- send(pageRef.getPage(), Broadcast.DEPTH,
- new NewItemCancelEvent<T>(item, RequestCycle.get().find(AjaxRequestTarget.class)));
+ final AjaxRequestTarget target = RequestCycle.get().find(AjaxRequestTarget.class);
+ try {
+ onCancelInternal();
+ send(pageRef.getPage(), Broadcast.DEPTH, new NewItemCancelEvent<T>(item, target));
+ } catch (Exception e) {
+ LOG.warn("Wizard error on cancel", e);
+ error(getString("wizard.cancel.error"));
+ feedbackPanel.refresh(target);
+ }
}
/**
@@ -97,9 +109,15 @@ public abstract class AjaxWizard<T extends Serializable> extends Wizard {
*/
@Override
public final void onFinish() {
- onApplyInternal();
- send(pageRef.getPage(), Broadcast.DEPTH,
- new NewItemFinishEvent<T>(item, RequestCycle.get().find(AjaxRequestTarget.class)));
+ final AjaxRequestTarget target = RequestCycle.get().find(AjaxRequestTarget.class);
+ try {
+ onApplyInternal();
+ send(pageRef.getPage(), Broadcast.DEPTH, new NewItemFinishEvent<T>(item, target));
+ } catch (Exception e) {
+ LOG.warn("Wizard error on finish", e);
+ error(getString("wizard.apply.error"));
+ feedbackPanel.refresh(target);
+ }
}
public T getItem() {
@@ -171,4 +189,14 @@ public abstract class AjaxWizard<T extends Serializable> extends Wizard {
}
}
+
+ @Override
+ public void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ onApplyInternal();
+ }
+
+ @Override
+ public void onError(final AjaxRequestTarget target, final Form<?> form) {
+ feedbackPanel.refresh(target);
+ }
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/wizards/AjaxWizardBuilder.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/AjaxWizardBuilder.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/AjaxWizardBuilder.java
index 035eab6..7c778e7 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/AjaxWizardBuilder.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/AjaxWizardBuilder.java
@@ -28,7 +28,7 @@ public abstract class AjaxWizardBuilder<T extends Serializable> {
private final PageReference pageRef;
- private final T defaultItem;
+ private T defaultItem;
private T item;
@@ -55,7 +55,7 @@ public abstract class AjaxWizardBuilder<T extends Serializable> {
public AjaxWizard<T> build(final boolean edit) {
final T modelObject = getItem();
- setItem(null);
+ this.item = null;
return new AjaxWizard<T>(id, modelObject, buildModelSteps(modelObject, new WizardModel()), pageRef, edit) {
@@ -63,34 +63,39 @@ public abstract class AjaxWizardBuilder<T extends Serializable> {
@Override
protected void onCancelInternal() {
- AjaxWizardBuilder.this.onCancelInternal();
+ AjaxWizardBuilder.this.onCancelInternal(getItem());
}
@Override
protected void onApplyInternal() {
- AjaxWizardBuilder.this.onApplyInternal();
+ AjaxWizardBuilder.this.onApplyInternal(getItem());
}
};
}
protected abstract WizardModel buildModelSteps(final T modelObject, final WizardModel wizardModel);
- protected abstract void onCancelInternal();
+ protected abstract void onCancelInternal(T modelObject);
- protected abstract void onApplyInternal();
+ protected abstract void onApplyInternal(T modelObject);
+
+ protected T getDefaultItem() {
+ return defaultItem;
+ }
private T getItem() {
return item == null ? SerializationUtils.clone(defaultItem) : item;
}
/**
- * Replaces the default value provided with the constructor.
+ * Replaces the default value provided with the constructor and nullify working item object.
*
* @param item new value.
* @return the current wizard factory instance.
*/
public AjaxWizardBuilder<T> setItem(final T item) {
- this.item = item;
+ this.defaultItem = item;
+ this.item = null;
return this;
}
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/wizards/AjaxWizardButtonBar.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/AjaxWizardButtonBar.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/AjaxWizardButtonBar.java
index b272ff8..7ceb2fd 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/AjaxWizardButtonBar.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/AjaxWizardButtonBar.java
@@ -71,6 +71,7 @@ public class AjaxWizardButtonBar extends WizardButtonBar {
@Override
protected void onClick(final AjaxRequestTarget target, final Form<?> form) {
getWizardModel().previous();
+ wizard.modelChanged();
target.add(wizard);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/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
new file mode 100644
index 0000000..1e02025
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/WizardMgtPanel.java
@@ -0,0 +1,216 @@
+/*
+ * 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.wizards;
+
+import java.io.Serializable;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.panels.NotificationPanel;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.event.Broadcast;
+import org.apache.wicket.event.IEvent;
+import org.apache.wicket.event.IEventSource;
+import org.apache.wicket.markup.html.TransparentWebMarkupContainer;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.panel.Fragment;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.ResourceModel;
+
+public abstract class WizardMgtPanel<T extends Serializable> extends Panel implements IEventSource {
+
+ private static final long serialVersionUID = 1L;
+
+ private final WebMarkupContainer container;
+
+ private final Fragment initialFragment;
+
+ private final AjaxLink<?> addAjaxLink;
+
+ private AjaxWizardBuilder<T> newItemPanelBuilder;
+
+ private NotificationPanel notificationPanel;
+
+ private final PageReference pageRef;
+
+ /**
+ * Modal window.
+ */
+ protected final BaseModal<T> modal = new BaseModal<T>("modal") {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ protected void onConfigure() {
+ super.onConfigure();
+ setFooterVisible(false);
+ }
+
+ };
+
+ private final boolean wizardInModal;
+
+ public WizardMgtPanel(final String id, final PageReference pageRef) {
+ this(id, pageRef, false);
+ }
+
+ public WizardMgtPanel(final String id, final PageReference pageRef, final boolean wizardInModal) {
+ super(id);
+ setOutputMarkupId(true);
+ this.pageRef = pageRef;
+ this.wizardInModal = wizardInModal;
+
+ add(modal);
+
+ container = new TransparentWebMarkupContainer("container");
+ container.setOutputMarkupPlaceholderTag(true).setOutputMarkupId(true);
+ add(container);
+
+ initialFragment = new Fragment("content", "default", this);
+ container.addOrReplace(initialFragment);
+
+ addAjaxLink = new AjaxLink<T>("add") {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ send(WizardMgtPanel.this, Broadcast.BREADTH, new AjaxWizard.NewItemActionEvent<T>(null, target));
+ }
+ };
+
+ addAjaxLink.setEnabled(false);
+ addAjaxLink.setVisible(false);
+ initialFragment.add(addAjaxLink);
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public void onEvent(final IEvent<?> event) {
+ if (event.getPayload() instanceof AjaxWizard.NewItemEvent) {
+ final AjaxRequestTarget target = AjaxWizard.NewItemEvent.class.cast(event.getPayload()).getTarget();
+
+ final T item = ((AjaxWizard.NewItemEvent<T>) event.getPayload()).getItem();
+
+ if (event.getPayload() instanceof AjaxWizard.NewItemActionEvent) {
+ if (item != null) {
+ newItemPanelBuilder.setItem(item);
+ }
+
+ final AjaxWizard<T> wizard = newItemPanelBuilder.build(
+ ((AjaxWizard.NewItemActionEvent<T>) event.getPayload()).getIndex());
+
+ if (wizardInModal) {
+ final IModel<T> model = new CompoundPropertyModel<>(item);
+ modal.setFormModel(model);
+
+ target.add(modal.setContent(wizard));
+
+ modal.header(new ResourceModel("item.new", "New item"));
+ modal.show(true);
+ } else {
+ final Fragment fragment = new Fragment("content", "wizard", WizardMgtPanel.this);
+ fragment.add(wizard);
+ container.addOrReplace(fragment);
+ }
+ } else {
+ if (event.getPayload() instanceof AjaxWizard.NewItemFinishEvent) {
+ if (notificationPanel != null) {
+ getSession().info(getString(Constants.OPERATION_SUCCEEDED));
+ notificationPanel.refresh(target);
+ }
+ }
+
+ if (wizardInModal) {
+ modal.show(false);
+ modal.close(target);
+ } else {
+ container.addOrReplace(initialFragment);
+ }
+ }
+
+ target.add(container);
+ }
+ super.onEvent(event);
+ }
+
+ private WizardMgtPanel<T> addNewItemPanelBuilder(final AjaxWizardBuilder<T> panelBuilder) {
+ this.newItemPanelBuilder = panelBuilder;
+
+ if (this.newItemPanelBuilder != null) {
+ addAjaxLink.setEnabled(true);
+ addAjaxLink.setVisible(true);
+ }
+
+ return this;
+ }
+
+ private WizardMgtPanel<T> addNotificationPanel(final NotificationPanel notificationPanel) {
+ this.notificationPanel = notificationPanel;
+ return this;
+ }
+
+ /**
+ * PanelInWizard abstract builder.
+ *
+ * @param <T> list item reference type.
+ */
+ public abstract static class Builder<T extends Serializable> implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ protected final PageReference pageRef;
+
+ protected final Class<T> reference;
+
+ private AjaxWizardBuilder<T> newItemPanelBuilder;
+
+ private NotificationPanel notificationPanel;
+
+ protected Builder(final Class<T> reference, final PageReference pageRef) {
+ this.pageRef = pageRef;
+ this.reference = reference;
+ }
+
+ protected abstract WizardMgtPanel<T> newInstance(final String id);
+
+ /**
+ * Builds a list view.
+ *
+ * @param id component id.
+ * @return List view.
+ */
+ public WizardMgtPanel<T> build(final String id) {
+ return newInstance(id).addNewItemPanelBuilder(newItemPanelBuilder).addNotificationPanel(notificationPanel);
+ }
+
+ public Builder<T> addNewItemPanelBuilder(final AjaxWizardBuilder<T> panelBuilder) {
+ this.newItemPanelBuilder = panelBuilder;
+ return this;
+ }
+
+ public Builder<T> addNotificationPanel(final NotificationPanel notificationPanel) {
+ this.notificationPanel = notificationPanel;
+ return this;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyObjectWizardBuilder.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyObjectWizardBuilder.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyObjectWizardBuilder.java
new file mode 100644
index 0000000..62707cc
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyObjectWizardBuilder.java
@@ -0,0 +1,143 @@
+/*
+ * Copyright 2015 The Apache Software Foundation.
+ *
+ * Licensed 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.wizards.any;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
+import org.apache.syncope.client.console.wizards.AjaxWizardBuilder;
+import org.apache.syncope.common.lib.to.AnyObjectTO;
+import org.apache.syncope.common.lib.to.AnyTO;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.extensions.wizard.WizardModel;
+import org.apache.wicket.extensions.wizard.WizardStep;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.TextField;
+import org.apache.wicket.model.LoadableDetachableModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.model.StringResourceModel;
+
+public class AnyObjectWizardBuilder extends AjaxWizardBuilder<AnyTO> implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ private final AnyTO anyTO;
+
+ private final LoadableDetachableModel<List<String>> anyTypes = new LoadableDetachableModel<List<String>>() {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ protected List<String> load() {
+ final List<String> currentlyAdded = new ArrayList<>();
+ return currentlyAdded;
+ }
+ };
+
+ /**
+ * The object type specification step.
+ */
+ private final class ObjectType extends WizardStep {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Construct.
+ */
+ ObjectType(final AnyTO item) {
+ super(new ResourceModel("type.title", StringUtils.EMPTY),
+ new ResourceModel("type.summary", StringUtils.EMPTY), new Model<AnyTO>(item));
+
+ add(new AjaxDropDownChoicePanel<String>("type", "type", new PropertyModel<String>(item, "anyType"), false).
+ setChoices(anyTypes).
+ setStyleSheet("form-control").
+ setRequired(true));
+
+ add(new TextField<String>(
+ "class", new PropertyModel<String>(item, "objectClass")).setRequired(true));
+ }
+ }
+
+ /**
+ * Mapping definition step.
+ */
+ private final class Mapping extends WizardStep {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Construct.
+ */
+ Mapping(final AnyTO item) {
+ setTitleModel(new ResourceModel("mapping.title", "Mapping"));
+ setSummaryModel(new StringResourceModel("mapping.summary", this, new Model<AnyTO>(item)));
+ }
+ }
+
+ /**
+ * AccountLink specification step.
+ */
+ private final class ConnObjectLink extends WizardStep {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Construct.
+ */
+ ConnObjectLink(final AnyTO item) {
+ super(new ResourceModel("link.title", StringUtils.EMPTY),
+ new ResourceModel("link.summary", StringUtils.EMPTY));
+
+ final WebMarkupContainer connObjectLinkContainer = new WebMarkupContainer("connObjectLinkContainer");
+ connObjectLinkContainer.setOutputMarkupId(true);
+ add(connObjectLinkContainer);
+ }
+ }
+
+ /**
+ * Construct.
+ *
+ * @param id The component id
+ * @param anyTO external resource to be updated.
+ * @param pageRef Caller page reference.
+ */
+ public AnyObjectWizardBuilder(final String id, final AnyTO anyTO, final PageReference pageRef) {
+ super(id, new AnyObjectTO(), pageRef);
+ this.anyTO = anyTO;
+ }
+
+ @Override
+ protected WizardModel buildModelSteps(final AnyTO modelObject, final WizardModel wizardModel) {
+ wizardModel.add(new ObjectType(modelObject));
+ wizardModel.add(new Mapping(modelObject));
+ wizardModel.add(new ConnObjectLink(modelObject));
+ return wizardModel;
+ }
+
+ @Override
+ protected void onCancelInternal(final AnyTO modelObject) {
+ // d nothing
+ }
+
+ @Override
+ protected void onApplyInternal(final AnyTO modelObject) {
+ // do nothing
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyWizardBuilder.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyWizardBuilder.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyWizardBuilder.java
new file mode 100644
index 0000000..c46f135
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyWizardBuilder.java
@@ -0,0 +1,85 @@
+/*
+ * Copyright 2015 The Apache Software Foundation.
+ *
+ * Licensed 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.wizards.any;
+
+import java.io.Serializable;
+import java.util.List;
+import org.apache.syncope.client.console.commons.Mode;
+import org.apache.syncope.client.console.rest.AnyTypeRestClient;
+import org.apache.syncope.client.console.wizards.AjaxWizardBuilder;
+import org.apache.syncope.common.lib.AnyOperations;
+import org.apache.syncope.common.lib.patch.AnyObjectPatch;
+import org.apache.syncope.common.lib.to.AnyObjectTO;
+import org.apache.syncope.common.lib.to.AnyTO;
+import org.apache.syncope.common.lib.to.ProvisioningResult;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.extensions.wizard.WizardModel;
+
+public class AnyWizardBuilder<T extends AnyTO> extends AjaxWizardBuilder<T> implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ protected final AnyTypeRestClient anyTypeRestClient = new AnyTypeRestClient();
+
+ protected final List<String> anyTypeClasses;
+
+ /**
+ * Construct.
+ *
+ * @param id The component id
+ * @param anyTO any
+ * @param anyTypeClasses
+ * @param pageRef Caller page reference.
+ */
+ public AnyWizardBuilder(
+ final String id, final T anyTO, final List<String> anyTypeClasses, final PageReference pageRef) {
+ super(id, anyTO, pageRef);
+ this.anyTypeClasses = anyTypeClasses;
+ }
+
+ @Override
+ protected WizardModel buildModelSteps(final T modelObject, final WizardModel wizardModel) {
+ wizardModel.add(new PlainAttrs(modelObject, null, Mode.ADMIN, anyTypeClasses.toArray(new String[] {})));
+ wizardModel.add(new DerAttrs(modelObject, anyTypeClasses.toArray(new String[] {})));
+ wizardModel.add(new VirAttrs(modelObject, anyTypeClasses.toArray(new String[] {})));
+ return wizardModel;
+ }
+
+ @Override
+ protected void onCancelInternal(final T modelObject) {
+ // do nothing
+ }
+
+ @Override
+ protected void onApplyInternal(final T modelObject) {
+ if (!(modelObject instanceof AnyObjectTO)) {
+ throw new IllegalArgumentException();
+ }
+
+ final ProvisioningResult<AnyObjectTO> actual;
+
+ if (modelObject.getKey() == 0) {
+ actual = anyTypeRestClient.create(AnyObjectTO.class.cast(modelObject));
+ } else {
+ final AnyObjectPatch patch = AnyOperations.diff(modelObject, getDefaultItem(), true);
+
+ // update user just if it is changed
+ if (!patch.isEmpty()) {
+ actual = anyTypeRestClient.update(getDefaultItem().getETagValue(), patch);
+ }
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/DerAttrs.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/DerAttrs.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/DerAttrs.java
new file mode 100644
index 0000000..42af808
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/DerAttrs.java
@@ -0,0 +1,137 @@
+/*
+ * 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.wizards.any;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.collections4.Transformer;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.rest.SchemaRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.common.lib.to.AnyTO;
+import org.apache.syncope.common.lib.to.AttrTO;
+import org.apache.syncope.common.lib.to.DerSchemaTO;
+import org.apache.syncope.common.lib.types.SchemaType;
+import org.apache.wicket.extensions.wizard.WizardStep;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.markup.html.panel.Fragment;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.LoadableDetachableModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.ResourceModel;
+
+public class DerAttrs extends WizardStep {
+
+ private static final long serialVersionUID = -5387344116983102292L;
+
+ private final SchemaRestClient schemaRestClient = new SchemaRestClient();
+
+ public <T extends AnyTO> DerAttrs(final T entityTO, final String... anyTypeClass) {
+
+ setOutputMarkupId(true);
+
+ final IModel<List<String>> derSchemas = new LoadableDetachableModel<List<String>>() {
+
+ private static final long serialVersionUID = 5275935387613157437L;
+
+ @Override
+ protected List<String> load() {
+ List<DerSchemaTO> derSchemaNames = schemaRestClient.getSchemas(SchemaType.DERIVED, anyTypeClass);
+
+ return new ArrayList<>(CollectionUtils.collect(derSchemaNames, new Transformer<DerSchemaTO, String>() {
+
+ @Override
+ public String transform(final DerSchemaTO input) {
+ return input.getKey();
+ }
+ }));
+ }
+ };
+
+ final Map<String, AttrTO> derAttrMap = entityTO.getDerAttrMap();
+ CollectionUtils.collect(derSchemas.getObject(), new Transformer<String, AttrTO>() {
+
+ @Override
+ public AttrTO transform(final String input) {
+ AttrTO attrTO = derAttrMap.get(input);
+ if (attrTO == null) {
+ attrTO = new AttrTO();
+ attrTO.setSchema(input);
+ }
+ return attrTO;
+ }
+ }, entityTO.getDerAttrs());
+
+ final Fragment fragment;
+ if (entityTO.getDerAttrs().isEmpty()) {
+ // show empty list message
+ fragment = new Fragment("content", "empty", this);
+ } else {
+ fragment = new Fragment("content", "attributes", this);
+
+ final WebMarkupContainer attributesContainer = new WebMarkupContainer("derAttrContainer");
+ attributesContainer.setOutputMarkupId(true);
+ fragment.add(attributesContainer);
+
+ ListView<AttrTO> attributes = new ListView<AttrTO>("attrs",
+ new PropertyModel<List<AttrTO>>(entityTO, "derAttrs") {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public List<AttrTO> getObject() {
+ return new ArrayList<>(entityTO.getDerAttrs());
+ }
+
+ }) {
+
+ private static final long serialVersionUID = 9101744072914090143L;
+
+ @Override
+ protected void populateItem(final ListItem<AttrTO> item) {
+ final AttrTO attrTO = item.getModelObject();
+
+ final IModel<String> model;
+ final List<String> values = attrTO.getValues();
+ if (values == null || values.isEmpty()) {
+ model = new ResourceModel("derived.emptyvalue.message", StringUtils.EMPTY);
+ } else {
+ model = new Model<String>(values.get(0));
+ }
+
+ final AjaxTextFieldPanel panel = new AjaxTextFieldPanel("panel", attrTO.getSchema(), model);
+
+ panel.setEnabled(false);
+ panel.setRequired(true);
+ panel.setOutputMarkupId(true);
+ item.add(panel);
+
+ }
+ };
+ attributesContainer.add(attributes);
+ }
+
+ add(fragment);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/GroupDetails.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/GroupDetails.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/GroupDetails.java
new file mode 100644
index 0000000..63ff592
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/GroupDetails.java
@@ -0,0 +1,293 @@
+/*
+ * 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.wizards.any;
+
+import org.apache.syncope.client.console.commons.JexlHelpUtils;
+import org.apache.syncope.client.console.rest.GroupRestClient;
+import org.apache.syncope.client.console.rest.UserRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.common.lib.to.GroupTO;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.syncope.common.lib.types.AnyTypeKind;
+import org.apache.wicket.Page;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.event.IEvent;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxLink;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.extensions.wizard.WizardStep;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.PropertyModel;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class GroupDetails extends WizardStep {
+
+ private static final long serialVersionUID = 855618618337931784L;
+
+ /**
+ * Logger.
+ */
+ protected static final Logger LOG = LoggerFactory.getLogger(GroupDetails.class);
+
+ private final UserRestClient userRestClient = new UserRestClient();
+
+ private final GroupRestClient groupRestClient = new GroupRestClient();
+
+ private final WebMarkupContainer ownerContainer;
+
+ private final OwnerModel userOwnerModel;
+
+ private final OwnerModel groupOwnerModel;
+
+ public GroupDetails(final GroupTO groupTO, final boolean templateMode) {
+ ownerContainer = new WebMarkupContainer("ownerContainer");
+ ownerContainer.setOutputMarkupId(true);
+ this.add(ownerContainer);
+
+ final ModalWindow userOwnerSelectWin = new ModalWindow("userOwnerSelectWin");
+ userOwnerSelectWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ userOwnerSelectWin.setCookieName("create-userOwnerSelect-modal");
+ this.add(userOwnerSelectWin);
+ final ModalWindow groupOwnerSelectWin = new ModalWindow("groupOwnerSelectWin");
+ groupOwnerSelectWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ groupOwnerSelectWin.setCookieName("create-groupOwnerSelect-modal");
+ this.add(groupOwnerSelectWin);
+
+ final AjaxTextFieldPanel name
+ = new AjaxTextFieldPanel("name", "name", new PropertyModel<String>(groupTO, "name"));
+
+ final WebMarkupContainer jexlHelp = JexlHelpUtils.getJexlHelpWebContainer("jexlHelp");
+
+ final AjaxLink<Void> questionMarkJexlHelp = JexlHelpUtils.getAjaxLink(jexlHelp, "questionMarkJexlHelp");
+ this.add(questionMarkJexlHelp);
+ questionMarkJexlHelp.add(jexlHelp);
+
+ if (!templateMode) {
+ name.addRequiredLabel();
+ questionMarkJexlHelp.setVisible(false);
+ }
+ this.add(name);
+
+ userOwnerModel = new OwnerModel(groupTO, AnyTypeKind.USER);
+ @SuppressWarnings("unchecked")
+ final AjaxTextFieldPanel userOwner = new AjaxTextFieldPanel("userOwner", "userOwner", userOwnerModel);
+ userOwner.setReadOnly(true);
+ userOwner.setOutputMarkupId(true);
+ ownerContainer.add(userOwner);
+ final AjaxLink<Void> userOwnerSelect = new IndicatingAjaxLink<Void>("userOwnerSelect") {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ userOwnerSelectWin.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+// return new UserOwnerSelectModalPage(getPage().getPageReference(), userOwnerSelectWin);
+ return null;
+ }
+ });
+ userOwnerSelectWin.show(target);
+ }
+ };
+ ownerContainer.add(userOwnerSelect.setEnabled(false));
+ final IndicatingAjaxLink<Void> userOwnerReset = new IndicatingAjaxLink<Void>("userOwnerReset") {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ userOwnerModel.setObject(null);
+ target.add(userOwner);
+ }
+ };
+ ownerContainer.add(userOwnerReset.setEnabled(false));
+
+ groupOwnerModel = new OwnerModel(groupTO, AnyTypeKind.GROUP);
+ @SuppressWarnings("unchecked")
+ final AjaxTextFieldPanel groupOwner = new AjaxTextFieldPanel("groupOwner", "groupOwner", groupOwnerModel);
+ groupOwner.setReadOnly(true);
+ groupOwner.setOutputMarkupId(true);
+ ownerContainer.add(groupOwner);
+ final AjaxLink<Void> groupOwnerSelect = new IndicatingAjaxLink<Void>("groupOwnerSelect") {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ userOwnerSelectWin.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+// return new GroupSelectModalPage(getPage().getPageReference(), userOwnerSelectWin,
+// GroupOwnerSelectPayload.class);
+ return null;
+ }
+ });
+ userOwnerSelectWin.show(target);
+ }
+ };
+ ownerContainer.add(groupOwnerSelect.setEnabled(false));
+ final IndicatingAjaxLink<Void> groupOwnerReset = new IndicatingAjaxLink<Void>("groupOwnerReset") {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ groupOwnerModel.setObject(null);
+ target.add(groupOwner);
+ }
+ };
+ ownerContainer.add(groupOwnerReset.setEnabled(false));
+ }
+
+ /**
+ * This is waiting for events from opened modal windows: first to get the selected user / group, then to update the
+ * respective text panel.
+ *
+ * {@inheritDoc }
+ *
+ * @param event
+ */
+ @Override
+ public void onEvent(final IEvent<?> event) {
+ super.onEvent(event);
+
+ if (event.getPayload() instanceof UserOwnerSelectPayload) {
+ userOwnerModel.setObject(((UserOwnerSelectPayload) event.getPayload()).getUserId());
+ }
+ if (event.getPayload() instanceof GroupOwnerSelectPayload) {
+ groupOwnerModel.setObject(((GroupOwnerSelectPayload) event.getPayload()).getGroupId());
+ }
+
+ if (event.getPayload() instanceof AjaxRequestTarget) {
+ ((AjaxRequestTarget) event.getPayload()).add(ownerContainer);
+ }
+ }
+
+ private class OwnerModel implements IModel {
+
+ private static final long serialVersionUID = -3865621970810102714L;
+
+ private final GroupTO groupTO;
+
+ private final AnyTypeKind type;
+
+ OwnerModel(final GroupTO groupTO, final AnyTypeKind type) {
+ this.groupTO = groupTO;
+ this.type = type;
+ }
+
+ @Override
+ public Object getObject() {
+ String object = null;
+
+ switch (type) {
+ case USER:
+ if (groupTO.getUserOwner() != null) {
+ UserTO user = null;
+ try {
+ user = userRestClient.read(groupTO.getUserOwner());
+ } catch (Exception e) {
+ LOG.warn("Could not find user with id {}, ignoring", groupTO.getUserOwner(), e);
+ }
+ if (user == null) {
+ groupTO.setUserOwner(null);
+ } else {
+ object = user.getKey() + " " + user.getUsername();
+ }
+ }
+ break;
+
+ case GROUP:
+ GroupTO group = null;
+ if (groupTO.getGroupOwner() != null) {
+ try {
+ group = groupRestClient.read(groupTO.getGroupOwner());
+ } catch (Exception e) {
+ LOG.warn("Could not find group with id {}, ignoring", groupTO.getGroupOwner(), e);
+ }
+ if (group == null) {
+ groupTO.setGroupOwner(null);
+ } else {
+ object = group.getDisplayName();
+ }
+ }
+ break;
+
+ default:
+ }
+
+ return object;
+ }
+
+ @Override
+ public void setObject(final Object object) {
+ switch (type) {
+ case USER:
+ groupTO.setUserOwner((Long) object);
+ break;
+
+ case GROUP:
+ groupTO.setGroupOwner((Long) object);
+ break;
+
+ default:
+ }
+ }
+
+ @Override
+ public void detach() {
+ // ignore
+ }
+ }
+
+ public static class UserOwnerSelectPayload {
+
+ private final Long userId;
+
+ public UserOwnerSelectPayload(final Long userId) {
+ this.userId = userId;
+ }
+
+ public Long getUserId() {
+ return userId;
+ }
+ }
+
+ public static class GroupOwnerSelectPayload {
+
+ private final Long groupId;
+
+ public GroupOwnerSelectPayload(final Long groupId) {
+ this.groupId = groupId;
+ }
+
+ public Long getGroupId() {
+ return groupId;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/GroupWizardBuilder.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/GroupWizardBuilder.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/GroupWizardBuilder.java
new file mode 100644
index 0000000..9ae9332
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/GroupWizardBuilder.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2015 The Apache Software Foundation.
+ *
+ * Licensed 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.wizards.any;
+
+import java.util.List;
+import org.apache.syncope.client.console.rest.GroupRestClient;
+import org.apache.syncope.common.lib.AnyOperations;
+import org.apache.syncope.common.lib.patch.GroupPatch;
+import org.apache.syncope.common.lib.to.GroupTO;
+import org.apache.syncope.common.lib.to.ProvisioningResult;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.extensions.wizard.WizardModel;
+
+public class GroupWizardBuilder extends AnyWizardBuilder<GroupTO> {
+
+ private static final long serialVersionUID = 1L;
+
+ private final GroupRestClient groupRestClient = new GroupRestClient();
+
+ /**
+ * Construct.
+ *
+ * @param id The component id
+ * @param groupTO any
+ * @param anyTypeClasses
+ * @param pageRef Caller page reference.
+ */
+ public GroupWizardBuilder(
+ final String id, final GroupTO groupTO, final List<String> anyTypeClasses, final PageReference pageRef) {
+ super(id, groupTO, anyTypeClasses, pageRef);
+ }
+
+ @Override
+ protected WizardModel buildModelSteps(final GroupTO modelObject, final WizardModel wizardModel) {
+ wizardModel.add(new GroupDetails(modelObject, false));
+ return super.buildModelSteps(modelObject, wizardModel);
+ }
+
+ @Override
+ protected void onApplyInternal(final GroupTO modelObject) {
+ final ProvisioningResult<GroupTO> actual;
+
+ if (modelObject.getKey() == 0) {
+ actual = groupRestClient.create(modelObject);
+ } else {
+ final GroupPatch patch = AnyOperations.diff(modelObject, getDefaultItem(), true);
+
+ // update user just if it is changed
+ if (!patch.isEmpty()) {
+ actual = groupRestClient.update(getDefaultItem().getETagValue(), patch);
+ }
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/PlainAttrs.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/PlainAttrs.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/PlainAttrs.java
new file mode 100644
index 0000000..4501856
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/PlainAttrs.java
@@ -0,0 +1,339 @@
+/*
+ * 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.wizards.any;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.commons.JexlHelpUtils;
+import org.apache.syncope.client.console.commons.Mode;
+import org.apache.syncope.client.console.rest.SchemaRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.BinaryFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.FieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.MultiFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.SpinnerFieldPanel;
+import org.apache.syncope.common.lib.SyncopeConstants;
+import org.apache.syncope.common.lib.to.AnyTO;
+import org.apache.syncope.common.lib.to.AttrTO;
+import org.apache.syncope.common.lib.to.PlainSchemaTO;
+import org.apache.syncope.common.lib.types.AttrSchemaType;
+import org.apache.syncope.common.lib.types.SchemaType;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.extensions.wizard.WizardStep;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.form.IChoiceRenderer;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+
+public class PlainAttrs extends WizardStep {
+
+ private static final long serialVersionUID = 552437609667518888L;
+
+ private final SchemaRestClient schemaRestClient = new SchemaRestClient();
+
+ private final AnyTO entityTO;
+
+ private final Mode mode;
+
+ private Map<String, PlainSchemaTO> schemas = new LinkedHashMap<>();
+
+ private final String[] anyTypeClass;
+
+ public <T extends AnyTO> PlainAttrs(final T entityTO, final Form<?> form, final Mode mode,
+ final String... anyTypeClass) {
+ this.setOutputMarkupId(true);
+
+ this.entityTO = entityTO;
+ this.mode = mode;
+ this.anyTypeClass = anyTypeClass;
+
+ setSchemas();
+ setAttrs();
+
+ add(new ListView<AttrTO>("schemas", new PropertyModel<List<AttrTO>>(entityTO, "plainAttrs") {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public List<AttrTO> getObject() {
+ return new ArrayList<>(super.getObject());
+ }
+
+ }) {
+
+ private static final long serialVersionUID = 9101744072914090143L;
+
+ @Override
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ protected void populateItem(final ListItem<AttrTO> item) {
+ final AttrTO attributeTO = (AttrTO) item.getDefaultModelObject();
+
+ final WebMarkupContainer jexlHelp = JexlHelpUtils.getJexlHelpWebContainer("jexlHelp");
+
+ final AjaxLink<Void> questionMarkJexlHelp = JexlHelpUtils.getAjaxLink(jexlHelp, "questionMarkJexlHelp");
+ item.add(questionMarkJexlHelp);
+ questionMarkJexlHelp.add(jexlHelp);
+
+ if (mode != Mode.TEMPLATE) {
+ questionMarkJexlHelp.setVisible(false);
+ }
+
+ final FieldPanel panel = getFieldPanel(schemas.get(attributeTO.getSchema()), form, attributeTO);
+
+ if (mode == Mode.TEMPLATE || !schemas.get(attributeTO.getSchema()).isMultivalue()) {
+ item.add(panel);
+ } else {
+ item.add(new MultiFieldPanel<String>(
+ "panel", attributeTO.getSchema(), new PropertyModel<List<String>>(attributeTO, "values"),
+ panel));
+ }
+ }
+ }
+ );
+ }
+
+ private void setSchemas() {
+
+ AttrTO attrLayout = null;
+ final List<PlainSchemaTO> schemaTOs = schemaRestClient.getSchemas(SchemaType.PLAIN, anyTypeClass);
+
+ schemas.clear();
+
+ if (attrLayout != null && mode != Mode.TEMPLATE) {
+ // 1. remove attributes not selected for display
+ schemaRestClient.filter(schemaTOs, attrLayout.getValues(), true);
+ // 2. sort remainig attributes according to configuration, e.g. attrLayout
+ final Map<String, Integer> attrLayoutMap = new HashMap<>(attrLayout.getValues().size());
+ for (int i = 0; i < attrLayout.getValues().size(); i++) {
+ attrLayoutMap.put(attrLayout.getValues().get(i), i);
+ }
+ Collections.sort(schemaTOs, new Comparator<PlainSchemaTO>() {
+
+ @Override
+ public int compare(final PlainSchemaTO schema1, final PlainSchemaTO schema2) {
+ int value = 0;
+
+ if (attrLayoutMap.get(schema1.getKey()) > attrLayoutMap.get(schema2.getKey())) {
+ value = 1;
+ } else if (attrLayoutMap.get(schema1.getKey()) < attrLayoutMap.get(schema2.getKey())) {
+ value = -1;
+ }
+
+ return value;
+ }
+ });
+ }
+ for (PlainSchemaTO schemaTO : schemaTOs) {
+ schemas.put(schemaTO.getKey(), schemaTO);
+ }
+ }
+
+ private void setAttrs() {
+ final List<AttrTO> entityData = new ArrayList<>();
+
+ final Map<String, AttrTO> attrMap = entityTO.getPlainAttrMap();
+
+ for (PlainSchemaTO schema : schemas.values()) {
+ final AttrTO attributeTO = new AttrTO();
+ attributeTO.setSchema(schema.getKey());
+
+ if (attrMap.get(schema.getKey()) == null || attrMap.get(schema.getKey()).getValues().isEmpty()) {
+ attributeTO.getValues().add("");
+
+ // is important to set readonly only after values setting
+ attributeTO.setReadonly(schema.isReadonly());
+ } else {
+ attributeTO.getValues().addAll(attrMap.get(schema.getKey()).getValues());
+ }
+ entityData.add(attributeTO);
+ }
+
+ entityTO.getPlainAttrs().clear();
+ entityTO.getPlainAttrs().addAll(entityData);
+ }
+
+ @SuppressWarnings({ "rawtypes", "unchecked" })
+ private FieldPanel getFieldPanel(final PlainSchemaTO schemaTO, final Form form, final AttrTO attributeTO) {
+ final boolean required = mode == Mode.TEMPLATE
+ ? false
+ : schemaTO.getMandatoryCondition().equalsIgnoreCase("true");
+
+ final boolean readOnly = mode == Mode.TEMPLATE ? false : schemaTO.isReadonly();
+
+ final AttrSchemaType type = mode == Mode.TEMPLATE ? AttrSchemaType.String : schemaTO.getType();
+
+ final FieldPanel panel;
+ switch (type) {
+ case Boolean:
+ panel = new AjaxCheckBoxPanel("panel", schemaTO.getKey(), new Model<Boolean>(), false);
+ panel.setRequired(required);
+ break;
+
+// case Date:
+// final String dataPattern = schemaTO.getConversionPattern() == null
+// ? SyncopeConstants.DEFAULT_DATE_PATTERN
+// : schemaTO.getConversionPattern();
+//
+// if (dataPattern.contains("H")) {
+// panel = new DateTimeFieldPanel("panel", schemaTO.getKey(), new Model<Date>(), dataPattern);
+//
+// if (required) {
+// panel.addRequiredLabel();
+// ((DateTimeFieldPanel) panel).setFormValidator(form);
+// }
+// panel.setStyleSheet("ui-widget-content ui-corner-all");
+// } else {
+// panel = new DateTextFieldPanel("panel", schemaTO.getKey(), new Model<Date>(), dataPattern);
+//
+// if (required) {
+// panel.addRequiredLabel();
+// }
+// }
+// break;
+ case Enum:
+ panel = new AjaxDropDownChoicePanel<String>("panel", schemaTO.getKey(), new Model<String>());
+ ((AjaxDropDownChoicePanel<String>) panel).setChoices(getEnumeratedValues(schemaTO));
+
+ if (StringUtils.isNotBlank(schemaTO.getEnumerationKeys())) {
+ ((AjaxDropDownChoicePanel) panel).setChoiceRenderer(new IChoiceRenderer<String>() {
+
+ private static final long serialVersionUID = -3724971416312135885L;
+
+ private final Map<String, String> valueMap = getEnumeratedKeyValues(schemaTO);
+
+ @Override
+ public String getDisplayValue(final String value) {
+ return valueMap.get(value) == null ? value : valueMap.get(value);
+ }
+
+ @Override
+ public String getIdValue(final String value, final int i) {
+ return value;
+ }
+
+ @Override
+ public String getObject(
+ final String id, final IModel<? extends List<? extends String>> choices) {
+ return id;
+ }
+ });
+ }
+
+ if (required) {
+ panel.addRequiredLabel();
+ }
+ break;
+
+ case Long:
+ panel = new SpinnerFieldPanel<Long>("panel", schemaTO.getKey(), Long.class, new Model<Long>());
+
+ if (required) {
+ panel.addRequiredLabel();
+ }
+ break;
+
+ case Double:
+ panel = new SpinnerFieldPanel<Double>("panel", schemaTO.getKey(), Double.class, new Model<Double>());
+
+ if (required) {
+ panel.addRequiredLabel();
+ }
+ break;
+
+ case Binary:
+ panel = new BinaryFieldPanel("panel", schemaTO.getKey(), new Model<String>(),
+ schemas.containsKey(schemaTO.getKey())
+ ? schemas.get(schemaTO.getKey()).getMimeType()
+ : null);
+
+ if (required) {
+ panel.addRequiredLabel();
+ }
+ break;
+
+ default:
+ panel = new AjaxTextFieldPanel("panel", schemaTO.getKey(), new Model<String>(), false);
+
+ if (required) {
+ panel.addRequiredLabel();
+ }
+ }
+
+ panel.setReadOnly(readOnly);
+ panel.setNewModel(attributeTO.getValues());
+
+ return panel;
+ }
+
+ private Map<String, String> getEnumeratedKeyValues(final PlainSchemaTO schemaTO) {
+ final Map<String, String> res = new HashMap<>();
+
+ final String[] values = StringUtils.isBlank(schemaTO.getEnumerationValues())
+ ? new String[0]
+ : schemaTO.getEnumerationValues().split(SyncopeConstants.ENUM_VALUES_SEPARATOR);
+
+ final String[] keys = StringUtils.isBlank(schemaTO.getEnumerationKeys())
+ ? new String[0]
+ : schemaTO.getEnumerationKeys().split(SyncopeConstants.ENUM_VALUES_SEPARATOR);
+
+ for (int i = 0; i < values.length; i++) {
+ res.put(values[i].trim(), keys.length > i ? keys[i].trim() : null);
+ }
+
+ return res;
+ }
+
+ private List<String> getEnumeratedValues(final PlainSchemaTO schemaTO) {
+ final List<String> res = new ArrayList<>();
+
+ final String[] values = StringUtils.isBlank(schemaTO.getEnumerationValues())
+ ? new String[0]
+ : schemaTO.getEnumerationValues().split(SyncopeConstants.ENUM_VALUES_SEPARATOR);
+
+ for (String value : values) {
+ res.add(value.trim());
+ }
+
+ return res;
+ }
+
+// @Override
+// public void onEvent(final IEvent<?> event) {
+// if ((event.getPayload() instanceof GroupAttrTemplatesChange)) {
+// final GroupAttrTemplatesChange update = (GroupAttrTemplatesChange) event.getPayload();
+// if (attrTemplates != null && update.getType() == AttrTemplatesPanel.Type.gPlainAttrTemplates) {
+// setSchemas();
+// setAttrs();
+// update.getTarget().add(this);
+// }
+// }
+// }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/UserDetails.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/UserDetails.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/UserDetails.java
new file mode 100644
index 0000000..5918fd0
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/UserDetails.java
@@ -0,0 +1,104 @@
+/*
+ * 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.wizards.any;
+
+import org.apache.syncope.client.console.commons.JexlHelpUtils;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxPasswordFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.FieldPanel;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.extensions.wizard.WizardStep;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.form.PasswordTextField;
+import org.apache.wicket.markup.html.form.validation.EqualPasswordInputValidator;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+
+public class UserDetails extends WizardStep {
+
+ private static final long serialVersionUID = 6592027822510220463L;
+
+ public UserDetails(final UserTO userTO, final boolean resetPassword, final boolean templateMode) {
+ // ------------------------
+ // Username
+ // ------------------------
+ final FieldPanel<String> username = new AjaxTextFieldPanel("username", "username",
+ new PropertyModel<String>(userTO, "username"));
+
+ final WebMarkupContainer jexlHelp = JexlHelpUtils.getJexlHelpWebContainer("usernameJexlHelp");
+
+ final AjaxLink<?> questionMarkJexlHelp = JexlHelpUtils.getAjaxLink(jexlHelp, "usernameQuestionMarkJexlHelp");
+ add(questionMarkJexlHelp);
+ questionMarkJexlHelp.add(jexlHelp);
+
+ if (!templateMode) {
+ username.addRequiredLabel();
+ questionMarkJexlHelp.setVisible(false);
+ }
+ add(username);
+ // ------------------------
+
+ // ------------------------
+ // Password
+ // ------------------------
+ final Form<?> form = new Form<>("passwordInnerForm");
+ add(form);
+
+ final WebMarkupContainer pwdJexlHelp = JexlHelpUtils.getJexlHelpWebContainer("pwdJexlHelp");
+
+ final AjaxLink<?> pwdQuestionMarkJexlHelp = JexlHelpUtils.getAjaxLink(pwdJexlHelp, "pwdQuestionMarkJexlHelp");
+ form.add(pwdQuestionMarkJexlHelp);
+ pwdQuestionMarkJexlHelp.add(pwdJexlHelp);
+
+ FieldPanel<String> passwordField
+ = new AjaxPasswordFieldPanel("password", "password", new PropertyModel<String>(userTO, "password"));
+ passwordField.setRequired(true);
+ passwordField.setMarkupId("password");
+ passwordField.setPlaceholder("password");
+ ((PasswordTextField) passwordField.getField()).setResetPassword(true);
+ form.add(passwordField);
+
+ FieldPanel<String> confirmPasswordField
+ = new AjaxPasswordFieldPanel("confirmPassword", "confirmPassword", new Model<String>());
+ confirmPasswordField.setRequired(true);
+ confirmPasswordField.setMarkupId("confirmPassword");
+ confirmPasswordField.setPlaceholder("confirmPassword");
+ ((PasswordTextField) confirmPasswordField.getField()).setResetPassword(true);
+ form.add(confirmPasswordField);
+
+ form.add(new EqualPasswordInputValidator(passwordField.getField(), confirmPasswordField.getField()));
+
+ if (templateMode) {
+ confirmPasswordField.setEnabled(false);
+ confirmPasswordField.setVisible(false);
+ } else {
+ pwdQuestionMarkJexlHelp.setVisible(false);
+
+ ((PasswordTextField) passwordField.getField()).setResetPassword(resetPassword);
+
+ if (!resetPassword) {
+ confirmPasswordField.getField().setModelObject(userTO.getPassword());
+ }
+ ((PasswordTextField) confirmPasswordField.getField()).setResetPassword(resetPassword);
+ }
+ // ------------------------
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/UserWizardBuilder.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/UserWizardBuilder.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/UserWizardBuilder.java
new file mode 100644
index 0000000..21d990f
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/UserWizardBuilder.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2015 The Apache Software Foundation.
+ *
+ * Licensed 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.wizards.any;
+
+import java.util.List;
+import org.apache.syncope.client.console.rest.UserRestClient;
+import org.apache.syncope.common.lib.AnyOperations;
+import org.apache.syncope.common.lib.patch.UserPatch;
+import org.apache.syncope.common.lib.to.ProvisioningResult;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.extensions.wizard.WizardModel;
+import org.apache.wicket.model.Model;
+
+public class UserWizardBuilder extends AnyWizardBuilder<UserTO> {
+
+ private static final long serialVersionUID = 1L;
+
+ private final UserRestClient userRestClient = new UserRestClient();
+
+ /**
+ * Construct.
+ *
+ * @param id The component id
+ * @param userTO any
+ * @param anyTypeClasses
+ * @param pageRef Caller page reference.
+ */
+ public UserWizardBuilder(
+ final String id, final UserTO userTO, final List<String> anyTypeClasses, final PageReference pageRef) {
+ super(id, userTO, anyTypeClasses, pageRef);
+ }
+
+ @Override
+ protected WizardModel buildModelSteps(final UserTO modelObject, final WizardModel wizardModel) {
+ wizardModel.add(new UserDetails(modelObject, false, false));
+ return super.buildModelSteps(modelObject, wizardModel);
+ }
+
+ @Override
+ protected void onApplyInternal(final UserTO modelObject) {
+ Model<Boolean> storePassword = new Model<>(true);
+
+ final ProvisioningResult<UserTO> actual;
+
+ if (modelObject.getKey() == 0) {
+ actual = userRestClient.create(modelObject, storePassword.getObject());
+ } else {
+ final UserPatch patch = AnyOperations.diff(modelObject, getDefaultItem(), true);
+
+// if (statusPanel != null) {
+// patch.setPwdPropRequest(statusPanel.getStatusMod());
+// }
+ // update user just if it is changed
+ if (!patch.isEmpty()) {
+ actual = userRestClient.update(getDefaultItem().getETagValue(), patch);
+ }
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/VirAttrs.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/VirAttrs.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/VirAttrs.java
new file mode 100644
index 0000000..3bfcc17
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/VirAttrs.java
@@ -0,0 +1,141 @@
+/*
+ * 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.wizards.any;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.collections4.Transformer;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.rest.SchemaRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.MultiFieldPanel;
+import org.apache.syncope.common.lib.to.AnyTO;
+import org.apache.syncope.common.lib.to.AttrTO;
+import org.apache.syncope.common.lib.to.VirSchemaTO;
+import org.apache.syncope.common.lib.types.SchemaType;
+import org.apache.wicket.extensions.wizard.WizardStep;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.markup.html.panel.Fragment;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.LoadableDetachableModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+
+public class VirAttrs extends WizardStep {
+
+ private static final long serialVersionUID = -7982691107029848579L;
+
+ private SchemaRestClient schemaRestClient = new SchemaRestClient();
+
+ private final Map<String, VirSchemaTO> schemas = new TreeMap<String, VirSchemaTO>();
+
+ public <T extends AnyTO> VirAttrs(final T entityTO, final String... anyTypeClass) {
+ this.setOutputMarkupId(true);
+
+ final IModel<List<String>> virSchemas = new LoadableDetachableModel<List<String>>() {
+
+ private static final long serialVersionUID = 5275935387613157437L;
+
+ @Override
+ protected List<String> load() {
+ List<VirSchemaTO> schemaTOs = schemaRestClient.getSchemas(SchemaType.VIRTUAL, anyTypeClass);
+
+ schemas.clear();
+
+ for (VirSchemaTO schemaTO : schemaTOs) {
+ schemas.put(schemaTO.getKey(), schemaTO);
+ }
+
+ return new ArrayList<>(schemas.keySet());
+ }
+ };
+
+ final Map<String, AttrTO> virAttrMap = entityTO.getVirAttrMap();
+ CollectionUtils.collect(virSchemas.getObject(), new Transformer<String, AttrTO>() {
+
+ @Override
+ public AttrTO transform(final String input) {
+ AttrTO attrTO = virAttrMap.get(input);
+ if (attrTO == null) {
+ attrTO = new AttrTO();
+ attrTO.setSchema(input);
+ attrTO.getValues().add(StringUtils.EMPTY);
+ } else if (attrTO.getValues().isEmpty()) {
+ attrTO.getValues().add("");
+ }
+
+ return attrTO;
+ }
+ }, entityTO.getVirAttrs());
+
+ final Fragment fragment;
+ if (entityTO.getVirAttrs().isEmpty()) {
+ // show empty list message
+ fragment = new Fragment("content", "empty", this);
+ } else {
+ fragment = new Fragment("content", "attributes", this);
+
+ final WebMarkupContainer attributesContainer = new WebMarkupContainer("virAttrContainer");
+ attributesContainer.setOutputMarkupId(true);
+ fragment.add(attributesContainer);
+
+ ListView<AttrTO> attributes = new ListView<AttrTO>("attrs",
+ new PropertyModel<List<AttrTO>>(entityTO, "virAttrs") {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public List<AttrTO> getObject() {
+ return new ArrayList<>(entityTO.getVirAttrs());
+ }
+
+ }) {
+
+ private static final long serialVersionUID = 9101744072914090143L;
+
+ @Override
+ @SuppressWarnings("unchecked")
+ protected void populateItem(final ListItem<AttrTO> item) {
+ AttrTO attrTO = item.getModelObject();
+ final VirSchemaTO schema = schemas.get(attrTO.getSchema());
+
+ attrTO.setReadonly(schema.isReadonly());
+
+ final AjaxTextFieldPanel panel
+ = new AjaxTextFieldPanel("panel", attrTO.getSchema(), new Model<String>());
+
+ item.add(new MultiFieldPanel<String>(
+ "panel",
+ schema.getKey(),
+ new PropertyModel<List<String>>(attrTO, "values"),
+ panel).setEnabled(!schema.isReadonly()));
+ }
+ };
+
+ attributesContainer.add(attributes);
+ }
+
+ add(fragment);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder.java
index 1172035..8c20920 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder.java
@@ -107,8 +107,7 @@ public class ProvisionWizardBuilder extends AjaxWizardBuilder<ProvisionTO> imple
setStyleSheet("form-control").
setRequired(true));
- add(new TextField<String>(
- "class", new PropertyModel<String>(item, "objectClass")).setRequired(true));
+ add(new TextField<String>("class", new PropertyModel<String>(item, "objectClass")).setRequired(true));
}
}
@@ -211,12 +210,12 @@ public class ProvisionWizardBuilder extends AjaxWizardBuilder<ProvisionTO> imple
}
@Override
- protected void onCancelInternal() {
- // d nothing
+ protected void onCancelInternal(final ProvisionTO modelObject) {
+ // do nothing
}
@Override
- protected void onApplyInternal() {
+ protected void onApplyInternal(final ProvisionTO modelObject) {
// do nothing
}
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/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 ad0f032..98bb267 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
@@ -201,10 +201,25 @@ div.basepage-content{
overflow: hidden;
}
+.modal-body {
+ max-height: 600px;
+ overflow-y: auto;
+}
+
.modal {
background: rgba(0, 0, 0, 0) none repeat scroll 0 0;
}
+.wizard-view {
+ max-height: 500px;
+ overflow: auto;
+ padding: 0px 15px 0px 5px;
+}
+
+.wizard-buttons {
+ padding: 10px 0px 5px 0px;
+}
+
div.realms div.summarize {
margin: 50px 100px;
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.html
index 457ccc8..8a51c77 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.html
@@ -21,8 +21,8 @@ under the License.
<title>Search result panel</title>
</head>
<body>
- <wicket:panel>
- <div wicket:id="container">
+ <wicket:extend>
+ <div wicket:id="searchContainer">
<span wicket:id="resultTable">[Table]</span>
<span style="float:right">
@@ -38,10 +38,6 @@ under the License.
</form>
</span>
</div>
-
- <div wicket:id="modal">
- </div>
-
- </wicket:panel>
+ </wicket:extend>
</body>
</html>
[05/28] syncope git commit: [SYNCOPE-156] merge from master +
connector and resource modal re-work. Still re-working on provisions and
mappings
Posted by fm...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/ConnConfPropertyListView.java
----------------------------------------------------------------------
diff --cc client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/ConnConfPropertyListView.java
index d7dddec,3fef056..e71365f
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/ConnConfPropertyListView.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/ConnConfPropertyListView.java
@@@ -18,11 -18,11 +18,13 @@@
*/
package org.apache.syncope.client.console.wicket.markup.html.list;
++import de.agilecoders.wicket.extensions.markup.html.bootstrap.form.checkbox.bootstraptoggle.BootstrapToggle;
++import de.agilecoders.wicket.extensions.markup.html.bootstrap.form.checkbox.bootstraptoggle.BootstrapToggleConfig;
import java.io.Serializable;
import java.util.List;
--import java.util.Set;
import org.apache.commons.lang3.StringUtils;
import org.apache.syncope.client.console.commons.Constants;
++import org.apache.syncope.client.console.wicket.markup.html.form.AbstractFieldPanel;
import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPanel;
import org.apache.syncope.client.console.wicket.markup.html.form.AjaxPasswordFieldPanel;
import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
@@@ -30,9 -30,9 +32,15 @@@ import org.apache.syncope.client.consol
import org.apache.syncope.client.console.wicket.markup.html.form.MultiFieldPanel;
import org.apache.syncope.client.console.wicket.markup.html.form.SpinnerFieldPanel;
import org.apache.syncope.common.lib.types.ConnConfProperty;
++import org.apache.wicket.ajax.AjaxRequestTarget;
++import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
++import org.apache.wicket.markup.ComponentTag;
import org.apache.wicket.markup.html.basic.Label;
++import org.apache.wicket.markup.html.form.CheckBox;
++import org.apache.wicket.markup.html.form.FormComponent;
import org.apache.wicket.markup.html.form.PasswordTextField;
import org.apache.wicket.markup.html.list.ListItem;
++import org.apache.wicket.markup.html.list.ListView;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.PropertyModel;
@@@ -40,7 -40,7 +48,7 @@@ import org.slf4j.Logger
import org.slf4j.LoggerFactory;
import org.springframework.util.ClassUtils;
--public class ConnConfPropertyListView extends AltListView<ConnConfProperty> {
++public class ConnConfPropertyListView extends ListView<ConnConfProperty> {
private static final long serialVersionUID = -5239334900329150316L;
@@@ -48,13 -48,13 +56,12 @@@
private final boolean withOverridable;
-- private final Set<ConnConfProperty> configuration;
--
-- public ConnConfPropertyListView(final String id, final IModel<? extends List<ConnConfProperty>> model,
-- final boolean withOverridable, final Set<ConnConfProperty> configuration) {
++ public ConnConfPropertyListView(
++ final String id,
++ final IModel<? extends List<ConnConfProperty>> model,
++ final boolean withOverridable) {
super(id, model);
-- this.configuration = configuration;
this.withOverridable = withOverridable;
}
@@@ -63,13 -63,13 +70,11 @@@
protected void populateItem(final ListItem<ConnConfProperty> item) {
final ConnConfProperty property = item.getModelObject();
-- final Label label = new Label("connPropAttrSchema",
-- StringUtils.isBlank(property.getSchema().getDisplayName())
-- ? property.getSchema().getName()
-- : property.getSchema().getDisplayName());
++ final Label label = new Label("connPropAttrSchema", StringUtils.isBlank(property.getSchema().getDisplayName())
++ ? property.getSchema().getName() : property.getSchema().getDisplayName());
item.add(label);
-- FieldPanel<? extends Serializable> field;
++ final FieldPanel<? extends Serializable> field;
boolean required = false;
boolean isArray = false;
@@@ -77,8 -77,8 +82,8 @@@
|| Constants.GUARDED_STRING.equalsIgnoreCase(property.getSchema().getType())
|| Constants.GUARDED_BYTE_ARRAY.equalsIgnoreCase(property.getSchema().getType())) {
-- field = new AjaxPasswordFieldPanel("panel",
-- label.getDefaultModelObjectAsString(), new Model<String>());
++ field = new AjaxPasswordFieldPanel(
++ "panel", label.getDefaultModelObjectAsString(), new Model<String>(), false);
((PasswordTextField) field.getField()).setResetPassword(false);
required = property.getSchema().isRequired();
@@@ -90,7 -90,7 +95,7 @@@
if (ClassUtils.isPrimitiveOrWrapper(propertySchemaClass)) {
propertySchemaClass = org.apache.commons.lang3.ClassUtils.primitiveToWrapper(propertySchemaClass);
}
-- } catch (Exception e) {
++ } catch (ClassNotFoundException e) {
LOG.error("Error parsing attribute type", e);
propertySchemaClass = String.class;
}
@@@ -98,17 -98,17 +103,16 @@@
if (ClassUtils.isAssignable(Number.class, propertySchemaClass)) {
@SuppressWarnings("unchecked")
final Class<Number> numberClass = (Class<Number>) propertySchemaClass;
-- field = new SpinnerFieldPanel<Number>("panel",
-- label.getDefaultModelObjectAsString(), numberClass, new Model<Number>(), null, null);
++ field = new SpinnerFieldPanel<Number>(
++ "panel", label.getDefaultModelObjectAsString(), numberClass, new Model<Number>());
required = property.getSchema().isRequired();
} else if (ClassUtils.isAssignable(Boolean.class, propertySchemaClass)) {
-- field = new AjaxCheckBoxPanel("panel",
-- label.getDefaultModelObjectAsString(), new Model<Boolean>());
++ field = new AjaxCheckBoxPanel(
++ "panel", label.getDefaultModelObjectAsString(), new Model<Boolean>(), false);
} else {
-- field = new AjaxTextFieldPanel("panel",
-- label.getDefaultModelObjectAsString(), new Model<String>());
--
++ field = new AjaxTextFieldPanel(
++ "panel", label.getDefaultModelObjectAsString(), new Model<String>(), false);
required = property.getSchema().isRequired();
}
@@@ -119,29 -119,29 +123,28 @@@
field.setTitle(property.getSchema().getHelpMessage());
-- if (required) {
-- field.addRequiredLabel();
-- }
--
++ final AbstractFieldPanel<? extends Serializable> fieldPanel;
if (isArray) {
-- if (property.getValues().isEmpty()) {
-- property.getValues().add(null);
-- }
--
- final MultiFieldPanel multiFieldPanel = new MultiFieldPanel("panel", "connPropAttrSchema",
- final MultiFieldPanel multiFieldPanel = new MultiFieldPanel("panel",
-- new PropertyModel<List<String>>(property, "values"), field);
++ final MultiFieldPanel multiFieldPanel = new MultiFieldPanel(
++ "panel",
++ label.getDefaultModelObjectAsString(),
++ new PropertyModel<List<String>>(property, "values"),
++ field, true);
item.add(multiFieldPanel);
++ fieldPanel = multiFieldPanel;
} else {
setNewFieldModel(field, property.getValues());
item.add(field);
++ fieldPanel = field;
}
-- if (withOverridable) {
-- item.add(new AjaxCheckBoxPanel("connPropAttrOverridable",
-- "connPropAttrOverridable", new PropertyModel<Boolean>(property, "overridable")));
++ if (required) {
++ fieldPanel.addRequiredLabel();
}
-- configuration.add(property);
++ if (withOverridable) {
++ fieldPanel.showExternAction(addCheckboxToggle(property));
++ }
}
@SuppressWarnings({ "unchecked", "rawtypes" })
@@@ -149,4 -149,4 +152,38 @@@
field.setNewModel(values);
}
++ private FormComponent<?> addCheckboxToggle(final ConnConfProperty property) {
++
++ final BootstrapToggleConfig config = new BootstrapToggleConfig();
++ config
++ .withOnStyle(BootstrapToggleConfig.Style.info).withOffStyle(BootstrapToggleConfig.Style.warning)
++ .withSize(BootstrapToggleConfig.Size.mini)
++ .withOnLabel("Overridable")
++ .withOffLabel("Not Overridable");
++
++ return new BootstrapToggle("externalAction", new PropertyModel<Boolean>(property, "overridable"), config) {
++
++ private static final long serialVersionUID = 1L;
++
++ @Override
++ protected CheckBox newCheckBox(final String id, final IModel<Boolean> model) {
++ final CheckBox checkBox = super.newCheckBox(id, model);
++ checkBox.add(new AjaxFormComponentUpdatingBehavior("change") {
++
++ private static final long serialVersionUID = 1L;
++
++ @Override
++ protected void onUpdate(final AjaxRequestTarget target) {
++ }
++ });
++ return checkBox;
++ }
++
++ @Override
++ protected void onComponentTag(final ComponentTag tag) {
++ super.onComponentTag(tag);
++ tag.append("class", "overridable", " ");
++ }
++ };
++ }
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/java/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder.java
----------------------------------------------------------------------
diff --cc client/console/src/main/java/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder.java
index 30a7bbc,30a7bbc..c3729bd
--- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder.java
@@@ -194,12 -194,12 +194,12 @@@ public class ProvisionWizardBuilder ext
* Construct.
*
* @param id The component id
-- * @param resourceTO external resource to be updated.
++ * @param resurceTO external resource to be updated.
* @param pageRef Caller page reference.
*/
-- public ProvisionWizardBuilder(final String id, final ResourceTO resourceTO, final PageReference pageRef) {
++ public ProvisionWizardBuilder(final String id, final ResourceTO resurceTO, final PageReference pageRef) {
super(id, new ProvisionTO(), pageRef);
-- this.resourceTO = resourceTO;
++ this.resourceTO = resurceTO;
}
@Override
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css
----------------------------------------------------------------------
diff --cc client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css
index b6d4fe5,fcdc8db..dbf377c
--- a/client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css
+++ b/client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css
@@@ -212,3 -209,3 +212,9 @@@ div.realms div.summarize
.navbar a {
height: 55px
}
++
++span.overridable div.checkbox {
++ float: right;
++ margin: 0px;
++ padding: 0px;
++}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractConnectorConfPanel.html
----------------------------------------------------------------------
diff --cc client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractConnectorConfPanel.html
index 0000000,0000000..0a3802f
new file mode 100644
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractConnectorConfPanel.html
@@@ -1,0 -1,0 +1,38 @@@
++<!--
++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.
++-->
++<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
++ <head>
++ <title>Connector configuration panel</title>
++ </head>
++ <body>
++ <wicket:panel>
++ <span wicket:id="connectorPropertiesContainer">
++ <div class="form-group" wicket:id="connectorProperties">
++ <span wicket:id="panel">[panel]</span>
++ </div>
++
++ <div>
++ <a style="position: absolute; top: 25px; right:20px;" wicket:id="check" href="#">
++ <i class="fa fa-heartbeat fa-2x"></i>
++ </a>
++ </div>
++ </span>
++ </wicket:panel>
++ </body>
++</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractResourceModal.html
----------------------------------------------------------------------
diff --cc client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractResourceModal.html
index 0000000,0000000..bd4cd4b
new file mode 100644
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AbstractResourceModal.html
@@@ -1,0 -1,0 +1,23 @@@
++<!--
++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.
++-->
++<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
++ <wicket:extend>
++ <div wicket:id="tabbedPanel"></div>
++ </wicket:extend>
++</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnectorCapabilitiesPanel.html
----------------------------------------------------------------------
diff --cc client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnectorCapabilitiesPanel.html
index 0000000,0000000..b5aa95d
new file mode 100644
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnectorCapabilitiesPanel.html
@@@ -1,0 -1,0 +1,28 @@@
++<!--
++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.
++-->
++<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
++ <head>
++ <title>Connector capabilities panel</title>
++ </head>
++ <body>
++ <wicket:panel>
++ <span wicket:id="capabilitiesPalette"/>
++ </wicket:panel>
++ </body>
++</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnectorDetailsPanel.html
----------------------------------------------------------------------
diff --cc client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnectorDetailsPanel.html
index 0000000,0000000..390176c
new file mode 100644
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnectorDetailsPanel.html
@@@ -1,0 -1,0 +1,61 @@@
++<!--
++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.
++-->
++<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
++ <head>
++ <title>Connector details panel</title>
++ </head>
++ <body>
++ <wicket:panel>
++ <div class="form-group">
++ <span wicket:id="displayName">[displayName]</span>
++ </div>
++
++ <div class="form-group">
++ <span wicket:id="location">[location]</span>
++ </div>
++
++ <div class="form-group">
++ <span wicket:id="connectorName">[connectorName]</span>
++ </div>
++
++ <div class="form-group">
++ <span wicket:id="version">[version]</span>
++ </div>
++
++ <div class="form-group" style="padding: 30px 0px 0px 0px">
++ <table class="table">
++ <tbody>
++ <tr>
++ <td><span wicket:id="connRequestTimeout">[connRequestTimeout]</span></td>
++ <td><span wicket:id="poolMaxObjects">[poolMaxObjects]</span></td>
++ </tr>
++ <tr>
++ <td><span wicket:id="poolMinIdle">[poolMinIdle]</span></td>
++ <td><span wicket:id="poolMaxIdle">[poolMaxIdle]</span></td>
++ </tr>
++ <tr>
++ <td><span wicket:id="poolMaxWait">[poolMaxWait]</span></td>
++ <td><span wicket:id="poolMinEvictableIdleTime">[poolMinEvictableIdleTime]</span></td>
++ </tr>
++ </tbody>
++ </table>
++ </div>
++ </wicket:panel>
++ </body>
++</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnectorModal.html
----------------------------------------------------------------------
diff --cc client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnectorModal.html
index 2580a91,a07a8dc..0000000
deleted file mode 100644,100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnectorModal.html
+++ /dev/null
@@@ -1,147 -1,154 +1,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.
---->
--<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
-- <wicket:extend>
- <div class="tabbable tabs-left">
- <ul class="nav nav-tabs">
- <li class="active"><a data-toggle="tab" href="#tabs-1"><span><wicket:message key="tab1"/></span></a></li>
- <li><a data-toggle="tab" href="#tabs-2"><span><wicket:message key="tab2"/></span></a></li>
- <li><a data-toggle="tab" href="#tabs-3"><span><wicket:message key="tab3"/></span></a></li>
- </ul>
- <div class="tab-content">
- <div id="tabs-1" class="tab-pane active">
- <div id="formtable">
- <div class="tablerow alt">
- <div class="tablecolumn_label short_dynamicsize">
- <label for="displayName"><wicket:message key="displayName"/></label>
- </div>
- <div class="tablecolumn_field short_dynamicsize">
- <span wicket:id="displayName">[displayName]</span>
- <form wicket:id="form">
- <div class="tabbable tabs-left">
- <ul class="nav nav-tabs">
- <li class="active"><a data-toggle="tab" href="#tabs-1"><span><wicket:message key="tab1"/></span></a></li>
- <li><a data-toggle="tab" href="#tabs-2"><span><wicket:message key="tab2"/></span></a></li>
- <li><a data-toggle="tab" href="#tabs-3"><span><wicket:message key="tab3"/></span></a></li>
- </ul>
- <div class="tab-content">
- <div id="tabs-1" class="tab-pane active">
- <div id="formtable">
- <div class="tablerow alt">
- <div class="tablecolumn_label short_dynamicsize">
- <label for="displayName"><wicket:message key="displayName"/></label>
- </div>
- <div class="tablecolumn_field short_dynamicsize">
- <span wicket:id="displayName">[displayName]</span>
- </div>
-- </div>
- </div>
--
- <div class="tablerow">
- <div class="tablecolumn_label short_dynamicsize">
- <label for="location"><wicket:message key="location"/></label>
- </div>
- <div class="tablecolumn_field short_dynamicsize">
- <span wicket:id="location">[location]</span>
- <div class="tablerow">
- <div class="tablecolumn_label short_dynamicsize">
- <label for="location"><wicket:message key="location"/></label>
- </div>
- <div class="tablecolumn_field short_dynamicsize">
- <span wicket:id="location">[location]</span>
- </div>
-- </div>
- </div>
--
- <div class="tablerow alt">
- <div class="tablecolumn_label short_dynamicsize">
- <label for="name"><wicket:message key="name"/></label>
- </div>
- <div class="tablecolumn_field medium_dynamicsize">
- <span wicket:id="connectorName">[connectorName]</span>
- <div class="tablerow alt">
- <div class="tablecolumn_label short_dynamicsize">
- <label for="name"><wicket:message key="name"/></label>
- </div>
- <div class="tablecolumn_field medium_dynamicsize">
- <span wicket:id="connectorName">[connectorName]</span>
- </div>
-- </div>
- </div>
--
- <div class="tablerow">
- <div class="tablecolumn_label short_dynamicsize">
- <label for="version"><wicket:message key="version"/></label>
- </div>
- <div class="tablecolumn_field short_dynamicsize">
- <span wicket:id="version">[version]</span>
- </div>
- </div>
- </div>
- <div style="display: table; border: 1px solid #BBBBBB;">
- <div class="tablerow2 alt">
- <div class="tablecolumn2_label short_dynamicsize">
- <label for="connRequestTimeout"><wicket:message key="connRequestTimeout"/></label>
- </div>
- <div class="tablecolumn2_field short_dynamicsize">
- <span wicket:id="connRequestTimeout">[connRequestTimeout]</span>
- </div>
- <div class="tablecolumn2_label short_dynamicsize">
- <label for="poolMaxObjects"><wicket:message key="poolMaxObjects"/></label>
- </div>
- <div class="tablecolumn2_field short_dynamicsize">
- <span wicket:id="poolMaxObjects">[poolMaxObjects]</span>
- </div>
- </div>
- <div class="tablerow2">
- <div class="tablecolumn2_label short_dynamicsize">
- <label for="poolMinIdle"><wicket:message key="poolMinIdle"/></label>
- </div>
- <div class="tablecolumn2_field short_dynamicsize">
- <span wicket:id="poolMinIdle">[poolMinIdle]</span>
- </div>
- <div class="tablecolumn2_label short_dynamicsize">
- <label for="poolMaxIdle"><wicket:message key="poolMaxIdle"/></label>
- </div>
- <div class="tablecolumn2_field short_dynamicsize">
- <span wicket:id="poolMaxIdle">[poolMaxIdle]</span>
- <div class="tablerow">
- <div class="tablecolumn_label short_dynamicsize">
- <label for="version"><wicket:message key="version"/></label>
- </div>
- <div class="tablecolumn_field short_dynamicsize">
- <span wicket:id="version">[version]</span>
- </div>
-- </div>
-- </div>
- <div class="tablerow2 alt">
- <div class="tablecolumn2_label short_dynamicsize">
- <label for="poolMaxWait"><wicket:message key="poolMaxWait"/></label>
- </div>
- <div class="tablecolumn2_field short_dynamicsize">
- <span wicket:id="poolMaxWait">[poolMaxWait]</span>
- <div style="display: table; border: 1px solid #BBBBBB;">
- <div class="tablerow2 alt">
- <div class="tablecolumn2_label short_dynamicsize">
- <label for="connRequestTimeout"><wicket:message key="connRequestTimeout"/></label>
- </div>
- <div class="tablecolumn2_field short_dynamicsize">
- <span wicket:id="connRequestTimeout">[connRequestTimeout]</span>
- </div>
- <div class="tablecolumn2_label short_dynamicsize">
- <label for="poolMaxObjects"><wicket:message key="poolMaxObjects"/></label>
- </div>
- <div class="tablecolumn2_field short_dynamicsize">
- <span wicket:id="poolMaxObjects">[poolMaxObjects]</span>
- </div>
-- </div>
- <div class="tablecolumn2_label short_dynamicsize">
- <label for="poolMinEvictableIdleTime"><wicket:message key="poolMinEvictableIdleTime"/></label>
- <div class="tablerow2">
- <div class="tablecolumn2_label short_dynamicsize">
- <label for="poolMinIdle"><wicket:message key="poolMinIdle"/></label>
- </div>
- <div class="tablecolumn2_field short_dynamicsize">
- <span wicket:id="poolMinIdle">[poolMinIdle]</span>
- </div>
- <div class="tablecolumn2_label short_dynamicsize">
- <label for="poolMaxIdle"><wicket:message key="poolMaxIdle"/></label>
- </div>
- <div class="tablecolumn2_field short_dynamicsize">
- <span wicket:id="poolMaxIdle">[poolMaxIdle]</span>
- </div>
-- </div>
- <div class="tablecolumn2_field short_dynamicsize">
- <span wicket:id="poolMinEvictableIdleTime">[poolMinEvictableIdleTime]</span>
- <div class="tablerow2 alt">
- <div class="tablecolumn2_label short_dynamicsize">
- <label for="poolMaxWait"><wicket:message key="poolMaxWait"/></label>
- </div>
- <div class="tablecolumn2_field short_dynamicsize">
- <span wicket:id="poolMaxWait">[poolMaxWait]</span>
- </div>
- <div class="tablecolumn2_label short_dynamicsize">
- <label for="poolMinEvictableIdleTime"><wicket:message key="poolMinEvictableIdleTime"/></label>
- </div>
- <div class="tablecolumn2_field short_dynamicsize">
- <span wicket:id="poolMinEvictableIdleTime">[poolMinEvictableIdleTime]</span>
- </div>
-- </div>
-- </div>
-- </div>
- </div>
- <div id="tabs-2" class="tab-pane">
- <div id="formtable">
- <span wicket:id="container">
- <div style="border-bottom: 10px">
- <div style="width: 40px; text-align: center; font-size: 7px">
- <label for="version"><wicket:message key="overridable"/></label>
- </div>
- </div>
- <form wicket:id="connectorPropForm">
- <div class="tablerow connectorProp" wicket:id="connectorProperties">
- <div class="tablecolumn_check" style="width: 27px; text-align: center; margin-right: 10px">
- <span wicket:id="connPropAttrOverridable">[connPropAttrOverridable]</span>
- <div id="tabs-2" class="tab-pane">
- <div id="formtable">
- <span wicket:id="container">
- <div style="border-bottom: 10px">
- <div style="width: 40px; text-align: center; font-size: 7px">
- <label for="version"><wicket:message key="overridable"/></label>
-- </div>
- <div class="tablecolumn_connPropAttr">
- <span wicket:id="connPropAttrSchema">[connPropAttrSchema]</span>
- </div>
- <form wicket:id="connectorPropForm">
- <div class="tablerow connectorProp" wicket:id="connectorProperties">
- <div class="tablecolumn_check" style="width: 27px; text-align: center; margin-right: 10px">
- <span wicket:id="connPropAttrOverridable">[connPropAttrOverridable]</span>
- </div>
- <div class="tablecolumn_connPropAttr">
- <span wicket:id="connPropAttrSchema">[connPropAttrSchema]</span>
- </div>
- <div class="tablecolumn_field veryshort_fixedsize">
- <span wicket:id="panel">[panel]</span>
- </div>
-- </div>
- <div class="tablecolumn_field veryshort_fixedsize">
- <span wicket:id="panel">[panel]</span>
- <div>
- <a style="position: absolute; top: 2px; right:20px;" wicket:id="check">
- <img src="img/ping.png"width="30" height="30"
- alt="ping" title="title" wicket:message="title:check"/>
- </a>
-- </div>
- </div>
- <div>
- <a style="position: absolute; top: 2px; right:20px;" wicket:id="check">
- <img src="img/ping.png"width="30" height="30"
- alt="ping" title="title" wicket:message="title:check"/>
- </a>
- </div>
- </form>
- </span>
- </form>
- </span>
- </div>
-- </div>
- </div>
- <div id="tabs-3" class="tab-pane">
- <span wicket:id="capabilitiesPalette"/>
- <div id="tabs-3" class="tab-pane">
- <span wicket:id="capabilitiesPalette"/>
- </div>
-- </div>
-- </div>
- </div>
-
- <div class="modal-footer">
- <input type="submit" class="btn btn-primary" wicket:id="apply"/>
- <input type="button" class="btn btn-default" wicket:id="cancel"/>
- </div>
- </form>
-- </wicket:extend>
--</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnectorModal.properties
----------------------------------------------------------------------
diff --cc client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnectorModal.properties
index 8500f1a,8500f1a..69ea457
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnectorModal.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnectorModal.properties
@@@ -14,9 -14,9 +14,10 @@@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
--tab1=General
--tab2=Configuration
--tab3=Capabilities
++general=General
++configuration=Configuration
++capabilities=Capabilities
++
displayName=Display name
bundleName=Bundle name
version=Version
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnectorModal_it.properties
----------------------------------------------------------------------
diff --cc client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnectorModal_it.properties
index 96080c3,96080c3..16126ba
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnectorModal_it.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnectorModal_it.properties
@@@ -14,9 -14,9 +14,10 @@@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
--tab1=Generale
--tab2=Configurazione
--tab3=Capabilities
++general=Generale
++configuration=Configurazione
++capabilities=Capabilities
++
bundleName=Bundle name
version=Versione
connRequestTimeout=Timeout richiesta (sec)
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnectorModal_pt_BR.properties
----------------------------------------------------------------------
diff --cc client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnectorModal_pt_BR.properties
index b688216,b688216..28e5825
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnectorModal_pt_BR.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ConnectorModal_pt_BR.properties
@@@ -14,9 -14,9 +14,10 @@@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
--tab1=Geral
--tab2=Configura\u00e7\u00e3o
--tab3=Capacidades
++general=Geral
++configuration=Configura\u00e7\u00e3o
++capabilities=Capacidades
++
displayName=Mostrar Nome
bundleName=Nome do Pacote
version=Vers\u00e3o
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceConnConfPanel.html
----------------------------------------------------------------------
diff --cc client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceConnConfPanel.html
index af71505,af71505..0000000
deleted file mode 100644,100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceConnConfPanel.html
+++ /dev/null
@@@ -1,40 -1,40 +1,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.
---->
--<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
-- <wicket:panel>
-- <span wicket:id="connectorPropertiesContainer">
-- <div id="formtable">
-- <div class="tablerow" wicket:id="connectorProperties">
-- <div class="tablecolumn_label medium_fixedsize">
-- <span wicket:id="connPropAttrSchema">[connPropAttrSchema]</span>
-- </div>
-- <div class="tablecolumn_field medium_dynamicsize">
-- <span wicket:id="panel">[connPropAttrValue]</span>
-- </div>
-- </div>
-- </div>
--
-- <div>
-- <a style="position: absolute; top: 2px; right:20px;" wicket:id="check">
-- <i class="fa fa-heartbeat fa-2x"></i>
-- </a>
-- </div>
-- </span>
-- </wicket:panel>
--</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceDetailsPanel.html
----------------------------------------------------------------------
diff --cc client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceDetailsPanel.html
index 942edab,7d518ce..67bbd73
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceDetailsPanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceDetailsPanel.html
@@@ -16,62 -16,110 +16,58 @@@ KIND, either express or implied. See t
specific language governing permissions and limitations
under the License.
-->
-<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
- <wicket:panel>
- <div id="formtable">
- <div class="tablerow alt">
- <div class="tablecolumn_label medium_fixedsize">
- <label for="name"><wicket:message key="name"/></label>
- </div>
- <div class="tablecolumn_field medium_dynamicsize">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://xmlns.jcp.org/jsf/composite">
+ <head>
+ <title>Resource details panel</title>
+ </head>
+ <body>
+ <wicket:panel>
+
+ <div wicket:id="container" class="summarize">
+ <div class="form-group">
<span wicket:id="name">[name]</span>
</div>
- </div>
- <div class="tablerow">
- <div class="tablecolumn_label medium_fixedsize">
- <label for="connector"><wicket:message key="connector"/></label>
- </div>
- <div class="tablecolumn_field medium_dynamicsize">
+ <div class="form-group">
<span wicket:id="connector">[connector]</span>
</div>
- </div>
- <div class="tablerow alt">
- <div class="tablecolumn_label medium_fixedsize">
- <label for="enforceMandatoryCondition"><wicket:message key="enforceMandatoryCondition"/></label>
- </div>
- <div class="tablecolumn_field medium_dynamicsize">
+ <div class="form-group">
<span wicket:id="enforceMandatoryCondition">[enforceMandatoryCondition]</span>
</div>
- </div>
- <div class="tablerow">
- <div class="tablecolumn_label medium_fixedsize">
- <label for="propagationPrimary"><wicket:message key="propagationPrimary"/></label>
- </div>
- <div class="tablecolumn_field medium_dynamicsize">
+ <div class="form-group">
<span wicket:id="propagationPrimary">[propagationPrimary]</span>
</div>
- </div>
- <div class="tablerow alt">
- <div class="tablecolumn_label medium_fixedsize">
- <label for="propagationPriority"><wicket:message key="propagationPriority"/></label>
- </div>
- <div class="tablecolumn_field medium_dynamicsize">
+ <div class="form-group">
<span wicket:id="propagationPriority">[propagationPriority]</span>
</div>
- </div>
- <div class="tablerow alt">
- <div class="tablecolumn_label medium_fixedsize">
- <label for="randomPwdIfNotProvided"><wicket:message key="randomPwdIfNotProvided"/></label>
- </div>
- <div class="tablecolumn_field medium_dynamicsize">
+ <div class="form-group">
- <span wicket:id="propagationMode">[propagationMode]</span>
- </div>
-
- <div class="form-group">
<span wicket:id="randomPwdIfNotProvided">[randomPwdIfNotProvided]</span>
</div>
- </div>
- <div class="tablerow">
- <div class="tablecolumn_label short_dynamicsize">
- <label for="propagationActionsClassNames"><wicket:message key="actionsClasses"/></label>
+ <div class="form-group">
+ <span wicket:id="actionsClasses">[actionsClasses]</span>
</div>
- <span wicket:id="propagationActionsClassNames">
- <span wicket:id="actionsClasses">
- <select class="text ui-widget-content ui-corner-all" wicket:id="actionsClass"/>
- <a wicket:id="drop"><i class="fa fa-minus"></i></a>
- <a wicket:id="add"><i class="fa fa-plus"></i></a>
- <br/>
- </span>
- <a wicket:id="first"><i class="fa fa-plus"></i></a>
- </span>
- </div>
- <div class="tablerow alt">
- <div class="tablecolumn_label medium_fixedsize">
- <label for="createTraceLevel"><wicket:message key="createTraceLevel"/></label>
- </div>
- <div class="tablecolumn_field medium_dynamicsize">
+ <div class="form-group">
<span wicket:id="createTraceLevel">[createTraceLevel]</span>
</div>
- </div>
- <div class="tablerow">
- <div class="tablecolumn_label medium_fixedsize">
- <label for="updateTraceLevel"><wicket:message key="updateTraceLevel"/></label>
- </div>
- <div class="tablecolumn_field medium_dynamicsize">
+ <div class="form-group">
<span wicket:id="updateTraceLevel">[updateTraceLevel]</span>
</div>
- </div>
- <div class="tablerow alt">
- <div class="tablecolumn_label medium_fixedsize">
- <label for="deleteTraceLevel"><wicket:message key="deleteTraceLevel"/></label>
- </div>
- <div class="tablecolumn_field medium_dynamicsize">
+ <div class="form-group">
<span wicket:id="deleteTraceLevel">[deleteTraceLevel]</span>
</div>
- </div>
- <div class="tablerow">
- <div class="tablecolumn_label medium_fixedsize">
- <label for="syncTraceLevel"><wicket:message key="syncTraceLevel"/></label>
- </div>
- <div class="tablecolumn_field medium_dynamicsize">
+ <div class="form-group">
<span wicket:id="syncTraceLevel">[syncTraceLevel]</span>
</div>
</div>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal.html
----------------------------------------------------------------------
diff --cc client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal.html
index bd4cd4b,2d4f7b4..0000000
deleted file mode 100644,100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal.html
+++ /dev/null
@@@ -1,23 -1,54 +1,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.
---->
--<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
-- <wicket:extend>
- <div wicket:id="tabbedPanel"></div>
- <form wicket:id="form">
- <div class="tabbable tabs-left">
- <ul class="nav nav-tabs">
- <li class="active"><a data-toggle="tab" href="#resource"><span><wicket:message key="resource"/></span></a></li>
- <li><a data-toggle="tab" href="#provisions"><span><wicket:message key="provisions"/></span></a></li>
- <li><a data-toggle="tab" href="#connectorProperties"><span><wicket:message key="connectorProperties"/></span></a></li>
- <li><a data-toggle="tab" href="#security"><span><wicket:message key="security"/></span></a></li>
- </ul>
- <div class="tab-content">
- <div id="resource" class="tab-pane active">
- <span wicket:id="details">[details]</span>
- <span wicket:id="systeminformation">[System Information]</span>
- </div>
- <div id="provisions" class="tab-pane">
- <span wicket:id="pcontainer">
- <span wicket:id="provisions">[provisions]</span>
- </span>
- </div>
- <div id="connectorProperties" class="tab-pane">
- <span wicket:id="connconf">[connconf]</span>
- </div>
- <div id="security" class="tab-pane">
- <span wicket:id="security">[security]</span>
- </div>
- </div>
- </div>
-
- <div class="modal-footer">
- <input type="submit" class="btn btn-primary" wicket:id="apply"/>
- <input type="button" class="btn btn-default" wicket:id="cancel"/>
- </div>
- </form>
-- </wicket:extend>
--</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal.properties
----------------------------------------------------------------------
diff --cc client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal.properties
index 24827a6,24827a6..bad0582
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal.properties
@@@ -14,11 -14,11 +14,12 @@@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
--resource=Resource details
++general=Resource details
provisions=Provisioning
--umapping=User mapping
connectorProperties=Connector properties
security=Security
++
++umapping=User mapping
required_alert=All form fields are required
connector=Connector
existing_resources=Existing resources
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal_it.properties
----------------------------------------------------------------------
diff --cc client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal_it.properties
index 1bc3c04,1bc3c04..02c2b81
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal_it.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal_it.properties
@@@ -14,7 -14,7 +14,7 @@@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
--resource=Dettagli Risorsa
++general=Dettagli Risorsa
provisions=Provisioning
umapping=Mapping utenti
connectorProperties=Propriet\u00e0\u00a0 Connettore
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal_pt_BR.properties
----------------------------------------------------------------------
diff --cc client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal_pt_BR.properties
index 47f41b2,47f41b2..9d6faa5
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal_pt_BR.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal_pt_BR.properties
@@@ -14,7 -14,7 +14,7 @@@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
--resource=Detalhes de Recursos
++general=Detalhes de Recursos
provisions=Provisioning
umapping=Mapeamento de usu\u00e1rios
connectorProperties=Propriedades de Conectores
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AbstractFieldPanel.html
----------------------------------------------------------------------
diff --cc client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AbstractFieldPanel.html
index 0000000,0000000..b3ee7bc
new file mode 100644
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AbstractFieldPanel.html
@@@ -1,0 -1,0 +1,35 @@@
++<!--
++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.
++-->
++<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
++ <wicket:panel>
++
++ <wicket:fragment wicket:id="requiredFragment">
++ <span wicket:id="requiredLabel"/>
++ </wicket:fragment>
++
++ <wicket:fragment wicket:id="externalActionFragment">
++ <span wicket:id="externalAction"/>
++ </wicket:fragment>
++
++ <wicket:fragment wicket:id="emptyFragment">
++ </wicket:fragment>
++
++ <wicket:child />
++ </wicket:panel>
++</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.html
----------------------------------------------------------------------
diff --cc client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.html
index ccb8d5e,fc7596f..17289db
--- a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.html
@@@ -16,18 -16,6 +16,21 @@@ KIND, either express or implied. See t
specific language governing permissions and limitations
under the License.
-->
-<wicket:extend>
- <input type="checkbox" class="checkbox" wicket:id="checkboxField"/>
-</wicket:extend>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <head>
+ <title>Ajax checkbox panel</title>
+ </head>
+ <body>
+ <wicket:extend>
+ <div class="checkbox">
- <label>
- <input type="checkbox" wicket:id="checkboxField">
- <label wicket:id="label">[LABEL]</label>
++ <label style="width:100%">
++ <input type="checkbox" wicket:id="checkboxField" />
++ <wicket:enclosure child="field-label">
++ <label wicket:id="field-label">[LABEL]</label><span wicket:id="required"/>
++ <span wicket:id="externalAction"/>
++ </wicket:enclosure>
+ </label>
+ </div>
+ </wicket:extend>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDropDownChoicePanel.html
----------------------------------------------------------------------
diff --cc client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDropDownChoicePanel.html
index e1ff5da,12d5bf2..b9af868
--- a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDropDownChoicePanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDropDownChoicePanel.html
@@@ -17,15 -17,8 +17,16 @@@ specific language governing permission
under the License.
-->
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <head>
+ <title>Drop down choice</title>
+ </head>
<wicket:extend>
- <select class="ui-widget-content ui-corner-all medium_dynamicsize"
- wicket:id="dropDownChoiceField" />
+ <wicket:enclosure child="field-label">
+ <label wicket:id="field-label">[LABEL]</label><span wicket:id="required"/>
++ <span wicket:id="externalAction"/>
+ </wicket:enclosure>
+ <fieldset class="input-group">
+ <select wicket:id="dropDownChoiceField" />
+ </fieldset>
</wicket:extend>
</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxPasswordFieldPanel.html
----------------------------------------------------------------------
diff --cc client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxPasswordFieldPanel.html
index eab74ac,eab74ac..2d22038
--- a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxPasswordFieldPanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxPasswordFieldPanel.html
@@@ -17,7 -17,7 +17,18 @@@ specific language governing permission
under the License.
-->
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
-- <wicket:extend>
-- <input type="password" class="form-control" wicket:id="passwordField" />
-- </wicket:extend>
++ <head>
++ <title>Ajaxt password field panel</title>
++ </head>
++ <body>
++ <wicket:extend>
++ <wicket:enclosure child="field-label">
++ <label wicket:id="field-label">[LABEL]</label><span wicket:id="required"/>
++ <span wicket:id="externalAction"/>
++ </wicket:enclosure>
++ <fieldset class="input-group">
++ <input type="password" class="form-control" wicket:id="passwordField" />
++ </fieldset>
++ </wicket:extend>
++ </body>
</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxTextFieldPanel.html
----------------------------------------------------------------------
diff --cc client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxTextFieldPanel.html
index f2b0cd3,28d897d..3168f31
--- a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxTextFieldPanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxTextFieldPanel.html
@@@ -17,17 -17,10 +17,18 @@@ specific language governing permission
under the License.
-->
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
- <wicket:extend>
- <div class="form-group">
- <label wicket:id="label">[LABEL]</label><span wicket:id="required"/>
- <input type="text" class="form-control" wicket:id="textField"/>
- </div>
- </wicket:extend>
+ <head>
+ <title>Ajaxt text field panel</title>
+ </head>
+ <body>
+ <wicket:extend>
+ <wicket:enclosure child="field-label">
+ <label wicket:id="field-label">[LABEL]</label><span wicket:id="required"/>
++ <span wicket:id="externalAction"/>
+ </wicket:enclosure>
- <fieldset class="form-group input-group">
++ <fieldset class="input-group">
+ <input type="text" class="form-control" wicket:id="textField"/>
+ </fieldset>
+ </wicket:extend>
+ </body>
</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/CheckBoxMultipleChoiceFieldPanel.html
----------------------------------------------------------------------
diff --cc client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/CheckBoxMultipleChoiceFieldPanel.html
index af85a84,af85a84..653dce8
--- a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/CheckBoxMultipleChoiceFieldPanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/CheckBoxMultipleChoiceFieldPanel.html
@@@ -16,10 -16,10 +16,16 @@@ KIND, either express or implied. See t
specific language governing permissions and limitations
under the License.
-->
--<html>
-- <wicket:panel>
-- <div class="form-group">
-- <span wicket:id="checkBoxMultipleChoice" />
-- </div>
-- </wicket:panel>
++<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
++ <head>
++ <title>Checkbox multi-choice field panel</title>
++ </head>
++ <body>
++ <wicket:extend>
++ <div class="form-group">
++ <span wicket:id="checkBoxMultipleChoice" />
++ </div>
++ </wicket:extend>
++ </body>
</html>
++
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/FieldPanel.html
----------------------------------------------------------------------
diff --cc client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/FieldPanel.html
index 9972280,9972280..0000000
deleted file mode 100644,100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/FieldPanel.html
+++ /dev/null
@@@ -1,31 -1,31 +1,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.
---->
--<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
-- <wicket:panel>
--
-- <wicket:fragment wicket:id="requiredFragment">
-- <span wicket:id="requiredLabel"/>
-- </wicket:fragment>
--
-- <wicket:fragment wicket:id="notRequiredFragment">
-- </wicket:fragment>
--
-- <wicket:child />
-- </wicket:panel>
--</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.html
----------------------------------------------------------------------
diff --cc client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.html
index 5a2a02a,e35205c..d1e0a46
--- a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.html
@@@ -17,49 -17,19 +17,49 @@@ specific language governing permission
under the License.
-->
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
- <wicket:panel>
- <span wicket:id="multiValueContainer">
- <span wicket:id="view">
- <span wicket:id="panel">[form field]</span>
- <a wicket:id="drop"><img src="img/minus-icon.png" alt="remove icon" class="drop_button" /></a>
- <span wicket:id="panelPlus">[plus]</span>
- <br />
+ <head>
+ <title>Multivalue conatiner</title>
+ </head>
+ <body>
- <wicket:panel>
++ <wicket:extend>
+ <wicket:enclosure child="field-label">
- <!--<label wicket:id="field-label">[LABEL]</label><span wicket:id="required"/>-->
- <label wicket:id="field-label">[LABEL]</label>
++ <label wicket:id="field-label">[LABEL]</label><span wicket:id="required"/>
++ <span wicket:id="externalAction"/>
+ </wicket:enclosure>
+
+ <span wicket:id="multiValueContainer">
+ <span wicket:id="content">[content]</span>
</span>
+
+ <wicket:fragment wicket:id="noDataFragment">
+ <div class="input-group">
+ <div class="form-control" style="background-color:#EEE">
+ <label wicket:id="field-label">[LABEL]</label>
+ </div>
+ <span wicket:id="panelPlus">[plus]</span>
+ </div>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="dataFragment">
+ <span wicket:id="view">
+ <div class="input-group">
+ <span wicket:id="panel">[form field]</span>
+ <div class="input-group-addon">
+ <a wicket:id="drop"><i class="fa fa-minus"></i></a>
+ </div>
+ <span wicket:id="panelPlus">[plus]</span>
+ </div>
+ </span>
+ </wicket:fragment>
+
<wicket:fragment wicket:id="fragmentPlus">
- <a wicket:id="add"><i class="fa fa-plus"></i></a>
+ <div class="input-group-addon">
+ <a wicket:id="add"><i class="fa fa-plus"></i></a>
+ </div>
</wicket:fragment>
+
<wicket:fragment wicket:id="emptyFragment">
</wicket:fragment>
- </wicket:panel>
- </span>
- </wicket:panel>
++ </wicket:extend>
+ </body>
</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/SpinnerFieldPanel.html
----------------------------------------------------------------------
diff --cc client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/SpinnerFieldPanel.html
index c9ee0e1,a6f0e51..bc34105
--- a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/SpinnerFieldPanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/SpinnerFieldPanel.html
@@@ -18,9 -18,12 +18,10 @@@ under the License
-->
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
<wicket:extend>
- <script type="text/javascript" wicket:id="spinnerFieldJS">
- </script>
- <div style="display: inline-table;">
- <div style="display: table-cell;">
- <input wicket:id="spinnerField"/>
- </div>
- </div>
+ <wicket:enclosure child="field-label">
+ <label wicket:id="field-label">[LABEL]</label><span wicket:id="required"/>
++ <span wicket:id="externalAction"/>
+ </wicket:enclosure>
+ <input wicket:id="spinner"/>
</wicket:extend>
</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/pom.xml
----------------------------------------------------------------------
diff --cc pom.xml
index c9e38bc,e0b4b184e..b9653a1
--- a/pom.xml
+++ b/pom.xml
@@@ -377,7 -376,8 +376,7 @@@ under the License
<jquery-cookie.version>1.4.1-1</jquery-cookie.version>
<bootstrap.version>3.3.5</bootstrap.version>
- <bootstrap-select.version>1.7.3</bootstrap-select.version>
-- <wicket-bootstrap.version>0.10.3</wicket-bootstrap.version>
++ <wicket-bootstrap.version>0.10.4-SNAPSHOT</wicket-bootstrap.version>
<font-awesome.version>4.4.0</font-awesome.version>
<ionicons.version>2.0.1</ionicons.version>
[13/28] syncope git commit: [SYNCOPE-156] removed every reference to
the oldest modal mechanisms
Posted by fm...@apache.org.
[SYNCOPE-156] removed every reference to the oldest modal mechanisms
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/1e15b05e
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/1e15b05e
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/1e15b05e
Branch: refs/heads/master
Commit: 1e15b05e3e3dafa4436edbb6f2585dc68aa855f6
Parents: 2a7cf5a
Author: fmartelli <fa...@gmail.com>
Authored: Thu Oct 1 11:33:23 2015 +0200
Committer: fmartelli <fa...@gmail.com>
Committed: Thu Oct 1 11:33:23 2015 +0200
----------------------------------------------------------------------
.../commons/status/ConnObjectWrapper.java | 4 +-
.../console/commons/status/StatusBean.java | 3 +-
.../console/pages/AbstractStatusModalPage.java | 8 +-
.../pages/AnyDisplayAttributesModalPage.java | 15 +-
.../client/console/pages/BaseModalPage.java | 63 ---
.../console/pages/BulkActionModalPage.java | 23 +-
.../pages/BulkActionResultModalPage.java | 13 +-
.../pages/DisplayAttributesModalPage.java | 25 +-
.../pages/GroupDisplayAttributesModalPage.java | 11 +-
.../console/pages/ProvisioningModalPage.java | 27 +-
.../client/console/pages/ResultStatusModal.java | 428 +++++++++++++++++++
.../client/console/pages/StatusModalPage.java | 85 ++--
.../pages/UserDisplayAttributesModalPage.java | 13 +-
.../panels/AbstractSearchResultPanel.java | 78 +---
.../console/panels/ActionDataTablePanel.java | 6 +-
.../console/panels/AjaxDataTablePanel.java | 37 +-
.../console/panels/AnySearchResultPanel.java | 82 ++--
.../console/panels/GroupSearchResultPanel.java | 79 ++--
.../client/console/panels/ImagePanel.java | 4 +-
.../console/panels/UserSearchResultPanel.java | 102 ++---
.../console/rest/AbstractAnyRestClient.java | 11 +
.../console/rest/AnyObjectRestClient.java | 11 +-
.../client/console/rest/BaseRestClient.java | 1 -
.../client/console/rest/GroupRestClient.java | 8 +-
.../client/console/rest/UserRestClient.java | 10 +-
.../markup/html/form/BinaryFieldPanel.java | 4 +-
.../pages/AbstractStatusModalPage.properties | 4 +
.../pages/AbstractStatusModalPage_it.properties | 5 +
.../AbstractStatusModalPage_pt_BR.properties | 5 +
.../client/console/pages/BaseModalPage.html | 55 ---
.../console/pages/BaseModalPage.properties | 20 -
.../console/pages/BaseModalPage_it.properties | 20 -
.../pages/BaseModalPage_pt_BR.properties | 20 -
.../client/console/pages/ResourceModalPage.html | 56 ---
.../console/pages/ResourceModalPage.properties | 60 ---
.../pages/ResourceModalPage_it.properties | 60 ---
.../pages/ResourceModalPage_pt_BR.properties | 60 ---
.../client/console/pages/ResultStatusModal.html | 226 ++++++++++
.../console/pages/ResultStatusModal.properties | 26 ++
.../pages/ResultStatusModal_it.properties | 26 ++
.../pages/ResultStatusModal_pt_BR.properties | 26 ++
.../panels/AbstractSearchResultPanel.html | 49 ++-
.../panels/AbstractSearchResultPanel.properties | 4 +
.../AbstractSearchResultPanel_it.properties | 4 +
.../AbstractSearchResultPanel_pt_BR.properties | 14 +-
.../client/console/panels/ImagePanel.html | 28 ++
.../ProvisionWizardBuilder$ConnObjectLink.html | 4 +-
.../console/pages/CamelRouteModalPage.java | 23 +-
48 files changed, 1114 insertions(+), 832 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/java/org/apache/syncope/client/console/commons/status/ConnObjectWrapper.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/status/ConnObjectWrapper.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/status/ConnObjectWrapper.java
index 199b262..06ccac7 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/commons/status/ConnObjectWrapper.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/status/ConnObjectWrapper.java
@@ -32,9 +32,7 @@ public class ConnObjectWrapper implements Serializable {
private final ConnObjectTO connObjectTO;
- public ConnObjectWrapper(final AnyTO any, final String resourceName,
- final ConnObjectTO connObjectTO) {
-
+ public ConnObjectWrapper(final AnyTO any, final String resourceName, final ConnObjectTO connObjectTO) {
this.any = any;
this.resourceName = resourceName;
this.connObjectTO = connObjectTO;
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/java/org/apache/syncope/client/console/commons/status/StatusBean.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/status/StatusBean.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/status/StatusBean.java
index adb6040..893b8aa 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/commons/status/StatusBean.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/status/StatusBean.java
@@ -45,8 +45,7 @@ public class StatusBean implements Serializable {
public StatusBean(final AnyTO any, final String resourceName) {
this.anyKey = any.getKey();
- this.anyName = any instanceof UserTO
- ? ((UserTO) any).getUsername() : ((GroupTO) any).getName();
+ this.anyName = any instanceof UserTO ? ((UserTO) any).getUsername() : ((GroupTO) any).getName();
this.resourceName = resourceName;
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/java/org/apache/syncope/client/console/pages/AbstractStatusModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/AbstractStatusModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/AbstractStatusModalPage.java
index f5dfbca..f46ec67 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/AbstractStatusModalPage.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/AbstractStatusModalPage.java
@@ -18,13 +18,17 @@
*/
package org.apache.syncope.client.console.pages;
+import org.apache.syncope.client.console.panels.AbstractModalPanel;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
+import org.apache.wicket.PageReference;
import org.apache.wicket.markup.html.panel.Fragment;
-public class AbstractStatusModalPage extends BaseModalPage {
+public class AbstractStatusModalPage extends AbstractModalPanel {
private static final long serialVersionUID = 6633408683036028540L;
- public AbstractStatusModalPage() {
+ public AbstractStatusModalPage(final BaseModal<?> modal, final PageReference pageRef) {
+ super(modal, pageRef);
add(new Fragment("pwdMgtFields", "emptyFragment", this));
}
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/java/org/apache/syncope/client/console/pages/AnyDisplayAttributesModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/AnyDisplayAttributesModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/AnyDisplayAttributesModalPage.java
index 63223a0..b1214f7 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/AnyDisplayAttributesModalPage.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/AnyDisplayAttributesModalPage.java
@@ -20,23 +20,28 @@ package org.apache.syncope.client.console.pages;
import java.util.List;
import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.common.lib.to.AnyObjectTO;
+import org.apache.syncope.common.lib.to.AnyTO;
import org.apache.wicket.PageReference;
-import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
/**
* Modal window with Display user attributes form.
+ * @param <T>
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
-public class AnyDisplayAttributesModalPage extends DisplayAttributesModalPage {
+public class AnyDisplayAttributesModalPage<T extends AnyTO> extends DisplayAttributesModalPage {
private static final long serialVersionUID = 5194630813773543054L;
public static final String[] ANY_DEFAULT_SELECTION = { "key" };
- public AnyDisplayAttributesModalPage(final PageReference pageRef, final ModalWindow window,
- final List<String> schemaNames, final List<String> dSchemaNames) {
- super(pageRef, window, schemaNames, dSchemaNames);
+ public AnyDisplayAttributesModalPage(
+ final BaseModal<T> modal,
+ final PageReference pageRef,
+ final List<String> schemaNames,
+ final List<String> dSchemaNames) {
+ super(modal, pageRef, schemaNames, dSchemaNames);
}
@Override
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/java/org/apache/syncope/client/console/pages/BaseModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/BaseModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/BaseModalPage.java
deleted file mode 100644
index 6da298a..0000000
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/BaseModalPage.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.client.console.pages;
-
-import org.apache.wicket.Component;
-import org.apache.wicket.ajax.AjaxEventBehavior;
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.attributes.AjaxCallListener;
-import org.apache.wicket.ajax.attributes.AjaxRequestAttributes;
-import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
-
-/**
- * Syncope Modal Window.
- */
-public abstract class BaseModalPage extends AbstractBasePage {
-
- private static final long serialVersionUID = -1443079028368471943L;
-
- public BaseModalPage() {
- super();
-
- add(new AjaxEventBehavior("keyup") {
-
- private static final long serialVersionUID = -7133385027739964990L;
-
- @Override
- protected void onEvent(final AjaxRequestTarget target) {
- ModalWindow.closeCurrent(target);
- }
-
- @Override
- protected void updateAjaxAttributes(final AjaxRequestAttributes attributes) {
- super.updateAjaxAttributes(attributes);
-
- attributes.getAjaxCallListeners().add(new AjaxCallListener() {
-
- private static final long serialVersionUID = 7160235486520935153L;
-
- @Override
- public CharSequence getPrecondition(final Component aComponent) {
- return " if(Wicket.Event.keyCode(attrs.event) != 27){return false;}";
- }
- });
- }
- });
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/java/org/apache/syncope/client/console/pages/BulkActionModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/BulkActionModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/BulkActionModalPage.java
index 5c1d31f..7d98e51 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/BulkActionModalPage.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/BulkActionModalPage.java
@@ -25,15 +25,17 @@ import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.panels.AbstractModalPanel;
import org.apache.syncope.client.console.rest.BaseRestClient;
import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
import org.apache.syncope.common.lib.to.BulkAction;
import org.apache.syncope.common.lib.to.BulkActionResult;
+import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.form.AjaxButton;
-import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
import org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxFallbackDefaultDataTable;
import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
@@ -43,12 +45,13 @@ import org.apache.wicket.model.IModel;
import org.apache.wicket.model.ResourceModel;
import org.springframework.beans.BeanUtils;
-public class BulkActionModalPage<T, S> extends BaseModalPage {
+public class BulkActionModalPage<T, S> extends AbstractModalPanel {
private static final long serialVersionUID = 4114026480146090962L;
public BulkActionModalPage(
- final ModalWindow window,
+ final BaseModal<?> modal,
+ final PageReference pageRef,
final Collection<T> items,
final List<IColumn<T, S>> columns,
final Collection<ActionLink.ActionType> actions,
@@ -56,7 +59,7 @@ public class BulkActionModalPage<T, S> extends BaseModalPage {
final String keyFieldName,
final String pageId) {
- super();
+ super(modal, pageRef);
final SortableDataProvider<T, S> dataProvider = new SortableDataProvider<T, S>() {
@@ -86,7 +89,7 @@ public class BulkActionModalPage<T, S> extends BaseModalPage {
@SuppressWarnings("rawtypes")
final ActionLinksPanel<Serializable> actionPanel
- = ActionLinksPanel.builder(getPageReference()).build("actions");
+ = ActionLinksPanel.builder(pageRef).build("actions");
add(actionPanel);
for (ActionLink.ActionType action : actions) {
@@ -129,12 +132,14 @@ public class BulkActionModalPage<T, S> extends BaseModalPage {
final BulkActionResult res = (BulkActionResult) bulkActionExecutor.getClass().
getMethod("bulkAction", BulkAction.class).invoke(bulkActionExecutor, bulkAction);
- setResponsePage(new BulkActionResultModalPage<>(window, items, columns, res, keyFieldName));
+ modal.setContent(new BulkActionResultModalPage<>(
+ modal, pageRef, items, columns, res, keyFieldName));
+ target.add(modal);
} catch (NoSuchMethodException | SecurityException | IllegalAccessException
| IllegalArgumentException | InvocationTargetException e) {
error(getString(Constants.ERROR)
+ ": Operation " + bulkAction.getType() + " not supported");
- feedbackPanel.refresh(target);
+ modal.getFeedbackPanel().refresh(target);
}
}
@@ -144,13 +149,13 @@ public class BulkActionModalPage<T, S> extends BaseModalPage {
final Form<Void> form = new Form<>(FORM);
add(form);
- final AjaxButton cancel = new ClearIndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL), getPageReference()) {
+ final AjaxButton cancel = new ClearIndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL), pageRef) {
private static final long serialVersionUID = -958724007591692537L;
@Override
protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
- window.close(target);
+ modal.close(target);
}
};
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/java/org/apache/syncope/client/console/pages/BulkActionResultModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/BulkActionResultModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/BulkActionResultModalPage.java
index 98ac15c..00574c4 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/BulkActionResultModalPage.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/BulkActionResultModalPage.java
@@ -22,12 +22,14 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
+import org.apache.syncope.client.console.panels.AbstractModalPanel;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionResultColumn;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.common.lib.to.BulkActionResult;
+import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxLink;
-import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
import org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxFallbackDefaultDataTable;
import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
@@ -40,18 +42,19 @@ import org.apache.wicket.model.IModel;
* @param <T>
* @param <S>
*/
-public class BulkActionResultModalPage<T, S> extends BaseModalPage {
+public class BulkActionResultModalPage<T, S> extends AbstractModalPanel {
private static final long serialVersionUID = 2646115294319713724L;
public BulkActionResultModalPage(
- final ModalWindow window,
+ final BaseModal<?> modal,
+ final PageReference pageRef,
final Collection<T> items,
final List<IColumn<T, S>> columns,
final BulkActionResult results,
final String keyFieldName) {
- super();
+ super(modal, pageRef);
final List<IColumn<T, S>> newColumnList = new ArrayList<>(columns.subList(1, columns.size() - 1));
newColumnList.add(newColumnList.size(), new ActionResultColumn<T, S>(results, keyFieldName));
@@ -88,7 +91,7 @@ public class BulkActionResultModalPage<T, S> extends BaseModalPage {
@Override
public void onClick(final AjaxRequestTarget target) {
- window.close(target);
+ modal.close(target);
}
};
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/java/org/apache/syncope/client/console/pages/DisplayAttributesModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/DisplayAttributesModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/DisplayAttributesModalPage.java
index 769cb45..432c510 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/DisplayAttributesModalPage.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/DisplayAttributesModalPage.java
@@ -22,12 +22,14 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.syncope.client.console.PreferenceManager;
+import org.apache.syncope.client.console.panels.AbstractModalPanel;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.common.lib.search.SearchableFields;
+import org.apache.syncope.common.lib.to.AnyTO;
import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.form.AjaxButton;
import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
-import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.Check;
import org.apache.wicket.markup.html.form.CheckGroup;
@@ -44,9 +46,11 @@ import org.apache.wicket.spring.injection.annot.SpringBean;
/**
* Modal window with Display attributes form.
+ *
+ * @param <T>
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
-public abstract class DisplayAttributesModalPage extends BaseModalPage {
+public abstract class DisplayAttributesModalPage<T extends AnyTO> extends AbstractModalPanel {
private static final long serialVersionUID = -4274117450918385110L;
@@ -64,10 +68,13 @@ public abstract class DisplayAttributesModalPage extends BaseModalPage {
private final List<String> selectedDerSchemas;
- public DisplayAttributesModalPage(final PageReference pageRef, final ModalWindow window,
- final List<String> schemaNames, final List<String> dSchemaNames) {
+ public DisplayAttributesModalPage(
+ final BaseModal<T> modal,
+ final PageReference pageRef,
+ final List<String> schemaNames,
+ final List<String> dSchemaNames) {
- super();
+ super(modal, pageRef);
final IModel<List<String>> fnames = new LoadableDetachableModel<List<String>>() {
@@ -197,13 +204,13 @@ public abstract class DisplayAttributesModalPage extends BaseModalPage {
((BasePage) pageRef.getPage()).setModalResult(true);
- window.close(target);
+ modal.close(target);
}
}
@Override
protected void onError(final AjaxRequestTarget target, final Form<?> form) {
- feedbackPanel.refresh(target);
+ modal.getFeedbackPanel().refresh(target);
}
};
@@ -215,7 +222,7 @@ public abstract class DisplayAttributesModalPage extends BaseModalPage {
@Override
protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
- window.close(target);
+ modal.close(target);
}
};
@@ -230,7 +237,7 @@ public abstract class DisplayAttributesModalPage extends BaseModalPage {
public abstract String getPrefAttributeView();
public abstract String getPrefDerivedAttributeView();
-
+
public abstract Class getTOClass();
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/java/org/apache/syncope/client/console/pages/GroupDisplayAttributesModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/GroupDisplayAttributesModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/GroupDisplayAttributesModalPage.java
index 0e5e10f..9b33379 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/GroupDisplayAttributesModalPage.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/GroupDisplayAttributesModalPage.java
@@ -20,9 +20,9 @@ package org.apache.syncope.client.console.pages;
import java.util.List;
import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.common.lib.to.GroupTO;
import org.apache.wicket.PageReference;
-import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
/**
* Modal window with Display group attributes form.
@@ -34,9 +34,12 @@ public class GroupDisplayAttributesModalPage extends DisplayAttributesModalPage
public static final String[] GROUP_DEFAULT_SELECTION = { "key", "name" };
- public GroupDisplayAttributesModalPage(final PageReference pageRef, final ModalWindow window,
- final List<String> schemaNames, final List<String> dSchemaNames) {
- super(pageRef, window, schemaNames, dSchemaNames);
+ public GroupDisplayAttributesModalPage(
+ final BaseModal<GroupTO> modal,
+ final PageReference pageRef,
+ final List<String> schemaNames,
+ final List<String> dSchemaNames) {
+ super(modal, pageRef, schemaNames, dSchemaNames);
}
@Override
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/java/org/apache/syncope/client/console/pages/ProvisioningModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/ProvisioningModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/ProvisioningModalPage.java
index b631210..95ec54f 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/ProvisioningModalPage.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/ProvisioningModalPage.java
@@ -30,6 +30,7 @@ import org.apache.syncope.client.console.commons.status.ConnObjectWrapper;
import org.apache.syncope.client.console.commons.status.StatusBean;
import org.apache.syncope.client.console.commons.status.StatusUtils;
import org.apache.syncope.client.console.panels.ActionDataTablePanel;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
import org.apache.syncope.client.lib.SyncopeClient;
import org.apache.syncope.common.lib.to.AnyTO;
@@ -41,7 +42,6 @@ import org.apache.syncope.common.lib.wrap.AbstractWrappable;
import org.apache.syncope.common.lib.wrap.AnyKey;
import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
@@ -63,24 +63,18 @@ public class ProvisioningModalPage<T extends AnyTO> extends AbstractStatusModalP
private final AnyTypeKind anyTypeKind;
- private final PageReference pageRef;
-
- private final ModalWindow window;
-
private final StatusUtils statusUtils;
private final String realm = "/";
public ProvisioningModalPage(
+ final BaseModal<?> modal,
final PageReference pageRef,
- final ModalWindow window,
final ResourceTO resourceTO,
final AnyTypeKind anyTypeKind) {
- super();
+ super(modal, pageRef);
- this.pageRef = pageRef;
- this.window = window;
this.resourceTO = resourceTO;
this.anyTypeKind = anyTypeKind;
@@ -141,7 +135,7 @@ public class ProvisioningModalPage<T extends AnyTO> extends AbstractStatusModalP
} catch (Exception e) {
LOG.error("Error unlinkink resources", e);
error(getString(Constants.ERROR) + ": " + e.getMessage());
- feedbackPanel.refresh(target);
+ modal.getFeedbackPanel().refresh(target);
}
}
}, ActionLink.ActionType.UNLINK, pageId);
@@ -157,7 +151,7 @@ public class ProvisioningModalPage<T extends AnyTO> extends AbstractStatusModalP
} catch (Exception e) {
LOG.error("Error de-provisioning user", e);
error(getString(Constants.ERROR) + ": " + e.getMessage());
- feedbackPanel.refresh(target);
+ modal.getFeedbackPanel().refresh(target);
}
}
}, ActionLink.ActionType.DEPROVISION, pageId);
@@ -173,12 +167,12 @@ public class ProvisioningModalPage<T extends AnyTO> extends AbstractStatusModalP
} catch (Exception e) {
LOG.error("Error unassigning resources", e);
error(getString(Constants.ERROR) + ": " + e.getMessage());
- feedbackPanel.refresh(target);
+ modal.getFeedbackPanel().refresh(target);
}
}
}, ActionLink.ActionType.UNASSIGN, pageId);
- table.addCancelButton(window);
+ table.addCancelButton(modal);
add(table);
}
@@ -188,7 +182,7 @@ public class ProvisioningModalPage<T extends AnyTO> extends AbstractStatusModalP
private static final long serialVersionUID = 4287357360778016173L;
public StatusBeanProvider() {
- super("accountLink");
+ super("connObjectLink");
}
@SuppressWarnings("unchecked")
@@ -239,14 +233,15 @@ public class ProvisioningModalPage<T extends AnyTO> extends AbstractStatusModalP
}
if (beans.isEmpty()) {
- window.close(target);
+ modal.close(target);
} else {
final BulkActionResult res = resourceRestClient.bulkAssociationAction(
resourceTO.getKey(), anyTypeKind.name(), type, subjectKeys);
((BasePage) pageRef.getPage()).setModalResult(true);
- setResponsePage(new BulkActionResultModalPage<>(window, beans, columns, res, "anyKey"));
+ target.add(modal.setContent(
+ new BulkActionResultModalPage<>(modal, pageRef, beans, columns, res, "anyKey")));
}
}
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/java/org/apache/syncope/client/console/pages/ResultStatusModal.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/ResultStatusModal.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/ResultStatusModal.java
new file mode 100644
index 0000000..855a61f
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/ResultStatusModal.java
@@ -0,0 +1,428 @@
+/*
+ * 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.pages;
+
+import static org.apache.syncope.client.console.commons.status.Status.ACTIVE;
+import static org.apache.syncope.client.console.commons.status.Status.SUSPENDED;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.commons.ConnIdSpecialAttributeName;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.Mode;
+import org.apache.syncope.client.console.commons.status.Status;
+import org.apache.syncope.client.console.commons.status.StatusUtils;
+import org.apache.syncope.client.console.panels.AbstractModalPanel;
+import org.apache.syncope.client.console.panels.FailureMessageModal;
+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.AttrTO;
+import org.apache.syncope.common.lib.to.ConnObjectTO;
+import org.apache.syncope.common.lib.to.PropagationStatus;
+import org.apache.syncope.common.lib.to.GroupTO;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.syncope.common.lib.types.PropagationTaskExecStatus;
+import org.apache.wicket.Component;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.behavior.Behavior;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxLink;
+import org.apache.wicket.markup.ComponentTag;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.image.Image;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.markup.html.panel.Fragment;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.request.resource.ContextRelativeResource;
+
+/**
+ * Show user or group status after performing a successful operation.
+ *
+ * @param <T>
+ */
+public final class ResultStatusModal<T extends AnyTO> extends AbstractModalPanel {
+
+ private static final long serialVersionUID = 2646115294319713723L;
+
+ private static final String IMG_PREFIX = "/img/statuses/";
+
+ private final AnyTO subject;
+
+ private final Mode mode;
+
+ /**
+ * Status management utilities.
+ */
+ private final StatusUtils statusUtils;
+
+ public static class Builder<T extends AnyTO> implements Serializable {
+
+ private static final long serialVersionUID = 220361441802274899L;
+
+ private Mode mode;
+
+ private AnyTO subject;
+
+ private final BaseModal<T> modal;
+
+ private final PageReference pageRef;
+
+ public Builder(
+ final BaseModal<T> modal,
+ final PageReference pageRef,
+ final AnyTO attributable) {
+ this.subject = attributable;
+ this.modal = modal;
+ this.pageRef = pageRef;
+ }
+
+ public ResultStatusModal.Builder<T> mode(final Mode mode) {
+ this.mode = mode;
+ return this;
+ }
+
+ public ResultStatusModal<T> build() {
+ return new ResultStatusModal<T>(modal, pageRef, this);
+ }
+ }
+
+ private ResultStatusModal(
+ final BaseModal<T> modal,
+ final PageReference pageRef,
+ final Builder<T> builder) {
+ super(modal, pageRef);
+
+ this.subject = builder.subject;
+ statusUtils = new StatusUtils(this.userRestClient);
+ if (builder.mode == null) {
+ this.mode = Mode.ADMIN;
+ } else {
+ this.mode = builder.mode;
+ }
+
+ final WebMarkupContainer container = new WebMarkupContainer("container");
+ container.setOutputMarkupId(true);
+ add(container);
+
+ final Fragment fragment = new Fragment("resultFrag", mode == Mode.SELF
+ ? "userSelfResultFrag"
+ : "propagationResultFrag", this);
+ fragment.setOutputMarkupId(true);
+ container.add(fragment);
+
+ if (mode == Mode.ADMIN) {
+ // add Syncope propagation status
+ PropagationStatus syncope = new PropagationStatus();
+ syncope.setResource("Syncope");
+ syncope.setStatus(PropagationTaskExecStatus.SUCCESS);
+
+ List<PropagationStatus> propagations = new ArrayList<PropagationStatus>();
+ propagations.add(syncope);
+ propagations.addAll(subject.getPropagationStatusTOs());
+
+ fragment.add(new Label("info",
+ ((subject instanceof UserTO) && ((UserTO) subject).getUsername() != null)
+ ? ((UserTO) subject).getUsername()
+ : ((subject instanceof GroupTO) && ((GroupTO) subject).getName() != null)
+ ? ((GroupTO) subject).getName()
+ : String.valueOf(subject.getKey())));
+
+ final ListView<PropagationStatus> propRes = new ListView<PropagationStatus>("resources",
+ propagations) {
+
+ private static final long serialVersionUID = -1020475259727720708L;
+
+ @Override
+ protected void populateItem(final ListItem<PropagationStatus> item) {
+ final PropagationStatus propTO = (PropagationStatus) item.getDefaultModelObject();
+
+ final ListView<String> attributes = getConnObjectView(propTO);
+
+ final Fragment attrhead;
+ if (attributes.getModelObject() == null || attributes.getModelObject().isEmpty()) {
+ attrhead = new Fragment("attrhead", "emptyAttrHeadFrag", this);
+ } else {
+ attrhead = new Fragment("attrhead", "attrHeadFrag", this);
+ }
+
+ item.add(attrhead);
+ item.add(attributes);
+
+ attrhead.add(new Label("resource", propTO.getResource()));
+
+ attrhead.add(new Label("propagation", propTO.getStatus() == null
+ ? "UNDEFINED" : propTO.getStatus().toString()));
+
+ final Image image;
+ final String alt, title;
+
+ final BaseModal<?> failureWindow = new BaseModal<>("failureWindow");
+
+ final AjaxLink<?> failureWindowLink = new AjaxLink<Void>("showFailureWindow") {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ failureWindow.show(target);
+ }
+ };
+
+ switch (propTO.getStatus()) {
+
+ case SUCCESS:
+ case CREATED:
+ image = new Image("icon",
+ new ContextRelativeResource(IMG_PREFIX + Status.ACTIVE.toString()
+ + Constants.PNG_EXT));
+ alt = "success icon";
+ title = "success";
+ failureWindow.setVisible(false);
+ failureWindowLink.setEnabled(false);
+ break;
+
+ default:
+ image = new Image("icon",
+ new ContextRelativeResource(IMG_PREFIX + Status.SUSPENDED.toString()
+ + Constants.PNG_EXT));
+ alt = "failure icon";
+ title = "failure";
+ }
+
+ image.add(new Behavior() {
+
+ private static final long serialVersionUID = 1469628524240283489L;
+
+ @Override
+ public void onComponentTag(final Component component, final ComponentTag tag) {
+ tag.put("alt", alt);
+ tag.put("title", title);
+ }
+ });
+ final FailureMessageModal executionFailureMessagePage;
+ if (propTO.getFailureReason() == null) {
+ executionFailureMessagePage = new FailureMessageModal(
+ modal, pageRef, StringUtils.EMPTY);
+ } else {
+ executionFailureMessagePage = new FailureMessageModal(
+ modal, pageRef, propTO.getFailureReason());
+ }
+
+ failureWindow.setContent(executionFailureMessagePage);
+ }
+ };
+ fragment.add(propRes);
+ }
+
+ final AjaxLink<Void> close = new IndicatingAjaxLink<Void>("close") {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ builder.modal.close(target);
+ }
+ };
+ container.add(close);
+
+ setOutputMarkupId(true);
+ }
+
+ /**
+ * Get remote attributes list view.
+ *
+ * @param propTO propagation TO.
+ * @return list view.
+ */
+ private ListView<String> getConnObjectView(final PropagationStatus propTO) {
+ final ConnObjectTO before = propTO.getBeforeObj();
+ final ConnObjectTO after = propTO.getAfterObj();
+
+ // sorted in reversed presentation order
+ final List<String> head = new ArrayList<String>();
+ if (subject instanceof UserTO) {
+ head.add(ConnIdSpecialAttributeName.PASSWORD);
+ head.add(ConnIdSpecialAttributeName.ENABLE);
+ }
+ head.add(ConnIdSpecialAttributeName.UID);
+ head.add(ConnIdSpecialAttributeName.NAME);
+
+ final Map<String, AttrTO> beforeAttrMap = before == null
+ ? Collections.<String, AttrTO>emptyMap()
+ : before.getPlainAttrMap();
+
+ final Map<String, AttrTO> afterAttrMap = after == null
+ ? Collections.<String, AttrTO>emptyMap()
+ : after.getPlainAttrMap();
+
+ final Set<String> attributes = new HashSet<String>();
+ attributes.addAll(beforeAttrMap.keySet());
+ attributes.addAll(afterAttrMap.keySet());
+
+ if (!(subject instanceof UserTO)) {
+ attributes.remove(ConnIdSpecialAttributeName.PASSWORD);
+ attributes.remove(ConnIdSpecialAttributeName.ENABLE);
+ }
+
+ final List<String> profile = new ArrayList<String>();
+ profile.addAll(attributes);
+ profile.removeAll(head);
+ Collections.sort(profile);
+
+ for (String attr : head) {
+ if (attributes.contains(attr)) {
+ profile.add(0, attr);
+ }
+ }
+
+ return new ListView<String>("attrs", profile) {
+
+ private static final long serialVersionUID = 4949588177564901031L;
+
+ @Override
+ protected void populateItem(final ListItem<String> item) {
+ String name = item.getModelObject();
+
+ final Fragment beforeValue;
+ final Fragment afterValue;
+ if (ConnIdSpecialAttributeName.ENABLE.equals(name)) {
+ beforeValue = getStatusIcon("beforeValue", propTO.getResource(), before);
+ afterValue = getStatusIcon("afterValue", propTO.getResource(), after);
+ } else {
+ beforeValue = getLabelValue("beforeValue", name, beforeAttrMap);
+ afterValue = getLabelValue("afterValue", name, afterAttrMap);
+ }
+
+ item.add(new Label("attrName", new ResourceModel(name, name)));
+
+ item.add(beforeValue);
+ item.add(afterValue);
+ }
+ };
+ }
+
+ /**
+ * Get fragment for attribute value (not remote status).
+ *
+ * @param id component id to be replaced with the fragment content.
+ * @param attrName remote attribute name
+ * @param attrMap remote attributes map.
+ * @return fragment.
+ */
+ private Fragment getLabelValue(final String id, final String attrName, final Map<String, AttrTO> attrMap) {
+ final String value;
+
+ final AttrTO attr = attrMap.get(attrName);
+
+ if (attr == null || attr.getValues() == null || attr.getValues().isEmpty()) {
+ value = "";
+ } else {
+ if (ConnIdSpecialAttributeName.PASSWORD.equals(attrName)) {
+ value = "********";
+ } else {
+ value = attr.getValues().size() > 1
+ ? attr.getValues().toString()
+ : attr.getValues().get(0);
+ }
+ }
+
+ Component label = new Label("value", value.length() > 50 ? value.substring(0, 50) + "..." : value).
+ add(new Behavior() {
+
+ private static final long serialVersionUID = 1469628524240283489L;
+
+ @Override
+ public void onComponentTag(final Component component, final ComponentTag tag) {
+ tag.put("title", value);
+ }
+ });
+
+ final Fragment frag = new Fragment(id, "attrValueFrag", this);
+ frag.add(label);
+
+ return frag;
+ }
+
+ /**
+ * Get fragment for user status icon.
+ *
+ * @param id component id to be replaced with the fragment content
+ * @param resourceName resource name
+ * @param objectTO connector object TO
+ * @return fragment.
+ */
+ private Fragment getStatusIcon(final String id, final String resourceName, final ConnObjectTO objectTO) {
+ final Image image;
+ final String alt, title;
+ switch (statusUtils.getStatusBean(
+ subject, resourceName, objectTO, this.subject instanceof GroupTO).getStatus()) {
+
+ case ACTIVE:
+ image = new Image("status",
+ new ContextRelativeResource(IMG_PREFIX + Status.ACTIVE.toString() + Constants.PNG_EXT));
+ alt = "active icon";
+ title = "Enabled";
+ break;
+
+ case SUSPENDED:
+ image = new Image("status",
+ new ContextRelativeResource(IMG_PREFIX + Status.SUSPENDED.toString() + Constants.PNG_EXT));
+ alt = "inactive icon";
+ title = "Disabled";
+ break;
+
+ default:
+ image = null;
+ alt = null;
+ title = null;
+ }
+
+ final Fragment frag;
+ if (image == null) {
+ frag = new Fragment(id, "emptyFrag", this);
+ } else {
+ image.add(new Behavior() {
+
+ private static final long serialVersionUID = 1469628524240283489L;
+
+ @Override
+ public void onComponentTag(final Component component, final ComponentTag tag) {
+ tag.put("alt", alt);
+ tag.put("title", title);
+ tag.put("width", "12px");
+ tag.put("height", "12px");
+ }
+ });
+
+ frag = new Fragment(id, "remoteStatusFrag", this);
+ frag.add(image);
+ }
+
+ return frag;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/java/org/apache/syncope/client/console/pages/StatusModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/StatusModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/StatusModalPage.java
index 1357cad..f70c1c5 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/StatusModalPage.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/StatusModalPage.java
@@ -32,6 +32,7 @@ import org.apache.syncope.client.console.commons.status.StatusBean;
import org.apache.syncope.client.console.commons.status.StatusUtils;
import org.apache.syncope.client.console.panels.ActionDataTablePanel;
import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPanel;
import org.apache.syncope.common.lib.to.AnyTO;
@@ -43,7 +44,6 @@ import org.apache.syncope.common.lib.types.ResourceAssociationAction;
import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
-import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
@@ -89,32 +89,26 @@ public class StatusModalPage<T extends AnyTO> extends AbstractStatusModalPage {
private final PasswordTextField confirm;
// --------------------------------
- private final PageReference pageRef;
-
- private final ModalWindow window;
-
private final ActionDataTablePanel<StatusBean, String> table;
private final List<IColumn<StatusBean, String>> columns;
public StatusModalPage(
+ final BaseModal<T> modal,
final PageReference pageRef,
- final ModalWindow window,
final AnyTO attributableTO) {
- this(pageRef, window, attributableTO, false);
+ this(modal, pageRef, attributableTO, false);
}
public StatusModalPage(
+ final BaseModal<T> modal,
final PageReference pageRef,
- final ModalWindow window,
final AnyTO anyTO,
final boolean statusOnly) {
- super();
+ super(modal, pageRef);
- this.pageRef = pageRef;
- this.window = window;
this.statusOnly = statusOnly;
this.anyTO = anyTO;
@@ -152,7 +146,7 @@ public class StatusModalPage<T extends AnyTO> extends AbstractStatusModalPage {
});
columns.add(new PropertyColumn<StatusBean, String>(
- new StringResourceModel("accountLink", this, null), "accountLink", "accountLink"));
+ new StringResourceModel("connObjectLink", this, null), "connObjectLink", "connObjectLink"));
columns.add(new AbstractColumn<StatusBean, String>(
new StringResourceModel("status", this, null)) {
@@ -236,14 +230,14 @@ public class StatusModalPage<T extends AnyTO> extends AbstractStatusModalPage {
@Override
protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
// ignore
- window.close(target);
+ modal.close(target);
}
}.feedbackPanelAutomaticReload(false);
pwdMgtForm.add(cancel);
- final ClearIndicatingAjaxButton goon =
- new ClearIndicatingAjaxButton("continue", new ResourceModel("continue"), pageRef) {
+ final ClearIndicatingAjaxButton goon = new ClearIndicatingAjaxButton("continue", new ResourceModel("continue"),
+ pageRef) {
private static final long serialVersionUID = -2341391430136818027L;
@@ -270,11 +264,11 @@ public class StatusModalPage<T extends AnyTO> extends AbstractStatusModalPage {
((BasePage) pageRef.getPage()).setModalResult(true);
- window.close(target);
+ modal.close(target);
} catch (Exception e) {
LOG.error("Error enabling resources", e);
error(getString(Constants.ERROR) + ": " + e.getMessage());
- feedbackPanel.refresh(target);
+ modal.getFeedbackPanel().refresh(target);
}
}
}, ActionLink.ActionType.REACTIVATE, pageId);
@@ -295,11 +289,11 @@ public class StatusModalPage<T extends AnyTO> extends AbstractStatusModalPage {
((BasePage) pageRef.getPage()).setModalResult(true);
}
- window.close(target);
+ modal.close(target);
} catch (Exception e) {
LOG.error("Error disabling resources", e);
error(getString(Constants.ERROR) + ": " + e.getMessage());
- feedbackPanel.refresh(target);
+ modal.getFeedbackPanel().refresh(target);
}
}
}, ActionLink.ActionType.SUSPEND, pageId);
@@ -324,11 +318,11 @@ public class StatusModalPage<T extends AnyTO> extends AbstractStatusModalPage {
}
((BasePage) pageRef.getPage()).setModalResult(true);
- window.close(target);
+ modal.close(target);
} catch (Exception e) {
LOG.error("Error unlinking resources", e);
error(getString(Constants.ERROR) + ": " + e.getMessage());
- feedbackPanel.refresh(target);
+ modal.getFeedbackPanel().refresh(target);
}
}
}, ActionLink.ActionType.UNLINK, pageId);
@@ -353,11 +347,11 @@ public class StatusModalPage<T extends AnyTO> extends AbstractStatusModalPage {
}
((BasePage) pageRef.getPage()).setModalResult(true);
- window.close(target);
+ modal.close(target);
} catch (Exception e) {
LOG.error("Error linking resources", e);
error(getString(Constants.ERROR) + ": " + e.getMessage());
- feedbackPanel.refresh(target);
+ modal.getFeedbackPanel().refresh(target);
}
}
}, ActionLink.ActionType.LINK, pageId);
@@ -383,11 +377,11 @@ public class StatusModalPage<T extends AnyTO> extends AbstractStatusModalPage {
}
((BasePage) pageRef.getPage()).setModalResult(true);
- loadBulkActionResultPage(table.getModelObject(), bulkActionResult);
+ loadBulkActionResultPage(target, table.getModelObject(), bulkActionResult);
} catch (Exception e) {
LOG.error("Error de-provisioning user", e);
error(getString(Constants.ERROR) + ": " + e.getMessage());
- feedbackPanel.refresh(target);
+ modal.getFeedbackPanel().refresh(target);
}
}
}, ActionLink.ActionType.DEPROVISION, pageId);
@@ -410,11 +404,11 @@ public class StatusModalPage<T extends AnyTO> extends AbstractStatusModalPage {
new ArrayList<>(table.getModelObject()));
((BasePage) pageRef.getPage()).setModalResult(true);
- loadBulkActionResultPage(table.getModelObject(), bulkActionResult);
+ loadBulkActionResultPage(target, table.getModelObject(), bulkActionResult);
} catch (Exception e) {
LOG.error("Error provisioning user", e);
error(getString(Constants.ERROR) + ": " + e.getMessage());
- feedbackPanel.refresh(target);
+ modal.getFeedbackPanel().refresh(target);
}
}
}
@@ -441,11 +435,11 @@ public class StatusModalPage<T extends AnyTO> extends AbstractStatusModalPage {
}
((BasePage) pageRef.getPage()).setModalResult(true);
- loadBulkActionResultPage(table.getModelObject(), bulkActionResult);
+ loadBulkActionResultPage(target, table.getModelObject(), bulkActionResult);
} catch (Exception e) {
LOG.error("Error unassigning resources", e);
error(getString(Constants.ERROR) + ": " + e.getMessage());
- feedbackPanel.refresh(target);
+ modal.getFeedbackPanel().refresh(target);
}
}
}, ActionLink.ActionType.UNASSIGN, pageId);
@@ -467,18 +461,18 @@ public class StatusModalPage<T extends AnyTO> extends AbstractStatusModalPage {
new ArrayList<>(table.getModelObject()));
((BasePage) pageRef.getPage()).setModalResult(true);
- loadBulkActionResultPage(table.getModelObject(), bulkActionResult);
+ loadBulkActionResultPage(target, table.getModelObject(), bulkActionResult);
} catch (Exception e) {
LOG.error("Error assigning resources", e);
error(getString(Constants.ERROR) + ": " + e.getMessage());
- feedbackPanel.refresh(target);
+ modal.getFeedbackPanel().refresh(target);
}
}
}
}.feedbackPanelAutomaticReload(!(anyTO instanceof UserTO)), ActionLink.ActionType.ASSIGN, pageId);
}
- table.addCancelButton(window);
+ table.addCancelButton(modal);
add(table);
}
@@ -487,7 +481,7 @@ public class StatusModalPage<T extends AnyTO> extends AbstractStatusModalPage {
private static final long serialVersionUID = 4586969457669796621L;
public AttributableStatusProvider() {
- super(statusOnly ? "resourceName" : "accountLink");
+ super(statusOnly ? "resourceName" : "connObjectLink");
}
@SuppressWarnings("unchecked")
@@ -549,8 +543,8 @@ public class StatusModalPage<T extends AnyTO> extends AbstractStatusModalPage {
final ResourceAssociationAction type,
final Collection<StatusBean> selection) {
- final ClearIndicatingAjaxButton goon =
- new ClearIndicatingAjaxButton("continue", new ResourceModel("continue", "Continue"), pageRef) {
+ final ClearIndicatingAjaxButton goon = new ClearIndicatingAjaxButton("continue", new ResourceModel("continue",
+ "Continue"), pageRef) {
private static final long serialVersionUID = -2341391430136818027L;
@@ -588,16 +582,16 @@ public class StatusModalPage<T extends AnyTO> extends AbstractStatusModalPage {
((BasePage) pageRef.getPage()).setModalResult(true);
if (bulkActionResult != null) {
- loadBulkActionResultPage(selection, bulkActionResult);
+ loadBulkActionResultPage(target, selection, bulkActionResult);
} else {
target.add(((BasePage) pageRef.getPage()).getFeedbackPanel());
- window.close(target);
+ modal.close(target);
}
} catch (Exception e) {
LOG.error("Error provisioning resources", e);
error(getString(Constants.ERROR) + ": " + e.getMessage());
- feedbackPanel.refresh(target);
+ modal.getFeedbackPanel().refresh(target);
}
}
}.feedbackPanelAutomaticReload(false);
@@ -612,14 +606,16 @@ public class StatusModalPage<T extends AnyTO> extends AbstractStatusModalPage {
}
private void loadBulkActionResultPage(
- final Collection<StatusBean> selection, final BulkActionResult bulkActionResult) {
+ final AjaxRequestTarget target,
+ final Collection<StatusBean> selection,
+ final BulkActionResult bulkActionResult) {
final List<String> resources = new ArrayList<String>(selection.size());
for (StatusBean statusBean : selection) {
resources.add(statusBean.getResourceName());
}
- final List<ConnObjectWrapper> connObjects =
- statusUtils.getConnectorObjects(Collections.singletonList(anyTO), resources);
+ final List<ConnObjectWrapper> connObjects = statusUtils.getConnectorObjects(Collections.singletonList(anyTO),
+ resources);
final List<StatusBean> statusBeans = new ArrayList<StatusBean>(connObjects.size());
@@ -632,11 +628,12 @@ public class StatusModalPage<T extends AnyTO> extends AbstractStatusModalPage {
statusBeans.add(statusBean);
}
- setResponsePage(new BulkActionResultModalPage<StatusBean, String>(
- window,
+ target.add(modal.setContent(new BulkActionResultModalPage<StatusBean, String>(
+ modal,
+ pageRef,
statusBeans,
columns,
bulkActionResult,
- "resourceName"));
+ "resourceName")));
}
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/java/org/apache/syncope/client/console/pages/UserDisplayAttributesModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/UserDisplayAttributesModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/UserDisplayAttributesModalPage.java
index 0eeaa42..2ce0a30 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/UserDisplayAttributesModalPage.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/UserDisplayAttributesModalPage.java
@@ -20,9 +20,9 @@ package org.apache.syncope.client.console.pages;
import java.util.List;
import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.common.lib.to.UserTO;
import org.apache.wicket.PageReference;
-import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
/**
* Modal window with Display user attributes form.
@@ -33,10 +33,13 @@ public class UserDisplayAttributesModalPage extends DisplayAttributesModalPage {
private static final long serialVersionUID = 5194630813773543054L;
public static final String[] USER_DEFAULT_SELECTION = { "key", "username", "status" };
-
- public UserDisplayAttributesModalPage(final PageReference pageRef, final ModalWindow window,
- final List<String> schemaNames, final List<String> dSchemaNames) {
- super(pageRef, window, schemaNames, dSchemaNames);
+
+ public UserDisplayAttributesModalPage(
+ final BaseModal<UserTO> modal,
+ final PageReference pageRef,
+ final List<String> schemaNames,
+ final List<String> dSchemaNames) {
+ super(modal, pageRef, schemaNames, dSchemaNames);
}
@Override
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.java
index 5bda1fd..c55d6bd 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.java
@@ -25,6 +25,7 @@ import org.apache.syncope.client.console.commons.AnyDataProvider;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.pages.AbstractBasePage;
import org.apache.syncope.client.console.rest.AbstractAnyRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
import org.apache.syncope.common.lib.to.AnyTO;
import org.apache.wicket.PageReference;
@@ -44,7 +45,7 @@ import org.apache.wicket.spring.injection.annot.SpringBean;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public abstract class AbstractSearchResultPanel extends Panel implements IEventSource {
+public abstract class AbstractSearchResultPanel<T extends AnyTO> extends Panel implements IEventSource {
private static final long serialVersionUID = -9170191461250434024L;
@@ -54,36 +55,6 @@ public abstract class AbstractSearchResultPanel extends Panel implements IEventS
protected static final Logger LOG = LoggerFactory.getLogger(AbstractSearchResultPanel.class);
/**
- * Edit modal window height.
- */
- private static final int EDIT_MODAL_WIN_HEIGHT = 550;
-
- /**
- * Edit modal window width.
- */
- private static final int EDIT_MODAL_WIN_WIDTH = 800;
-
- /**
- * Schemas to be shown modal window height.
- */
- private static final int DISPLAYATTRS_MODAL_WIN_HEIGHT = 550;
-
- /**
- * Schemas to be shown modal window width.
- */
- private static final int DISPLAYATTRS_MODAL_WIN_WIDTH = 550;
-
- /**
- * Schemas to be shown modal window height.
- */
- private static final int STATUS_MODAL_WIN_HEIGHT = 500;
-
- /**
- * Schemas to be shown modal window width.
- */
- private static final int STATUS_MODAL_WIN_WIDTH = 700;
-
- /**
* Application preferences.
*/
@SpringBean
@@ -128,19 +99,10 @@ public abstract class AbstractSearchResultPanel extends Panel implements IEventS
private AnyDataProvider dataProvider;
/**
- * Modal window to be used for user profile editing. Global visibility is required ...
- */
- protected final ModalWindow editmodal = new ModalWindow("editModal");
-
- /**
- * Modal window to be used for attributes choosing to display in tables.
- */
- protected final ModalWindow displaymodal = new ModalWindow("displayModal");
-
- /**
- * Modal window to be used for user status management.
+ * Modal window to be used for: user profile editing (Global visibility is required); attributes choosing to
+ * display in tables; user status management.
*/
- protected final ModalWindow statusmodal = new ModalWindow("statusModal");
+ protected final BaseModal<T> modal = new BaseModal<>("modal");
/**
* Owner page.
@@ -163,6 +125,8 @@ public abstract class AbstractSearchResultPanel extends Panel implements IEventS
super(id);
+ add(modal);
+
setOutputMarkupId(true);
this.page = (AbstractBasePage) pageRef.getPage();
@@ -173,24 +137,6 @@ public abstract class AbstractSearchResultPanel extends Panel implements IEventS
this.restClient = restClient;
- editmodal.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
- editmodal.setInitialHeight(EDIT_MODAL_WIN_HEIGHT);
- editmodal.setInitialWidth(EDIT_MODAL_WIN_WIDTH);
- editmodal.setCookieName("edit-modal");
- add(editmodal);
-
- displaymodal.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
- displaymodal.setInitialHeight(DISPLAYATTRS_MODAL_WIN_HEIGHT);
- displaymodal.setInitialWidth(DISPLAYATTRS_MODAL_WIN_WIDTH);
- displaymodal.setCookieName("display-modal");
- add(displaymodal);
-
- statusmodal.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
- statusmodal.setInitialHeight(STATUS_MODAL_WIN_HEIGHT);
- statusmodal.setInitialWidth(STATUS_MODAL_WIN_WIDTH);
- statusmodal.setCookieName("status-modal");
- add(statusmodal);
-
// Container for user search result
container = new WebMarkupContainer("container");
container.setOutputMarkupId(true);
@@ -236,9 +182,7 @@ public abstract class AbstractSearchResultPanel extends Panel implements IEventS
paginatorForm.add(rowsChooser);
// ---------------------------
- setWindowClosedReloadCallback(statusmodal);
- setWindowClosedReloadCallback(editmodal);
- setWindowClosedReloadCallback(displaymodal);
+ setWindowClosedReloadCallback(modal);
}
public void search(final String fiql, final AjaxRequestTarget target) {
@@ -297,13 +241,15 @@ public abstract class AbstractSearchResultPanel extends Panel implements IEventS
}
}
- private void setWindowClosedReloadCallback(final ModalWindow window) {
- window.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
+ private void setWindowClosedReloadCallback(final BaseModal<?> modal) {
+ modal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
private static final long serialVersionUID = 8804221891699487139L;
@Override
public void onClose(final AjaxRequestTarget target) {
+ modal.show(false);
+
final EventDataWrapper data = new EventDataWrapper();
data.setTarget(target);
data.setRows(rows);
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/java/org/apache/syncope/client/console/panels/ActionDataTablePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ActionDataTablePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ActionDataTablePanel.java
index 289cf26..73748c0 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ActionDataTablePanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ActionDataTablePanel.java
@@ -25,6 +25,7 @@ import org.apache.syncope.client.console.commons.ActionTableCheckGroup;
import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.AjaxFallbackDataTable;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.CheckGroupColumn;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
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;
@@ -33,7 +34,6 @@ import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.form.AjaxFormChoiceComponentUpdatingBehavior;
import org.apache.wicket.ajax.markup.html.form.AjaxButton;
-import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
import org.apache.wicket.extensions.markup.html.repeater.data.table.ISortableDataProvider;
import org.apache.wicket.markup.html.WebMarkupContainer;
@@ -121,7 +121,7 @@ public class ActionDataTablePanel<T, S> extends DataTablePanel<T, S> {
actionPanel.add(action, type, pageId, enabled);
}
- public void addCancelButton(final ModalWindow window) {
+ public void addCancelButton(final BaseModal<?> modal) {
final AjaxButton cancel = new ClearIndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL), pageRef) {
@@ -129,7 +129,7 @@ public class ActionDataTablePanel<T, S> extends DataTablePanel<T, S> {
@Override
protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
- window.close(target);
+ modal.close(target);
}
}.feedbackPanelAutomaticReload(false);
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/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 b98ba71..5041c6e 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
@@ -25,12 +25,12 @@ import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
import org.apache.syncope.client.console.panels.AbstractSearchResultPanel.EventDataWrapper;
import org.apache.syncope.client.console.pages.AbstractBasePage;
import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.pages.BulkActionModalPage;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.CheckGroupColumn;
import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton;
-import org.apache.syncope.client.console.pages.BulkActionModalPage;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.AjaxFallbackDataTable;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.wicket.AttributeModifier;
-import org.apache.wicket.Page;
import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.form.AjaxFormChoiceComponentUpdatingBehavior;
@@ -61,11 +61,7 @@ public class AjaxDataTablePanel<T, S> extends DataTablePanel<T, S> {
super(id);
- final ModalWindow bulkModalWin = new ModalWindow("bulkModal");
- bulkModalWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
- bulkModalWin.setInitialHeight(600);
- bulkModalWin.setInitialWidth(900);
- bulkModalWin.setCookieName("bulk-modal");
+ final BaseModal<?> bulkModalWin = new BaseModal("bulkModal");
add(bulkModalWin);
bulkModalWin.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
@@ -114,7 +110,7 @@ public class AjaxDataTablePanel<T, S> extends DataTablePanel<T, S> {
columns.add(0, new CheckGroupColumn<T, S>(group));
dataTable = new AjaxFallbackDataTable<>("dataTable", columns, dataProvider, rowsPerPage, container);
dataTable.add(new AttributeModifier("class", "table table-bordered table-hover dataTable"));
-
+
group.add(dataTable);
fragment.add(new ClearIndicatingAjaxButton("bulkActionLink", bulkActionForm, pageRef) {
@@ -123,22 +119,15 @@ public class AjaxDataTablePanel<T, S> extends DataTablePanel<T, S> {
@Override
protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
- bulkModalWin.setPageCreator(new ModalWindow.PageCreator() {
-
- private static final long serialVersionUID = -7834632442532690941L;
-
- @Override
- public Page createPage() {
- return new BulkActionModalPage<>(
- bulkModalWin,
- group.getModelObject(),
- columns,
- actions,
- bulkActionExecutor,
- itemKeyField,
- pageId);
- }
- });
+ bulkModalWin.setContent(new BulkActionModalPage<>(
+ bulkModalWin,
+ pageRef,
+ group.getModelObject(),
+ columns,
+ actions,
+ bulkActionExecutor,
+ itemKeyField,
+ pageId));
bulkModalWin.show(target);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/1e15b05e/client/console/src/main/java/org/apache/syncope/client/console/panels/AnySearchResultPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnySearchResultPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnySearchResultPanel.java
index e9b137d..0940698 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnySearchResultPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnySearchResultPanel.java
@@ -20,12 +20,14 @@ package org.apache.syncope.client.console.panels;
import java.io.Serializable;
import java.lang.reflect.Field;
+import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.pages.AnyDisplayAttributesModalPage;
+import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.rest.AbstractAnyRestClient;
import org.apache.syncope.client.console.rest.AnyObjectRestClient;
import org.apache.syncope.client.console.rest.SchemaRestClient;
@@ -38,26 +40,22 @@ import org.apache.syncope.common.lib.to.AnyTO;
import org.apache.syncope.common.lib.to.AnyTypeClassTO;
import org.apache.syncope.common.lib.to.AnyObjectTO;
import org.apache.syncope.common.lib.types.SchemaType;
-import org.apache.wicket.Page;
import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
import org.apache.wicket.markup.html.basic.Label;
+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.spring.injection.annot.SpringBean;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.springframework.util.ReflectionUtils;
-public class AnySearchResultPanel extends AbstractSearchResultPanel {
+public class AnySearchResultPanel<T extends AnyTO> extends AbstractSearchResultPanel<T> {
private static final long serialVersionUID = -1100228004207271270L;
- protected static final Logger LOG = LoggerFactory.getLogger(AnySearchResultPanel.class);
-
@SpringBean
protected SchemaRestClient schemaRestClient;
@@ -66,7 +64,7 @@ public class AnySearchResultPanel extends AbstractSearchResultPanel {
protected final List<String> dSchemaNames;
protected final String pageID = "Any";
-
+
private final String entitlement = "USER_LIST";
public AnySearchResultPanel(final String type, final String parentId, final boolean filtered,
@@ -91,8 +89,7 @@ public class AnySearchResultPanel extends AbstractSearchResultPanel {
@Override
protected List<IColumn<AnyTO, String>> getColumns() {
- final List<IColumn<AnyTO, String>> columns =
- new ArrayList<IColumn<AnyTO, String>>();
+ final List<IColumn<AnyTO, String>> columns = new ArrayList<IColumn<AnyTO, String>>();
for (String name : prefMan.getList(getRequest(), Constants.PREF_ANY_DETAILS_VIEW)) {
final Field field = ReflectionUtils.findField(AnyObjectTO.class, name);
@@ -133,7 +130,7 @@ public class AnySearchResultPanel extends AbstractSearchResultPanel {
private static final long serialVersionUID = -3503023501954863131L;
@Override
- public ActionLinksPanel getActions(final String componentId, final IModel<AnyTO> model) {
+ public ActionLinksPanel<AnyTO> getActions(final String componentId, final IModel<AnyTO> model) {
final ActionLinksPanel.Builder<AnyTO> panel = ActionLinksPanel.builder(page.getPageReference());
@@ -143,19 +140,16 @@ public class AnySearchResultPanel extends AbstractSearchResultPanel {
@Override
public void onClick(final AjaxRequestTarget target, final AnyTO anyTO) {
- editmodal.setPageCreator(new ModalWindow.PageCreator() {
+ final T modelObject = ((AnyObjectRestClient) restClient).<T>read(anyTO.getKey());
- private static final long serialVersionUID = -7834632442532690940L;
+ final IModel<T> model = new CompoundPropertyModel<>(modelObject);
+ modal.setFormModel(model);
- @Override
- public Page createPage() {
- // SYNCOPE-294: re-read anyTO before edit
- AnyObjectTO anyTO = ((AnyObjectRestClient) restClient).read(model.getObject().getKey());
- return null;
- }
- });
+ // still missing content
+ target.add(modal);
- editmodal.show(target);
+ modal.header(new Model<String>(MessageFormat.format(getString("any.edit"), anyTO.getKey())));
+ modal.show(true);
}
}, ActionLink.ActionType.EDIT, entitlement).add(new ActionLink<AnyTO>() {
@@ -164,34 +158,22 @@ public class AnySearchResultPanel extends AbstractSearchResultPanel {
@Override
public void onClick(final AjaxRequestTarget target, final AnyTO anyTO) {
try {
- AnyTO deleteAnyTO =
- restClient.delete(model.getObject().getETagValue(), model.getObject().getKey());
-
- page.setModalResult(true);
-
- editmodal.setPageCreator(new ModalWindow.PageCreator() {
-
- private static final long serialVersionUID = -7834632442532690940L;
-
- @Override
- public Page createPage() {
- return null;
- }
- });
-
- editmodal.show(target);
- } catch (SyncopeClientException scce) {
- error(getString(Constants.OPERATION_ERROR) + ": " + scce.getMessage());
- feedbackPanel.refresh(target);
+ restClient.delete(model.getObject().getETagValue(), model.getObject().getKey());
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ target.add(container);
+ } catch (SyncopeClientException e) {
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ LOG.error("While deleting object {}", anyTO.getKey(), e);
}
+ ((BasePage) getPage()).getFeedbackPanel().refresh(target);
}
}, ActionLink.ActionType.DELETE, entitlement);
- return panel.build(componentId);
+ return panel.build(componentId, model.getObject());
}
@Override
- public ActionLinksPanel getHeader(final String componentId) {
+ public ActionLinksPanel<Serializable> getHeader(final String componentId) {
final ActionLinksPanel.Builder<Serializable> panel = ActionLinksPanel.builder(page.getPageReference());
panel.add(new ActionLink<Serializable>() {
@@ -200,18 +182,12 @@ public class AnySearchResultPanel extends AbstractSearchResultPanel {
@Override
public void onClick(final AjaxRequestTarget target, final Serializable ignore) {
- displaymodal.setPageCreator(new ModalWindow.PageCreator() {
-
- private static final long serialVersionUID = -7834632442532690940L;
-
- @Override
- public Page createPage() {
- return new AnyDisplayAttributesModalPage(
- page.getPageReference(), displaymodal, schemaNames, dSchemaNames);
- }
- });
+ // still missing content
+ target.add(modal.setContent(new AnyDisplayAttributesModalPage<T>(
+ modal, page.getPageReference(), schemaNames, dSchemaNames)));
- displaymodal.show(target);
+ modal.header(new ResourceModel("any.attr.display", ""));
+ modal.show(true);
}
}, ActionLink.ActionType.CHANGE_VIEW, entitlement).add(new ActionLink<Serializable>() {
[24/28] syncope git commit: provides wizard to create users,
groups and any objects + several changes merged from master
Posted by fm...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/resources/org/apache/syncope/client/console/panels/GroupModalPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/GroupModalPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/GroupModalPanel.html
deleted file mode 100644
index bbcd878..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/GroupModalPanel.html
+++ /dev/null
@@ -1,52 +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.
--->
-<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
- <wicket:extend>
- <div style="margin: 5px;">
- <p class="ui-widget ui-corner-all ui-widget-header">
- <wicket:message key="title"/> <span wicket:id="displayName"/>
- </p>
- <form wicket:id="groupForm">
- <div id="tabs">
- <div style="display: block; clear: both">
- <ul>
- <li><a href="#details"><span><wicket:message key="details"/></span></a></li>
- <li><a href="#templates"><span><wicket:message key="templates"/></span></a></li>
- <li><a href="#plainAttrs"><span><wicket:message key="plainAttrs"/></span></a></li>
- <li><a href="#derAttrs"><span><wicket:message key="derAttrs"/></span></a></li>
- <li><a href="#virAttrs"><span><wicket:message key="virAttrs"/></span></a></li>
- <li><a href="#resources"><span><wicket:message key="resources"/></span></a></li>
- <li><a href="#entitlements"><span><wicket:message key="entitlements"/></span></a></li>
- <li><a href="#security"><span><wicket:message key="security"/></span></a></li>
- </ul>
- </div>
- <div wicket:id="groupPanel"></div>
- </div>
- <div style="bottom:0;margin:10px">
- <input type="submit"
- class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
- wicket:id="submit"/>
- <input type="button"
- class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
- wicket:id="cancel"/>
- </div>
- </form>
- </div>
- </wicket:extend>
-</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/resources/org/apache/syncope/client/console/panels/GroupModalPanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/GroupModalPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/GroupModalPanel.properties
deleted file mode 100644
index 4ffa2fb..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/GroupModalPanel.properties
+++ /dev/null
@@ -1,48 +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.
-required_alert=All form fields are required.
-title=Group
-details=Details
-plainAttrs=Plain attributes
-tab3=Derived attributes
-tab4=Virtual attributes
-resources=Resources
-entitlements=Entitlements
-security=Security
-add=+
-drop=-
-error=Generic error occurred during the operation
-firstResourcesList=Group's resources
-secondResourcesList=Available resources
-firstEntitlementsList=Group's entitlements
-secondEntitlementsList=Available entitlements
-derAttrs=Derived Attributes
-derAttrToRemove=Delete
-derAttrName=Name
-derAttrValue=Derived value
-
-virAttrs=Virtual Attributes
-virAttrToRemove=Delete
-virAttrName=Name
-virAttrValue=Virtual value
-
-addAttributeBtn=Add
-
-inheritPlainAttrs=Inherit plain attributes
-inheritDerAttrs=Inherit derived attributes
-inheritVirAttrs=Inherit virtual attributes
-templates=Templates
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/resources/org/apache/syncope/client/console/panels/GroupModalPanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/GroupModalPanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/GroupModalPanel_it.properties
deleted file mode 100644
index 1c6efec..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/GroupModalPanel_it.properties
+++ /dev/null
@@ -1,50 +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.
-required_alert=All form fields are required.
-title=Gruppo
-details=Dettagli
-plainAttrs=Attributi normali
-tab3=Attributi derivati
-tab4=Attributi virtuali
-resources=Risorse
-entitlements=Entitlement
-security=Sicurezza
-add=+
-drop=-
-error=Errore generico durante l'operazione
-firstResourcesList=Risorse ruolo
-secondResourcesList=Risorse disponibili
-firstResourcesList=Risorse gruppo
-secondResourcesList=Risorse disponibili
-derAttrs=Attributi derivati
-derAttrToRemove=Elimina
-derAttrName=Nome
-derAttrValue=Valore derivato
-
-virAttrs=Attributi virtuali
-virAttrToRemove=Elimina
-virAttrName=Nome
-virAttrValue=Valore virtuale
-
-addAttributeBtn=Aggiungi
-
-inheritPlainAttrs=Eredita attributi normali
-inheritDerAttrs=Eredita attributi derivati
-inheritVirAttrs=Eredita attributi virtuali
-templates=Modelo
-secondEntitlementsList=Entitlement disponibili
-firstEntitlementsList=Entitlement gruppo
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/resources/org/apache/syncope/client/console/panels/GroupModalPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/GroupModalPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/GroupModalPanel_pt_BR.properties
deleted file mode 100644
index 0649585..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/GroupModalPanel_pt_BR.properties
+++ /dev/null
@@ -1,48 +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.
-required_alert=Todos os campos s\u00e3o obrigat\u00f3rios
-title=Grupo
-details=Detalhes
-plainAttrs=Atributos Normal
-tab3=Atributos Derivados
-tab4=Atributos Virtuais
-resources=Recursos
-entitlements=Direitos
-security=Seguran\u00e7a
-add=+
-drop=-
-error=Um erro gen\u00e9rico ocorreu durante a opera\u00e7\u00e3o
-firstResourcesList=Recursos de grupos
-secondResourcesList=Recursos dispon\u00edveis
-firstEntitlementsList=Direitos de grupos
-secondEntitlementsList=Direitos dispon\u00edveis
-derAttrs=Atributos derivados
-derAttrToRemove=Exluir
-derAttrName=Nome
-derAttrValue=Valor Derivado
-
-virAttrs=Atributos Virtuais
-virAttrToRemove=Excluir
-virAttrName=Nome
-virAttrValue=Valor Virtual
-
-addAttributeBtn=Adicionar
-
-inheritPlainAttrs=Atributos Herdados Normal
-inheritDerAttrs=Atributos Derivados Herdados
-inheritVirAttrs=Atributos Virtuais Herdados
-templates=Modelli
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/resources/org/apache/syncope/client/console/panels/ListViewPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ListViewPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ListViewPanel.html
index 8cad9d0..4f24eb4 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ListViewPanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ListViewPanel.html
@@ -17,16 +17,11 @@ specific language governing permissions and limitations
under the License.
-->
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
- <wicket:panel>
- <span wicket:id="container">
- <wicket:container wicket:id="content" />
- </span>
-
- <wicket:fragment wicket:id="wizard">
- <span wicket:id="wizard"/>
- </wicket:fragment>
-
- <wicket:fragment wicket:id="table">
+ <head>
+ <title>List view panel</title>
+ </head>
+ <body>
+ <wicket:extend>
<div class="col-xs-12">
<div class="box">
<div class="box-header">
@@ -53,9 +48,6 @@ under the License.
</div><!-- /.box-body -->
</div><!-- /.box -->
</div>
- <div class="modal-footer" style="text-align: right">
- <input type="submit" class="btn btn-primary" value="Add" wicket:message="value:listview.add" wicket:id="add"/>
- </div>
- </wicket:fragment>
- </wicket:panel>
+ </wicket:extend>
+ </body>
</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceDetailsPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceDetailsPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceDetailsPanel.html
index 67bbd73..19bcd44 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceDetailsPanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceDetailsPanel.html
@@ -40,10 +40,6 @@ under the License.
</div>
<div class="form-group">
- <span wicket:id="propagationPrimary">[propagationPrimary]</span>
- </div>
-
- <div class="form-group">
<span wicket:id="propagationPriority">[propagationPriority]</span>
</div>
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal.properties
index bad0582..351d029 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal.properties
@@ -51,7 +51,6 @@ updateTraceLevel=Update trace level
deleteTraceLevel=Delete trace level
syncTraceLevel=Synchronization trace level
propagationPriority=Propagation priority
-propagationPrimary=Propagation primary
success_connection=Successful connection
error_connection=Connection failure
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModalPage.html
deleted file mode 100644
index 8cb22f0..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModalPage.html
+++ /dev/null
@@ -1,56 +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.
--->
-<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
- <wicket:extend>
- <form wicket:id="form">
- <div class="tabbable tabs-left">
- <ul class="nav nav-tabs">
- <li class="active"><a data-toggle="tab" href="#resource"><span><wicket:message key="resource"/></span></a></li>
- <li><a data-toggle="tab" href="#umapping"><span><wicket:message key="umapping"/></span></a></li>
- <li><a data-toggle="tab" href="#gmapping"><span><wicket:message key="gmapping"/></span></a></li>
- <li><a data-toggle="tab" href="#connectorProperties"><span><wicket:message key="connectorProperties"/></span></a></li>
- <li><a data-toggle="tab" href="#security"><span><wicket:message key="security"/></span></a></li>
- </ul>
- <div class="tab-content">
- <div id="resource" class="tab-pane active">
- <span wicket:id="details">[details]</span>
- <span wicket:id="systeminformation">[System Information]</span>
- </div>
- <div id="umapping" class="tab-pane">
- <span wicket:id="umapping">[umapping]</span>
- </div>
- <div id="gmapping" class="tab-pane">
- <span wicket:id="gmapping">[gmapping]</span>
- </div>
- <div id="connectorProperties" class="tab-pane">
- <span wicket:id="connconf">[connconf]</span>
- </div>
- <div id="security" class="tab-pane">
- <span wicket:id="security">[security]</span>
- </div>
- </div>
- </div>
-
- <div class="modal-footer">
- <input type="submit" class="btn btn-primary" wicket:id="apply"/>
- <input type="button" class="btn btn-default" wicket:id="cancel"/>
- </div>
- </form>
- </wicket:extend>
-</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModalPage.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModalPage.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModalPage.properties
deleted file mode 100644
index 789919b..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModalPage.properties
+++ /dev/null
@@ -1,60 +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.
-resource=Resource details
-umapping=User mapping
-connectorProperties=Connector properties
-security=Security
-required_alert=All form fields are required
-connector=Connector
-existing_resources=Existing resources
-action=Action
-edit_attribute=Edit resource
-title=Resource
-extAttrNames=External attributes
-intMappingTypes=Internal mapping types
-entity=Entity
-groupSchema=Group Schema
-connObjectKey=ConnObjectKey
-mandatoryCondition=Mandatory
-password=Password
-purpose=Purpose
-mappingUserSchema=Mapping User Schema
-mappingGroupSchema=Mapping Group Schema
-delete=Delete
-intAttrNames=Internal attributes
-enforceMandatoryCondition=Enforce mandatory condition
-fieldName=Field name
-
-connObjectKeyValidation=There must be exactly one ConnObjectKey
-propagationMode=Propagation mode
-connObjectLink=ConnObjectLink
-enable=Enable
-
-createTraceLevel=Create trace level
-updateTraceLevel=Update trace level
-deleteTraceLevel=Delete trace level
-syncTraceLevel=Synchronization trace level
-propagationPriority=Propagation priority
-propagationPrimary=Propagation primary
-
-success_connection=Successful connection
-error_connection=Connection failure
-check=Check connection
-actionsClasses=Actions classes
-gmapping=Group mapping
-new=New resource
-randomPwdIfNotProvided=Generate random passwords when missing
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal_it.properties
index 02c2b81..51cf18e 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal_it.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal_it.properties
@@ -50,7 +50,6 @@ updateTraceLevel=Livello di tracciamento degli aggiornamenti
deleteTraceLevel=Livello di tracciamento delle cancellazioni
syncTraceLevel=Livello di tracciamento delle sincronizzazioni
propagationPriority=Priorit\u00e0 in propagazione
-propagationPrimary=Primaria in propagazione
success_connection=Connessione avvenuta con successo
error_connection=Connessione non riuscita
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal_pt_BR.properties
index 9d6faa5..07e0f14 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal_pt_BR.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceModal_pt_BR.properties
@@ -50,7 +50,6 @@ updateTraceLevel=Atualizar n\u00edvel de trace
deleteTraceLevel=Excluir n\u00edvel de trace
syncTraceLevel=N\u00edvel de trace de sincroniza\u00e7\u00e3o
propagationPriority=Prioridade de propaga\u00e7\u00e3o
-propagationPrimary=Propaga\u00e7\u00e3o prim\u00e1ria
success_connection=Conex\u00e3o com sucesso
error_connection=Conex\u00e3o sem sucesso
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AjaxWizard.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AjaxWizard.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AjaxWizard.properties
new file mode 100644
index 0000000..c0b84a1
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AjaxWizard.properties
@@ -0,0 +1,18 @@
+# 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.
+wizard.cancel.error = Wizard error on cancel
+wizard.apply.error = Wizard error on apply changes
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AjaxWizard_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AjaxWizard_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AjaxWizard_it.properties
new file mode 100644
index 0000000..af40f31
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AjaxWizard_it.properties
@@ -0,0 +1,18 @@
+# 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.
+wizard.cancel.error = Errore wizard in annullamento operazione
+wizard.apply.error = Errore wizard in fase di commit
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AjaxWizard_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AjaxWizard_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AjaxWizard_pt_BR.properties
new file mode 100644
index 0000000..a73e270
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/AjaxWizard_pt_BR.properties
@@ -0,0 +1,18 @@
+# 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.
+wizard.cancel.error = Erro em assistente de cancelar
+wizard.apply.error = Assistente de erro em aplicar as altera\u00e7\u00f5es
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/resources/org/apache/syncope/client/console/wizards/WizardMgtPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/WizardMgtPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/WizardMgtPanel.html
new file mode 100644
index 0000000..e849f37
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/WizardMgtPanel.html
@@ -0,0 +1,45 @@
+<!--
+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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <head>
+ <title></title>
+ </head>
+ <body>
+ <wicket:panel>
+ <span wicket:id="container">
+ <wicket:container wicket:id="content" />
+ </span>
+
+ <wicket:fragment wicket:id="wizard">
+ <span wicket:id="wizard"/>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="default">
+
+ <wicket:child />
+
+ <div class="modal-footer" style="text-align: right">
+ <a haref="#" class="btn btn-primary" wicket:id="add">Add</a>
+ </div>
+ </wicket:fragment>
+
+ <div wicket:id="modal" />
+ </wicket:panel>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/DerAttrs.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/DerAttrs.html b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/DerAttrs.html
new file mode 100644
index 0000000..6b17a06
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/DerAttrs.html
@@ -0,0 +1,42 @@
+<!--
+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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org" xmlns:message="http://xmlns.jcp.org/jsf/composite">
+ <head><title></title></head>
+ <body>
+ <wicket:panel>
+ <span wicket:id="content">[CONTENT]</span>
+
+ <wicket:fragment wicket:id="empty">
+ <div class="attribute.empty.list">
+ <wicket:message key="attribute.empty.list"/>
+ </div>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="attributes">
+ <div wicket:id="derAttrContainer">
+ <div class="form-group" wicket:id="attrs">
+ <span wicket:id="panel">
+ [panel for dynamic input type markup]
+ </span>
+ </div>
+ </div>
+ </wicket:fragment>
+ </wicket:panel>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/DerAttrs.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/DerAttrs.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/DerAttrs.properties
new file mode 100644
index 0000000..72b580f
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/DerAttrs.properties
@@ -0,0 +1,18 @@
+# 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.
+derived.emptyvalue.message=Value to be derived ...
+attribute.empty.list=No derived attributes available
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/DerAttrs_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/DerAttrs_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/DerAttrs_it.properties
new file mode 100644
index 0000000..d275c71
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/DerAttrs_it.properties
@@ -0,0 +1,18 @@
+# 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.
+derived.emptyvalue.message=Valore da derivare ...
+attribute.empty.list=Non ci sono attributi derivati disponibili
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/DerAttrs_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/DerAttrs_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/DerAttrs_pt_BR.properties
new file mode 100644
index 0000000..b659c46
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/DerAttrs_pt_BR.properties
@@ -0,0 +1,18 @@
+# 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.
+derived.emptyvalue.message=Valor a ser derivada ...
+attribute.empty.list=Sem atributos derivados dispon\u00edveis
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/GroupDetails.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/GroupDetails.html b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/GroupDetails.html
new file mode 100644
index 0000000..c813528
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/GroupDetails.html
@@ -0,0 +1,56 @@
+<!--
+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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <head><title></title></head>
+ <body>
+ <wicket:panel>
+ <div class="form-group">
+ <span wicket:id="name"/>
+ <a class="tooltips" wicket:id="questionMarkJexlHelp" href="#" alt="Click to help" title="Click to help">
+ <img src="img/help.png"/>
+ <span wicket:id="jexlHelp" class="tooltips">
+ <wicket:message key="jexl_info"/>
+ <ul>
+ <li><wicket:message key="jexl_ex1"/></li>
+ <li><wicket:message key="jexl_ex2"/></li>
+ </ul>
+ <a href="#" wicket:id="jexlLink" target="_blank"><wicket:message key="jexl_syntax_url"/></a>
+ </span>
+ </a>
+ </div>
+
+ <div wicket:id="ownerContainer">
+ <div class="form-group">
+ <span wicket:id="userOwner"/>
+ <a href="#" wicket:id="userOwnerSelect"><img src="img/actions/search.png" alt="select user owner" title="Search"/></a>
+ <a href="#" wicket:id="userOwnerReset"><img src="img/actions/delete.png" alt="reset user owner" title="Delete"/></a>
+ </div>
+
+ <div class="form-group">
+ <span wicket:id="groupOwner"/>
+ <a href="#" wicket:id="groupOwnerSelect"><img src="img/actions/search.png" alt="select group owner" title="Search"/></a>
+ <a href="#" wicket:id="groupOwnerReset"><img src="img/actions/delete.png" alt="reset group owner" title="Delete"/></a>
+ </div>
+ </div>
+
+ <span wicket:id="userOwnerSelectWin"/>
+ <span wicket:id="groupOwnerSelectWin"/>
+ </wicket:panel>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/GroupDetails.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/GroupDetails.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/GroupDetails.properties
new file mode 100644
index 0000000..13a8339
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/GroupDetails.properties
@@ -0,0 +1,16 @@
+# 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.
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/GroupDetails_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/GroupDetails_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/GroupDetails_it.properties
new file mode 100644
index 0000000..13a8339
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/GroupDetails_it.properties
@@ -0,0 +1,16 @@
+# 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.
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/GroupDetails_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/GroupDetails_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/GroupDetails_pt_BR.properties
new file mode 100644
index 0000000..13a8339
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/GroupDetails_pt_BR.properties
@@ -0,0 +1,16 @@
+# 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.
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/PlainAttrs.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/PlainAttrs.html b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/PlainAttrs.html
new file mode 100644
index 0000000..52f6321
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/PlainAttrs.html
@@ -0,0 +1,40 @@
+<!--
+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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <wicket:panel>
+ <div wicket:id="schemas">
+ <div class="form-group">
+ <span wicket:id="panel">
+ [panel for dynamic input type markup]
+ </span>
+ <a class="tooltips" wicket:id="questionMarkJexlHelp" href="#" alt="Click to help" title="Click to help">
+ <img src="img/help.png"/>
+ <span wicket:id="jexlHelp" class="tooltips">
+ <wicket:message key="jexl_info"/>
+ <ul>
+ <li><wicket:message key="jexl_ex1"/></li>
+ <li><wicket:message key="jexl_ex2"/></li>
+ </ul>
+ <a href="#" wicket:id="jexlLink" target="_blank"><wicket:message key="jexl_syntax_url"/></a>
+ </span>
+ </a>
+ </div>
+ </div>
+ </wicket:panel>
+</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/UserDetails.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/UserDetails.html b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/UserDetails.html
new file mode 100644
index 0000000..45e550c
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/UserDetails.html
@@ -0,0 +1,59 @@
+<!--
+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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <head><title></title></head>
+ <body>
+ <wicket:panel>
+ <div class="form-group">
+ <span wicket:id="username"/>
+ <a class="tooltips" wicket:id="usernameQuestionMarkJexlHelp" href="#" alt="Click to help" title="Click to help">
+ <img src="img/help.png"/>
+ <span wicket:id="usernameJexlHelp" class="tooltips">
+ <wicket:message key="jexl_info"/>
+ <ul>
+ <li><wicket:message key="jexl_ex1"/></li>
+ <li><wicket:message key="jexl_ex2"/></li>
+ </ul>
+ <a href="#" wicket:id="jexlLink" target="_blank"><wicket:message key="jexl_syntax_url"/></a>
+ </span>
+ </a>
+ </div>
+
+ <form wicket:id="passwordInnerForm">
+ <div class="form-group">
+ <span wicket:id="password"/>
+ <a class="tooltips" wicket:id="pwdQuestionMarkJexlHelp" href="#" alt="Click to help" title="Click to help">
+ <img src="img/help.png"/>
+ <span wicket:id="pwdJexlHelp" class="tooltips">
+ <wicket:message key="jexl_info"/>
+ <ul>
+ <li><wicket:message key="jexl_ex1"/></li>
+ <li><wicket:message key="jexl_ex2"/></li>
+ </ul>
+ <a href="#" wicket:id="jexlLink" target="_blank"><wicket:message key="jexl_syntax_url"/></a>
+ </span>
+ </a>
+ </div>
+ <div class="form-group">
+ <span wicket:id="confirmPassword"/>
+ </div>
+ </form>
+ </wicket:panel>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/UserDetails.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/UserDetails.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/UserDetails.properties
new file mode 100644
index 0000000..f07fe03
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/UserDetails.properties
@@ -0,0 +1,19 @@
+# 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.
+username=Username
+password=Password
+confirmPassword=Password (confirm)
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/UserDetails_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/UserDetails_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/UserDetails_it.properties
new file mode 100644
index 0000000..741d7dd
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/UserDetails_it.properties
@@ -0,0 +1,19 @@
+# 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.
+username=Username
+password=Password
+confirmPassword=Password (conferma)
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/UserDetails_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/UserDetails_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/UserDetails_pt_BR.properties
new file mode 100644
index 0000000..9debd26
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/UserDetails_pt_BR.properties
@@ -0,0 +1,19 @@
+# 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.
+username=Nome do Usu\u00E1rio
+password=Senha
+confirmPassword=Senha (confirmar)
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/VirAttrs.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/VirAttrs.html b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/VirAttrs.html
new file mode 100644
index 0000000..c73710d
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/VirAttrs.html
@@ -0,0 +1,42 @@
+<!--
+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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org" xmlns:message="http://xmlns.jcp.org/jsf/composite">
+ <head><title></title></head>
+ <body>
+ <wicket:panel>
+ <span wicket:id="content">[CONTENT]</span>
+
+ <wicket:fragment wicket:id="empty">
+ <div class="attribute.empty.list">
+ <wicket:message key="attribute.empty.list"/>
+ </div>
+ </wicket:fragment>
+
+ <wicket:fragment wicket:id="attributes">
+ <div wicket:id="virAttrContainer">
+ <div class="form-group" wicket:id="attrs">
+ <span wicket:id="panel">
+ [panel for dynamic input type markup]
+ </span>
+ </div>
+ </div>
+ </wicket:fragment>
+ </wicket:panel>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/VirAttrs.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/VirAttrs.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/VirAttrs.properties
new file mode 100644
index 0000000..0750893
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/VirAttrs.properties
@@ -0,0 +1,17 @@
+# 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.
+attribute.empty.list=No virtual attributes available
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/VirAttrs_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/VirAttrs_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/VirAttrs_it.properties
new file mode 100644
index 0000000..8c52b7b
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/VirAttrs_it.properties
@@ -0,0 +1,17 @@
+# 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.
+attribute.empty.list=Non ci sono attributi virtuali disponibili
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/VirAttrs_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/VirAttrs_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/VirAttrs_pt_BR.properties
new file mode 100644
index 0000000..5ee69a0
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/any/VirAttrs_pt_BR.properties
@@ -0,0 +1,17 @@
+# 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.
+attribute.empty.list=Sem atributos virtuais dispon\u00edveis
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/resources/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder$ConnObjectLink.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder$ConnObjectLink.html b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder$ConnObjectLink.html
index cb4d27f..2f889e6 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder$ConnObjectLink.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder$ConnObjectLink.html
@@ -16,16 +16,18 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:wicket="http://xmlns.jcp.org/jsf/composite">
- <wicket:panel>
- <span wicket:id="connObjectLinkContainer">
- <div class="form-group">
- <span wicket:id="connObjectLinkCheckbox">[connObjectLinkCheckbox]</span>
- </div>
- <div class="form-group">
- <span wicket:id="connObjectLink">[connObjectLink]</span>
- </div>
- </span>
- </wicket:panel>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://xmlns.jcp.org/jsf/composite">
+ <head><title></title></head>
+ <body>
+ <wicket:panel>
+ <span wicket:id="connObjectLinkContainer">
+ <div class="form-group">
+ <span wicket:id="connObjectLinkCheckbox">[connObjectLinkCheckbox]</span>
+ </div>
+ <div class="form-group">
+ <span wicket:id="connObjectLink">[connObjectLink]</span>
+ </div>
+ </span>
+ </wicket:panel>
+ </body>
</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/resources/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder$Mapping.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder$Mapping.html b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder$Mapping.html
index 2147713..f5eaaeb 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder$Mapping.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder$Mapping.html
@@ -16,8 +16,11 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
-<html xmlns="http://www.w3.org/1999/xhtml">
- <wicket:panel>
- <span wicket:id="mapping" />
- </wicket:panel>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://xmlns.jcp.org/jsf/composite">
+ <head><title></title></head>
+ <body>
+ <wicket:panel>
+ <span wicket:id="mapping" />
+ </wicket:panel>
+ </body>
</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/resources/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder$ObjectType.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder$ObjectType.html b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder$ObjectType.html
index 8d998de..95b13a9 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder$ObjectType.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder$ObjectType.html
@@ -16,16 +16,18 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:wicket="http://xmlns.jcp.org/jsf/composite">
- <wicket:panel >
- <div class="form-group">
- <label>Object Type</label>
- <span wicket:id="type"/>
- </div>
- <div class="form-group">
- <label>Object Class</label>
- <input type="text" placeholder="Object Class ..." class="form-control" wicket:id="class">
- </div>
- </wicket:panel>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://xmlns.jcp.org/jsf/composite">
+ <head><title></title></head>
+ <body>
+ <wicket:panel >
+ <div class="form-group">
+ <label>Object Type</label>
+ <span wicket:id="type"/>
+ </div>
+ <div class="form-group">
+ <label>Object Class</label>
+ <input type="text" placeholder="Object Class ..." class="form-control" wicket:id="class">
+ </div>
+ </wicket:panel>
+ </body>
</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/enduser/pom.xml
----------------------------------------------------------------------
diff --git a/client/enduser/pom.xml b/client/enduser/pom.xml
index a9dc260..372ac7a 100644
--- a/client/enduser/pom.xml
+++ b/client/enduser/pom.xml
@@ -66,10 +66,6 @@ under the License.
</dependency>
<dependency>
<groupId>org.apache.wicket</groupId>
- <artifactId>wicket-spring</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.wicket</groupId>
<artifactId>wicket-auth-roles</artifactId>
</dependency>
@@ -191,4 +187,4 @@ under the License.
</build>
-</project>
\ No newline at end of file
+</project>
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java
index 7c1a43a..e6ec502 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/SchemaService.java
@@ -28,6 +28,7 @@ import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
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.AbstractSchemaTO;
@@ -54,15 +55,17 @@ public interface SchemaService extends JAXRSService {
@NotNull @PathParam("type") SchemaType type, @NotNull @PathParam("key") String key);
/**
- * Returns a list of schemas with matching type.
+ * Returns a list of schemas with matching type, for the given anyTypeClass if provided.
*
* @param <T> actual SchemaTO
* @param type type for schemas to be listed
- * @return list of schemas with matching type
+ * @param anyTypeClass any type class name
+ * @return list of schemas with matching type, for the given anyTypeClass if provided
*/
@GET
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- <T extends AbstractSchemaTO> List<T> list(@NotNull @PathParam("type") SchemaType type);
+ <T extends AbstractSchemaTO> List<T> list(@NotNull @PathParam("type") SchemaType type,
+ @QueryParam("anyType") String anyTypeClass);
/**
* Creates a new schema.
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/core/logic/src/main/java/org/apache/syncope/core/logic/SchemaLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/SchemaLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/SchemaLogic.java
index cbd5f64..f3b1b09 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/SchemaLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/SchemaLogic.java
@@ -33,11 +33,13 @@ import org.apache.syncope.common.lib.to.VirSchemaTO;
import org.apache.syncope.common.lib.types.ClientExceptionType;
import org.apache.syncope.common.lib.types.Entitlement;
import org.apache.syncope.common.lib.types.SchemaType;
+import org.apache.syncope.core.persistence.api.dao.AnyTypeClassDAO;
import org.apache.syncope.core.persistence.api.dao.DerSchemaDAO;
import org.apache.syncope.core.persistence.api.dao.DuplicateException;
import org.apache.syncope.core.persistence.api.dao.NotFoundException;
import org.apache.syncope.core.persistence.api.dao.PlainSchemaDAO;
import org.apache.syncope.core.persistence.api.dao.VirSchemaDAO;
+import org.apache.syncope.core.persistence.api.entity.AnyTypeClass;
import org.apache.syncope.core.persistence.api.entity.DerSchema;
import org.apache.syncope.core.persistence.api.entity.PlainSchema;
import org.apache.syncope.core.persistence.api.entity.VirSchema;
@@ -59,6 +61,9 @@ public class SchemaLogic extends AbstractTransactionalLogic<AbstractSchemaTO> {
private VirSchemaDAO virSchemaDAO;
@Autowired
+ private AnyTypeClassDAO anyTypeClassDAO;
+
+ @Autowired
private SchemaDataBinder binder;
private boolean doesSchemaExist(final SchemaType schemaType, final String name) {
@@ -140,11 +145,13 @@ public class SchemaLogic extends AbstractTransactionalLogic<AbstractSchemaTO> {
@PreAuthorize("isAuthenticated()")
@SuppressWarnings("unchecked")
- public <T extends AbstractSchemaTO> List<T> list(final SchemaType schemaType) {
+ public <T extends AbstractSchemaTO> List<T> list(final SchemaType schemaType, final String anyTypeClass) {
+ AnyTypeClass clazz = anyTypeClass == null ? null : anyTypeClassDAO.find(anyTypeClass);
List<T> result;
switch (schemaType) {
case VIRTUAL:
- result = CollectionUtils.collect(virSchemaDAO.findAll(),
+ result = CollectionUtils.collect(
+ clazz == null ? virSchemaDAO.findAll() : virSchemaDAO.findByAnyTypeClass(clazz),
new Transformer<VirSchema, T>() {
@Override
@@ -155,7 +162,8 @@ public class SchemaLogic extends AbstractTransactionalLogic<AbstractSchemaTO> {
break;
case DERIVED:
- result = CollectionUtils.collect(derSchemaDAO.findAll(),
+ result = CollectionUtils.collect(
+ clazz == null ? derSchemaDAO.findAll() : derSchemaDAO.findByAnyTypeClass(clazz),
new Transformer<DerSchema, T>() {
@Override
@@ -167,7 +175,8 @@ public class SchemaLogic extends AbstractTransactionalLogic<AbstractSchemaTO> {
case PLAIN:
default:
- result = CollectionUtils.collect(plainSchemaDAO.findAll(),
+ result = CollectionUtils.collect(
+ clazz == null ? plainSchemaDAO.findAll() : plainSchemaDAO.findByAnyTypeClass(clazz),
new Transformer<PlainSchema, T>() {
@Override
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/ConnectorFacadeProxy.java
----------------------------------------------------------------------
diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/ConnectorFacadeProxy.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/ConnectorFacadeProxy.java
index 126c1e1..d39c9e9 100644
--- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/ConnectorFacadeProxy.java
+++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/ConnectorFacadeProxy.java
@@ -99,8 +99,8 @@ public class ConnectorFacadeProxy implements Connector {
public ConnectorFacadeProxy(final ConnInstance connInstance) {
this.connInstance = connInstance;
- ConnIdBundleManager connIdBundleManager =
- ApplicationContextProvider.getBeanFactory().getBean(ConnIdBundleManager.class);
+ ConnIdBundleManager connIdBundleManager = ApplicationContextProvider.getBeanFactory().getBean(
+ ConnIdBundleManager.class);
ConnectorInfo info = connIdBundleManager.getConnectorInfo(connInstance);
// create default configuration
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/sync/SyncJobDelegate.java
----------------------------------------------------------------------
diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/sync/SyncJobDelegate.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/sync/SyncJobDelegate.java
index b8e1522..c5fad73 100644
--- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/sync/SyncJobDelegate.java
+++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/sync/SyncJobDelegate.java
@@ -128,20 +128,17 @@ public class SyncJobDelegate extends AbstractProvisioningJobDelegate<SyncTask> {
profile.setResAct(getSyncPolicySpec(syncTask).getConflictResolutionAction());
// Prepare handler for SyncDelta objects (any objects)
- AnyObjectSyncResultHandler ahandler =
- (AnyObjectSyncResultHandler) ApplicationContextProvider.getBeanFactory().
+ AnyObjectSyncResultHandler ahandler = (AnyObjectSyncResultHandler) ApplicationContextProvider.getBeanFactory().
createBean(AnyObjectSyncResultHandlerImpl.class, AbstractBeanDefinition.AUTOWIRE_BY_NAME, false);
ahandler.setProfile(profile);
// Prepare handler for SyncDelta objects (users)
- UserSyncResultHandler uhandler =
- (UserSyncResultHandler) ApplicationContextProvider.getBeanFactory().
+ UserSyncResultHandler uhandler = (UserSyncResultHandler) ApplicationContextProvider.getBeanFactory().
createBean(UserSyncResultHandlerImpl.class, AbstractBeanDefinition.AUTOWIRE_BY_NAME, false);
uhandler.setProfile(profile);
// Prepare handler for SyncDelta objects (groups)
- GroupSyncResultHandler ghandler =
- (GroupSyncResultHandler) ApplicationContextProvider.getBeanFactory().
+ GroupSyncResultHandler ghandler = (GroupSyncResultHandler) ApplicationContextProvider.getBeanFactory().
createBean(GroupSyncResultHandlerImpl.class, AbstractBeanDefinition.AUTOWIRE_BY_NAME, false);
ghandler.setProfile(profile);
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SchemaServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SchemaServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SchemaServiceImpl.java
index d5380ab..07d84fb 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SchemaServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/SchemaServiceImpl.java
@@ -51,8 +51,8 @@ public class SchemaServiceImpl extends AbstractServiceImpl implements SchemaServ
}
@Override
- public <T extends AbstractSchemaTO> List<T> list(final SchemaType schemaType) {
- return logic.list(schemaType);
+ public <T extends AbstractSchemaTO> List<T> list(final SchemaType schemaType, final String anyTypeClass) {
+ return logic.list(schemaType, anyTypeClass);
}
@Override
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/DerSchemaITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/DerSchemaITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/DerSchemaITCase.java
index 210b515..ac941b7 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/DerSchemaITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/DerSchemaITCase.java
@@ -40,7 +40,7 @@ public class DerSchemaITCase extends AbstractITCase {
@Test
public void list() {
- List<DerSchemaTO> derivedSchemas = schemaService.list(SchemaType.DERIVED);
+ List<DerSchemaTO> derivedSchemas = schemaService.list(SchemaType.DERIVED, null);
assertFalse(derivedSchemas.isEmpty());
for (DerSchemaTO derivedSchemaTO : derivedSchemas) {
assertNotNull(derivedSchemaTO);
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/GroupITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/GroupITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/GroupITCase.java
index 3ddb2c8..d247aac 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/GroupITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/GroupITCase.java
@@ -674,7 +674,7 @@ public class GroupITCase extends AbstractITCase {
assertEquals(RESOURCE_NAME_LDAP, result.getPropagationStatuses().get(0).getResource());
assertEquals(PropagationTaskExecStatus.SUCCESS, result.getPropagationStatuses().get(0).getStatus());
group = result.getAny();
-
+
// 3. set capability override with only search allowed, but not enable
ldap.getCapabilitiesOverride().add(ConnectorCapability.SEARCH);
resourceService.update(ldap);
@@ -867,5 +867,5 @@ public class GroupITCase extends AbstractITCase {
assertNotNull(groupTO);
assertEquals("11.23", groupTO.getPlainAttrMap().get(doubleSchemaName).getValues().get(0));
}
-
+
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/MultitenancyITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/MultitenancyITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/MultitenancyITCase.java
index 64f0008..2a9dffe 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/MultitenancyITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/MultitenancyITCase.java
@@ -100,7 +100,7 @@ public class MultitenancyITCase extends AbstractITCase {
@Test
public void readPlainSchemas() {
- assertEquals(17, adminClient.getService(SchemaService.class).list(SchemaType.PLAIN).size());
+ assertEquals(17, adminClient.getService(SchemaService.class).list(SchemaType.PLAIN, null).size());
}
@Test
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/PlainSchemaITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/PlainSchemaITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/PlainSchemaITCase.java
index d275712..2a75805 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/PlainSchemaITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/PlainSchemaITCase.java
@@ -29,6 +29,8 @@ import java.security.AccessControlException;
import java.util.List;
import javax.ws.rs.core.GenericType;
import javax.ws.rs.core.Response;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.collections4.Predicate;
import org.apache.commons.lang3.SerializationUtils;
import org.apache.syncope.common.lib.SyncopeClientException;
import org.apache.syncope.common.lib.to.AnyTypeClassTO;
@@ -36,6 +38,7 @@ import org.apache.syncope.common.lib.to.MembershipTO;
import org.apache.syncope.common.lib.to.PlainSchemaTO;
import org.apache.syncope.common.lib.to.ProvisioningResult;
import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.syncope.common.lib.types.AnyTypeKind;
import org.apache.syncope.common.lib.types.AttrSchemaType;
import org.apache.syncope.common.lib.types.CipherAlgorithm;
import org.apache.syncope.common.lib.types.ClientExceptionType;
@@ -83,7 +86,6 @@ public class PlainSchemaITCase extends AbstractITCase {
fail("This should not be reacheable");
} catch (SyncopeClientException e) {
assertEquals(ClientExceptionType.InvalidPlainSchema, e.getType());
-
assertTrue(e.getElements().iterator().next().contains(EntityViolationType.InvalidName.name()));
}
}
@@ -99,9 +101,7 @@ public class PlainSchemaITCase extends AbstractITCase {
fail("This should not be reacheable");
} catch (SyncopeClientException e) {
assertEquals(ClientExceptionType.InvalidPlainSchema, e.getType());
-
- assertTrue(e.getElements().iterator().next().toString().
- contains(EntityViolationType.InvalidSchemaEnum.name()));
+ assertTrue(e.getElements().iterator().next().contains(EntityViolationType.InvalidSchemaEnum.name()));
}
}
@@ -116,7 +116,6 @@ public class PlainSchemaITCase extends AbstractITCase {
fail("This should not be reacheable");
} catch (SyncopeClientException e) {
assertEquals(ClientExceptionType.InvalidPlainSchema, e.getType());
-
assertTrue(e.getElements().iterator().next().contains(EntityViolationType.InvalidSchemaEnum.name()));
}
}
@@ -160,23 +159,38 @@ public class PlainSchemaITCase extends AbstractITCase {
@Test
public void list() {
- List<PlainSchemaTO> userSchemas = schemaService.list(SchemaType.PLAIN);
- assertFalse(userSchemas.isEmpty());
- for (PlainSchemaTO schemaTO : userSchemas) {
- assertNotNull(schemaTO);
- }
-
- List<PlainSchemaTO> groupSchemas = schemaService.list(SchemaType.PLAIN);
- assertFalse(groupSchemas.isEmpty());
- for (PlainSchemaTO schemaTO : groupSchemas) {
+ List<PlainSchemaTO> schemas = schemaService.list(SchemaType.PLAIN, null);
+ assertFalse(schemas.isEmpty());
+ for (PlainSchemaTO schemaTO : schemas) {
assertNotNull(schemaTO);
}
+ }
- List<PlainSchemaTO> membershipSchemas = schemaService.list(SchemaType.PLAIN);
- assertFalse(membershipSchemas.isEmpty());
- for (PlainSchemaTO schemaTO : membershipSchemas) {
- assertNotNull(schemaTO);
- }
+ @Test
+ public void listByAnyTypeClass() {
+ final String clazz = anyTypeService.read(AnyTypeKind.USER.name()).getClasses().get(0);
+
+ List<PlainSchemaTO> userSchemas = schemaService.list(SchemaType.PLAIN, clazz);
+
+ assertTrue(CollectionUtils.exists(userSchemas, new Predicate<PlainSchemaTO>() {
+
+ @Override
+ public boolean evaluate(final PlainSchemaTO object) {
+ return "fullname".equals(object.getKey());
+ }
+ }));
+
+ assertFalse(CollectionUtils.exists(userSchemas, new Predicate<PlainSchemaTO>() {
+
+ @Override
+ public boolean evaluate(final PlainSchemaTO object) {
+ return "password.cipher.algorithm".equals(object.getKey())
+ || "rderived_dx".equals(object.getKey())
+ || "icon".equals(object.getKey())
+ || "mderived_sx".equals(object.getKey())
+ || "self.membership.layout".equals(object.getKey());
+ }
+ }));
}
@Test
@@ -323,13 +337,13 @@ public class PlainSchemaITCase extends AbstractITCase {
public void anonymous() {
SchemaService unauthenticated = clientFactory.create().getService(SchemaService.class);
try {
- unauthenticated.list(SchemaType.VIRTUAL);
+ unauthenticated.list(SchemaType.VIRTUAL, null);
fail();
} catch (AccessControlException e) {
assertNotNull(e);
}
SchemaService anonymous = clientFactory.create(ANONYMOUS_UNAME, ANONYMOUS_KEY).getService(SchemaService.class);
- assertFalse(anonymous.list(SchemaType.VIRTUAL).isEmpty());
+ assertFalse(anonymous.list(SchemaType.VIRTUAL, null).isEmpty());
}
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/VirSchemaITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/VirSchemaITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/VirSchemaITCase.java
index c4e4ea0..45b4762 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/VirSchemaITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/VirSchemaITCase.java
@@ -41,7 +41,7 @@ public class VirSchemaITCase extends AbstractITCase {
@Test
public void list() {
- List<VirSchemaTO> vSchemas = schemaService.list(SchemaType.VIRTUAL);
+ List<VirSchemaTO> vSchemas = schemaService.list(SchemaType.VIRTUAL, null);
assertFalse(vSchemas.isEmpty());
for (VirSchemaTO vSchemaTO : vSchemas) {
assertNotNull(vSchemaTO);
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 893ada1..effa158 100644
--- a/pom.xml
+++ b/pom.xml
@@ -376,6 +376,7 @@ under the License.
<jquery-ui.version>1.11.4</jquery-ui.version>
<jquery-cookie.version>1.4.1-1</jquery-cookie.version>
<bootstrap.version>3.3.5</bootstrap.version>
+ <bootstrap-select.version>1.7.3</bootstrap-select.version>
<wicket-bootstrap.version>0.10.4-SNAPSHOT</wicket-bootstrap.version>
<bootbox.version>4.4.0</bootbox.version>
@@ -968,6 +969,11 @@ under the License.
</dependency>
<dependency>
<groupId>org.webjars</groupId>
+ <artifactId>bootstrap-select</artifactId>
+ <version>${bootstrap-select.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.webjars</groupId>
<artifactId>font-awesome</artifactId>
<version>${font-awesome.version}</version>
</dependency>
[09/28] syncope git commit: [SYNCOPE-156] improve L&F mappings + fix
connector creation. Still working on deletion of newly creted topology item
Posted by fm...@apache.org.
[SYNCOPE-156] improve L&F mappings + fix connector creation. Still working on deletion of newly creted topology item
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/af8f263b
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/af8f263b
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/af8f263b
Branch: refs/heads/master
Commit: af8f263bf4e8e8eabdc889c96d269b4184fd7813
Parents: ddd7ce3
Author: fmartelli <fa...@gmail.com>
Authored: Tue Sep 29 18:47:25 2015 +0200
Committer: fmartelli <fa...@gmail.com>
Committed: Tue Sep 29 18:47:25 2015 +0200
----------------------------------------------------------------------
.../client/console/panels/ConnectorModal.java | 5 +-
.../console/panels/ResourceMappingPanel.java | 57 ++++---
.../client/console/topology/Topology.java | 5 +-
.../console/topology/TopologyNodePanel.java | 3 +
.../markup/html/bootstrap/dialog/BaseModal.java | 3 +
.../wicket/markup/html/form/FieldPanel.java | 10 +-
.../META-INF/resources/css/fieldstyle.css | 153 ++-----------------
.../META-INF/resources/css/syncopeConsole.css | 4 +
.../resources/META-INF/resources/js/topology.js | 7 +-
.../client/console/panels/ListViewPanel.html | 3 +-
.../console/panels/ResourceMappingPanel.html | 9 +-
.../client/console/topology/Topology.html | 2 +-
12 files changed, 82 insertions(+), 179 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/af8f263b/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorModal.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorModal.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorModal.java
index 6989135..95f013f 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorModal.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorModal.java
@@ -21,13 +21,13 @@ package org.apache.syncope.client.console.panels;
import static org.apache.syncope.client.console.panels.AbstractModalPanel.LOG;
import java.io.Serializable;
+import java.net.URI;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.Predicate;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.pages.AbstractBasePage;
-import org.apache.syncope.client.console.topology.Topology;
import org.apache.syncope.client.console.topology.TopologyNode;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.common.lib.to.ConnBundleTO;
@@ -156,8 +156,7 @@ public class ConnectorModal extends AbstractResourceModal {
connInstanceTO.getKey(),
connInstanceTO.getDisplayName(),
TopologyNode.Kind.CONNECTOR,
- connInstanceTO.getLocation().startsWith(Topology.CONNECTOR_SERVER_LOCATION_PREFIX)
- ? connInstanceTO.getLocation() : Topology.ROOT_NAME,
+ URI.create(connInstanceTO.getLocation()).toASCIIString(),
target));
} else {
connectorRestClient.update(connInstanceTO);
http://git-wip-us.apache.org/repos/asf/syncope/blob/af8f263b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java
index 46cc21f..7a7295a 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java
@@ -72,17 +72,17 @@ public class ResourceMappingPanel extends Panel {
/**
* Mapping field style sheet.
*/
- private static final String FIELD_STYLE = "ui-widget-content ui-corner-all short_fixedsize";
+ private static final String FIELD_STYLE = "short_fixedsize";
/**
* Mapping field style sheet.
*/
- private static final String DEF_FIELD_STYLE = "ui-widget-content ui-corner-all";
+ private static final String DEF_FIELD_STYLE = "";
/**
* Mapping field style sheet.
*/
- private static final String SHORT_FIELD_STYLE = "ui-widget-content ui-corner-all veryshort_fixedsize";
+ private static final String SHORT_FIELD_STYLE = "veryshort_fixedsize";
/**
* Schema rest client.
@@ -268,12 +268,15 @@ public class ResourceMappingPanel extends Panel {
}
});
- final AjaxDropDownChoicePanel<String> intAttrNames = new AjaxDropDownChoicePanel<>("intAttrNames",
+ final AjaxDropDownChoicePanel<String> intAttrNames = new AjaxDropDownChoicePanel<>(
+ "intAttrNames",
getString("intAttrNames"),
- new PropertyModel<String>(mapItem, "intAttrName"), false);
+ new PropertyModel<String>(mapItem, "intAttrName"),
+ false);
intAttrNames.setChoices(schemaNames);
- intAttrNames.setRequired(true);
- intAttrNames.setStyleSheet(FIELD_STYLE);
+ intAttrNames.setRequired(true).hideLabel();
+ intAttrNames.setStyleSheet(false, FIELD_STYLE);
+
intAttrNames.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
private static final long serialVersionUID = -1107858522700306810L;
@@ -289,20 +292,23 @@ public class ResourceMappingPanel extends Panel {
"intMappingTypes",
new ResourceModel("intMappingTypes", "intMappingTypes").getObject(),
new PropertyModel<IntMappingType>(mapItem, "intMappingType"));
- intMappingTypes.setRequired(true);
+ intMappingTypes.setRequired(true).hideLabel();
intMappingTypes.setChoices(attrTypes);
- intMappingTypes.setStyleSheet(FIELD_STYLE);
+ intMappingTypes.setStyleSheet(false, FIELD_STYLE);
item.add(intMappingTypes);
- final AjaxDropDownChoicePanel<AnyTypeKind> entitiesPanel = new AjaxDropDownChoicePanel<>("entities",
+ final AjaxDropDownChoicePanel<AnyTypeKind> entitiesPanel = new AjaxDropDownChoicePanel<>(
+ "entities",
new ResourceModel("entities", "entities").getObject(),
new Model<>(entity));
+ entitiesPanel.hideLabel();
entitiesPanel.setChoices(provisionTO.getAnyType().equals(AnyTypeKind.GROUP.name())
? Collections.<AnyTypeKind>singletonList(AnyTypeKind.GROUP)
: Arrays.asList(AnyTypeKind.values()));
- entitiesPanel.setStyleSheet(DEF_FIELD_STYLE);
+ entitiesPanel.setStyleSheet(false, DEF_FIELD_STYLE);
+
entitiesPanel.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
private static final long serialVersionUID = -1107858522700306810L;
@@ -321,7 +327,8 @@ public class ResourceMappingPanel extends Panel {
});
item.add(entitiesPanel);
- final FieldPanel<String> extAttrNames = new AjaxTextFieldPanel("extAttrName",
+ final FieldPanel<String> extAttrNames = new AjaxTextFieldPanel(
+ "extAttrName",
new ResourceModel("extAttrNames", "extAttrNames").getObject(),
new PropertyModel<String>(mapItem, "extAttrName"));
((AjaxTextFieldPanel) extAttrNames).setChoices(schemaNames);
@@ -332,21 +339,26 @@ public class ResourceMappingPanel extends Panel {
} else {
required = true;
}
- extAttrNames.setRequired(required);
+ extAttrNames.setRequired(required).hideLabel();
extAttrNames.setEnabled(required);
- extAttrNames.setStyleSheet(FIELD_STYLE);
+ extAttrNames.setStyleSheet(false, FIELD_STYLE);
item.add(extAttrNames);
- final AjaxTextFieldPanel mandatory = new AjaxTextFieldPanel("mandatoryCondition",
+ final AjaxTextFieldPanel mandatory = new AjaxTextFieldPanel(
+ "mandatoryCondition",
new ResourceModel("mandatoryCondition", "mandatoryCondition").getObject(),
new PropertyModel<String>(mapItem, "mandatoryCondition"));
+ mandatory.hideLabel();
mandatory.setChoices(Arrays.asList(new String[] { "true", "false" }));
- mandatory.setStyleSheet(SHORT_FIELD_STYLE);
+ mandatory.setStyleSheet(false, SHORT_FIELD_STYLE);
item.add(mandatory);
- final AjaxCheckBoxPanel connObjectKey = new AjaxCheckBoxPanel("connObjectKey",
+ final AjaxCheckBoxPanel connObjectKey = new AjaxCheckBoxPanel(
+ "connObjectKey",
new ResourceModel("connObjectKey", "connObjectKey").getObject(),
new PropertyModel<Boolean>(mapItem, "connObjectKey"));
+
+ connObjectKey.hideLabel();
connObjectKey.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
private static final long serialVersionUID = -1107858522700306810L;
@@ -365,9 +377,12 @@ public class ResourceMappingPanel extends Panel {
});
item.add(connObjectKey);
- final AjaxCheckBoxPanel password = new AjaxCheckBoxPanel("password",
+ final AjaxCheckBoxPanel password = new AjaxCheckBoxPanel(
+ "password",
new ResourceModel("password", "password").getObject(),
new PropertyModel<Boolean>(mapItem, "password"));
+
+ password.hideLabel();
password.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
private static final long serialVersionUID = -1107858522700306810L;
@@ -391,10 +406,10 @@ public class ResourceMappingPanel extends Panel {
final WebMarkupContainer purpose = new WebMarkupContainer("purpose");
purpose.setOutputMarkupId(Boolean.TRUE);
- final MappingPurposePanel panel = new MappingPurposePanel("purposeActions",
- new PropertyModel<MappingPurpose>(mapItem, "purpose"), purpose);
+ final MappingPurposePanel panel = new MappingPurposePanel(
+ "purposeActions", new PropertyModel<MappingPurpose>(mapItem, "purpose"), purpose);
- purpose.add(panel);
+ purpose.add(panel.setRenderBodyOnly(true));
item.add(purpose);
http://git-wip-us.apache.org/repos/asf/syncope/blob/af8f263b/client/console/src/main/java/org/apache/syncope/client/console/topology/Topology.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/topology/Topology.java b/client/console/src/main/java/org/apache/syncope/client/console/topology/Topology.java
index 8b2fa75..7005143 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/topology/Topology.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/topology/Topology.java
@@ -18,6 +18,7 @@
*/
package org.apache.syncope.client.console.topology;
+import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal;
import java.io.Serializable;
import java.net.URI;
import java.util.ArrayList;
@@ -138,8 +139,8 @@ public class Topology extends BasePage {
}
public Topology() {
- modal = new BaseModal<>("modal");
- add(modal);
+ modal = new BaseModal<>("resource-modal");
+ add(modal.size(Modal.Size.Large));
modal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
http://git-wip-us.apache.org/repos/asf/syncope/blob/af8f263b/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyNodePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyNodePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyNodePanel.java
index 8a68ca3..9545c31 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyNodePanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyNodePanel.java
@@ -172,6 +172,7 @@ public class TopologyNodePanel extends Panel implements IAjaxIndicatorAware {
error(getString(Constants.ERROR) + ": " + e.getMessage());
LOG.error("While deleting resource {}", node.getKey(), e);
}
+ ((BasePage) pageRef.getPage()).getFeedbackPanel().refresh(target);
}
};
fragment.add(delete);
@@ -250,6 +251,8 @@ public class TopologyNodePanel extends Panel implements IAjaxIndicatorAware {
error(getString(Constants.ERROR) + ": " + e.getMessage());
LOG.error("While deleting resource {}", node.getKey(), e);
}
+
+ ((BasePage) pageRef.getPage()).getFeedbackPanel().refresh(target);
}
};
fragment.add(delete);
http://git-wip-us.apache.org/repos/asf/syncope/blob/af8f263b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/bootstrap/dialog/BaseModal.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/bootstrap/dialog/BaseModal.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/bootstrap/dialog/BaseModal.java
index 124b096..2b3c49d 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/bootstrap/dialog/BaseModal.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/bootstrap/dialog/BaseModal.java
@@ -193,6 +193,9 @@ public class BaseModal<T extends Serializable> extends Modal<T> {
protected void onInitialize() {
super.onInitialize();
+ final WebMarkupContainer dialog = (WebMarkupContainer) this.get("dialog");
+ dialog.setMarkupId(this.getId());
+
final WebMarkupContainer footer = (WebMarkupContainer) this.get("dialog:footer");
footer.addOrReplace(new ListView<Component>("inputs", components) {
http://git-wip-us.apache.org/repos/asf/syncope/blob/af8f263b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/FieldPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/FieldPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/FieldPanel.java
index 89970f8..fe31dc9 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/FieldPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/FieldPanel.java
@@ -64,7 +64,15 @@ public abstract class FieldPanel<T extends Serializable> extends AbstractFieldPa
}
public FieldPanel<T> setStyleSheet(final String... classes) {
- field.add(AttributeModifier.replace("class", StringUtils.join(classes, ' ')));
+ return setStyleSheet(true, classes);
+ }
+
+ public FieldPanel<T> setStyleSheet(final boolean replace, final String... classes) {
+ if (replace) {
+ field.add(AttributeModifier.replace("class", StringUtils.join(classes, ' ')));
+ } else {
+ field.add(AttributeModifier.append("class", StringUtils.join(classes, ' ')));
+ }
return this;
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/af8f263b/client/console/src/main/resources/META-INF/resources/css/fieldstyle.css
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/css/fieldstyle.css b/client/console/src/main/resources/META-INF/resources/css/fieldstyle.css
index 23ef109..3ff5c29 100644
--- a/client/console/src/main/resources/META-INF/resources/css/fieldstyle.css
+++ b/client/console/src/main/resources/META-INF/resources/css/fieldstyle.css
@@ -17,175 +17,46 @@
* under the License.
*/
.drop_button{
- vertical-align: middle;
+ vertical-align: middle !important;
}
.add_button{
- vertical-align: middle;
- margin-left: 6px;
+ vertical-align: middle !important;
+ margin-left: 6px !important;
}
.date_size{
- width: 90px;
+ width: 90px !important;
}
.long_dynamicsize{
- width: 80%;
+ width: 80% !important;
}
.medium_dynamicsize{
- width: 45%;
+ width: 45% !important;
}
.short_dynamicsize{
- width: 35%;
+ width: 35% !important;
}
.long_fixedsize{
- width: 500px;
+ width: 500px !important;
}
.medium_fixedsize{
- width: 300px;
+ width: 300px !important;
}
.short_fixedsize{
- width: 150px;
+ width: 150px !important;
}
.veryshort_fixedsize{
- width: 70px;
+ width: 70px !important;
}
.all_dynamicsize{
- width: 100%;
-}
-
-div#formtable {
- display: table;
- width: 100%;
-}
-
-div#formtable > span:first-of-type {
- display: table-row-group;
- width: 100%;
-}
-
-div.tablerow {
- display: inline-table;
- padding: 5px;
- width: 99%;
-}
-
-div.tablerow.connectorProp {
- height:22px;
- vertical-align: middle;
- font-size: 12px;
-}
-
-div.tablecolumn_connPropAttr {
- display: table-cell;
- vertical-align: middle;
-}
-
-div.tablerow2 {
- display: inline-table;
- padding: 5px 0px 5px 0px;
- width: 99%;
-}
-
-div.alt {
- background: #eff3ea;
-}
-
-div.tablecolumn_label{
- display: table-cell;
- font-size: 12px;
- vertical-align: middle;
- font-family: Verdana,Tahoma,sans-serif;
- width: 30%;
-}
-
-div.tablecolumn_field{
- display: table-cell;
- vertical-align: middle;
- font-family: Verdana,Tahoma,sans-serif;
- width: 70%;
-}
-
-div.tablecolumn_check{
- display: table-cell;
- margin-right: 5px;
- margin-left: 2px;
- vertical-align: middle;
-}
-
-div.tablecolumn2_label{
- display: table-cell;
- font-size: 12px;
- vertical-align: middle;
- font-family: Verdana,Tahoma,sans-serif;
- padding-left: 5px;
- width: 15%;
-}
-
-div.tablecolumn2_field{
- display: table-cell;
- vertical-align: middle;
- font-family: Verdana,Tahoma,sans-serif;
- width: 35%;
-}
-
-.ui-tabs .ui-tabs-panel {
- background: none repeat scroll 0 0 #FFFFFF;
- border-width: 0;
- display: block;
- overflow: auto;
- padding: 1em 1.4em;
-}
-
-.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button {
- font-family: Verdana,Arial,sans-serif;
- font-size: 12px;
- padding: 2px 4px;
-}
-
-.ui-widget-header {
- border: 1px solid #aaaaaa
- /*{borderColorHeader}*/;
- background: #cccccc
- /*{bgColorHeader}*/
- url(images/ui-bg_highlight-soft_75_cccccc_1x100.png)
- /*{bgImgUrlHeader}*/
- 50%/*{bgHeaderXPos}*/
- 50%/*{bgHeaderYPos}*/
- repeat-x/*{bgHeaderRepeat}*/;
- color: #222222/*{fcHeader}*/;
- font-weight: bold;
- padding: 7px 15px;
-}
-
-.ui-button {
- display: inline-block;
- position: relative;
- margin-right: .1em;
- cursor: pointer;
- text-align: center;
- zoom: 1;
- overflow: visible;
- padding: 7px 15px;
-}
-
-.ui-spinner-button {
- cursor: default;
- display: block;
- font-size: 0.5em;
- height: 50%;
- margin: 0;
- overflow: hidden;
- padding: 0;
- position: absolute;
- right: 0;
- text-align: center;
- width: 16px;
+ width: 100% !important;
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/af8f263b/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 dbf377c..ad0f032 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
@@ -218,3 +218,7 @@ span.overridable div.checkbox {
margin: 0px;
padding: 0px;
}
+
+div#resource-modal.modal-lg {
+ width: 1200px;
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/af8f263b/client/console/src/main/resources/META-INF/resources/js/topology.js
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/js/topology.js b/client/console/src/main/resources/META-INF/resources/js/topology.js
index 9327b01..53494d0 100644
--- a/client/console/src/main/resources/META-INF/resources/js/topology.js
+++ b/client/console/src/main/resources/META-INF/resources/js/topology.js
@@ -267,15 +267,14 @@ window.checkConnection = function() {
}
window.addEndpoint = function(source, target, scope) {
- var sourceElement = $('#' + source);
-
+ var sourceElement = $(document.getElementById(source));
+
var top = parseFloat(sourceElement.css("top")) + 10;
var left = parseFloat(sourceElement.css("left")) - 150;
setPosition(target, left, top);
-
jsPlumb.ready(function(){
- jsPlumb.draggable(jsPlumb.getSelector("#" + target));
+ jsPlumb.draggable(jsPlumb.getSelector(document.getElementById(target)));
jsPlumb.connect({ source:source, target:target, scope:scope }, def);
});
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/af8f263b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ListViewPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ListViewPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ListViewPanel.html
index ec4cc94..8cad9d0 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ListViewPanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ListViewPanel.html
@@ -39,6 +39,7 @@ under the License.
<tbody>
<tr>
<th wicket:id="names"><span wicket:id="name"/></th>
+ <th />
</tr>
<tr wicket:id="beans">
<td wicket:id="fields"><span wicket:id="field"/></td>
@@ -52,7 +53,7 @@ under the License.
</div><!-- /.box-body -->
</div><!-- /.box -->
</div>
- <div class="modal-footer">
+ <div class="modal-footer" style="text-align: right">
<input type="submit" class="btn btn-primary" value="Add" wicket:message="value:listview.add" wicket:id="add"/>
</div>
</wicket:fragment>
http://git-wip-us.apache.org/repos/asf/syncope/blob/af8f263b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceMappingPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceMappingPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceMappingPanel.html
index 12ec5d2..ccedbb8 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceMappingPanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceMappingPanel.html
@@ -73,18 +73,17 @@ under the License.
<span wicket:id="password">[password]</span>
</td>
<td>
- <span wicket:id="purpose">
+ <div wicket:id="purpose" style="margin: 10px 0px 10px 0px">
<span wicket:id="purposeActions">[purpose]</span>
- </span>
+ </div>
</td>
</tr>
</tbody>
<tfoot>
<tr>
- <td colspan="7" style="padding: 5px">
- <input type="submit" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
- wicket:id="addMappingBtn" />
+ <td colspan="9" style="padding: 5px; text-align: right">
+ <input type="submit" class="btn btn-primary" wicket:id="addMappingBtn" />
</td>
</tr>
</tfoot>
http://git-wip-us.apache.org/repos/asf/syncope/blob/af8f263b/client/console/src/main/resources/org/apache/syncope/client/console/topology/Topology.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/topology/Topology.html b/client/console/src/main/resources/org/apache/syncope/client/console/topology/Topology.html
index 4b6eff8..c9bd4f3 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/topology/Topology.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/topology/Topology.html
@@ -69,6 +69,6 @@ under the License.
</div>
<span wicket:id="jsPlace"></span>
</div>
- <div wicket:id="modal">[modal]</div>
+ <div wicket:id="resource-modal">[modal]</div>
</wicket:extend>
</html>
[03/28] syncope git commit: Merge branch 'master' into SYNCOPE-156
Posted by fm...@apache.org.
Merge branch 'master' into SYNCOPE-156
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/1ab8914f
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/1ab8914f
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/1ab8914f
Branch: refs/heads/master
Commit: 1ab8914f3ee19891fcb692e9b0d28bdadb59df08
Parents: b2e93ca 271052a
Author: fmartelli <fa...@gmail.com>
Authored: Wed Sep 23 15:17:10 2015 +0200
Committer: fmartelli <fa...@gmail.com>
Committed: Wed Sep 23 15:17:10 2015 +0200
----------------------------------------------------------------------
pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/1ab8914f/pom.xml
----------------------------------------------------------------------
[07/28] syncope git commit: [SYNCOPE-156] merge from master +
connector and resource modal re-work. Still re-working on provisions and
mappings
Posted by fm...@apache.org.
[SYNCOPE-156] merge from master + connector and resource modal re-work. Still re-working on provisions and mappings
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/b56c08ee
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/b56c08ee
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/b56c08ee
Branch: refs/heads/master
Commit: b56c08eebf369416d4418b607c80691ca47b55e4
Parents: 6f67940 5dc5191
Author: fmartelli <fa...@gmail.com>
Authored: Tue Sep 29 15:44:47 2015 +0200
Committer: fmartelli <fa...@gmail.com>
Committed: Tue Sep 29 15:44:47 2015 +0200
----------------------------------------------------------------------
archetype/pom.xml | 20 +
.../client/cli/commands/ReportCommand.java | 3 +-
.../panels/AbstractConnectorConfPanel.java | 114 +++++
.../console/panels/AbstractResourceModal.java | 45 +-
.../panels/ConnectorCapabilitiesPanel.java | 58 +++
.../console/panels/ConnectorConfPanel.java | 86 ++++
.../console/panels/ConnectorDetailsPanel.java | 197 ++++++++
.../client/console/panels/ConnectorModal.java | 452 ++++-------------
.../client/console/panels/ListViewPanel.java | 10 +-
.../console/panels/ResourceConnConfPanel.java | 122 +----
.../console/panels/ResourceDetailsPanel.java | 237 +++------
.../console/panels/ResourceMappingPanel.java | 23 -
.../client/console/panels/ResourceModal.java | 36 +-
.../console/panels/ResourceSecurityPanel.java | 41 +-
.../client/console/rest/ReportRestClient.java | 18 +-
.../client/console/rest/TaskRestClient.java | 4 +-
.../syncope/client/console/themes/AdminLTE.java | 14 -
.../console/topology/TopologyNodePanel.java | 25 +-
.../markup/html/bootstrap/dialog/BaseModal.java | 6 +
.../markup/html/form/AbstractFieldPanel.java | 68 ++-
.../markup/html/form/AjaxCheckBoxPanel.java | 17 +-
.../html/form/AjaxPasswordFieldPanel.java | 13 +-
.../markup/html/form/AjaxTextFieldPanel.java | 5 +-
.../wicket/markup/html/form/FieldPanel.java | 37 +-
.../markup/html/form/SpinnerFieldPanel.java | 2 -
.../wicket/markup/html/list/AltListView.java | 59 ---
.../html/list/ConnConfPropertyListView.java | 109 ++--
.../provision/ProvisionWizardBuilder.java | 6 +-
.../META-INF/resources/css/syncopeConsole.css | 6 +
.../panels/AbstractConnectorConfPanel.html | 38 ++
.../console/panels/AbstractResourceModal.html | 23 +
.../panels/ConnectorCapabilitiesPanel.html | 28 ++
.../console/panels/ConnectorDetailsPanel.html | 61 +++
.../client/console/panels/ConnectorModal.html | 147 ------
.../console/panels/ConnectorModal.properties | 7 +-
.../console/panels/ConnectorModal_it.properties | 7 +-
.../panels/ConnectorModal_pt_BR.properties | 7 +-
.../console/panels/ResourceConnConfPanel.html | 40 --
.../console/panels/ResourceDetailsPanel.html | 4 -
.../client/console/panels/ResourceModal.html | 23 -
.../console/panels/ResourceModal.properties | 5 +-
.../console/panels/ResourceModal_it.properties | 2 +-
.../panels/ResourceModal_pt_BR.properties | 2 +-
.../markup/html/form/AbstractFieldPanel.html | 35 ++
.../markup/html/form/AjaxCheckBoxPanel.html | 9 +-
.../html/form/AjaxDropDownChoicePanel.html | 1 +
.../html/form/AjaxPasswordFieldPanel.html | 17 +-
.../markup/html/form/AjaxTextFieldPanel.html | 3 +-
.../form/CheckBoxMultipleChoiceFieldPanel.html | 18 +-
.../wicket/markup/html/form/FieldPanel.html | 31 --
.../markup/html/form/MultiFieldPanel.html | 8 +-
.../markup/html/form/SpinnerFieldPanel.html | 1 +
.../syncope/client/lib/SyncopeClient.java | 21 +-
.../lib/builders/AbstractQueryBuilder.java | 57 +++
.../lib/builders/AnyListQueryBuilder.java | 6 +-
.../client/lib/builders/AnyQueryBuilder.java | 49 ++
.../client/lib/builders/ListQueryBuilder.java | 54 --
.../client/lib/builders/TaskQueryBuilder.java | 60 +++
client/pom.xml | 19 +
.../syncope/common/lib/to/MappingItemTO.java | 11 +-
.../common/lib/to/PropagationTaskTO.java | 21 +-
.../syncope/common/lib/to/ResourceTO.java | 33 +-
.../apache/syncope/common/lib/to/SyncopeTO.java | 9 +
.../common/lib/types/ConnectorCapability.java | 9 +-
.../common/lib/types/PropagationMode.java | 29 --
.../lib/types/PropagationTaskExecStatus.java | 14 -
common/pom.xml | 19 +
.../common/rest/api/beans/AbstractQuery.java | 67 +++
.../common/rest/api/beans/AnyListQuery.java | 2 +-
.../syncope/common/rest/api/beans/AnyQuery.java | 40 ++
.../common/rest/api/beans/ListQuery.java | 98 ----
.../common/rest/api/beans/TaskQuery.java | 64 +++
.../common/rest/api/service/JAXRSService.java | 6 +
.../common/rest/api/service/ReportService.java | 8 +-
.../common/rest/api/service/TaskService.java | 22 +-
.../apache/syncope/core/logic/ReportLogic.java | 10 +-
.../syncope/core/logic/ResourceLogic.java | 8 +-
.../apache/syncope/core/logic/SyncopeLogic.java | 25 +-
.../apache/syncope/core/logic/TaskLogic.java | 65 +--
.../init/ClassPathScanImplementationLookup.java | 6 +
.../syncope/core/misc/ConnObjectUtils.java | 232 ++-------
.../apache/syncope/core/misc/MappingUtils.java | 501 +++++++++++++------
.../core/misc/security/AuthDataAccessor.java | 9 +-
.../serialization/GuardedStringSerializer.java | 4 +-
.../persistence/api/ImplementationLookup.java | 1 +
.../core/persistence/api/dao/ReportDAO.java | 5 -
.../core/persistence/api/dao/TaskDAO.java | 8 +-
.../api/entity/resource/ExternalResource.java | 5 -
.../api/entity/resource/MappingItem.java | 3 +
.../api/entity/task/PropagationTask.java | 9 +-
.../core/persistence/jpa/dao/AbstractDAO.java | 25 -
.../core/persistence/jpa/dao/JPAReportDAO.java | 27 +-
.../core/persistence/jpa/dao/JPATaskDAO.java | 140 ++++--
.../persistence/jpa/dao/JPATaskExecDAO.java | 9 +-
.../entity/resource/JPAExternalResource.java | 16 -
.../jpa/entity/resource/JPAMappingItem.java | 22 +
.../jpa/entity/task/JPAPropagationTask.java | 29 +-
.../entity/ExternalResourceValidator.java | 22 +
.../entity/PropagationTaskValidator.java | 3 +-
.../core/persistence/jpa/inner/ReportTest.java | 4 +-
.../core/persistence/jpa/inner/TaskTest.java | 19 +-
.../persistence/jpa/outer/ResourceTest.java | 5 +-
.../core/persistence/jpa/outer/TaskTest.java | 11 +-
.../test/resources/domains/MasterContent.xml | 109 ++--
.../src/test/resources/domains/TwoContent.xml | 6 +-
core/pom.xml | 19 +
.../core/provisioning/api/Connector.java | 19 +-
.../api/data/MappingItemTransformer.java | 47 ++
.../provisioning/java/AsyncConnectorFacade.java | 14 +-
.../provisioning/java/ConnectorFacadeProxy.java | 55 +-
.../provisioning/java/VirAttrHandlerImpl.java | 44 +-
.../java/data/AbstractAnyDataBinder.java | 19 +-
.../data/DefaultMappingItemTransformer.java | 40 ++
.../java/data/ResourceDataBinderImpl.java | 4 -
.../AbstractPropagationTaskExecutor.java | 64 ++-
.../propagation/DefaultPropagationActions.java | 2 +-
.../propagation/DefaultPropagationReporter.java | 2 +-
.../LDAPPasswordPropagationActions.java | 2 +-
.../PriorityPropagationTaskExecutor.java | 2 +-
.../propagation/PropagationManagerImpl.java | 13 +-
.../java/sync/AbstractPushResultHandler.java | 6 +-
.../java/sync/AbstractSyncResultHandler.java | 2 +-
.../sync/PlainAttrsSyncCorrelationRule.java | 41 +-
.../core/provisioning/java/sync/SyncUtils.java | 37 +-
.../java/ResourceDataBinderTest.java | 2 -
.../rest/cxf/service/ReportServiceImpl.java | 13 +-
.../core/rest/cxf/service/TaskServiceImpl.java | 34 +-
deb/pom.xml | 27 +-
ext/pom.xml | 19 +
.../reference/PrefixMappingItemTransformer.java | 55 ++
.../fit/core/reference/AbstractTaskITCase.java | 2 +-
.../fit/core/reference/ConnectorITCase.java | 10 +-
.../fit/core/reference/MultitenancyITCase.java | 3 +-
.../core/reference/PropagationTaskITCase.java | 44 +-
.../fit/core/reference/PushTaskITCase.java | 4 +-
.../fit/core/reference/ReportITCase.java | 8 +-
.../fit/core/reference/SchedTaskITCase.java | 2 +-
.../fit/core/reference/SyncTaskITCase.java | 127 +++--
.../syncope/fit/core/reference/UserITCase.java | 57 +--
.../fit/core/reference/VirAttrITCase.java | 12 +-
fit/pom.xml | 19 +
installer/pom.xml | 17 +
pom.xml | 97 +++-
.../getting-started/getting-started.adoc | 64 +++
.../reference-guide/reference-guide.adoc | 100 ++++
standalone/pom.xml | 17 +
146 files changed, 3112 insertions(+), 2459 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractConnectorConfPanel.java
----------------------------------------------------------------------
diff --cc client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractConnectorConfPanel.java
index 0000000,0000000..c055c95
new file mode 100644
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractConnectorConfPanel.java
@@@ -1,0 -1,0 +1,114 @@@
++/*
++ * 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.panels;
++
++import java.util.ArrayList;
++import java.util.Collections;
++import java.util.Comparator;
++import java.util.List;
++import java.util.Set;
++import org.apache.syncope.client.console.wicket.markup.html.list.ConnConfPropertyListView;
++import org.apache.syncope.common.lib.AbstractBaseBean;
++import org.apache.syncope.common.lib.types.ConnConfProperty;
++import org.apache.wicket.ajax.AjaxRequestTarget;
++import org.apache.wicket.ajax.markup.html.form.AjaxButton;
++import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
++import org.apache.wicket.markup.html.WebMarkupContainer;
++import org.apache.wicket.markup.html.form.Form;
++import org.apache.wicket.markup.html.panel.Panel;
++import org.apache.wicket.model.IModel;
++import org.apache.wicket.model.PropertyModel;
++import org.apache.wicket.model.ResourceModel;
++
++/**
++ * Modal window with Connector form.
++ *
++ * @param <T> model type.
++ */
++public abstract class AbstractConnectorConfPanel<T extends AbstractBaseBean> extends Panel {
++
++ private static final long serialVersionUID = -2025535531121434050L;
++
++ protected final WebMarkupContainer propertiesContainer;
++
++ protected final AjaxButton check;
++
++ protected final IModel<T> model;
++
++ public AbstractConnectorConfPanel(final String id, final IModel<T> model) {
++
++ super(id, model);
++ this.model = model;
++ setOutputMarkupId(true);
++
++ propertiesContainer = new WebMarkupContainer("connectorPropertiesContainer");
++ propertiesContainer.setOutputMarkupId(true);
++ add(propertiesContainer);
++
++ check = new IndicatingAjaxButton("check", new ResourceModel("check")) {
++
++ private static final long serialVersionUID = -7978723352517770644L;
++
++ @Override
++ public void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
++ check(target);
++ }
++ };
++ propertiesContainer.add(check);
++ }
++
++ protected void setConfPropertyListView(final String modelExpression, final boolean withOverridable) {
++
++ final ConnConfPropertyListView connPropView = new ConnConfPropertyListView(
++ "connectorProperties",
++ new PropertyModel<List<ConnConfProperty>>(model.getObject(), modelExpression) {
++
++ private static final long serialVersionUID = 1L;
++
++ @Override
++ public List<ConnConfProperty> getObject() {
++ final List<ConnConfProperty> res = new ArrayList<>((Set<ConnConfProperty>) super.getObject());
++
++ // re-order properties
++ Collections.sort(res, new Comparator<ConnConfProperty>() {
++
++ @Override
++ public int compare(final ConnConfProperty left, final ConnConfProperty right) {
++ if (left == null) {
++ return -1;
++ } else {
++ return left.compareTo(right);
++ }
++ }
++ });
++
++ return res;
++ }
++ },
++ withOverridable
++ );
++
++ connPropView.setOutputMarkupId(true);
++ propertiesContainer.add(connPropView);
++ }
++
++ protected abstract void check(final AjaxRequestTarget taget);
++
++ protected abstract List<ConnConfProperty> getConnProperties(final T instance);
++}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractResourceModal.java
----------------------------------------------------------------------
diff --cc client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractResourceModal.java
index fa18012,1ed9050..15f4f02
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractResourceModal.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractResourceModal.java
@@@ -19,11 -19,10 +19,17 @@@
package org.apache.syncope.client.console.panels;
import java.io.Serializable;
++import java.util.ArrayList;
++import java.util.List;
import org.apache.syncope.client.console.topology.TopologyNode;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal.ModalEvent;
import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
++import org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink;
++import org.apache.wicket.extensions.markup.html.tabs.ITab;
++import org.apache.wicket.markup.html.WebMarkupContainer;
++import org.apache.wicket.markup.html.form.Form;
/**
* Modal window with Resource form.
@@@ -32,8 -31,8 +38,46 @@@ public abstract class AbstractResourceM
private static final long serialVersionUID = 1734415311027284221L;
- public AbstractResourceModal(final ModalWindow window, final PageReference pageRef) {
- super(window, pageRef);
++ protected final List<ITab> tabs;
++
+ public AbstractResourceModal(final BaseModal<?> modal, final PageReference pageRef) {
+ super(modal, pageRef);
++
++ this.tabs = new ArrayList<>();
++ add(new AjaxBootstrapTabbedPanel<ITab>("tabbedPanel", tabs));
++ }
++
++ private class AjaxBootstrapTabbedPanel<T extends ITab>
++ extends de.agilecoders.wicket.core.markup.html.bootstrap.tabs.AjaxBootstrapTabbedPanel<T> {
++
++ private static final long serialVersionUID = 1L;
++
++ public AjaxBootstrapTabbedPanel(final String id, final List<T> tabs) {
++ super(id, tabs);
++ }
++
++ @Override
++ protected WebMarkupContainer newLink(final String linkId, final int index) {
++ return new AjaxSubmitLink(linkId) {
++
++ private static final long serialVersionUID = 1L;
++
++ @Override
++ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
++ setSelectedTab(index);
++ if (target != null) {
++ target.add(AjaxBootstrapTabbedPanel.this);
++ }
++ onAjaxUpdate(target);
++ }
++
++ @Override
++ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
++ modal.getFeedbackPanel().refresh(target);
++ }
++ };
++ }
++
}
public static class CreateEvent extends ModalEvent {
@@@ -74,6 -73,6 +118,5 @@@
public Serializable getParent() {
return parent;
}
--
}
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorCapabilitiesPanel.java
----------------------------------------------------------------------
diff --cc client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorCapabilitiesPanel.java
index 0000000,0000000..fbb8059
new file mode 100644
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorCapabilitiesPanel.java
@@@ -1,0 -1,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.panels;
++
++import java.util.Arrays;
++import java.util.List;
++import org.apache.syncope.client.console.wicket.markup.html.form.CheckBoxMultipleChoiceFieldPanel;
++import org.apache.syncope.common.lib.to.ConnInstanceTO;
++import org.apache.syncope.common.lib.types.ConnectorCapability;
++import org.apache.wicket.markup.html.panel.Panel;
++import org.apache.wicket.model.IModel;
++import org.apache.wicket.model.LoadableDetachableModel;
++import org.apache.wicket.model.PropertyModel;
++
++/**
++ * Modal window with Connector form.
++ */
++public class ConnectorCapabilitiesPanel extends Panel {
++
++ private static final long serialVersionUID = -2025535531121434050L;
++
++ public ConnectorCapabilitiesPanel(final String id, final IModel<ConnInstanceTO> model) {
++
++ super(id, model);
++ setOutputMarkupId(true);
++
++ final IModel<List<ConnectorCapability>> all = new LoadableDetachableModel<List<ConnectorCapability>>() {
++
++ private static final long serialVersionUID = 5275935387613157437L;
++
++ @Override
++ protected List<ConnectorCapability> load() {
++ return Arrays.asList(ConnectorCapability.values());
++ }
++ };
++
++ add(new CheckBoxMultipleChoiceFieldPanel<>(
++ "capabilitiesPalette",
++ new PropertyModel<List<ConnectorCapability>>(model.getObject(), "capabilities"),
++ all));
++ }
++}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorConfPanel.java
----------------------------------------------------------------------
diff --cc client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorConfPanel.java
index 0000000,0000000..2e813ed
new file mode 100644
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorConfPanel.java
@@@ -1,0 -1,0 +1,86 @@@
++/*
++ * 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.panels;
++
++import java.util.ArrayList;
++import java.util.List;
++import org.apache.commons.collections4.CollectionUtils;
++import org.apache.commons.collections4.Transformer;
++import org.apache.syncope.common.lib.to.ConnBundleTO;
++import org.apache.syncope.common.lib.to.ConnInstanceTO;
++import org.apache.syncope.common.lib.types.ConnConfPropSchema;
++import org.apache.syncope.common.lib.types.ConnConfProperty;
++import org.apache.wicket.model.IModel;
++
++/**
++ * Modal window with Connector form.
++ */
++public abstract class ConnectorConfPanel extends AbstractConnectorConfPanel<ConnInstanceTO> {
++
++ private static final long serialVersionUID = -2025535531121434050L;
++
++ private final List<ConnBundleTO> bundles;
++
++ public ConnectorConfPanel(final String id, final IModel<ConnInstanceTO> model, final List<ConnBundleTO> bundles) {
++
++ super(id, model);
++ this.bundles = bundles;
++
++ final List<ConnConfProperty> properties = getConnProperties(model.getObject());
++ model.getObject().getConfiguration().clear();
++ model.getObject().getConfiguration().addAll(properties);
++
++ setConfPropertyListView("configuration", true);
++ }
++
++ /**
++ * Ge available configuration properties.
++ *
++ * @param instance connector instance.
++ * @return configuration properties.
++ */
++ @Override
++ protected final List<ConnConfProperty> getConnProperties(final ConnInstanceTO instance) {
++
++ final List<ConnConfProperty> res = CollectionUtils.collect(
++ ConnectorModal.getBundle(instance, bundles).getProperties(),
++ new Transformer<ConnConfPropSchema, ConnConfProperty>() {
++
++ @Override
++ public ConnConfProperty transform(final ConnConfPropSchema key) {
++ final ConnConfProperty property = new ConnConfProperty();
++ property.setSchema(key);
++
++ if (instance.getKey() != 0 && instance.getConfigurationMap().containsKey(key.getName())
++ && instance.getConfigurationMap().get(key.getName()).getValues() != null) {
++ property.getValues().addAll(instance.getConfigurationMap().get(key.getName()).getValues());
++ property.setOverridable(instance.getConfigurationMap().get(key.getName()).isOverridable());
++ }
++
++ if (property.getValues().isEmpty() && !key.getDefaultValues().isEmpty()) {
++ property.getValues().addAll(key.getDefaultValues());
++ }
++ return property;
++ }
++ },
++ new ArrayList<ConnConfProperty>());
++
++ return res;
++ }
++}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorDetailsPanel.java
----------------------------------------------------------------------
diff --cc client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorDetailsPanel.java
index 0000000,0000000..f7544c3
new file mode 100644
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorDetailsPanel.java
@@@ -1,0 -1,0 +1,197 @@@
++/*
++ * 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.panels;
++
++import java.util.ArrayList;
++import java.util.HashSet;
++import java.util.List;
++import org.apache.commons.collections4.CollectionUtils;
++import org.apache.commons.collections4.Predicate;
++import org.apache.commons.collections4.Transformer;
++import org.apache.syncope.client.console.commons.Constants;
++import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
++import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
++import org.apache.syncope.client.console.wicket.markup.html.form.SpinnerFieldPanel;
++import org.apache.syncope.common.lib.to.ConnBundleTO;
++import org.apache.syncope.common.lib.to.ConnInstanceTO;
++import org.apache.syncope.common.lib.to.ConnPoolConfTO;
++import org.apache.wicket.ajax.AjaxRequestTarget;
++import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
++import org.apache.wicket.markup.html.form.DropDownChoice;
++import org.apache.wicket.markup.html.panel.Panel;
++import org.apache.wicket.model.IModel;
++import org.apache.wicket.model.PropertyModel;
++import org.slf4j.Logger;
++import org.slf4j.LoggerFactory;
++
++/**
++ * Modal window with Connector form.
++ */
++public class ConnectorDetailsPanel extends Panel {
++
++ private static final long serialVersionUID = -2025535531121434050L;
++
++ /**
++ * Logger.
++ */
++ private static final Logger LOG = LoggerFactory.getLogger(ConnectorDetailsPanel.class);
++
++ public ConnectorDetailsPanel(
++ final String id, final IModel<ConnInstanceTO> model, final List<ConnBundleTO> bundles) {
++
++ super(id, model);
++ setOutputMarkupId(true);
++
++ final AjaxTextFieldPanel displayName = new AjaxTextFieldPanel(
++ "displayName", "displayName", new PropertyModel<String>(model.getObject(), "displayName"), false);
++ displayName.setOutputMarkupId(true);
++ displayName.addRequiredLabel();
++ add(displayName);
++
++ final AjaxTextFieldPanel location = new AjaxTextFieldPanel(
++ "location",
++ "location",
++ new PropertyModel<String>(model.getObject(), "location"),
++ false);
++ location.setRequired(true);
++ location.addRequiredLabel();
++ location.setOutputMarkupId(true);
++ location.setEnabled(false);
++ add(location);
++
++ final AjaxDropDownChoicePanel<String> bundleName = new AjaxDropDownChoicePanel<>(
++ "connectorName",
++ "connectorName",
++ new PropertyModel<String>(model.getObject(), "bundleName"), false);
++
++ ((DropDownChoice<String>) bundleName.getField()).setNullValid(true);
++ bundleName.setChoices(CollectionUtils.collect(bundles, new Transformer<ConnBundleTO, String>() {
++
++ @Override
++ public String transform(final ConnBundleTO input) {
++ return input.getBundleName();
++ }
++ }, new ArrayList<String>()));
++
++ bundleName.setRequired(true);
++ bundleName.addRequiredLabel();
++ bundleName.setOutputMarkupId(true);
++ bundleName.setEnabled(model.getObject().getKey() == 0);
++ bundleName.getField().setOutputMarkupId(true);
++ add(bundleName);
++
++ final AjaxDropDownChoicePanel<String> version = new AjaxDropDownChoicePanel<>(
++ "version",
++ "version",
++ new PropertyModel<String>(model.getObject(), "version"), false);
++
++ version.setChoices(getVersions(model.getObject(), bundles));
++
++ version.setRequired(true);
++ version.addRequiredLabel();
++ version.setEnabled(model.getObject().getBundleName() != null);
++ version.setOutputMarkupId(true);
++ version.addRequiredLabel();
++ version.getField().setOutputMarkupId(true);
++ add(version);
++
++ bundleName.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
++
++ private static final long serialVersionUID = -1107858522700306810L;
++
++ @Override
++ protected void onUpdate(final AjaxRequestTarget target) {
++ ((DropDownChoice<String>) bundleName.getField()).setNullValid(false);
++ version.setChoices(getVersions(model.getObject(), bundles));
++ version.setEnabled(true);
++ target.add(version);
++ }
++ });
++
++ if (model.getObject().getPoolConf() == null) {
++ model.getObject().setPoolConf(new ConnPoolConfTO());
++ }
++
++ add(new SpinnerFieldPanel<>(
++ "connRequestTimeout",
++ "connRequestTimeout",
++ Integer.class,
++ new PropertyModel<Integer>(model, "connRequestTimeout"),
++ 0,
++ Integer.MAX_VALUE));
++
++ add(new SpinnerFieldPanel<>(
++ "poolMaxObjects",
++ "poolMaxObjects",
++ Integer.class,
++ new PropertyModel<Integer>(model.getObject().getPoolConf(), "maxObjects"),
++ 0,
++ Integer.MAX_VALUE));
++
++ add(new SpinnerFieldPanel<>(
++ "poolMinIdle",
++ "poolMinIdle",
++ Integer.class,
++ new PropertyModel<Integer>(model.getObject().getPoolConf(), "minIdle"),
++ 0,
++ Integer.MAX_VALUE));
++
++ add(new SpinnerFieldPanel<>(
++ "poolMaxIdle",
++ "poolMaxIdle",
++ Integer.class,
++ new PropertyModel<Integer>(model.getObject().getPoolConf(), "maxIdle"),
++ 0,
++ Integer.MAX_VALUE));
++
++ add(new SpinnerFieldPanel<>(
++ "poolMaxWait",
++ "poolMaxWait",
++ Long.class,
++ new PropertyModel<Long>(model.getObject().getPoolConf(), "maxWait"),
++ 0L,
++ Long.MAX_VALUE));
++
++ add(new SpinnerFieldPanel<>(
++ "poolMinEvictableIdleTime",
++ "poolMinEvictableIdleTime",
++ Long.class,
++ new PropertyModel<Long>(model.getObject().getPoolConf(), "minEvictableIdleTimeMillis"),
++ 0L,
++ Long.MAX_VALUE));
++ }
++
++ private List<String> getVersions(final ConnInstanceTO connInstanceTO, final List<ConnBundleTO> bundles) {
++ return new ArrayList<>(CollectionUtils.collect(
++ CollectionUtils.select(bundles, new Predicate<ConnBundleTO>() {
++
++ @Override
++ public boolean evaluate(final ConnBundleTO object) {
++ return object.getLocation().equals(connInstanceTO.getLocation())
++ && object.getBundleName().equals(connInstanceTO.getBundleName());
++ }
++ }), new Transformer<ConnBundleTO, String>() {
++
++ @Override
++ public String transform(final ConnBundleTO input) {
++ return input.getVersion();
++ }
++ }, new HashSet<String>()));
++ }
++}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorModal.java
----------------------------------------------------------------------
diff --cc client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorModal.java
index 8a1ecdb,4f5e8eb..6989135
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorModal.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorModal.java
@@@ -18,51 -18,52 +18,28 @@@
*/
package org.apache.syncope.client.console.panels;
++import static org.apache.syncope.client.console.panels.AbstractModalPanel.LOG;
++
+import java.io.Serializable;
import java.util.ArrayList;
--import java.util.Arrays;
--import java.util.Collections;
--import java.util.EnumSet;
--import java.util.HashMap;
import java.util.List;
--import java.util.Map;
--import org.apache.commons.lang3.StringUtils;
++import org.apache.commons.collections4.CollectionUtils;
++import org.apache.commons.collections4.Predicate;
import org.apache.syncope.client.console.commons.Constants;
--import org.apache.syncope.client.console.pages.BasePage;
++import org.apache.syncope.client.console.pages.AbstractBasePage;
import org.apache.syncope.client.console.topology.Topology;
import org.apache.syncope.client.console.topology.TopologyNode;
-import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
-import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
-import org.apache.syncope.client.console.wicket.markup.html.form.CheckBoxMultipleChoiceFieldPanel;
-import org.apache.syncope.client.console.wicket.markup.html.form.SpinnerFieldPanel;
-import org.apache.syncope.client.console.wicket.markup.html.list.ConnConfPropertyListView;
-import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
- import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
- import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
- import org.apache.syncope.client.console.wicket.markup.html.form.CheckBoxMultipleChoiceFieldPanel;
- import org.apache.syncope.client.console.wicket.markup.html.form.SpinnerFieldPanel;
- import org.apache.syncope.client.console.wicket.markup.html.list.ConnConfPropertyListView;
- import org.apache.syncope.common.lib.SyncopeClientException;
import org.apache.syncope.common.lib.to.ConnBundleTO;
import org.apache.syncope.common.lib.to.ConnInstanceTO;
--import org.apache.syncope.common.lib.to.ConnPoolConfTO;
--import org.apache.syncope.common.lib.types.ConnConfPropSchema;
--import org.apache.syncope.common.lib.types.ConnConfProperty;
--import org.apache.syncope.common.lib.types.ConnectorCapability;
-import org.apache.syncope.common.lib.types.Entitlement;
import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
--import org.apache.wicket.ajax.form.AjaxFormChoiceComponentUpdatingBehavior;
--import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
--import org.apache.wicket.ajax.markup.html.form.AjaxButton;
-import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
import org.apache.wicket.event.Broadcast;
--import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
-import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
--import org.apache.wicket.markup.html.WebMarkupContainer;
--import org.apache.wicket.markup.html.basic.Label;
--import org.apache.wicket.markup.html.form.DropDownChoice;
++import org.apache.wicket.extensions.markup.html.tabs.AbstractTab;
import org.apache.wicket.markup.html.form.Form;
--import org.apache.wicket.markup.html.list.ListView;
--import org.apache.wicket.model.CompoundPropertyModel;
++import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.IModel;
--import org.apache.wicket.model.LoadableDetachableModel;
--import org.apache.wicket.model.Model;
--import org.apache.wicket.model.PropertyModel;
import org.apache.wicket.model.ResourceModel;
--import org.apache.wicket.validation.validator.RangeValidator;
/**
* Modal window with Connector form.
@@@ -71,391 -72,414 +48,140 @@@ public class ConnectorModal extends Abs
private static final long serialVersionUID = -2025535531121434050L;
-- private final Map<String, Map<String, Map<String, ConnBundleTO>>> mapConnBundleTOs;
--
-- private final List<ConnectorCapability> selectedCapabilities;
--
-- private ConnBundleTO bundleTO;
--
-- private List<ConnConfProperty> properties;
--
-- private final WebMarkupContainer propertiesContainer;
-
- private final ListView<ConnConfProperty> connPropView;
-
- private final ConnInstanceTO connInstanceTO;
++ private final List<ConnBundleTO> bundles;
public ConnectorModal(
- final BaseModal<Serializable> modal, final PageReference pageRef, final ConnInstanceTO connInstanceTO) {
- final ModalWindow window, final PageReference pageRef, final ConnInstanceTO connInstanceTO) {
-
- super(window, pageRef);
-
- this.add(new Label("new", connInstanceTO.getKey() == 0
- ? new ResourceModel("new")
- : new Model<>(StringUtils.EMPTY)));
- this.add(new Label("key", connInstanceTO.getKey() == 0
- ? StringUtils.EMPTY
- : connInstanceTO.getKey()));
-
- // general data setup
- selectedCapabilities = new ArrayList<>(connInstanceTO.getKey() == 0
- ? EnumSet.noneOf(ConnectorCapability.class)
- : connInstanceTO.getCapabilities());
-
- mapConnBundleTOs = new HashMap<>();
- for (ConnBundleTO connBundleTO : connectorRestClient.getAllBundles()) {
- // by location
- if (!mapConnBundleTOs.containsKey(connBundleTO.getLocation())) {
- mapConnBundleTOs.put(connBundleTO.getLocation(), new HashMap<String, Map<String, ConnBundleTO>>());
- }
- final Map<String, Map<String, ConnBundleTO>> byLocation = mapConnBundleTOs.get(connBundleTO.getLocation());
-
- // by name
- if (!byLocation.containsKey(connBundleTO.getBundleName())) {
- byLocation.put(connBundleTO.getBundleName(), new HashMap<String, ConnBundleTO>());
- }
- final Map<String, ConnBundleTO> byName = byLocation.get(connBundleTO.getBundleName());
-
- // by version
- if (!byName.containsKey(connBundleTO.getVersion())) {
- byName.put(connBundleTO.getVersion(), connBundleTO);
- }
- }
-
- bundleTO = getSelectedBundleTO(connInstanceTO);
- properties = fillProperties(bundleTO, connInstanceTO);
-
- // form - first tab
- final Form<ConnInstanceTO> connectorForm = new Form<>(FORM);
- connectorForm.setModel(new CompoundPropertyModel<>(connInstanceTO));
- connectorForm.setOutputMarkupId(true);
- add(connectorForm);
-
- propertiesContainer = new WebMarkupContainer("container");
- propertiesContainer.setOutputMarkupId(true);
- connectorForm.add(propertiesContainer);
-
- final Form<ConnInstanceTO> connectorPropForm = new Form<>("connectorPropForm");
- connectorPropForm.setModel(new CompoundPropertyModel<>(connInstanceTO));
- connectorPropForm.setOutputMarkupId(true);
- propertiesContainer.add(connectorPropForm);
-
- final AjaxTextFieldPanel displayName = new AjaxTextFieldPanel(
- "displayName", "display name", new PropertyModel<String>(connInstanceTO, "displayName"));
- displayName.setOutputMarkupId(true);
- displayName.addRequiredLabel();
- connectorForm.add(displayName);
++ final BaseModal<Serializable> modal,
++ final PageReference pageRef,
++ final IModel<ConnInstanceTO> model) {
- final AjaxDropDownChoicePanel<String> location = new AjaxDropDownChoicePanel<>("location", "location",
- new Model<>(bundleTO == null ? connInstanceTO.getLocation() : bundleTO.getLocation()));
- ((DropDownChoice<String>) location.getField()).setNullValid(true);
- location.setStyleSheet("long_dynamicsize");
- location.setChoices(new ArrayList<>(mapConnBundleTOs.keySet()));
- location.setRequired(true);
- location.addRequiredLabel();
- location.setOutputMarkupId(true);
- location.setEnabled(connInstanceTO.getKey() == 0 && StringUtils.isBlank(connInstanceTO.getLocation()));
- location.getField().setOutputMarkupId(true);
- connectorForm.add(location);
+ super(modal, pageRef);
- this.connInstanceTO = connInstanceTO;
-
- this.add(new Label("new", connInstanceTO.getKey() == 0
- ? new ResourceModel("new")
- : new Model<>(StringUtils.EMPTY)));
- this.add(new Label("key", connInstanceTO.getKey() == 0
- ? StringUtils.EMPTY
- : connInstanceTO.getKey()));
-
- // general data setup
- selectedCapabilities = new ArrayList<>(connInstanceTO.getKey() == 0
- ? EnumSet.noneOf(ConnectorCapability.class)
- : connInstanceTO.getCapabilities());
-
- mapConnBundleTOs = new HashMap<>();
- for (ConnBundleTO connBundleTO : connectorRestClient.getAllBundles()) {
- // by location
- if (!mapConnBundleTOs.containsKey(connBundleTO.getLocation())) {
- mapConnBundleTOs.put(connBundleTO.getLocation(), new HashMap<String, Map<String, ConnBundleTO>>());
- }
- final Map<String, Map<String, ConnBundleTO>> byLocation = mapConnBundleTOs.get(connBundleTO.getLocation());
-
- // by name
- if (!byLocation.containsKey(connBundleTO.getBundleName())) {
- byLocation.put(connBundleTO.getBundleName(), new HashMap<String, ConnBundleTO>());
- }
- final Map<String, ConnBundleTO> byName = byLocation.get(connBundleTO.getBundleName());
-
- // by version
- if (!byName.containsKey(connBundleTO.getVersion())) {
- byName.put(connBundleTO.getVersion(), connBundleTO);
- }
- }
-
- bundleTO = getSelectedBundleTO(connInstanceTO);
- properties = fillProperties(bundleTO, connInstanceTO);
-
- propertiesContainer = new WebMarkupContainer("container");
- propertiesContainer.setOutputMarkupId(true);
- add(propertiesContainer);
-
- final Form<ConnInstanceTO> connectorPropForm = new Form<>("connectorPropForm");
- connectorPropForm.setModel(new CompoundPropertyModel<>(connInstanceTO));
- connectorPropForm.setOutputMarkupId(true);
- propertiesContainer.add(connectorPropForm);
-
- final AjaxTextFieldPanel displayName = new AjaxTextFieldPanel(
- "displayName", "display name", new PropertyModel<String>(connInstanceTO, "displayName"));
- displayName.setOutputMarkupId(true);
- displayName.addRequiredLabel();
- add(displayName);
-
- final AjaxDropDownChoicePanel<String> location = new AjaxDropDownChoicePanel<>("location", "location",
- new Model<>(bundleTO == null ? connInstanceTO.getLocation() : bundleTO.getLocation()));
- ((DropDownChoice<String>) location.getField()).setNullValid(true);
- location.setStyleSheet("long_dynamicsize");
- location.setChoices(new ArrayList<>(mapConnBundleTOs.keySet()));
- location.setRequired(true);
- location.addRequiredLabel();
- location.setOutputMarkupId(true);
- location.setEnabled(connInstanceTO.getKey() == 0 && StringUtils.isBlank(connInstanceTO.getLocation()));
- location.getField().setOutputMarkupId(true);
- add(location);
- final AjaxDropDownChoicePanel<String> connectorName = new AjaxDropDownChoicePanel<>("connectorName",
- "connectorName",
- new Model<>(bundleTO == null ? null : bundleTO.getBundleName()));
- ((DropDownChoice<String>) connectorName.getField()).setNullValid(true);
- connectorName.setStyleSheet("long_dynamicsize");
- connectorName.setChoices(bundleTO == null
- ? StringUtils.isBlank(connInstanceTO.getLocation())
- ? new ArrayList<String>()
- : new ArrayList<>(mapConnBundleTOs.get(connInstanceTO.getLocation()).keySet())
- : new ArrayList<>(mapConnBundleTOs.get(bundleTO.getLocation()).keySet()));
- connectorName.setRequired(true);
- connectorName.addRequiredLabel();
- connectorName.setOutputMarkupId(true);
- connectorName.setEnabled(connInstanceTO.getKey() == 0);
- connectorName.getField().setOutputMarkupId(true);
- connectorForm.add(connectorName);
++ this.bundles = CollectionUtils.select(connectorRestClient.getAllBundles(),
++ new Predicate<ConnBundleTO>() {
- final AjaxDropDownChoicePanel<String> connectorName = new AjaxDropDownChoicePanel<>("connectorName",
- "connectorName",
- new Model<>(bundleTO == null ? null : bundleTO.getBundleName()));
- ((DropDownChoice<String>) connectorName.getField()).setNullValid(true);
- connectorName.setStyleSheet("long_dynamicsize");
- connectorName.setChoices(bundleTO == null
- ? StringUtils.isBlank(connInstanceTO.getLocation())
- ? new ArrayList<String>()
- : new ArrayList<>(mapConnBundleTOs.get(connInstanceTO.getLocation()).keySet())
- : new ArrayList<>(mapConnBundleTOs.get(bundleTO.getLocation()).keySet()));
- connectorName.setRequired(true);
- connectorName.addRequiredLabel();
- connectorName.setOutputMarkupId(true);
- connectorName.setEnabled(connInstanceTO.getKey() == 0);
- connectorName.getField().setOutputMarkupId(true);
- add(connectorName);
-
-- final AjaxDropDownChoicePanel<String> version = new AjaxDropDownChoicePanel<>("version", "version",
-- new Model<>(bundleTO == null ? null : bundleTO.getVersion()));
-- version.setStyleSheet("long_dynamicsize");
-- version.setChoices(bundleTO == null
-- ? new ArrayList<String>()
-- : new ArrayList<>(mapConnBundleTOs.get(connInstanceTO.getLocation()).
-- get(connInstanceTO.getBundleName()).keySet()));
-- version.setRequired(true);
-- version.addRequiredLabel();
-- version.setEnabled(connInstanceTO.getBundleName() != null);
-- version.setOutputMarkupId(true);
-- version.addRequiredLabel();
-- version.getField().setOutputMarkupId(true);
- add(version);
- connectorForm.add(version);
--
-- final SpinnerFieldPanel<Integer> connRequestTimeout = new SpinnerFieldPanel<>("connRequestTimeout",
-- "connRequestTimeout", Integer.class,
-- new PropertyModel<Integer>(connInstanceTO, "connRequestTimeout"), 0, null);
-- connRequestTimeout.getField().add(new RangeValidator<>(0, Integer.MAX_VALUE));
- add(connRequestTimeout);
- connectorForm.add(connRequestTimeout);
--
-- if (connInstanceTO.getPoolConf() == null) {
-- connInstanceTO.setPoolConf(new ConnPoolConfTO());
-- }
-- final SpinnerFieldPanel<Integer> poolMaxObjects = new SpinnerFieldPanel<>("poolMaxObjects", "poolMaxObjects",
-- Integer.class,
-- new PropertyModel<Integer>(connInstanceTO.getPoolConf(), "maxObjects"), 0, null);
-- poolMaxObjects.getField().add(new RangeValidator<>(0, Integer.MAX_VALUE));
- add(poolMaxObjects);
- connectorForm.add(poolMaxObjects);
-- final SpinnerFieldPanel<Integer> poolMinIdle = new SpinnerFieldPanel<>("poolMinIdle", "poolMinIdle",
-- Integer.class,
-- new PropertyModel<Integer>(connInstanceTO.getPoolConf(), "minIdle"), 0, null);
-- poolMinIdle.getField().add(new RangeValidator<>(0, Integer.MAX_VALUE));
- add(poolMinIdle);
- connectorForm.add(poolMinIdle);
-- final SpinnerFieldPanel<Integer> poolMaxIdle = new SpinnerFieldPanel<>("poolMaxIdle", "poolMaxIdle",
-- Integer.class,
-- new PropertyModel<Integer>(connInstanceTO.getPoolConf(), "maxIdle"), 0, null);
-- poolMaxIdle.getField().add(new RangeValidator<>(0, Integer.MAX_VALUE));
- add(poolMaxIdle);
- connectorForm.add(poolMaxIdle);
-- final SpinnerFieldPanel<Long> poolMaxWait = new SpinnerFieldPanel<>("poolMaxWait", "poolMaxWait", Long.class,
-- new PropertyModel<Long>(connInstanceTO.getPoolConf(), "maxWait"), 0L, null);
-- poolMaxWait.getField().add(new RangeValidator<>(0L, Long.MAX_VALUE));
- add(poolMaxWait);
- connectorForm.add(poolMaxWait);
-- final SpinnerFieldPanel<Long> poolMinEvictableIdleTime = new SpinnerFieldPanel<>("poolMinEvictableIdleTime",
-- "poolMinEvictableIdleTime", Long.class,
-- new PropertyModel<Long>(connInstanceTO.getPoolConf(), "minEvictableIdleTimeMillis"),
-- 0L, null);
-- poolMinEvictableIdleTime.getField().add(new RangeValidator<>(0L, Long.MAX_VALUE));
- add(poolMinEvictableIdleTime);
- connectorForm.add(poolMinEvictableIdleTime);
-
- // form - first tab - onchange()
- location.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
-
- private static final long serialVersionUID = -1107858522700306810L;
-
- @Override
- protected void onUpdate(final AjaxRequestTarget target) {
- ((DropDownChoice<String>) location.getField()).setNullValid(false);
- connInstanceTO.setLocation(location.getModelObject());
- target.add(location);
-
- connectorName.setChoices(new ArrayList<>(
- mapConnBundleTOs.get(location.getModelObject()).keySet()));
- connectorName.setEnabled(true);
- connectorName.getField().setModelValue(null);
- target.add(connectorName);
-
- version.setChoices(new ArrayList<String>());
- version.getField().setModelValue(null);
- version.setEnabled(false);
- target.add(version);
-
- properties.clear();
- target.add(propertiesContainer);
- }
- });
- connectorName.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
-
- private static final long serialVersionUID = -1107858522700306810L;
-
- @Override
- protected void onUpdate(final AjaxRequestTarget target) {
- ((DropDownChoice<String>) connectorName.getField()).setNullValid(false);
- connInstanceTO.setBundleName(connectorName.getModelObject());
- target.add(connectorName);
++ @Override
++ public boolean evaluate(final ConnBundleTO object) {
++ return object.getLocation().equals(model.getObject().getLocation());
++ }
++ }, new ArrayList<ConnBundleTO>());
- // form - first tab - onchange()
- location.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
- List<String> versions = new ArrayList<>(
- mapConnBundleTOs.get(location.getModelObject()).get(connectorName.getModelObject()).keySet());
- version.setChoices(versions);
- version.setEnabled(true);
- if (versions.size() == 1) {
- selectVersion(target, connInstanceTO, version, versions.get(0));
- version.getField().setModelObject(versions.get(0));
- } else {
- version.getField().setModelValue(null);
- properties.clear();
- target.add(propertiesContainer);
- }
- target.add(version);
- }
- });
- version.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
++ //--------------------------------
++ // Connector details panel
++ //--------------------------------
++ tabs.add(new AbstractTab(new ResourceModel("general", "general")) {
-- private static final long serialVersionUID = -1107858522700306810L;
++ private static final long serialVersionUID = -5861786415855103549L;
@Override
-- protected void onUpdate(final AjaxRequestTarget target) {
- ((DropDownChoice<String>) location.getField()).setNullValid(false);
- connInstanceTO.setLocation(location.getModelObject());
- target.add(location);
-
- connectorName.setChoices(new ArrayList<>(
- mapConnBundleTOs.get(location.getModelObject()).keySet()));
- connectorName.setEnabled(true);
- connectorName.getField().setModelValue(null);
- target.add(connectorName);
-
- version.setChoices(new ArrayList<String>());
- version.getField().setModelValue(null);
- version.setEnabled(false);
- target.add(version);
-
- properties.clear();
- target.add(propertiesContainer);
- selectVersion(target, connInstanceTO, version, version.getModelObject());
++ public Panel getPanel(final String panelId) {
++ return new ConnectorDetailsPanel(panelId, model, bundles);
}
});
- connectorName.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
-
- private static final long serialVersionUID = -1107858522700306810L;
++ //--------------------------------
- @Override
- protected void onUpdate(final AjaxRequestTarget target) {
- ((DropDownChoice<String>) connectorName.getField()).setNullValid(false);
- connInstanceTO.setBundleName(connectorName.getModelObject());
- target.add(connectorName);
- // form - second tab (properties)
- final ListView<ConnConfProperty> connPropView = new ConnConfPropertyListView("connectorProperties",
- new PropertyModel<List<ConnConfProperty>>(this, "properties"),
- true, connInstanceTO.getConfiguration());
- connPropView.setOutputMarkupId(true);
- connectorPropForm.add(connPropView);
-
- final AjaxButton check = new IndicatingAjaxButton("check", new ResourceModel("check")) {
++ //--------------------------------
++ // Connector configuration panel
++ //--------------------------------
++ tabs.add(new AbstractTab(new ResourceModel("configuration", "configuration")) {
- List<String> versions = new ArrayList<>(
- mapConnBundleTOs.get(location.getModelObject()).get(connectorName.getModelObject()).keySet());
- version.setChoices(versions);
- version.setEnabled(true);
- if (versions.size() == 1) {
- selectVersion(target, connInstanceTO, version, versions.get(0));
- version.getField().setModelObject(versions.get(0));
- } else {
- version.getField().setModelValue(null);
- properties.clear();
- target.add(propertiesContainer);
- }
- target.add(version);
- }
- });
- version.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
-
- private static final long serialVersionUID = -1107858522700306810L;
- private static final long serialVersionUID = -7978723352517770644L;
++ private static final long serialVersionUID = -5861786415855103549L;
@Override
- protected void onUpdate(final AjaxRequestTarget target) {
- selectVersion(target, connInstanceTO, version, version.getModelObject());
- }
- });
-
- // form - second tab (properties)
- connPropView = new ConnConfPropertyListView("connectorProperties",
- new PropertyModel<List<ConnConfProperty>>(this, "properties"),
- true, connInstanceTO.getConfiguration());
- connPropView.setOutputMarkupId(true);
- connectorPropForm.add(connPropView);
-
- final AjaxButton check = new IndicatingAjaxButton("check", new ResourceModel("check")) {
- public void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
- final ConnInstanceTO conn = (ConnInstanceTO) form.getModelObject();
++ public Panel getPanel(final String panelId) {
++ return new ConnectorConfPanel(panelId, model, bundles) {
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
- final ConnInstanceTO conn = (ConnInstanceTO) form.getModelObject();
-
-- // ensure that connector bundle information is in sync
-- conn.setBundleName(bundleTO.getBundleName());
-- conn.setVersion(bundleTO.getVersion());
-- conn.setConnectorName(bundleTO.getConnectorName());
--
-- if (connectorRestClient.check(conn)) {
-- info(getString("success_connection"));
-- } else {
-- error(getString("error_connection"));
-- }
--
- modal.getFeedbackPanel().refresh(target);
- feedbackPanel.refresh(target);
-- }
-- };
-- connectorPropForm.add(check);
--
-- // form - third tab (capabilities)
- final IModel<List<ConnectorCapability>> capabilities
- = new LoadableDetachableModel<List<ConnectorCapability>>() {
- final IModel<List<ConnectorCapability>> capabilities =
- new LoadableDetachableModel<List<ConnectorCapability>>() {
--
-- private static final long serialVersionUID = 5275935387613157437L;
++ private static final long serialVersionUID = 1L;
@Override
-- protected List<ConnectorCapability> load() {
-- return Arrays.asList(ConnectorCapability.values());
++ protected void check(final AjaxRequestTarget target) {
++ if (connectorRestClient.check(model.getObject())) {
++ info(getString("success_connection"));
++ } else {
++ error(getString("error_connection"));
++ }
++ modal.getFeedbackPanel().refresh(target);
}
-- };
- CheckBoxMultipleChoiceFieldPanel<ConnectorCapability> capabilitiesPalette
- = new CheckBoxMultipleChoiceFieldPanel<>(
- CheckBoxMultipleChoiceFieldPanel<ConnectorCapability> capabilitiesPalette =
- new CheckBoxMultipleChoiceFieldPanel<>(
-- "capabilitiesPalette",
-- new PropertyModel<List<ConnectorCapability>>(this, "selectedCapabilities"), capabilities);
--
-- capabilitiesPalette.add(new AjaxFormChoiceComponentUpdatingBehavior() {
-
- private static final long serialVersionUID = -1107858522700306810L;
- private static final long serialVersionUID = -1107858522700306810L;
-
-- @Override
-- protected void onUpdate(final AjaxRequestTarget target) {
++ };
}
});
++ //--------------------------------
- add(capabilitiesPalette);
- }
- connectorForm.add(capabilitiesPalette);
--
- private ConnBundleTO getSelectedBundleTO(final ConnInstanceTO connInstanceTO) {
- ConnBundleTO result = null;
- if (connInstanceTO != null
- && StringUtils.isNotBlank(connInstanceTO.getLocation())
- && StringUtils.isNotBlank(connInstanceTO.getBundleName())
- && StringUtils.isNotBlank(connInstanceTO.getVersion())
- && mapConnBundleTOs.containsKey(connInstanceTO.getLocation())) {
- // form - submit / cancel buttons
- final AjaxButton submit = new IndicatingAjaxButton(APPLY, new Model<>(getString(SUBMIT))) {
--
- Map<String, Map<String, ConnBundleTO>> byLocation = mapConnBundleTOs.get(connInstanceTO.getLocation());
- if (byLocation.containsKey(connInstanceTO.getBundleName())) {
- Map<String, ConnBundleTO> byName = byLocation.get(connInstanceTO.getBundleName());
- if (byName.containsKey(connInstanceTO.getVersion())) {
- result = byName.get(connInstanceTO.getVersion());
- }
- }
- }
- return result;
- }
- private static final long serialVersionUID = -958724007591692537L;
--
- private List<ConnConfProperty> fillProperties(final ConnBundleTO bundleTO, final ConnInstanceTO connInstanceTO) {
- final List<ConnConfProperty> props = new ArrayList<>();
- @Override
- protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
- final ConnInstanceTO conn = (ConnInstanceTO) form.getModelObject();
--
- if (bundleTO != null) {
- for (ConnConfPropSchema key : bundleTO.getProperties()) {
- final ConnConfProperty property = new ConnConfProperty();
- property.setSchema(key);
- if (connInstanceTO.getKey() != 0
- && connInstanceTO.getConfigurationMap().containsKey(key.getName())
- && connInstanceTO.getConfigurationMap().get(key.getName()).getValues() != null) {
- conn.setConnectorName(bundleTO.getConnectorName());
- conn.setBundleName(bundleTO.getBundleName());
- conn.setVersion(bundleTO.getVersion());
- conn.getConfiguration().clear();
- conn.getConfiguration().addAll(connPropView.getModelObject());
--
- property.getValues().addAll(connInstanceTO.getConfigurationMap().get(key.getName()).getValues());
- property.setOverridable(connInstanceTO.getConfigurationMap().get(key.getName()).isOverridable());
- // Set the model object's capabilities to capabilitiesPalette's converted Set
- conn.getCapabilities().clear();
- conn.getCapabilities().addAll(selectedCapabilities.isEmpty()
- ? EnumSet.noneOf(ConnectorCapability.class)
- : EnumSet.copyOf(selectedCapabilities));
-
- // Reset pool configuration if all fields are null
- if (conn.getPoolConf() != null
- && conn.getPoolConf().getMaxIdle() == null
- && conn.getPoolConf().getMaxObjects() == null
- && conn.getPoolConf().getMaxWait() == null
- && conn.getPoolConf().getMinEvictableIdleTimeMillis() == null
- && conn.getPoolConf().getMinIdle() == null) {
-
- conn.setPoolConf(null);
-- }
-
- try {
- if (connInstanceTO.getKey() == 0) {
- connectorRestClient.create(conn);
- send(pageRef.getPage(), Broadcast.BREADTH, new CreateEvent(
- conn.getKey(),
- conn.getDisplayName(),
- TopologyNode.Kind.CONNECTOR,
- conn.getLocation().startsWith(Topology.CONNECTOR_SERVER_LOCATION_PREFIX)
- ? conn.getLocation() : Topology.ROOT_NAME,
- target));
- } else {
- connectorRestClient.update(conn);
- }
++ //--------------------------------
++ // Connector configuration panel
++ //--------------------------------
++ tabs.add(new AbstractTab(new ResourceModel("capabilities", "capabilities")) {
- if (property.getValues().isEmpty() && !key.getDefaultValues().isEmpty()) {
- property.getValues().addAll(key.getDefaultValues());
- ((BasePage) pageRef.getPage()).setModalResult(true);
- window.close(target);
- } catch (SyncopeClientException e) {
- error(getString(Constants.ERROR) + ": " + e.getMessage());
- feedbackPanel.refresh(target);
- ((BasePage) pageRef.getPage()).setModalResult(false);
- LOG.error("While creating or updating connector {}", conn, e);
-- }
- }
++ private static final long serialVersionUID = -5861786415855103549L;
- props.add(property);
+ @Override
- protected void onError(final AjaxRequestTarget target, final Form<?> form) {
- feedbackPanel.refresh(target);
++ public Panel getPanel(final String panelId) {
++ return new ConnectorCapabilitiesPanel(panelId, model);
}
- }
-
- // re-order properties (implements Comparable)
- Collections.sort(props);
- return props;
- }
- };
- String entitlements = connInstanceTO.getKey() == 0
- ? Entitlement.CONNECTOR_CREATE : Entitlement.CONNECTOR_UPDATE;
--
- private void selectVersion(final AjaxRequestTarget target, final ConnInstanceTO connInstanceTO,
- final AjaxDropDownChoicePanel<String> version, final String versionValue) {
- MetaDataRoleAuthorizationStrategy.authorize(submit, ENABLE, entitlements);
- connectorForm.add(submit);
--
- connInstanceTO.setVersion(versionValue);
- target.add(version);
- final IndicatingAjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
--
- bundleTO = getSelectedBundleTO(connInstanceTO);
- properties = fillProperties(bundleTO, connInstanceTO);
- target.add(propertiesContainer);
- private static final long serialVersionUID = -958724007591692537L;
++ });
++ //--------------------------------
+ }
- public List<ConnConfProperty> getProperties() {
- return properties;
- @Override
- protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
- window.close(target);
- }
- };
- cancel.setDefaultFormProcessing(false);
- connectorForm.add(cancel);
++ @Override
++ public void onError(final AjaxRequestTarget target, final Form<?> form) {
++ modal.getFeedbackPanel().refresh(target);
}
- private ConnBundleTO getSelectedBundleTO(final ConnInstanceTO connInstanceTO) {
- ConnBundleTO result = null;
- if (connInstanceTO != null
- && StringUtils.isNotBlank(connInstanceTO.getLocation())
- && StringUtils.isNotBlank(connInstanceTO.getBundleName())
- && StringUtils.isNotBlank(connInstanceTO.getVersion())
- && mapConnBundleTOs.containsKey(connInstanceTO.getLocation())) {
+ @Override
+ public void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
- final ConnInstanceTO conn = (ConnInstanceTO) form.getModelObject();
++ final ConnInstanceTO connInstanceTO = (ConnInstanceTO) form.getModelObject();
- conn.setConnectorName(bundleTO.getConnectorName());
- conn.setBundleName(bundleTO.getBundleName());
- conn.setVersion(bundleTO.getVersion());
- conn.getConfiguration().clear();
- conn.getConfiguration().addAll(connPropView.getModelObject());
- Map<String, Map<String, ConnBundleTO>> byLocation = mapConnBundleTOs.get(connInstanceTO.getLocation());
- if (byLocation.containsKey(connInstanceTO.getBundleName())) {
- Map<String, ConnBundleTO> byName = byLocation.get(connInstanceTO.getBundleName());
- if (byName.containsKey(connInstanceTO.getVersion())) {
- result = byName.get(connInstanceTO.getVersion());
- }
- }
- }
- return result;
- }
++ final ConnBundleTO bundleTO = ConnectorModal.getBundle(connInstanceTO, bundles);
- // Set the model object's capabilities to capabilitiesPalette's converted Set
- conn.getCapabilities().clear();
- conn.getCapabilities().addAll(selectedCapabilities.isEmpty()
- ? EnumSet.noneOf(ConnectorCapability.class)
- : EnumSet.copyOf(selectedCapabilities));
- private List<ConnConfProperty> fillProperties(final ConnBundleTO bundleTO, final ConnInstanceTO connInstanceTO) {
- final List<ConnConfProperty> props = new ArrayList<>();
++ connInstanceTO.setConnectorName(bundleTO.getConnectorName());
++ connInstanceTO.setBundleName(bundleTO.getBundleName());
++ connInstanceTO.setVersion(bundleTO.getVersion());
- if (bundleTO != null) {
- for (ConnConfPropSchema key : bundleTO.getProperties()) {
- final ConnConfProperty property = new ConnConfProperty();
- property.setSchema(key);
- if (connInstanceTO.getKey() != 0
- && connInstanceTO.getConfigurationMap().containsKey(key.getName())
- && connInstanceTO.getConfigurationMap().get(key.getName()).getValues() != null) {
+ // Reset pool configuration if all fields are null
- if (conn.getPoolConf() != null
- && conn.getPoolConf().getMaxIdle() == null
- && conn.getPoolConf().getMaxObjects() == null
- && conn.getPoolConf().getMaxWait() == null
- && conn.getPoolConf().getMinEvictableIdleTimeMillis() == null
- && conn.getPoolConf().getMinIdle() == null) {
-
- conn.setPoolConf(null);
++ if (connInstanceTO.getPoolConf() != null
++ && connInstanceTO.getPoolConf().getMaxIdle() == null
++ && connInstanceTO.getPoolConf().getMaxObjects() == null
++ && connInstanceTO.getPoolConf().getMaxWait() == null
++ && connInstanceTO.getPoolConf().getMinEvictableIdleTimeMillis() == null
++ && connInstanceTO.getPoolConf().getMinIdle() == null) {
+
- property.getValues().addAll(connInstanceTO.getConfigurationMap().get(key.getName()).getValues());
- property.setOverridable(connInstanceTO.getConfigurationMap().get(key.getName()).isOverridable());
- }
++ connInstanceTO.setPoolConf(null);
+ }
- if (property.getValues().isEmpty() && !key.getDefaultValues().isEmpty()) {
- property.getValues().addAll(key.getDefaultValues());
- }
+ try {
+ if (connInstanceTO.getKey() == 0) {
- connectorRestClient.create(conn);
++ connectorRestClient.create(connInstanceTO);
+ send(pageRef.getPage(), Broadcast.BREADTH, new CreateEvent(
- conn.getKey(),
- conn.getDisplayName(),
++ connInstanceTO.getKey(),
++ connInstanceTO.getDisplayName(),
+ TopologyNode.Kind.CONNECTOR,
- conn.getLocation().startsWith(Topology.CONNECTOR_SERVER_LOCATION_PREFIX)
- ? conn.getLocation() : Topology.ROOT_NAME,
++ connInstanceTO.getLocation().startsWith(Topology.CONNECTOR_SERVER_LOCATION_PREFIX)
++ ? connInstanceTO.getLocation() : Topology.ROOT_NAME,
+ target));
+ } else {
- connectorRestClient.update(conn);
++ connectorRestClient.update(connInstanceTO);
+ }
- ((BasePage) pageRef.getPage()).setModalResult(true);
- props.add(property);
++ if (pageRef.getPage() instanceof AbstractBasePage) {
++ ((AbstractBasePage) pageRef.getPage()).setModalResult(true);
+ }
+ modal.close(target);
- } catch (SyncopeClientException e) {
++ } catch (Exception e) {
++ LOG.error("Failure managing resource {}", connInstanceTO, e);
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ modal.getFeedbackPanel().refresh(target);
- ((BasePage) pageRef.getPage()).setModalResult(false);
- LOG.error("While creating or updating connector {}", conn, e);
}
-
- // re-order properties (implements Comparable)
- Collections.sort(props);
- return props;
}
- @Override
- public void onError(final AjaxRequestTarget target, final Form<?> form) {
- modal.getFeedbackPanel().refresh(target);
- private void selectVersion(final AjaxRequestTarget target, final ConnInstanceTO connInstanceTO,
- final AjaxDropDownChoicePanel<String> version, final String versionValue) {
-
- connInstanceTO.setVersion(versionValue);
- target.add(version);
++ protected static ConnBundleTO getBundle(final ConnInstanceTO connInstanceTO, final List<ConnBundleTO> bundles) {
++ return CollectionUtils.find(bundles, new Predicate<ConnBundleTO>() {
+
- bundleTO = getSelectedBundleTO(connInstanceTO);
- properties = fillProperties(bundleTO, connInstanceTO);
- target.add(propertiesContainer);
- }
-
- public List<ConnConfProperty> getProperties() {
- return properties;
++ @Override
++ public boolean evaluate(final ConnBundleTO bundle) {
++ return bundle.getBundleName().equals(connInstanceTO.getBundleName())
++ && bundle.getVersion().equals(connInstanceTO.getVersion());
++ }
++ });
}
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/java/org/apache/syncope/client/console/panels/ListViewPanel.java
----------------------------------------------------------------------
diff --cc client/console/src/main/java/org/apache/syncope/client/console/panels/ListViewPanel.java
index 1cb987f,1cb987f..ca67bdb
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ListViewPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ListViewPanel.java
@@@ -18,12 -18,12 +18,13 @@@
*/
package org.apache.syncope.client.console.panels;
++import java.beans.IntrospectionException;
import java.beans.PropertyDescriptor;
import java.io.Serializable;
import java.lang.reflect.Field;
++import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Arrays;
--import java.util.Collections;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.apache.syncope.client.console.commons.Constants;
@@@ -107,10 -107,10 +108,10 @@@ public final class ListViewPanel<T exte
if (toBeIncluded.isEmpty()) {
LOG.warn("No field has been retrieved from {}", reference.getName());
-- listOfItems = Collections.<T>emptyList();
++ listOfItems = new ArrayList<>();
} else if (list == null || list.isEmpty()) {
LOG.info("No item to be shown");
-- listOfItems = Collections.<T>emptyList();
++ listOfItems = new ArrayList<>();
} else {
listOfItems = list;
if (LOG.isDebugEnabled()) {
@@@ -157,7 -157,7 +158,8 @@@
? new Label("field", StringUtils.EMPTY)
: new Label("field", new ResourceModel(value.toString(), value.toString())));
-- } catch (Exception e) {
++ } catch (IntrospectionException | IllegalAccessException | IllegalArgumentException
++ | InvocationTargetException e) {
LOG.error("Error retrieving value for field {}", fieldItem.getModelObject(), e);
fieldItem.add(new Label("field", StringUtils.EMPTY));
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java
----------------------------------------------------------------------
diff --cc client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java
index 0101895,1b536c4..cdce531
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java
@@@ -19,100 -19,100 +19,47 @@@
package org.apache.syncope.client.console.panels;
import java.util.ArrayList;
--import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
--import org.apache.syncope.client.console.pages.BaseModalPage;
-import org.apache.syncope.client.console.panels.ModalContent.ModalEvent;
--import org.apache.syncope.client.console.panels.ResourceDetailsPanel.DetailsModEvent;
import org.apache.syncope.client.console.rest.ConnectorRestClient;
- import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal.ModalEvent;
--import org.apache.syncope.client.console.wicket.markup.html.form.MultiFieldPanel.MultiValueSelectorEvent;
--import org.apache.syncope.client.console.wicket.markup.html.list.ConnConfPropertyListView;
import org.apache.syncope.common.lib.to.ResourceTO;
import org.apache.syncope.common.lib.types.ConnConfProperty;
--import org.apache.wicket.ajax.AjaxRequestTarget;
--import org.apache.wicket.ajax.markup.html.form.AjaxButton;
--import org.apache.wicket.event.Broadcast;
--import org.apache.wicket.event.IEvent;
--import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
--import org.apache.wicket.markup.html.WebMarkupContainer;
--import org.apache.wicket.markup.html.form.Form;
--import org.apache.wicket.markup.html.list.ListView;
--import org.apache.wicket.markup.html.panel.Panel;
--import org.apache.wicket.model.PropertyModel;
--import org.apache.wicket.model.ResourceModel;
++import org.apache.wicket.model.IModel;
import org.apache.wicket.spring.injection.annot.SpringBean;
--public class ResourceConnConfPanel extends Panel {
++public abstract class ResourceConnConfPanel extends AbstractConnectorConfPanel<ResourceTO> {
private static final long serialVersionUID = -7982691107029848579L;
@SpringBean
private ConnectorRestClient restClient;
-- private final ResourceTO resourceTO;
--
private final boolean createFlag;
-- private List<ConnConfProperty> connConfProperties;
--
-- private final WebMarkupContainer connConfPropContainer;
--
-- private final AjaxButton check;
--
-- public ResourceConnConfPanel(final String id, final ResourceTO resourceTO, final boolean createFlag) {
-- super(id);
-- setOutputMarkupId(true);
++ public ResourceConnConfPanel(final String id, final IModel<ResourceTO> model, final boolean createFlag) {
++ super(id, model);
this.createFlag = createFlag;
-- this.resourceTO = resourceTO;
--
-- connConfProperties = getConnConfProperties();
--
-- connConfPropContainer = new WebMarkupContainer("connectorPropertiesContainer");
-- connConfPropContainer.setOutputMarkupId(true);
-- add(connConfPropContainer);
--
-- /*
-- * the list of overridable connector properties
-- */
-- final ListView<ConnConfProperty> connPropView = new ConnConfPropertyListView("connectorProperties",
-- new PropertyModel<List<ConnConfProperty>>(this, "connConfProperties"),
-- false, resourceTO.getConnConfProperties());
-- connPropView.setOutputMarkupId(true);
-- connConfPropContainer.add(connPropView);
--
-- check = new IndicatingAjaxButton("check", new ResourceModel("check")) {
-- private static final long serialVersionUID = -4199438518229098169L;
++ final List<ConnConfProperty> connConfProperties = getConnProperties(model.getObject());
++ model.getObject().getConnConfProperties().clear();
++ model.getObject().getConnConfProperties().addAll(connConfProperties);
-- @Override
-- public void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
-- final ResourceTO to = (ResourceTO) form.getModelObject();
--
-- if (restClient.check(to)) {
-- info(getString("success_connection"));
-- } else {
-- error(getString("error_connection"));
-- }
--
-- ((BaseModalPage) getPage()).getFeedbackPanel().refresh(target);
-- }
-- };
++ setConfPropertyListView("connConfProperties", false);
check.setEnabled(!connConfProperties.isEmpty());
check.setVisible(!connConfProperties.isEmpty());
--
-- connConfPropContainer.add(check);
}
/**
* Get overridable properties.
*
++ * @param resourceTO resource instance.
* @return overridable properties.
*/
-- private List<ConnConfProperty> getConnConfProperties() {
++ @Override
++ protected final List<ConnConfProperty> getConnProperties(final ResourceTO resourceTO) {
List<ConnConfProperty> props = new ArrayList<>();
Long connectorKey = resourceTO.getConnector();
if (connectorKey != null && connectorKey > 0) {
@@@ -137,53 -137,53 +84,6 @@@
}
}
-- // re-order properties
-- Collections.sort(props);
--
return props;
}
--
-- @Override
-- public void onEvent(final IEvent<?> event) {
-- AjaxRequestTarget target = null;
-- if (event.getPayload() instanceof DetailsModEvent) {
-- // connector change: update properties and forward event
-- target = ((ModalEvent) event.getPayload()).getTarget();
--
-- connConfProperties = getConnConfProperties();
-- check.setEnabled(!connConfProperties.isEmpty());
--
-- target.add(connConfPropContainer);
-- } else if (event.getPayload() instanceof MultiValueSelectorEvent) {
-- // multi value connector property change: forward event
-- target = ((MultiValueSelectorEvent) event.getPayload()).getTarget();
-- }
--
-- if (target != null) {
-- send(getPage(), Broadcast.BREADTH, new ConnConfModEvent(target, connConfProperties));
-- }
-- }
--
-- /**
-- * Connector configuration properties modification event.
-- */
-- public static class ConnConfModEvent extends ModalEvent {
--
-- private final List<ConnConfProperty> configuration;
--
-- /**
-- * Constructor.
-- *
-- * @param target request target.
-- * @param configuration connector configuration properties.
-- */
-- public ConnConfModEvent(final AjaxRequestTarget target, final List<ConnConfProperty> configuration) {
-- super(target);
-- this.configuration = configuration;
-- }
--
-- public List<ConnConfProperty> getConfiguration() {
-- return configuration;
-- }
-- }
}
[22/28] syncope git commit: merge from master
Posted by fm...@apache.org.
merge from master
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/77fc5d26
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/77fc5d26
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/77fc5d26
Branch: refs/heads/master
Commit: 77fc5d26b01f4b56fad131e5c6190103a161e77c
Parents: ee7ca34 714557e
Author: fmartelli <fa...@gmail.com>
Authored: Fri Oct 30 11:21:36 2015 +0100
Committer: fmartelli <fa...@gmail.com>
Committed: Fri Oct 30 11:21:36 2015 +0100
----------------------------------------------------------------------
.travis.yml | 2 -
.../org/apache/syncope/client/cli/Input.java | 6 +
.../apache/syncope/client/cli/SyncopeAdm.java | 7 +-
.../cli/commands/CommonsResultManager.java | 15 +-
.../AbstractConfigurationCommand.java | 6 +-
.../configuration/ConfigurationCommand.java | 2 +-
.../configuration/ConfigurationDelete.java | 7 +-
.../configuration/ConfigurationExport.java | 14 +-
.../configuration/ConfigurationGet.java | 21 +-
.../configuration/ConfigurationRead.java | 5 +-
.../ConfigurationSyncopeOperations.java | 50 ++
.../configuration/ConfigurationUpdate.java | 11 +-
.../connector/AbstractConnectorCommand.java | 5 +-
.../commands/connector/ConnectorCommand.java | 4 +-
.../cli/commands/connector/ConnectorDelete.java | 9 +-
.../cli/commands/connector/ConnectorList.java | 21 +-
.../connector/ConnectorListBundles.java | 21 +-
.../ConnectorListConfigurationProperties.java | 12 +-
.../cli/commands/connector/ConnectorRead.java | 13 +-
.../connector/ConnectorReadByResource.java | 11 +-
.../connector/ConnectorResultManager.java | 42 +-
.../connector/ConnectorSyncopeOperations.java | 50 ++
.../commands/domain/AbstractDomainCommand.java | 5 +-
.../cli/commands/domain/DomainCommand.java | 4 +-
.../cli/commands/domain/DomainDelete.java | 7 +-
.../client/cli/commands/domain/DomainList.java | 22 +-
.../client/cli/commands/domain/DomainRead.java | 8 +-
.../commands/domain/DomainResultManager.java | 12 +
.../domain/DomainSyncopeOperations.java | 41 +
.../entitlement/AbstractEntitlementCommand.java | 27 +
.../entitlement/EntitlementCommand.java | 120 +++
.../commands/entitlement/EntitlementList.java | 40 +
.../entitlement/EntitlementListRole.java | 61 ++
.../entitlement/EntitlementReadByUserId.java | 53 ++
.../entitlement/EntitlementReadByUsername.java | 53 ++
.../entitlement/EntitlementResultManager.java | 53 ++
.../entitlement/EntitlementSearchByRole.java | 53 ++
.../EntitlementSyncopeOperations.java | 74 ++
.../syncope/client/cli/commands/help/Help.java | 6 +-
.../cli/commands/help/HelpResultManager.java | 3 +
.../syncope/client/cli/commands/info/Info.java | 133 ++-
.../cli/commands/info/InfoResultManager.java | 126 +++
.../cli/commands/install/InstallCommand.java | 13 +-
.../commands/install/InstallResultManager.java | 10 +
.../cli/commands/install/InstallSetup.java | 23 +-
.../commands/logger/AbstractLoggerCommand.java | 7 +-
.../cli/commands/logger/LoggerCommand.java | 3 +-
.../cli/commands/logger/LoggerCreate.java | 4 +-
.../cli/commands/logger/LoggerDelete.java | 6 +-
.../client/cli/commands/logger/LoggerList.java | 21 +-
.../client/cli/commands/logger/LoggerRead.java | 5 +-
.../commands/logger/LoggerResultManager.java | 1 -
.../logger/LoggerSyncopeOperations.java | 46 +
.../cli/commands/logger/LoggerUpdate.java | 11 +-
.../cli/commands/logger/LoggerUpdateAll.java | 8 +-
.../AbstractNotificationCommand.java | 5 +-
.../notification/NotificationCommand.java | 3 +-
.../notification/NotificationDelete.java | 5 +-
.../commands/notification/NotificationList.java | 23 +-
.../commands/notification/NotificationRead.java | 4 +-
.../NotificationSyncopeOperations.java | 41 +
.../commands/policy/AbstractPolicyCommand.java | 7 +-
.../cli/commands/policy/PolicyCommand.java | 1 -
.../cli/commands/policy/PolicyDelete.java | 8 +-
.../client/cli/commands/policy/PolicyList.java | 4 +-
.../client/cli/commands/policy/PolicyRead.java | 6 +-
.../policy/PolicySyncopeOperations.java | 42 +
.../question/AbstractQuestionCommand.java | 27 +
.../cli/commands/question/QuestionCommand.java | 107 +++
.../cli/commands/question/QuestionDelete.java | 56 ++
.../cli/commands/question/QuestionList.java | 45 +
.../cli/commands/question/QuestionRead.java | 60 ++
.../question/QuestionResultManager.java | 38 +
.../question/QuestionSyncopeOperations.java | 45 +
.../commands/realm/AbstractRealmCommand.java | 27 +
.../client/cli/commands/realm/RealmCommand.java | 95 +++
.../client/cli/commands/realm/RealmList.java | 45 +
.../cli/commands/realm/RealmResultManager.java | 39 +
.../commands/realm/RealmSyncopeOperations.java | 43 +
.../commands/report/AbstractReportCommand.java | 5 +-
.../cli/commands/report/ReportCommand.java | 5 +-
.../cli/commands/report/ReportDelete.java | 9 +-
.../commands/report/ReportDeleteExecution.java | 11 +-
.../cli/commands/report/ReportExecute.java | 13 +-
.../commands/report/ReportExportExecution.java | 28 +-
.../client/cli/commands/report/ReportList.java | 22 +-
.../cli/commands/report/ReportListJobs.java | 23 +-
.../client/cli/commands/report/ReportRead.java | 6 +-
.../commands/report/ReportReadExecution.java | 8 +-
.../report/ReportSyncopeOperations.java | 65 ++
.../resource/AbstractResourceCommand.java | 7 +-
.../cli/commands/resource/ResourceCommand.java | 3 +-
.../cli/commands/resource/ResourceDelete.java | 7 +-
.../cli/commands/resource/ResourceList.java | 21 +-
.../cli/commands/resource/ResourceRead.java | 7 +-
.../resource/ResourceResultManager.java | 7 +-
.../resource/ResourceSyncopeOperations.java | 51 ++
.../cli/commands/role/AbstractRoleCommand.java | 27 +
.../client/cli/commands/role/RoleCommand.java | 108 +++
.../client/cli/commands/role/RoleDelete.java | 57 ++
.../client/cli/commands/role/RoleList.java | 45 +
.../client/cli/commands/role/RoleRead.java | 60 ++
.../cli/commands/role/RoleResultManager.java | 57 ++
.../commands/role/RoleSyncopeOperations.java | 41 +
.../commands/schema/AbstractSchemaCommand.java | 7 +-
.../cli/commands/schema/SchemaCommand.java | 8 +-
.../cli/commands/schema/SchemaDelete.java | 7 +-
.../client/cli/commands/schema/SchemaList.java | 4 +-
.../cli/commands/schema/SchemaListAll.java | 54 +-
.../cli/commands/schema/SchemaListDerived.java | 28 +-
.../cli/commands/schema/SchemaListPlain.java | 28 +-
.../cli/commands/schema/SchemaListVirtual.java | 28 +-
.../client/cli/commands/schema/SchemaRead.java | 5 +-
.../schema/SchemaSyncopeOperations.java | 54 ++
.../commands/self/AbstractWorkflowCommand.java | 27 +
.../cli/commands/self/WorkflowCommand.java | 103 +++
.../commands/self/WorkflowExportDefinition.java | 56 ++
.../commands/self/WorkflowExportDiagram.java | 68 ++
.../commands/self/WorkflowResultManager.java | 38 +
.../self/WorkflowSyncopeOperations.java | 40 +
.../cli/commands/task/AbstractTaskCommand.java | 5 +-
.../client/cli/commands/task/TaskCommand.java | 5 +-
.../client/cli/commands/task/TaskDelete.java | 6 +-
.../client/cli/commands/task/TaskExecute.java | 9 +-
.../cli/commands/task/TaskExecutionDelete.java | 6 +-
.../cli/commands/task/TaskExecutionRead.java | 5 +-
.../client/cli/commands/task/TaskList.java | 4 +-
.../cli/commands/task/TaskListRunningJobs.java | 46 +
.../commands/task/TaskListScheduledJobs.java | 45 +
.../client/cli/commands/task/TaskRead.java | 5 +-
.../cli/commands/task/TaskResultManager.java | 2 +-
.../cli/commands/task/TaskRunningJobs.java | 34 -
.../cli/commands/task/TaskScheduledJobs.java | 34 -
.../commands/task/TaskSyncopeOperations.java | 66 ++
.../cli/commands/user/AbstractUserCommand.java | 27 +
.../client/cli/commands/user/UserCommand.java | 143 ++++
.../client/cli/commands/user/UserCount.java | 45 +
.../client/cli/commands/user/UserDelete.java | 55 ++
.../client/cli/commands/user/UserGetKey.java | 45 +
.../cli/commands/user/UserGetUsername.java | 45 +
.../client/cli/commands/user/UserList.java | 61 ++
.../client/cli/commands/user/UserRead.java | 60 ++
.../cli/commands/user/UserResultManager.java | 107 +++
.../commands/user/UserSearchByAttribute.java | 70 ++
.../cli/commands/user/UserSearchByResource.java | 69 ++
.../cli/commands/user/UserSearchByRole.java | 63 ++
.../commands/user/UserSyncopeOperations.java | 78 ++
.../syncope/client/cli/util/CommandUtils.java | 1 -
.../client/cli/util/FileSystemUtils.java | 9 +-
.../syncope/client/cli/util/JasyptUtils.java | 1 -
.../syncope/client/cli/view/Messages.java | 7 +-
.../console/pages/ProvisioningModalPage.java | 15 +-
.../syncope/client/console/pages/Realms.java | 2 -
.../syncope/client/console/panels/Realm.java | 2 -
.../client/console/panels/RealmModalPanel.java | 2 -
.../console/panels/ResourceConnConfPanel.java | 12 +-
.../console/panels/ResourceMappingPanel.java | 20 +-
.../console/rest/ConnectorRestClient.java | 59 +-
.../client/console/rest/LoggerRestClient.java | 4 +-
.../client/console/rest/ResourceRestClient.java | 12 +-
client/enduser/pom.xml | 194 +++++
.../enduser/SyncopeEnduserApplication.java | 157 ++++
.../client/enduser/SyncopeEnduserSession.java | 279 +++++++
.../client/enduser/adapters/UserTOAdapter.java | 78 ++
.../client/enduser/model/Credentials.java | 65 ++
.../client/enduser/model/SchemaResponse.java | 79 ++
.../client/enduser/model/UserTORequest.java | 174 ++++
.../syncope/client/enduser/pages/HomePage.java | 35 +
.../enduser/resources/AbstractBaseResource.java | 58 ++
.../client/enduser/resources/ErrorResource.java | 50 ++
.../client/enduser/resources/LoginResource.java | 84 ++
.../enduser/resources/LogoutResource.java | 43 +
.../enduser/resources/SchemaResource.java | 116 +++
.../resources/SecurityQuestionResource.java | 73 ++
.../resources/UserSelfCreateResource.java | 97 +++
.../enduser/resources/UserSelfReadResource.java | 66 ++
.../resources/UserSelfUpdateResource.java | 96 +++
.../META-INF/resources/app/css/app.css | 28 +
.../META-INF/resources/app/css/editUser.css | 253 ++++++
.../META-INF/resources/app/css/login.css | 103 +++
.../META-INF/resources/app/img/ajax-loader.gif | Bin 0 -> 1924 bytes
.../META-INF/resources/app/img/busy.gif | Bin 0 -> 2834 bytes
.../META-INF/resources/app/img/favicon.png | Bin 0 -> 641 bytes
.../META-INF/resources/app/img/logo-green.png | Bin 0 -> 12178 bytes
.../META-INF/resources/app/img/logo.png | Bin 0 -> 8913 bytes
.../resources/META-INF/resources/app/index.html | 116 +++
.../resources/META-INF/resources/app/js/app.js | 283 +++++++
.../app/js/controllers/HomeController.js | 39 +
.../app/js/controllers/LanguageController.js | 66 ++
.../app/js/controllers/LoginController.js | 93 +++
.../app/js/controllers/UserController.js | 206 +++++
.../app/js/directives/dynamicAttribute.js | 190 +++++
.../js/directives/dynamicDerivedAttributes.js | 52 ++
.../app/js/directives/dynamicPlainAttributes.js | 45 +
.../js/directives/dynamicVirtualAttributes.js | 52 ++
.../resources/app/js/directives/equals.js | 49 ++
.../resources/app/js/directives/loader.js | 32 +
.../app/js/directives/navigationButtons.js | 31 +
.../js/directives/passwordStrengthEstimator.js | 102 +++
.../resources/app/js/filters/propsFilter.js | 52 ++
.../resources/app/js/services/authService.js | 74 ++
.../resources/app/js/services/realmService.js | 47 ++
.../resources/app/js/services/schemaService.js | 42 +
.../app/js/services/securityQuestionService.js | 41 +
.../app/js/services/userSelfService.js | 69 ++
.../resources/app/views/dynamicAttribute.html | 58 ++
.../app/views/dynamicDerivedAttributes.html | 21 +
.../app/views/dynamicPlainAttributes.html | 22 +
.../app/views/dynamicVirtualAttributes.html | 18 +
.../META-INF/resources/app/views/editUser.html | 73 ++
.../resources/app/views/generic-error.html | 24 +
.../META-INF/resources/app/views/home.html | 34 +
.../resources/app/views/navigationButtons.html | 8 +
.../META-INF/resources/app/views/self.html | 131 +++
.../resources/app/views/user-credentials.html | 60 ++
.../app/views/user-derived-schemas.html | 37 +
.../resources/app/views/user-groups.html | 37 +
.../resources/app/views/user-plain-schemas.html | 37 +
.../resources/app/views/user-resources.html | 28 +
.../app/views/user-virtual-schemas.html | 37 +
.../main/resources/META-INF/web-fragment.xml | 72 ++
.../src/main/resources/enduser.properties | 30 +
.../syncope/client/enduser/pages/HomePage.html | 22 +
.../enduser/SyncopeEnduserApplicationTest.java | 69 ++
.../syncope/client/lib/SyncopeClient.java | 13 +
client/pom.xml | 1 +
.../syncope/common/lib/patch/PasswordPatch.java | 2 +-
.../lib/patch/ResourceDeassociationPatch.java | 80 ++
.../org/apache/syncope/common/lib/to/AnyTO.java | 9 -
.../common/lib/to/ConnIdObjectClassTO.java | 78 ++
.../syncope/common/lib/to/ConnInstanceTO.java | 38 +-
.../common/lib/to/PropagationStatus.java | 50 --
.../common/lib/to/PropagationTaskTO.java | 10 +-
.../common/lib/to/ProvisioningResult.java | 55 ++
.../syncope/common/lib/to/ResourceTO.java | 47 +-
.../syncope/common/lib/types/Entitlement.java | 14 +-
.../lib/types/PropagationTaskExecStatus.java | 3 +-
.../common/lib/wrap/AbstractWrappable.java | 46 -
.../apache/syncope/common/lib/wrap/AnyKey.java | 30 -
.../common/lib/wrap/ConnIdObjectClass.java | 30 -
.../syncope/common/lib/wrap/package-info.java | 23 -
.../common/rest/api/CollectionWrapper.java | 80 --
.../syncope/common/rest/api/LoggerWrapper.java | 56 ++
.../syncope/common/rest/api/RESTHeaders.java | 5 +
.../common/rest/api/service/AnyService.java | 8 +-
.../rest/api/service/ConnectorService.java | 43 +-
.../rest/api/service/ResourceService.java | 14 +-
.../rest/api/service/UserSelfService.java | 10 +-
.../common/rest/api/service/UserService.java | 4 +-
.../syncope/core/logic/AbstractAnyLogic.java | 44 +-
.../core/logic/AbstractResourceAssociator.java | 19 +-
.../syncope/core/logic/AnyObjectLogic.java | 69 +-
.../syncope/core/logic/AnyTypeClassLogic.java | 4 +-
.../apache/syncope/core/logic/AnyTypeLogic.java | 4 +-
.../syncope/core/logic/ConnectorLogic.java | 76 +-
.../apache/syncope/core/logic/GroupLogic.java | 68 +-
.../syncope/core/logic/ResourceLogic.java | 25 +-
.../apache/syncope/core/logic/SchemaLogic.java | 2 +-
.../apache/syncope/core/logic/UserLogic.java | 137 +--
.../notification/NotificationJobDelegate.java | 2 +-
.../core/logic/report/ReportJobDelegate.java | 2 +-
.../core/logic/report/StaticReportlet.java | 2 +-
.../core/logic/report/UserReportlet.java | 2 +-
.../syncope/core/misc/ConnObjectUtils.java | 259 ------
.../syncope/core/misc/ExceptionUtils2.java | 47 --
.../apache/syncope/core/misc/FormatUtils.java | 117 ---
.../apache/syncope/core/misc/MappingUtils.java | 800 ------------------
.../apache/syncope/core/misc/RealmUtils.java | 61 --
.../apache/syncope/core/misc/TemplateUtils.java | 223 -----
.../syncope/core/misc/jexl/JexlUtils.java | 2 +-
.../core/misc/security/AuthDataAccessor.java | 4 +-
.../misc/security/SyncopeGrantedAuthority.java | 2 +-
.../core/misc/utils/ConnObjectUtils.java | 259 ++++++
.../core/misc/utils/ExceptionUtils2.java | 47 ++
.../syncope/core/misc/utils/FormatUtils.java | 121 +++
.../syncope/core/misc/utils/MappingUtils.java | 831 +++++++++++++++++++
.../syncope/core/misc/utils/RealmUtils.java | 61 ++
.../syncope/core/misc/utils/TemplateUtils.java | 223 +++++
core/misc/src/main/resources/utilsContext.xml | 32 +
.../persistence/api/entity/ConnInstance.java | 41 +-
.../api/entity/resource/ExternalResource.java | 15 +-
.../api/entity/task/PropagationTask.java | 2 +
.../jpa/content/ContentLoaderHandler.java | 2 +-
.../jpa/content/XMLContentExporter.java | 2 +-
.../persistence/jpa/dao/JPAAnySearchDAO.java | 2 +-
.../core/persistence/jpa/dao/JPAGroupDAO.java | 2 +-
.../jpa/entity/AbstractPlainAttrValue.java | 2 +-
.../persistence/jpa/entity/JPAConnInstance.java | 33 +-
.../entity/resource/JPAExternalResource.java | 67 +-
.../jpa/entity/task/JPAPropagationTask.java | 17 +-
.../persistence/jpa/DummyConnectorRegistry.java | 13 +-
.../persistence/jpa/inner/ConnInstanceTest.java | 6 +-
.../persistence/jpa/inner/ResourceTest.java | 3 -
.../persistence/jpa/outer/ConnInstanceTest.java | 2 +-
.../test/resources/domains/MasterContent.xml | 102 +--
.../api/AnyObjectProvisioningManager.java | 2 +-
.../provisioning/api/ConnIdBundleManager.java | 2 +-
.../core/provisioning/api/Connector.java | 50 +-
.../core/provisioning/api/ConnectorFactory.java | 23 +-
.../provisioning/api/ConnectorRegistry.java | 12 -
.../api/GroupProvisioningManager.java | 4 +-
.../provisioning/api/ProvisioningManager.java | 14 +-
.../api/UserProvisioningManager.java | 30 +-
.../api/data/ConnInstanceDataBinder.java | 16 +-
.../api/data/ResourceDataBinder.java | 7 +-
.../api/propagation/PropagationReporter.java | 30 +-
.../propagation/PropagationTaskCallable.java | 32 +
.../propagation/PropagationTaskExecutor.java | 21 +-
.../api/sync/ProvisioningProfile.java | 4 +-
.../api/sync/ProvisioningReport.java | 140 ++++
.../api/sync/ProvisioningResult.java | 140 ----
.../core/provisioning/api/sync/PushActions.java | 4 +-
.../core/provisioning/api/sync/SyncActions.java | 4 +-
.../provisioning/java/AsyncConnectorFacade.java | 82 +-
.../provisioning/java/ConnectorFacadeProxy.java | 166 +---
.../provisioning/java/ConnectorManager.java | 76 +-
.../DefaultAnyObjectProvisioningManager.java | 72 +-
.../java/DefaultGroupProvisioningManager.java | 84 +-
.../java/DefaultUserProvisioningManager.java | 152 ++--
.../provisioning/java/VirAttrHandlerImpl.java | 4 +-
.../java/data/AbstractAnyDataBinder.java | 9 +-
.../java/data/ConnInstanceDataBinderImpl.java | 48 +-
.../java/data/RealmDataBinderImpl.java | 2 +-
.../java/data/ResourceDataBinderImpl.java | 33 +-
.../java/data/TaskDataBinderImpl.java | 3 +-
.../java/job/AbstractSchedTaskJobDelegate.java | 2 +-
.../java/job/SchedulerShutdown.java | 4 -
.../java/job/SpringBeanJobFactory.java | 6 +-
.../core/provisioning/java/job/TaskJob.java | 2 +-
.../notification/NotificationManagerImpl.java | 19 +-
.../AbstractPropagationTaskExecutor.java | 66 +-
.../DBPasswordPropagationActions.java | 2 +-
.../propagation/DefaultPropagationReporter.java | 82 +-
.../LDAPPasswordPropagationActions.java | 2 +-
.../PriorityPropagationTaskExecutor.java | 168 ++--
.../propagation/PropagationManagerImpl.java | 4 +-
.../PropagationTaskCallableImpl.java | 94 +++
.../sync/AbstractProvisioningJobDelegate.java | 104 +--
.../java/sync/AbstractPushResultHandler.java | 18 +-
.../java/sync/AbstractSyncResultHandler.java | 94 +--
.../java/sync/AbstractSyncopeResultHandler.java | 2 +-
.../sync/AnyObjectSyncResultHandlerImpl.java | 11 +-
.../java/sync/DBPasswordSyncActions.java | 8 +-
.../java/sync/DefaultPushActions.java | 6 +-
.../java/sync/DefaultSyncActions.java | 6 +-
.../java/sync/GroupSyncResultHandlerImpl.java | 13 +-
.../java/sync/LDAPMembershipSyncActions.java | 14 +-
.../java/sync/LDAPPasswordSyncActions.java | 4 +-
.../sync/PlainAttrsSyncCorrelationRule.java | 8 +-
.../provisioning/java/sync/SyncJobDelegate.java | 5 +-
.../core/provisioning/java/sync/SyncUtils.java | 4 +-
.../java/sync/UserSyncResultHandlerImpl.java | 17 +-
.../src/main/resources/provisioning.properties | 7 +
.../src/main/resources/provisioningContext.xml | 20 +-
.../core/provisioning/java/AbstractTest.java | 1 +
.../core/provisioning/java/MappingTest.java | 2 +-
.../syncope/core/rest/cxf/AddETagFilter.java | 18 +-
.../rest/cxf/ThreadLocalCleanupListener.java | 2 +-
.../rest/cxf/service/AbstractAnyService.java | 59 +-
.../rest/cxf/service/AbstractServiceImpl.java | 30 +-
.../rest/cxf/service/ConnectorServiceImpl.java | 39 +-
.../rest/cxf/service/LoggerServiceImpl.java | 4 +-
.../rest/cxf/service/ResourceServiceImpl.java | 37 +-
.../rest/cxf/service/UserSelfServiceImpl.java | 11 +-
.../core/rest/cxf/service/UserServiceImpl.java | 7 +-
.../CamelAnyObjectProvisioningManager.java | 37 +-
.../camel/CamelGroupProvisioningManager.java | 45 +-
.../camel/CamelUserProvisioningManager.java | 106 ++-
.../processor/AnyObjectCreateProcessor.java | 13 +-
.../processor/AnyObjectDeleteProcessor.java | 13 +-
.../AnyObjectDeprovisionProcessor.java | 13 +-
.../processor/AnyObjectProvisionProcessor.java | 13 +-
.../processor/AnyObjectUpdateProcessor.java | 13 +-
.../processor/GroupCreateInSyncProcessor.java | 13 +-
.../camel/processor/GroupCreateProcessor.java | 13 +-
.../camel/processor/GroupDeleteProcessor.java | 13 +-
.../processor/GroupDeprovisionProcessor.java | 13 +-
.../processor/GroupProvisionProcessor.java | 13 +-
.../camel/processor/GroupUpdateProcessor.java | 9 +-
.../processor/UserConfirmPwdResetProcessor.java | 12 +-
.../camel/processor/UserCreateProcessor.java | 9 +-
.../camel/processor/UserDeleteProcessor.java | 13 +-
.../processor/UserDeprovisionProcessor.java | 13 +-
.../camel/processor/UserProvisionProcessor.java | 13 +-
.../processor/UserSetStatusInSyncProcessor.java | 2 +-
.../UserStatusPropagationProcessor.java | 14 +-
.../processor/UserUpdateInSyncProcessor.java | 9 +-
.../camel/processor/UserUpdateProcessor.java | 13 +-
.../src/main/resources/provisioning.properties | 8 +
.../src/main/resources/userRoutes.xml | 2 +-
fit/console-reference/pom.xml | 4 +-
fit/core-reference/pom.xml | 9 +-
.../main/resources/all/provisioning.properties | 8 +
.../resources/mariadb/provisioning.properties | 9 +-
.../resources/mysql/provisioning.properties | 9 +-
.../resources/oracle/provisioning.properties | 9 +-
.../resources/postgres/provisioning.properties | 9 +-
.../src/main/resources/provisioning.properties | 9 +-
.../resources/sqlserver/provisioning.properties | 9 +-
.../fit/core/reference/AbstractITCase.java | 98 ++-
.../fit/core/reference/AnyObjectITCase.java | 16 +-
.../core/reference/AuthenticationITCase.java | 40 +-
.../fit/core/reference/CamelRouteITCase.java | 2 +-
.../fit/core/reference/ConnectorITCase.java | 84 +-
.../syncope/fit/core/reference/GroupITCase.java | 227 ++++-
.../fit/core/reference/LoggerITCase.java | 8 +-
.../fit/core/reference/MultitenancyITCase.java | 5 +-
.../core/reference/NotificationTaskITCase.java | 4 +-
.../fit/core/reference/PlainSchemaITCase.java | 11 +-
.../fit/core/reference/PushTaskITCase.java | 4 +-
.../fit/core/reference/ReportITCase.java | 2 +-
.../fit/core/reference/ResourceITCase.java | 16 +-
.../fit/core/reference/SearchITCase.java | 2 +-
.../fit/core/reference/SyncTaskITCase.java | 28 +-
.../syncope/fit/core/reference/UserITCase.java | 471 ++++++-----
.../fit/core/reference/UserSelfITCase.java | 26 +-
.../fit/core/reference/UserWorkflowITCase.java | 16 +-
.../fit/core/reference/VirAttrITCase.java | 90 +-
fit/enduser-reference/pom.xml | 413 +++++++++
.../src/main/resources/context.xml | 23 +
.../src/main/resources/enduser.properties | 30 +
.../src/main/resources/log4j2.xml | 58 ++
.../src/main/webapp/WEB-INF/glassfish-web.xml | 25 +
.../WEB-INF/jboss-deployment-structure.xml | 37 +
.../src/main/webapp/WEB-INF/weblogic.xml | 35 +
fit/pom.xml | 1 +
pom.xml | 97 ++-
427 files changed, 13817 insertions(+), 4765 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/77fc5d26/client/console/src/main/java/org/apache/syncope/client/console/pages/ProvisioningModalPage.java
----------------------------------------------------------------------
diff --cc client/console/src/main/java/org/apache/syncope/client/console/pages/ProvisioningModalPage.java
index b5850ad,43944bd..db85db1
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/ProvisioningModalPage.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/ProvisioningModalPage.java
@@@ -41,10 -37,9 +41,8 @@@ import org.apache.syncope.common.lib.to
import org.apache.syncope.common.lib.to.ResourceTO;
import org.apache.syncope.common.lib.types.AnyTypeKind;
import org.apache.syncope.common.lib.types.ResourceDeassociationAction;
- import org.apache.syncope.common.lib.wrap.AbstractWrappable;
- import org.apache.syncope.common.lib.wrap.AnyKey;
import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
@@@ -242,10 -236,10 +239,10 @@@ public class ProvisioningModalPage<T ex
}
if (beans.isEmpty()) {
- window.close(target);
+ modal.close(target);
} else {
- final BulkActionResult res = resourceRestClient.bulkAssociationAction(
- resourceTO.getKey(), anyTypeKind.name(), type, subjectKeys);
- BulkActionResult result =
- resourceRestClient.bulkAssociationAction(resourceTO.getKey(), anyTypeKind.name(), action, anyKeys);
++ BulkActionResult res = resourceRestClient.bulkAssociationAction(resourceTO.getKey(), anyTypeKind.name(),
++ action, anyKeys);
((BasePage) pageRef.getPage()).setModalResult(true);
http://git-wip-us.apache.org/repos/asf/syncope/blob/77fc5d26/client/console/src/main/java/org/apache/syncope/client/console/pages/Realms.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/77fc5d26/client/console/src/main/java/org/apache/syncope/client/console/panels/Realm.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/77fc5d26/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmModalPanel.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/77fc5d26/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java
----------------------------------------------------------------------
diff --cc client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java
index dbb3f37,fdb9f83..730b4cf
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java
@@@ -35,16 -55,51 +35,16 @@@ public abstract class ResourceConnConfP
private final boolean createFlag;
- private List<ConnConfProperty> connConfProperties;
-
- private final WebMarkupContainer connConfPropContainer;
-
- private final AjaxButton check;
-
- public ResourceConnConfPanel(final String id, final ResourceTO resourceTO, final boolean createFlag) {
- super(id);
- setOutputMarkupId(true);
+ public ResourceConnConfPanel(final String id, final IModel<ResourceTO> model, final boolean createFlag) {
+ super(id, model);
this.createFlag = createFlag;
- this.resourceTO = resourceTO;
-
- connConfProperties = getConnConfProperties();
-
- connConfPropContainer = new WebMarkupContainer("connectorPropertiesContainer");
- connConfPropContainer.setOutputMarkupId(true);
- add(connConfPropContainer);
-
- /*
- * the list of overridable connector properties
- */
- final ListView<ConnConfProperty> connPropView = new ConnConfPropertyListView("connectorProperties",
- new PropertyModel<List<ConnConfProperty>>(this, "connConfProperties"),
- false, resourceTO.getConfOverride());
- connPropView.setOutputMarkupId(true);
- connConfPropContainer.add(connPropView);
-
- check = new IndicatingAjaxButton("check", new ResourceModel("check")) {
- private static final long serialVersionUID = -4199438518229098169L;
+ final List<ConnConfProperty> connConfProperties = getConnProperties(model.getObject());
- model.getObject().getConnConfProperties().clear();
- model.getObject().getConnConfProperties().addAll(connConfProperties);
++ model.getObject().getConfOverride().clear();
++ model.getObject().getConfOverride().addAll(connConfProperties);
- @Override
- public void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
- final ResourceTO to = (ResourceTO) form.getModelObject();
-
- if (restClient.check(to)) {
- info(getString("success_connection"));
- } else {
- error(getString("error_connection"));
- }
-
- ((BaseModalPage) getPage()).getFeedbackPanel().refresh(target);
- }
- };
+ setConfPropertyListView("connConfProperties", false);
check.setEnabled(!connConfProperties.isEmpty());
check.setVisible(!connConfProperties.isEmpty());
http://git-wip-us.apache.org/repos/asf/syncope/blob/77fc5d26/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java
----------------------------------------------------------------------
diff --cc client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java
index 330a4c2,ceabd57..dd73ba3
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java
@@@ -23,15 -22,18 +23,17 @@@ import java.util.ArrayList
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
-import java.util.HashSet;
import java.util.List;
import java.util.Set;
+ import org.apache.commons.collections4.CollectionUtils;
+ import org.apache.commons.collections4.Transformer;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.commons.JexlHelpUtils;
-import org.apache.syncope.client.console.panels.ResourceConnConfPanel.ConnConfModEvent;
import org.apache.syncope.client.console.rest.ConnectorRestClient;
import org.apache.syncope.client.console.rest.SchemaRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPanel;
-import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDecoratedCheckbox;
import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
import org.apache.syncope.client.console.wicket.markup.html.form.FieldPanel;
http://git-wip-us.apache.org/repos/asf/syncope/blob/77fc5d26/client/console/src/main/java/org/apache/syncope/client/console/rest/ConnectorRestClient.java
----------------------------------------------------------------------
diff --cc client/console/src/main/java/org/apache/syncope/client/console/rest/ConnectorRestClient.java
index 2414070,d483411..208afa4
--- 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
@@@ -57,15 -55,11 +56,15 @@@ public class ConnectorRestClient extend
return connectors;
}
- public void create(final ConnInstanceTO connectorTO) {
+ public ConnInstanceTO create(final ConnInstanceTO connectorTO) {
- Set<ConnConfProperty> filteredConf = filterProperties(connectorTO.getConfiguration());
- connectorTO.getConfiguration().clear();
- connectorTO.getConfiguration().addAll(filteredConf);
+ Set<ConnConfProperty> filteredConf = filterProperties(connectorTO.getConf());
+ connectorTO.getConf().clear();
+ connectorTO.getConf().addAll(filteredConf);
- getService(ConnectorService.class).create(connectorTO);
+
+ final ConnectorService service = getService(ConnectorService.class);
+ final Response response = service.create(connectorTO);
+
+ return getObject(service, response.getLocation(), ConnInstanceTO.class);
}
/**
http://git-wip-us.apache.org/repos/asf/syncope/blob/77fc5d26/client/console/src/main/java/org/apache/syncope/client/console/rest/ResourceRestClient.java
----------------------------------------------------------------------
diff --cc client/console/src/main/java/org/apache/syncope/client/console/rest/ResourceRestClient.java
index 3a99c1d,f5579cf..3f7672d
--- 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
@@@ -19,9 -19,9 +19,10 @@@
package org.apache.syncope.client.console.rest;
import java.util.List;
+import javax.ws.rs.core.Response;
import org.apache.syncope.client.console.SyncopeConsoleSession;
import org.apache.syncope.common.lib.SyncopeClientException;
+ 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.ResourceTO;
http://git-wip-us.apache.org/repos/asf/syncope/blob/77fc5d26/pom.xml
----------------------------------------------------------------------
[16/28] syncope git commit: [SYNCOPE-156] Removing (most of) Spring
from console
Posted by fm...@apache.org.
[SYNCOPE-156] Removing (most of) Spring from console
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/13f96e06
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/13f96e06
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/13f96e06
Branch: refs/heads/master
Commit: 13f96e06804f0574a72cf2d496cb2ac62f927847
Parents: 07b519b
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Tue Oct 6 17:50:44 2015 +0200
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Tue Oct 6 17:50:44 2015 +0200
----------------------------------------------------------------------
client/console/pom.xml | 8 +-
.../client/console/PreferenceManager.java | 10 +-
.../console/SyncopeConsoleApplication.java | 127 +++++++++++++++----
.../client/console/SyncopeConsoleSession.java | 47 ++-----
.../client/console/commons/PreviewUtils.java | 44 +++++--
.../init/ClassPathScanImplementationLookup.java | 109 ++++++++++++++++
.../client/console/init/ConsoleInitializer.java | 52 +++-----
.../init/ImplementationClassNamesLoader.java | 105 ---------------
.../client/console/init/MIMETypesLoader.java | 15 +--
.../console/init/SyncopeConsoleLoader.java | 35 -----
.../client/console/pages/AbstractBasePage.java | 41 ------
.../syncope/client/console/pages/BasePage.java | 7 +-
.../pages/DisplayAttributesModalPage.java | 4 +-
.../syncope/client/console/pages/Login.java | 6 +-
.../console/pages/MustChangePassword.java | 4 +-
.../console/pages/ProvisioningModalPage.java | 9 ++
.../syncope/client/console/pages/Realms.java | 4 +-
.../client/console/pages/ResultStatusModal.java | 6 +-
.../client/console/pages/StatusModalPage.java | 19 ++-
.../syncope/client/console/pages/Workflow.java | 11 +-
.../console/pages/XMLEditorPopupPage.java | 4 +-
.../console/panels/AbstractModalPanel.java | 41 ------
.../panels/AbstractSearchResultPanel.java | 7 +-
.../console/panels/AnySearchResultPanel.java | 9 +-
.../client/console/panels/ConnectorModal.java | 3 +
.../client/console/panels/GroupModalPanel.java | 4 +
.../syncope/client/console/panels/Realm.java | 15 +--
.../client/console/panels/RealmModalPanel.java | 9 +-
.../console/panels/RealmSidebarPanel.java | 4 +-
.../console/panels/ResourceConnConfPanel.java | 4 +-
.../console/panels/ResourceMappingPanel.java | 7 +-
.../client/console/panels/ResourceModal.java | 14 +-
.../console/panels/ResourceSecurityPanel.java | 4 +-
.../resources/WorkflowDefGETResource.java | 7 +-
.../resources/WorkflowDefPUTResource.java | 6 +-
.../client/console/rest/BaseRestClient.java | 3 +-
.../client/console/topology/Topology.java | 14 +-
.../console/topology/TopologyNodePanel.java | 20 ++-
.../markup/html/form/BinaryFieldPanel.java | 15 +--
.../html/list/ConnConfPropertyListView.java | 9 +-
.../main/resources/META-INF/web-fragment.xml | 16 +--
.../src/main/resources/console.properties | 9 ++
.../src/main/resources/consoleContext.xml | 71 -----------
.../java/data/UserDataBinderImpl.java | 1 -
.../console/pages/CamelRouteModalPage.java | 6 +-
.../client/console/panels/CamelRoutePanel.java | 4 +-
fit/console-reference/pom.xml | 2 +-
.../src/main/resources/console.properties | 9 ++
pom.xml | 13 +-
49 files changed, 420 insertions(+), 573 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/pom.xml
----------------------------------------------------------------------
diff --git a/client/console/pom.xml b/client/console/pom.xml
index fb78280..24f6288 100644
--- a/client/console/pom.xml
+++ b/client/console/pom.xml
@@ -46,9 +46,9 @@ under the License.
<dependency>
<groupId>org.springframework</groupId>
- <artifactId>spring-web</artifactId>
+ <artifactId>spring-context</artifactId>
</dependency>
-
+
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket</artifactId>
@@ -64,10 +64,6 @@ under the License.
</dependency>
<dependency>
<groupId>org.apache.wicket</groupId>
- <artifactId>wicket-spring</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.wicket</groupId>
<artifactId>wicket-auth-roles</artifactId>
</dependency>
<dependency>
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/PreferenceManager.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/PreferenceManager.java b/client/console/src/main/java/org/apache/syncope/client/console/PreferenceManager.java
index 381fc65..c7baef2 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/PreferenceManager.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/PreferenceManager.java
@@ -27,6 +27,7 @@ import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.math.NumberUtils;
import org.apache.wicket.request.Request;
import org.apache.wicket.request.Response;
@@ -35,7 +36,6 @@ import org.apache.wicket.util.cookies.CookieUtils;
import org.apache.wicket.util.crypt.Base64;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.springframework.util.StringUtils;
public class PreferenceManager {
@@ -69,7 +69,7 @@ public class PreferenceManager {
private Map<String, String> getPrefs(final String value) {
Map<String, String> prefs;
try {
- if (StringUtils.hasText(value)) {
+ if (StringUtils.isNotBlank(value)) {
prefs = mapper.readValue(value, MAP_TYPE_REF);
} else {
throw new Exception("Invalid cookie value '" + value + "'");
@@ -117,7 +117,7 @@ public class PreferenceManager {
final String compound = get(request, key);
- if (StringUtils.hasText(compound)) {
+ if (StringUtils.isNotBlank(compound)) {
String[] items = compound.split(";");
result.addAll(Arrays.asList(items));
}
@@ -135,7 +135,7 @@ public class PreferenceManager {
// after retrieved previous setting in order to overwrite the key ...
for (Map.Entry<String, List<String>> entry : prefs.entrySet()) {
- current.put(entry.getKey(), StringUtils.collectionToDelimitedString(entry.getValue(), ";"));
+ current.put(entry.getKey(), StringUtils.join(entry.getValue(), ";"));
}
try {
@@ -164,7 +164,7 @@ public class PreferenceManager {
}
public void setList(final Request request, final Response response, final String key, final List<String> values) {
- set(request, response, key, StringUtils.collectionToDelimitedString(values, ";"));
+ set(request, response, key, StringUtils.join(values, ";"));
}
public void setList(final Request request, final Response response, final Map<String, List<String>> prefs) {
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java
index e9f35ec..ec65024 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java
@@ -22,11 +22,16 @@ import de.agilecoders.wicket.core.Bootstrap;
import de.agilecoders.wicket.core.settings.BootstrapSettings;
import de.agilecoders.wicket.core.settings.IBootstrapSettings;
import de.agilecoders.wicket.core.settings.SingleThemeProvider;
+import java.io.File;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
-import org.apache.commons.lang3.StringUtils;
+import java.util.Properties;
+import javax.ws.rs.core.MediaType;
+import org.apache.commons.io.FileUtils;
+import org.apache.syncope.client.console.init.ClassPathScanImplementationLookup;
+import org.apache.syncope.client.console.init.ConsoleInitializer;
import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.pages.MustChangePassword;
import org.apache.syncope.client.console.pages.Dashboard;
@@ -35,8 +40,10 @@ import org.apache.syncope.client.console.resources.FilesystemResource;
import org.apache.syncope.client.console.resources.WorkflowDefGETResource;
import org.apache.syncope.client.console.resources.WorkflowDefPUTResource;
import org.apache.syncope.client.console.themes.AdminLTE;
+import org.apache.syncope.client.lib.SyncopeClientFactoryBean;
import org.apache.syncope.common.lib.types.Entitlement;
import org.apache.wicket.Page;
+import org.apache.wicket.WicketRuntimeException;
import org.apache.wicket.authroles.authentication.AbstractAuthenticatedWebSession;
import org.apache.wicket.authroles.authentication.AuthenticatedWebApplication;
import org.apache.wicket.authroles.authentication.AuthenticatedWebSession;
@@ -46,19 +53,16 @@ import org.apache.wicket.protocol.http.WebApplication;
import org.apache.wicket.request.resource.IResource;
import org.apache.wicket.request.resource.ResourceReference;
import org.apache.wicket.resource.DynamicJQueryResourceReference;
-import org.apache.wicket.spring.injection.annot.SpringComponentInjector;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.config.BeanDefinition;
-import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider;
-import org.springframework.core.type.filter.AssignableTypeFilter;
-import org.springframework.util.ClassUtils;
-import org.springframework.web.context.support.WebApplicationContextUtils;
+import org.springframework.util.Assert;
public class SyncopeConsoleApplication extends AuthenticatedWebApplication {
private static final Logger LOG = LoggerFactory.getLogger(SyncopeConsoleApplication.class);
+ private static final String CONSOLE_PROPERTIES = "console.properties";
+
public static final List<Locale> SUPPORTED_LOCALES = Collections.unmodifiableList(Arrays.asList(
new Locale[] {
Locale.ENGLISH, Locale.ITALIAN, new Locale("pt", "BR")
@@ -66,10 +70,65 @@ public class SyncopeConsoleApplication extends AuthenticatedWebApplication {
private static final String ACTIVITI_MODELER_CONTEXT = "activiti-modeler";
+ public static SyncopeConsoleApplication get() {
+ return (SyncopeConsoleApplication) WebApplication.get();
+ }
+
+ private String version;
+
+ private String site;
+
+ private String license;
+
+ private String anonymousUser;
+
+ private String anonymousKey;
+
+ private String activitiModelerDirectory;
+
+ private SyncopeClientFactoryBean clientFactory;
+
@Override
protected void init() {
super.init();
+ // read console.properties
+ Properties props = new Properties();
+ try {
+ props.load(getClass().getResourceAsStream("/" + CONSOLE_PROPERTIES));
+ File consoleDir = new File(props.getProperty("console.directory"));
+ if (consoleDir.exists() && consoleDir.canRead() && consoleDir.isDirectory()) {
+ File consoleDirProps = FileUtils.getFile(consoleDir, CONSOLE_PROPERTIES);
+ if (consoleDirProps.exists() && consoleDirProps.canRead() && consoleDirProps.isFile()) {
+ props.clear();
+ props.load(FileUtils.openInputStream(consoleDir));
+ }
+ }
+ } catch (Exception e) {
+ throw new WicketRuntimeException("Could not read " + CONSOLE_PROPERTIES, e);
+ }
+ version = props.getProperty("version");
+ Assert.notNull(version, "<version> not set");
+ site = props.getProperty("site");
+ Assert.notNull(site, "<site> not set");
+ license = props.getProperty("license");
+ Assert.notNull(license, "<license> not set");
+ anonymousUser = props.getProperty("anonymousUser");
+ Assert.notNull(anonymousUser, "<anonymousUser> not set");
+ anonymousKey = props.getProperty("anonymousKey");
+ Assert.notNull(anonymousKey, "<anonymousKey> not set");
+
+ String scheme = props.getProperty("scheme");
+ Assert.notNull(scheme, "<scheme> not set");
+ String host = props.getProperty("host");
+ Assert.notNull(host, "<host> not set");
+ String port = props.getProperty("port");
+ Assert.notNull(port, "<port> not set");
+ String rootPath = props.getProperty("rootPath");
+ Assert.notNull(rootPath, "<rootPath> not set");
+
+ clientFactory = new SyncopeClientFactoryBean().setAddress(scheme + "://" + host + ":" + port + "/" + rootPath);
+
// Application settings
IBootstrapSettings settings = new BootstrapSettings();
@@ -81,24 +140,16 @@ public class SyncopeConsoleApplication extends AuthenticatedWebApplication {
getResourceSettings().setUseMinifiedResources(true);
- getComponentInstantiationListeners().add(new SpringComponentInjector(this));
getResourceSettings().setThrowExceptionOnMissingResource(true);
getJavaScriptLibrarySettings().setJQueryReference(new DynamicJQueryResourceReference());
getSecuritySettings().setAuthorizationStrategy(new MetaDataRoleAuthorizationStrategy(this));
- ClassPathScanningCandidateComponentProvider scanner = new ClassPathScanningCandidateComponentProvider(false);
- scanner.addIncludeFilter(new AssignableTypeFilter(BasePage.class));
-
- for (BeanDefinition bd : scanner.findCandidateComponents(StringUtils.EMPTY)) {
- try {
- @SuppressWarnings("unchecked")
- Class<? extends BasePage> clazz = (Class<? extends BasePage>) ClassUtils.resolveClassName(
- bd.getBeanClassName(), ClassUtils.getDefaultClassLoader());
- MetaDataRoleAuthorizationStrategy.authorize(clazz, SyncopeConsoleSession.AUTHENTICATED);
- } catch (Throwable t) {
- LOG.warn("Could not inspect class {}", bd.getBeanClassName(), t);
- }
+
+ ClassPathScanImplementationLookup lookup = (ClassPathScanImplementationLookup) getServletContext().
+ getAttribute(ConsoleInitializer.CLASSPATH_LOOKUP);
+ for (Class<? extends BasePage> clazz : lookup.getPageClasses()) {
+ MetaDataRoleAuthorizationStrategy.authorize(clazz, SyncopeConsoleSession.AUTHENTICATED);
}
getMarkupSettings().setStripWicketTags(true);
@@ -108,8 +159,8 @@ public class SyncopeConsoleApplication extends AuthenticatedWebApplication {
mountPage("/login", getSignInPageClass());
- final String activitiModelerDirectory = WebApplicationContextUtils.getWebApplicationContext(
- WebApplication.get().getServletContext()).getBean("activitiModelerDirectory", String.class);
+ activitiModelerDirectory = props.getProperty("activitiModelerDirectory");
+ Assert.notNull(activitiModelerDirectory, "<activitiModelerDirectory> not set");
mountResource("/" + ACTIVITI_MODELER_CONTEXT, new ResourceReference(ACTIVITI_MODELER_CONTEXT) {
private static final long serialVersionUID = -128426276529456602L;
@@ -157,4 +208,36 @@ public class SyncopeConsoleApplication extends AuthenticatedWebApplication {
? MustChangePassword.class
: Dashboard.class;
}
+
+ public String getVersion() {
+ return version;
+ }
+
+ public String getSite() {
+ return site;
+ }
+
+ public String getLicense() {
+ return license;
+ }
+
+ public String getAnonymousUser() {
+ return anonymousUser;
+ }
+
+ public String getAnonymousKey() {
+ return anonymousKey;
+ }
+
+ public String getActivitiModelerDirectory() {
+ return activitiModelerDirectory;
+ }
+
+ public SyncopeClientFactoryBean getClientFactory() {
+ return clientFactory;
+ }
+
+ public MediaType getMediaType() {
+ return clientFactory.getContentType().getMediaType();
+ }
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
index f48611f..667b525 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
@@ -44,12 +44,9 @@ import org.apache.syncope.common.rest.api.service.SyncopeService;
import org.apache.wicket.Session;
import org.apache.wicket.authroles.authentication.AuthenticatedWebSession;
import org.apache.wicket.authroles.authorization.strategies.role.Roles;
-import org.apache.wicket.protocol.http.WebApplication;
import org.apache.wicket.request.Request;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.springframework.context.ApplicationContext;
-import org.springframework.web.context.support.WebApplicationContextUtils;
public class SyncopeConsoleSession extends AuthenticatedWebSession {
@@ -59,16 +56,12 @@ public class SyncopeConsoleSession extends AuthenticatedWebSession {
private static final Logger LOG = LoggerFactory.getLogger(SyncopeConsoleSession.class);
- private final String version;
-
private final SyncopeTO syncopeTO;
private final List<String> domains;
private String domain;
- private final SyncopeClientFactoryBean clientFactory;
-
private final Map<Class<?>, Object> services = Collections.synchronizedMap(new HashMap<Class<?>, Object>());
private SyncopeClient client;
@@ -90,17 +83,10 @@ public class SyncopeConsoleSession extends AuthenticatedWebSession {
public SyncopeConsoleSession(final Request request) {
super(request);
- ApplicationContext ctx = WebApplicationContextUtils.
- getWebApplicationContext(WebApplication.get().getServletContext());
-
- clientFactory = ctx.getBean(SyncopeClientFactoryBean.class).
- setContentType(SyncopeClientFactoryBean.ContentType.JSON);
- String anonymousUser = ctx.getBean("anonymousUser", String.class);
- String anonymousKey = ctx.getBean("anonymousKey", String.class);
+ SyncopeClient anonymousClient = SyncopeConsoleApplication.get().getClientFactory().create(
+ SyncopeConsoleApplication.get().getAnonymousUser(),
+ SyncopeConsoleApplication.get().getAnonymousKey());
- version = ctx.getBean("version", String.class);
-
- SyncopeClient anonymousClient = clientFactory.create(anonymousUser, anonymousKey);
syncopeTO = anonymousClient.getService(SyncopeService.class).info();
domains = new ArrayList<>();
domains.add(SyncopeConstants.MASTER_DOMAIN);
@@ -114,10 +100,6 @@ public class SyncopeConsoleSession extends AuthenticatedWebSession {
}, domains);
}
- public String getVersion() {
- return version;
- }
-
public SyncopeTO getSyncopeTO() {
return syncopeTO;
}
@@ -139,7 +121,8 @@ public class SyncopeConsoleSession extends AuthenticatedWebSession {
boolean authenticated = false;
try {
- client = clientFactory.setDomain(getDomain()).create(username, password);
+ client = SyncopeConsoleApplication.get().getClientFactory().
+ setDomain(getDomain()).create(username, password);
Pair<Map<String, Set<String>>, UserTO> self = client.self();
auth = self.getKey();
@@ -201,12 +184,15 @@ public class SyncopeConsoleSession extends AuthenticatedWebSession {
public <T> T getService(final MediaType mediaType, final Class<T> serviceClass) {
T service;
- synchronized (clientFactory) {
- SyncopeClientFactoryBean.ContentType preType = clientFactory.getContentType();
+ synchronized (SyncopeConsoleApplication.get().getClientFactory()) {
+ SyncopeClientFactoryBean.ContentType preType =
+ SyncopeConsoleApplication.get().getClientFactory().getContentType();
- clientFactory.setContentType(SyncopeClientFactoryBean.ContentType.fromString(mediaType.toString()));
- service = clientFactory.create(username, password).getService(serviceClass);
- clientFactory.setContentType(preType);
+ SyncopeConsoleApplication.get().getClientFactory().
+ setContentType(SyncopeClientFactoryBean.ContentType.fromString(mediaType.toString()));
+ service = SyncopeConsoleApplication.get().getClientFactory().
+ create(username, password).getService(serviceClass);
+ SyncopeConsoleApplication.get().getClientFactory().setContentType(preType);
}
return service;
@@ -218,12 +204,7 @@ public class SyncopeConsoleSession extends AuthenticatedWebSession {
}
public DateFormat getDateFormat() {
- final Locale locale = getLocale() == null ? Locale.ENGLISH : getLocale();
-
+ Locale locale = getLocale() == null ? Locale.ENGLISH : getLocale();
return DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, locale);
}
-
- public MediaType getMediaType() {
- return clientFactory.getContentType().getMediaType();
- }
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/commons/PreviewUtils.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/PreviewUtils.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/PreviewUtils.java
index 12c93d4..e88fcb3 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/commons/PreviewUtils.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/PreviewUtils.java
@@ -18,31 +18,49 @@
*/
package org.apache.syncope.client.console.commons;
+import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import org.apache.commons.lang3.StringUtils;
-import org.apache.syncope.client.console.init.ImplementationClassNamesLoader;
+import org.apache.syncope.client.console.SyncopeConsoleApplication;
+import org.apache.syncope.client.console.init.ClassPathScanImplementationLookup;
+import org.apache.syncope.client.console.init.ConsoleInitializer;
import org.apache.syncope.client.console.wicket.markup.html.form.preview.AbstractBinaryPreviewer;
import org.apache.wicket.Component;
import org.apache.wicket.util.crypt.Base64;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.util.ClassUtils;
+import org.springframework.util.Assert;
-@org.springframework.stereotype.Component
-public class PreviewUtils {
+public final class PreviewUtils {
- @Autowired
- private ImplementationClassNamesLoader implementationClassNamesLoader;
+ public static PreviewUtils getInstance() {
+ return new PreviewUtils();
+ }
+
+ private static <T> Constructor<T> getConstructorIfAvailable(final Class<T> clazz, final Class<?>... paramTypes) {
+ Assert.notNull(clazz, "Class must not be null");
+ try {
+ return clazz.getConstructor(paramTypes);
+ } catch (NoSuchMethodException ex) {
+ return null;
+ }
+ }
+
+ private final ClassPathScanImplementationLookup classPathScanImplementationLookup;
+
+ private PreviewUtils() {
+ classPathScanImplementationLookup = (ClassPathScanImplementationLookup) SyncopeConsoleApplication.get().
+ getServletContext().getAttribute(ConsoleInitializer.CLASSPATH_LOOKUP);
+ }
public Component getPreviewer(final String mimeType, final String file)
throws InstantiationException, IllegalAccessException, InvocationTargetException {
- final Class<? extends AbstractBinaryPreviewer> previewer = StringUtils.isBlank(file)
+ Class<? extends AbstractBinaryPreviewer> previewer = StringUtils.isBlank(file)
? null
- : implementationClassNamesLoader.getPreviewerClass(mimeType);
+ : classPathScanImplementationLookup.getPreviewerClass(mimeType);
return previewer == null
? null
- : ClassUtils.getConstructorIfAvailable(previewer, String.class, String.class, byte[].class).
+ : getConstructorIfAvailable(previewer, String.class, String.class, byte[].class).
newInstance(new Object[] { "previewer", mimeType, Base64.decodeBase64(file) }).
preview();
}
@@ -50,12 +68,12 @@ public class PreviewUtils {
public Component getPreviewer(final String mimeType, final byte[] file)
throws InstantiationException, IllegalAccessException, InvocationTargetException {
- final Class<? extends AbstractBinaryPreviewer> previewer =
- implementationClassNamesLoader.getPreviewerClass(mimeType);
+ Class<? extends AbstractBinaryPreviewer> previewer = classPathScanImplementationLookup.getPreviewerClass(
+ mimeType);
return previewer == null
? null
- : ClassUtils.getConstructorIfAvailable(previewer, String.class, String.class, byte[].class).
+ : getConstructorIfAvailable(previewer, String.class, String.class, byte[].class).
newInstance(new Object[] { "previewer", mimeType, file }).
preview();
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/init/ClassPathScanImplementationLookup.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/init/ClassPathScanImplementationLookup.java b/client/console/src/main/java/org/apache/syncope/client/console/init/ClassPathScanImplementationLookup.java
new file mode 100644
index 0000000..3c28c04
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/init/ClassPathScanImplementationLookup.java
@@ -0,0 +1,109 @@
+/*
+ * 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.init;
+
+import java.lang.reflect.Modifier;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import org.apache.commons.lang3.ArrayUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.panels.AbstractExtensionPanel;
+import org.apache.syncope.client.console.annotations.BinaryPreview;
+import org.apache.syncope.client.console.pages.BasePage;
+import org.apache.syncope.client.console.wicket.markup.html.form.preview.AbstractBinaryPreviewer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.config.BeanDefinition;
+import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider;
+import org.springframework.core.type.filter.AssignableTypeFilter;
+import org.springframework.util.ClassUtils;
+
+public class ClassPathScanImplementationLookup {
+
+ private static final Logger LOG = LoggerFactory.getLogger(ClassPathScanImplementationLookup.class);
+
+ private List<Class<? extends BasePage>> pages;
+
+ private List<Class<? extends AbstractBinaryPreviewer>> previewers;
+
+ private List<Class<? extends AbstractExtensionPanel>> extPanels;
+
+ @SuppressWarnings("unchecked")
+ public void load() {
+ pages = new ArrayList<>();
+ previewers = new ArrayList<>();
+ extPanels = new ArrayList<>();
+
+ ClassPathScanningCandidateComponentProvider scanner = new ClassPathScanningCandidateComponentProvider(false);
+ scanner.addIncludeFilter(new AssignableTypeFilter(BasePage.class));
+ scanner.addIncludeFilter(new AssignableTypeFilter(AbstractBinaryPreviewer.class));
+ scanner.addIncludeFilter(new AssignableTypeFilter(AbstractExtensionPanel.class));
+
+ for (BeanDefinition bd : scanner.findCandidateComponents(StringUtils.EMPTY)) {
+ try {
+ Class<?> clazz = ClassUtils.resolveClassName(
+ bd.getBeanClassName(), ClassUtils.getDefaultClassLoader());
+ boolean isAbsractClazz = Modifier.isAbstract(clazz.getModifiers());
+
+ if (BasePage.class.isAssignableFrom(clazz) && !isAbsractClazz) {
+ pages.add((Class<? extends BasePage>) clazz);
+ } else if (AbstractBinaryPreviewer.class.isAssignableFrom(clazz) && !isAbsractClazz) {
+ previewers.add((Class<? extends AbstractBinaryPreviewer>) clazz);
+ } else if (AbstractExtensionPanel.class.isAssignableFrom(clazz) && !isAbsractClazz) {
+ extPanels.add((Class<? extends AbstractExtensionPanel>) clazz);
+ }
+ } catch (Throwable t) {
+ LOG.warn("Could not inspect class {}", bd.getBeanClassName(), t);
+ }
+ }
+ pages = Collections.unmodifiableList(pages);
+ previewers = Collections.unmodifiableList(previewers);
+ extPanels = Collections.unmodifiableList(extPanels);
+
+ LOG.debug("Binary previewers found: {}", previewers);
+ LOG.debug("Extension panels found: {}", extPanels);
+ }
+
+ public Class<? extends AbstractBinaryPreviewer> getPreviewerClass(final String mimeType) {
+ LOG.debug("Searching for previewer class for MIME type: {}", mimeType);
+ Class<? extends AbstractBinaryPreviewer> previewer = null;
+ for (Class<? extends AbstractBinaryPreviewer> candidate : previewers) {
+ LOG.debug("Evaluating previewer class {} for MIME type {}", candidate.getName(), mimeType);
+ if (ArrayUtils.contains(candidate.getAnnotation(BinaryPreview.class).mimeTypes(), mimeType)) {
+ LOG.debug("Found existing previewer for MIME type {}: {}", mimeType, candidate.getName());
+ previewer = candidate;
+ }
+ }
+ return previewer;
+ }
+
+ public List<Class<? extends BasePage>> getPageClasses() {
+ return pages;
+ }
+
+ public List<Class<? extends AbstractBinaryPreviewer>> getPreviewerClasses() {
+ return previewers;
+ }
+
+ public List<Class<? extends AbstractExtensionPanel>> getExtPanelClasses() {
+ return extPanels;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/init/ConsoleInitializer.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/init/ConsoleInitializer.java b/client/console/src/main/java/org/apache/syncope/client/console/init/ConsoleInitializer.java
index 87fa6ad..6f42002 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/init/ConsoleInitializer.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/init/ConsoleInitializer.java
@@ -18,54 +18,40 @@
*/
package org.apache.syncope.client.console.init;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-import java.util.Map;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import javax.servlet.annotation.WebListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.springframework.aop.support.AopUtils;
-import org.springframework.beans.factory.BeanFactory;
-import org.springframework.beans.factory.BeanFactoryAware;
-import org.springframework.beans.factory.InitializingBean;
-import org.springframework.beans.factory.support.DefaultListableBeanFactory;
-import org.springframework.stereotype.Component;
/**
* Take care of all initializations needed by Syncope Console to run up and safe.
*/
-@Component
-public class ConsoleInitializer implements InitializingBean, BeanFactoryAware {
+@WebListener
+public class ConsoleInitializer implements ServletContextListener {
private static final Logger LOG = LoggerFactory.getLogger(ConsoleInitializer.class);
- private DefaultListableBeanFactory beanFactory;
+ public static final String CLASSPATH_LOOKUP = "CLASSPATH_LOOKUP";
- @Override
- public void setBeanFactory(final BeanFactory beanFactory) {
- this.beanFactory = (DefaultListableBeanFactory) beanFactory;
- }
+ public static final String MIMETYPES_LOADER = "MIMETYPES_LOADER";
@Override
- public void afterPropertiesSet() {
- Map<String, SyncopeConsoleLoader> loaderMap = beanFactory.getBeansOfType(SyncopeConsoleLoader.class);
-
- List<SyncopeConsoleLoader> loaders = new ArrayList<>(loaderMap.values());
- Collections.sort(loaders, new Comparator<SyncopeConsoleLoader>() {
+ public void contextInitialized(final ServletContextEvent sce) {
+ ClassPathScanImplementationLookup lookup = new ClassPathScanImplementationLookup();
+ lookup.load();
+ sce.getServletContext().setAttribute(CLASSPATH_LOOKUP, lookup);
- @Override
- public int compare(final SyncopeConsoleLoader o1, final SyncopeConsoleLoader o2) {
- return o1.getPriority().compareTo(o2.getPriority());
- }
- });
+ MIMETypesLoader mimeTypes = new MIMETypesLoader();
+ mimeTypes.load();
+ sce.getServletContext().setAttribute(MIMETYPES_LOADER, mimeTypes);
- LOG.debug("Starting initialization...");
- for (SyncopeConsoleLoader loader : loaders) {
- LOG.debug("Invoking {} with priority {}", AopUtils.getTargetClass(loader).getName(), loader.getPriority());
- loader.load();
- }
LOG.debug("Initialization completed");
}
+ @Override
+ public void contextDestroyed(final ServletContextEvent sce) {
+ // nothing to do
+ }
+
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/init/ImplementationClassNamesLoader.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/init/ImplementationClassNamesLoader.java b/client/console/src/main/java/org/apache/syncope/client/console/init/ImplementationClassNamesLoader.java
deleted file mode 100644
index 00a9027..0000000
--- a/client/console/src/main/java/org/apache/syncope/client/console/init/ImplementationClassNamesLoader.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.client.console.init;
-
-import java.lang.reflect.Modifier;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import org.apache.commons.lang3.ArrayUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.syncope.client.console.panels.AbstractExtensionPanel;
-import org.apache.syncope.client.console.annotations.BinaryPreview;
-import org.apache.syncope.client.console.wicket.markup.html.form.preview.AbstractBinaryPreviewer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.config.BeanDefinition;
-import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider;
-import org.springframework.core.type.filter.AssignableTypeFilter;
-import org.springframework.stereotype.Component;
-import org.springframework.util.ClassUtils;
-
-@Component
-public class ImplementationClassNamesLoader implements SyncopeConsoleLoader {
-
- private static final Logger LOG = LoggerFactory.getLogger(ImplementationClassNamesLoader.class);
-
- private List<Class<? extends AbstractBinaryPreviewer>> previewers;
-
- private List<Class<? extends AbstractExtensionPanel>> extPanels;
-
- @Override
- public Integer getPriority() {
- return 0;
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public void load() {
- previewers = new ArrayList<>();
- extPanels = new ArrayList<>();
-
- ClassPathScanningCandidateComponentProvider scanner = new ClassPathScanningCandidateComponentProvider(false);
- scanner.addIncludeFilter(new AssignableTypeFilter(AbstractBinaryPreviewer.class));
- scanner.addIncludeFilter(new AssignableTypeFilter(AbstractExtensionPanel.class));
-
- for (BeanDefinition bd : scanner.findCandidateComponents(StringUtils.EMPTY)) {
- try {
- Class<?> clazz = ClassUtils.resolveClassName(
- bd.getBeanClassName(), ClassUtils.getDefaultClassLoader());
- boolean isAbsractClazz = Modifier.isAbstract(clazz.getModifiers());
-
- if (AbstractBinaryPreviewer.class.isAssignableFrom(clazz) && !isAbsractClazz) {
- previewers.add((Class<? extends AbstractBinaryPreviewer>) clazz);
- } else if (AbstractExtensionPanel.class.isAssignableFrom(clazz) && !isAbsractClazz) {
- extPanels.add((Class<? extends AbstractExtensionPanel>) clazz);
- }
- } catch (Throwable t) {
- LOG.warn("Could not inspect class {}", bd.getBeanClassName(), t);
- }
- }
- previewers = Collections.unmodifiableList(previewers);
- extPanels = Collections.unmodifiableList(extPanels);
-
- LOG.debug("Binary previewers found: {}", previewers);
- LOG.debug("Extension panels found: {}", extPanels);
- }
-
- public Class<? extends AbstractBinaryPreviewer> getPreviewerClass(final String mimeType) {
- LOG.debug("Searching for previewer class for MIME type: {}", mimeType);
- Class<? extends AbstractBinaryPreviewer> previewer = null;
- for (Class<? extends AbstractBinaryPreviewer> candidate : previewers) {
- LOG.debug("Evaluating previewer class {} for MIME type {}", candidate.getName(), mimeType);
- if (ArrayUtils.contains(candidate.getAnnotation(BinaryPreview.class).mimeTypes(), mimeType)) {
- LOG.debug("Found existing previewer for MIME type {}: {}", mimeType, candidate.getName());
- previewer = candidate;
- }
- }
- return previewer;
- }
-
- public List<Class<? extends AbstractBinaryPreviewer>> getPreviewerClasses() {
- return previewers;
- }
-
- public List<Class<? extends AbstractExtensionPanel>> getExtPanelClasses() {
- return extPanels;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/init/MIMETypesLoader.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/init/MIMETypesLoader.java b/client/console/src/main/java/org/apache/syncope/client/console/init/MIMETypesLoader.java
index 7a2f878..62dcff3 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/init/MIMETypesLoader.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/init/MIMETypesLoader.java
@@ -27,26 +27,15 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.wicket.util.io.IOUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Component;
-@Component
-public class MIMETypesLoader implements SyncopeConsoleLoader {
+public class MIMETypesLoader {
- /**
- * Logger.
- */
private static final Logger LOG = LoggerFactory.getLogger(MIMETypesLoader.class);
private List<String> mimeTypes;
- @Override
- public Integer getPriority() {
- return 10;
- }
-
- @Override
public void load() {
- final Set<String> mediaTypes = new HashSet<>();
+ Set<String> mediaTypes = new HashSet<>();
this.mimeTypes = new ArrayList<>();
try {
final String mimeTypesFile = IOUtils.toString(getClass().getResourceAsStream("/MIMETypes"));
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/init/SyncopeConsoleLoader.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/init/SyncopeConsoleLoader.java b/client/console/src/main/java/org/apache/syncope/client/console/init/SyncopeConsoleLoader.java
deleted file mode 100644
index 7c4d3d4..0000000
--- a/client/console/src/main/java/org/apache/syncope/client/console/init/SyncopeConsoleLoader.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.client.console.init;
-
-/**
- * Marker interface for Syncope console initialization.
- */
-public interface SyncopeConsoleLoader {
-
- /**
- * @return the priority that the implementing class has in the initialization process.
- */
- Integer getPriority();
-
- /**
- * Perform initialization operations.
- */
- void load();
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/pages/AbstractBasePage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/AbstractBasePage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/AbstractBasePage.java
index bd88711..c4096af 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/AbstractBasePage.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/AbstractBasePage.java
@@ -19,24 +19,13 @@
package org.apache.syncope.client.console.pages;
import org.apache.syncope.client.console.commons.Constants;
-import org.apache.syncope.client.console.init.MIMETypesLoader;
import org.apache.syncope.client.console.panels.NotificationPanel;
-import org.apache.syncope.client.console.rest.ConfigurationRestClient;
-import org.apache.syncope.client.console.rest.ConnectorRestClient;
-import org.apache.syncope.client.console.rest.ReportRestClient;
-import org.apache.syncope.client.console.rest.ResourceRestClient;
-import org.apache.syncope.client.console.rest.GroupRestClient;
-import org.apache.syncope.client.console.rest.SchemaRestClient;
-import org.apache.syncope.client.console.rest.TaskRestClient;
-import org.apache.syncope.client.console.rest.UserRestClient;
-import org.apache.syncope.client.console.rest.UserSelfRestClient;
import org.apache.syncope.client.console.wicket.markup.head.MetaHeaderItem;
import org.apache.wicket.markup.head.HeaderItem;
import org.apache.wicket.markup.head.IHeaderResponse;
import org.apache.wicket.markup.head.PriorityHeaderItem;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.request.mapper.parameter.PageParameters;
-import org.apache.wicket.spring.injection.annot.SpringBean;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -56,36 +45,6 @@ public class AbstractBasePage extends WebPage {
protected final HeaderItem meta = new MetaHeaderItem("X-UA-Compatible", "IE=edge");
- @SpringBean
- protected UserRestClient userRestClient;
-
- @SpringBean
- protected UserSelfRestClient userSelfRestClient;
-
- @SpringBean
- protected GroupRestClient groupRestClient;
-
- @SpringBean
- protected TaskRestClient taskRestClient;
-
- @SpringBean
- protected SchemaRestClient schemaRestClient;
-
- @SpringBean
- protected ResourceRestClient resourceRestClient;
-
- @SpringBean
- protected ConnectorRestClient connectorRestClient;
-
- @SpringBean
- protected ReportRestClient reportRestClient;
-
- @SpringBean
- protected ConfigurationRestClient confRestClient;
-
- @SpringBean
- protected MIMETypesLoader mimeTypesInitializer;
-
protected NotificationPanel feedbackPanel;
/**
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java
index bcbd3bf..1ea44d5 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java
@@ -18,6 +18,7 @@
*/
package org.apache.syncope.client.console.pages;
+import org.apache.syncope.client.console.SyncopeConsoleApplication;
import org.apache.syncope.client.console.SyncopeConsoleSession;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.rest.UserWorkflowRestClient;
@@ -37,14 +38,12 @@ import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
import org.apache.wicket.request.mapper.parameter.PageParameters;
-import org.apache.wicket.spring.injection.annot.SpringBean;
public class BasePage extends AbstractBasePage implements IAjaxIndicatorAware {
private static final long serialVersionUID = 1571997737305598502L;
- @SpringBean
- private UserWorkflowRestClient userWorkflowRestClient;
+ private final UserWorkflowRestClient userWorkflowRestClient = new UserWorkflowRestClient();
public BasePage() {
this(null);
@@ -62,7 +61,7 @@ public class BasePage extends AbstractBasePage implements IAjaxIndicatorAware {
super(parameters);
// header, footer
- add(new Label("version", SyncopeConsoleSession.get().getVersion()));
+ add(new Label("version", SyncopeConsoleApplication.get().getVersion()));
add(new Label("username", SyncopeConsoleSession.get().getSelfTO().getUsername()));
final WebMarkupContainer todosContainer = new WebMarkupContainer("todosContainer");
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/pages/DisplayAttributesModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/DisplayAttributesModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/DisplayAttributesModalPage.java
index 432c510..7be2525 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/DisplayAttributesModalPage.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/DisplayAttributesModalPage.java
@@ -42,7 +42,6 @@ import org.apache.wicket.model.IModel;
import org.apache.wicket.model.LoadableDetachableModel;
import org.apache.wicket.model.PropertyModel;
import org.apache.wicket.model.ResourceModel;
-import org.apache.wicket.spring.injection.annot.SpringBean;
/**
* Modal window with Display attributes form.
@@ -59,8 +58,7 @@ public abstract class DisplayAttributesModalPage<T extends AnyTO> extends Abstra
*/
private static final int MAX_SELECTIONS = 9;
- @SpringBean
- private PreferenceManager prefMan;
+ private final PreferenceManager prefMan = new PreferenceManager();
private final List<String> selectedDetails;
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/pages/Login.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/Login.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/Login.java
index 7e56e92..754dacd 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/Login.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/Login.java
@@ -40,15 +40,11 @@ import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.request.mapper.parameter.PageParameters;
-import org.apache.wicket.spring.injection.annot.SpringBean;
public class Login extends WebPage {
private static final long serialVersionUID = 5889157642852559004L;
- @SpringBean(name = "anonymousUser")
- private String anonymousUser;
-
private final NotificationPanel feedbackPanel;
private final StatelessForm<Void> form;
@@ -93,7 +89,7 @@ public class Login extends WebPage {
@Override
protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
- if (anonymousUser.equals(usernameField.getRawInput())) {
+ if (SyncopeConsoleApplication.get().getAnonymousUser().equals(usernameField.getRawInput())) {
throw new AccessControlException("Illegal username");
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/pages/MustChangePassword.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/MustChangePassword.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/MustChangePassword.java
index 5396561..51a3f6e 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/MustChangePassword.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/MustChangePassword.java
@@ -33,7 +33,6 @@ import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.form.validation.EqualPasswordInputValidator;
import org.apache.wicket.model.Model;
import org.apache.wicket.request.mapper.parameter.PageParameters;
-import org.apache.wicket.spring.injection.annot.SpringBean;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -43,8 +42,7 @@ public class MustChangePassword extends WebPage {
private static final Logger LOG = LoggerFactory.getLogger(MustChangePassword.class);
- @SpringBean
- private UserSelfRestClient userSelfRestClient;
+ private final UserSelfRestClient userSelfRestClient = new UserSelfRestClient();
private final NotificationPanel feedbackPanel;
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/pages/ProvisioningModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/ProvisioningModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/ProvisioningModalPage.java
index 95ec54f..847bd61 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/ProvisioningModalPage.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/ProvisioningModalPage.java
@@ -30,6 +30,9 @@ import org.apache.syncope.client.console.commons.status.ConnObjectWrapper;
import org.apache.syncope.client.console.commons.status.StatusBean;
import org.apache.syncope.client.console.commons.status.StatusUtils;
import org.apache.syncope.client.console.panels.ActionDataTablePanel;
+import org.apache.syncope.client.console.rest.GroupRestClient;
+import org.apache.syncope.client.console.rest.ResourceRestClient;
+import org.apache.syncope.client.console.rest.UserRestClient;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
import org.apache.syncope.client.lib.SyncopeClient;
@@ -59,6 +62,12 @@ public class ProvisioningModalPage<T extends AnyTO> extends AbstractStatusModalP
private static final int ROWS_PER_PAGE = 10;
+ private final UserRestClient userRestClient = new UserRestClient();
+
+ private final GroupRestClient groupRestClient = new GroupRestClient();
+
+ private final ResourceRestClient resourceRestClient = new ResourceRestClient();
+
private final ResourceTO resourceTO;
private final AnyTypeKind anyTypeKind;
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/pages/Realms.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/Realms.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/Realms.java
index 300db13..0767b33 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/Realms.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/Realms.java
@@ -42,14 +42,12 @@ import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.ResourceModel;
import org.apache.wicket.request.mapper.parameter.PageParameters;
-import org.apache.wicket.spring.injection.annot.SpringBean;
public class Realms extends BasePage {
private static final long serialVersionUID = -1100228004207271270L;
- @SpringBean
- private RealmRestClient realmRestClient;
+ private final RealmRestClient realmRestClient = new RealmRestClient();
private final RealmSidebarPanel realmSidebarPanel;
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/pages/ResultStatusModal.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/ResultStatusModal.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/ResultStatusModal.java
index 855a61f..998ac60 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/ResultStatusModal.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/ResultStatusModal.java
@@ -36,6 +36,7 @@ import org.apache.syncope.client.console.commons.status.Status;
import org.apache.syncope.client.console.commons.status.StatusUtils;
import org.apache.syncope.client.console.panels.AbstractModalPanel;
import org.apache.syncope.client.console.panels.FailureMessageModal;
+import org.apache.syncope.client.console.rest.UserRestClient;
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.AttrTO;
@@ -107,7 +108,7 @@ public final class ResultStatusModal<T extends AnyTO> extends AbstractModalPanel
}
public ResultStatusModal<T> build() {
- return new ResultStatusModal<T>(modal, pageRef, this);
+ return new ResultStatusModal<>(modal, pageRef, this);
}
}
@@ -115,10 +116,11 @@ public final class ResultStatusModal<T extends AnyTO> extends AbstractModalPanel
final BaseModal<T> modal,
final PageReference pageRef,
final Builder<T> builder) {
+
super(modal, pageRef);
this.subject = builder.subject;
- statusUtils = new StatusUtils(this.userRestClient);
+ statusUtils = new StatusUtils(new UserRestClient());
if (builder.mode == null) {
this.mode = Mode.ADMIN;
} else {
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/pages/StatusModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/StatusModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/StatusModalPage.java
index f70c1c5..7dbe73e 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/StatusModalPage.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/StatusModalPage.java
@@ -31,6 +31,9 @@ import org.apache.syncope.client.console.commons.status.Status;
import org.apache.syncope.client.console.commons.status.StatusBean;
import org.apache.syncope.client.console.commons.status.StatusUtils;
import org.apache.syncope.client.console.panels.ActionDataTablePanel;
+import org.apache.syncope.client.console.rest.GroupRestClient;
+import org.apache.syncope.client.console.rest.ResourceRestClient;
+import org.apache.syncope.client.console.rest.UserRestClient;
import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
@@ -65,6 +68,12 @@ public class StatusModalPage<T extends AnyTO> extends AbstractStatusModalPage {
private static final long serialVersionUID = -9148734710505211261L;
+ private final UserRestClient userRestClient = new UserRestClient();
+
+ private final GroupRestClient groupRestClient = new GroupRestClient();
+
+ private final ResourceRestClient resourceRestClient = new ResourceRestClient();
+
private final AnyTO anyTO;
private int rowsPerPage = 10;
@@ -207,7 +216,7 @@ public class StatusModalPage<T extends AnyTO> extends AbstractStatusModalPage {
confirm = new PasswordTextField("confirm", new Model<String>());
pwdMgtForm.add(confirm.setRequired(false).setEnabled(false));
- changepwd = new AjaxCheckBoxPanel("changepwd", "changepwd", new Model<Boolean>(false));
+ changepwd = new AjaxCheckBoxPanel("changepwd", "changepwd", new Model<>(false));
pwdMgtForm.add(changepwd.setModelObject(false));
pwdMgtForm.add(new Label("changePwdLabel", new ResourceModel("changePwdLabel", "Password propagation")));
@@ -494,7 +503,7 @@ public class StatusModalPage<T extends AnyTO> extends AbstractStatusModalPage {
final List<ConnObjectWrapper> connObjects = statusUtils.getConnectorObjects(anyTO);
- final List<StatusBean> statusBeans = new ArrayList<StatusBean>(connObjects.size() + 1);
+ final List<StatusBean> statusBeans = new ArrayList<>(connObjects.size() + 1);
for (ConnObjectWrapper entry : connObjects) {
final StatusBean statusBean = statusUtils.getStatusBean(anyTO,
@@ -609,7 +618,7 @@ public class StatusModalPage<T extends AnyTO> extends AbstractStatusModalPage {
final AjaxRequestTarget target,
final Collection<StatusBean> selection,
final BulkActionResult bulkActionResult) {
- final List<String> resources = new ArrayList<String>(selection.size());
+ final List<String> resources = new ArrayList<>(selection.size());
for (StatusBean statusBean : selection) {
resources.add(statusBean.getResourceName());
}
@@ -617,7 +626,7 @@ public class StatusModalPage<T extends AnyTO> extends AbstractStatusModalPage {
final List<ConnObjectWrapper> connObjects = statusUtils.getConnectorObjects(Collections.singletonList(anyTO),
resources);
- final List<StatusBean> statusBeans = new ArrayList<StatusBean>(connObjects.size());
+ final List<StatusBean> statusBeans = new ArrayList<>(connObjects.size());
for (ConnObjectWrapper entry : connObjects) {
final StatusBean statusBean = statusUtils.getStatusBean(anyTO,
@@ -628,7 +637,7 @@ public class StatusModalPage<T extends AnyTO> extends AbstractStatusModalPage {
statusBeans.add(statusBean);
}
- target.add(modal.setContent(new BulkActionResultModalPage<StatusBean, String>(
+ target.add(modal.setContent(new BulkActionResultModalPage<>(
modal,
pageRef,
statusBeans,
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/pages/Workflow.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/Workflow.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/Workflow.java
index b16bd2a..3a0ef0b 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/Workflow.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/Workflow.java
@@ -19,6 +19,7 @@
package org.apache.syncope.client.console.pages;
import java.io.File;
+import org.apache.syncope.client.console.SyncopeConsoleApplication;
import org.apache.syncope.client.console.rest.WorkflowRestClient;
import org.apache.syncope.client.console.wicket.markup.html.link.VeilPopupSettings;
import org.apache.syncope.common.lib.types.Entitlement;
@@ -27,19 +28,15 @@ import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.image.Image;
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
import org.apache.wicket.model.Model;
-import org.apache.wicket.protocol.http.WebApplication;
import org.apache.wicket.request.mapper.parameter.PageParameters;
import org.apache.wicket.request.resource.DynamicImageResource;
import org.apache.wicket.request.resource.IResource;
-import org.apache.wicket.spring.injection.annot.SpringBean;
-import org.springframework.web.context.support.WebApplicationContextUtils;
public class Workflow extends BasePage {
private static final long serialVersionUID = -8781434495150074529L;
- @SpringBean
- private WorkflowRestClient wfRestClient;
+ private final WorkflowRestClient wfRestClient = new WorkflowRestClient();
public Workflow(final PageParameters parameters) {
super(parameters);
@@ -65,9 +62,7 @@ public class Workflow extends BasePage {
// Check if Activiti Modeler directory is found
boolean activitiModelerEnabled = false;
try {
- String activitiModelerDirectory = WebApplicationContextUtils.getWebApplicationContext(
- WebApplication.get().getServletContext()).getBean("activitiModelerDirectory", String.class);
- File baseDir = new File(activitiModelerDirectory);
+ File baseDir = new File(SyncopeConsoleApplication.get().getActivitiModelerDirectory());
activitiModelerEnabled = baseDir.exists() && baseDir.canRead() && baseDir.isDirectory();
} catch (Exception e) {
LOG.error("Could not check for Activiti Modeler directory", e);
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/pages/XMLEditorPopupPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/XMLEditorPopupPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/XMLEditorPopupPage.java
index c02d9ac..00d2c7f 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/XMLEditorPopupPage.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/XMLEditorPopupPage.java
@@ -33,15 +33,13 @@ import org.apache.wicket.markup.html.form.Button;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.TextArea;
import org.apache.wicket.model.Model;
-import org.apache.wicket.spring.injection.annot.SpringBean;
import org.apache.wicket.util.io.IOUtils;
public class XMLEditorPopupPage extends BasePopupPage {
private static final long serialVersionUID = 5816041644635271734L;
- @SpringBean
- private WorkflowRestClient wfRestClient;
+ private final WorkflowRestClient wfRestClient = new WorkflowRestClient();
public XMLEditorPopupPage() {
Form<?> wfForm = new Form<>("workflowDefForm");
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractModalPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractModalPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractModalPanel.java
index 96d538b..2c244b2 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractModalPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractModalPanel.java
@@ -18,16 +18,6 @@
*/
package org.apache.syncope.client.console.panels;
-import org.apache.syncope.client.console.init.MIMETypesLoader;
-import org.apache.syncope.client.console.rest.ConfigurationRestClient;
-import org.apache.syncope.client.console.rest.ConnectorRestClient;
-import org.apache.syncope.client.console.rest.ReportRestClient;
-import org.apache.syncope.client.console.rest.ResourceRestClient;
-import org.apache.syncope.client.console.rest.GroupRestClient;
-import org.apache.syncope.client.console.rest.SchemaRestClient;
-import org.apache.syncope.client.console.rest.TaskRestClient;
-import org.apache.syncope.client.console.rest.UserRestClient;
-import org.apache.syncope.client.console.rest.UserSelfRestClient;
import org.apache.syncope.client.console.wicket.markup.head.MetaHeaderItem;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.wicket.PageReference;
@@ -37,7 +27,6 @@ import org.apache.wicket.markup.head.IHeaderResponse;
import org.apache.wicket.markup.head.PriorityHeaderItem;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.panel.Panel;
-import org.apache.wicket.spring.injection.annot.SpringBean;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -61,36 +50,6 @@ public class AbstractModalPanel extends Panel {
protected final HeaderItem meta = new MetaHeaderItem("X-UA-Compatible", "IE=edge");
- @SpringBean
- protected UserRestClient userRestClient;
-
- @SpringBean
- protected UserSelfRestClient userSelfRestClient;
-
- @SpringBean
- protected GroupRestClient groupRestClient;
-
- @SpringBean
- protected TaskRestClient taskRestClient;
-
- @SpringBean
- protected SchemaRestClient schemaRestClient;
-
- @SpringBean
- protected ResourceRestClient resourceRestClient;
-
- @SpringBean
- protected ConnectorRestClient connectorRestClient;
-
- @SpringBean
- protected ReportRestClient reportRestClient;
-
- @SpringBean
- protected ConfigurationRestClient confRestClient;
-
- @SpringBean
- protected MIMETypesLoader mimeTypesInitializer;
-
public AbstractModalPanel(final BaseModal<?> modal, final PageReference pageRef) {
super(BaseModal.getContentId());
this.pageRef = pageRef;
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.java
index c55d6bd..68bafbe 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.java
@@ -41,7 +41,6 @@ import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.PropertyModel;
-import org.apache.wicket.spring.injection.annot.SpringBean;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -49,16 +48,12 @@ public abstract class AbstractSearchResultPanel<T extends AnyTO> extends Panel i
private static final long serialVersionUID = -9170191461250434024L;
- /**
- * Logger.
- */
protected static final Logger LOG = LoggerFactory.getLogger(AbstractSearchResultPanel.class);
/**
* Application preferences.
*/
- @SpringBean
- protected PreferenceManager prefMan;
+ protected PreferenceManager prefMan = new PreferenceManager();
protected final AbstractAnyRestClient restClient;
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/panels/AnySearchResultPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnySearchResultPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnySearchResultPanel.java
index 0940698..eacdb4f 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnySearchResultPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnySearchResultPanel.java
@@ -49,15 +49,13 @@ 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.spring.injection.annot.SpringBean;
import org.springframework.util.ReflectionUtils;
public class AnySearchResultPanel<T extends AnyTO> extends AbstractSearchResultPanel<T> {
private static final long serialVersionUID = -1100228004207271270L;
- @SpringBean
- protected SchemaRestClient schemaRestClient;
+ protected final SchemaRestClient schemaRestClient = new SchemaRestClient();
protected final List<String> schemaNames;
@@ -70,15 +68,16 @@ public class AnySearchResultPanel<T extends AnyTO> extends AbstractSearchResultP
public AnySearchResultPanel(final String type, final String parentId, final boolean filtered,
final String fiql, final PageReference callerRef, final AbstractAnyRestClient restClient,
final List<AnyTypeClassTO> anyTypeClassTOs, final String realm) {
+
super(parentId, filtered, fiql, callerRef, restClient, realm, type);
//setCustomMarkupId(markupId);
add(new Label("name", type));
- this.schemaNames = new ArrayList<String>();
+ this.schemaNames = new ArrayList<>();
for (AnyTypeClassTO anyTypeClassTO : anyTypeClassTOs) {
this.schemaNames.addAll(anyTypeClassTO.getPlainSchemas());
}
- this.dSchemaNames = new ArrayList<String>();
+ this.dSchemaNames = new ArrayList<>();
for (AnyTypeClassTO anyTypeClassTO : anyTypeClassTOs) {
this.dSchemaNames.addAll(anyTypeClassTO.getDerSchemas());
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorModal.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorModal.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorModal.java
index 349560c..2d981f6 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorModal.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorModal.java
@@ -28,6 +28,7 @@ import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.Predicate;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.pages.AbstractBasePage;
+import org.apache.syncope.client.console.rest.ConnectorRestClient;
import org.apache.syncope.client.console.topology.TopologyNode;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.common.lib.to.ConnBundleTO;
@@ -48,6 +49,8 @@ public class ConnectorModal extends AbstractResourceModal {
private static final long serialVersionUID = -2025535531121434050L;
+ private final ConnectorRestClient connectorRestClient = new ConnectorRestClient();
+
private final List<ConnBundleTO> bundles;
public ConnectorModal(
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupModalPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupModalPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupModalPanel.java
index 2e4caf5..9778881 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupModalPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupModalPanel.java
@@ -21,6 +21,7 @@ package org.apache.syncope.client.console.panels;
import org.apache.commons.lang3.SerializationUtils;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.commons.Mode;
+import org.apache.syncope.client.console.rest.GroupRestClient;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.common.lib.to.GroupTO;
import org.apache.wicket.PageReference;
@@ -39,6 +40,8 @@ public class GroupModalPanel extends AbstractModalPanel {
private static final long serialVersionUID = -1732493223434085205L;
+ private final GroupRestClient groupRestClient = new GroupRestClient();
+
protected final Mode mode;
protected final boolean createFlag;
@@ -49,6 +52,7 @@ public class GroupModalPanel extends AbstractModalPanel {
public GroupModalPanel(
final BaseModal<?> modal, final PageReference pageRef, final GroupTO groupTO) {
+
this(modal, pageRef, groupTO, Mode.ADMIN);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/panels/Realm.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/Realm.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/Realm.java
index 68a0b79..bea0610 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/Realm.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/Realm.java
@@ -35,7 +35,6 @@ import org.apache.wicket.extensions.markup.html.tabs.AbstractTab;
import org.apache.wicket.extensions.markup.html.tabs.ITab;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.Model;
-import org.apache.wicket.spring.injection.annot.SpringBean;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -49,17 +48,13 @@ public class Realm extends Panel {
private final List<AnyTypeTO> anyTypeTOs;
- @SpringBean
- private AnyTypeRestClient anyTypeRestClient;
+ private final AnyTypeRestClient anyTypeRestClient = new AnyTypeRestClient();
- @SpringBean
- private UserRestClient userRestClient;
+ private final UserRestClient userRestClient = new UserRestClient();
- @SpringBean
- private GroupRestClient groupRestClient;
+ private final GroupRestClient groupRestClient = new GroupRestClient();
- @SpringBean
- private AnyObjectRestClient anyObjectRestClient;
+ private final AnyObjectRestClient anyObjectRestClient = new AnyObjectRestClient();
@SuppressWarnings({ "unchecked", "unchecked" })
public Realm(final String id, final RealmTO realmTO, final PageReference pageReference) {
@@ -120,7 +115,7 @@ public class Realm extends Panel {
anyTypeTO.getClasses()), realmTO.getFullPath());
break;
case ANY_OBJECT:
- panel = new AnySearchResultPanel(anyTypeTO.getKey(), id,
+ panel = new AnySearchResultPanel<>(anyTypeTO.getKey(), id,
false, null, pageReference, anyObjectRestClient, anyTypeRestClient.getAnyTypeClass(
anyTypeTO.getClasses()), realmTO.getFullPath());
break;
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmModalPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmModalPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmModalPanel.java
index 9ea299f..51c66e1 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmModalPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmModalPanel.java
@@ -31,18 +31,16 @@ import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
import org.apache.wicket.markup.html.form.Form;
-import org.apache.wicket.spring.injection.annot.SpringBean;
public class RealmModalPanel extends AbstractModalPanel {
private static final long serialVersionUID = -4285220460543213901L;
- protected RealmTO realmTO;
+ private final RealmRestClient realmRestClient = new RealmRestClient();
- private boolean newRealm = false;
+ private RealmTO realmTO;
- @SpringBean
- private RealmRestClient realmRestClient;
+ private boolean newRealm = false;
private final String parentPath;
@@ -52,6 +50,7 @@ public class RealmModalPanel extends AbstractModalPanel {
final RealmTO realmTO,
final String parentPath,
final String entitlement) {
+
this(modal, pageRef, realmTO, parentPath, entitlement, false);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmSidebarPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmSidebarPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmSidebarPanel.java
index 221a05b..eb899c9 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmSidebarPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmSidebarPanel.java
@@ -44,14 +44,12 @@ import org.apache.wicket.markup.html.panel.Fragment;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.markup.repeater.RepeatingView;
import org.apache.wicket.model.PropertyModel;
-import org.apache.wicket.spring.injection.annot.SpringBean;
public class RealmSidebarPanel extends Panel {
private static final long serialVersionUID = -1100228004207271270L;
- @SpringBean
- private RealmRestClient realmRestClient;
+ private final RealmRestClient realmRestClient = new RealmRestClient();
private final WebMarkupContainer menu;
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java
index cdce531..dbb3f37 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java
@@ -26,14 +26,12 @@ import org.apache.syncope.client.console.rest.ConnectorRestClient;
import org.apache.syncope.common.lib.to.ResourceTO;
import org.apache.syncope.common.lib.types.ConnConfProperty;
import org.apache.wicket.model.IModel;
-import org.apache.wicket.spring.injection.annot.SpringBean;
public abstract class ResourceConnConfPanel extends AbstractConnectorConfPanel<ResourceTO> {
private static final long serialVersionUID = -7982691107029848579L;
- @SpringBean
- private ConnectorRestClient restClient;
+ private ConnectorRestClient restClient = new ConnectorRestClient();
private final boolean createFlag;
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java
index cdc3fc0..330a4c2 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java
@@ -60,7 +60,6 @@ import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.PropertyModel;
import org.apache.wicket.model.ResourceModel;
-import org.apache.wicket.spring.injection.annot.SpringBean;
/**
* Resource mapping panel.
@@ -87,14 +86,12 @@ public class ResourceMappingPanel extends Panel {
/**
* Schema rest client.
*/
- @SpringBean
- private SchemaRestClient schemaRestClient;
+ private final SchemaRestClient schemaRestClient = new SchemaRestClient();
/**
* ConnInstance rest client.
*/
- @SpringBean
- private ConnectorRestClient connRestClient;
+ private final ConnectorRestClient connRestClient = new ConnectorRestClient();
/**
* Resource schema name.
[28/28] syncope git commit: Merge branch 'master' into SYNCOPE-156
Posted by fm...@apache.org.
Merge branch 'master' into SYNCOPE-156
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/c8ebb347
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/c8ebb347
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/c8ebb347
Branch: refs/heads/master
Commit: c8ebb34791c43956baec6ca376aaf02b9d57b456
Parents: e9bf6d1 11ce363
Author: fmartelli <fa...@gmail.com>
Authored: Fri Oct 30 12:35:37 2015 +0100
Committer: fmartelli <fa...@gmail.com>
Committed: Fri Oct 30 12:35:37 2015 +0100
----------------------------------------------------------------------
client/lib/src/main/resources/META-INF/cxf/org.apache.cxf.Logger | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
[20/28] syncope git commit: Merge branch 'master' into SYNCOPE-156
Posted by fm...@apache.org.
Merge branch 'master' into SYNCOPE-156
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/0362480a
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/0362480a
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/0362480a
Branch: refs/heads/master
Commit: 0362480ada657e1f92539f3025ad771e798678e0
Parents: 66d3a50 7f584fb
Author: fmartelli <fa...@gmail.com>
Authored: Mon Oct 26 09:06:31 2015 +0100
Committer: fmartelli <fa...@gmail.com>
Committed: Mon Oct 26 09:06:31 2015 +0100
----------------------------------------------------------------------
.../syncope/client/cli/AvailableServices.java | 31 -----
.../cli/commands/CommonsResultManager.java | 18 +++
.../connector/AbstractConnectorCommand.java | 30 +++++
.../commands/connector/ConnectorCommand.java | 123 +++++++++++++++++++
.../cli/commands/connector/ConnectorDelete.java | 62 ++++++++++
.../cli/commands/connector/ConnectorList.java | 32 +++++
.../connector/ConnectorListBundles.java | 32 +++++
.../ConnectorListConfigurationProperties.java | 58 +++++++++
.../cli/commands/connector/ConnectorRead.java | 61 +++++++++
.../connector/ConnectorReadByResource.java | 60 +++++++++
.../connector/ConnectorResultManager.java | 98 +++++++++++++++
.../commands/policy/PolicyResultManager.java | 3 +
.../client/cli/commands/report/ReportList.java | 2 +-
.../client/cli/commands/report/ReportRead.java | 2 +-
.../commands/report/ReportResultManager.java | 17 +--
.../resource/AbstractResourceCommand.java | 30 +++++
.../cli/commands/resource/ResourceCommand.java | 109 ++++++++++++++++
.../cli/commands/resource/ResourceDelete.java | 56 +++++++++
.../cli/commands/resource/ResourceList.java | 32 +++++
.../cli/commands/resource/ResourceRead.java | 60 +++++++++
.../resource/ResourceResultManager.java | 95 ++++++++++++++
pom.xml | 2 +-
22 files changed, 971 insertions(+), 42 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/0362480a/pom.xml
----------------------------------------------------------------------
[11/28] syncope git commit: [SYNCOPE-156] merge confirmation on
resource/connector deletion
Posted by fm...@apache.org.
[SYNCOPE-156] merge confirmation on resource/connector deletion
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/2a7cf5ae
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/2a7cf5ae
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/2a7cf5ae
Branch: refs/heads/master
Commit: 2a7cf5aebc31752501bc2ba88e8b0cd41138ae02
Parents: 21262a6
Author: fmartelli <fa...@gmail.com>
Authored: Wed Sep 30 13:59:18 2015 +0200
Committer: fmartelli <fa...@gmail.com>
Committed: Wed Sep 30 13:59:18 2015 +0200
----------------------------------------------------------------------
.../client/console/SyncopeConsoleSession.java | 4 +++
.../syncope/client/console/pages/BasePage.java | 2 +-
.../client/console/panels/ConnectorModal.java | 8 ++---
.../console/panels/ResourceMappingPanel.java | 35 +++++++-------------
.../client/console/panels/ResourceModal.java | 8 ++---
.../client/console/rest/BaseRestClient.java | 10 ++++++
.../console/rest/ConnectorRestClient.java | 9 +++--
.../client/console/rest/ResourceRestClient.java | 7 ++--
.../console/topology/TopologyNodePanel.java | 4 +++
.../console/panels/ResourceMappingPanel.html | 10 +++---
10 files changed, 57 insertions(+), 40 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/2a7cf5ae/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
index 8d71645..f48611f 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
@@ -222,4 +222,8 @@ public class SyncopeConsoleSession extends AuthenticatedWebSession {
return DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, locale);
}
+
+ public MediaType getMediaType() {
+ return clientFactory.getContentType().getMediaType();
+ }
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2a7cf5ae/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java
index 622d204..bcbd3bf 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java
@@ -183,7 +183,7 @@ public class BasePage extends AbstractBasePage implements IAjaxIndicatorAware {
* @param modal window
* @param container container
*/
- public void setWindowClosedCallback(final BaseModal modal, final WebMarkupContainer container) {
+ public void setWindowClosedCallback(final BaseModal<?> modal, final WebMarkupContainer container) {
modal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
private static final long serialVersionUID = 8804221891699487139L;
http://git-wip-us.apache.org/repos/asf/syncope/blob/2a7cf5ae/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorModal.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorModal.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorModal.java
index 95f013f..349560c 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorModal.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorModal.java
@@ -151,12 +151,12 @@ public class ConnectorModal extends AbstractResourceModal {
try {
if (connInstanceTO.getKey() == 0) {
- connectorRestClient.create(connInstanceTO);
+ final ConnInstanceTO actual = connectorRestClient.create(connInstanceTO);
send(pageRef.getPage(), Broadcast.BREADTH, new CreateEvent(
- connInstanceTO.getKey(),
- connInstanceTO.getDisplayName(),
+ actual.getKey(),
+ actual.getDisplayName(),
TopologyNode.Kind.CONNECTOR,
- URI.create(connInstanceTO.getLocation()).toASCIIString(),
+ URI.create(actual.getLocation()).toASCIIString(),
target));
} else {
connectorRestClient.update(connInstanceTO);
http://git-wip-us.apache.org/repos/asf/syncope/blob/2a7cf5ae/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java
index 7a7295a..cdc3fc0 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java
@@ -18,6 +18,7 @@
*/
package org.apache.syncope.client.console.panels;
+import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@@ -28,8 +29,9 @@ import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.commons.JexlHelpUtils;
import org.apache.syncope.client.console.rest.ConnectorRestClient;
import org.apache.syncope.client.console.rest.SchemaRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPanel;
-import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDecoratedCheckbox;
import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
import org.apache.syncope.client.console.wicket.markup.html.form.FieldPanel;
@@ -41,12 +43,10 @@ import org.apache.syncope.common.lib.to.ProvisionTO;
import org.apache.syncope.common.lib.to.ResourceTO;
import org.apache.syncope.common.lib.types.AnyTypeKind;
import org.apache.syncope.common.lib.types.ConnConfProperty;
+import org.apache.syncope.common.lib.types.Entitlement;
import org.apache.syncope.common.lib.types.IntMappingType;
import org.apache.syncope.common.lib.types.MappingPurpose;
-import org.apache.wicket.Component;
import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.attributes.AjaxCallListener;
-import org.apache.wicket.ajax.attributes.AjaxRequestAttributes;
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.ajax.markup.html.form.AjaxButton;
@@ -231,12 +231,15 @@ public class ResourceMappingPanel extends Panel {
entity = mapItem.getIntMappingType().getAnyTypeKind();
}
- item.add(new AjaxDecoratedCheckbox("toRemove", new Model<>(Boolean.FALSE)) {
+ final ActionLinksPanel.Builder<Serializable> actions = ActionLinksPanel.builder(
+ getPage().getPageReference());
- private static final long serialVersionUID = 7170946748485726506L;
+ actions.add(new ActionLink<Serializable>() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
@Override
- protected void onUpdate(final AjaxRequestTarget target) {
+ public void onClick(final AjaxRequestTarget target, final Serializable ignore) {
int index = -1;
for (int i = 0; i < getMapping().getItems().size() && index == -1; i++) {
if (mapItem.equals(getMapping().getItems().get(i))) {
@@ -250,23 +253,9 @@ public class ResourceMappingPanel extends Panel {
target.add(ResourceMappingPanel.this);
}
}
+ }, ActionLink.ActionType.DELETE, Entitlement.RESOURCE_UPDATE);
- @Override
- protected void updateAjaxAttributes(final AjaxRequestAttributes attributes) {
- super.updateAjaxAttributes(attributes);
-
- AjaxCallListener ajaxCallListener = new AjaxCallListener() {
-
- private static final long serialVersionUID = 7160235486520935153L;
-
- @Override
- public CharSequence getPrecondition(final Component component) {
- return "if (!confirm('" + getString("confirmDelete") + "')) return false;";
- }
- };
- attributes.getAjaxCallListeners().add(ajaxCallListener);
- }
- });
+ item.add(actions.build("toRemove"));
final AjaxDropDownChoicePanel<String> intAttrNames = new AjaxDropDownChoicePanel<>(
"intAttrNames",
http://git-wip-us.apache.org/repos/asf/syncope/blob/2a7cf5ae/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceModal.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceModal.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceModal.java
index 1f9ae6b..7ea5e96 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceModal.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceModal.java
@@ -233,12 +233,12 @@ public class ResourceModal extends AbstractResourceModal {
} else {
try {
if (createFlag) {
- resourceRestClient.create(resourceTO);
+ final ResourceTO actual = resourceRestClient.create(resourceTO);
send(pageRef.getPage(), Broadcast.BREADTH, new CreateEvent(
- resourceTO.getKey(),
- resourceTO.getKey(),
+ actual.getKey(),
+ actual.getKey(),
TopologyNode.Kind.RESOURCE,
- resourceTO.getConnector(),
+ actual.getConnector(),
target));
} else {
resourceRestClient.update(resourceTO);
http://git-wip-us.apache.org/repos/asf/syncope/blob/2a7cf5ae/client/console/src/main/java/org/apache/syncope/client/console/rest/BaseRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/BaseRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/BaseRestClient.java
index 0e6fe2c..650818b 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/rest/BaseRestClient.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/BaseRestClient.java
@@ -19,9 +19,12 @@
package org.apache.syncope.client.console.rest;
import java.io.Serializable;
+import java.net.URI;
+import org.apache.cxf.jaxrs.client.WebClient;
import org.apache.syncope.client.console.SyncopeConsoleSession;
import org.apache.syncope.client.lib.SyncopeClient;
import org.apache.syncope.common.lib.search.OrderByClauseBuilder;
+import org.apache.syncope.common.rest.api.service.JAXRSService;
import org.apache.wicket.extensions.markup.html.repeater.util.SortParam;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -60,4 +63,11 @@ public abstract class BaseRestClient implements Serializable {
return builder.build();
}
+
+ protected <E extends JAXRSService, T> T getObject(final E service, final URI location, final Class<T> resultClass) {
+ WebClient webClient = WebClient.fromClient(WebClient.client(service));
+ webClient.accept(SyncopeConsoleSession.get().getMediaType()).to(location.toASCIIString(), false);
+
+ return webClient.get(resultClass);
+ }
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/2a7cf5ae/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 d3d18c8..2414070 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
@@ -23,6 +23,7 @@ import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
+import javax.ws.rs.core.Response;
import org.apache.syncope.client.console.SyncopeConsoleSession;
import org.apache.syncope.common.lib.SyncopeClientException;
import org.apache.syncope.common.lib.to.BulkAction;
@@ -56,11 +57,15 @@ public class ConnectorRestClient extends BaseRestClient {
return connectors;
}
- public void create(final ConnInstanceTO connectorTO) {
+ public ConnInstanceTO create(final ConnInstanceTO connectorTO) {
Set<ConnConfProperty> filteredConf = filterProperties(connectorTO.getConfiguration());
connectorTO.getConfiguration().clear();
connectorTO.getConfiguration().addAll(filteredConf);
- getService(ConnectorService.class).create(connectorTO);
+
+ final ConnectorService service = getService(ConnectorService.class);
+ final Response response = service.create(connectorTO);
+
+ return getObject(service, response.getLocation(), ConnInstanceTO.class);
}
/**
http://git-wip-us.apache.org/repos/asf/syncope/blob/2a7cf5ae/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 5efa119..3a99c1d 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
@@ -19,6 +19,7 @@
package org.apache.syncope.client.console.rest;
import java.util.List;
+import javax.ws.rs.core.Response;
import org.apache.syncope.client.console.SyncopeConsoleSession;
import org.apache.syncope.common.lib.SyncopeClientException;
import org.apache.syncope.common.lib.to.BulkAction;
@@ -53,8 +54,10 @@ public class ResourceRestClient extends BaseRestClient {
return resources;
}
- public void create(final ResourceTO resourceTO) {
- getService(ResourceService.class).create(resourceTO);
+ public ResourceTO create(final ResourceTO resourceTO) {
+ final ResourceService service = getService(ResourceService.class);
+ final Response response = service.create(resourceTO);
+ return getObject(service, response.getLocation(), ResourceTO.class);
}
public ResourceTO read(final String name) {
http://git-wip-us.apache.org/repos/asf/syncope/blob/2a7cf5ae/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyNodePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyNodePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyNodePanel.java
index 9545c31..ff40a8f 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyNodePanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyNodePanel.java
@@ -30,6 +30,7 @@ import org.apache.syncope.client.console.panels.ResourceModal;
import org.apache.syncope.client.console.rest.ConnectorRestClient;
import org.apache.syncope.client.console.rest.ResourceRestClient;
import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicatingAjaxLink;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.confirmation.ConfirmationModalBehavior;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.common.lib.SyncopeClientException;
import org.apache.syncope.common.lib.to.ConnInstanceTO;
@@ -176,6 +177,7 @@ public class TopologyNodePanel extends Panel implements IAjaxIndicatorAware {
}
};
fragment.add(delete);
+ delete.add(new ConfirmationModalBehavior());
MetaDataRoleAuthorizationStrategy.authorize(delete, ENABLE, Entitlement.CONNECTOR_DELETE);
@@ -257,6 +259,8 @@ public class TopologyNodePanel extends Panel implements IAjaxIndicatorAware {
};
fragment.add(delete);
+ delete.add(new ConfirmationModalBehavior());
+
MetaDataRoleAuthorizationStrategy.authorize(delete, ENABLE, Entitlement.RESOURCE_DELETE);
final AjaxLink<String> edit = new ClearIndicatingAjaxLink<String>("edit", pageRef) {
http://git-wip-us.apache.org/repos/asf/syncope/blob/2a7cf5ae/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceMappingPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceMappingPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceMappingPanel.html
index ccedbb8..7623837 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceMappingPanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceMappingPanel.html
@@ -25,7 +25,6 @@ under the License.
wicket:id="mappingContainer">
<tbody>
<tr>
- <th><wicket:message key="delete"/></th>
<th><wicket:message key="entity"/></th>
<th><wicket:message key="intMappingTypes"/></th>
<th><wicket:message key="intAttrNames"/></th>
@@ -46,12 +45,10 @@ under the License.
<th><wicket:message key="connObjectKey"/></th>
<th><label wicket:id="passwordLabel"/></th>
<th><wicket:message key="purpose"/></th>
+ <th><i class="fa fa-trash"></i></th>
</tr>
<tr wicket:id="mappings">
<td>
- <input type="checkbox" class="text ui-widget-content ui-corner-all" wicket:id="toRemove"/>
- </td>
- <td>
<span wicket:id="entities">[entities]</span>
</td>
<td>
@@ -77,6 +74,11 @@ under the License.
<span wicket:id="purposeActions">[purpose]</span>
</div>
</td>
+ <td>
+ <div style="margin: 10px 0px 10px 0px">
+ <span wicket:id="toRemove"/>
+ </div>
+ </td>
</tr>
</tbody>
[02/28] syncope git commit: [SYNCOPE-156] fix for ajax component
panels
Posted by fm...@apache.org.
[SYNCOPE-156] fix for ajax component panels
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/b2e93ca7
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/b2e93ca7
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/b2e93ca7
Branch: refs/heads/master
Commit: b2e93ca73f22b8a28fc6565d8c9da0fcd8ad9514
Parents: 767a30a
Author: fmartelli <fa...@gmail.com>
Authored: Wed Sep 23 15:10:10 2015 +0200
Committer: fmartelli <fa...@gmail.com>
Committed: Wed Sep 23 15:10:10 2015 +0200
----------------------------------------------------------------------
.../syncope/client/console/pages/Login.java | 5 +-
.../console/panels/AbstractModalPanel.java | 8 +-
.../console/panels/AbstractResourceModal.java | 9 +-
.../client/console/panels/ConnectorModal.java | 192 +++++++---------
.../console/panels/FailureMessageModal.java | 8 +-
.../client/console/panels/GroupModalPanel.java | 11 +-
.../console/panels/GroupSearchResultPanel.java | 5 +-
.../client/console/panels/ModalContent.java | 103 ---------
.../client/console/panels/RealmModalPanel.java | 7 +-
.../console/panels/ResourceConnConfPanel.java | 2 +-
.../console/panels/ResourceDetailsPanel.java | 131 +++--------
.../client/console/panels/ResourceModal.java | 209 +++++++++---------
.../console/panels/ResourceSecurityPanel.java | 16 +-
.../client/console/topology/Topology.java | 31 ++-
.../console/topology/TopologyNodePanel.java | 93 +++++---
.../markup/html/bootstrap/dialog/BaseModal.java | 35 ++-
.../markup/html/form/AbstractFieldPanel.java | 29 ++-
.../markup/html/form/AjaxCheckBoxPanel.java | 4 +
.../html/form/AjaxDropDownChoicePanel.java | 22 +-
.../markup/html/form/AjaxPalettePanel.java | 2 +-
.../markup/html/form/AjaxTextFieldPanel.java | 4 +-
.../form/CheckBoxMultipleChoiceFieldPanel.java | 2 +-
.../wicket/markup/html/form/FieldPanel.java | 17 +-
.../markup/html/form/MultiFieldPanel.java | 103 ++++++---
.../markup/html/form/SpinnerFieldPanel.java | 184 ++++------------
.../html/list/ConnConfPropertyListView.java | 6 +-
.../META-INF/resources/css/syncopeConsole.css | 5 +-
.../syncope/client/console/pages/Login.html | 29 ++-
.../client/console/panels/ConnectorModal.html | 219 +++++++++----------
.../client/console/panels/ModalContent.html | 45 ----
.../console/panels/ModalContent.properties | 20 --
.../console/panels/ModalContent_it.properties | 20 --
.../panels/ModalContent_pt_BR.properties | 20 --
.../console/panels/ResourceDetailsPanel.html | 146 +++----------
.../client/console/panels/ResourceModal.html | 33 +--
.../console/panels/ResourceSecurityPanel.html | 43 +---
.../markup/html/form/AjaxCheckBoxPanel.html | 18 +-
.../html/form/AjaxDropDownChoicePanel.html | 11 +-
.../markup/html/form/AjaxTextFieldPanel.html | 19 +-
.../markup/html/form/MultiFieldPanel.html | 49 ++++-
.../markup/html/form/SpinnerFieldPanel.html | 11 +-
pom.xml | 3 +-
42 files changed, 808 insertions(+), 1121 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/java/org/apache/syncope/client/console/pages/Login.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/Login.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/Login.java
index 23fb25f..7e56e92 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/Login.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/Login.java
@@ -18,6 +18,7 @@
*/
package org.apache.syncope.client.console.pages;
+import de.agilecoders.wicket.extensions.markup.html.bootstrap.form.select.BootstrapSelect;
import java.security.AccessControlException;
import java.util.Locale;
import org.apache.syncope.client.console.SyncopeConsoleApplication;
@@ -120,7 +121,7 @@ public class Login extends WebPage {
/**
* Inner class which implements (custom) Locale DropDownChoice component.
*/
- private class LocaleDropDown extends DropDownChoice<Locale> {
+ private class LocaleDropDown extends BootstrapSelect<Locale> {
private static final long serialVersionUID = 2349382679992357202L;
@@ -171,7 +172,7 @@ public class Login extends WebPage {
/**
* Inner class which implements (custom) Domain DropDownChoice component.
*/
- private class DomainDropDown extends DropDownChoice<String> {
+ private class DomainDropDown extends BootstrapSelect<String> {
private static final long serialVersionUID = -7401167913360133325L;
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractModalPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractModalPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractModalPanel.java
index 139283f..96d538b 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractModalPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractModalPanel.java
@@ -30,6 +30,7 @@ import org.apache.syncope.client.console.rest.UserRestClient;
import org.apache.syncope.client.console.rest.UserSelfRestClient;
import org.apache.syncope.client.console.wicket.markup.head.MetaHeaderItem;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
+import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.markup.head.HeaderItem;
import org.apache.wicket.markup.head.IHeaderResponse;
@@ -54,6 +55,10 @@ public class AbstractModalPanel extends Panel {
protected static final String APPLY = "apply";
+ protected static final String FORM = "form";
+
+ protected final PageReference pageRef;
+
protected final HeaderItem meta = new MetaHeaderItem("X-UA-Compatible", "IE=edge");
@SpringBean
@@ -86,8 +91,9 @@ public class AbstractModalPanel extends Panel {
@SpringBean
protected MIMETypesLoader mimeTypesInitializer;
- public AbstractModalPanel(final BaseModal<?> modal) {
+ public AbstractModalPanel(final BaseModal<?> modal, final PageReference pageRef) {
super(BaseModal.getContentId());
+ this.pageRef = pageRef;
this.modal = modal;
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractResourceModal.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractResourceModal.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractResourceModal.java
index 1ed9050..fa18012 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractResourceModal.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractResourceModal.java
@@ -20,19 +20,20 @@ package org.apache.syncope.client.console.panels;
import java.io.Serializable;
import org.apache.syncope.client.console.topology.TopologyNode;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal.ModalEvent;
import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
/**
* Modal window with Resource form.
*/
-public abstract class AbstractResourceModal extends ModalContent {
+public abstract class AbstractResourceModal extends AbstractModalPanel {
private static final long serialVersionUID = 1734415311027284221L;
- public AbstractResourceModal(final ModalWindow window, final PageReference pageRef) {
- super(window, pageRef);
+ public AbstractResourceModal(final BaseModal<?> modal, final PageReference pageRef) {
+ super(modal, pageRef);
}
public static class CreateEvent extends ModalEvent {
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorModal.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorModal.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorModal.java
index 4f5e8eb..8a1ecdb 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorModal.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorModal.java
@@ -18,6 +18,7 @@
*/
package org.apache.syncope.client.console.panels;
+import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@@ -30,6 +31,7 @@ import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.topology.Topology;
import org.apache.syncope.client.console.topology.TopologyNode;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
import org.apache.syncope.client.console.wicket.markup.html.form.CheckBoxMultipleChoiceFieldPanel;
@@ -42,16 +44,13 @@ import org.apache.syncope.common.lib.to.ConnPoolConfTO;
import org.apache.syncope.common.lib.types.ConnConfPropSchema;
import org.apache.syncope.common.lib.types.ConnConfProperty;
import org.apache.syncope.common.lib.types.ConnectorCapability;
-import org.apache.syncope.common.lib.types.Entitlement;
import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.form.AjaxFormChoiceComponentUpdatingBehavior;
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
import org.apache.wicket.ajax.markup.html.form.AjaxButton;
-import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
import org.apache.wicket.event.Broadcast;
import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
-import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.DropDownChoice;
@@ -82,10 +81,16 @@ public class ConnectorModal extends AbstractResourceModal {
private final WebMarkupContainer propertiesContainer;
+ private final ListView<ConnConfProperty> connPropView;
+
+ private final ConnInstanceTO connInstanceTO;
+
public ConnectorModal(
- final ModalWindow window, final PageReference pageRef, final ConnInstanceTO connInstanceTO) {
+ final BaseModal<Serializable> modal, final PageReference pageRef, final ConnInstanceTO connInstanceTO) {
+
+ super(modal, pageRef);
- super(window, pageRef);
+ this.connInstanceTO = connInstanceTO;
this.add(new Label("new", connInstanceTO.getKey() == 0
? new ResourceModel("new")
@@ -122,15 +127,9 @@ public class ConnectorModal extends AbstractResourceModal {
bundleTO = getSelectedBundleTO(connInstanceTO);
properties = fillProperties(bundleTO, connInstanceTO);
- // form - first tab
- final Form<ConnInstanceTO> connectorForm = new Form<>(FORM);
- connectorForm.setModel(new CompoundPropertyModel<>(connInstanceTO));
- connectorForm.setOutputMarkupId(true);
- add(connectorForm);
-
propertiesContainer = new WebMarkupContainer("container");
propertiesContainer.setOutputMarkupId(true);
- connectorForm.add(propertiesContainer);
+ add(propertiesContainer);
final Form<ConnInstanceTO> connectorPropForm = new Form<>("connectorPropForm");
connectorPropForm.setModel(new CompoundPropertyModel<>(connInstanceTO));
@@ -141,7 +140,7 @@ public class ConnectorModal extends AbstractResourceModal {
"displayName", "display name", new PropertyModel<String>(connInstanceTO, "displayName"));
displayName.setOutputMarkupId(true);
displayName.addRequiredLabel();
- connectorForm.add(displayName);
+ add(displayName);
final AjaxDropDownChoicePanel<String> location = new AjaxDropDownChoicePanel<>("location", "location",
new Model<>(bundleTO == null ? connInstanceTO.getLocation() : bundleTO.getLocation()));
@@ -153,7 +152,7 @@ public class ConnectorModal extends AbstractResourceModal {
location.setOutputMarkupId(true);
location.setEnabled(connInstanceTO.getKey() == 0 && StringUtils.isBlank(connInstanceTO.getLocation()));
location.getField().setOutputMarkupId(true);
- connectorForm.add(location);
+ add(location);
final AjaxDropDownChoicePanel<String> connectorName = new AjaxDropDownChoicePanel<>("connectorName",
"connectorName",
@@ -170,7 +169,7 @@ public class ConnectorModal extends AbstractResourceModal {
connectorName.setOutputMarkupId(true);
connectorName.setEnabled(connInstanceTO.getKey() == 0);
connectorName.getField().setOutputMarkupId(true);
- connectorForm.add(connectorName);
+ add(connectorName);
final AjaxDropDownChoicePanel<String> version = new AjaxDropDownChoicePanel<>("version", "version",
new Model<>(bundleTO == null ? null : bundleTO.getVersion()));
@@ -185,13 +184,13 @@ public class ConnectorModal extends AbstractResourceModal {
version.setOutputMarkupId(true);
version.addRequiredLabel();
version.getField().setOutputMarkupId(true);
- connectorForm.add(version);
+ add(version);
final SpinnerFieldPanel<Integer> connRequestTimeout = new SpinnerFieldPanel<>("connRequestTimeout",
"connRequestTimeout", Integer.class,
new PropertyModel<Integer>(connInstanceTO, "connRequestTimeout"), 0, null);
connRequestTimeout.getField().add(new RangeValidator<>(0, Integer.MAX_VALUE));
- connectorForm.add(connRequestTimeout);
+ add(connRequestTimeout);
if (connInstanceTO.getPoolConf() == null) {
connInstanceTO.setPoolConf(new ConnPoolConfTO());
@@ -200,27 +199,27 @@ public class ConnectorModal extends AbstractResourceModal {
Integer.class,
new PropertyModel<Integer>(connInstanceTO.getPoolConf(), "maxObjects"), 0, null);
poolMaxObjects.getField().add(new RangeValidator<>(0, Integer.MAX_VALUE));
- connectorForm.add(poolMaxObjects);
+ add(poolMaxObjects);
final SpinnerFieldPanel<Integer> poolMinIdle = new SpinnerFieldPanel<>("poolMinIdle", "poolMinIdle",
Integer.class,
new PropertyModel<Integer>(connInstanceTO.getPoolConf(), "minIdle"), 0, null);
poolMinIdle.getField().add(new RangeValidator<>(0, Integer.MAX_VALUE));
- connectorForm.add(poolMinIdle);
+ add(poolMinIdle);
final SpinnerFieldPanel<Integer> poolMaxIdle = new SpinnerFieldPanel<>("poolMaxIdle", "poolMaxIdle",
Integer.class,
new PropertyModel<Integer>(connInstanceTO.getPoolConf(), "maxIdle"), 0, null);
poolMaxIdle.getField().add(new RangeValidator<>(0, Integer.MAX_VALUE));
- connectorForm.add(poolMaxIdle);
+ add(poolMaxIdle);
final SpinnerFieldPanel<Long> poolMaxWait = new SpinnerFieldPanel<>("poolMaxWait", "poolMaxWait", Long.class,
new PropertyModel<Long>(connInstanceTO.getPoolConf(), "maxWait"), 0L, null);
poolMaxWait.getField().add(new RangeValidator<>(0L, Long.MAX_VALUE));
- connectorForm.add(poolMaxWait);
+ add(poolMaxWait);
final SpinnerFieldPanel<Long> poolMinEvictableIdleTime = new SpinnerFieldPanel<>("poolMinEvictableIdleTime",
"poolMinEvictableIdleTime", Long.class,
new PropertyModel<Long>(connInstanceTO.getPoolConf(), "minEvictableIdleTimeMillis"),
0L, null);
poolMinEvictableIdleTime.getField().add(new RangeValidator<>(0L, Long.MAX_VALUE));
- connectorForm.add(poolMinEvictableIdleTime);
+ add(poolMinEvictableIdleTime);
// form - first tab - onchange()
location.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
@@ -284,7 +283,7 @@ public class ConnectorModal extends AbstractResourceModal {
});
// form - second tab (properties)
- final ListView<ConnConfProperty> connPropView = new ConnConfPropertyListView("connectorProperties",
+ connPropView = new ConnConfPropertyListView("connectorProperties",
new PropertyModel<List<ConnConfProperty>>(this, "properties"),
true, connInstanceTO.getConfiguration());
connPropView.setOutputMarkupId(true);
@@ -309,14 +308,14 @@ public class ConnectorModal extends AbstractResourceModal {
error(getString("error_connection"));
}
- feedbackPanel.refresh(target);
+ modal.getFeedbackPanel().refresh(target);
}
};
connectorPropForm.add(check);
// form - third tab (capabilities)
- final IModel<List<ConnectorCapability>> capabilities =
- new LoadableDetachableModel<List<ConnectorCapability>>() {
+ final IModel<List<ConnectorCapability>> capabilities
+ = new LoadableDetachableModel<List<ConnectorCapability>>() {
private static final long serialVersionUID = 5275935387613157437L;
@@ -325,8 +324,8 @@ public class ConnectorModal extends AbstractResourceModal {
return Arrays.asList(ConnectorCapability.values());
}
};
- CheckBoxMultipleChoiceFieldPanel<ConnectorCapability> capabilitiesPalette =
- new CheckBoxMultipleChoiceFieldPanel<>(
+ CheckBoxMultipleChoiceFieldPanel<ConnectorCapability> capabilitiesPalette
+ = new CheckBoxMultipleChoiceFieldPanel<>(
"capabilitiesPalette",
new PropertyModel<List<ConnectorCapability>>(this, "selectedCapabilities"), capabilities);
@@ -339,86 +338,7 @@ public class ConnectorModal extends AbstractResourceModal {
}
});
- connectorForm.add(capabilitiesPalette);
-
- // form - submit / cancel buttons
- final AjaxButton submit = new IndicatingAjaxButton(APPLY, new Model<>(getString(SUBMIT))) {
-
- private static final long serialVersionUID = -958724007591692537L;
-
- @Override
- protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
- final ConnInstanceTO conn = (ConnInstanceTO) form.getModelObject();
-
- conn.setConnectorName(bundleTO.getConnectorName());
- conn.setBundleName(bundleTO.getBundleName());
- conn.setVersion(bundleTO.getVersion());
- conn.getConfiguration().clear();
- conn.getConfiguration().addAll(connPropView.getModelObject());
-
- // Set the model object's capabilities to capabilitiesPalette's converted Set
- conn.getCapabilities().clear();
- conn.getCapabilities().addAll(selectedCapabilities.isEmpty()
- ? EnumSet.noneOf(ConnectorCapability.class)
- : EnumSet.copyOf(selectedCapabilities));
-
- // Reset pool configuration if all fields are null
- if (conn.getPoolConf() != null
- && conn.getPoolConf().getMaxIdle() == null
- && conn.getPoolConf().getMaxObjects() == null
- && conn.getPoolConf().getMaxWait() == null
- && conn.getPoolConf().getMinEvictableIdleTimeMillis() == null
- && conn.getPoolConf().getMinIdle() == null) {
-
- conn.setPoolConf(null);
- }
-
- try {
- if (connInstanceTO.getKey() == 0) {
- connectorRestClient.create(conn);
- send(pageRef.getPage(), Broadcast.BREADTH, new CreateEvent(
- conn.getKey(),
- conn.getDisplayName(),
- TopologyNode.Kind.CONNECTOR,
- conn.getLocation().startsWith(Topology.CONNECTOR_SERVER_LOCATION_PREFIX)
- ? conn.getLocation() : Topology.ROOT_NAME,
- target));
- } else {
- connectorRestClient.update(conn);
- }
-
- ((BasePage) pageRef.getPage()).setModalResult(true);
- window.close(target);
- } catch (SyncopeClientException e) {
- error(getString(Constants.ERROR) + ": " + e.getMessage());
- feedbackPanel.refresh(target);
- ((BasePage) pageRef.getPage()).setModalResult(false);
- LOG.error("While creating or updating connector {}", conn, e);
- }
- }
-
- @Override
- protected void onError(final AjaxRequestTarget target, final Form<?> form) {
- feedbackPanel.refresh(target);
- }
- };
- String entitlements = connInstanceTO.getKey() == 0
- ? Entitlement.CONNECTOR_CREATE : Entitlement.CONNECTOR_UPDATE;
-
- MetaDataRoleAuthorizationStrategy.authorize(submit, ENABLE, entitlements);
- connectorForm.add(submit);
-
- final IndicatingAjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
-
- private static final long serialVersionUID = -958724007591692537L;
-
- @Override
- protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
- window.close(target);
- }
- };
- cancel.setDefaultFormProcessing(false);
- connectorForm.add(cancel);
+ add(capabilitiesPalette);
}
private ConnBundleTO getSelectedBundleTO(final ConnInstanceTO connInstanceTO) {
@@ -482,4 +402,60 @@ public class ConnectorModal extends AbstractResourceModal {
public List<ConnConfProperty> getProperties() {
return properties;
}
+
+ @Override
+ public void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ final ConnInstanceTO conn = (ConnInstanceTO) form.getModelObject();
+
+ conn.setConnectorName(bundleTO.getConnectorName());
+ conn.setBundleName(bundleTO.getBundleName());
+ conn.setVersion(bundleTO.getVersion());
+ conn.getConfiguration().clear();
+ conn.getConfiguration().addAll(connPropView.getModelObject());
+
+ // Set the model object's capabilities to capabilitiesPalette's converted Set
+ conn.getCapabilities().clear();
+ conn.getCapabilities().addAll(selectedCapabilities.isEmpty()
+ ? EnumSet.noneOf(ConnectorCapability.class)
+ : EnumSet.copyOf(selectedCapabilities));
+
+ // Reset pool configuration if all fields are null
+ if (conn.getPoolConf() != null
+ && conn.getPoolConf().getMaxIdle() == null
+ && conn.getPoolConf().getMaxObjects() == null
+ && conn.getPoolConf().getMaxWait() == null
+ && conn.getPoolConf().getMinEvictableIdleTimeMillis() == null
+ && conn.getPoolConf().getMinIdle() == null) {
+
+ conn.setPoolConf(null);
+ }
+
+ try {
+ if (connInstanceTO.getKey() == 0) {
+ connectorRestClient.create(conn);
+ send(pageRef.getPage(), Broadcast.BREADTH, new CreateEvent(
+ conn.getKey(),
+ conn.getDisplayName(),
+ TopologyNode.Kind.CONNECTOR,
+ conn.getLocation().startsWith(Topology.CONNECTOR_SERVER_LOCATION_PREFIX)
+ ? conn.getLocation() : Topology.ROOT_NAME,
+ target));
+ } else {
+ connectorRestClient.update(conn);
+ }
+
+ ((BasePage) pageRef.getPage()).setModalResult(true);
+ modal.close(target);
+ } catch (SyncopeClientException e) {
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ modal.getFeedbackPanel().refresh(target);
+ ((BasePage) pageRef.getPage()).setModalResult(false);
+ LOG.error("While creating or updating connector {}", conn, e);
+ }
+ }
+
+ @Override
+ public void onError(final AjaxRequestTarget target, final Form<?> form) {
+ modal.getFeedbackPanel().refresh(target);
+ }
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/java/org/apache/syncope/client/console/panels/FailureMessageModal.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/FailureMessageModal.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/FailureMessageModal.java
index 38edbf0..f23cecb 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/FailureMessageModal.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/FailureMessageModal.java
@@ -18,17 +18,17 @@
*/
package org.apache.syncope.client.console.panels;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.wicket.PageReference;
-import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.model.Model;
-public class FailureMessageModal extends ModalContent {
+public class FailureMessageModal extends AbstractModalPanel {
private static final long serialVersionUID = 9216117990503199258L;
- public FailureMessageModal(final PageReference pageRef, final ModalWindow window, final String failureMessage) {
- super(window, pageRef);
+ public FailureMessageModal(final BaseModal<?> modal, final PageReference pageRef, final String failureMessage) {
+ super(modal, pageRef);
final Label executionFailureMessage;
if (!failureMessage.isEmpty()) {
executionFailureMessage = new Label("failureMessage", new Model<String>(failureMessage));
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupModalPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupModalPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupModalPanel.java
index 8c0e0ae..2e4caf5 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupModalPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupModalPanel.java
@@ -23,6 +23,7 @@ import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.commons.Mode;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.common.lib.to.GroupTO;
+import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.form.AjaxButton;
import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
@@ -46,14 +47,16 @@ public class GroupModalPanel extends AbstractModalPanel {
protected GroupTO originalGroupTO;
- public GroupModalPanel(final BaseModal<?> modal, final GroupTO groupTO) {
- this(modal, groupTO, Mode.ADMIN);
+ public GroupModalPanel(
+ final BaseModal<?> modal, final PageReference pageRef, final GroupTO groupTO) {
+ this(modal, pageRef, groupTO, Mode.ADMIN);
}
@SuppressWarnings({ "unchecked", "rawtypes" })
- public GroupModalPanel(final BaseModal<?> modal, final GroupTO groupTO, final Mode mode) {
+ public GroupModalPanel(
+ final BaseModal<?> modal, final PageReference pageRef, final GroupTO groupTO, final Mode mode) {
- super(modal);
+ super(modal, pageRef);
this.mode = mode;
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupSearchResultPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupSearchResultPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupSearchResultPanel.java
index ffc232a..60fb1b7 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupSearchResultPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupSearchResultPanel.java
@@ -55,7 +55,7 @@ public class GroupSearchResultPanel extends AnySearchResultPanel {
private final String entitlement = "GROUP_READ";
- private final BaseModal<AbstractModalPanel> editModal;
+ private final BaseModal<?> editModal;
public GroupSearchResultPanel(final String type, final String parentId,
final boolean filtered, final String fiql, final PageReference callerRef,
@@ -125,7 +125,8 @@ public class GroupSearchResultPanel extends AnySearchResultPanel {
@Override
public void onClick(final AjaxRequestTarget target, final AnyTO anyTO) {
- editModal.addOrReplace(new GroupModalPanel(editModal, (GroupTO) model.getObject()));
+ editModal.addOrReplace(new GroupModalPanel(
+ editModal, getPage().getPageReference(), GroupTO.class.cast(model.getObject())));
target.add(editModal);
editModal.show(target);
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/java/org/apache/syncope/client/console/panels/ModalContent.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ModalContent.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ModalContent.java
deleted file mode 100644
index 6a123c0..0000000
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ModalContent.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.client.console.panels;
-
-import org.apache.syncope.client.console.commons.Constants;
-import org.apache.syncope.client.console.rest.ConnectorRestClient;
-import org.apache.syncope.client.console.rest.ResourceRestClient;
-import org.apache.wicket.PageReference;
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
-import org.apache.wicket.markup.html.panel.Panel;
-import org.apache.wicket.spring.injection.annot.SpringBean;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Modal window with Resource form.
- */
-public class ModalContent extends Panel {
-
- private static final long serialVersionUID = 8611724965544132636L;
-
- protected static final Logger LOG = LoggerFactory.getLogger(ModalContent.class);
-
- protected static final String CANCEL = "cancel";
-
- protected static final String SUBMIT = "submit";
-
- protected static final String APPLY = "apply";
-
- protected static final String FORM = "form";
-
- @SpringBean
- protected ResourceRestClient resourceRestClient;
-
- @SpringBean
- protected ConnectorRestClient connectorRestClient;
-
- protected NotificationPanel feedbackPanel;
-
- protected final PageReference pageRef;
-
- protected final ModalWindow window;
-
- public ModalContent(final ModalWindow window, final PageReference pageRef) {
- super(window.getContentId());
- this.pageRef = pageRef;
- this.window = window;
-
- feedbackPanel = new NotificationPanel(Constants.FEEDBACK);
- feedbackPanel.setOutputMarkupId(true);
- add(feedbackPanel);
- }
-
- public NotificationPanel getFeedbackPanel() {
- return feedbackPanel;
- }
-
- /**
- * Generic modal event.
- */
- public static class ModalEvent {
-
- /**
- * Request target.
- */
- private final AjaxRequestTarget target;
-
- /**
- * Constructor.
- *
- * @param target request target.
- */
- public ModalEvent(final AjaxRequestTarget target) {
- this.target = target;
- }
-
- /**
- * Target getter.
- *
- * @return request target.
- */
- public AjaxRequestTarget getTarget() {
- return target;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmModalPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmModalPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmModalPanel.java
index 7e8f415..9ea299f 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmModalPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmModalPanel.java
@@ -39,8 +39,6 @@ public class RealmModalPanel extends AbstractModalPanel {
protected RealmTO realmTO;
- private final PageReference pageRef;
-
private boolean newRealm = false;
@SpringBean
@@ -65,10 +63,9 @@ public class RealmModalPanel extends AbstractModalPanel {
final String entitlement,
final boolean newRealm) {
- super(modal);
- this.newRealm = newRealm;
+ super(modal, pageRef);
- this.pageRef = pageRef;
+ this.newRealm = newRealm;
this.realmTO = realmTO;
this.parentPath = parentPath;
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java
index 1b536c4..0101895 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java
@@ -24,9 +24,9 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.syncope.client.console.pages.BaseModalPage;
-import org.apache.syncope.client.console.panels.ModalContent.ModalEvent;
import org.apache.syncope.client.console.panels.ResourceDetailsPanel.DetailsModEvent;
import org.apache.syncope.client.console.rest.ConnectorRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal.ModalEvent;
import org.apache.syncope.client.console.wicket.markup.html.form.MultiFieldPanel.MultiValueSelectorEvent;
import org.apache.syncope.client.console.wicket.markup.html.list.ConnConfPropertyListView;
import org.apache.syncope.common.lib.to.ResourceTO;
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceDetailsPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceDetailsPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceDetailsPanel.java
index d556346..ba5388d 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceDetailsPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceDetailsPanel.java
@@ -20,13 +20,13 @@ package org.apache.syncope.client.console.panels;
import java.util.Arrays;
import java.util.List;
-import org.apache.commons.lang3.StringUtils;
import org.apache.syncope.client.console.commons.Constants;
-import org.apache.syncope.client.console.panels.ModalContent.ModalEvent;
import org.apache.syncope.client.console.rest.ConnectorRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal.ModalEvent;
import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPanel;
import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.MultiFieldPanel;
import org.apache.syncope.client.console.wicket.markup.html.form.SpinnerFieldPanel;
import org.apache.syncope.common.lib.to.ConnInstanceTO;
import org.apache.syncope.common.lib.to.ResourceTO;
@@ -34,14 +34,9 @@ import org.apache.syncope.common.lib.types.PropagationMode;
import org.apache.syncope.common.lib.types.TraceLevel;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
-import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.event.Broadcast;
-import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxLink;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.form.ChoiceRenderer;
-import org.apache.wicket.markup.html.form.DropDownChoice;
-import org.apache.wicket.markup.html.list.ListItem;
-import org.apache.wicket.markup.html.list.ListView;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.LoadableDetachableModel;
@@ -72,139 +67,83 @@ public class ResourceDetailsPanel extends Panel {
super(id);
setOutputMarkupId(true);
+ final WebMarkupContainer container = new WebMarkupContainer("container");
+ container.setOutputMarkupId(true);
+ container.setRenderBodyOnly(true);
+ add(container);
+
final AjaxTextFieldPanel resourceName = new AjaxTextFieldPanel("name", new ResourceModel("name", "name").
getObject(), new PropertyModel<String>(resourceTO, "key"));
resourceName.setEnabled(createFlag);
resourceName.addRequiredLabel();
- add(resourceName);
+ container.add(resourceName);
final AjaxCheckBoxPanel enforceMandatoryCondition = new AjaxCheckBoxPanel("enforceMandatoryCondition",
new ResourceModel("enforceMandatoryCondition", "enforceMandatoryCondition").getObject(),
new PropertyModel<Boolean>(resourceTO, "enforceMandatoryCondition"));
- add(enforceMandatoryCondition);
+ container.add(enforceMandatoryCondition);
final AjaxCheckBoxPanel propagationPrimary = new AjaxCheckBoxPanel("propagationPrimary", new ResourceModel(
"propagationPrimary", "propagationPrimary").getObject(), new PropertyModel<Boolean>(resourceTO,
"propagationPrimary"));
- add(propagationPrimary);
+ container.add(propagationPrimary);
- final SpinnerFieldPanel<Integer> propagationPriority = new SpinnerFieldPanel<>("propagationPriority",
- "propagationPriority", Integer.class,
- new PropertyModel<Integer>(resourceTO, "propagationPriority"), null, null);
- add(propagationPriority);
+ final SpinnerFieldPanel<Integer> propagationPriority = new SpinnerFieldPanel<>(
+ "propagationPriority",
+ "propagationPriority",
+ Integer.class,
+ new PropertyModel<Integer>(resourceTO, "propagationPriority"));
+ container.add(propagationPriority);
final AjaxDropDownChoicePanel<PropagationMode> propagationMode = new AjaxDropDownChoicePanel<>(
"propagationMode", new ResourceModel("propagationMode", "propagationMode").getObject(),
new PropertyModel<PropagationMode>(resourceTO, "propagationMode"));
propagationMode.setChoices(Arrays.asList(PropagationMode.values()));
- add(propagationMode);
+ container.add(propagationMode);
final AjaxCheckBoxPanel randomPwdIfNotProvided = new AjaxCheckBoxPanel("randomPwdIfNotProvided",
new ResourceModel("randomPwdIfNotProvided", "randomPwdIfNotProvided").getObject(),
new PropertyModel<Boolean>(resourceTO, "randomPwdIfNotProvided"));
- add(randomPwdIfNotProvided);
-
- final WebMarkupContainer propagationActionsClassNames = new WebMarkupContainer("propagationActionsClassNames");
- propagationActionsClassNames.setOutputMarkupId(true);
- add(propagationActionsClassNames);
+ container.add(randomPwdIfNotProvided);
- final AjaxLink<Void> first = new IndicatingAjaxLink<Void>("first") {
+ final AjaxDropDownChoicePanel<String> template
+ = new AjaxDropDownChoicePanel<>("panel", "panel", new Model<String>());
+ template.setChoices(actionClassNames);
+ template.setNullValid(true);
+ template.setRequired(true);
- private static final long serialVersionUID = -7978723352517770644L;
+ final MultiFieldPanel<String> actions = new MultiFieldPanel<>(
+ "actionsClasses",
+ "actionsClasses",
+ new PropertyModel<List<String>>(resourceTO, "propagationActionsClassNames"),
+ template);
- @Override
- public void onClick(final AjaxRequestTarget target) {
- resourceTO.getPropagationActionsClassNames().add(StringUtils.EMPTY);
- setVisible(false);
- target.add(propagationActionsClassNames);
- }
- };
- first.setOutputMarkupPlaceholderTag(true);
- first.setVisible(resourceTO.getPropagationActionsClassNames().isEmpty());
- propagationActionsClassNames.add(first);
-
- final ListView<String> actionsClasses = new ListView<String>("actionsClasses",
- new PropertyModel<List<String>>(resourceTO, "propagationActionsClassNames")) {
-
- private static final long serialVersionUID = 9101744072914090143L;
-
- @Override
- protected void populateItem(final ListItem<String> item) {
- final String className = item.getModelObject();
-
- final DropDownChoice<String> actionsClass = new DropDownChoice<>(
- "actionsClass", new Model<>(className), actionClassNames);
- actionsClass.setNullValid(true);
- actionsClass.setRequired(true);
- actionsClass.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_BLUR) {
-
- private static final long serialVersionUID = -1107858522700306810L;
-
- @Override
- protected void onUpdate(final AjaxRequestTarget target) {
- resourceTO.getPropagationActionsClassNames().
- set(item.getIndex(), actionsClass.getModelObject());
- }
- });
- actionsClass.setRequired(true);
- actionsClass.setOutputMarkupId(true);
- actionsClass.setRequired(true);
- item.add(actionsClass);
-
- final AjaxLink<Void> minus = new IndicatingAjaxLink<Void>("drop") {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- resourceTO.getPropagationActionsClassNames().remove(className);
- first.setVisible(resourceTO.getPropagationActionsClassNames().isEmpty());
- target.add(propagationActionsClassNames);
- }
- };
- item.add(minus);
-
- final AjaxLink<Void> plus = new IndicatingAjaxLink<Void>("add") {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- resourceTO.getPropagationActionsClassNames().add(StringUtils.EMPTY);
- target.add(propagationActionsClassNames);
- }
- };
- plus.setOutputMarkupPlaceholderTag(true);
- plus.setVisible(item.getIndex() == resourceTO.getPropagationActionsClassNames().size() - 1);
- item.add(plus);
- }
- };
- propagationActionsClassNames.add(actionsClasses);
+ container.add(actions);
final AjaxDropDownChoicePanel<TraceLevel> createTraceLevel = new AjaxDropDownChoicePanel<>(
"createTraceLevel", new ResourceModel("createTraceLevel", "createTraceLevel").getObject(),
new PropertyModel<TraceLevel>(resourceTO, "createTraceLevel"));
createTraceLevel.setChoices(Arrays.asList(TraceLevel.values()));
- add(createTraceLevel);
+ container.add(createTraceLevel);
final AjaxDropDownChoicePanel<TraceLevel> updateTraceLevel = new AjaxDropDownChoicePanel<>(
"updateTraceLevel", new ResourceModel("updateTraceLevel", "updateTraceLevel").getObject(),
new PropertyModel<TraceLevel>(resourceTO, "updateTraceLevel"));
updateTraceLevel.setChoices(Arrays.asList(TraceLevel.values()));
- add(updateTraceLevel);
+ container.add(updateTraceLevel);
final AjaxDropDownChoicePanel<TraceLevel> deleteTraceLevel = new AjaxDropDownChoicePanel<>(
"deleteTraceLevel", new ResourceModel("deleteTraceLevel", "deleteTraceLevel").getObject(),
new PropertyModel<TraceLevel>(resourceTO, "deleteTraceLevel"));
deleteTraceLevel.setChoices(Arrays.asList(TraceLevel.values()));
- add(deleteTraceLevel);
+ container.add(deleteTraceLevel);
final AjaxDropDownChoicePanel<TraceLevel> syncTraceLevel = new AjaxDropDownChoicePanel<>(
"syncTraceLevel", new ResourceModel("syncTraceLevel", "syncTraceLevel").getObject(),
new PropertyModel<TraceLevel>(resourceTO, "syncTraceLevel"));
syncTraceLevel.setChoices(Arrays.asList(TraceLevel.values()));
- add(syncTraceLevel);
+ container.add(syncTraceLevel);
final IModel<List<ConnInstanceTO>> connectors = new LoadableDetachableModel<List<ConnInstanceTO>>() {
@@ -257,7 +196,9 @@ public class ResourceDetailsPanel extends Panel {
}
});
- add(conn);
+ container.add(conn);
+
+ add(new AnnotatedBeanPanel("systeminformation", resourceTO));
}
/**
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceModal.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceModal.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceModal.java
index 54b22b8..7b84312 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceModal.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceModal.java
@@ -18,14 +18,20 @@
*/
package org.apache.syncope.client.console.panels;
+import static org.apache.wicket.Component.ENABLE;
+
+import de.agilecoders.wicket.core.markup.html.bootstrap.tabs.AjaxBootstrapTabbedPanel;
+import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.List;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.Predicate;
import org.apache.commons.lang3.SerializationUtils;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.pages.AbstractBasePage;
import org.apache.syncope.client.console.topology.TopologyNode;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
import org.apache.syncope.client.console.wizards.AjaxWizard;
import org.apache.syncope.client.console.wizards.provision.ProvisionWizardBuilder;
@@ -35,14 +41,12 @@ import org.apache.syncope.common.lib.to.ResourceTO;
import org.apache.syncope.common.lib.types.Entitlement;
import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.markup.html.form.AjaxButton;
import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
import org.apache.wicket.event.Broadcast;
-import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
-import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
-import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.extensions.markup.html.tabs.AbstractTab;
+import org.apache.wicket.extensions.markup.html.tabs.ITab;
import org.apache.wicket.markup.html.form.Form;
-import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.ResourceModel;
/**
@@ -52,33 +56,39 @@ public class ResourceModal extends AbstractResourceModal {
private static final long serialVersionUID = 1734415311027284221L;
- @SuppressWarnings({ "unchecked", "rawtypes" })
+ private final boolean createFlag;
+
public ResourceModal(
- final ModalWindow window,
+ final BaseModal<Serializable> modal,
final PageReference pageRef,
final ResourceTO resourceTO,
final boolean createFlag) {
- super(window, pageRef);
+ super(modal, pageRef);
+
+ this.createFlag = createFlag;
- final Form<ResourceTO> form = new Form<>(FORM);
- form.setModel(new CompoundPropertyModel<>(resourceTO));
+ final List<ITab> tabs = new ArrayList<>();
+ add(new AjaxBootstrapTabbedPanel<>("tabbedPanel", tabs));
//--------------------------------
// Resource details panel
//--------------------------------
- form.add(new ResourceDetailsPanel("details", resourceTO,
- resourceRestClient.getPropagationActionsClasses(), createFlag));
+ tabs.add(new AbstractTab(new ResourceModel("resource", "resource")) {
- form.add(new AnnotatedBeanPanel("systeminformation", resourceTO));
+ private static final long serialVersionUID = -5861786415855103549L;
+
+ @Override
+ public Panel getPanel(final String panelId) {
+ return new ResourceDetailsPanel(panelId, resourceTO,
+ resourceRestClient.getPropagationActionsClasses(), createFlag);
+ }
+ });
//--------------------------------
//--------------------------------
// Resource provision panels
//--------------------------------
- final WebMarkupContainer provisions = new WebMarkupContainer("pcontainer");
- form.add(provisions.setOutputMarkupId(true));
-
final ListViewPanel.Builder<ProvisionTO> builder = ListViewPanel.builder(ProvisionTO.class, pageRef);
builder.setItems(resourceTO.getProvisions());
builder.includes("anyType", "objectClass");
@@ -133,114 +143,109 @@ public class ResourceModal extends AbstractResourceModal {
}, ActionLink.ActionType.DELETE, Entitlement.RESOURCE_DELETE);
builder.addNewItemPanelBuilder(new ProvisionWizardBuilder("wizard", resourceTO, pageRef));
- builder.addNotificationPanel(feedbackPanel);
+ builder.addNotificationPanel(modal.getFeedbackPanel());
+
+ tabs.add(new AbstractTab(new ResourceModel("provisions", "provisions")) {
- provisions.add(builder.build("provisions"));
+ private static final long serialVersionUID = -5861786415855103549L;
+
+ @Override
+ public Panel getPanel(final String panelId) {
+ return builder.build(panelId);
+ }
+ });
//--------------------------------
//--------------------------------
// Resource connector configuration panel
//--------------------------------
- ResourceConnConfPanel resourceConnConfPanel = new ResourceConnConfPanel("connconf", resourceTO, createFlag);
- MetaDataRoleAuthorizationStrategy.authorize(resourceConnConfPanel, ENABLE, Entitlement.CONNECTOR_READ);
- form.add(resourceConnConfPanel);
+ tabs.add(new AbstractTab(new ResourceModel("connectorProperties", "connectorProperties")) {
+
+ private static final long serialVersionUID = -5861786415855103549L;
+
+ @Override
+ public Panel getPanel(final String panelId) {
+ final ResourceConnConfPanel panel = new ResourceConnConfPanel(panelId, resourceTO, createFlag);
+ MetaDataRoleAuthorizationStrategy.authorize(panel, ENABLE, Entitlement.CONNECTOR_READ);
+ return panel;
+ }
+ });
//--------------------------------
//--------------------------------
// Resource security panel
//--------------------------------
- form.add(new ResourceSecurityPanel("security", resourceTO));
- //--------------------------------
-
- AjaxButton submit = new IndicatingAjaxButton(APPLY, new ResourceModel(SUBMIT, SUBMIT)) {
+ tabs.add(new AbstractTab(new ResourceModel("security", "security")) {
- private static final long serialVersionUID = -958724007591692537L;
+ private static final long serialVersionUID = -5861786415855103549L;
@Override
- protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
- final ResourceTO resourceTO = (ResourceTO) form.getDefaultModelObject();
-
- boolean connObjectKeyError = false;
-
- final Collection<ProvisionTO> provisions = new ArrayList<>(resourceTO.getProvisions());
-
- for (ProvisionTO provision : provisions) {
- if (provision != null) {
- if (provision.getMapping() == null || provision.getMapping().getItems().isEmpty()) {
- resourceTO.getProvisions().remove(provision);
- } else {
- int uConnObjectKeyCount = CollectionUtils.countMatches(
- provision.getMapping().getItems(), new Predicate<MappingItemTO>() {
-
- @Override
- public boolean evaluate(final MappingItemTO item) {
- return item.isConnObjectKey();
- }
- });
-
- connObjectKeyError = uConnObjectKeyCount != 1;
- }
- }
- }
-
- if (connObjectKeyError) {
- error(getString("connObjectKeyValidation"));
- feedbackPanel.refresh(target);
- } else {
- try {
- if (createFlag) {
- resourceRestClient.create(resourceTO);
- send(pageRef.getPage(), Broadcast.BREADTH, new CreateEvent(
- resourceTO.getKey(),
- resourceTO.getKey(),
- TopologyNode.Kind.RESOURCE,
- resourceTO.getConnector(),
- target));
- } else {
- resourceRestClient.update(resourceTO);
- }
-
- if (pageRef.getPage() instanceof AbstractBasePage) {
- ((AbstractBasePage) pageRef.getPage()).setModalResult(true);
- }
- window.close(target);
- } catch (Exception e) {
- LOG.error("Failure managing resource {}", resourceTO, e);
- error(getString(Constants.ERROR) + ": " + e.getMessage());
- feedbackPanel.refresh(target);
- }
- }
+ public Panel getPanel(final String panelId) {
+ return new ResourceSecurityPanel(panelId, resourceTO);
}
+ });
+ //--------------------------------
+ }
- @Override
- protected void onError(final AjaxRequestTarget target, final Form<?> form) {
- feedbackPanel.refresh(target);
- }
- };
-
- form.add(submit);
- form.setDefaultButton(submit);
+ @Override
+ public void onError(final AjaxRequestTarget target, final Form<?> form) {
+ modal.getFeedbackPanel().refresh(target);
+ }
- final AjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
+ @Override
+ public void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ final ResourceTO resourceTO = (ResourceTO) form.getDefaultModelObject();
- private static final long serialVersionUID = -958724007591692537L;
+ boolean connObjectKeyError = false;
- @Override
- protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
- window.close(target);
- }
+ final Collection<ProvisionTO> provisions = new ArrayList<>(resourceTO.getProvisions());
- @Override
- protected void onError(final AjaxRequestTarget target, final Form<?> form) {
- }
- };
+ for (ProvisionTO provision : provisions) {
+ if (provision != null) {
+ if (provision.getMapping() == null || provision.getMapping().getItems().isEmpty()) {
+ resourceTO.getProvisions().remove(provision);
+ } else {
+ int uConnObjectKeyCount = CollectionUtils.countMatches(
+ provision.getMapping().getItems(), new Predicate<MappingItemTO>() {
- cancel.setDefaultFormProcessing(false);
- form.add(cancel);
+ @Override
+ public boolean evaluate(final MappingItemTO item) {
+ return item.isConnObjectKey();
+ }
+ });
- add(form);
+ connObjectKeyError = uConnObjectKeyCount != 1;
+ }
+ }
+ }
+
+ if (connObjectKeyError) {
+ error(getString("connObjectKeyValidation"));
+ modal.getFeedbackPanel().refresh(target);
+ } else {
+ try {
+ if (createFlag) {
+ resourceRestClient.create(resourceTO);
+ send(pageRef.getPage(), Broadcast.BREADTH, new CreateEvent(
+ resourceTO.getKey(),
+ resourceTO.getKey(),
+ TopologyNode.Kind.RESOURCE,
+ resourceTO.getConnector(),
+ target));
+ } else {
+ resourceRestClient.update(resourceTO);
+ }
- MetaDataRoleAuthorizationStrategy.authorize(
- submit, ENABLE, createFlag ? Entitlement.RESOURCE_CREATE : Entitlement.RESOURCE_UPDATE);
+ if (pageRef.getPage() instanceof AbstractBasePage) {
+ ((AbstractBasePage) pageRef.getPage()).setModalResult(true);
+ }
+ modal.close(target);
+ } catch (Exception e) {
+ LOG.error("Failure managing resource {}", resourceTO, e);
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ modal.getFeedbackPanel().refresh(target);
+ }
+ }
}
+
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceSecurityPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceSecurityPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceSecurityPanel.java
index a0a1ddc..2be0d95 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceSecurityPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceSecurityPanel.java
@@ -53,6 +53,11 @@ public class ResourceSecurityPanel extends Panel {
super(id);
+ final WebMarkupContainer container = new WebMarkupContainer("container");
+ container.setOutputMarkupId(true);
+ container.setRenderBodyOnly(true);
+ add(container);
+
setOutputMarkupId(true);
passwordPolicies = new LoadableDetachableModel<Map<Long, String>>() {
@@ -97,11 +102,6 @@ public class ResourceSecurityPanel extends Panel {
}
};
- final WebMarkupContainer securityContainer = new WebMarkupContainer("security");
-
- securityContainer.setOutputMarkupId(true);
- add(securityContainer);
-
// -------------------------------
// Password policy specification
// -------------------------------
@@ -115,7 +115,7 @@ public class ResourceSecurityPanel extends Panel {
((DropDownChoice<?>) passwordPolicy.getField()).setNullValid(true);
- securityContainer.add(passwordPolicy);
+ container.add(passwordPolicy);
// -------------------------------
// -------------------------------
@@ -131,7 +131,7 @@ public class ResourceSecurityPanel extends Panel {
((DropDownChoice<?>) accountPolicy.getField()).setNullValid(true);
- securityContainer.add(accountPolicy);
+ container.add(accountPolicy);
// -------------------------------
// -------------------------------
@@ -147,7 +147,7 @@ public class ResourceSecurityPanel extends Panel {
((DropDownChoice<?>) syncPolicy.getField()).setNullValid(true);
- securityContainer.add(syncPolicy);
+ container.add(syncPolicy);
// -------------------------------
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/java/org/apache/syncope/client/console/topology/Topology.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/topology/Topology.java b/client/console/src/main/java/org/apache/syncope/client/console/topology/Topology.java
index 409a16b..8b2fa75 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/topology/Topology.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/topology/Topology.java
@@ -29,8 +29,10 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
import org.apache.cxf.jaxrs.client.WebClient;
import org.apache.syncope.client.console.SyncopeConsoleSession;
+import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.panels.AbstractResourceModal.CreateEvent;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
import org.apache.syncope.common.lib.to.ConnInstanceTO;
@@ -64,11 +66,7 @@ public class Topology extends BasePage {
private final int origY = 2800;
- private static final int RESOURCE_MODAL_WIN_HEIGHT = 700;
-
- private static final int RESOURCE_MODAL_WIN_WIDTH = 1000;
-
- private final ModalWindow modal;
+ private final BaseModal<Serializable> modal;
private final WebMarkupContainer newlyCreatedContainer;
@@ -140,13 +138,24 @@ public class Topology extends BasePage {
}
public Topology() {
- modal = new ModalWindow("modal");
+ modal = new BaseModal<>("modal");
add(modal);
- modal.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
- modal.setInitialHeight(RESOURCE_MODAL_WIN_HEIGHT);
- modal.setInitialWidth(RESOURCE_MODAL_WIN_WIDTH);
- modal.setCookieName("resource-modal");
+ modal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
+
+ private static final long serialVersionUID = 8804221891699487139L;
+
+ @Override
+ public void onClose(final AjaxRequestTarget target) {
+ modal.show(false);
+
+ if (isModalResult()) {
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ feedbackPanel.refresh(target);
+ setModalResult(false);
+ }
+ }
+ });
add(new WebSocketBehavior());
@@ -509,7 +518,7 @@ public class Topology extends BasePage {
private TopologyNodePanel topologyNodePanel(final String id, final TopologyNode node) {
- final TopologyNodePanel panel = new TopologyNodePanel(id, node, getPageReference(), modal);
+ final TopologyNodePanel panel = new TopologyNodePanel(id, node, modal, getPageReference());
panel.setMarkupId(String.valueOf(node.getKey()));
panel.setOutputMarkupId(true);
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyNodePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyNodePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyNodePanel.java
index 7756a25..d3aa975 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyNodePanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyNodePanel.java
@@ -18,6 +18,9 @@
*/
package org.apache.syncope.client.console.topology;
+import static org.apache.wicket.Component.ENABLE;
+
+import java.io.Serializable;
import java.text.MessageFormat;
import org.apache.commons.lang3.StringUtils;
import org.apache.syncope.client.console.commons.Constants;
@@ -27,19 +30,22 @@ import org.apache.syncope.client.console.panels.ResourceModal;
import org.apache.syncope.client.console.rest.ConnectorRestClient;
import org.apache.syncope.client.console.rest.ResourceRestClient;
import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicatingAjaxLink;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.common.lib.SyncopeClientException;
import org.apache.syncope.common.lib.to.ConnInstanceTO;
import org.apache.syncope.common.lib.to.ResourceTO;
+import org.apache.syncope.common.lib.types.Entitlement;
import org.apache.wicket.AttributeModifier;
import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.IAjaxIndicatorAware;
import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
import org.apache.wicket.behavior.AttributeAppender;
-import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.panel.Fragment;
import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.Model;
import org.apache.wicket.spring.injection.annot.SpringBean;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -50,7 +56,7 @@ public class TopologyNodePanel extends Panel implements IAjaxIndicatorAware {
protected static final Logger LOG = LoggerFactory.getLogger(TopologyNodePanel.class);
- private final ModalWindow modal;
+ private final BaseModal<Serializable> modal;
@SpringBean
private ResourceRestClient resourceRestClient;
@@ -61,8 +67,8 @@ public class TopologyNodePanel extends Panel implements IAjaxIndicatorAware {
public TopologyNodePanel(
final String id,
final TopologyNode node,
- final PageReference pageRef,
- final ModalWindow modal) {
+ final BaseModal<Serializable> modal,
+ final PageReference pageRef) {
super(id);
final String resourceName = node.getDisplayName().length() > 20
@@ -124,16 +130,24 @@ public class TopologyNodePanel extends Panel implements IAjaxIndicatorAware {
@Override
public void onClickInternal(final AjaxRequestTarget target) {
+ final ConnInstanceTO model = new ConnInstanceTO();
+ model.setLocation(node.getKey().toString());
+
+ modal.setFormModel(model);
+ target.add(modal.setContent(new ConnectorModal(modal, pageRef, model)));
+
+ modal.header(new Model<String>(MessageFormat.format(getString("connector.new"), node.getKey())));
- final ConnInstanceTO connectorTO = new ConnInstanceTO();
- connectorTO.setLocation(node.getKey().toString());
- modal.setContent(new ConnectorModal(modal, pageRef, connectorTO));
- modal.setTitle(MessageFormat.format(getString("connector.new"), node.getKey()));
- modal.show(target);
+ MetaDataRoleAuthorizationStrategy.
+ authorize(modal.addSumbitButton(), ENABLE, Entitlement.CONNECTOR_CREATE);
+
+ modal.show(true);
}
};
fragment.add(create);
+ MetaDataRoleAuthorizationStrategy.authorize(create, ENABLE, Entitlement.CONNECTOR_CREATE);
+
return fragment;
}
@@ -158,40 +172,56 @@ public class TopologyNodePanel extends Panel implements IAjaxIndicatorAware {
};
fragment.add(delete);
+ MetaDataRoleAuthorizationStrategy.authorize(delete, ENABLE, Entitlement.CONNECTOR_DELETE);
+
final AjaxLink<String> create = new ClearIndicatingAjaxLink<String>("create", pageRef) {
private static final long serialVersionUID = 3776750333491622263L;
@Override
public void onClickInternal(final AjaxRequestTarget target) {
- final ResourceTO resourceTO = new ResourceTO();
- resourceTO.setConnector(Long.class.cast(node.getKey()));
- resourceTO.setConnectorDisplayName(node.getDisplayName());
- modal.setContent(new ResourceModal(modal, pageRef, resourceTO, true));
- modal.setTitle(getString("resource.new"));
- modal.show(target);
+ final ResourceTO model = new ResourceTO();
+ model.setConnector(Long.class.cast(node.getKey()));
+ model.setConnectorDisplayName(node.getDisplayName());
+
+ modal.setFormModel(model);
+ target.add(modal.setContent(new ResourceModal(modal, pageRef, model, true)));
+
+ modal.header(new Model<String>(MessageFormat.format(getString("resource.new"), node.getKey())));
+
+ MetaDataRoleAuthorizationStrategy.
+ authorize(modal.addSumbitButton(), ENABLE, Entitlement.RESOURCE_CREATE);
+
+ modal.show(true);
}
};
fragment.add(create);
+ MetaDataRoleAuthorizationStrategy.authorize(create, ENABLE, Entitlement.RESOURCE_CREATE);
+
final AjaxLink<String> edit = new ClearIndicatingAjaxLink<String>("edit", pageRef) {
private static final long serialVersionUID = 3776750333491622263L;
@Override
public void onClickInternal(final AjaxRequestTarget target) {
+ final ConnInstanceTO model = connectorRestClient.read(Long.class.cast(node.getKey()));
+
+ modal.setFormModel(model);
+ target.add(modal.setContent(new ConnectorModal(modal, pageRef, model)));
+
+ modal.header(new Model<String>(MessageFormat.format(getString("connector.edit"), node.getKey())));
- modal.setContent(new ConnectorModal(
- modal,
- pageRef,
- connectorRestClient.read(Long.class.cast(node.getKey()))));
+ MetaDataRoleAuthorizationStrategy.
+ authorize(modal.addSumbitButton(), ENABLE, Entitlement.CONNECTOR_UPDATE);
- modal.setTitle(MessageFormat.format(getString("connector.edit"), node.getKey()));
- modal.show(target);
+ modal.show(true);
}
};
fragment.add(edit);
+ MetaDataRoleAuthorizationStrategy.authorize(edit, ENABLE, Entitlement.CONNECTOR_UPDATE);
+
return fragment;
}
@@ -216,6 +246,8 @@ public class TopologyNodePanel extends Panel implements IAjaxIndicatorAware {
};
fragment.add(delete);
+ MetaDataRoleAuthorizationStrategy.authorize(delete, ENABLE, Entitlement.RESOURCE_DELETE);
+
final AjaxLink<String> edit = new ClearIndicatingAjaxLink<String>("edit", pageRef) {
private static final long serialVersionUID = 3776750333491622263L;
@@ -223,18 +255,23 @@ public class TopologyNodePanel extends Panel implements IAjaxIndicatorAware {
@Override
public void onClickInternal(final AjaxRequestTarget target) {
- modal.setContent(new ResourceModal(
- modal,
- pageRef,
- resourceRestClient.read(node.getKey().toString()),
- false));
+ final ResourceTO model = resourceRestClient.read(node.getKey().toString());
- modal.setTitle(MessageFormat.format(getString("resource.edit"), node.getKey()));
- modal.show(target);
+ modal.setFormModel(model);
+ target.add(modal.setContent(new ResourceModal(modal, pageRef, model, false)));
+
+ modal.header(new Model<String>(MessageFormat.format(getString("resource.edit"), node.getKey())));
+
+ MetaDataRoleAuthorizationStrategy.
+ authorize(modal.addSumbitButton(), ENABLE, Entitlement.RESOURCE_UPDATE);
+
+ modal.show(true);
}
};
fragment.add(edit);
+ MetaDataRoleAuthorizationStrategy.authorize(edit, ENABLE, Entitlement.RESOURCE_UPDATE);
+
return fragment;
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/bootstrap/dialog/BaseModal.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/bootstrap/dialog/BaseModal.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/bootstrap/dialog/BaseModal.java
index e67daac..2d26c08 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/bootstrap/dialog/BaseModal.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/bootstrap/dialog/BaseModal.java
@@ -78,7 +78,7 @@ public class BaseModal<T extends Serializable> extends Modal<T> {
form = new Form<T>(FORM);
add(form);
- content = new AbstractModalPanel(this) {
+ content = new AbstractModalPanel(this, null) {
private static final long serialVersionUID = 1L;
@@ -153,7 +153,7 @@ public class BaseModal<T extends Serializable> extends Modal<T> {
}
}
- public void addSumbitButton() {
+ public PrimaryModalButton addSumbitButton() {
final PrimaryModalButton submit = new PrimaryModalButton(SUBMIT, SUBMIT, form) {
@@ -179,6 +179,8 @@ public class BaseModal<T extends Serializable> extends Modal<T> {
submitButton.replaceWith(submit);
submitButton = submit;
}
+
+ return submit;
}
@Override
@@ -196,4 +198,33 @@ public class BaseModal<T extends Serializable> extends Modal<T> {
}
}.setOutputMarkupId(true));
}
+
+ /**
+ * Generic modal event.
+ */
+ public static class ModalEvent {
+
+ /**
+ * Request target.
+ */
+ private final AjaxRequestTarget target;
+
+ /**
+ * Constructor.
+ *
+ * @param target request target.
+ */
+ public ModalEvent(final AjaxRequestTarget target) {
+ this.target = target;
+ }
+
+ /**
+ * Target getter.
+ *
+ * @return request target.
+ */
+ public AjaxRequestTarget getTarget() {
+ return target;
+ }
+ }
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AbstractFieldPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AbstractFieldPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AbstractFieldPanel.java
index 41643ea..165f20d 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AbstractFieldPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AbstractFieldPanel.java
@@ -18,8 +18,11 @@
*/
package org.apache.syncope.client.console.wicket.markup.html.form;
+import org.apache.wicket.Component;
+import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.ResourceModel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -32,8 +35,32 @@ public abstract class AbstractFieldPanel<T> extends Panel {
private static final long serialVersionUID = 5958017546318855690L;
- public AbstractFieldPanel(final String id, final IModel<T> model) {
+ protected final String name;
+
+ public AbstractFieldPanel(final String id, final String name, final IModel<T> model) {
super(id, model);
+ this.name = name;
+
+ addLabel();
+ setOutputMarkupId(true);
+ }
+
+ public final AbstractFieldPanel<T> addLabel() {
+ return addLabel(this.name);
+ }
+
+ public final AbstractFieldPanel<T> addLabel(final String name) {
+ addOrReplace(new Label("field-label", new ResourceModel(name, name)));
+ return this;
+ }
+
+ public AbstractFieldPanel<T> hideLabel() {
+ final Component label = get("field-label");
+
+ if (label != null) {
+ label.setVisible(false);
+ }
+ return this;
}
public abstract AbstractFieldPanel<T> setModelObject(T object);
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.java
index ff64fbe..bd1cd0d 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.java
@@ -23,10 +23,12 @@ import java.util.List;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.CheckBox;
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
+import org.apache.wicket.model.ResourceModel;
public class AjaxCheckBoxPanel extends FieldPanel<Boolean> {
@@ -54,6 +56,8 @@ public class AjaxCheckBoxPanel extends FieldPanel<Boolean> {
}
});
}
+
+ add(new Label("label", new ResourceModel(name, name)));
}
@Override
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDropDownChoicePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDropDownChoicePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDropDownChoicePanel.java
index ae3a01f..daba6e9 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDropDownChoicePanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDropDownChoicePanel.java
@@ -18,6 +18,7 @@
*/
package org.apache.syncope.client.console.wicket.markup.html.form;
+import de.agilecoders.wicket.extensions.markup.html.bootstrap.form.select.BootstrapSelect;
import java.io.Serializable;
import java.util.Collections;
import java.util.List;
@@ -41,9 +42,11 @@ public class AjaxDropDownChoicePanel<T extends Serializable> extends FieldPanel<
public AjaxDropDownChoicePanel(
final String id, final String name, final IModel<T> model, final boolean enableOnBlur) {
- super(id, model);
+ super(id, name, model);
+
+ field = new BootstrapSelect<>(
+ "dropDownChoiceField", model, Collections.<T>emptyList(), new ChoiceRenderer<T>());
- field = new DropDownChoice<>("dropDownChoiceField", model, Collections.<T>emptyList(), new ChoiceRenderer<T>());
add(field.setLabel(new Model<>(name)).setOutputMarkupId(true));
if (enableOnBlur) {
@@ -61,19 +64,24 @@ public class AjaxDropDownChoicePanel<T extends Serializable> extends FieldPanel<
@SuppressWarnings("unchecked")
public AjaxDropDownChoicePanel<T> setChoiceRenderer(final IChoiceRenderer<T> renderer) {
- ((DropDownChoice) field).setChoiceRenderer(renderer);
+ DropDownChoice.class.cast(field).setChoiceRenderer(renderer);
return this;
}
@SuppressWarnings("unchecked")
public AjaxDropDownChoicePanel<T> setChoices(final List<T> choices) {
- ((DropDownChoice) field).setChoices(choices);
+ DropDownChoice.class.cast(field).setChoices(choices);
return this;
}
@SuppressWarnings("unchecked")
public AjaxDropDownChoicePanel<T> setChoices(final IModel<? extends List<? extends T>> choices) {
- ((DropDownChoice) field).setChoices(choices);
+ DropDownChoice.class.cast(field).setChoices(choices);
+ return this;
+ }
+
+ public AjaxDropDownChoicePanel<T> setNullValid(final boolean validity) {
+ DropDownChoice.class.cast(field).setNullValid(validity);
return this;
}
@@ -81,8 +89,8 @@ public class AjaxDropDownChoicePanel<T extends Serializable> extends FieldPanel<
@SuppressWarnings("unchecked")
public FieldPanel<T> clone() {
final AjaxDropDownChoicePanel<T> panel = (AjaxDropDownChoicePanel<T>) super.clone();
- panel.setChoiceRenderer(((DropDownChoice) field).getChoiceRenderer());
- panel.setChoices(((DropDownChoice) field).getChoices());
+ panel.setChoiceRenderer(DropDownChoice.class.cast(field).getChoiceRenderer());
+ panel.setChoices(DropDownChoice.class.cast(field).getChoices());
return panel;
}
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b2e93ca7/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxPalettePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxPalettePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxPalettePanel.java
index 932948b..97866e3 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxPalettePanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxPalettePanel.java
@@ -44,7 +44,7 @@ public class AjaxPalettePanel<T> extends AbstractFieldPanel<List<T>> {
public AjaxPalettePanel(final String id, final IModel<List<T>> model, final ListModel<T> choices,
final IChoiceRenderer<T> renderer, final boolean allowOrder, final boolean allowMoveAll) {
- super(id, model);
+ super(id, id, model);
this.palette = createPalette(model, choices, renderer, allowOrder, allowMoveAll);
add(palette.setOutputMarkupId(true));
[26/28] syncope git commit: provides wizard to create users,
groups and any objects + several changes merged from master
Posted by fm...@apache.org.
provides wizard to create users, groups and any objects + several changes merged from master
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/047ac019
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/047ac019
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/047ac019
Branch: refs/heads/master
Commit: 047ac0190bf15aff81fee2d9538bd68a64305d15
Parents: 4c30ca7
Author: fmartelli <fa...@gmail.com>
Authored: Fri Oct 30 12:32:48 2015 +0100
Committer: fmartelli <fa...@gmail.com>
Committed: Fri Oct 30 12:32:48 2015 +0100
----------------------------------------------------------------------
.../schema/SchemaSyncopeOperations.java | 8 +-
.../client/console/PreferenceManager.java | 7 +-
.../console/pages/ProvisioningModalPage.java | 4 +-
.../client/console/pages/ResultStatusModal.java | 31 +-
.../console/panels/AbstractModalPanel.java | 4 +-
.../panels/AbstractSearchResultPanel.java | 78 ++++-
.../console/panels/AjaxDataTablePanel.java | 2 +-
.../console/panels/AnySearchResultPanel.java | 57 +++-
.../console/panels/ConnectorConfPanel.java | 14 +-
.../client/console/panels/GroupModalPanel.java | 119 -------
.../client/console/panels/GroupPanel.java | 75 ----
.../console/panels/GroupSearchResultPanel.java | 53 ++-
.../client/console/panels/ListViewPanel.java | 157 ++-------
.../client/console/panels/ModalPanel.java | 30 ++
.../syncope/client/console/panels/Realm.java | 58 +++-
.../console/panels/ResourceConnConfPanel.java | 12 +-
.../console/panels/ResourceDetailsPanel.java | 6 -
.../console/panels/UserSearchResultPanel.java | 60 +++-
.../client/console/rest/AnyTypeRestClient.java | 37 +-
.../console/rest/ConfigurationRestClient.java | 4 +-
.../client/console/rest/GroupRestClient.java | 15 +-
.../client/console/rest/SchemaRestClient.java | 31 +-
.../client/console/rest/UserRestClient.java | 14 +-
.../markup/html/ClearIndicatingAjaxLink.java | 2 +
.../markup/html/bootstrap/dialog/BaseModal.java | 18 +-
.../markup/html/form/ActionLinksPanel.java | 2 +
.../markup/html/form/BinaryFieldPanel.java | 7 +-
.../markup/html/form/SpinnerFieldPanel.java | 4 +-
.../client/console/wizards/AjaxWizard.java | 42 ++-
.../console/wizards/AjaxWizardBuilder.java | 21 +-
.../console/wizards/AjaxWizardButtonBar.java | 1 +
.../client/console/wizards/WizardMgtPanel.java | 216 ++++++++++++
.../wizards/any/AnyObjectWizardBuilder.java | 143 ++++++++
.../console/wizards/any/AnyWizardBuilder.java | 85 +++++
.../client/console/wizards/any/DerAttrs.java | 137 ++++++++
.../console/wizards/any/GroupDetails.java | 293 ++++++++++++++++
.../console/wizards/any/GroupWizardBuilder.java | 67 ++++
.../client/console/wizards/any/PlainAttrs.java | 339 +++++++++++++++++++
.../client/console/wizards/any/UserDetails.java | 104 ++++++
.../console/wizards/any/UserWizardBuilder.java | 73 ++++
.../client/console/wizards/any/VirAttrs.java | 141 ++++++++
.../provision/ProvisionWizardBuilder.java | 9 +-
.../META-INF/resources/css/syncopeConsole.css | 15 +
.../panels/AbstractSearchResultPanel.html | 10 +-
.../client/console/panels/GroupModalPanel.html | 52 ---
.../console/panels/GroupModalPanel.properties | 48 ---
.../panels/GroupModalPanel_it.properties | 50 ---
.../panels/GroupModalPanel_pt_BR.properties | 48 ---
.../client/console/panels/ListViewPanel.html | 22 +-
.../console/panels/ResourceDetailsPanel.html | 4 -
.../console/panels/ResourceModal.properties | 1 -
.../console/panels/ResourceModalPage.html | 56 ---
.../console/panels/ResourceModalPage.properties | 60 ----
.../console/panels/ResourceModal_it.properties | 1 -
.../panels/ResourceModal_pt_BR.properties | 1 -
.../console/wizards/AjaxWizard.properties | 18 +
.../console/wizards/AjaxWizard_it.properties | 18 +
.../console/wizards/AjaxWizard_pt_BR.properties | 18 +
.../client/console/wizards/WizardMgtPanel.html | 45 +++
.../client/console/wizards/any/DerAttrs.html | 42 +++
.../console/wizards/any/DerAttrs.properties | 18 +
.../console/wizards/any/DerAttrs_it.properties | 18 +
.../wizards/any/DerAttrs_pt_BR.properties | 18 +
.../console/wizards/any/GroupDetails.html | 56 +++
.../console/wizards/any/GroupDetails.properties | 16 +
.../wizards/any/GroupDetails_it.properties | 16 +
.../wizards/any/GroupDetails_pt_BR.properties | 16 +
.../client/console/wizards/any/PlainAttrs.html | 40 +++
.../client/console/wizards/any/UserDetails.html | 59 ++++
.../console/wizards/any/UserDetails.properties | 19 ++
.../wizards/any/UserDetails_it.properties | 19 ++
.../wizards/any/UserDetails_pt_BR.properties | 19 ++
.../client/console/wizards/any/VirAttrs.html | 42 +++
.../console/wizards/any/VirAttrs.properties | 17 +
.../console/wizards/any/VirAttrs_it.properties | 17 +
.../wizards/any/VirAttrs_pt_BR.properties | 17 +
.../ProvisionWizardBuilder$ConnObjectLink.html | 26 +-
.../ProvisionWizardBuilder$Mapping.html | 11 +-
.../ProvisionWizardBuilder$ObjectType.html | 26 +-
client/enduser/pom.xml | 6 +-
.../common/rest/api/service/SchemaService.java | 9 +-
.../apache/syncope/core/logic/SchemaLogic.java | 17 +-
.../provisioning/java/ConnectorFacadeProxy.java | 4 +-
.../provisioning/java/sync/SyncJobDelegate.java | 9 +-
.../rest/cxf/service/SchemaServiceImpl.java | 4 +-
.../fit/core/reference/DerSchemaITCase.java | 2 +-
.../syncope/fit/core/reference/GroupITCase.java | 4 +-
.../fit/core/reference/MultitenancyITCase.java | 2 +-
.../fit/core/reference/PlainSchemaITCase.java | 56 +--
.../fit/core/reference/VirSchemaITCase.java | 2 +-
pom.xml | 6 +
91 files changed, 2763 insertions(+), 917 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaSyncopeOperations.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaSyncopeOperations.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaSyncopeOperations.java
index c8f0a6d..c5e8097 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaSyncopeOperations.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaSyncopeOperations.java
@@ -33,19 +33,19 @@ public class SchemaSyncopeOperations {
}
public <T extends AbstractSchemaTO> List<T> list(final SchemaType schemaType) {
- return schemaService.list(schemaType);
+ return schemaService.list(schemaType, null);
}
public <T extends AbstractSchemaTO> List<T> listVirtual() {
- return schemaService.list(SchemaType.VIRTUAL);
+ return schemaService.list(SchemaType.VIRTUAL, null);
}
public <T extends AbstractSchemaTO> List<T> listPlain() {
- return schemaService.list(SchemaType.PLAIN);
+ return schemaService.list(SchemaType.PLAIN, null);
}
public <T extends AbstractSchemaTO> List<T> listDerived() {
- return schemaService.list(SchemaType.DERIVED);
+ return schemaService.list(SchemaType.DERIVED, null);
}
public void delete(final SchemaType schemaType, final String schemaName) {
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/PreferenceManager.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/PreferenceManager.java b/client/console/src/main/java/org/apache/syncope/client/console/PreferenceManager.java
index c7baef2..03fab62 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/PreferenceManager.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/PreferenceManager.java
@@ -21,6 +21,7 @@ package org.apache.syncope.client.console;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.core.type.TypeReference;
import java.io.IOException;
+import java.io.Serializable;
import java.io.StringWriter;
import java.util.ArrayList;
import java.util.Arrays;
@@ -37,7 +38,7 @@ import org.apache.wicket.util.crypt.Base64;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class PreferenceManager {
+public class PreferenceManager implements Serializable {
private static final Logger LOG = LoggerFactory.getLogger(PreferenceManager.class);
@@ -50,9 +51,11 @@ public class PreferenceManager {
private static final List<Integer> PAGINATOR_CHOICES = Arrays.asList(new Integer[] { 10, 25, 50 });
+ private static final long serialVersionUID = 1L;
+
private final ObjectMapper mapper;
- private final CookieUtils cookieUtils;
+ private final transient CookieUtils cookieUtils;
public PreferenceManager() {
this.mapper = new ObjectMapper();
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/pages/ProvisioningModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/ProvisioningModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/ProvisioningModalPage.java
index db85db1..4fb3630 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/ProvisioningModalPage.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/ProvisioningModalPage.java
@@ -241,8 +241,8 @@ public class ProvisioningModalPage<T extends AnyTO> extends AbstractStatusModalP
if (beans.isEmpty()) {
modal.close(target);
} else {
- BulkActionResult res = resourceRestClient.bulkAssociationAction(resourceTO.getKey(), anyTypeKind.name(),
- action, anyKeys);
+ BulkActionResult res = resourceRestClient.bulkAssociationAction(
+ resourceTO.getKey(), anyTypeKind.name(), action, anyKeys);
((BasePage) pageRef.getPage()).setModalResult(true);
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/pages/ResultStatusModal.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/ResultStatusModal.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/ResultStatusModal.java
index 998ac60..b7c0b29 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/ResultStatusModal.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/ResultStatusModal.java
@@ -43,6 +43,7 @@ import org.apache.syncope.common.lib.to.AttrTO;
import org.apache.syncope.common.lib.to.ConnObjectTO;
import org.apache.syncope.common.lib.to.PropagationStatus;
import org.apache.syncope.common.lib.to.GroupTO;
+import org.apache.syncope.common.lib.to.ProvisioningResult;
import org.apache.syncope.common.lib.to.UserTO;
import org.apache.syncope.common.lib.types.PropagationTaskExecStatus;
import org.apache.wicket.Component;
@@ -72,7 +73,7 @@ public final class ResultStatusModal<T extends AnyTO> extends AbstractModalPanel
private static final String IMG_PREFIX = "/img/statuses/";
- private final AnyTO subject;
+ private final ProvisioningResult<AnyTO> provResult;
private final Mode mode;
@@ -87,7 +88,7 @@ public final class ResultStatusModal<T extends AnyTO> extends AbstractModalPanel
private Mode mode;
- private AnyTO subject;
+ private ProvisioningResult<AnyTO> provResult;
private final BaseModal<T> modal;
@@ -96,8 +97,8 @@ public final class ResultStatusModal<T extends AnyTO> extends AbstractModalPanel
public Builder(
final BaseModal<T> modal,
final PageReference pageRef,
- final AnyTO attributable) {
- this.subject = attributable;
+ final ProvisioningResult<AnyTO> provResult) {
+ this.provResult = provResult;
this.modal = modal;
this.pageRef = pageRef;
}
@@ -119,7 +120,7 @@ public final class ResultStatusModal<T extends AnyTO> extends AbstractModalPanel
super(modal, pageRef);
- this.subject = builder.subject;
+ this.provResult = builder.provResult;
statusUtils = new StatusUtils(new UserRestClient());
if (builder.mode == null) {
this.mode = Mode.ADMIN;
@@ -145,14 +146,16 @@ public final class ResultStatusModal<T extends AnyTO> extends AbstractModalPanel
List<PropagationStatus> propagations = new ArrayList<PropagationStatus>();
propagations.add(syncope);
- propagations.addAll(subject.getPropagationStatusTOs());
+ propagations.addAll(provResult.getPropagationStatuses());
+
+ AnyTO any = provResult.getAny();
fragment.add(new Label("info",
- ((subject instanceof UserTO) && ((UserTO) subject).getUsername() != null)
- ? ((UserTO) subject).getUsername()
- : ((subject instanceof GroupTO) && ((GroupTO) subject).getName() != null)
- ? ((GroupTO) subject).getName()
- : String.valueOf(subject.getKey())));
+ ((any instanceof UserTO) && ((UserTO) any).getUsername() != null)
+ ? ((UserTO) any).getUsername()
+ : ((any instanceof GroupTO) && ((GroupTO) any).getName() != null)
+ ? ((GroupTO) any).getName()
+ : String.valueOf(any.getKey())));
final ListView<PropagationStatus> propRes = new ListView<PropagationStatus>("resources",
propagations) {
@@ -267,7 +270,7 @@ public final class ResultStatusModal<T extends AnyTO> extends AbstractModalPanel
// sorted in reversed presentation order
final List<String> head = new ArrayList<String>();
- if (subject instanceof UserTO) {
+ if (provResult.getAny() instanceof UserTO) {
head.add(ConnIdSpecialAttributeName.PASSWORD);
head.add(ConnIdSpecialAttributeName.ENABLE);
}
@@ -286,7 +289,7 @@ public final class ResultStatusModal<T extends AnyTO> extends AbstractModalPanel
attributes.addAll(beforeAttrMap.keySet());
attributes.addAll(afterAttrMap.keySet());
- if (!(subject instanceof UserTO)) {
+ if (!(provResult.getAny() instanceof UserTO)) {
attributes.remove(ConnIdSpecialAttributeName.PASSWORD);
attributes.remove(ConnIdSpecialAttributeName.ENABLE);
}
@@ -382,7 +385,7 @@ public final class ResultStatusModal<T extends AnyTO> extends AbstractModalPanel
final Image image;
final String alt, title;
switch (statusUtils.getStatusBean(
- subject, resourceName, objectTO, this.subject instanceof GroupTO).getStatus()) {
+ provResult.getAny(), resourceName, objectTO, this.provResult.getAny() instanceof GroupTO).getStatus()) {
case ACTIVE:
image = new Image("status",
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractModalPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractModalPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractModalPanel.java
index 2c244b2..57d34aa 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractModalPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractModalPanel.java
@@ -30,7 +30,7 @@ import org.apache.wicket.markup.html.panel.Panel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class AbstractModalPanel extends Panel {
+public class AbstractModalPanel extends Panel implements ModalPanel {
private static final long serialVersionUID = 8611724965544132636L;
@@ -66,10 +66,12 @@ public class AbstractModalPanel extends Panel {
this.modal.close(target);
}
+ @Override
public void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
modal.getFeedbackPanel().refresh(target);
}
+ @Override
public void onError(final AjaxRequestTarget target, final Form<?> form) {
modal.getFeedbackPanel().refresh(target);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.java
index 68bafbe..e6bd3ed 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.java
@@ -18,6 +18,7 @@
*/
package org.apache.syncope.client.console.panels;
+import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import org.apache.syncope.client.console.PreferenceManager;
@@ -27,24 +28,23 @@ import org.apache.syncope.client.console.pages.AbstractBasePage;
import org.apache.syncope.client.console.rest.AbstractAnyRestClient;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wizards.WizardMgtPanel;
import org.apache.syncope.common.lib.to.AnyTO;
import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
import org.apache.wicket.event.Broadcast;
import org.apache.wicket.event.IEvent;
-import org.apache.wicket.event.IEventSource;
import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.markup.html.form.Form;
-import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.PropertyModel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public abstract class AbstractSearchResultPanel<T extends AnyTO> extends Panel implements IEventSource {
+public abstract class AbstractSearchResultPanel<T extends AnyTO> extends WizardMgtPanel<T> {
private static final long serialVersionUID = -9170191461250434024L;
@@ -94,12 +94,6 @@ public abstract class AbstractSearchResultPanel<T extends AnyTO> extends Panel i
private AnyDataProvider dataProvider;
/**
- * Modal window to be used for: user profile editing (Global visibility is required); attributes choosing to
- * display in tables; user status management.
- */
- protected final BaseModal<T> modal = new BaseModal<>("modal");
-
- /**
* Owner page.
*/
protected final AbstractBasePage page;
@@ -114,13 +108,16 @@ public abstract class AbstractSearchResultPanel<T extends AnyTO> extends Panel i
*/
private final String type;
- protected <T extends AnyTO> AbstractSearchResultPanel(final String id, final boolean filtered,
- final String fiql, final PageReference pageRef, final AbstractAnyRestClient restClient,
- final String realm, final String type) {
-
- super(id);
+ protected <T extends AnyTO> AbstractSearchResultPanel(
+ final String id,
+ final boolean filtered,
+ final String fiql,
+ final PageReference pageRef,
+ final AbstractAnyRestClient restClient,
+ final String realm,
+ final String type) {
- add(modal);
+ super(id, pageRef, true);
setOutputMarkupId(true);
@@ -133,7 +130,7 @@ public abstract class AbstractSearchResultPanel<T extends AnyTO> extends Panel i
this.restClient = restClient;
// Container for user search result
- container = new WebMarkupContainer("container");
+ container = new WebMarkupContainer("searchContainer");
container.setOutputMarkupId(true);
add(container);
@@ -177,7 +174,7 @@ public abstract class AbstractSearchResultPanel<T extends AnyTO> extends Panel i
paginatorForm.add(rowsChooser);
// ---------------------------
- setWindowClosedReloadCallback(modal);
+// setWindowClosedReloadCallback(modal);
}
public void search(final String fiql, final AjaxRequestTarget target) {
@@ -234,6 +231,7 @@ public abstract class AbstractSearchResultPanel<T extends AnyTO> extends Panel i
data.getTarget().add(container);
}
+ super.onEvent(event);
}
private void setWindowClosedReloadCallback(final BaseModal<?> modal) {
@@ -299,4 +297,50 @@ public abstract class AbstractSearchResultPanel<T extends AnyTO> extends Panel i
protected abstract <T extends AnyTO> Collection<ActionLink.ActionType> getBulkActions();
protected abstract String getPageId();
+
+ public abstract static class Builder<T extends Serializable> extends WizardMgtPanel.Builder<T> {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Specify if results are about a filtered search or not. Using this attribute it is possible to use this panel
+ * to
+ * show results about user list and user search.
+ */
+ protected final boolean filtered;
+
+ /**
+ * Filter used in case of filtered search.
+ */
+ protected final String fiql;
+
+ protected final AbstractAnyRestClient restClient;
+
+ /**
+ * Realm related to current panel.
+ */
+ protected final String realm;
+
+ /**
+ * Any type related to current panel.
+ */
+ protected final String type;
+
+ protected Builder(
+ final Class<T> reference,
+ final boolean filtered,
+ final String fiql,
+ final PageReference pageRef,
+ final AbstractAnyRestClient restClient,
+ final String realm,
+ final String type) {
+ super(reference, pageRef);
+ this.filtered = filtered;
+ this.fiql = fiql;
+ this.restClient = restClient;
+ this.realm = realm;
+ this.type = type;
+ }
+
+ }
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/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 5041c6e..0272555 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
@@ -61,7 +61,7 @@ public class AjaxDataTablePanel<T, S> extends DataTablePanel<T, S> {
super(id);
- final BaseModal<?> bulkModalWin = new BaseModal("bulkModal");
+ final BaseModal<?> bulkModalWin = new BaseModal<>("bulkModal");
add(bulkModalWin);
bulkModalWin.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/panels/AnySearchResultPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnySearchResultPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnySearchResultPanel.java
index eacdb4f..4e3efe3 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnySearchResultPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnySearchResultPanel.java
@@ -20,7 +20,6 @@ package org.apache.syncope.client.console.panels;
import java.io.Serializable;
import java.lang.reflect.Field;
-import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
@@ -29,12 +28,13 @@ import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.pages.AnyDisplayAttributesModalPage;
import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.rest.AbstractAnyRestClient;
-import org.apache.syncope.client.console.rest.AnyObjectRestClient;
import org.apache.syncope.client.console.rest.SchemaRestClient;
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.ActionLinksPanel;
+import org.apache.syncope.client.console.wizards.AjaxWizard;
+import org.apache.syncope.client.console.wizards.WizardMgtPanel;
import org.apache.syncope.common.lib.SyncopeClientException;
import org.apache.syncope.common.lib.to.AnyTO;
import org.apache.syncope.common.lib.to.AnyTypeClassTO;
@@ -42,12 +42,11 @@ import org.apache.syncope.common.lib.to.AnyObjectTO;
import org.apache.syncope.common.lib.types.SchemaType;
import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.event.Broadcast;
import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
import org.apache.wicket.markup.html.basic.Label;
-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.springframework.util.ReflectionUtils;
@@ -65,9 +64,15 @@ public class AnySearchResultPanel<T extends AnyTO> extends AbstractSearchResultP
private final String entitlement = "USER_LIST";
- public AnySearchResultPanel(final String type, final String parentId, final boolean filtered,
- final String fiql, final PageReference callerRef, final AbstractAnyRestClient restClient,
- final List<AnyTypeClassTO> anyTypeClassTOs, final String realm) {
+ protected AnySearchResultPanel(
+ final String type,
+ final String parentId,
+ final boolean filtered,
+ final String fiql,
+ final PageReference callerRef,
+ final AbstractAnyRestClient restClient,
+ final List<AnyTypeClassTO> anyTypeClassTOs,
+ final String realm) {
super(parentId, filtered, fiql, callerRef, restClient, realm, type);
//setCustomMarkupId(markupId);
@@ -139,16 +144,8 @@ public class AnySearchResultPanel<T extends AnyTO> extends AbstractSearchResultP
@Override
public void onClick(final AjaxRequestTarget target, final AnyTO anyTO) {
- final T modelObject = ((AnyObjectRestClient) restClient).<T>read(anyTO.getKey());
-
- final IModel<T> model = new CompoundPropertyModel<>(modelObject);
- modal.setFormModel(model);
-
- // still missing content
- target.add(modal);
-
- modal.header(new Model<String>(MessageFormat.format(getString("any.edit"), anyTO.getKey())));
- modal.show(true);
+ send(AnySearchResultPanel.this, Broadcast.BREADTH,
+ new AjaxWizard.NewItemActionEvent<AnyTO>(model.getObject(), target));
}
}, ActionLink.ActionType.EDIT, entitlement).add(new ActionLink<AnyTO>() {
@@ -222,4 +219,30 @@ public class AnySearchResultPanel<T extends AnyTO> extends AbstractSearchResultP
protected String getPageId() {
return pageID;
}
+
+ public static final class Builder extends AbstractSearchResultPanel.Builder<AnyObjectTO> {
+
+ private static final long serialVersionUID = 1L;
+
+ private final List<AnyTypeClassTO> anyTypeClassTOs;
+
+ public Builder(
+ final boolean filtered,
+ final String fiql,
+ final PageReference pageRef,
+ final AbstractAnyRestClient restClient,
+ final List<AnyTypeClassTO> anyTypeClassTOs,
+ final String realm,
+ final String type) {
+ super(AnyObjectTO.class, filtered, fiql, pageRef, restClient, realm, type);
+ this.anyTypeClassTOs = anyTypeClassTOs;
+ }
+
+ @Override
+ protected WizardMgtPanel<AnyObjectTO> newInstance(final String parentId) {
+ return new AnySearchResultPanel<AnyObjectTO>(
+ type, parentId, filtered, fiql, pageRef, restClient, anyTypeClassTOs, realm);
+ }
+
+ }
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorConfPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorConfPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorConfPanel.java
index 2e813ed..3447a97 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorConfPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ConnectorConfPanel.java
@@ -43,10 +43,10 @@ public abstract class ConnectorConfPanel extends AbstractConnectorConfPanel<Conn
this.bundles = bundles;
final List<ConnConfProperty> properties = getConnProperties(model.getObject());
- model.getObject().getConfiguration().clear();
- model.getObject().getConfiguration().addAll(properties);
+ model.getObject().getConf().clear();
+ model.getObject().getConf().addAll(properties);
- setConfPropertyListView("configuration", true);
+ setConfPropertyListView("conf", true);
}
/**
@@ -67,10 +67,10 @@ public abstract class ConnectorConfPanel extends AbstractConnectorConfPanel<Conn
final ConnConfProperty property = new ConnConfProperty();
property.setSchema(key);
- if (instance.getKey() != 0 && instance.getConfigurationMap().containsKey(key.getName())
- && instance.getConfigurationMap().get(key.getName()).getValues() != null) {
- property.getValues().addAll(instance.getConfigurationMap().get(key.getName()).getValues());
- property.setOverridable(instance.getConfigurationMap().get(key.getName()).isOverridable());
+ if (instance.getKey() != 0 && instance.getConfMap().containsKey(key.getName())
+ && instance.getConfMap().get(key.getName()).getValues() != null) {
+ property.getValues().addAll(instance.getConfMap().get(key.getName()).getValues());
+ property.setOverridable(instance.getConfMap().get(key.getName()).isOverridable());
}
if (property.getValues().isEmpty() && !key.getDefaultValues().isEmpty()) {
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupModalPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupModalPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupModalPanel.java
deleted file mode 100644
index 9778881..0000000
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupModalPanel.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.client.console.panels;
-
-import org.apache.commons.lang3.SerializationUtils;
-import org.apache.syncope.client.console.commons.Constants;
-import org.apache.syncope.client.console.commons.Mode;
-import org.apache.syncope.client.console.rest.GroupRestClient;
-import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
-import org.apache.syncope.common.lib.to.GroupTO;
-import org.apache.wicket.PageReference;
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.markup.html.form.AjaxButton;
-import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
-import org.apache.wicket.markup.html.basic.Label;
-import org.apache.wicket.markup.html.form.Form;
-import org.apache.wicket.model.CompoundPropertyModel;
-import org.apache.wicket.model.ResourceModel;
-
-/**
- * Modal window with Group form.
- */
-public class GroupModalPanel extends AbstractModalPanel {
-
- private static final long serialVersionUID = -1732493223434085205L;
-
- private final GroupRestClient groupRestClient = new GroupRestClient();
-
- protected final Mode mode;
-
- protected final boolean createFlag;
-
- protected final GroupPanel groupPanel;
-
- protected GroupTO originalGroupTO;
-
- public GroupModalPanel(
- final BaseModal<?> modal, final PageReference pageRef, final GroupTO groupTO) {
-
- this(modal, pageRef, groupTO, Mode.ADMIN);
- }
-
- @SuppressWarnings({ "unchecked", "rawtypes" })
- public GroupModalPanel(
- final BaseModal<?> modal, final PageReference pageRef, final GroupTO groupTO, final Mode mode) {
-
- super(modal, pageRef);
-
- this.mode = mode;
-
- this.createFlag = groupTO.getKey() == 0;
- if (!createFlag) {
- originalGroupTO = SerializationUtils.clone(groupTO);
- }
-
- final Form<GroupTO> form = new Form<>("groupForm");
- form.setMultiPart(true);
-
- add(new Label("displayName", groupTO.getKey() == 0 ? "" : groupTO.getDisplayName()));
-
- form.setModel(new CompoundPropertyModel<>(groupTO));
-
- this.groupPanel = new GroupPanel.Builder("groupPanel").
- form(form).groupTO(groupTO).groupModalPageMode(mode).build();
- form.add(groupPanel);
-
- final AjaxButton submit = new IndicatingAjaxButton(SUBMIT, new ResourceModel(SUBMIT)) {
-
- private static final long serialVersionUID = -958724007591692537L;
-
- @Override
- protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
- try {
- submitAction(target, form);
- } catch (Exception e) {
- LOG.error("Failure managing groupTO {}", groupTO, e);
- error(getString(Constants.ERROR) + ": " + e.getMessage());
- modal.getFeedbackPanel().refresh(target);
- }
- }
-
- @Override
- protected void onError(final AjaxRequestTarget target, final Form<?> form) {
- modal.getFeedbackPanel().refresh(target);
- }
- };
- form.add(submit);
- form.setDefaultButton(submit);
- }
-
- protected void submitAction(final AjaxRequestTarget target, final Form<?> form) {
- final GroupTO groupTO = (GroupTO) form.getDefaultModelObject();
-
- GroupTO result;
- if (createFlag) {
- result = groupRestClient.create(groupTO);
- } else {
- result = groupRestClient.update(originalGroupTO.getETagValue(), groupTO);
- }
-
- //setResponsePage(new ResultStatusModal.Builder(window, result).build());
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupPanel.java
deleted file mode 100644
index 3e58e61..0000000
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupPanel.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.client.console.panels;
-
-import java.io.Serializable;
-import org.apache.syncope.client.console.commons.Mode;
-import org.apache.syncope.common.lib.to.GroupTO;
-import org.apache.wicket.PageReference;
-import org.apache.wicket.markup.html.form.Form;
-import org.apache.wicket.markup.html.panel.Panel;
-
-public final class GroupPanel extends Panel {
-
- private static final long serialVersionUID = 4216376097320768369L;
-
- public static class Builder implements Serializable {
-
- private static final long serialVersionUID = 8150440254654306070L;
-
- private String id;
-
- private Form form;
-
- private GroupTO groupTO;
-
- private Mode mode;
-
- private PageReference pageReference;
-
- public Builder(final String id) {
- this.id = id;
- }
-
- public Builder form(final Form form) {
- this.form = form;
- return this;
- }
-
- public Builder groupTO(final GroupTO groupTO) {
- this.groupTO = groupTO;
- return this;
- }
-
- public Builder groupModalPageMode(final Mode mode) {
- this.mode = mode;
- return this;
- }
-
- public GroupPanel build() {
- return new GroupPanel(this);
- }
- }
-
- private GroupPanel(final Builder builder) {
- super(builder.id);
-
-
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupSearchResultPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupSearchResultPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupSearchResultPanel.java
index 458298b..3e94680 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupSearchResultPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupSearchResultPanel.java
@@ -34,6 +34,8 @@ import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.
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;
import org.apache.syncope.common.lib.SyncopeClientException;
import org.apache.syncope.common.lib.to.AnyTO;
import org.apache.syncope.common.lib.to.AnyTypeClassTO;
@@ -41,21 +43,28 @@ import org.apache.syncope.common.lib.to.GroupTO;
import org.apache.syncope.common.lib.types.SchemaType;
import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.event.Broadcast;
import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.ResourceModel;
import org.springframework.util.ReflectionUtils;
-public class GroupSearchResultPanel extends AnySearchResultPanel<GroupTO> {
+public final class GroupSearchResultPanel extends AnySearchResultPanel<GroupTO> {
private static final long serialVersionUID = -1100228004207271270L;
private final String entitlement = "GROUP_READ";
- public GroupSearchResultPanel(final String type, final String parentId,
- final boolean filtered, final String fiql, final PageReference callerRef,
- final AbstractAnyRestClient restClient, final List<AnyTypeClassTO> anyTypeClassTOs, final String realm) {
+ private GroupSearchResultPanel(
+ final String type,
+ final String parentId,
+ final boolean filtered,
+ final String fiql,
+ final PageReference callerRef,
+ final AbstractAnyRestClient restClient,
+ final List<AnyTypeClassTO> anyTypeClassTOs,
+ final String realm) {
super(type, parentId, filtered, fiql, callerRef, restClient, anyTypeClassTOs, realm);
}
@@ -73,8 +82,7 @@ public class GroupSearchResultPanel extends AnySearchResultPanel<GroupTO> {
} else if (field != null && field.getType().equals(Date.class)) {
columns.add(new PropertyColumn<AnyTO, String>(new ResourceModel(name, name), name, name));
} else {
- columns.add(
- new PropertyColumn<AnyTO, String>(new ResourceModel(name, name), name, name));
+ columns.add(new PropertyColumn<AnyTO, String>(new ResourceModel(name, name), name, name));
}
}
@@ -115,11 +123,8 @@ public class GroupSearchResultPanel extends AnySearchResultPanel<GroupTO> {
@Override
public void onClick(final AjaxRequestTarget target, final AnyTO anyTO) {
- modal.addOrReplace(new GroupModalPanel(
- modal, getPage().getPageReference(), GroupTO.class.cast(model.getObject())));
-
- target.add(modal);
- modal.show(target);
+ send(GroupSearchResultPanel.this, Broadcast.BREADTH,
+ new AjaxWizard.NewItemActionEvent<AnyTO>(model.getObject(), target));
}
}, ActionLink.ActionType.EDIT, entitlement).add(new ActionLink<AnyTO>() {
@@ -219,4 +224,30 @@ public class GroupSearchResultPanel extends AnySearchResultPanel<GroupTO> {
protected String getPageId() {
return pageID;
}
+
+ public static final class Builder extends AbstractSearchResultPanel.Builder<GroupTO> {
+
+ private static final long serialVersionUID = 1L;
+
+ private final List<AnyTypeClassTO> anyTypeClassTOs;
+
+ public Builder(
+ final boolean filtered,
+ final String fiql,
+ final PageReference pageRef,
+ final AbstractAnyRestClient restClient,
+ final List<AnyTypeClassTO> anyTypeClassTOs,
+ final String realm,
+ final String type) {
+ super(GroupTO.class, filtered, fiql, pageRef, restClient, realm, type);
+ this.anyTypeClassTOs = anyTypeClassTOs;
+ }
+
+ @Override
+ protected WizardMgtPanel<GroupTO> newInstance(final String parentId) {
+ return new GroupSearchResultPanel(
+ type, parentId, filtered, fiql, pageRef, restClient, anyTypeClassTOs, realm);
+ }
+
+ }
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/panels/ListViewPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ListViewPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ListViewPanel.java
index ca67bdb..229bcca 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ListViewPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ListViewPanel.java
@@ -27,28 +27,21 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
-import org.apache.syncope.client.console.commons.Constants;
-import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
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.AjaxWizardBuilder;
+import org.apache.syncope.client.console.wizards.WizardMgtPanel;
import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.event.Broadcast;
import org.apache.wicket.event.IEvent;
-import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.basic.Label;
-import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.ListView;
-import org.apache.wicket.markup.html.panel.Fragment;
-import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.ResourceModel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public final class ListViewPanel<T extends Serializable> extends Panel {
+public final class ListViewPanel<T extends Serializable> extends WizardMgtPanel<T> {
private static final long serialVersionUID = -7982691107029848579L;
@@ -57,18 +50,8 @@ public final class ListViewPanel<T extends Serializable> extends Panel {
*/
private static final Logger LOG = LoggerFactory.getLogger(ListViewPanel.class);
- private final ClearIndicatingAjaxButton addButton;
-
- private AjaxWizardBuilder<T> newItemPanelBuilder;
-
- private final WebMarkupContainer container;
-
- private final Fragment initialFragment;
-
private final List<T> listOfItems;
- private NotificationPanel notificationPanel;
-
/**
* Table view of a list of beans.
*
@@ -85,16 +68,10 @@ public final class ListViewPanel<T extends Serializable> extends Panel {
final List<String> includes,
final ActionLinksPanel.Builder<T> actions,
final PageReference pageRef) {
- super(id);
+ super(id, pageRef);
setOutputMarkupId(true);
- container = new WebMarkupContainer("container");
- add(container.setOutputMarkupId(true));
-
- initialFragment = new Fragment("content", "table", this);
- container.addOrReplace(initialFragment);
-
- initialFragment.add(new Label("caption", new ResourceModel("listview.caption", StringUtils.EMPTY)));
+ add(new Label("caption", new ResourceModel("listview.caption", StringUtils.EMPTY)));
final List<String> toBeIncluded;
if (includes == null || includes.isEmpty()) {
@@ -130,7 +107,7 @@ public final class ListViewPanel<T extends Serializable> extends Panel {
item.add(new Label("name", new ResourceModel(item.getModelObject(), item.getModelObject())));
}
};
- initialFragment.add(names);
+ add(names);
final ListView<T> beans = new ListView<T>("beans", listOfItems) {
@@ -169,78 +146,14 @@ public final class ListViewPanel<T extends Serializable> extends Panel {
beanItem.add(actions.build("actions", bean));
}
};
+ beans.setOutputMarkupId(true);
beans.setReuseItems(true);
- initialFragment.add(beans);
-
- addButton = new ClearIndicatingAjaxButton("add", pageRef) {
-
- private static final long serialVersionUID = 1L;
-
- @Override
- protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
- send(ListViewPanel.this, Broadcast.DEPTH, new AjaxWizard.NewItemActionEvent<T>(null, target));
- }
- };
-
- addButton.setEnabled(false);
- addButton.setVisible(false);
-
- initialFragment.add(addButton);
+ add(beans);
}
- @Override
- @SuppressWarnings("unchecked")
- public void onEvent(final IEvent<?> event) {
- if (event.getPayload() instanceof AjaxWizard.NewItemEvent) {
- final AjaxRequestTarget target = AjaxWizard.NewItemEvent.class.cast(event.getPayload()).getTarget();
-
- final T item = ((AjaxWizard.NewItemEvent<T>) event.getPayload()).getItem();
-
- if (event.getPayload() instanceof AjaxWizard.NewItemActionEvent) {
- final Fragment fragment = new Fragment("content", "wizard", ListViewPanel.this);
- newItemPanelBuilder.setItem(item);
-
- fragment.add(newItemPanelBuilder.build(
- ((AjaxWizard.NewItemActionEvent<T>) event.getPayload()).getIndex()));
-
- container.addOrReplace(fragment);
- } else {
- if (event.getPayload() instanceof AjaxWizard.NewItemFinishEvent) {
- if (item != null && !this.listOfItems.contains(item)) {
- this.listOfItems.add(item);
- }
-
- if (notificationPanel != null) {
- getSession().info(getString(Constants.OPERATION_SUCCEEDED));
- notificationPanel.refresh(target);
- }
- }
- container.addOrReplace(initialFragment);
- }
-
- target.add(container);
- }
- super.onEvent(event);
- }
-
- private ListViewPanel<T> addNewItemPanelBuilder(final AjaxWizardBuilder<T> panelBuilder) {
- this.newItemPanelBuilder = panelBuilder;
-
- if (this.newItemPanelBuilder != null) {
- addButton.setEnabled(true);
- addButton.setVisible(true);
- }
-
- return this;
- }
-
- private ListViewPanel<T> addNotificationPanel(final NotificationPanel notificationPanel) {
- this.notificationPanel = notificationPanel;
- return this;
- }
-
- public static <T extends Serializable> Builder<T> builder(final Class<T> reference, final PageReference pageRef) {
- return new Builder<T>(reference, pageRef);
+ public static <T extends Serializable> ListViewPanel.Builder<T> builder(
+ final Class<T> reference, final PageReference pageRef) {
+ return new ListViewPanel.Builder<T>(reference, pageRef);
}
/**
@@ -248,43 +161,23 @@ public final class ListViewPanel<T extends Serializable> extends Panel {
*
* @param <T> list item reference type.
*/
- public static final class Builder<T extends Serializable> implements Serializable {
+ public static final class Builder<T extends Serializable> extends WizardMgtPanel.Builder<T> {
private static final long serialVersionUID = 1L;
- private final PageReference pageRef;
-
- private final Class<T> reference;
-
private final List<String> includes = new ArrayList<>();
private final ActionLinksPanel.Builder<T> actions;
private List<T> items;
- private AjaxWizardBuilder<T> newItemPanelBuilder;
-
- private NotificationPanel notificationPanel;
-
private Builder(final Class<T> reference, final PageReference pageRef) {
- this.pageRef = pageRef;
- this.reference = reference;
+ super(reference, pageRef);
this.items = null;
this.actions = ActionLinksPanel.<T>builder(pageRef);
}
/**
- * Builds a list view.
- *
- * @param id component id.
- * @return List view.
- */
- public ListViewPanel<T> build(final String id) {
- return new ListViewPanel<T>(id, items, reference, includes, actions, pageRef).
- addNewItemPanelBuilder(newItemPanelBuilder).addNotificationPanel(notificationPanel);
- }
-
- /**
* Sets list of items.
*
* @param items list of items.
@@ -343,14 +236,28 @@ public final class ListViewPanel<T extends Serializable> extends Panel {
return this;
}
- public Builder<T> addNewItemPanelBuilder(final AjaxWizardBuilder<T> panelBuilder) {
- this.newItemPanelBuilder = panelBuilder;
- return this;
+ @Override
+ protected WizardMgtPanel<T> newInstance(final String id) {
+ return new ListViewPanel<T>(id, items, reference, includes, actions, pageRef);
}
+ }
- public Builder<T> addNotificationPanel(final NotificationPanel notificationPanel) {
- this.notificationPanel = notificationPanel;
- return this;
+ @Override
+ @SuppressWarnings("unchecked")
+ public void onEvent(final IEvent<?> event) {
+ if (event.getPayload() instanceof AjaxWizard.NewItemEvent) {
+
+ final T item = ((AjaxWizard.NewItemEvent<T>) event.getPayload()).getItem();
+ final AjaxRequestTarget target = ((AjaxWizard.NewItemEvent<T>) event.getPayload()).getTarget();
+
+ if (event.getPayload() instanceof AjaxWizard.NewItemFinishEvent) {
+ if (item != null && !this.listOfItems.contains(item)) {
+ this.listOfItems.add(item);
+ }
+ }
+
+ target.add(ListViewPanel.this);
}
+ super.onEvent(event);
}
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/panels/ModalPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ModalPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ModalPanel.java
new file mode 100644
index 0000000..681c1f2
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ModalPanel.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.console.panels;
+
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.request.component.IRequestableComponent;
+
+public interface ModalPanel extends IRequestableComponent {
+
+ void onSubmit(final AjaxRequestTarget target, final Form<?> form);
+
+ void onError(final AjaxRequestTarget target, final Form<?> form);
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/panels/Realm.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/Realm.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/Realm.java
index 3725019..edf35ee 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/Realm.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/Realm.java
@@ -22,12 +22,20 @@ import com.googlecode.wicket.jquery.core.panel.LabelPanel;
import de.agilecoders.wicket.core.markup.html.bootstrap.tabs.AjaxBootstrapTabbedPanel;
import java.util.ArrayList;
import java.util.List;
+import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.rest.AnyObjectRestClient;
import org.apache.syncope.client.console.rest.AnyTypeRestClient;
import org.apache.syncope.client.console.rest.GroupRestClient;
import org.apache.syncope.client.console.rest.UserRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
+import org.apache.syncope.client.console.wizards.any.AnyWizardBuilder;
+import org.apache.syncope.client.console.wizards.any.GroupWizardBuilder;
+import org.apache.syncope.client.console.wizards.any.UserWizardBuilder;
+import org.apache.syncope.common.lib.to.AnyObjectTO;
import org.apache.syncope.common.lib.to.AnyTypeTO;
+import org.apache.syncope.common.lib.to.GroupTO;
import org.apache.syncope.common.lib.to.RealmTO;
+import org.apache.syncope.common.lib.to.UserTO;
import org.apache.wicket.PageReference;
import org.apache.wicket.extensions.markup.html.tabs.AbstractTab;
import org.apache.wicket.extensions.markup.html.tabs.ITab;
@@ -54,13 +62,16 @@ public class Realm extends Panel {
private final AnyObjectRestClient anyObjectRestClient = new AnyObjectRestClient();
+ private final PageReference pageRef;
+
@SuppressWarnings({ "unchecked", "unchecked" })
- public Realm(final String id, final RealmTO realmTO, final PageReference pageReference) {
+ public Realm(final String id, final RealmTO realmTO, final PageReference pageRef) {
super(id);
this.realmTO = realmTO;
this.anyTypeTOs = anyTypeRestClient.getAll();
+ this.pageRef = pageRef;
- add(new AjaxBootstrapTabbedPanel<>("tabbedPanel", buildTabList(pageReference)));
+ add(new AjaxBootstrapTabbedPanel<>("tabbedPanel", buildTabList(pageRef)));
}
public RealmTO getRealmTO() {
@@ -103,19 +114,44 @@ public class Realm extends Panel {
switch (anyTypeTO.getKind()) {
case USER:
- panel = new UserSearchResultPanel(anyTypeTO.getKey(), id,
- false, null, pageReference, userRestClient, anyTypeRestClient.getAnyTypeClass(
- anyTypeTO.getClasses()), realmTO.getFullPath());
+ final UserTO userTO = new UserTO();
+ userTO.setRealm(realmTO.getFullPath());
+ panel = new UserSearchResultPanel.Builder(
+ false, null, pageReference, userRestClient,
+ anyTypeRestClient.getAnyTypeClass(anyTypeTO.getClasses().toArray(new String[] {})),
+ realmTO.getFullPath(),
+ anyTypeTO.getKey()).
+ addNewItemPanelBuilder(new UserWizardBuilder(
+ BaseModal.CONTENT_ID, userTO, anyTypeTO.getClasses(), pageRef)).
+ addNotificationPanel(BasePage.class.cast(this.pageRef.getPage()).getFeedbackPanel()).
+ build(id);
break;
case GROUP:
- panel = new GroupSearchResultPanel(anyTypeTO.getKey(), id,
- false, null, pageReference, groupRestClient, anyTypeRestClient.getAnyTypeClass(
- anyTypeTO.getClasses()), realmTO.getFullPath());
+ final GroupTO groupTO = new GroupTO();
+ groupTO.setRealm(realmTO.getFullPath());
+ panel = new GroupSearchResultPanel.Builder(
+ false, null, pageReference, groupRestClient,
+ anyTypeRestClient.getAnyTypeClass(anyTypeTO.getClasses().toArray(new String[] {})),
+ realmTO.getFullPath(),
+ anyTypeTO.getKey()).
+ addNewItemPanelBuilder(new GroupWizardBuilder(
+ BaseModal.CONTENT_ID, groupTO, anyTypeTO.getClasses(), pageRef)).
+ addNotificationPanel(BasePage.class.cast(this.pageRef.getPage()).getFeedbackPanel()).
+ build(id);
break;
case ANY_OBJECT:
- panel = new AnySearchResultPanel<>(anyTypeTO.getKey(), id,
- false, null, pageReference, anyObjectRestClient, anyTypeRestClient.getAnyTypeClass(
- anyTypeTO.getClasses()), realmTO.getFullPath());
+ final AnyObjectTO anyObjectTO = new AnyObjectTO();
+ anyObjectTO.setRealm(realmTO.getFullPath());
+ anyObjectTO.setType(anyTypeTO.getKey());
+ panel = new AnySearchResultPanel.Builder(
+ false, null, pageReference, anyObjectRestClient,
+ anyTypeRestClient.getAnyTypeClass(anyTypeTO.getClasses().toArray(new String[] {})),
+ realmTO.getFullPath(),
+ anyTypeTO.getKey()).
+ addNewItemPanelBuilder(new AnyWizardBuilder<AnyObjectTO>(
+ BaseModal.CONTENT_ID, anyObjectTO, anyTypeTO.getClasses(), pageRef)).
+ addNotificationPanel(BasePage.class.cast(this.pageRef.getPage()).getFeedbackPanel()).
+ build(id);
break;
default:
panel = new LabelPanel(id, null);
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java
index 730b4cf..a838a47 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceConnConfPanel.java
@@ -31,7 +31,7 @@ public abstract class ResourceConnConfPanel extends AbstractConnectorConfPanel<R
private static final long serialVersionUID = -7982691107029848579L;
- private ConnectorRestClient restClient = new ConnectorRestClient();
+ private final ConnectorRestClient restClient = new ConnectorRestClient();
private final boolean createFlag;
@@ -40,14 +40,14 @@ public abstract class ResourceConnConfPanel extends AbstractConnectorConfPanel<R
this.createFlag = createFlag;
- final List<ConnConfProperty> connConfProperties = getConnProperties(model.getObject());
+ final List<ConnConfProperty> confOverride = getConnProperties(model.getObject());
model.getObject().getConfOverride().clear();
- model.getObject().getConfOverride().addAll(connConfProperties);
+ model.getObject().getConfOverride().addAll(confOverride);
- setConfPropertyListView("connConfProperties", false);
+ setConfPropertyListView("confOverride", false);
- check.setEnabled(!connConfProperties.isEmpty());
- check.setVisible(!connConfProperties.isEmpty());
+ check.setEnabled(!confOverride.isEmpty());
+ check.setVisible(!confOverride.isEmpty());
}
/**
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceDetailsPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceDetailsPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceDetailsPanel.java
index fe33899..3e9881f 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceDetailsPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceDetailsPanel.java
@@ -72,12 +72,6 @@ public class ResourceDetailsPanel extends Panel {
new PropertyModel<Boolean>(model, "enforceMandatoryCondition"),
false));
- container.add(new AjaxCheckBoxPanel(
- "propagationPrimary",
- new ResourceModel("propagationPrimary", "propagationPrimary").getObject(),
- new PropertyModel<Boolean>(model, "propagationPrimary"),
- false));
-
container.add(new SpinnerFieldPanel<>(
"propagationPriority",
"propagationPriority",
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/panels/UserSearchResultPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/UserSearchResultPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/UserSearchResultPanel.java
index 06725cf..26f638c 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/UserSearchResultPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/UserSearchResultPanel.java
@@ -31,12 +31,13 @@ import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.pages.StatusModalPage;
import org.apache.syncope.client.console.pages.UserDisplayAttributesModalPage;
import org.apache.syncope.client.console.rest.AbstractAnyRestClient;
-import org.apache.syncope.client.console.rest.UserRestClient;
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;
import org.apache.syncope.common.lib.SyncopeClientException;
import org.apache.syncope.common.lib.to.AnyTO;
import org.apache.syncope.common.lib.to.AnyTypeClassTO;
@@ -44,6 +45,7 @@ import org.apache.syncope.common.lib.to.UserTO;
import org.apache.syncope.common.lib.types.SchemaType;
import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.event.Broadcast;
import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
import org.apache.wicket.model.CompoundPropertyModel;
@@ -52,15 +54,21 @@ import org.apache.wicket.model.Model;
import org.apache.wicket.model.ResourceModel;
import org.springframework.util.ReflectionUtils;
-public class UserSearchResultPanel extends AnySearchResultPanel<UserTO> {
+public final class UserSearchResultPanel extends AnySearchResultPanel<UserTO> {
private static final long serialVersionUID = -1100228004207271270L;
private final String entitlement = "USER_LIST";
- public UserSearchResultPanel(final String type, final String parentId,
- final boolean filtered, final String fiql, final PageReference callerRef,
- final AbstractAnyRestClient restClient, final List<AnyTypeClassTO> anyTypeClassTOs, final String realm) {
+ private UserSearchResultPanel(
+ final String type,
+ final String parentId,
+ final boolean filtered,
+ final String fiql,
+ final PageReference callerRef,
+ final AbstractAnyRestClient restClient,
+ final List<AnyTypeClassTO> anyTypeClassTOs,
+ final String realm) {
super(type, parentId, filtered, fiql, callerRef, restClient, anyTypeClassTOs, realm);
}
@@ -78,8 +86,7 @@ public class UserSearchResultPanel extends AnySearchResultPanel<UserTO> {
} else if (field != null && field.getType().equals(Date.class)) {
columns.add(new PropertyColumn<AnyTO, String>(new ResourceModel(name, name), name, name));
} else {
- columns.add(
- new PropertyColumn<AnyTO, String>(new ResourceModel(name, name), name, name));
+ columns.add(new PropertyColumn<AnyTO, String>(new ResourceModel(name, name), name, name));
}
}
@@ -98,8 +105,7 @@ public class UserSearchResultPanel extends AnySearchResultPanel<UserTO> {
// Add defaults in case of no selection
if (columns.isEmpty()) {
for (String name : UserDisplayAttributesModalPage.USER_DEFAULT_SELECTION) {
- columns.add(
- new PropertyColumn<AnyTO, String>(new ResourceModel(name, name), name, name));
+ columns.add(new PropertyColumn<AnyTO, String>(new ResourceModel(name, name), name, name));
}
prefMan.setList(getRequest(), getResponse(), Constants.PREF_USERS_DETAILS_VIEW,
@@ -155,15 +161,8 @@ public class UserSearchResultPanel extends AnySearchResultPanel<UserTO> {
@Override
public void onClick(final AjaxRequestTarget target, final AnyTO anyTO) {
- final UserTO modelObject = ((UserRestClient) restClient).read(model.getObject().getKey());
-
- final IModel<UserTO> model = new CompoundPropertyModel<>(modelObject);
- modal.setFormModel(model);
-
- target.add(modal);
-
- modal.header(new Model<String>(MessageFormat.format(getString("any.edit"), anyTO.getKey())));
- modal.show(true);
+ send(UserSearchResultPanel.this, Broadcast.BREADTH,
+ new AjaxWizard.NewItemActionEvent<AnyTO>(model.getObject(), target));
}
}, ActionLink.ActionType.EDIT, entitlement).add(new ActionLink<AnyTO>() {
@@ -236,4 +235,29 @@ public class UserSearchResultPanel extends AnySearchResultPanel<UserTO> {
protected String getPageId() {
return pageID;
}
+
+ public static final class Builder extends AbstractSearchResultPanel.Builder<UserTO> {
+
+ private static final long serialVersionUID = 1L;
+
+ private final List<AnyTypeClassTO> anyTypeClassTOs;
+
+ public Builder(
+ final boolean filtered,
+ final String fiql,
+ final PageReference pageRef,
+ final AbstractAnyRestClient restClient,
+ final List<AnyTypeClassTO> anyTypeClassTOs,
+ final String realm,
+ final String type) {
+ super(UserTO.class, filtered, fiql, pageRef, restClient, realm, type);
+ this.anyTypeClassTOs = anyTypeClassTOs;
+ }
+
+ @Override
+ protected WizardMgtPanel<UserTO> newInstance(final String parentId) {
+ return new UserSearchResultPanel(
+ type, parentId, filtered, fiql, pageRef, restClient, anyTypeClassTOs, realm);
+ }
+ }
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/rest/AnyTypeRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/AnyTypeRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/AnyTypeRestClient.java
index 113e30d..85b7c88 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/rest/AnyTypeRestClient.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/AnyTypeRestClient.java
@@ -20,9 +20,15 @@ package org.apache.syncope.client.console.rest;
import java.util.ArrayList;
import java.util.List;
+import javax.ws.rs.core.GenericType;
+import javax.ws.rs.core.Response;
import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.patch.AnyObjectPatch;
+import org.apache.syncope.common.lib.to.AnyObjectTO;
import org.apache.syncope.common.lib.to.AnyTypeClassTO;
import org.apache.syncope.common.lib.to.AnyTypeTO;
+import org.apache.syncope.common.lib.to.ProvisioningResult;
+import org.apache.syncope.common.rest.api.service.AnyObjectService;
import org.apache.syncope.common.rest.api.service.AnyTypeClassService;
import org.apache.syncope.common.rest.api.service.AnyTypeService;
import org.springframework.stereotype.Component;
@@ -35,6 +41,18 @@ public class AnyTypeRestClient extends BaseRestClient {
private static final long serialVersionUID = 1L;
+ public AnyTypeTO get(final String kind) {
+ AnyTypeTO type = null;
+
+ try {
+ type = getService(AnyTypeService.class).read(kind);
+ } catch (SyncopeClientException e) {
+ LOG.error("While reading all any types", e);
+ }
+
+ return type;
+ }
+
public List<AnyTypeTO> getAll() {
List<AnyTypeTO> types = null;
@@ -47,11 +65,28 @@ public class AnyTypeRestClient extends BaseRestClient {
return types;
}
- public List<AnyTypeClassTO> getAnyTypeClass(final List<String> anyTypeClassNames) {
+ public List<AnyTypeClassTO> getAnyTypeClass(final String... anyTypeClassNames) {
List<AnyTypeClassTO> anyTypeClassTOs = new ArrayList<>();
for (String anyTypeClass : anyTypeClassNames) {
anyTypeClassTOs.add(getService(AnyTypeClassService.class).read(anyTypeClass));
}
return anyTypeClassTOs;
}
+
+ public ProvisioningResult<AnyObjectTO> create(final AnyObjectTO anyObjectTO) {
+ Response response = getService(AnyObjectService.class).create(anyObjectTO);
+ return response.readEntity(new GenericType<ProvisioningResult<AnyObjectTO>>() {
+ });
+ }
+
+ public ProvisioningResult<AnyObjectTO> update(final String etag, final AnyObjectPatch anyObjectPatch) {
+ ProvisioningResult<AnyObjectTO> result;
+ synchronized (this) {
+ AnyObjectService service = getService(etag, AnyObjectService.class);
+ result = service.update(anyObjectPatch).readEntity(new GenericType<ProvisioningResult<AnyObjectTO>>() {
+ });
+ resetClient(AnyObjectService.class);
+ }
+ return result;
+ }
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/rest/ConfigurationRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/ConfigurationRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/ConfigurationRestClient.java
index c24cf53..d1ec74d 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/rest/ConfigurationRestClient.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/ConfigurationRestClient.java
@@ -25,7 +25,6 @@ import org.apache.syncope.client.console.commons.AttrLayoutType;
import org.apache.syncope.common.lib.SyncopeClientException;
import org.apache.syncope.common.lib.to.AttrTO;
import org.apache.syncope.common.rest.api.service.ConfigurationService;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
@@ -33,8 +32,7 @@ public class ConfigurationRestClient extends BaseRestClient {
private static final long serialVersionUID = 7692363064029538722L;
- @Autowired
- private SchemaRestClient schemaRestClient;
+ private SchemaRestClient schemaRestClient = new SchemaRestClient();
public List<AttrTO> list() {
final List<AttrTO> attrTOs = getService(ConfigurationService.class).list();
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/rest/GroupRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/GroupRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/GroupRestClient.java
index a026119..fbf0ab0 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/rest/GroupRestClient.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/GroupRestClient.java
@@ -19,13 +19,16 @@
package org.apache.syncope.client.console.rest;
import java.util.List;
+import javax.ws.rs.core.GenericType;
import javax.ws.rs.core.Response;
import org.apache.syncope.client.lib.SyncopeClient;
+import org.apache.syncope.common.lib.patch.GroupPatch;
import org.apache.syncope.common.lib.to.BulkAction;
import org.apache.syncope.common.lib.to.BulkActionResult;
import org.apache.syncope.common.lib.to.ConnObjectTO;
import org.apache.syncope.common.lib.to.GroupTO;
+import org.apache.syncope.common.lib.to.ProvisioningResult;
import org.apache.syncope.common.lib.types.AnyTypeKind;
import org.apache.syncope.common.rest.api.service.AnyService;
import org.apache.syncope.common.rest.api.service.ResourceService;
@@ -85,20 +88,22 @@ public class GroupRestClient extends AbstractAnyRestClient {
return getService(ResourceService.class).readConnObject(resourceName, AnyTypeKind.GROUP.name(), id);
}
- public GroupTO create(final GroupTO groupTO) {
+ public ProvisioningResult<GroupTO> create(final GroupTO groupTO) {
Response response = getService(GroupService.class).create(groupTO);
- return response.readEntity(GroupTO.class);
+ return response.readEntity(new GenericType<ProvisioningResult<GroupTO>>() {
+ });
}
public GroupTO read(final Long key) {
return getService(GroupService.class).read(key);
}
- public GroupTO update(final String etag, final GroupTO updated) {
- GroupTO result;
+ public ProvisioningResult<GroupTO> update(final String etag, final GroupPatch patch) {
+ ProvisioningResult<GroupTO> result;
synchronized (this) {
GroupService service = getService(etag, GroupService.class);
- result = service.update(updated).readEntity(GroupTO.class);
+ result = service.update(patch).readEntity(new GenericType<ProvisioningResult<GroupTO>>() {
+ });
resetClient(GroupService.class);
}
return result;
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/rest/SchemaRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/SchemaRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/SchemaRestClient.java
index 6b9f244..ee95e5c 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/rest/SchemaRestClient.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/SchemaRestClient.java
@@ -20,7 +20,6 @@ package org.apache.syncope.client.console.rest;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.Collections;
import java.util.List;
import java.util.ListIterator;
import org.apache.commons.collections4.CollectionUtils;
@@ -60,26 +59,20 @@ public class SchemaRestClient extends BaseRestClient {
}
}
- public List<? extends AbstractSchemaTO> getSchemas(final SchemaType schemaType) {
- List<? extends AbstractSchemaTO> schemas = Collections.emptyList();
+ public <T extends AbstractSchemaTO> List<T> getSchemas(final SchemaType schemaType, final String... kind) {
+ List<T> schemas = new ArrayList<>();
try {
- schemas = getService(SchemaService.class).list(schemaType);
- } catch (SyncopeClientException e) {
- LOG.error("While getting all schemas for {}", schemaType, e);
- }
- return schemas;
- }
-
- public List<PlainSchemaTO> getSchemas() {
- List<PlainSchemaTO> schemas = null;
-
- try {
- schemas = getService(SchemaService.class).list(SchemaType.PLAIN);
+ if (kind == null || kind.length == 0) {
+ schemas.addAll(getService(SchemaService.class).<T>list(schemaType, null));
+ } else {
+ for (String clazz : kind) {
+ schemas.addAll(getService(SchemaService.class).<T>list(schemaType, clazz));
+ }
+ }
} catch (SyncopeClientException e) {
- LOG.error("While getting all schemas", e);
+ LOG.error("While getting all {} schemas for {}", schemaType, kind, e);
}
-
return schemas;
}
@@ -109,7 +102,7 @@ public class SchemaRestClient extends BaseRestClient {
List<DerSchemaTO> userDerSchemas = null;
try {
- userDerSchemas = getService(SchemaService.class).list(SchemaType.DERIVED);
+ userDerSchemas = getService(SchemaService.class).list(SchemaType.DERIVED, null);
} catch (SyncopeClientException e) {
LOG.error("While getting all user derived schemas", e);
}
@@ -125,7 +118,7 @@ public class SchemaRestClient extends BaseRestClient {
List<VirSchemaTO> userVirSchemas = null;
try {
- userVirSchemas = getService(SchemaService.class).list(SchemaType.VIRTUAL);
+ userVirSchemas = getService(SchemaService.class).list(SchemaType.VIRTUAL, null);
} catch (SyncopeClientException e) {
LOG.error("While getting all virtual schemas", e);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/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 cf92dad..2f148c4 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
@@ -19,6 +19,7 @@
package org.apache.syncope.client.console.rest;
import java.util.List;
+import javax.ws.rs.core.GenericType;
import javax.ws.rs.core.Response;
import org.apache.syncope.client.console.commons.status.StatusBean;
import org.apache.syncope.client.console.commons.status.StatusUtils;
@@ -29,6 +30,7 @@ import org.apache.syncope.common.lib.patch.UserPatch;
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.ProvisioningResult;
import org.apache.syncope.common.lib.to.UserTO;
import org.apache.syncope.common.lib.types.AnyTypeKind;
import org.apache.syncope.common.lib.types.StatusPatchType;
@@ -67,16 +69,18 @@ public class UserRestClient extends AbstractAnyRestClient {
getResult();
}
- public UserTO create(final UserTO userTO, final boolean storePassword) {
+ public ProvisioningResult<UserTO> create(final UserTO userTO, final boolean storePassword) {
Response response = getService(UserService.class).create(userTO, storePassword);
- return response.readEntity(UserTO.class);
+ return response.readEntity(new GenericType<ProvisioningResult<UserTO>>() {
+ });
}
- public UserTO update(final String etag, final UserPatch userPatch) {
- UserTO result;
+ public ProvisioningResult<UserTO> update(final String etag, final UserPatch userPatch) {
+ ProvisioningResult<UserTO> result;
synchronized (this) {
UserService service = getService(etag, UserService.class);
- result = service.update(userPatch).readEntity(UserTO.class);
+ result = service.update(userPatch).readEntity(new GenericType<ProvisioningResult<UserTO>>() {
+ });
resetClient(UserService.class);
}
return result;
http://git-wip-us.apache.org/repos/asf/syncope/blob/047ac019/client/console/src/main/java/org/apache/syncope/client/console/wicket/ajax/markup/html/ClearIndicatingAjaxLink.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/ajax/markup/html/ClearIndicatingAjaxLink.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/ajax/markup/html/ClearIndicatingAjaxLink.java
index e052846..70491e2 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/ajax/markup/html/ClearIndicatingAjaxLink.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/ajax/markup/html/ClearIndicatingAjaxLink.java
@@ -36,11 +36,13 @@ public abstract class ClearIndicatingAjaxLink<T> extends IndicatingAjaxLink<T> {
public ClearIndicatingAjaxLink(final String id, final PageReference pageRef) {
super(id);
this.pageRef = pageRef;
+ setOutputMarkupId(true);
}
public ClearIndicatingAjaxLink(final String id, final IModel<T> model, final PageReference pageRef) {
super(id, model);
this.pageRef = pageRef;
+ setOutputMarkupId(true);
}
public ClearIndicatingAjaxLink<T> feedbackPanelAutomaticReload(final boolean reloadFeedbackPanel) {
[06/28] syncope git commit: [SYNCOPE-156] merge from master +
connector and resource modal re-work. Still re-working on provisions and
mappings
Posted by fm...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceDetailsPanel.java
----------------------------------------------------------------------
diff --cc client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceDetailsPanel.java
index 40789c7,59ab76f..fe33899
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceDetailsPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceDetailsPanel.java
@@@ -20,30 -20,34 +20,19 @@@ package org.apache.syncope.client.conso
import java.util.Arrays;
import java.util.List;
-import org.apache.commons.lang3.StringUtils;
--import org.apache.syncope.client.console.commons.Constants;
-import org.apache.syncope.client.console.panels.ModalContent.ModalEvent;
--import org.apache.syncope.client.console.rest.ConnectorRestClient;
- import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal.ModalEvent;
import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPanel;
import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.MultiFieldPanel;
import org.apache.syncope.client.console.wicket.markup.html.form.SpinnerFieldPanel;
--import org.apache.syncope.common.lib.to.ConnInstanceTO;
import org.apache.syncope.common.lib.to.ResourceTO;
- import org.apache.syncope.common.lib.types.PropagationMode;
import org.apache.syncope.common.lib.types.TraceLevel;
--import org.apache.wicket.ajax.AjaxRequestTarget;
--import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
-import org.apache.wicket.ajax.markup.html.AjaxLink;
--import org.apache.wicket.event.Broadcast;
-import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxLink;
import org.apache.wicket.markup.html.WebMarkupContainer;
--import org.apache.wicket.markup.html.form.ChoiceRenderer;
-import org.apache.wicket.markup.html.form.DropDownChoice;
-import org.apache.wicket.markup.html.list.ListItem;
-import org.apache.wicket.markup.html.list.ListView;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.IModel;
--import org.apache.wicket.model.LoadableDetachableModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.PropertyModel;
import org.apache.wicket.model.ResourceModel;
--import org.apache.wicket.spring.injection.annot.SpringBean;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@@ -56,192 -60,240 +45,92 @@@ public class ResourceDetailsPanel exten
*/
private static final Logger LOG = LoggerFactory.getLogger(ResourceDetailsPanel.class);
-- @SpringBean
-- private ConnectorRestClient connRestClient;
--
-- private ConnInstanceTO connInstanceTO;
--
-- public ResourceDetailsPanel(final String id, final ResourceTO resourceTO, final List<String> actionClassNames,
++ public ResourceDetailsPanel(
++ final String id,
++ final IModel<ResourceTO> model,
++ final List<String> actionClassNames,
final boolean createFlag) {
super(id);
setOutputMarkupId(true);
- final AjaxTextFieldPanel resourceName = new AjaxTextFieldPanel("name", new ResourceModel("name", "name").
- getObject(), new PropertyModel<String>(resourceTO, "key"));
+ final WebMarkupContainer container = new WebMarkupContainer("container");
+ container.setOutputMarkupId(true);
+ container.setRenderBodyOnly(true);
+ add(container);
- final AjaxTextFieldPanel resourceName = new AjaxTextFieldPanel("name", new ResourceModel("name", "name").
- getObject(), new PropertyModel<String>(resourceTO, "key"));
-
-- resourceName.setEnabled(createFlag);
-- resourceName.addRequiredLabel();
- container.add(resourceName);
- add(resourceName);
++ container.add(new AjaxTextFieldPanel(
++ "name",
++ new ResourceModel("name", "name").
++ getObject(),
++ new PropertyModel<String>(model, "key"),
++ false).addRequiredLabel().setEnabled(createFlag));
-- final AjaxCheckBoxPanel enforceMandatoryCondition = new AjaxCheckBoxPanel("enforceMandatoryCondition",
++ container.add(new AjaxCheckBoxPanel(
++ "enforceMandatoryCondition",
new ResourceModel("enforceMandatoryCondition", "enforceMandatoryCondition").getObject(),
-- new PropertyModel<Boolean>(resourceTO, "enforceMandatoryCondition"));
- container.add(enforceMandatoryCondition);
- add(enforceMandatoryCondition);
-
- final AjaxCheckBoxPanel propagationPrimary = new AjaxCheckBoxPanel("propagationPrimary", new ResourceModel(
- "propagationPrimary", "propagationPrimary").getObject(), new PropertyModel<Boolean>(resourceTO,
- "propagationPrimary"));
- add(propagationPrimary);
-
- final SpinnerFieldPanel<Integer> propagationPriority = new SpinnerFieldPanel<>("propagationPriority",
- "propagationPriority", Integer.class,
- new PropertyModel<Integer>(resourceTO, "propagationPriority"), null, null);
- add(propagationPriority);
-
- final AjaxCheckBoxPanel randomPwdIfNotProvided = new AjaxCheckBoxPanel("randomPwdIfNotProvided",
++ new PropertyModel<Boolean>(model, "enforceMandatoryCondition"),
++ false));
+
- final AjaxCheckBoxPanel propagationPrimary = new AjaxCheckBoxPanel("propagationPrimary", new ResourceModel(
- "propagationPrimary", "propagationPrimary").getObject(), new PropertyModel<Boolean>(resourceTO,
- "propagationPrimary"));
- container.add(propagationPrimary);
++ container.add(new AjaxCheckBoxPanel(
++ "propagationPrimary",
++ new ResourceModel("propagationPrimary", "propagationPrimary").getObject(),
++ new PropertyModel<Boolean>(model, "propagationPrimary"),
++ false));
+
- final SpinnerFieldPanel<Integer> propagationPriority = new SpinnerFieldPanel<>(
++ container.add(new SpinnerFieldPanel<>(
+ "propagationPriority",
+ "propagationPriority",
+ Integer.class,
- new PropertyModel<Integer>(resourceTO, "propagationPriority"));
- container.add(propagationPriority);
++ new PropertyModel<Integer>(model, "propagationPriority")));
+
- final AjaxDropDownChoicePanel<PropagationMode> propagationMode = new AjaxDropDownChoicePanel<>(
- "propagationMode", new ResourceModel("propagationMode", "propagationMode").getObject(),
- new PropertyModel<PropagationMode>(resourceTO, "propagationMode"));
- propagationMode.setChoices(Arrays.asList(PropagationMode.values()));
- container.add(propagationMode);
-
- final AjaxCheckBoxPanel randomPwdIfNotProvided = new AjaxCheckBoxPanel("randomPwdIfNotProvided",
++ container.add(new AjaxCheckBoxPanel("randomPwdIfNotProvided",
new ResourceModel("randomPwdIfNotProvided", "randomPwdIfNotProvided").getObject(),
-- new PropertyModel<Boolean>(resourceTO, "randomPwdIfNotProvided"));
- container.add(randomPwdIfNotProvided);
- add(randomPwdIfNotProvided);
--
- final AjaxDropDownChoicePanel<String> template
- = new AjaxDropDownChoicePanel<>("panel", "panel", new Model<String>());
- template.setChoices(actionClassNames);
- template.setNullValid(true);
- template.setRequired(true);
- final WebMarkupContainer propagationActionsClassNames = new WebMarkupContainer("propagationActionsClassNames");
- propagationActionsClassNames.setOutputMarkupId(true);
- add(propagationActionsClassNames);
-
- final AjaxLink<Void> first = new IndicatingAjaxLink<Void>("first") {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- resourceTO.getPropagationActionsClassNames().add(StringUtils.EMPTY);
- setVisible(false);
- target.add(propagationActionsClassNames);
- }
- };
- first.setOutputMarkupPlaceholderTag(true);
- first.setVisible(resourceTO.getPropagationActionsClassNames().isEmpty());
- propagationActionsClassNames.add(first);
-
- final ListView<String> actionsClasses = new ListView<String>("actionsClasses",
- new PropertyModel<List<String>>(resourceTO, "propagationActionsClassNames")) {
-
- private static final long serialVersionUID = 9101744072914090143L;
-
- @Override
- protected void populateItem(final ListItem<String> item) {
- final String className = item.getModelObject();
-
- final DropDownChoice<String> actionsClass = new DropDownChoice<>(
- "actionsClass", new Model<>(className), actionClassNames);
- actionsClass.setNullValid(true);
- actionsClass.setRequired(true);
- actionsClass.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_BLUR) {
-
- private static final long serialVersionUID = -1107858522700306810L;
-
- @Override
- protected void onUpdate(final AjaxRequestTarget target) {
- resourceTO.getPropagationActionsClassNames().
- set(item.getIndex(), actionsClass.getModelObject());
- }
- });
- actionsClass.setRequired(true);
- actionsClass.setOutputMarkupId(true);
- actionsClass.setRequired(true);
- item.add(actionsClass);
-
- final AjaxLink<Void> minus = new IndicatingAjaxLink<Void>("drop") {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- resourceTO.getPropagationActionsClassNames().remove(className);
- first.setVisible(resourceTO.getPropagationActionsClassNames().isEmpty());
- target.add(propagationActionsClassNames);
- }
- };
- item.add(minus);
-
- final AjaxLink<Void> plus = new IndicatingAjaxLink<Void>("add") {
-
- private static final long serialVersionUID = -7978723352517770644L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- resourceTO.getPropagationActionsClassNames().add(StringUtils.EMPTY);
- target.add(propagationActionsClassNames);
- }
- };
- plus.setOutputMarkupPlaceholderTag(true);
- plus.setVisible(item.getIndex() == resourceTO.getPropagationActionsClassNames().size() - 1);
- item.add(plus);
- }
- };
- propagationActionsClassNames.add(actionsClasses);
-
- final AjaxDropDownChoicePanel<TraceLevel> createTraceLevel = new AjaxDropDownChoicePanel<>(
- "createTraceLevel", new ResourceModel("createTraceLevel", "createTraceLevel").getObject(),
- new PropertyModel<TraceLevel>(resourceTO, "createTraceLevel"));
- createTraceLevel.setChoices(Arrays.asList(TraceLevel.values()));
- add(createTraceLevel);
-
- final AjaxDropDownChoicePanel<TraceLevel> updateTraceLevel = new AjaxDropDownChoicePanel<>(
- "updateTraceLevel", new ResourceModel("updateTraceLevel", "updateTraceLevel").getObject(),
- new PropertyModel<TraceLevel>(resourceTO, "updateTraceLevel"));
- updateTraceLevel.setChoices(Arrays.asList(TraceLevel.values()));
- add(updateTraceLevel);
-
- final AjaxDropDownChoicePanel<TraceLevel> deleteTraceLevel = new AjaxDropDownChoicePanel<>(
- "deleteTraceLevel", new ResourceModel("deleteTraceLevel", "deleteTraceLevel").getObject(),
- new PropertyModel<TraceLevel>(resourceTO, "deleteTraceLevel"));
- deleteTraceLevel.setChoices(Arrays.asList(TraceLevel.values()));
- add(deleteTraceLevel);
-
- final AjaxDropDownChoicePanel<TraceLevel> syncTraceLevel = new AjaxDropDownChoicePanel<>(
- "syncTraceLevel", new ResourceModel("syncTraceLevel", "syncTraceLevel").getObject(),
- new PropertyModel<TraceLevel>(resourceTO, "syncTraceLevel"));
- syncTraceLevel.setChoices(Arrays.asList(TraceLevel.values()));
- add(syncTraceLevel);
-
- final IModel<List<ConnInstanceTO>> connectors = new LoadableDetachableModel<List<ConnInstanceTO>>() {
-
- private static final long serialVersionUID = 5275935387613157437L;
-
- @Override
- protected List<ConnInstanceTO> load() {
- return connRestClient.getAllConnectors();
- }
- };
-
- connInstanceTO = getConectorInstanceTO(connectors.getObject(), resourceTO);
-
- final AjaxDropDownChoicePanel<ConnInstanceTO> conn = new AjaxDropDownChoicePanel<>("connector",
++ new PropertyModel<Boolean>(model, "randomPwdIfNotProvided"),
++ false));
+
- final MultiFieldPanel<String> actions = new MultiFieldPanel<>(
++ container.add(new MultiFieldPanel<>(
+ "actionsClasses",
+ "actionsClasses",
- new PropertyModel<List<String>>(resourceTO, "propagationActionsClassNames"),
- template, true);
-
- container.add(actions);
-
- final AjaxDropDownChoicePanel<TraceLevel> createTraceLevel = new AjaxDropDownChoicePanel<>(
- "createTraceLevel", new ResourceModel("createTraceLevel", "createTraceLevel").getObject(),
- new PropertyModel<TraceLevel>(resourceTO, "createTraceLevel"));
- createTraceLevel.setChoices(Arrays.asList(TraceLevel.values()));
- container.add(createTraceLevel);
-
- final AjaxDropDownChoicePanel<TraceLevel> updateTraceLevel = new AjaxDropDownChoicePanel<>(
- "updateTraceLevel", new ResourceModel("updateTraceLevel", "updateTraceLevel").getObject(),
- new PropertyModel<TraceLevel>(resourceTO, "updateTraceLevel"));
- updateTraceLevel.setChoices(Arrays.asList(TraceLevel.values()));
- container.add(updateTraceLevel);
-
- final AjaxDropDownChoicePanel<TraceLevel> deleteTraceLevel = new AjaxDropDownChoicePanel<>(
- "deleteTraceLevel", new ResourceModel("deleteTraceLevel", "deleteTraceLevel").getObject(),
- new PropertyModel<TraceLevel>(resourceTO, "deleteTraceLevel"));
- deleteTraceLevel.setChoices(Arrays.asList(TraceLevel.values()));
- container.add(deleteTraceLevel);
-
- final AjaxDropDownChoicePanel<TraceLevel> syncTraceLevel = new AjaxDropDownChoicePanel<>(
- "syncTraceLevel", new ResourceModel("syncTraceLevel", "syncTraceLevel").getObject(),
- new PropertyModel<TraceLevel>(resourceTO, "syncTraceLevel"));
- syncTraceLevel.setChoices(Arrays.asList(TraceLevel.values()));
- container.add(syncTraceLevel);
-
- final IModel<List<ConnInstanceTO>> connectors = new LoadableDetachableModel<List<ConnInstanceTO>>() {
-
- private static final long serialVersionUID = 5275935387613157437L;
-
- @Override
- protected List<ConnInstanceTO> load() {
- return connRestClient.getAllConnectors();
- }
- };
-
- connInstanceTO = getConectorInstanceTO(connectors.getObject(), resourceTO);
-
- final AjaxDropDownChoicePanel<ConnInstanceTO> conn = new AjaxDropDownChoicePanel<>("connector",
++ new PropertyModel<List<String>>(model, "propagationActionsClassNames"),
++ new AjaxDropDownChoicePanel<>("panel", "panel", new Model<String>()).
++ setChoices(actionClassNames).setNullValid(true).setRequired(true),
++ false));
++
++ container.add(new AjaxDropDownChoicePanel<>(
++ "createTraceLevel",
++ new ResourceModel("createTraceLevel", "createTraceLevel").getObject(),
++ new PropertyModel<TraceLevel>(model, "createTraceLevel"),
++ false).
++ setChoices(Arrays.asList(TraceLevel.values())));
++
++ container.add(new AjaxDropDownChoicePanel<>(
++ "updateTraceLevel",
++ new ResourceModel("updateTraceLevel", "updateTraceLevel").getObject(),
++ new PropertyModel<TraceLevel>(model, "updateTraceLevel"),
++ false).
++ setChoices(Arrays.asList(TraceLevel.values())));
++
++ container.add(new AjaxDropDownChoicePanel<>(
++ "deleteTraceLevel",
++ new ResourceModel("deleteTraceLevel", "deleteTraceLevel").getObject(),
++ new PropertyModel<TraceLevel>(model, "deleteTraceLevel"),
++ false).
++ setChoices(Arrays.asList(TraceLevel.values())));
++
++ container.add(new AjaxDropDownChoicePanel<>(
++ "syncTraceLevel",
++ new ResourceModel("syncTraceLevel", "syncTraceLevel").getObject(),
++ new PropertyModel<TraceLevel>(model, "syncTraceLevel"),
++ false).
++ setChoices(Arrays.asList(TraceLevel.values())));
++
++ container.add(new AjaxTextFieldPanel(
++ "connector",
new ResourceModel("connector", "connector").getObject(),
-- new PropertyModel<ConnInstanceTO>(this, "connInstanceTO"));
-- conn.setChoices(connectors.getObject());
-- conn.setChoiceRenderer(new ChoiceRenderer<ConnInstanceTO>("displayName", "key"));
--
-- conn.getField().setModel(new IModel<ConnInstanceTO>() {
--
-- private static final long serialVersionUID = -4202872830392400310L;
-
- @Override
- public ConnInstanceTO getObject() {
- return connInstanceTO;
- }
-
- @Override
- public void setObject(final ConnInstanceTO connector) {
- resourceTO.setConnector(connector.getKey());
- connInstanceTO = connector;
- }
-
- @Override
- public void detach() {
- }
- });
-
- conn.addRequiredLabel();
- conn.setEnabled(false);
-
- conn.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
-
- private static final long serialVersionUID = -1107858522700306810L;
-
- @Override
- protected void onUpdate(final AjaxRequestTarget target) {
- send(getPage(), Broadcast.BREADTH, new DetailsModEvent(target));
- }
- });
-
- add(conn);
- }
-
- /**
- * Get the connetorTO linked to the resource.
- *
- * @param connectorTOs list of all connectors.
- * @param resourceTO resource.
- * @return selected connector instance: in case of no connectors available, null; in case of new resource
- * specification, the first on connector available
- */
- private ConnInstanceTO getConectorInstanceTO(final List<ConnInstanceTO> connectorTOs, final ResourceTO resourceTO) {
- if (connectorTOs.isEmpty()) {
- resourceTO.setConnector(null);
- return null;
- } else {
- // use the first element as default
- ConnInstanceTO res = connectorTOs.get(0);
-
- for (ConnInstanceTO to : connectorTOs) {
- if (Long.valueOf(to.getKey()).equals(resourceTO.getConnector())) {
- res = to;
- }
- }
-
- // in case of no match
- resourceTO.setConnector(res.getKey());
-
- return res;
- }
- }
-
- /**
- * Connector instance modification event.
- */
- public static class DetailsModEvent extends ModalEvent {
++ new Model<String>(model.getObject().getConnectorDisplayName()),
++ false).addRequiredLabel().setEnabled(false));
- @Override
- public ConnInstanceTO getObject() {
- return connInstanceTO;
- }
-
- @Override
- public void setObject(final ConnInstanceTO connector) {
- resourceTO.setConnector(connector.getKey());
- connInstanceTO = connector;
- }
-
- @Override
- public void detach() {
- }
- });
-
- conn.addRequiredLabel();
- conn.setEnabled(false);
-
- conn.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
-
- private static final long serialVersionUID = -1107858522700306810L;
-
- @Override
- protected void onUpdate(final AjaxRequestTarget target) {
- send(getPage(), Broadcast.BREADTH, new DetailsModEvent(target));
- }
- });
-
- container.add(conn);
-
- add(new AnnotatedBeanPanel("systeminformation", resourceTO));
- }
-
- /**
- * Get the connetorTO linked to the resource.
- *
- * @param connectorTOs list of all connectors.
- * @param resourceTO resource.
- * @return selected connector instance: in case of no connectors available, null; in case of new resource
- * specification, the first on connector available
- */
- private ConnInstanceTO getConectorInstanceTO(final List<ConnInstanceTO> connectorTOs, final ResourceTO resourceTO) {
- if (connectorTOs.isEmpty()) {
- resourceTO.setConnector(null);
- return null;
- } else {
- // use the first element as default
- ConnInstanceTO res = connectorTOs.get(0);
-
- for (ConnInstanceTO to : connectorTOs) {
- if (Long.valueOf(to.getKey()).equals(resourceTO.getConnector())) {
- res = to;
- }
- }
-
- // in case of no match
- resourceTO.setConnector(res.getKey());
-
- return res;
- }
- }
-
- /**
- * Connector instance modification event.
- */
- public static class DetailsModEvent extends ModalEvent {
-
-- /**
-- * Constructor.
-- *
-- * @param target request target.
-- */
-- public DetailsModEvent(final AjaxRequestTarget target) {
-- super(target);
-- }
++ add(new AnnotatedBeanPanel("systeminformation", model.getObject()));
}
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java
----------------------------------------------------------------------
diff --cc client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java
index 40cc013,40cc013..46cc21f
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java
@@@ -22,12 -22,12 +22,10 @@@ import java.util.ArrayList
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
--import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.commons.JexlHelpUtils;
--import org.apache.syncope.client.console.panels.ResourceConnConfPanel.ConnConfModEvent;
import org.apache.syncope.client.console.rest.ConnectorRestClient;
import org.apache.syncope.client.console.rest.SchemaRestClient;
import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPanel;
@@@ -52,7 -52,7 +50,6 @@@ import org.apache.wicket.ajax.attribute
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.ajax.markup.html.form.AjaxButton;
--import org.apache.wicket.event.IEvent;
import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.basic.Label;
@@@ -462,26 -462,26 +459,6 @@@ public class ResourceMappingPanel exten
}
}
-- @Override
-- public void onEvent(final IEvent<?> event) {
-- if (event.getPayload() instanceof ConnConfModEvent) {
-- final AjaxRequestTarget target = ((ConnConfModEvent) event.getPayload()).getTarget();
--
-- final List<ConnConfProperty> conf = ((ConnConfModEvent) event.getPayload()).getConfiguration();
--
-- mappings.removeAll();
--
-- addMappingBtn.setEnabled(resourceTO.getConnector() != null && resourceTO.getConnector() > 0);
--
-- schemaNames.clear();
-- schemaNames.addAll(getSchemaNames(resourceTO.getConnector(), new HashSet<ConnConfProperty>(conf)));
--
-- setEnabled();
--
-- target.add(this);
-- }
-- }
--
/**
* Set attribute names for a drop down choice list.
*
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceModal.java
----------------------------------------------------------------------
diff --cc client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceModal.java
index 7b84312,54b22b8..1f9ae6b
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceModal.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceModal.java
@@@ -18,13 -18,8 +18,11 @@@
*/
package org.apache.syncope.client.console.panels;
+import static org.apache.wicket.Component.ENABLE;
+
- import de.agilecoders.wicket.core.markup.html.bootstrap.tabs.AjaxBootstrapTabbedPanel;
+import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
- import java.util.List;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.Predicate;
import org.apache.commons.lang3.SerializationUtils;
@@@ -41,12 -35,14 +39,12 @@@ import org.apache.syncope.common.lib.to
import org.apache.syncope.common.lib.types.Entitlement;
import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.markup.html.form.AjaxButton;
import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
import org.apache.wicket.event.Broadcast;
-import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
-import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
-import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.extensions.markup.html.tabs.AbstractTab;
- import org.apache.wicket.extensions.markup.html.tabs.ITab;
import org.apache.wicket.markup.html.form.Form;
-import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.markup.html.panel.Panel;
++import org.apache.wicket.model.IModel;
import org.apache.wicket.model.ResourceModel;
/**
@@@ -56,41 -52,35 +54,38 @@@ public class ResourceModal extends Abst
private static final long serialVersionUID = 1734415311027284221L;
- @SuppressWarnings({ "unchecked", "rawtypes" })
+ private final boolean createFlag;
+
public ResourceModal(
- final ModalWindow window,
+ final BaseModal<Serializable> modal,
final PageReference pageRef,
-- final ResourceTO resourceTO,
++ final IModel<ResourceTO> model,
final boolean createFlag) {
- super(window, pageRef);
+ super(modal, pageRef);
- final Form<ResourceTO> form = new Form<>(FORM);
- form.setModel(new CompoundPropertyModel<>(resourceTO));
+ this.createFlag = createFlag;
- final List<ITab> tabs = new ArrayList<>();
- add(new AjaxBootstrapTabbedPanel<>("tabbedPanel", tabs));
-
//--------------------------------
// Resource details panel
//--------------------------------
- tabs.add(new AbstractTab(new ResourceModel("resource", "resource")) {
- form.add(new ResourceDetailsPanel("details", resourceTO,
- resourceRestClient.getPropagationActionsClasses(), createFlag));
++ tabs.add(new AbstractTab(new ResourceModel("general", "general")) {
+
+ private static final long serialVersionUID = -5861786415855103549L;
- form.add(new AnnotatedBeanPanel("systeminformation", resourceTO));
+ @Override
+ public Panel getPanel(final String panelId) {
- return new ResourceDetailsPanel(panelId, resourceTO,
++ return new ResourceDetailsPanel(panelId, model,
+ resourceRestClient.getPropagationActionsClasses(), createFlag);
+ }
+ });
//--------------------------------
//--------------------------------
// Resource provision panels
//--------------------------------
- final WebMarkupContainer provisions = new WebMarkupContainer("pcontainer");
- form.add(provisions.setOutputMarkupId(true));
-
final ListViewPanel.Builder<ProvisionTO> builder = ListViewPanel.builder(ProvisionTO.class, pageRef);
-- builder.setItems(resourceTO.getProvisions());
++ builder.setItems(model.getObject().getProvisions());
builder.includes("anyType", "objectClass");
builder.addAction(new ActionLink<ProvisionTO>() {
@@@ -136,116 -126,121 +131,129 @@@
@Override
public void onClick(final AjaxRequestTarget target, final ProvisionTO provisionTO) {
-- resourceTO.getProvisions().remove(provisionTO);
++ model.getObject().getProvisions().remove(provisionTO);
send(pageRef.getPage(), Broadcast.DEPTH,
new AjaxWizard.NewItemFinishEvent<ProvisionTO>(null, target));
}
}, ActionLink.ActionType.DELETE, Entitlement.RESOURCE_DELETE);
-- builder.addNewItemPanelBuilder(new ProvisionWizardBuilder("wizard", resourceTO, pageRef));
- builder.addNotificationPanel(feedbackPanel);
++ builder.addNewItemPanelBuilder(new ProvisionWizardBuilder("wizard", model.getObject(), pageRef));
+ builder.addNotificationPanel(modal.getFeedbackPanel());
- provisions.add(builder.build("provisions"));
- //--------------------------------
+ tabs.add(new AbstractTab(new ResourceModel("provisions", "provisions")) {
- //--------------------------------
- // Resource connector configuration panel
- //--------------------------------
- ResourceConnConfPanel resourceConnConfPanel = new ResourceConnConfPanel("connconf", resourceTO, createFlag);
- MetaDataRoleAuthorizationStrategy.authorize(resourceConnConfPanel, ENABLE, Entitlement.CONNECTOR_READ);
- form.add(resourceConnConfPanel);
- //--------------------------------
+ private static final long serialVersionUID = -5861786415855103549L;
+ @Override
+ public Panel getPanel(final String panelId) {
+ return builder.build(panelId);
+ }
+ });
//--------------------------------
- // Resource security panel
+
//--------------------------------
- form.add(new ResourceSecurityPanel("security", resourceTO));
+ // Resource connector configuration panel
//--------------------------------
+ tabs.add(new AbstractTab(new ResourceModel("connectorProperties", "connectorProperties")) {
- AjaxButton submit = new IndicatingAjaxButton(APPLY, new ResourceModel(SUBMIT, SUBMIT)) {
-
- private static final long serialVersionUID = -958724007591692537L;
+ private static final long serialVersionUID = -5861786415855103549L;
@Override
- protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
- final ResourceTO resourceTO = (ResourceTO) form.getDefaultModelObject();
-
- boolean connObjectKeyError = false;
+ public Panel getPanel(final String panelId) {
- final ResourceConnConfPanel panel = new ResourceConnConfPanel(panelId, resourceTO, createFlag);
++ final ResourceConnConfPanel panel = new ResourceConnConfPanel(panelId, model, createFlag) {
+
- final Collection<ProvisionTO> provisions = new ArrayList<>(resourceTO.getProvisions());
++ private static final long serialVersionUID = 1L;
+
- for (ProvisionTO provision : provisions) {
- if (provision != null) {
- if (provision.getMapping() == null || provision.getMapping().getItems().isEmpty()) {
- resourceTO.getProvisions().remove(provision);
++ @Override
++ protected void check(final AjaxRequestTarget target) {
++ if (connectorRestClient.check(model.getObject())) {
++ info(getString("success_connection"));
+ } else {
- int uConnObjectKeyCount = CollectionUtils.countMatches(
- provision.getMapping().getItems(), new Predicate<MappingItemTO>() {
-
- @Override
- public boolean evaluate(final MappingItemTO item) {
- return item.isConnObjectKey();
- }
- });
-
- connObjectKeyError = uConnObjectKeyCount != 1;
++ error(getString("error_connection"));
+ }
++ modal.getFeedbackPanel().refresh(target);
+ }
- }
++ };
+ MetaDataRoleAuthorizationStrategy.authorize(panel, ENABLE, Entitlement.CONNECTOR_READ);
+ return panel;
+ }
+ });
+ //--------------------------------
- if (connObjectKeyError) {
- error(getString("connObjectKeyValidation"));
- feedbackPanel.refresh(target);
- } else {
- try {
- if (createFlag) {
- resourceRestClient.create(resourceTO);
- send(pageRef.getPage(), Broadcast.BREADTH, new CreateEvent(
- resourceTO.getKey(),
- resourceTO.getKey(),
- TopologyNode.Kind.RESOURCE,
- resourceTO.getConnector(),
- target));
- } else {
- resourceRestClient.update(resourceTO);
- }
+ //--------------------------------
+ // Resource security panel
+ //--------------------------------
+ tabs.add(new AbstractTab(new ResourceModel("security", "security")) {
- if (pageRef.getPage() instanceof AbstractBasePage) {
- ((AbstractBasePage) pageRef.getPage()).setModalResult(true);
- }
- window.close(target);
- } catch (Exception e) {
- LOG.error("Failure managing resource {}", resourceTO, e);
- error(getString(Constants.ERROR) + ": " + e.getMessage());
- feedbackPanel.refresh(target);
- }
- }
- }
+ private static final long serialVersionUID = -5861786415855103549L;
@Override
- protected void onError(final AjaxRequestTarget target, final Form<?> form) {
- feedbackPanel.refresh(target);
+ public Panel getPanel(final String panelId) {
- return new ResourceSecurityPanel(panelId, resourceTO);
++ return new ResourceSecurityPanel(panelId, model);
}
- };
+ });
+ //--------------------------------
+ }
- form.add(submit);
- form.setDefaultButton(submit);
+ @Override
+ public void onError(final AjaxRequestTarget target, final Form<?> form) {
+ modal.getFeedbackPanel().refresh(target);
+ }
- final AjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
+ @Override
+ public void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ final ResourceTO resourceTO = (ResourceTO) form.getDefaultModelObject();
- private static final long serialVersionUID = -958724007591692537L;
+ boolean connObjectKeyError = false;
- @Override
- protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
- window.close(target);
- }
+ final Collection<ProvisionTO> provisions = new ArrayList<>(resourceTO.getProvisions());
- @Override
- protected void onError(final AjaxRequestTarget target, final Form<?> form) {
- }
- };
+ for (ProvisionTO provision : provisions) {
+ if (provision != null) {
+ if (provision.getMapping() == null || provision.getMapping().getItems().isEmpty()) {
+ resourceTO.getProvisions().remove(provision);
+ } else {
+ int uConnObjectKeyCount = CollectionUtils.countMatches(
+ provision.getMapping().getItems(), new Predicate<MappingItemTO>() {
- cancel.setDefaultFormProcessing(false);
- form.add(cancel);
+ @Override
+ public boolean evaluate(final MappingItemTO item) {
+ return item.isConnObjectKey();
+ }
+ });
- add(form);
+ connObjectKeyError = uConnObjectKeyCount != 1;
+ }
+ }
+ }
+
+ if (connObjectKeyError) {
+ error(getString("connObjectKeyValidation"));
+ modal.getFeedbackPanel().refresh(target);
+ } else {
+ try {
+ if (createFlag) {
+ resourceRestClient.create(resourceTO);
+ send(pageRef.getPage(), Broadcast.BREADTH, new CreateEvent(
+ resourceTO.getKey(),
+ resourceTO.getKey(),
+ TopologyNode.Kind.RESOURCE,
+ resourceTO.getConnector(),
+ target));
+ } else {
+ resourceRestClient.update(resourceTO);
+ }
- MetaDataRoleAuthorizationStrategy.authorize(
- submit, ENABLE, createFlag ? Entitlement.RESOURCE_CREATE : Entitlement.RESOURCE_UPDATE);
+ if (pageRef.getPage() instanceof AbstractBasePage) {
+ ((AbstractBasePage) pageRef.getPage()).setModalResult(true);
+ }
+ modal.close(target);
+ } catch (Exception e) {
+ LOG.error("Failure managing resource {}", resourceTO, e);
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ modal.getFeedbackPanel().refresh(target);
+ }
+ }
}
+
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceSecurityPanel.java
----------------------------------------------------------------------
diff --cc client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceSecurityPanel.java
index 2be0d95,a0a1ddc..4aab37e
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceSecurityPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceSecurityPanel.java
@@@ -49,7 -49,7 +49,7 @@@ public class ResourceSecurityPanel exte
private IModel<Map<Long, String>> syncPolicies = null;
-- public ResourceSecurityPanel(final String id, final ResourceTO resourceTO) {
++ public ResourceSecurityPanel(final String id, final IModel<ResourceTO> model) {
super(id);
@@@ -105,49 -100,54 +105,46 @@@
// -------------------------------
// Password policy specification
// -------------------------------
-- final AjaxDropDownChoicePanel<Long> passwordPolicy = new AjaxDropDownChoicePanel<Long>("passwordPolicy",
-- new ResourceModel("passwordPolicy", "passwordPolicy").getObject(), new PropertyModel<Long>(resourceTO,
-- "passwordPolicy"));
++ final AjaxDropDownChoicePanel<Long> passwordPolicy = new AjaxDropDownChoicePanel<Long>(
++ "passwordPolicy",
++ new ResourceModel("passwordPolicy", "passwordPolicy").getObject(),
++ new PropertyModel<Long>(model, "passwordPolicy"),
++ false);
passwordPolicy.setChoiceRenderer(new PolicyRenderer(PolicyType.PASSWORD));
--
passwordPolicy.setChoices(new ArrayList<>(passwordPolicies.getObject().keySet()));
--
((DropDownChoice<?>) passwordPolicy.getField()).setNullValid(true);
--
- securityContainer.add(passwordPolicy);
+ container.add(passwordPolicy);
// -------------------------------
// -------------------------------
// Account policy specification
// -------------------------------
-- final AjaxDropDownChoicePanel<Long> accountPolicy = new AjaxDropDownChoicePanel<Long>("accountPolicy",
-- new ResourceModel("accountPolicy", "accountPolicy").getObject(), new PropertyModel<Long>(resourceTO,
-- "accountPolicy"));
++ final AjaxDropDownChoicePanel<Long> accountPolicy = new AjaxDropDownChoicePanel<Long>(
++ "accountPolicy",
++ new ResourceModel("accountPolicy", "accountPolicy").getObject(),
++ new PropertyModel<Long>(model, "accountPolicy"),
++ false);
accountPolicy.setChoiceRenderer(new PolicyRenderer(PolicyType.ACCOUNT));
--
accountPolicy.setChoices(new ArrayList<Long>(accountPolicies.getObject().keySet()));
--
((DropDownChoice<?>) accountPolicy.getField()).setNullValid(true);
--
- securityContainer.add(accountPolicy);
+ container.add(accountPolicy);
// -------------------------------
// -------------------------------
// Sync policy specification
// -------------------------------
-- final AjaxDropDownChoicePanel<Long> syncPolicy = new AjaxDropDownChoicePanel<Long>("syncPolicy",
-- new ResourceModel("syncPolicy", "syncPolicy").getObject(), new PropertyModel<Long>(resourceTO,
-- "syncPolicy"));
++ final AjaxDropDownChoicePanel<Long> syncPolicy = new AjaxDropDownChoicePanel<Long>(
++ "syncPolicy",
++ new ResourceModel("syncPolicy", "syncPolicy").getObject(),
++ new PropertyModel<Long>(model, "syncPolicy"),
++ false);
syncPolicy.setChoiceRenderer(new PolicyRenderer(PolicyType.SYNC));
--
syncPolicy.setChoices(new ArrayList<Long>(syncPolicies.getObject().keySet()));
--
((DropDownChoice<?>) syncPolicy.getField()).setNullValid(true);
--
- securityContainer.add(syncPolicy);
+ container.add(syncPolicy);
// -------------------------------
}
@@@ -155,7 -155,7 +152,7 @@@
private static final long serialVersionUID = 8060500161321947000L;
-- private PolicyType type;
++ private final PolicyType type;
public PolicyRenderer(final PolicyType type) {
super();
@@@ -178,9 -178,9 +175,7 @@@
@Override
public String getIdValue(final Long object, final int index) {
-- return String.valueOf(object != null
-- ? object
-- : 0L);
++ return String.valueOf(object != null ? object : 0L);
}
};
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/java/org/apache/syncope/client/console/themes/AdminLTE.java
----------------------------------------------------------------------
diff --cc client/console/src/main/java/org/apache/syncope/client/console/themes/AdminLTE.java
index 1381c00,1381c00..5ad33a9
--- a/client/console/src/main/java/org/apache/syncope/client/console/themes/AdminLTE.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/themes/AdminLTE.java
@@@ -19,12 -19,12 +19,6 @@@
package org.apache.syncope.client.console.themes;
import de.agilecoders.wicket.core.settings.Theme;
--import de.agilecoders.wicket.extensions.markup.html.bootstrap.jqueryui.JQueryUIAllJavaScriptReference;
--import de.agilecoders.wicket.extensions.markup.html.bootstrap.jqueryui.JQueryUICoreJavaScriptReference;
--import de.agilecoders.wicket.extensions.markup.html.bootstrap.jqueryui.JQueryUIDraggableJavaScriptReference;
--import de.agilecoders.wicket.extensions.markup.html.bootstrap.jqueryui.JQueryUIMouseJavaScriptReference;
--import de.agilecoders.wicket.extensions.markup.html.bootstrap.jqueryui.JQueryUIResizableJavaScriptReference;
--import de.agilecoders.wicket.extensions.markup.html.bootstrap.jqueryui.JQueryUIWidgetJavaScriptReference;
import java.util.ArrayList;
import java.util.List;
import org.apache.wicket.markup.head.CssHeaderItem;
@@@ -44,14 -44,14 +38,6 @@@ public class AdminLTE extends Theme
references.add(JavaScriptHeaderItem.forReference(
new JQueryPluginResourceReference(AdminLTE.class, "js/AdminLTE-app.min.js"), "adminltejs"));
-- // Adds WebjarsJavaScriptResourceReference about JQuery
-- references.add(JavaScriptHeaderItem.forReference(JQueryUIAllJavaScriptReference.instance()));
-- references.add(JavaScriptHeaderItem.forReference(JQueryUICoreJavaScriptReference.instance()));
-- references.add(JavaScriptHeaderItem.forReference(JQueryUIMouseJavaScriptReference.instance()));
-- references.add(JavaScriptHeaderItem.forReference(JQueryUIWidgetJavaScriptReference.instance()));
-- references.add(JavaScriptHeaderItem.forReference(JQueryUIResizableJavaScriptReference.instance()));
-- references.add(JavaScriptHeaderItem.forReference(JQueryUIDraggableJavaScriptReference.instance()));
--
references.add(CssHeaderItem.forReference(AdminLTECssResourceReference.INSTANCE));
references.addAll(super.getDependencies());
return references;
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyNodePanel.java
----------------------------------------------------------------------
diff --cc client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyNodePanel.java
index d3aa975,7756a25..8a68ca3
--- a/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyNodePanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyNodePanel.java
@@@ -45,7 -39,7 +45,9 @@@ import org.apache.wicket.behavior.Attri
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.panel.Fragment;
import org.apache.wicket.markup.html.panel.Panel;
++import org.apache.wicket.model.CompoundPropertyModel;
++import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
import org.apache.wicket.spring.injection.annot.SpringBean;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@@ -130,18 -124,12 +132,20 @@@ public class TopologyNodePanel extends
@Override
public void onClickInternal(final AjaxRequestTarget target) {
- final ConnInstanceTO model = new ConnInstanceTO();
- model.setLocation(node.getKey().toString());
++ final ConnInstanceTO modelObject = new ConnInstanceTO();
++ modelObject.setLocation(node.getKey().toString());
+
++ final IModel<ConnInstanceTO> model = new CompoundPropertyModel<>(modelObject);
+ modal.setFormModel(model);
++
+ target.add(modal.setContent(new ConnectorModal(modal, pageRef, model)));
- final ConnInstanceTO connectorTO = new ConnInstanceTO();
- connectorTO.setLocation(node.getKey().toString());
- modal.setContent(new ConnectorModal(modal, pageRef, connectorTO));
- modal.setTitle(MessageFormat.format(getString("connector.new"), node.getKey()));
- modal.show(target);
+ modal.header(new Model<String>(MessageFormat.format(getString("connector.new"), node.getKey())));
+
+ MetaDataRoleAuthorizationStrategy.
+ authorize(modal.addSumbitButton(), ENABLE, Entitlement.CONNECTOR_CREATE);
+
+ modal.show(true);
}
};
fragment.add(create);
@@@ -180,19 -164,12 +184,21 @@@
@Override
public void onClickInternal(final AjaxRequestTarget target) {
- final ResourceTO model = new ResourceTO();
- model.setConnector(Long.class.cast(node.getKey()));
- model.setConnectorDisplayName(node.getDisplayName());
- final ResourceTO resourceTO = new ResourceTO();
- resourceTO.setConnector(Long.class.cast(node.getKey()));
- resourceTO.setConnectorDisplayName(node.getDisplayName());
- modal.setContent(new ResourceModal(modal, pageRef, resourceTO, true));
- modal.setTitle(getString("resource.new"));
- modal.show(target);
++ final ResourceTO modelObject = new ResourceTO();
++ modelObject.setConnector(Long.class.cast(node.getKey()));
++ modelObject.setConnectorDisplayName(node.getDisplayName());
+
++ final IModel<ResourceTO> model = new CompoundPropertyModel<>(modelObject);
+ modal.setFormModel(model);
++
+ target.add(modal.setContent(new ResourceModal(modal, pageRef, model, true)));
+
+ modal.header(new Model<String>(MessageFormat.format(getString("resource.new"), node.getKey())));
+
+ MetaDataRoleAuthorizationStrategy.
+ authorize(modal.addSumbitButton(), ENABLE, Entitlement.RESOURCE_CREATE);
+
+ modal.show(true);
}
};
fragment.add(create);
@@@ -205,17 -180,14 +211,19 @@@
@Override
public void onClickInternal(final AjaxRequestTarget target) {
- final ConnInstanceTO model = connectorRestClient.read(Long.class.cast(node.getKey()));
++ final ConnInstanceTO modelObject = connectorRestClient.read(Long.class.cast(node.getKey()));
+
++ final IModel<ConnInstanceTO> model = new CompoundPropertyModel<>(modelObject);
+ modal.setFormModel(model);
+
- modal.setContent(new ConnectorModal(
- modal,
- pageRef,
- connectorRestClient.read(Long.class.cast(node.getKey()))));
+ target.add(modal.setContent(new ConnectorModal(modal, pageRef, model)));
- modal.setTitle(MessageFormat.format(getString("connector.edit"), node.getKey()));
- modal.show(target);
+ modal.header(new Model<String>(MessageFormat.format(getString("connector.edit"), node.getKey())));
+
+ MetaDataRoleAuthorizationStrategy.
+ authorize(modal.addSumbitButton(), ENABLE, Entitlement.CONNECTOR_UPDATE);
+
+ modal.show(true);
}
};
fragment.add(edit);
@@@ -254,18 -222,15 +262,19 @@@
@Override
public void onClickInternal(final AjaxRequestTarget target) {
++ final ResourceTO modelObject = resourceRestClient.read(node.getKey().toString());
+
- final ResourceTO model = resourceRestClient.read(node.getKey().toString());
-
++ final IModel<ResourceTO> model = new CompoundPropertyModel<>(modelObject);
+ modal.setFormModel(model);
++
+ target.add(modal.setContent(new ResourceModal(modal, pageRef, model, false)));
- modal.setContent(new ResourceModal(
- modal,
- pageRef,
- resourceRestClient.read(node.getKey().toString()),
- false));
+ modal.header(new Model<String>(MessageFormat.format(getString("resource.edit"), node.getKey())));
- modal.setTitle(MessageFormat.format(getString("resource.edit"), node.getKey()));
- modal.show(target);
+ MetaDataRoleAuthorizationStrategy.
+ authorize(modal.addSumbitButton(), ENABLE, Entitlement.RESOURCE_UPDATE);
+
+ modal.show(true);
}
};
fragment.add(edit);
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/bootstrap/dialog/BaseModal.java
----------------------------------------------------------------------
diff --cc client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/bootstrap/dialog/BaseModal.java
index 2d26c08,e67daac..124b096
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/bootstrap/dialog/BaseModal.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/bootstrap/dialog/BaseModal.java
@@@ -40,6 -40,6 +40,7 @@@ import org.apache.wicket.markup.html.fo
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.ListView;
import org.apache.wicket.model.CompoundPropertyModel;
++import org.apache.wicket.model.IModel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@@ -117,6 -117,6 +118,11 @@@ public class BaseModal<T extends Serial
return this;
}
++ public BaseModal<T> setFormModel(final IModel<T> model) {
++ form.setModel(model);
++ return this;
++ }
++
public T getFormModel() {
return form.getModelObject();
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AbstractFieldPanel.java
----------------------------------------------------------------------
diff --cc client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AbstractFieldPanel.java
index 165f20d,41643ea..1f58760
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AbstractFieldPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AbstractFieldPanel.java
@@@ -18,11 -18,8 +18,14 @@@
*/
package org.apache.syncope.client.console.wicket.markup.html.form;
++import org.apache.commons.lang3.StringUtils;
+import org.apache.wicket.Component;
+import org.apache.wicket.markup.html.basic.Label;
++import org.apache.wicket.markup.html.form.FormComponent;
++import org.apache.wicket.markup.html.panel.Fragment;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.ResourceModel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@@ -35,33 -32,9 +38,92 @@@ public abstract class AbstractFieldPane
private static final long serialVersionUID = 5958017546318855690L;
- protected final String name;
- public AbstractFieldPanel(final String id, final IModel<T> model) {
++ private static final String LABEL = "field-label";
++
++ private static final String EXTERNAL_ACTION = "externalAction";
++
++ private static final String EXTERNAL_ACTION_ICON = "externalActionIcon";
++
++ protected boolean isRequiredLabelAdded = false;
++
++ protected String name;
+
+ public AbstractFieldPanel(final String id, final String name, final IModel<T> model) {
super(id, model);
+ this.name = name;
+
++ add(new Fragment("required", "emptyFragment", AbstractFieldPanel.this));
++ add(new Fragment("externalAction", "emptyFragment", AbstractFieldPanel.this));
++
+ addLabel();
+ setOutputMarkupId(true);
+ }
+
+ public final AbstractFieldPanel<T> addLabel() {
+ return addLabel(this.name);
+ }
+
+ public final AbstractFieldPanel<T> addLabel(final String name) {
- addOrReplace(new Label("field-label", new ResourceModel(name, name)));
++ addOrReplace(new Label(LABEL, new ResourceModel(name, name)));
+ return this;
+ }
+
+ public AbstractFieldPanel<T> hideLabel() {
- final Component label = get("field-label");
++ final Component label = get(LABEL);
+
+ if (label != null) {
+ label.setVisible(false);
+ }
++
++ return this;
++ }
++
++ public AbstractFieldPanel<T> showExternAction(final FormComponent<?> component) {
++ final Fragment fragment = new Fragment("externalAction", "externalActionFragment", AbstractFieldPanel.this);
++ addOrReplace(fragment);
++ fragment.add(component.setRenderBodyOnly(false));
++ return this;
++ }
++
++ public boolean isRequired() {
++ return false;
++ }
++
++ public AbstractFieldPanel<T> setRequired(final boolean required) {
+ return this;
+ }
+
++ public AbstractFieldPanel<T> addRequiredLabel() {
++ if (!isRequired()) {
++ setRequired(true);
++ }
++
++ final Fragment fragment = new Fragment("required", "requiredFragment", this);
++ fragment.add(new Label("requiredLabel", "*"));
++ replace(fragment);
++
++ this.isRequiredLabelAdded = true;
++
++ return this;
++ }
++
++ public AbstractFieldPanel<T> removeRequiredLabel() {
++ if (isRequired()) {
++ setRequired(false);
++ }
++
++ final Fragment fragment = new Fragment("required", "emptyFragment", this);
++
++ replace(fragment);
++
++ this.isRequiredLabelAdded = false;
++
++ return this;
++ }
++
++ protected String externalActionIcon() {
++ return StringUtils.EMPTY;
+ }
+
public abstract AbstractFieldPanel<T> setModelObject(T object);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.java
----------------------------------------------------------------------
diff --cc client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.java
index bd1cd0d,ff64fbe..789a8e1
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.java
@@@ -40,7 -38,7 +38,7 @@@ public class AjaxCheckBoxPanel extends
public AjaxCheckBoxPanel(
final String id, final String name, final IModel<Boolean> model, final boolean enableOnChange) {
-- super(id, model);
++ super(id, name, model);
field = new CheckBox("checkboxField", model);
add(field.setLabel(new Model<String>(name)).setOutputMarkupId(true));
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxPasswordFieldPanel.java
----------------------------------------------------------------------
diff --cc client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxPasswordFieldPanel.java
index 2eb11ea,2eb11ea..a831520
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxPasswordFieldPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxPasswordFieldPanel.java
@@@ -23,19 -23,19 +23,24 @@@ import org.apache.wicket.ajax.AjaxReque
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
import org.apache.wicket.markup.html.form.PasswordTextField;
import org.apache.wicket.model.IModel;
--import org.apache.wicket.model.Model;
++import org.apache.wicket.model.ResourceModel;
public class AjaxPasswordFieldPanel extends FieldPanel<String> {
private static final long serialVersionUID = -5490115280336667460L;
public AjaxPasswordFieldPanel(final String id, final String name, final IModel<String> model) {
-- super(id, model);
++ this(id, name, model, true);
++ }
++
++ public AjaxPasswordFieldPanel(
++ final String id, final String name, final IModel<String> model, final boolean enableOnChange) {
++ super(id, name, model);
field = new PasswordTextField("passwordField", model);
-- add(field.setLabel(new Model<>(name)).setRequired(false).setOutputMarkupId(true));
++ add(field.setLabel(new ResourceModel(name, name)).setRequired(false).setOutputMarkupId(true));
-- if (!isReadOnly()) {
++ if (enableOnChange && !isReadOnly()) {
field.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
private static final long serialVersionUID = -1107858522700306810L;
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxTextFieldPanel.java
----------------------------------------------------------------------
diff --cc client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxTextFieldPanel.java
index 08de6f8,f42b67f..59a2c00
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxTextFieldPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxTextFieldPanel.java
@@@ -28,7 -28,7 +28,6 @@@ import org.apache.wicket.ajax.AjaxReque
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
import org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteSettings;
import org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField;
--import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.ResourceModel;
import org.apache.wicket.validation.IValidator;
@@@ -45,7 -45,7 +44,7 @@@ public class AjaxTextFieldPanel extend
public AjaxTextFieldPanel(
final String id, final String name, final IModel<String> model, final boolean enableOnChange) {
-- super(id, model);
++ super(id, name, model);
final AutoCompleteSettings settings = new AutoCompleteSettings();
settings.setShowCompleteListOnFocusGain(true);
@@@ -84,8 -84,8 +83,6 @@@
}
});
}
-
-
-- add(new Label("label", new ResourceModel(name, name)));
}
public void addValidator(final IValidator<? super String> validator) {
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/FieldPanel.java
----------------------------------------------------------------------
diff --cc client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/FieldPanel.java
index 5bf1cdc,3a48d38..89970f8
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/FieldPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/FieldPanel.java
@@@ -23,10 -23,10 +23,8 @@@ import java.util.List
import org.apache.commons.lang3.SerializationUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.wicket.AttributeModifier;
--import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.FormComponent;
import org.apache.wicket.markup.html.list.ListItem;
--import org.apache.wicket.markup.html.panel.Fragment;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.ResourceModel;
@@@ -39,17 -39,15 +37,12 @@@ public abstract class FieldPanel<T exte
protected String title = null;
-- protected boolean isRequiredLabelAdded = false;
--
public FieldPanel(final String id, final IModel<T> model) {
- super(id, model);
-
- final Fragment fragment = new Fragment("required", "notRequiredFragment", this);
- add(fragment);
+ this(id, id, model);
+ }
- setOutputMarkupId(true);
+ public FieldPanel(final String id, final String name, final IModel<T> model) {
+ super(id, name, model);
-
- final Fragment fragment = new Fragment("required", "notRequiredFragment", this);
- add(fragment);
}
public FormComponent<T> getField() {
@@@ -75,6 -73,6 +68,7 @@@
return this;
}
++ @Override
public FieldPanel<T> setRequired(final boolean required) {
field.setRequired(required);
return this;
@@@ -85,6 -83,6 +79,7 @@@
return this;
}
++ @Override
public boolean isRequired() {
return field.isRequired();
}
@@@ -93,34 -91,36 +88,6 @@@
return !field.isEnabled();
}
-- public FieldPanel<T> addRequiredLabel() {
-- if (!isRequired()) {
-- setRequired(true);
-- }
--
-- final Fragment fragment = new Fragment("required", "requiredFragment", this);
-
-- fragment.add(new Label("requiredLabel", "*"));
-
-- replace(fragment);
--
-- this.isRequiredLabelAdded = true;
--
-- return this;
-- }
--
-- public FieldPanel<T> removeRequiredLabel() {
-- if (isRequired()) {
-- setRequired(false);
-- }
--
-- final Fragment fragment = new Fragment("required", "notRequiredFragment", this);
--
-- replace(fragment);
--
-- this.isRequiredLabelAdded = false;
--
-- return this;
-- }
--
@Override
public FieldPanel<T> setModelObject(final T object) {
field.setModelObject(object);
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/SpinnerFieldPanel.java
----------------------------------------------------------------------
diff --cc client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/SpinnerFieldPanel.java
index 4eb7270,4f71f81..3370cd7
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/SpinnerFieldPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/SpinnerFieldPanel.java
@@@ -26,59 -36,147 +26,57 @@@ public class SpinnerFieldPanel<T extend
private static final long serialVersionUID = 6413819574530703577L;
- private String name;
-
- private final String name;
+ private Class<T> reference;
- private final Class<T> reference;
+ private IModel<T> model;
- private final IModel<T> model;
+ private SpinnerConfig conf;
- private final T min;
-
- private final T max;
-
- @SuppressWarnings("unchecked")
- public SpinnerFieldPanel(final String id, final String name, final Class<T> reference, final IModel<T> model,
+ public SpinnerFieldPanel(
+ final String id,
+ final String name,
+ final Class<T> reference,
+ final IModel<T> model,
final T min, final T max) {
+ super(id, name, model);
- super(id, model);
- this.name = name;
- this.reference = reference;
- this.model = model;
- this.min = min;
- this.max = max;
+ final SpinnerConfig config = new SpinnerConfig();
+ config.withMax(max);
+ config.withMin(min);
- String uuid = UUID.randomUUID().toString();
- field = new TextField<T>("spinnerField", model, reference);
- field.setMarkupId(uuid);
- add(field.setLabel(new Model<String>(name)));
-
- if (!isReadOnly()) {
- field.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+ init(name, reference, model, config);
+ }
- private static final long serialVersionUID = -1107858522700306810L;
+ public SpinnerFieldPanel(
+ final String id,
+ final String name,
+ final Class<T> reference,
+ final IModel<T> model) {
+ this(id, name, reference, model, new SpinnerConfig());
+ }
- @Override
- protected void onUpdate(final AjaxRequestTarget target) {
- // nothing to do
- }
- });
- }
+ public SpinnerFieldPanel(
+ final String id,
+ final String name,
+ final Class<T> reference,
+ final IModel<T> model,
+ final SpinnerConfig conf) {
- final StringBuilder statements = new StringBuilder();
- statements.append("jQuery(function() {").
- append("var spinner = $('#").append(uuid).append("').spinner();").
- append("$('#").append(uuid).append("').spinner(").
- append("'option', 'stop', function(event, ui) { $(this).change(); });");
- if (this.min != null) {
- statements.
- append("$('#").append(uuid).append("').spinner(").
- append("'option', 'min', ").append(this.min).append(");");
- }
- if (this.max != null) {
- statements.
- append("$('#").append(uuid).append("').spinner(").
- append("'option', 'max', ").append(this.max).append(");");
- }
- statements.append("});");
- Label spinnerFieldJS = new Label("spinnerFieldJS", statements.toString());
- spinnerFieldJS.setEscapeModelStrings(false);
- add(spinnerFieldJS);
+ super(id, name, model);
+ init(name, reference, model, conf);
}
- @Override
- public SpinnerFieldPanel<T> setNewModel(final List<Serializable> list) {
- setNewModel(new Model<T>() {
-
- private static final long serialVersionUID = 527651414610325237L;
-
- @Override
- public T getObject() {
- T value = null;
-
- if (list != null && !list.isEmpty() && StringUtils.hasText(list.get(0).toString())) {
- value = reference.equals(Integer.class)
- ? reference.cast(NumberUtils.toInt(list.get(0).toString()))
- : reference.equals(Long.class)
- ? reference.cast(NumberUtils.toLong(list.get(0).toString()))
- : reference.equals(Short.class)
- ? reference.cast(NumberUtils.toShort(list.get(0).toString()))
- : reference.equals(Float.class)
- ? reference.cast(NumberUtils.toFloat(list.get(0).toString()))
- : reference.equals(byte.class)
- ? reference.cast(NumberUtils.toByte(list.get(0).toString()))
- : reference.cast(NumberUtils.toDouble(list.get(0).toString()));
- }
-
- return value;
- }
-
- @Override
- public void setObject(final T object) {
- list.clear();
- if (object != null) {
- list.add(object.toString());
- }
- }
- });
-
- return this;
- }
+ private void init(final String name, final Class<T> reference, final IModel<T> model, final SpinnerConfig conf) {
+ final Spinner<T> spinner = new Spinner<>("spinner", model, conf);
+ add(spinner);
- @SuppressWarnings("rawtypes")
- @Override
- public SpinnerFieldPanel<T> setNewModel(final ListItem item) {
- field.setModel(new Model<T>() {
-
- private static final long serialVersionUID = 6799404673615637845L;
-
- @Override
- public T getObject() {
- T number = null;
-
- final Object obj = item.getModelObject();
-
- if (obj != null && !obj.toString().isEmpty()) {
- if (obj instanceof String) {
- number = reference.equals(Integer.class)
- ? reference.cast(Integer.valueOf((String) obj))
- : reference.equals(Long.class)
- ? reference.cast(Long.valueOf((String) obj))
- : reference.equals(Short.class)
- ? reference.cast(Short.valueOf((String) obj))
- : reference.equals(Float.class)
- ? reference.cast(Float.valueOf((String) obj))
- : reference.equals(byte.class)
- ? reference.cast(Byte.valueOf((String) obj))
- : reference.cast(Double.valueOf((String) obj));
- } else if (obj instanceof Number) {
- // Don't parse anything
- number = reference.cast(obj);
- }
- }
-
- return number;
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public void setObject(final T object) {
- item.setModelObject(object == null ? null : object.toString());
- }
- });
-
- return this;
+ this.name = name;
+ this.model = model;
+ this.conf = conf;
+ this.reference = reference;
+
+ this.conf.withMouseWheel(true);
+ this.conf.withVerticalbuttons(true);
}
@Override
http://git-wip-us.apache.org/repos/asf/syncope/blob/b56c08ee/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/AltListView.java
----------------------------------------------------------------------
diff --cc client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/AltListView.java
index 3691171,3691171..0000000
deleted file mode 100644,100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/AltListView.java
+++ /dev/null
@@@ -1,59 -1,59 +1,0 @@@
--/*
-- * Licensed to the Apache Software Foundation (ASF) under one
-- * or more contributor license agreements. See the NOTICE file
-- * distributed with this work for additional information
-- * regarding copyright ownership. The ASF licenses this file
-- * to you under the Apache License, Version 2.0 (the
-- * "License"); you may not use this file except in compliance
-- * with the License. You may obtain a copy of the License at
-- *
-- * http://www.apache.org/licenses/LICENSE-2.0
-- *
-- * Unless required by applicable law or agreed to in writing,
-- * software distributed under the License is distributed on an
-- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- * KIND, either express or implied. See the License for the
-- * specific language governing permissions and limitations
-- * under the License.
-- */
--package org.apache.syncope.client.console.wicket.markup.html.list;
--
--import java.util.List;
--import org.apache.wicket.markup.ComponentTag;
--import org.apache.wicket.markup.html.list.ListItem;
--import org.apache.wicket.markup.html.list.ListView;
--import org.apache.wicket.model.IModel;
--
--public abstract class AltListView<T> extends ListView<T> {
--
-- private static final long serialVersionUID = 251378224847354710L;
--
-- public AltListView(final String id) {
-- super(id);
-- }
--
-- public AltListView(final String id, final IModel<? extends List<T>> model) {
-- super(id, model);
-- }
--
-- public AltListView(final String id, final List<T> list) {
-- super(id, list);
-- }
--
-- @Override
-- protected ListItem<T> newItem(final int index, final IModel<T> itemModel) {
-- return new ListItem<T>(index, itemModel) {
--
-- private static final long serialVersionUID = 5473483270932376694L;
--
-- @Override
-- protected void onComponentTag(final ComponentTag tag) {
-- if (index % 2 == 0) {
-- tag.append("class", "alt", " ");
-- }
--
-- super.onComponentTag(tag);
-- }
-- };
-- }
--}
[14/28] syncope git commit: Merge branch 'master' into SYNCOPE-156
Posted by fm...@apache.org.
Merge branch 'master' into SYNCOPE-156
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/07b519bd
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/07b519bd
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/07b519bd
Branch: refs/heads/master
Commit: 07b519bd86abc42ae4eea174121a3b3476d309d6
Parents: 1e15b05 279888c
Author: fmartelli <fa...@gmail.com>
Authored: Thu Oct 1 11:34:10 2015 +0200
Committer: fmartelli <fa...@gmail.com>
Committed: Thu Oct 1 11:34:10 2015 +0200
----------------------------------------------------------------------
README.md | 4 +-
deb/console/src/deb/control/control | 2 +-
deb/core/src/deb/control/control | 2 +-
pom.xml | 26 ++++-
.../getting-started/getting-started.adoc | 11 +-
.../getting-started/images/architecture.png | Bin 0 -> 62994 bytes
.../getting-started/images/architecture.xml | 20 ++++
.../images/identityLifecycle.png | Bin 0 -> 121230 bytes
.../asciidoc/getting-started/introduction.adoc | 114 +++++++++++++++++++
.../getting-started/systemRequirements.adoc | 50 ++++++++
src/main/asciidoc/syncope-theme.yml | 6 +-
src/site/xdoc/building.xml | 6 +-
src/site/xdoc/index.xml | 2 +-
src/site/xdoc/release-process.xml | 2 +-
src/site/xdoc/security.xml | 2 +-
15 files changed, 227 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/07b519bd/pom.xml
----------------------------------------------------------------------
[27/28] syncope git commit: Merge branch 'master' into SYNCOPE-156
Posted by fm...@apache.org.
Merge branch 'master' into SYNCOPE-156
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/e9bf6d17
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/e9bf6d17
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/e9bf6d17
Branch: refs/heads/master
Commit: e9bf6d17fc3d17a24b69b23dd398a53df27c4f4e
Parents: 047ac01 1a05fe1
Author: fmartelli <fa...@gmail.com>
Authored: Fri Oct 30 12:33:45 2015 +0100
Committer: fmartelli <fa...@gmail.com>
Committed: Fri Oct 30 12:33:45 2015 +0100
----------------------------------------------------------------------
src/site/xdoc/source-repository.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
[04/28] syncope git commit: [SYNCOPE-156] removed bootstrap-select
dependency
Posted by fm...@apache.org.
[SYNCOPE-156] removed bootstrap-select dependency
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/6f679403
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/6f679403
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/6f679403
Branch: refs/heads/master
Commit: 6f67940385ee969cbef7bd360d385badbc3c055f
Parents: 1ab8914
Author: fmartelli <fa...@gmail.com>
Authored: Wed Sep 23 17:41:27 2015 +0200
Committer: fmartelli <fa...@gmail.com>
Committed: Wed Sep 23 17:41:27 2015 +0200
----------------------------------------------------------------------
client/console/pom.xml | 4 --
.../console/panels/ResourceDetailsPanel.java | 2 +-
.../markup/html/form/MultiFieldPanel.java | 11 +---
.../META-INF/resources/css/syncopeConsole.css | 4 +-
.../client/console/pages/BaseModalPage.html | 1 -
.../syncope/client/console/pages/BasePage.html | 3 -
.../syncope/client/console/pages/Login.html | 1 -
.../console/pages/MustChangePassword.html | 2 -
.../console/panels/ResourceDetailsPanel.html | 59 ++++++++++++++++----
.../markup/html/form/MultiFieldPanel.html | 5 +-
pom.xml | 6 --
11 files changed, 54 insertions(+), 44 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/6f679403/client/console/pom.xml
----------------------------------------------------------------------
diff --git a/client/console/pom.xml b/client/console/pom.xml
index 18f9a91..759ba78 100644
--- a/client/console/pom.xml
+++ b/client/console/pom.xml
@@ -104,10 +104,6 @@ under the License.
</dependency>
<dependency>
<groupId>org.webjars</groupId>
- <artifactId>bootstrap-select</artifactId>
- </dependency>
- <dependency>
- <groupId>org.webjars</groupId>
<artifactId>ionicons</artifactId>
</dependency>
<dependency>
http://git-wip-us.apache.org/repos/asf/syncope/blob/6f679403/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceDetailsPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceDetailsPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceDetailsPanel.java
index ba5388d..40789c7 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceDetailsPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceDetailsPanel.java
@@ -117,7 +117,7 @@ public class ResourceDetailsPanel extends Panel {
"actionsClasses",
"actionsClasses",
new PropertyModel<List<String>>(resourceTO, "propagationActionsClassNames"),
- template);
+ template, true);
container.add(actions);
http://git-wip-us.apache.org/repos/asf/syncope/blob/6f679403/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.java
index ccffd20..b6c2d4f 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.java
@@ -72,7 +72,7 @@ public class MultiFieldPanel<E extends Serializable> extends AbstractFieldPanel<
// -----------------------
if (model.getObject().isEmpty()) {
- container.add(getNoDataFragment(model, name));
+ container.addOrReplace(getNoDataFragment(model, name));
} else {
container.addOrReplace(getDataFragment(model, name));
}
@@ -109,15 +109,6 @@ public class MultiFieldPanel<E extends Serializable> extends AbstractFieldPanel<
});
}
- fieldPanel.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_BLUR) {
-
- private static final long serialVersionUID = -1107858522700306810L;
-
- @Override
- protected void onUpdate(final AjaxRequestTarget target) {
- }
- });
-
fieldPanel.setNewModel(item);
item.add(fieldPanel.hideLabel().setRenderBodyOnly(true));
http://git-wip-us.apache.org/repos/asf/syncope/blob/6f679403/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 039f845..b6d4fe5 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
@@ -190,11 +190,11 @@ div.basepage-content{
margin-top: 55px;
}
-.modal-content {
+.tab-content {
max-height: 600px;
- max-width: 1240px;
overflow-x: hidden;
overflow-y: auto;
+ padding: 20px 20px 5px 20px;
}
.modal-open .modal {
http://git-wip-us.apache.org/repos/asf/syncope/blob/6f679403/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage.html
index 242eb6a..8f4527c 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BaseModalPage.html
@@ -20,7 +20,6 @@ under the License.
<head>
<title></title>
- <link href="webjars/bootstrap-select/${bootstrap-select.version}/css/bootstrap-select.min.css" rel="stylesheet" type="text/css" />
<link href="webjars/font-awesome/${font-awesome.version}/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link href="webjars/ionicons/${ionicons.version}/css/ionicons.min.css" rel="stylesheet" type="text/css" />
http://git-wip-us.apache.org/repos/asf/syncope/blob/6f679403/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html
index 189b139..790c201 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html
@@ -25,7 +25,6 @@ under the License.
<title>Apache Syncope</title>
<link rel="shortcut icon" href="img/favicon.png" type="image/png"/>
- <link href="webjars/bootstrap-select/${bootstrap-select.version}/css/bootstrap-select.min.css" rel="stylesheet" type="text/css" />
<link href="webjars/font-awesome/${font-awesome.version}/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link href="webjars/ionicons/${ionicons.version}/css/ionicons.min.css" rel="stylesheet" type="text/css" />
@@ -34,8 +33,6 @@ under the License.
<link href="css/syncopeConsole.css" rel="stylesheet" type="text/css" />
<link href="css/fieldstyle.css" rel="stylesheet" type="text/css" />
- <script type="text/javascript" src="webjars/bootstrap-select/${bootstrap-select.version}/js/bootstrap-select.min.js"></script>
-
<script type="text/javascript">
var notificationShownTimes = 0;
function showNotification(componentId, messagecount) {
http://git-wip-us.apache.org/repos/asf/syncope/blob/6f679403/client/console/src/main/resources/org/apache/syncope/client/console/pages/Login.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Login.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Login.html
index ed5aae3..f2b80d1 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Login.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Login.html
@@ -27,7 +27,6 @@ under the License.
<link rel="shortcut icon" href="img/favicon.png" type="image/png"/>
- <link href="webjars/bootstrap-select/${bootstrap-select.version}/css/bootstrap-select.min.css" rel="stylesheet" type="text/css" />
<link href="webjars/font-awesome/${font-awesome.version}/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link href="webjars/ionicons/${ionicons.version}/css/ionicons.min.css" rel="stylesheet" type="text/css" />
<link href="css/login.css" rel="stylesheet" type="text/css" />
http://git-wip-us.apache.org/repos/asf/syncope/blob/6f679403/client/console/src/main/resources/org/apache/syncope/client/console/pages/MustChangePassword.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/MustChangePassword.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/MustChangePassword.html
index 675c4df..3697265 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/MustChangePassword.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/MustChangePassword.html
@@ -28,7 +28,6 @@ under the License.
<link rel="shortcut icon" href="img/favicon.png" type="image/png"/>
<link href="webjars/bootstrap/${bootstrap.version}/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
- <link href="webjars/bootstrap-select/${bootstrap-select.version}/css/bootstrap-select.min.css" rel="stylesheet" type="text/css" />
<link href="webjars/font-awesome/${font-awesome.version}/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link href="webjars/ionicons/${ionicons.version}/css/ionicons.min.css" rel="stylesheet" type="text/css" />
<link href="css/AdminLTE.css" rel="stylesheet" type="text/css" />
@@ -36,7 +35,6 @@ under the License.
<link href="css/syncopeConsole.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="webjars/bootstrap/${bootstrap.version}/js/bootstrap.min.js"></script>
- <script type="text/javascript" src="webjars/bootstrap-select/${bootstrap-select.version}/js/bootstrap-select.min.js"></script>
</head>
<body class="skin-green">
<div class="container">
http://git-wip-us.apache.org/repos/asf/syncope/blob/6f679403/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceDetailsPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceDetailsPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceDetailsPanel.html
index 660449a..942edab 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceDetailsPanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceDetailsPanel.html
@@ -27,18 +27,53 @@ under the License.
<wicket:panel>
<div wicket:id="container" class="summarize">
- <span wicket:id="name">[name]</span>
- <span wicket:id="connector">[connector]</span>
- <span wicket:id="enforceMandatoryCondition">[enforceMandatoryCondition]</span>
- <span wicket:id="propagationPrimary">[propagationPrimary]</span>
- <span wicket:id="propagationPriority">[propagationPriority]</span>
- <span wicket:id="propagationMode">[propagationMode]</span>
- <span wicket:id="randomPwdIfNotProvided">[randomPwdIfNotProvided]</span>
- <span wicket:id="actionsClasses">[actionsClasses]</span>
- <span wicket:id="createTraceLevel">[createTraceLevel]</span>
- <span wicket:id="updateTraceLevel">[updateTraceLevel]</span>
- <span wicket:id="deleteTraceLevel">[deleteTraceLevel]</span>
- <span wicket:id="syncTraceLevel">[syncTraceLevel]</span>
+ <div class="form-group">
+ <span wicket:id="name">[name]</span>
+ </div>
+
+ <div class="form-group">
+ <span wicket:id="connector">[connector]</span>
+ </div>
+
+ <div class="form-group">
+ <span wicket:id="enforceMandatoryCondition">[enforceMandatoryCondition]</span>
+ </div>
+
+ <div class="form-group">
+ <span wicket:id="propagationPrimary">[propagationPrimary]</span>
+ </div>
+
+ <div class="form-group">
+ <span wicket:id="propagationPriority">[propagationPriority]</span>
+ </div>
+
+ <div class="form-group">
+ <span wicket:id="propagationMode">[propagationMode]</span>
+ </div>
+
+ <div class="form-group">
+ <span wicket:id="randomPwdIfNotProvided">[randomPwdIfNotProvided]</span>
+ </div>
+
+ <div class="form-group">
+ <span wicket:id="actionsClasses">[actionsClasses]</span>
+ </div>
+
+ <div class="form-group">
+ <span wicket:id="createTraceLevel">[createTraceLevel]</span>
+ </div>
+
+ <div class="form-group">
+ <span wicket:id="updateTraceLevel">[updateTraceLevel]</span>
+ </div>
+
+ <div class="form-group">
+ <span wicket:id="deleteTraceLevel">[deleteTraceLevel]</span>
+ </div>
+
+ <div class="form-group">
+ <span wicket:id="syncTraceLevel">[syncTraceLevel]</span>
+ </div>
</div>
<span wicket:id="systeminformation">[System Information]</span>
http://git-wip-us.apache.org/repos/asf/syncope/blob/6f679403/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.html
index 8dc7fd0..5a2a02a 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.html
@@ -26,12 +26,13 @@ under the License.
<!--<label wicket:id="field-label">[LABEL]</label><span wicket:id="required"/>-->
<label wicket:id="field-label">[LABEL]</label>
</wicket:enclosure>
+
<span wicket:id="multiValueContainer">
<span wicket:id="content">[content]</span>
</span>
<wicket:fragment wicket:id="noDataFragment">
- <div class="input-group form-group">
+ <div class="input-group">
<div class="form-control" style="background-color:#EEE">
<label wicket:id="field-label">[LABEL]</label>
</div>
@@ -41,7 +42,7 @@ under the License.
<wicket:fragment wicket:id="dataFragment">
<span wicket:id="view">
- <div class="input-group form-group">
+ <div class="input-group">
<span wicket:id="panel">[form field]</span>
<div class="input-group-addon">
<a wicket:id="drop"><i class="fa fa-minus"></i></a>
http://git-wip-us.apache.org/repos/asf/syncope/blob/6f679403/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 07873ad..c9e38bc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -377,7 +377,6 @@ under the License.
<jquery-cookie.version>1.4.1-1</jquery-cookie.version>
<bootstrap.version>3.3.5</bootstrap.version>
- <bootstrap-select.version>1.7.3</bootstrap-select.version>
<wicket-bootstrap.version>0.10.3</wicket-bootstrap.version>
<font-awesome.version>4.4.0</font-awesome.version>
@@ -950,11 +949,6 @@ under the License.
</dependency>
<dependency>
<groupId>org.webjars</groupId>
- <artifactId>bootstrap-select</artifactId>
- <version>${bootstrap-select.version}</version>
- </dependency>
- <dependency>
- <groupId>org.webjars</groupId>
<artifactId>font-awesome</artifactId>
<version>${font-awesome.version}</version>
</dependency>
[15/28] syncope git commit: [SYNCOPE-156] Removing (most of) Spring
from console
Posted by fm...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceModal.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceModal.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceModal.java
index 7ea5e96..74b9ed2 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceModal.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceModal.java
@@ -28,6 +28,8 @@ import org.apache.commons.collections4.Predicate;
import org.apache.commons.lang3.SerializationUtils;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.pages.AbstractBasePage;
+import org.apache.syncope.client.console.rest.ConnectorRestClient;
+import org.apache.syncope.client.console.rest.ResourceRestClient;
import org.apache.syncope.client.console.topology.TopologyNode;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
@@ -54,6 +56,10 @@ public class ResourceModal extends AbstractResourceModal {
private static final long serialVersionUID = 1734415311027284221L;
+ private final ResourceRestClient resourceRestClient = new ResourceRestClient();
+
+ private final ConnectorRestClient connectorRestClient = new ConnectorRestClient();
+
private final boolean createFlag;
public ResourceModal(
@@ -95,7 +101,7 @@ public class ResourceModal extends AbstractResourceModal {
@Override
public void onClick(final AjaxRequestTarget target, final ProvisionTO provisionTO) {
send(pageRef.getPage(), Broadcast.DEPTH,
- new AjaxWizard.NewItemActionEvent<ProvisionTO>(provisionTO, 2, target));
+ new AjaxWizard.NewItemActionEvent<>(provisionTO, 2, target));
}
}, ActionLink.ActionType.MAPPING, Entitlement.RESOURCE_UPDATE).addAction(new ActionLink<ProvisionTO>() {
@@ -104,7 +110,7 @@ public class ResourceModal extends AbstractResourceModal {
@Override
public void onClick(final AjaxRequestTarget target, final ProvisionTO provisionTO) {
send(pageRef.getPage(), Broadcast.DEPTH,
- new AjaxWizard.NewItemActionEvent<ProvisionTO>(provisionTO, 3, target));
+ new AjaxWizard.NewItemActionEvent<>(provisionTO, 3, target));
}
}, ActionLink.ActionType.ACCOUNT_LINK, Entitlement.RESOURCE_UPDATE).addAction(new ActionLink<ProvisionTO>() {
@@ -114,7 +120,7 @@ public class ResourceModal extends AbstractResourceModal {
public void onClick(final AjaxRequestTarget target, final ProvisionTO provisionTO) {
provisionTO.setSyncToken(null);
send(pageRef.getPage(), Broadcast.DEPTH,
- new AjaxWizard.NewItemFinishEvent<ProvisionTO>(provisionTO, target));
+ new AjaxWizard.NewItemFinishEvent<>(provisionTO, target));
}
}, ActionLink.ActionType.RESET_TIME, Entitlement.RESOURCE_UPDATE).addAction(new ActionLink<ProvisionTO>() {
@@ -123,7 +129,7 @@ public class ResourceModal extends AbstractResourceModal {
@Override
public void onClick(final AjaxRequestTarget target, final ProvisionTO provisionTO) {
send(pageRef.getPage(), Broadcast.DEPTH,
- new AjaxWizard.NewItemActionEvent<ProvisionTO>(SerializationUtils.clone(provisionTO), target));
+ new AjaxWizard.NewItemActionEvent<>(SerializationUtils.clone(provisionTO), target));
}
}, ActionLink.ActionType.CLONE, Entitlement.RESOURCE_CREATE).addAction(new ActionLink<ProvisionTO>() {
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceSecurityPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceSecurityPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceSecurityPanel.java
index 4aab37e..37cf8ac 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceSecurityPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceSecurityPanel.java
@@ -34,14 +34,12 @@ import org.apache.wicket.model.IModel;
import org.apache.wicket.model.LoadableDetachableModel;
import org.apache.wicket.model.PropertyModel;
import org.apache.wicket.model.ResourceModel;
-import org.apache.wicket.spring.injection.annot.SpringBean;
public class ResourceSecurityPanel extends Panel {
private static final long serialVersionUID = -7982691107029848579L;
- @SpringBean
- private PolicyRestClient policyRestClient;
+ private final PolicyRestClient policyRestClient = new PolicyRestClient();
private IModel<Map<Long, String>> passwordPolicies = null;
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/resources/WorkflowDefGETResource.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/resources/WorkflowDefGETResource.java b/client/console/src/main/java/org/apache/syncope/client/console/resources/WorkflowDefGETResource.java
index 62dfe30..91e2548 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/resources/WorkflowDefGETResource.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/resources/WorkflowDefGETResource.java
@@ -21,10 +21,8 @@ package org.apache.syncope.client.console.resources;
import java.io.IOException;
import javax.ws.rs.core.MediaType;
import org.apache.syncope.client.console.rest.WorkflowRestClient;
-import org.apache.wicket.protocol.http.WebApplication;
import org.apache.wicket.request.resource.AbstractResource;
import org.apache.wicket.util.io.IOUtils;
-import org.springframework.web.context.support.WebApplicationContextUtils;
/**
* Mirror REST resource for obtaining user workflow definition in JSON (used by Activiti Modeler).
@@ -45,9 +43,8 @@ public class WorkflowDefGETResource extends AbstractResource {
@Override
public void writeData(final Attributes attributes) throws IOException {
- IOUtils.copy(WebApplicationContextUtils.getWebApplicationContext(
- WebApplication.get().getServletContext()).getBean(WorkflowRestClient.class).
- getDefinition(MediaType.APPLICATION_JSON_TYPE),
+ IOUtils.copy(
+ new WorkflowRestClient().getDefinition(MediaType.APPLICATION_JSON_TYPE),
attributes.getResponse().getOutputStream());
}
});
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/resources/WorkflowDefPUTResource.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/resources/WorkflowDefPUTResource.java b/client/console/src/main/java/org/apache/syncope/client/console/resources/WorkflowDefPUTResource.java
index b85dfd8..7800462 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/resources/WorkflowDefPUTResource.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/resources/WorkflowDefPUTResource.java
@@ -23,12 +23,10 @@ import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.core.MediaType;
import org.apache.cxf.common.util.UrlUtils;
import org.apache.syncope.client.console.rest.WorkflowRestClient;
-import org.apache.wicket.protocol.http.WebApplication;
import org.apache.wicket.request.resource.AbstractResource;
import org.apache.wicket.util.io.IOUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.springframework.web.context.support.WebApplicationContextUtils;
/**
* Mirror REST resource for putting user workflow definition in JSON (used by Activiti Modeler).
@@ -61,9 +59,7 @@ public class WorkflowDefPUTResource extends AbstractResource {
LOG.error("Could not extract workflow definition from request", e);
}
- WebApplicationContextUtils.getWebApplicationContext(WebApplication.get().getServletContext()).
- getBean(WorkflowRestClient.class).
- updateDefinition(MediaType.APPLICATION_JSON_TYPE, definition);
+ new WorkflowRestClient().updateDefinition(MediaType.APPLICATION_JSON_TYPE, definition);
ResourceResponse response = new ResourceResponse();
response.setStatusCode(204);
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/rest/BaseRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/BaseRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/BaseRestClient.java
index 15f9c9b..1271e35 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/rest/BaseRestClient.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/BaseRestClient.java
@@ -21,6 +21,7 @@ package org.apache.syncope.client.console.rest;
import java.io.Serializable;
import java.net.URI;
import org.apache.cxf.jaxrs.client.WebClient;
+import org.apache.syncope.client.console.SyncopeConsoleApplication;
import org.apache.syncope.client.console.SyncopeConsoleSession;
import org.apache.syncope.client.lib.SyncopeClient;
import org.apache.syncope.common.lib.search.OrderByClauseBuilder;
@@ -66,7 +67,7 @@ public abstract class BaseRestClient implements Serializable {
protected <E extends JAXRSService, T> T getObject(final E service, final URI location, final Class<T> resultClass) {
WebClient webClient = WebClient.fromClient(WebClient.client(service));
- webClient.accept(SyncopeConsoleSession.get().getMediaType()).to(location.toASCIIString(), false);
+ webClient.accept(SyncopeConsoleApplication.get().getMediaType()).to(location.toASCIIString(), false);
return webClient.get(resultClass);
}
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/topology/Topology.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/topology/Topology.java b/client/console/src/main/java/org/apache/syncope/client/console/topology/Topology.java
index 7005143..faf91ea 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/topology/Topology.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/topology/Topology.java
@@ -33,6 +33,8 @@ import org.apache.syncope.client.console.SyncopeConsoleSession;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.panels.AbstractResourceModal.CreateEvent;
+import org.apache.syncope.client.console.rest.ConnectorRestClient;
+import org.apache.syncope.client.console.rest.ResourceRestClient;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
@@ -63,6 +65,10 @@ public class Topology extends BasePage {
public static final String ROOT_NAME = "Syncope";
+ private final ResourceRestClient resourceRestClient = new ResourceRestClient();
+
+ private final ConnectorRestClient connectorRestClient = new ConnectorRestClient();
+
private final int origX = 3100;
private final int origY = 2800;
@@ -84,8 +90,8 @@ public class Topology extends BasePage {
}
};
- private final LoadableDetachableModel<Map<String, List<ConnInstanceTO>>> connModel
- = new LoadableDetachableModel<Map<String, List<ConnInstanceTO>>>() {
+ private final LoadableDetachableModel<Map<String, List<ConnInstanceTO>>> connModel =
+ new LoadableDetachableModel<Map<String, List<ConnInstanceTO>>>() {
private static final long serialVersionUID = 5275935387613157432L;
@@ -108,8 +114,8 @@ public class Topology extends BasePage {
}
};
- private final LoadableDetachableModel<Pair<List<URI>, List<URI>>> csModel
- = new LoadableDetachableModel<Pair<List<URI>, List<URI>>>() {
+ private final LoadableDetachableModel<Pair<List<URI>, List<URI>>> csModel =
+ new LoadableDetachableModel<Pair<List<URI>, List<URI>>>() {
private static final long serialVersionUID = 5275935387613157433L;
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyNodePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyNodePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyNodePanel.java
index ff40a8f..0b75ec0 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyNodePanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyNodePanel.java
@@ -49,7 +49,6 @@ import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
-import org.apache.wicket.spring.injection.annot.SpringBean;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -57,21 +56,20 @@ public class TopologyNodePanel extends Panel implements IAjaxIndicatorAware {
private static final long serialVersionUID = -8775095410207013913L;
- protected static final Logger LOG = LoggerFactory.getLogger(TopologyNodePanel.class);
+ private static final Logger LOG = LoggerFactory.getLogger(TopologyNodePanel.class);
- private final BaseModal<Serializable> modal;
+ private final ResourceRestClient resourceRestClient = new ResourceRestClient();
- @SpringBean
- private ResourceRestClient resourceRestClient;
+ private final ConnectorRestClient connectorRestClient = new ConnectorRestClient();
- @SpringBean
- private ConnectorRestClient connectorRestClient;
+ private final BaseModal<Serializable> modal;
public TopologyNodePanel(
final String id,
final TopologyNode node,
final BaseModal<Serializable> modal,
final PageReference pageRef) {
+
super(id);
final String resourceName = node.getDisplayName().length() > 20
@@ -141,7 +139,7 @@ public class TopologyNodePanel extends Panel implements IAjaxIndicatorAware {
target.add(modal.setContent(new ConnectorModal(modal, pageRef, model)));
- modal.header(new Model<String>(MessageFormat.format(getString("connector.new"), node.getKey())));
+ modal.header(new Model<>(MessageFormat.format(getString("connector.new"), node.getKey())));
MetaDataRoleAuthorizationStrategy.
authorize(modal.addSumbitButton(), ENABLE, Entitlement.CONNECTOR_CREATE);
@@ -196,7 +194,7 @@ public class TopologyNodePanel extends Panel implements IAjaxIndicatorAware {
target.add(modal.setContent(new ResourceModal(modal, pageRef, model, true)));
- modal.header(new Model<String>(MessageFormat.format(getString("resource.new"), node.getKey())));
+ modal.header(new Model<>(MessageFormat.format(getString("resource.new"), node.getKey())));
MetaDataRoleAuthorizationStrategy.
authorize(modal.addSumbitButton(), ENABLE, Entitlement.RESOURCE_CREATE);
@@ -221,7 +219,7 @@ public class TopologyNodePanel extends Panel implements IAjaxIndicatorAware {
target.add(modal.setContent(new ConnectorModal(modal, pageRef, model)));
- modal.header(new Model<String>(MessageFormat.format(getString("connector.edit"), node.getKey())));
+ modal.header(new Model<>(MessageFormat.format(getString("connector.edit"), node.getKey())));
MetaDataRoleAuthorizationStrategy.
authorize(modal.addSumbitButton(), ENABLE, Entitlement.CONNECTOR_UPDATE);
@@ -276,7 +274,7 @@ public class TopologyNodePanel extends Panel implements IAjaxIndicatorAware {
target.add(modal.setContent(new ResourceModal(modal, pageRef, model, false)));
- modal.header(new Model<String>(MessageFormat.format(getString("resource.edit"), node.getKey())));
+ modal.header(new Model<>(MessageFormat.format(getString("resource.edit"), node.getKey())));
MetaDataRoleAuthorizationStrategy.
authorize(modal.addSumbitButton(), ENABLE, Entitlement.RESOURCE_UPDATE);
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/BinaryFieldPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/BinaryFieldPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/BinaryFieldPanel.java
index f0c7093..b7a524a 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/BinaryFieldPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/BinaryFieldPanel.java
@@ -44,7 +44,6 @@ import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.request.handler.resource.ResourceStreamRequestHandler;
import org.apache.wicket.request.resource.ContentDisposition;
-import org.apache.wicket.spring.injection.annot.SpringBean;
import org.apache.wicket.util.crypt.Base64;
import org.apache.wicket.util.lang.Bytes;
@@ -62,14 +61,13 @@ public class BinaryFieldPanel extends FieldPanel<String> {
private final Fragment emptyFragment;
- @SpringBean
- private PreviewUtils previewUtil;
+ private final PreviewUtils previewUtils = PreviewUtils.getInstance();
public BinaryFieldPanel(final String id, final String name, final IModel<String> model, final String mimeType) {
super(id, model);
this.mimeType = mimeType;
- uploadForm = new StatelessForm<Void>("uploadForm");
+ uploadForm = new StatelessForm<>("uploadForm");
uploadForm.setMultiPart(true);
uploadForm.setMaxSize(Bytes.megabytes(4));
add(uploadForm);
@@ -82,8 +80,8 @@ public class BinaryFieldPanel extends FieldPanel<String> {
container.add(emptyFragment);
uploadForm.add(container);
- field = new TextField<String>("textField", model);
- add(field.setLabel(new Model<String>(name)).setOutputMarkupId(true));
+ field = new TextField<>("textField", model);
+ add(field.setLabel(new Model<>(name)).setOutputMarkupId(true));
uploadForm.add(new Label("preview", StringUtils.isBlank(mimeType) ? StringUtils.EMPTY : "(" + mimeType + ")"));
@@ -128,8 +126,7 @@ public class BinaryFieldPanel extends FieldPanel<String> {
field.setModelObject(uploaded);
target.add(field);
- final Component panelPreview = previewUtil.getPreviewer(mimeType, uploadedBytes);
-
+ Component panelPreview = previewUtils.getPreviewer(mimeType, uploadedBytes);
if (panelPreview != null) {
changePreviewer(panelPreview);
}
@@ -197,7 +194,7 @@ public class BinaryFieldPanel extends FieldPanel<String> {
public FieldPanel<String> setNewModel(final IModel<String> model) {
field.setModel(model);
try {
- final Component panelPreview = previewUtil.getPreviewer(mimeType, model.getObject());
+ Component panelPreview = previewUtils.getPreviewer(mimeType, model.getObject());
if (panelPreview != null) {
changePreviewer(panelPreview);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/ConnConfPropertyListView.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/ConnConfPropertyListView.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/ConnConfPropertyListView.java
index e71365f..85cc6e2 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/ConnConfPropertyListView.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/ConnConfPropertyListView.java
@@ -22,6 +22,7 @@ import de.agilecoders.wicket.extensions.markup.html.bootstrap.form.checkbox.boot
import de.agilecoders.wicket.extensions.markup.html.bootstrap.form.checkbox.bootstraptoggle.BootstrapToggleConfig;
import java.io.Serializable;
import java.util.List;
+import org.apache.commons.lang3.ClassUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.wicket.markup.html.form.AbstractFieldPanel;
@@ -46,7 +47,6 @@ import org.apache.wicket.model.Model;
import org.apache.wicket.model.PropertyModel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.springframework.util.ClassUtils;
public class ConnConfPropertyListView extends ListView<ConnConfProperty> {
@@ -90,8 +90,7 @@ public class ConnConfPropertyListView extends ListView<ConnConfProperty> {
} else {
Class<?> propertySchemaClass;
try {
- propertySchemaClass = ClassUtils.forName(property.getSchema().getType(), ClassUtils.
- getDefaultClassLoader());
+ propertySchemaClass = ClassUtils.getClass(property.getSchema().getType());
if (ClassUtils.isPrimitiveOrWrapper(propertySchemaClass)) {
propertySchemaClass = org.apache.commons.lang3.ClassUtils.primitiveToWrapper(propertySchemaClass);
}
@@ -102,8 +101,8 @@ public class ConnConfPropertyListView extends ListView<ConnConfProperty> {
if (ClassUtils.isAssignable(Number.class, propertySchemaClass)) {
@SuppressWarnings("unchecked")
- final Class<Number> numberClass = (Class<Number>) propertySchemaClass;
- field = new SpinnerFieldPanel<Number>(
+ Class<Number> numberClass = (Class<Number>) propertySchemaClass;
+ field = new SpinnerFieldPanel<>(
"panel", label.getDefaultModelObjectAsString(), numberClass, new Model<Number>());
required = property.getSchema().isRequired();
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/resources/META-INF/web-fragment.xml
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/web-fragment.xml b/client/console/src/main/resources/META-INF/web-fragment.xml
index 04cd14e..7ad9566 100644
--- a/client/console/src/main/resources/META-INF/web-fragment.xml
+++ b/client/console/src/main/resources/META-INF/web-fragment.xml
@@ -29,18 +29,6 @@ under the License.
<param-name>configuration</param-name>
<param-value>deployment</param-value>
</context-param>
-
- <context-param>
- <param-name>contextConfigLocation</param-name>
- <param-value>classpath:consoleContext.xml</param-value>
- </context-param>
-
- <listener>
- <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
- </listener>
- <listener>
- <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
- </listener>
<filter>
<filter-name>SyncopeConsole</filter-name>
@@ -50,8 +38,8 @@ under the License.
<param-value>/*</param-value>
</init-param>
<init-param>
- <param-name>applicationFactoryClassName</param-name>
- <param-value>org.apache.wicket.spring.SpringWebApplicationFactory</param-value>
+ <param-name>applicationClassName</param-name>
+ <param-value>org.apache.syncope.client.console.SyncopeConsoleApplication</param-value>
</init-param>
</filter>
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/resources/console.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/console.properties b/client/console/src/main/resources/console.properties
index 3f2667b..eb7ea39 100644
--- a/client/console/src/main/resources/console.properties
+++ b/client/console/src/main/resources/console.properties
@@ -15,8 +15,17 @@
# specific language governing permissions and limitations
# under the License.
console.directory=${conf.directory}
+
+version=${syncope.version}
+site=${project.parent.url}
+license=${licenseUrl}
+
+anonymousUser=${anonymousUser}
+anonymousKey=${anonymousKey}
+
scheme=http
host=localhost
port=8080
rootPath=/syncope/rest/
+
activitiModelerDirectory=${activiti-modeler.directory}
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/client/console/src/main/resources/consoleContext.xml
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/consoleContext.xml b/client/console/src/main/resources/consoleContext.xml
deleted file mode 100644
index 8b7fa16..0000000
--- a/client/console/src/main/resources/consoleContext.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-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.
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:context="http://www.springframework.org/schema/context"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context.xsd">
-
- <context:component-scan base-package="org.apache.syncope.client.console"/>
-
- <bean id="confDirectoryPropertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
- <property name="order" value="1"/>
- <property name="location" value="file:${console.directory}/console.properties"/>
- <property name="ignoreResourceNotFound" value="true"/>
- <property name="ignoreUnresolvablePlaceholders" value="true"/>
- </bean>
- <bean id="classpathPropertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
- <property name="location" value="classpath:console.properties"/>
- </bean>
-
- <bean id="version" class="java.lang.String">
- <constructor-arg value="${syncope.version}"/>
- </bean>
-
- <bean id="site" class="java.lang.String">
- <constructor-arg value="${project.parent.url}"/>
- </bean>
-
- <bean id="license" class="java.lang.String">
- <constructor-arg value="${licenseUrl}"/>
- </bean>
-
- <bean id="anonymousUser" class="java.lang.String">
- <constructor-arg value="${anonymousUser}"/>
- </bean>
- <bean id="anonymousKey" class="java.lang.String">
- <constructor-arg value="${anonymousKey}"/>
- </bean>
-
- <bean id="activitiModelerDirectory" class="java.lang.String">
- <constructor-arg value="${activitiModelerDirectory}"/>
- </bean>
-
- <bean class="org.apache.syncope.client.console.SyncopeConsoleApplication"/>
-
- <bean class="org.apache.syncope.client.console.PreferenceManager"/>
-
- <bean class="org.apache.syncope.client.lib.SyncopeClientFactoryBean">
- <property name="address" value="${scheme}://${host}:${port}/${rootPath}"/>
- </bean>
-
-</beans>
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/UserDataBinderImpl.java
----------------------------------------------------------------------
diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/UserDataBinderImpl.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/UserDataBinderImpl.java
index 82dfbc0..6fd9ee5 100644
--- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/UserDataBinderImpl.java
+++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/UserDataBinderImpl.java
@@ -340,7 +340,6 @@ public class UserDataBinderImpl extends AbstractAnyDataBinder implements UserDat
if (otherEnd == null) {
LOG.debug("Ignoring invalid any object {}", patch.getRelationshipTO().getRightKey());
} else {
-
relationship = entityFactory.newEntity(URelationship.class);
relationship.setType(relationshipType);
relationship.setRightEnd(otherEnd);
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/pages/CamelRouteModalPage.java
----------------------------------------------------------------------
diff --git a/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/pages/CamelRouteModalPage.java b/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/pages/CamelRouteModalPage.java
index b24e360..27b8f91 100644
--- a/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/pages/CamelRouteModalPage.java
+++ b/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/pages/CamelRouteModalPage.java
@@ -35,14 +35,12 @@ import org.apache.wicket.markup.html.form.TextArea;
import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.PropertyModel;
-import org.apache.wicket.spring.injection.annot.SpringBean;
public class CamelRouteModalPage extends AbstractModalPanel {
private static final long serialVersionUID = -1438441210568592931L;
- @SpringBean
- private CamelRouteRestClient restClient;
+ private final CamelRouteRestClient restClient = new CamelRouteRestClient();
public CamelRouteModalPage(
final BaseModal<?> modal,
@@ -54,7 +52,7 @@ public class CamelRouteModalPage extends AbstractModalPanel {
Form<CamelRouteTO> routeForm = new Form<>("routeDefForm");
- final TextArea<String> routeDefArea = new TextArea<>("content", new PropertyModel<String>(routeTO, "content"));
+ TextArea<String> routeDefArea = new TextArea<>("content", new PropertyModel<String>(routeTO, "content"));
routeForm.add(routeDefArea);
routeForm.setModel(new CompoundPropertyModel<>(routeTO));
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/panels/CamelRoutePanel.java
----------------------------------------------------------------------
diff --git a/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/panels/CamelRoutePanel.java b/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/panels/CamelRoutePanel.java
index 005e23f..bfcd912 100644
--- a/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/panels/CamelRoutePanel.java
+++ b/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/panels/CamelRoutePanel.java
@@ -43,7 +43,6 @@ import org.apache.wicket.markup.repeater.Item;
import org.apache.wicket.model.AbstractReadOnlyModel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.ResourceModel;
-import org.apache.wicket.spring.injection.annot.SpringBean;
@ExtensionPanel("Camel routes")
public class CamelRoutePanel extends AbstractExtensionPanel {
@@ -54,8 +53,7 @@ public class CamelRoutePanel extends AbstractExtensionPanel {
private static final int CAMELROUTE_WIN_WIDTH = 800;
- @SpringBean
- private CamelRouteRestClient restClient;
+ private CamelRouteRestClient restClient = new CamelRouteRestClient();
private ModalWindow editCamelRouteWin;
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/fit/console-reference/pom.xml
----------------------------------------------------------------------
diff --git a/fit/console-reference/pom.xml b/fit/console-reference/pom.xml
index c2785ac..b05bc3d 100644
--- a/fit/console-reference/pom.xml
+++ b/fit/console-reference/pom.xml
@@ -496,7 +496,7 @@ ORYX.Editor.createByUrl = function(modelUrl){"/>
<configuration>
<properties>
<cargo.jvmargs>-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
- -noverify ${javaagent} -Drebel.spring_plugin=true
+ -noverify ${javaagent}
-XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:MaxPermSize=256m</cargo.jvmargs>
</properties>
</configuration>
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/fit/console-reference/src/main/resources/console.properties
----------------------------------------------------------------------
diff --git a/fit/console-reference/src/main/resources/console.properties b/fit/console-reference/src/main/resources/console.properties
index cf20f3c..be99423 100644
--- a/fit/console-reference/src/main/resources/console.properties
+++ b/fit/console-reference/src/main/resources/console.properties
@@ -15,8 +15,17 @@
# specific language governing permissions and limitations
# under the License.
console.directory=${conf.directory}
+
+version=${syncope.version}
+site=${project.parent.url}
+license=${licenseUrl}
+
+anonymousUser=${anonymousUser}
+anonymousKey=${anonymousKey}
+
scheme=http
host=localhost
port=9080
rootPath=/syncope/rest/
+
activitiModelerDirectory=${activiti-modeler.directory}
http://git-wip-us.apache.org/repos/asf/syncope/blob/13f96e06/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index cc202d8..ea9afa3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -411,7 +411,7 @@ under the License.
<cargo.log>${log.directory}/cargo.log</cargo.log>
<cargo.output>${log.directory}/cargo-output.log</cargo.output>
- <tomcat.version>8.0.26</tomcat.version>
+ <tomcat.version>8.0.27</tomcat.version>
<anonymousUser>anonymous</anonymousUser>
<!-- static keys, only used for build: generated overlays will override during archetype:generate -->
@@ -854,17 +854,6 @@ under the License.
</dependency>
<dependency>
<groupId>org.apache.wicket</groupId>
- <artifactId>wicket-spring</artifactId>
- <version>${wicket.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.wicket</groupId>
<artifactId>wicket-auth-roles</artifactId>
<version>${wicket.version}</version>
</dependency>
[17/28] syncope git commit: merge from master
Posted by fm...@apache.org.
merge from master
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/973cd50f
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/973cd50f
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/973cd50f
Branch: refs/heads/master
Commit: 973cd50fe5c8852c6ba087fbbd984e54931ece94
Parents: 13f96e0 73f73f2
Author: fmartelli <fa...@gmail.com>
Authored: Fri Oct 23 12:28:09 2015 +0200
Committer: fmartelli <fa...@gmail.com>
Committed: Fri Oct 23 12:28:09 2015 +0200
----------------------------------------------------------------------
client/cli/pom.xml | 15 +-
.../apache/syncope/client/cli/ArgsManager.java | 50 +++
.../syncope/client/cli/AvailableServices.java | 31 ++
.../org/apache/syncope/client/cli/Command.java | 32 ++
.../syncope/client/cli/CommandClassScanner.java | 29 ++
.../client/cli/ComponentClassScanner.java | 44 ++
.../org/apache/syncope/client/cli/Input.java | 111 +++++
.../syncope/client/cli/ResultManager.java | 25 ++
.../apache/syncope/client/cli/SyncopeAdm.java | 116 ++---
.../syncope/client/cli/SyncopeServices.java | 32 +-
.../client/cli/commands/AbstractCommand.java | 10 +-
.../cli/commands/CommonsResultManager.java | 52 +++
.../cli/commands/ConfigurationCommand.java | 209 ---------
.../client/cli/commands/LoggerCommand.java | 168 -------
.../cli/commands/NotificationCommand.java | 92 ----
.../client/cli/commands/PolicyCommand.java | 105 -----
.../client/cli/commands/ReportCommand.java | 433 +++++++++++++------
.../AbstractConfigurationCommand.java | 30 ++
.../configuration/ConfigurationCommand.java | 120 +++++
.../configuration/ConfigurationDelete.java | 57 +++
.../configuration/ConfigurationExport.java | 71 +++
.../configuration/ConfigurationGet.java | 36 ++
.../configuration/ConfigurationRead.java | 62 +++
.../ConfigurationResultManager.java | 53 +++
.../configuration/ConfigurationUpdate.java | 76 ++++
.../commands/domain/AbstractDomainCommand.java | 30 ++
.../cli/commands/domain/DomainCommand.java | 101 +++++
.../cli/commands/domain/DomainDelete.java | 53 +++
.../client/cli/commands/domain/DomainList.java | 38 ++
.../client/cli/commands/domain/DomainRead.java | 53 +++
.../commands/domain/DomainResultManager.java | 25 ++
.../syncope/client/cli/commands/help/Help.java | 43 ++
.../client/cli/commands/help/HelpCommand.java | 90 ++++
.../cli/commands/help/HelpResultManager.java | 25 ++
.../syncope/client/cli/commands/info/Info.java | 243 +++++++++++
.../client/cli/commands/info/InfoCommand.java | 180 ++++++++
.../cli/commands/info/InfoResultManager.java | 25 ++
.../cli/commands/install/InstallCommand.java | 87 ++++
.../install/InstallConfigFileTemplate.java | 57 +++
.../commands/install/InstallResultManager.java | 90 ++++
.../cli/commands/install/InstallSetup.java | 182 ++++++++
.../commands/logger/AbstractLoggerCommand.java | 30 ++
.../cli/commands/logger/LoggerCommand.java | 127 ++++++
.../cli/commands/logger/LoggerCreate.java | 70 +++
.../cli/commands/logger/LoggerDelete.java | 55 +++
.../client/cli/commands/logger/LoggerList.java | 37 ++
.../client/cli/commands/logger/LoggerRead.java | 62 +++
.../commands/logger/LoggerResultManager.java | 61 +++
.../cli/commands/logger/LoggerUpdate.java | 78 ++++
.../cli/commands/logger/LoggerUpdateAll.java | 69 +++
.../AbstractNotificationCommand.java | 30 ++
.../notification/NotificationCommand.java | 109 +++++
.../notification/NotificationDelete.java | 56 +++
.../commands/notification/NotificationList.java | 35 ++
.../commands/notification/NotificationRead.java | 54 +++
.../notification/NotificationResultManager.java | 25 ++
.../commands/policy/AbstractPolicyCommand.java | 30 ++
.../cli/commands/policy/PolicyCommand.java | 111 +++++
.../cli/commands/policy/PolicyDelete.java | 59 +++
.../client/cli/commands/policy/PolicyList.java | 59 +++
.../client/cli/commands/policy/PolicyRead.java | 58 +++
.../commands/policy/PolicyResultManager.java | 120 +++++
.../commands/schema/AbstractSchemaCommand.java | 30 ++
.../cli/commands/schema/SchemaCommand.java | 127 ++++++
.../cli/commands/schema/SchemaDelete.java | 64 +++
.../client/cli/commands/schema/SchemaList.java | 70 +++
.../cli/commands/schema/SchemaListAll.java | 55 +++
.../cli/commands/schema/SchemaListDerived.java | 40 ++
.../cli/commands/schema/SchemaListPlain.java | 40 ++
.../cli/commands/schema/SchemaListVirtual.java | 40 ++
.../client/cli/commands/schema/SchemaRead.java | 78 ++++
.../commands/schema/SchemaResultManager.java | 96 ++++
.../cli/commands/task/AbstractTaskCommand.java | 30 ++
.../client/cli/commands/task/TaskCommand.java | 140 ++++++
.../client/cli/commands/task/TaskDelete.java | 58 +++
.../client/cli/commands/task/TaskExecute.java | 66 +++
.../cli/commands/task/TaskExecutionDelete.java | 58 +++
.../cli/commands/task/TaskExecutionRead.java | 58 +++
.../client/cli/commands/task/TaskList.java | 59 +++
.../client/cli/commands/task/TaskRead.java | 60 +++
.../cli/commands/task/TaskResultManager.java | 222 ++++++++++
.../cli/commands/task/TaskRunningJobs.java | 34 ++
.../cli/commands/task/TaskScheduledJobs.java | 34 ++
.../syncope/client/cli/messages/Messages.java | 94 ++++
.../syncope/client/cli/messages/Table.java | 194 +++++++++
.../client/cli/messages/TwoColumnTable.java | 262 +++++++++++
.../syncope/client/cli/util/CommandUtils.java | 92 ++++
.../client/cli/util/FileSystemUtils.java | 48 ++
.../syncope/client/cli/util/JasyptUtils.java | 49 +++
.../cli/validators/DebugLevelValidator.java | 60 ---
.../src/main/resources/configuration.properties | 18 +
client/cli/src/main/resources/log4j2.xml | 24 +-
.../cli/src/main/resources/syncope.properties | 19 -
.../client/console/SyncopeConsoleSession.java | 4 +-
.../commons/SortableAnyProviderComparator.java | 2 +-
.../client/console/commons/status/Status.java | 2 +-
.../syncope/client/console/pages/Login.java | 4 +-
.../console/pages/ProvisioningModalPage.java | 2 +-
.../client/console/pages/StatusModalPage.java | 2 +-
.../console/panels/AbstractResourceModal.java | 2 +-
.../console/panels/ResourceSecurityPanel.java | 2 +-
.../console/rest/ConfigurationRestClient.java | 15 +-
.../client/console/topology/Topology.java | 2 +-
.../console/topology/WebSocketBehavior.java | 4 +-
.../wicket/markup/html/form/ActionLink.java | 2 +-
.../provision/ProvisionWizardBuilder.java | 6 +-
.../client/lib/RestClientFactoryBean.java | 34 +-
.../syncope/client/lib/SyncopeClient.java | 12 +-
.../client/lib/SyncopeClientFactoryBean.java | 37 +-
client/old_console/pom.xml | 1 +
.../syncope/common/lib/AnyOperations.java | 26 +-
.../syncope/common/lib/patch/AnyPatch.java | 5 +-
.../org/apache/syncope/common/lib/to/AnyTO.java | 5 +-
.../apache/syncope/common/lib/to/ConfTO.java | 30 --
.../apache/syncope/common/lib/to/MappingTO.java | 9 +
.../syncope/common/lib/to/ProvisionTO.java | 18 +
.../syncope/common/lib/to/VirSchemaTO.java | 20 +
.../syncope/common/lib/types/AnyTypeKind.java | 2 +-
.../common/lib/types/ClientExceptionType.java | 2 +-
.../syncope/common/lib/types/Entitlement.java | 4 +
.../common/lib/types/IntMappingType.java | 2 +-
.../common/lib/types/PropagationByResource.java | 11 +
.../syncope/common/lib/types/TaskType.java | 4 +-
common/rest-api/pom.xml | 17 +-
.../syncope/common/rest/api/Preference.java | 2 +-
.../common/rest/api/service/AnyService.java | 22 +-
.../rest/api/service/AnyTypeClassService.java | 2 +-
.../common/rest/api/service/AnyTypeService.java | 2 +-
.../rest/api/service/ConfigurationService.java | 4 +-
.../rest/api/service/ConnectorService.java | 4 +-
.../common/rest/api/service/DomainService.java | 2 +-
.../common/rest/api/service/GroupService.java | 2 +-
.../common/rest/api/service/LoggerService.java | 2 +-
.../rest/api/service/NotificationService.java | 2 +-
.../common/rest/api/service/PolicyService.java | 11 +-
.../common/rest/api/service/RealmService.java | 2 +-
.../api/service/RelationshipTypeService.java | 2 +-
.../common/rest/api/service/ReportService.java | 2 +-
.../rest/api/service/ResourceService.java | 4 +-
.../common/rest/api/service/RoleService.java | 2 +-
.../common/rest/api/service/SchemaService.java | 14 +-
.../api/service/SecurityQuestionService.java | 2 +-
.../common/rest/api/service/SyncopeService.java | 3 +
.../common/rest/api/service/TaskService.java | 5 +-
.../rest/api/service/UserSelfService.java | 14 +-
.../common/rest/api/service/UserService.java | 12 +-
.../rest/api/service/WorkflowService.java | 2 +-
.../syncope/core/logic/AbstractAnyLogic.java | 2 +-
.../syncope/core/logic/AnyObjectLogic.java | 12 -
.../syncope/core/logic/ConfigurationLogic.java | 16 +-
.../apache/syncope/core/logic/GroupLogic.java | 12 -
.../apache/syncope/core/logic/LoggerLogic.java | 26 ++
.../apache/syncope/core/logic/PolicyLogic.java | 30 +-
.../syncope/core/logic/ResourceLogic.java | 36 +-
.../apache/syncope/core/logic/UserLogic.java | 41 +-
.../syncope/core/logic/init/LoggerLoader.java | 2 +-
.../core/logic/report/StaticReportlet.java | 4 +-
.../core/logic/report/UserReportlet.java | 8 +-
.../apache/syncope/core/misc/DataFormat.java | 117 -----
.../apache/syncope/core/misc/FormatUtils.java | 117 +++++
.../apache/syncope/core/misc/MappingUtils.java | 172 +++-----
.../core/misc/jexl/ClassFreeUberspectImpl.java | 2 +-
.../syncope/core/misc/jexl/JexlUtils.java | 35 +-
.../core/misc/security/AuthDataAccessor.java | 10 +-
.../security/SyncopeAuthenticationProvider.java | 6 +-
.../persistence/api/ImplementationLookup.java | 2 +-
.../core/persistence/api/dao/AnyDAO.java | 2 +-
.../core/persistence/api/dao/AnySearchDAO.java | 10 +-
.../api/dao/ExternalResourceDAO.java | 5 +-
.../core/persistence/api/dao/VirAttrDAO.java | 35 --
.../core/persistence/api/dao/VirSchemaDAO.java | 8 +-
.../core/persistence/api/entity/Any.java | 10 +-
.../core/persistence/api/entity/AnyUtils.java | 6 +-
.../persistence/api/entity/AnyUtilsFactory.java | 2 +-
.../core/persistence/api/entity/Attr.java | 2 +-
.../core/persistence/api/entity/DerAttr.java | 2 +-
.../api/entity/DynGroupMembership.java | 2 +-
.../persistence/api/entity/DynMembership.java | 2 +-
.../api/entity/LinkingMappingItem.java | 140 ++++++
.../core/persistence/api/entity/Membership.java | 2 +-
.../core/persistence/api/entity/PlainAttr.java | 2 +-
.../persistence/api/entity/Relationship.java | 2 +-
.../core/persistence/api/entity/VirAttr.java | 30 --
.../core/persistence/api/entity/VirSchema.java | 13 +
.../api/entity/anyobject/AVirAttr.java | 25 --
.../api/entity/anyobject/AnyObject.java | 2 +-
.../core/persistence/api/entity/conf/Conf.java | 3 +-
.../persistence/api/entity/group/GVirAttr.java | 25 --
.../persistence/api/entity/group/Group.java | 14 +-
.../api/entity/task/PropagationTask.java | 4 +
.../persistence/api/entity/user/UVirAttr.java | 25 --
.../core/persistence/api/entity/user/User.java | 14 +-
.../jpa/content/ContentLoaderHandler.java | 6 +-
.../jpa/content/MultiParentNode.java | 2 +-
.../jpa/content/XMLContentExporter.java | 10 +-
.../persistence/jpa/dao/AbstractAnyDAO.java | 11 +-
.../persistence/jpa/dao/JPAAnySearchDAO.java | 12 +-
.../core/persistence/jpa/dao/JPAConfDAO.java | 28 +-
.../core/persistence/jpa/dao/JPADerAttrDAO.java | 2 +-
.../jpa/dao/JPAExternalResourceDAO.java | 29 +-
.../core/persistence/jpa/dao/JPAGroupDAO.java | 2 +-
.../persistence/jpa/dao/JPAPlainAttrDAO.java | 2 +-
.../jpa/dao/JPAPlainAttrValueDAO.java | 7 +-
.../core/persistence/jpa/dao/JPAVirAttrDAO.java | 86 ----
.../persistence/jpa/dao/JPAVirSchemaDAO.java | 35 +-
.../core/persistence/jpa/dao/SearchSupport.java | 2 +-
.../persistence/jpa/entity/AbstractAny.java | 17 +-
.../persistence/jpa/entity/AbstractAttr.java | 2 +-
.../persistence/jpa/entity/AbstractDerAttr.java | 2 +-
.../jpa/entity/AbstractDynMembership.java | 2 +-
.../persistence/jpa/entity/AbstractExec.java | 4 +-
.../jpa/entity/AbstractPlainAttr.java | 2 +-
.../jpa/entity/AbstractPlainAttrValue.java | 18 +-
.../persistence/jpa/entity/AbstractVirAttr.java | 71 ---
.../jpa/entity/AnnotatedEntityListener.java | 4 +-
.../persistence/jpa/entity/JPAAnyUtils.java | 52 +--
.../jpa/entity/JPAAnyUtilsFactory.java | 2 +-
.../persistence/jpa/entity/JPAConnInstance.java | 9 +-
.../persistence/jpa/entity/JPADerSchema.java | 4 +-
.../jpa/entity/JPAEntityFactory.java | 8 -
.../persistence/jpa/entity/JPANotification.java | 4 +-
.../persistence/jpa/entity/JPAPlainSchema.java | 5 +-
.../persistence/jpa/entity/JPAVirSchema.java | 40 ++
.../anyobject/JPAAPlainAttrUniqueValue.java | 2 +-
.../entity/anyobject/JPAAPlainAttrValue.java | 2 +-
.../jpa/entity/anyobject/JPAAVirAttr.java | 59 ---
.../jpa/entity/anyobject/JPAAnyObject.java | 24 +-
.../entity/conf/JPACPlainAttrUniqueValue.java | 2 +-
.../jpa/entity/conf/JPACPlainAttrValue.java | 2 +-
.../persistence/jpa/entity/conf/JPAConf.java | 21 -
.../entity/group/JPAGPlainAttrUniqueValue.java | 2 +-
.../jpa/entity/group/JPAGPlainAttrValue.java | 2 +-
.../jpa/entity/group/JPAGVirAttr.java | 59 ---
.../persistence/jpa/entity/group/JPAGroup.java | 24 +-
.../entity/resource/JPAExternalResource.java | 16 +-
.../jpa/entity/resource/JPAMapping.java | 27 +-
.../jpa/entity/resource/JPAMappingItem.java | 11 +-
.../jpa/entity/resource/JPAProvision.java | 1 -
.../jpa/entity/task/JPAPropagationTask.java | 12 +
.../entity/user/JPAUPlainAttrUniqueValue.java | 2 +-
.../jpa/entity/user/JPAUPlainAttrValue.java | 2 +-
.../jpa/entity/user/JPAUVirAttr.java | 59 ---
.../persistence/jpa/entity/user/JPAUser.java | 24 +-
.../entity/ExternalResourceValidator.java | 77 +++-
.../jpa/validation/entity/PlainAttrCheck.java | 2 +-
.../validation/entity/PlainAttrValidator.java | 2 +-
.../resources/META-INF/spring-orm-oracle.xml | 25 --
.../resources/META-INF/spring-orm-sqlserver.xml | 25 --
.../src/main/resources/META-INF/spring-orm.xml | 25 --
.../main/resources/domains/MasterContent.xml | 6 +
.../src/main/resources/indexes.xml | 4 -
.../persistence/jpa/inner/AnyObjectTest.java | 5 +
.../persistence/jpa/inner/MultitenancyTest.java | 2 +-
.../persistence/jpa/inner/PlainAttrTest.java | 1 -
.../persistence/jpa/inner/PlainSchemaTest.java | 2 +-
.../persistence/jpa/inner/ResourceTest.java | 46 ++
.../core/persistence/jpa/inner/TaskTest.java | 1 +
.../core/persistence/jpa/inner/VirAttrTest.java | 118 -----
.../persistence/jpa/inner/VirSchemaTest.java | 24 +-
.../persistence/jpa/outer/ResourceTest.java | 15 +-
.../core/persistence/jpa/outer/TaskTest.java | 1 +
.../persistence/jpa/outer/VirSchemaTest.java | 76 ++++
.../test/resources/domains/MasterContent.xml | 37 +-
.../src/test/resources/domains/TwoContent.xml | 6 +
.../core/provisioning/api/Connector.java | 27 +-
.../core/provisioning/api/VirAttrHandler.java | 52 +--
.../api/cache/VirAttrCacheValue.java | 36 +-
.../api/data/ConfigurationDataBinder.java | 4 +-
.../provisioning/api/data/UserDataBinder.java | 2 +
.../api/propagation/PropagationManager.java | 5 +-
.../core/provisioning/api/sync/PushActions.java | 20 +-
.../provisioning/java/ConnectorFacadeProxy.java | 29 +-
.../DefaultAnyObjectProvisioningManager.java | 18 -
.../java/DefaultGroupProvisioningManager.java | 18 -
.../java/DefaultUserProvisioningManager.java | 46 +-
.../provisioning/java/VirAttrHandlerImpl.java | 356 +++------------
.../java/data/AbstractAnyDataBinder.java | 138 +++---
.../java/data/AnyObjectDataBinderImpl.java | 11 +-
.../java/data/ConfigurationDataBinderImpl.java | 21 +-
.../java/data/GroupDataBinderImpl.java | 11 +-
.../java/data/ResourceDataBinderImpl.java | 60 ++-
.../java/data/SchemaDataBinderImpl.java | 34 +-
.../java/data/UserDataBinderImpl.java | 33 +-
.../core/provisioning/java/job/TaskJob.java | 4 +-
.../notification/NotificationManagerImpl.java | 26 +-
.../AbstractPropagationTaskExecutor.java | 89 ++--
.../propagation/PropagationManagerImpl.java | 254 +++++------
.../java/sync/AbstractPushResultHandler.java | 57 +--
.../java/sync/AbstractSyncResultHandler.java | 42 +-
.../java/sync/AbstractSyncopeResultHandler.java | 2 +-
.../sync/AnyObjectPushResultHandlerImpl.java | 4 +-
.../sync/AnyObjectSyncResultHandlerImpl.java | 2 +-
.../java/sync/DefaultPushActions.java | 16 +-
.../java/sync/GroupPushResultHandlerImpl.java | 4 +-
.../java/sync/GroupSyncResultHandlerImpl.java | 2 +-
.../provisioning/java/sync/PushJobDelegate.java | 4 +-
.../provisioning/java/sync/SyncJobDelegate.java | 31 +-
.../core/provisioning/java/sync/SyncUtils.java | 12 +-
.../java/sync/UserPushResultHandlerImpl.java | 6 +-
.../java/sync/UserSyncResultHandlerImpl.java | 2 +-
core/rest-cxf/pom.xml | 311 +++++++------
.../rest/cxf/ThreadLocalCleanupListener.java | 4 +-
.../syncope/core/rest/cxf/WADLServlet.java | 118 +++++
.../rest/cxf/service/AbstractAnyService.java | 9 +-
.../cxf/service/ConfigurationServiceImpl.java | 4 +-
.../rest/cxf/service/LoggerServiceImpl.java | 16 +-
.../rest/cxf/service/PolicyServiceImpl.java | 6 +-
.../rest/cxf/service/SchemaServiceImpl.java | 6 +-
.../core/rest/cxf/service/TaskServiceImpl.java | 4 +-
.../main/resources/META-INF/web-fragment.xml | 12 +
.../src/main/resources/restCXFContext.xml | 42 +-
.../src/main/resources/wadl2html/index.xsl | 6 +-
.../activiti/ActivitiUserWorkflowAdapter.java | 17 +-
.../workflow/activiti/task/PasswordReset.java | 24 +-
.../core/workflow/activiti/task/Update.java | 21 +-
.../core/workflow/api/UserWorkflowAdapter.java | 3 +-
.../java/AbstractUserWorkflowAdapter.java | 9 +-
.../java/DefaultUserWorkflowAdapter.java | 33 +-
deb/core/pom.xml | 6 +
.../client/console/panels/CamelRoutePanel.java | 2 +-
.../console/rest/CamelRouteRestClient.java | 2 +-
.../syncope/common/lib/to/CamelRouteTO.java | 2 +
.../processor/AnyObjectUpdateProcessor.java | 20 -
.../camel/processor/GroupUpdateProcessor.java | 20 -
.../processor/UserConfirmPwdResetProcessor.java | 14 +-
.../UserStatusPropagationProcessor.java | 15 +-
.../processor/UserUpdateInSyncProcessor.java | 6 +-
.../camel/processor/UserUpdateProcessor.java | 26 +-
.../rest/api/service/CamelRouteService.java | 25 +-
.../rest/cxf/service/CamelRouteServiceImpl.java | 3 +-
ext/pom.xml | 1 +
ext/swagger-ui/pom.xml | 107 +++++
.../META-INF/resources/swagger/index.html | 163 +++++++
fit/console-reference/pom.xml | 80 +++-
fit/core-reference/pom.xml | 146 ++++++-
.../core/reference/AuthenticationITCase.java | 24 +-
.../fit/core/reference/CamelRouteITCase.java | 2 +-
.../fit/core/reference/ConfigurationITCase.java | 18 +-
.../syncope/fit/core/reference/GroupITCase.java | 28 +-
.../fit/core/reference/LoggerITCase.java | 16 +
.../fit/core/reference/MultitenancyITCase.java | 2 +-
.../fit/core/reference/PlainSchemaITCase.java | 2 +-
.../core/reference/PropagationTaskITCase.java | 8 -
.../fit/core/reference/ResourceITCase.java | 11 +-
.../fit/core/reference/SyncTaskITCase.java | 61 ++-
.../syncope/fit/core/reference/UserITCase.java | 95 ++--
.../fit/core/reference/UserSelfITCase.java | 10 +-
.../fit/core/reference/VirAttrITCase.java | 333 +++++++-------
.../fit/core/reference/VirSchemaITCase.java | 50 ++-
.../syncope/installer/enums/Containers.java | 2 +-
.../org/apache/syncope/installer/enums/DBs.java | 2 +-
pom.xml | 98 ++---
src/main/asciidoc/docinfo-footer.html | 23 +
src/main/asciidoc/getting-started.adoc | 59 +++
.../getting-started/docinfo-footer.html | 23 -
.../getting-started/getting-started.adoc | 69 ---
.../getting-started/images/architecture.png | Bin 62994 -> 0 bytes
.../getting-started/images/architecture.xml | 20 -
.../images/identityLifecycle.png | Bin 121230 -> 0 bytes
.../asciidoc/getting-started/introduction.adoc | 114 -----
.../getting-started/systemRequirements.adoc | 50 ---
src/main/asciidoc/images/architecture.png | Bin 0 -> 62994 bytes
src/main/asciidoc/images/architecture.xml | 20 +
src/main/asciidoc/images/identityLifecycle.png | Bin 0 -> 121230 bytes
src/main/asciidoc/images/installer1.png | Bin 0 -> 160690 bytes
src/main/asciidoc/images/installer10.png | Bin 0 -> 45440 bytes
src/main/asciidoc/images/installer2.png | Bin 0 -> 53017 bytes
src/main/asciidoc/images/installer3.png | Bin 0 -> 46889 bytes
src/main/asciidoc/images/installer4.png | Bin 0 -> 38073 bytes
src/main/asciidoc/images/installer5.png | Bin 0 -> 48416 bytes
src/main/asciidoc/images/installer6.png | Bin 0 -> 39613 bytes
src/main/asciidoc/images/installer7.png | Bin 0 -> 40130 bytes
src/main/asciidoc/images/installer8.png | Bin 0 -> 41467 bytes
src/main/asciidoc/images/installer9.png | Bin 0 -> 42059 bytes
src/main/asciidoc/introduction.adoc | 114 +++++
src/main/asciidoc/obtain.adoc | 431 ++++++++++++++++++
src/main/asciidoc/reference-guide.adoc | 148 +++++++
.../reference-guide/docinfo-footer.html | 23 -
.../reference-guide/reference-guide.adoc | 148 -------
src/main/asciidoc/systemRequirements.adoc | 51 +++
src/site/xdoc/architecture.xml | 2 +-
381 files changed, 10198 insertions(+), 4432 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/973cd50f/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
----------------------------------------------------------------------
diff --cc client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
index 667b525,93aa39a..fa40d42
--- a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
@@@ -184,15 -201,12 +184,15 @@@ public class SyncopeConsoleSession exte
public <T> T getService(final MediaType mediaType, final Class<T> serviceClass) {
T service;
- synchronized (clientFactory) {
- SyncopeClientFactoryBean.ContentType preType = clientFactory.getContentType();
+ synchronized (SyncopeConsoleApplication.get().getClientFactory()) {
- SyncopeClientFactoryBean.ContentType preType =
- SyncopeConsoleApplication.get().getClientFactory().getContentType();
++ SyncopeClientFactoryBean.ContentType preType = SyncopeConsoleApplication.get().getClientFactory().
++ getContentType();
- clientFactory.setContentType(SyncopeClientFactoryBean.ContentType.fromString(mediaType.toString()));
- service = clientFactory.create(username, password).getService(serviceClass);
- clientFactory.setContentType(preType);
+ SyncopeConsoleApplication.get().getClientFactory().
+ setContentType(SyncopeClientFactoryBean.ContentType.fromString(mediaType.toString()));
+ service = SyncopeConsoleApplication.get().getClientFactory().
+ create(username, password).getService(serviceClass);
+ SyncopeConsoleApplication.get().getClientFactory().setContentType(preType);
}
return service;
http://git-wip-us.apache.org/repos/asf/syncope/blob/973cd50f/client/console/src/main/java/org/apache/syncope/client/console/pages/Login.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/973cd50f/client/console/src/main/java/org/apache/syncope/client/console/pages/ProvisioningModalPage.java
----------------------------------------------------------------------
diff --cc client/console/src/main/java/org/apache/syncope/client/console/pages/ProvisioningModalPage.java
index 847bd61,c66d650..b5850ad
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/ProvisioningModalPage.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/ProvisioningModalPage.java
@@@ -190,8 -187,8 +190,8 @@@ public class ProvisioningModalPage<T ex
private static final long serialVersionUID = 4287357360778016173L;
- public StatusBeanProvider() {
+ StatusBeanProvider() {
- super("accountLink");
+ super("connObjectLink");
}
@SuppressWarnings("unchecked")
http://git-wip-us.apache.org/repos/asf/syncope/blob/973cd50f/client/console/src/main/java/org/apache/syncope/client/console/pages/StatusModalPage.java
----------------------------------------------------------------------
diff --cc client/console/src/main/java/org/apache/syncope/client/console/pages/StatusModalPage.java
index 7dbe73e,238f13d..4f5e27a
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/StatusModalPage.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/StatusModalPage.java
@@@ -489,8 -486,8 +489,8 @@@ public class StatusModalPage<T extends
private static final long serialVersionUID = 4586969457669796621L;
- public AttributableStatusProvider() {
+ AttributableStatusProvider() {
- super(statusOnly ? "resourceName" : "accountLink");
+ super(statusOnly ? "resourceName" : "connObjectLink");
}
@SuppressWarnings("unchecked")
http://git-wip-us.apache.org/repos/asf/syncope/blob/973cd50f/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractResourceModal.java
----------------------------------------------------------------------
diff --cc client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractResourceModal.java
index 15f4f02,1ed9050..21568eb
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractResourceModal.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractResourceModal.java
@@@ -38,46 -31,8 +38,46 @@@ public abstract class AbstractResourceM
private static final long serialVersionUID = 1734415311027284221L;
- public AbstractResourceModal(final ModalWindow window, final PageReference pageRef) {
- super(window, pageRef);
+ protected final List<ITab> tabs;
+
+ public AbstractResourceModal(final BaseModal<?> modal, final PageReference pageRef) {
+ super(modal, pageRef);
+
+ this.tabs = new ArrayList<>();
+ add(new AjaxBootstrapTabbedPanel<ITab>("tabbedPanel", tabs));
+ }
+
+ private class AjaxBootstrapTabbedPanel<T extends ITab>
+ extends de.agilecoders.wicket.core.markup.html.bootstrap.tabs.AjaxBootstrapTabbedPanel<T> {
+
+ private static final long serialVersionUID = 1L;
+
- public AjaxBootstrapTabbedPanel(final String id, final List<T> tabs) {
++ AjaxBootstrapTabbedPanel(final String id, final List<T> tabs) {
+ super(id, tabs);
+ }
+
+ @Override
+ protected WebMarkupContainer newLink(final String linkId, final int index) {
+ return new AjaxSubmitLink(linkId) {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ setSelectedTab(index);
+ if (target != null) {
+ target.add(AjaxBootstrapTabbedPanel.this);
+ }
+ onAjaxUpdate(target);
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+ modal.getFeedbackPanel().refresh(target);
+ }
+ };
+ }
+
}
public static class CreateEvent extends ModalEvent {
http://git-wip-us.apache.org/repos/asf/syncope/blob/973cd50f/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceSecurityPanel.java
----------------------------------------------------------------------
diff --cc client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceSecurityPanel.java
index 37cf8ac,89b856a..4d90788
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceSecurityPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceSecurityPanel.java
@@@ -150,9 -155,9 +150,9 @@@ public class ResourceSecurityPanel exte
private static final long serialVersionUID = 8060500161321947000L;
- private PolicyType type;
+ private final PolicyType type;
- public PolicyRenderer(final PolicyType type) {
+ PolicyRenderer(final PolicyType type) {
super();
this.type = type;
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/973cd50f/client/console/src/main/java/org/apache/syncope/client/console/topology/Topology.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/973cd50f/client/console/src/main/java/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/973cd50f/client/old_console/pom.xml
----------------------------------------------------------------------
diff --cc client/old_console/pom.xml
index ac9f17b,ac9f17b..a49170a
--- a/client/old_console/pom.xml
+++ b/client/old_console/pom.xml
@@@ -65,6 -65,6 +65,7 @@@ under the License
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-spring</artifactId>
++ <version>7.0.0</version>
<!-- exclude spring framework that wicket pulls in -->
<exclusions>
<exclusion>
http://git-wip-us.apache.org/repos/asf/syncope/blob/973cd50f/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/UserDataBinderImpl.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/973cd50f/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/panels/CamelRoutePanel.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/973cd50f/pom.xml
----------------------------------------------------------------------
[08/28] syncope git commit: Merge branch 'master' into SYNCOPE-156
Posted by fm...@apache.org.
Merge branch 'master' into SYNCOPE-156
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/ddd7ce34
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/ddd7ce34
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/ddd7ce34
Branch: refs/heads/master
Commit: ddd7ce346e3f7306a5141cb05f9e1515321614ad
Parents: b56c08e a46f83a
Author: fmartelli <fa...@gmail.com>
Authored: Tue Sep 29 15:51:47 2015 +0200
Committer: fmartelli <fa...@gmail.com>
Committed: Tue Sep 29 15:51:47 2015 +0200
----------------------------------------------------------------------
pom.xml | 17 +-
.../getting-started/docinfo-footer.html | 23 ++
.../getting-started/getting-started.adoc | 14 +-
.../reference-guide/docinfo-footer.html | 23 ++
.../reference-guide/reference-guide.adoc | 74 ++++-
src/main/asciidoc/syncope-theme.yml | 276 +++++++++++++++++++
6 files changed, 408 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/ddd7ce34/pom.xml
----------------------------------------------------------------------
[21/28] syncope git commit: Attempting again to succeed with Travis CI
Posted by fm...@apache.org.
Attempting again to succeed with Travis CI
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/ee7ca343
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/ee7ca343
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/ee7ca343
Branch: refs/heads/master
Commit: ee7ca34319467b440b6f28104be55da7db215da4
Parents: 0362480
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Mon Oct 26 13:55:18 2015 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Mon Oct 26 13:55:18 2015 +0100
----------------------------------------------------------------------
.travis.yml | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/ee7ca343/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 044d84d..44db5db 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+sudo: false
cache:
directories:
- $HOME/.m2
@@ -21,10 +22,10 @@ jdk:
- openjdk7
# default install is mvn install --quiet -DskipTests=true
install: mvn --show-version --quiet -P all,skipTests
-#invoker.streamLogs: we cannot access to log files through Travis web ui, so display everything in the console
script:
- - sudo rm /etc/mavenrc
- - export MAVEN_OPTS="-Xmx2469m -XX:MaxPermSize=512m -XX:+TieredCompilation -XX:TieredStopAtLevel=1"
+# - sudo rm /etc/mavenrc
+# - export MAVEN_OPTS="-Xmx2469m -XX:MaxPermSize=512m -XX:+TieredCompilation -XX:TieredStopAtLevel=1"
+ #invoker.streamLogs: we cannot access to log files through Travis web ui, so display everything in the console
- mvn --show-version --quiet clean install -Dinvoker.streamLogs=true
notifications:
email:
[23/28] syncope git commit: Merge branch 'master' into SYNCOPE-156
Posted by fm...@apache.org.
Merge branch 'master' into SYNCOPE-156
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/4c30ca70
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/4c30ca70
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/4c30ca70
Branch: refs/heads/master
Commit: 4c30ca705382bfc26b09c1675941ac28f5f7ddfc
Parents: 77fc5d2 d43268c
Author: fmartelli <fa...@gmail.com>
Authored: Fri Oct 30 11:39:15 2015 +0100
Committer: fmartelli <fa...@gmail.com>
Committed: Fri Oct 30 11:39:15 2015 +0100
----------------------------------------------------------------------
.../cli/commands/CommonsResultManager.java | 13 ++
.../commands/connector/ConnectorCommand.java | 5 +
.../commands/connector/ConnectorDetails.java | 76 ++++++++++
.../connector/ConnectorResultManager.java | 7 +-
.../cli/commands/domain/DomainCommand.java | 5 +
.../cli/commands/domain/DomainDetails.java | 50 +++++++
.../commands/domain/DomainResultManager.java | 5 +
.../cli/commands/logger/LoggerCommand.java | 5 +
.../cli/commands/logger/LoggerDetails.java | 93 +++++++++++++
.../commands/logger/LoggerResultManager.java | 5 +
.../commands/notification/NotificationList.java | 5 +-
.../commands/notification/NotificationRead.java | 2 +-
.../notification/NotificationResultManager.java | 23 ++++
.../cli/commands/policy/PolicyCommand.java | 5 +
.../cli/commands/policy/PolicyDetails.java | 60 ++++++++
.../client/cli/commands/policy/PolicyList.java | 1 -
.../commands/policy/PolicyResultManager.java | 5 +
.../client/cli/commands/realm/RealmCommand.java | 5 +
.../client/cli/commands/realm/RealmDetails.java | 49 +++++++
.../cli/commands/realm/RealmResultManager.java | 5 +
.../cli/commands/report/ReportCommand.java | 5 +
.../cli/commands/report/ReportDetails.java | 59 ++++++++
.../client/cli/commands/report/ReportList.java | 4 +-
.../client/cli/commands/report/ReportRead.java | 2 +-
.../commands/report/ReportResultManager.java | 9 +-
.../cli/commands/resource/ResourceCommand.java | 5 +
.../cli/commands/resource/ResourceDetails.java | 52 +++++++
.../resource/ResourceResultManager.java | 8 ++
.../client/cli/commands/role/RoleCommand.java | 5 +
.../client/cli/commands/role/RoleDetails.java | 59 ++++++++
.../cli/commands/role/RoleResultManager.java | 5 +
.../cli/commands/schema/SchemaCommand.java | 5 +
.../cli/commands/schema/SchemaDetails.java | 58 ++++++++
.../commands/schema/SchemaResultManager.java | 5 +
.../client/cli/commands/task/TaskCommand.java | 5 +
.../client/cli/commands/task/TaskDetails.java | 137 +++++++++++++++++++
.../client/cli/commands/task/TaskList.java | 3 +-
.../cli/commands/task/TaskResultManager.java | 35 +++--
.../commands/task/TaskSyncopeOperations.java | 5 +-
.../client/cli/commands/user/UserCommand.java | 8 +-
.../client/cli/commands/user/UserCount.java | 45 ------
.../client/cli/commands/user/UserDetails.java | 73 ++++++++++
.../cli/commands/user/UserResultManager.java | 5 +
.../commands/user/UserSyncopeOperations.java | 4 -
.../apache/syncope/client/cli/view/Table.java | 2 +
45 files changed, 941 insertions(+), 86 deletions(-)
----------------------------------------------------------------------