You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2016/01/14 11:49:11 UTC
syncope git commit: [SYNCOPE-156] Fixing XMLEditorPopupPage
Repository: syncope
Updated Branches:
refs/heads/master c486bc15e -> a30719c78
[SYNCOPE-156] Fixing XMLEditorPopupPage
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/a30719c7
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/a30719c7
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/a30719c7
Branch: refs/heads/master
Commit: a30719c78d605ba136e15a3c17596fd1cc580d6b
Parents: c486bc1
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Thu Jan 14 11:49:03 2016 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Thu Jan 14 11:49:03 2016 +0100
----------------------------------------------------------------------
.../commons/NotificationAwareComponent.java | 1 +
.../client/console/pages/AbstractBasePage.java | 74 --------------------
.../syncope/client/console/pages/BasePage.java | 39 +++++++++--
.../client/console/pages/BasePopupPage.java | 2 +-
.../client/console/pages/SecurityQuestions.java | 2 +-
.../console/pages/XMLEditorPopupPage.java | 6 +-
.../console/panels/AbstractLogsPanel.java | 4 +-
.../panels/AbstractSearchResultPanel.java | 6 +-
.../console/panels/AjaxDataTablePanel.java | 3 +-
.../console/panels/AnyTypeClassesPanel.java | 4 +-
.../client/console/panels/AnyTypePanel.java | 6 +-
.../console/panels/GroupSearchResultPanel.java | 8 +--
.../console/panels/RoleSearchResultPanel.java | 8 +--
.../client/console/panels/SchemaTypePanel.java | 4 +-
.../console/panels/SecurityQuestionsPanel.java | 10 +--
.../console/panels/UserSearchResultPanel.java | 23 +++---
.../console/topology/TopologyNodePanel.java | 5 +-
.../console/pages/XMLEditorPopupPage.html | 8 +--
.../console/pages/CamelRouteModalPage.java | 5 +-
.../console/rest/CamelRouteRestClient.java | 9 +--
20 files changed, 86 insertions(+), 141 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/a30719c7/client/console/src/main/java/org/apache/syncope/client/console/commons/NotificationAwareComponent.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/NotificationAwareComponent.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/NotificationAwareComponent.java
index d674b2a..9a7847f 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/commons/NotificationAwareComponent.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/NotificationAwareComponent.java
@@ -21,5 +21,6 @@ package org.apache.syncope.client.console.commons;
import org.apache.syncope.client.console.panels.NotificationPanel;
public interface NotificationAwareComponent {
+
NotificationPanel getNotificationPanel();
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/a30719c7/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
deleted file mode 100644
index 2075346..0000000
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/AbstractBasePage.java
+++ /dev/null
@@ -1,74 +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.syncope.client.console.commons.NotificationAwareComponent;
-import org.apache.syncope.client.console.panels.NotificationPanel;
-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.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AbstractBasePage extends WebPage implements NotificationAwareComponent {
-
- private static final long serialVersionUID = 8611724965544132636L;
-
- protected static final Logger LOG = LoggerFactory.getLogger(AbstractBasePage.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";
-
- protected final HeaderItem meta = new MetaHeaderItem("X-UA-Compatible", "IE=edge");
-
- protected NotificationPanel notificationPanel;
-
- /**
- * Response flag set by the Modal Window after the operation is completed.
- */
- protected boolean modalResult = false;
-
- public AbstractBasePage() {
- this(null);
- }
-
- public AbstractBasePage(final PageParameters parameters) {
- super(parameters);
-
- }
-
- @Override
- public void renderHead(final IHeaderResponse response) {
- super.renderHead(response);
- response.render(new PriorityHeaderItem(meta));
- }
-
- @Override
- public NotificationPanel getNotificationPanel() {
- return notificationPanel;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/a30719c7/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 c4f4f13..a684735 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
@@ -21,9 +21,11 @@ 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.commons.NotificationAwareComponent;
import org.apache.syncope.client.console.panels.NotificationPanel;
import org.apache.syncope.client.console.rest.UserWorkflowRestClient;
import org.apache.syncope.client.console.topology.Topology;
+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.syncope.common.lib.types.StandardEntitlement;
import org.apache.wicket.Component;
@@ -34,16 +36,35 @@ import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDa
import org.apache.wicket.behavior.Behavior;
import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
import org.apache.wicket.markup.ComponentTag;
+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.WebMarkupContainer;
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.slf4j.Logger;
+import org.slf4j.LoggerFactory;
-public class BasePage extends AbstractBasePage implements IAjaxIndicatorAware {
+public class BasePage extends WebPage implements NotificationAwareComponent, IAjaxIndicatorAware {
private static final long serialVersionUID = 1571997737305598502L;
+ protected static final Logger LOG = LoggerFactory.getLogger(BasePage.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";
+
+ protected final HeaderItem meta = new MetaHeaderItem("X-UA-Compatible", "IE=edge");
+
+ protected NotificationPanel notificationPanel;
+
private final UserWorkflowRestClient userWorkflowRestClient = new UserWorkflowRestClient();
public BasePage() {
@@ -196,6 +217,17 @@ public class BasePage extends AbstractBasePage implements IAjaxIndicatorAware {
}
}
+ @Override
+ public void renderHead(final IHeaderResponse response) {
+ super.renderHead(response);
+ response.render(new PriorityHeaderItem(meta));
+ }
+
+ @Override
+ public NotificationPanel getNotificationPanel() {
+ return notificationPanel;
+ }
+
private String getLIContainerId(final String linkId) {
return linkId + "LI";
}
@@ -225,11 +257,6 @@ public class BasePage extends AbstractBasePage implements IAjaxIndicatorAware {
if (container != null) {
target.add(container);
}
-
-// if (isModalResult()) {
-// notification.success(target, getString(Constants.OPERATION_SUCCEEDED));
-// setModalResult(false);
-// }
}
});
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/a30719c7/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePopupPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePopupPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePopupPage.java
index 856f469..1df5fec 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePopupPage.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePopupPage.java
@@ -18,7 +18,7 @@
*/
package org.apache.syncope.client.console.pages;
-public class BasePopupPage extends AbstractBasePage {
+public class BasePopupPage extends BasePage {
private static final long serialVersionUID = -2633667311332659505L;
http://git-wip-us.apache.org/repos/asf/syncope/blob/a30719c7/client/console/src/main/java/org/apache/syncope/client/console/pages/SecurityQuestions.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/SecurityQuestions.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/SecurityQuestions.java
index 83686bc..2247b35 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/SecurityQuestions.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/SecurityQuestions.java
@@ -63,7 +63,7 @@ public class SecurityQuestions extends BasePage {
target.add(securityQuestionsPanel);
modal.show(false);
- ((AbstractBasePage) getPage()).getNotificationPanel().refresh(target);
+ ((BasePage) getPage()).getNotificationPanel().refresh(target);
}
}
);
http://git-wip-us.apache.org/repos/asf/syncope/blob/a30719c7/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 a885c0c..b8b505c 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
@@ -54,16 +54,14 @@ public class XMLEditorPopupPage extends BasePopupPage {
final TextArea<String> workflowDefArea = new TextArea<>("workflowDefArea", new Model<>(definition));
wfForm.add(workflowDefArea);
- AjaxButton submit =
- new IndicatingAjaxButton(APPLY, new Model<>(getString(SUBMIT))) {
+ 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) {
try {
- wfRestClient.updateDefinition(
- MediaType.APPLICATION_XML_TYPE, workflowDefArea.getModelObject());
+ wfRestClient.updateDefinition(MediaType.APPLICATION_XML_TYPE, workflowDefArea.getModelObject());
info(getString(Constants.OPERATION_SUCCEEDED));
} catch (SyncopeClientException scee) {
error(getString(Constants.ERROR) + ": " + scee.getMessage());
http://git-wip-us.apache.org/repos/asf/syncope/blob/a30719c7/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractLogsPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractLogsPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractLogsPanel.java
index 627e75d..720ba44 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractLogsPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractLogsPanel.java
@@ -21,7 +21,7 @@ package org.apache.syncope.client.console.panels;
import java.util.Arrays;
import java.util.List;
import org.apache.syncope.client.console.commons.Constants;
-import org.apache.syncope.client.console.pages.AbstractBasePage;
+import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
import org.apache.syncope.common.lib.AbstractBaseBean;
import org.apache.syncope.common.lib.SyncopeClientException;
@@ -81,7 +81,7 @@ public abstract class AbstractLogsPanel<T extends AbstractBaseBean> extends Pane
LOG.error("Error updating the logger level", e);
error(getString(Constants.OPERATION_ERROR + e.getMessage()));
}
- ((AbstractBasePage) getPage()).getNotificationPanel().refresh(target);
+ ((BasePage) getPage()).getNotificationPanel().refresh(target);
}
});
return loggerTOs;
http://git-wip-us.apache.org/repos/asf/syncope/blob/a30719c7/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 9da22a5..0c21416 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
@@ -24,7 +24,7 @@ import java.util.List;
import org.apache.syncope.client.console.PreferenceManager;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.commons.SearchableDataProvider;
-import org.apache.syncope.client.console.pages.AbstractBasePage;
+import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.rest.BaseRestClient;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
@@ -89,7 +89,7 @@ public abstract class AbstractSearchResultPanel<
/**
* Owner page.
*/
- protected final AbstractBasePage page;
+ protected final BasePage page;
protected AbstractSearchResultPanel(final String id, final Builder<T, W, E> builder) {
@@ -97,7 +97,7 @@ public abstract class AbstractSearchResultPanel<
setOutputMarkupId(true);
- this.page = (AbstractBasePage) builder.getPageRef().getPage();
+ this.page = (BasePage) builder.getPageRef().getPage();
this.filtered = builder.filtered;
this.checkBoxEnabled = builder.checkBoxEnabled;
http://git-wip-us.apache.org/repos/asf/syncope/blob/a30719c7/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 3cd283d..58194d2 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,7 +25,6 @@ import java.util.List;
import org.apache.syncope.client.console.rest.BaseRestClient;
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.pages.BasePage;
import org.apache.syncope.client.console.wicket.ajax.form.IndicatorAjaxFormChoiceComponentUpdatingBehavior;
import org.apache.syncope.client.console.pages.BulkActionModalPage;
@@ -160,7 +159,7 @@ public final class AjaxDataTablePanel<T extends Serializable, S> extends DataTab
send(builder.pageRef.getPage(), Broadcast.BREADTH, data);
- final AbstractBasePage page = (AbstractBasePage) builder.pageRef.getPage();
+ final BasePage page = (BasePage) builder.pageRef.getPage();
((BasePage) getPage()).getNotificationPanel().refresh(target);
}
});
http://git-wip-us.apache.org/repos/asf/syncope/blob/a30719c7/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypeClassesPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypeClassesPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypeClassesPanel.java
index a079462..382958a 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypeClassesPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypeClassesPanel.java
@@ -31,7 +31,7 @@ import org.apache.syncope.client.console.SyncopeConsoleSession;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.commons.SearchableDataProvider;
import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
-import org.apache.syncope.client.console.pages.AbstractBasePage;
+import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.rest.BaseRestClient;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
@@ -227,7 +227,7 @@ public class AnyTypeClassesPanel extends AbstractTypesPanel<AnyTypeClassTO, AnyT
LOG.error("While deleting AnyTypeClassTO", e);
error(getString(Constants.ERROR) + ": " + e.getMessage());
}
- ((AbstractBasePage) getPage()).getNotificationPanel().refresh(target);
+ ((BasePage) getPage()).getNotificationPanel().refresh(target);
}
}, ActionLink.ActionType.DELETE, StandardEntitlement.ANYTYPECLASS_DELETE);
http://git-wip-us.apache.org/repos/asf/syncope/blob/a30719c7/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypePanel.java
index a89e469..85cac81 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypePanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypePanel.java
@@ -34,7 +34,7 @@ import org.apache.syncope.client.console.SyncopeConsoleSession;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.commons.SearchableDataProvider;
import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
-import org.apache.syncope.client.console.pages.AbstractBasePage;
+import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.panels.AnyTypePanel.AnyTypeProvider;
import org.apache.syncope.client.console.rest.BaseRestClient;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
@@ -213,7 +213,7 @@ public class AnyTypePanel extends AbstractTypesPanel<AnyTypeTO, AnyTypeProvider>
@Override
public void onClick(final AjaxRequestTarget target, final Serializable ignore) {
send(AnyTypePanel.this, Broadcast.EXACT,
- new AjaxWizard.EditItemActionEvent<AnyTypeTO>(model.getObject(), target));
+ new AjaxWizard.EditItemActionEvent<>(model.getObject(), target));
}
}, ActionLink.ActionType.EDIT, StandardEntitlement.ANYTYPE_UPDATE).addWithRoles(
new ActionLink<Serializable>() {
@@ -231,7 +231,7 @@ public class AnyTypePanel extends AbstractTypesPanel<AnyTypeTO, AnyTypeProvider>
LOG.error("While deleting AnyTypeTO", e);
error(getString(Constants.ERROR) + ": " + e.getMessage());
}
- ((AbstractBasePage) getPage()).getNotificationPanel().refresh(target);
+ ((BasePage) getPage()).getNotificationPanel().refresh(target);
}
}, ActionLink.ActionType.DELETE, StandardEntitlement.ANYTYPE_DELETE);
http://git-wip-us.apache.org/repos/asf/syncope/blob/a30719c7/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 762878b..b8917b3 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,7 +26,7 @@ import java.util.Date;
import java.util.List;
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.pages.BasePage;
import org.apache.syncope.client.console.pages.GroupDisplayAttributesModalPage;
import org.apache.syncope.client.console.rest.AbstractAnyRestClient;
import org.apache.syncope.client.console.rest.GroupRestClient;
@@ -118,7 +118,7 @@ public class GroupSearchResultPanel extends AnySearchResultPanel<GroupTO> {
@Override
public void onClick(final AjaxRequestTarget target, final GroupTO ignore) {
send(GroupSearchResultPanel.this, Broadcast.EXACT,
- new AjaxWizard.EditItemActionEvent<GroupHandler>(
+ new AjaxWizard.EditItemActionEvent<>(
new GroupHandler(new GroupRestClient().read(model.getObject().getKey())),
target));
}
@@ -131,7 +131,7 @@ public class GroupSearchResultPanel extends AnySearchResultPanel<GroupTO> {
final GroupTO clone = SerializationUtils.clone(model.getObject());
clone.setKey(0L);
send(GroupSearchResultPanel.this, Broadcast.EXACT,
- new AjaxWizard.NewItemActionEvent<GroupHandler>(new GroupHandler(clone), target));
+ new AjaxWizard.NewItemActionEvent<>(new GroupHandler(clone), target));
}
}, ActionLink.ActionType.CLONE, StandardEntitlement.GROUP_CREATE).add(new ActionLink<GroupTO>() {
@@ -147,7 +147,7 @@ public class GroupSearchResultPanel extends AnySearchResultPanel<GroupTO> {
error(getString(Constants.ERROR) + ": " + e.getMessage());
LOG.error("While deleting object {}", model.getObject().getKey(), e);
}
- ((AbstractBasePage) getPage()).getNotificationPanel().refresh(target);
+ ((BasePage) getPage()).getNotificationPanel().refresh(target);
}
}, ActionLink.ActionType.DELETE, StandardEntitlement.GROUP_DELETE);
http://git-wip-us.apache.org/repos/asf/syncope/blob/a30719c7/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleSearchResultPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleSearchResultPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleSearchResultPanel.java
index b091a4b..2a2c11d 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleSearchResultPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleSearchResultPanel.java
@@ -25,7 +25,7 @@ import java.util.List;
import org.apache.commons.lang3.SerializationUtils;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.commons.RoleDataProvider;
-import org.apache.syncope.client.console.pages.AbstractBasePage;
+import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.rest.RoleRestClient;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
@@ -96,7 +96,7 @@ public class RoleSearchResultPanel
@Override
public void onClick(final AjaxRequestTarget target, final RoleTO ignore) {
send(RoleSearchResultPanel.this, Broadcast.EXACT,
- new AjaxWizard.EditItemActionEvent<RoleHandler>(
+ new AjaxWizard.EditItemActionEvent<>(
new RoleHandler(new RoleRestClient().read(model.getObject().getKey())),
target));
}
@@ -109,7 +109,7 @@ public class RoleSearchResultPanel
final RoleTO clone = SerializationUtils.clone(model.getObject());
clone.setKey(null);
send(RoleSearchResultPanel.this, Broadcast.EXACT,
- new AjaxWizard.NewItemActionEvent<RoleHandler>(new RoleHandler(clone), target));
+ new AjaxWizard.NewItemActionEvent<>(new RoleHandler(clone), target));
}
}, ActionLink.ActionType.CLONE, StandardEntitlement.ROLE_CREATE).add(new ActionLink<RoleTO>() {
@@ -125,7 +125,7 @@ public class RoleSearchResultPanel
error(getString(Constants.ERROR) + ": " + e.getMessage());
LOG.error("While deleting object {}", model.getObject().getKey(), e);
}
- ((AbstractBasePage) getPage()).getNotificationPanel().refresh(target);
+ ((BasePage) getPage()).getNotificationPanel().refresh(target);
}
}, ActionLink.ActionType.DELETE, StandardEntitlement.ROLE_DELETE);
http://git-wip-us.apache.org/repos/asf/syncope/blob/a30719c7/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemaTypePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemaTypePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemaTypePanel.java
index dba3087..97ab195 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemaTypePanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemaTypePanel.java
@@ -35,7 +35,7 @@ import org.apache.syncope.client.console.SyncopeConsoleSession;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.commons.SearchableDataProvider;
import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
-import org.apache.syncope.client.console.pages.AbstractBasePage;
+import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.panels.SchemaTypePanel.SchemaProvider;
import org.apache.syncope.client.console.rest.BaseRestClient;
import org.apache.syncope.client.console.rest.SchemaRestClient;
@@ -289,7 +289,7 @@ public class SchemaTypePanel extends AbstractTypesPanel<AbstractSchemaTO, Schema
} catch (Exception e) {
error(getString(Constants.ERROR) + ": " + e.getMessage());
}
- ((AbstractBasePage) getPage()).getNotificationPanel().refresh(target);
+ ((BasePage) getPage()).getNotificationPanel().refresh(target);
}
}, ActionLink.ActionType.DELETE, StandardEntitlement.SCHEMA_DELETE);
http://git-wip-us.apache.org/repos/asf/syncope/blob/a30719c7/client/console/src/main/java/org/apache/syncope/client/console/panels/SecurityQuestionsPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/SecurityQuestionsPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/SecurityQuestionsPanel.java
index e4ec8dd..0fe8bdd 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/SecurityQuestionsPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/SecurityQuestionsPanel.java
@@ -34,7 +34,7 @@ import org.apache.syncope.client.console.SyncopeConsoleSession;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.commons.SearchableDataProvider;
import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
-import org.apache.syncope.client.console.pages.AbstractBasePage;
+import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.panels.SecurityQuestionsPanel.SecurityQuestionsProvider;
import org.apache.syncope.client.console.rest.BaseRestClient;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
@@ -190,8 +190,8 @@ public class SecurityQuestionsPanel extends AbstractSearchResultPanel<
final SecurityQuestionTO securityQuestionTO = model.getObject();
- final ActionLinksPanel.Builder<Serializable> actionLinks
- = ActionLinksPanel.builder(page.getPageReference());
+ final ActionLinksPanel.Builder<Serializable> actionLinks =
+ ActionLinksPanel.builder(page.getPageReference());
actionLinks.setDisableIndicator(true);
actionLinks
.addWithRoles(new ActionLink<Serializable>() {
@@ -201,7 +201,7 @@ public class SecurityQuestionsPanel extends AbstractSearchResultPanel<
@Override
public void onClick(final AjaxRequestTarget target, final Serializable ignore) {
send(SecurityQuestionsPanel.this, Broadcast.EXACT,
- new AjaxWizard.EditItemActionEvent<SecurityQuestionTO>(
+ new AjaxWizard.EditItemActionEvent<>(
model.getObject(), target));
}
}, ActionLink.ActionType.EDIT, StandardEntitlement.SECURITY_QUESTION_UPDATE)
@@ -220,7 +220,7 @@ public class SecurityQuestionsPanel extends AbstractSearchResultPanel<
LOG.error("While deleting SecutiryQuestionTO", e);
error(getString(Constants.ERROR) + ": " + e.getMessage());
}
- ((AbstractBasePage) getPage()).getNotificationPanel().refresh(target);
+ ((BasePage) getPage()).getNotificationPanel().refresh(target);
}
}, ActionLink.ActionType.DELETE, StandardEntitlement.SECURITY_QUESTION_DELETE);
http://git-wip-us.apache.org/repos/asf/syncope/blob/a30719c7/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 e1625f5..25db807 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
@@ -26,7 +26,7 @@ import java.util.Date;
import java.util.List;
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.pages.BasePage;
import org.apache.syncope.client.console.pages.StatusModal;
import org.apache.syncope.client.console.pages.UserDisplayAttributesModalPage;
import org.apache.syncope.client.console.rest.AbstractAnyRestClient;
@@ -121,15 +121,15 @@ public class UserSearchResultPanel extends AnySearchResultPanel<UserTO> {
@Override
public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
- final IModel<AnyHandler<UserTO>> formModel
- = new CompoundPropertyModel<>(new AnyHandler<UserTO>(model.getObject()));
+ final IModel<AnyHandler<UserTO>> formModel =
+ new CompoundPropertyModel<>(new AnyHandler<>(model.getObject()));
modal.setFormModel(formModel);
target.add(modal.setContent(new StatusModal<>(
modal, page.getPageReference(), formModel.getObject().getInnerObject())));
modal.header(new Model<>(
- getString("any.edit", new Model<>(new AnyHandler<UserTO>(model.getObject())))));
+ getString("any.edit", new Model<>(new AnyHandler<>(model.getObject())))));
modal.show(true);
}
@@ -139,15 +139,15 @@ public class UserSearchResultPanel extends AnySearchResultPanel<UserTO> {
@Override
public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
- final IModel<AnyHandler<UserTO>> formModel
- = new CompoundPropertyModel<>(new AnyHandler<UserTO>(model.getObject()));
+ final IModel<AnyHandler<UserTO>> formModel =
+ new CompoundPropertyModel<>(new AnyHandler<>(model.getObject()));
modal.setFormModel(formModel);
target.add(modal.setContent(new StatusModal<>(
modal, page.getPageReference(), formModel.getObject().getInnerObject(), true)));
modal.header(new Model<>(
- getString("any.edit", new Model<>(new AnyHandler<UserTO>(model.getObject())))));
+ getString("any.edit", new Model<>(new AnyHandler<>(model.getObject())))));
modal.show(true);
}
@@ -158,8 +158,8 @@ public class UserSearchResultPanel extends AnySearchResultPanel<UserTO> {
@Override
public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
send(UserSearchResultPanel.this, Broadcast.EXACT,
- new AjaxWizard.EditItemActionEvent<AnyHandler<UserTO>>(
- new AnyHandler<UserTO>(new UserRestClient().read(model.getObject().getKey())),
+ new AjaxWizard.EditItemActionEvent<>(
+ new AnyHandler<>(new UserRestClient().read(model.getObject().getKey())),
target));
}
}, ActionLink.ActionType.EDIT, StandardEntitlement.USER_READ).add(new ActionLink<UserTO>() {
@@ -171,8 +171,7 @@ public class UserSearchResultPanel extends AnySearchResultPanel<UserTO> {
final UserTO clone = SerializationUtils.clone(model.getObject());
clone.setKey(0L);
send(UserSearchResultPanel.this, Broadcast.EXACT,
- new AjaxWizard.NewItemActionEvent<AnyHandler<UserTO>>(
- new AnyHandler<UserTO>(clone), target));
+ new AjaxWizard.NewItemActionEvent<>(new AnyHandler<>(clone), target));
}
}, ActionLink.ActionType.CLONE, StandardEntitlement.USER_CREATE).add(new ActionLink<UserTO>() {
@@ -188,7 +187,7 @@ public class UserSearchResultPanel extends AnySearchResultPanel<UserTO> {
error(getString(Constants.ERROR) + ": " + e.getMessage());
LOG.error("While deleting object {}", model.getObject().getKey(), e);
}
- ((AbstractBasePage) getPage()).getNotificationPanel().refresh(target);
+ ((BasePage) getPage()).getNotificationPanel().refresh(target);
}
}, ActionLink.ActionType.DELETE, StandardEntitlement.USER_DELETE);
http://git-wip-us.apache.org/repos/asf/syncope/blob/a30719c7/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 a7bd832..bcc7117 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
@@ -22,7 +22,6 @@ import java.io.Serializable;
import java.text.MessageFormat;
import org.apache.commons.lang3.StringUtils;
import org.apache.syncope.client.console.commons.Constants;
-import org.apache.syncope.client.console.pages.AbstractBasePage;
import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.panels.ConnectorModal;
import org.apache.syncope.client.console.panels.ResourceModal;
@@ -188,7 +187,7 @@ public class TopologyNodePanel extends Panel implements IAjaxIndicatorAware {
error(getString(Constants.ERROR) + ": " + e.getMessage());
LOG.error("While deleting resource {}", node.getKey(), e);
}
- ((AbstractBasePage) getPage()).getNotificationPanel().refresh(target);
+ ((BasePage) getPage()).getNotificationPanel().refresh(target);
}
};
@@ -269,7 +268,7 @@ public class TopologyNodePanel extends Panel implements IAjaxIndicatorAware {
error(getString(Constants.ERROR) + ": " + e.getMessage());
LOG.error("While deleting resource {}", node.getKey(), e);
}
- ((AbstractBasePage) getPage()).getNotificationPanel().refresh(target);
+ ((BasePage) getPage()).getNotificationPanel().refresh(target);
}
};
fragment.add(delete);
http://git-wip-us.apache.org/repos/asf/syncope/blob/a30719c7/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage.html
index 0d6cd15..22a00d5 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/XMLEditorPopupPage.html
@@ -59,19 +59,17 @@ under the License.
<div style="padding-top: 1%;">
<input type="submit"
class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
- wicket:id="apply"
- style="width: 50px"/>
+ wicket:id="apply"/>
<input type="submit"
wicket:id="closePage"
class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
- onclick="window.close();"
- style="width: 50px"/>
+ onclick="window.close();"/>
</div>
</form>
</div>
</div>
<script>
- window.onload = function() {
+ window.onload = function () {
var editor = CodeMirror.fromTextArea(document.getElementById("workflowDefArea"), {lineNumbers: true});
editor.on("change", updateTextArea);
};
http://git-wip-us.apache.org/repos/asf/syncope/blob/a30719c7/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 6737d91..29db354 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
@@ -18,6 +18,7 @@
*/
package org.apache.syncope.client.console.pages;
+import java.io.Serializable;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.panels.AbstractModalPanel;
import org.apache.syncope.client.console.rest.CamelRouteRestClient;
@@ -36,14 +37,14 @@ import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.PropertyModel;
-public class CamelRouteModalPage extends AbstractModalPanel {
+public class CamelRouteModalPage<T extends Serializable> extends AbstractModalPanel<T> {
private static final long serialVersionUID = -1438441210568592931L;
private final CamelRouteRestClient restClient = new CamelRouteRestClient();
public CamelRouteModalPage(
- final BaseModal<?> modal,
+ final BaseModal<T> modal,
final PageReference pageRef,
final CamelRouteTO routeTO,
final boolean createFlag) {
http://git-wip-us.apache.org/repos/asf/syncope/blob/a30719c7/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/rest/CamelRouteRestClient.java
----------------------------------------------------------------------
diff --git a/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/rest/CamelRouteRestClient.java b/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/rest/CamelRouteRestClient.java
index 8c6e6a5..1567831 100644
--- a/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/rest/CamelRouteRestClient.java
+++ b/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/rest/CamelRouteRestClient.java
@@ -46,13 +46,10 @@ public class CamelRouteRestClient extends BaseRestClient {
public boolean isCamelEnabledFor(final AnyTypeKind anyTypeKind) {
return anyTypeKind == AnyTypeKind.USER
- ? SyncopeConsoleSession.get().getSyncopeTO().
- getUserProvisioningManager().contains("Camel")
+ ? SyncopeConsoleSession.get().getSyncopeTO().getUserProvisioningManager().contains("Camel")
: anyTypeKind == AnyTypeKind.ANY_OBJECT
- ? SyncopeConsoleSession.get().getSyncopeTO().
- getAnyObjectProvisioningManager().contains("Camel")
- : SyncopeConsoleSession.get().getSyncopeTO().
- getGroupProvisioningManager().contains("Camel");
+ ? SyncopeConsoleSession.get().getSyncopeTO().getAnyObjectProvisioningManager().contains("Camel")
+ : SyncopeConsoleSession.get().getSyncopeTO().getGroupProvisioningManager().contains("Camel");
}
}