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 2013/03/06 16:39:40 UTC
svn commit: r1453389 - in /syncope/trunk/console/src/main:
java/org/apache/syncope/console/commons/
java/org/apache/syncope/console/pages/
java/org/apache/syncope/console/pages/panels/
java/org/apache/syncope/console/wicket/markup/html/form/ resources/...
Author: ilgrosso
Date: Wed Mar 6 15:39:39 2013
New Revision: 1453389
URL: http://svn.apache.org/r1453389
Log:
[SYNCOPE-331] Adding access on the admin console (for users and roles)
Added:
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ConnObjectModalPage.java (with props)
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnObjectModalPage.html (with props)
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnObjectModalPage.properties (with props)
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnObjectModalPage_it.properties (with props)
Modified:
syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/StatusUtils.java
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ApprovalModalPage.java
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/EditUserModalPage.java
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResultStatusModalPage.java
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/RoleModalPage.java
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/StatusModalPage.java
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/AttributesPanel.java
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/RolePanel.java
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/StatusPanel.java
syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/markup/html/form/ActionLinksPanel.java
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/StatusModalPage.html
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/UserModalPage.html
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/RolePanel.html
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/StatusPanel.html
Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/StatusUtils.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/StatusUtils.java?rev=1453389&r1=1453388&r2=1453389&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/StatusUtils.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/StatusUtils.java Wed Mar 6 15:39:39 2013
@@ -22,8 +22,8 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
+import java.util.HashMap;
import java.util.LinkedHashMap;
-import java.util.List;
import java.util.Map;
import org.apache.syncope.common.to.AbstractAttributableTO;
import org.apache.syncope.common.to.AttributeTO;
@@ -64,8 +64,8 @@ public class StatusUtils implements Seri
this.restClient = restClient;
}
- public List<StatusBean> getRemoteStatuses(final AbstractAttributableTO attributable) {
- final List<StatusBean> statuses = new ArrayList<StatusBean>();
+ public Map<String, ConnObjectTO> getConnectorObjects(final AbstractAttributableTO attributable) {
+ final Map<String, ConnObjectTO> objects = new HashMap<String, ConnObjectTO>();
for (String resouceName : attributable.getResources()) {
ConnObjectTO objectTO = null;
@@ -75,16 +75,15 @@ public class StatusUtils implements Seri
LOG.warn("ConnObject '{}' not found on resource '{}'", attributable.getId(), resouceName);
}
- final StatusBean statusBean = getRemoteStatus(objectTO);
- statusBean.setResourceName(resouceName);
- statuses.add(statusBean);
+ objects.put(resouceName, objectTO);
}
- return statuses;
+ return objects;
}
- public StatusBean getRemoteStatus(final ConnObjectTO objectTO) {
+ public StatusBean getStatusBean(final String resourceName, final ConnObjectTO objectTO) {
final StatusBean statusBean = new StatusBean();
+ statusBean.setResourceName(resourceName);
if (objectTO != null) {
final Boolean enabled = isEnabled(objectTO);
Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ApprovalModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ApprovalModalPage.java?rev=1453389&r1=1453388&r2=1453389&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ApprovalModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ApprovalModalPage.java Wed Mar 6 15:39:39 2013
@@ -88,79 +88,81 @@ public class ApprovalModalPage extends B
final ListView<WorkflowFormPropertyTO> propView =
new AltListView<WorkflowFormPropertyTO>("propView", formProps) {
- private static final long serialVersionUID = 9101744072914090143L;
+ private static final long serialVersionUID = 9101744072914090143L;
- @Override
- protected void populateItem(final ListItem<WorkflowFormPropertyTO> item) {
- final WorkflowFormPropertyTO prop = item.getModelObject();
-
- Label label = new Label("key", prop.getName() == null
- ? prop.getId()
- : prop.getName());
- item.add(label);
-
- FieldPanel field;
- switch (prop.getType()) {
- case Boolean:
- field = new AjaxDropDownChoicePanel("value", label.getDefaultModelObjectAsString(),
- new Model(Boolean.valueOf(prop.getValue()))).setChoices(Arrays.asList(
- new String[]{"Yes", "No"}));
- break;
-
- case Date:
- SimpleDateFormat df = StringUtils.isNotBlank(prop.getDatePattern())
- ? new SimpleDateFormat(prop.getDatePattern())
- : new SimpleDateFormat();
- Date parsedDate = null;
- if (StringUtils.isNotBlank(prop.getValue())) {
- try {
- parsedDate = df.parse(prop.getValue());
- } catch (ParseException e) {
- LOG.error("Unparsable date: {}", prop.getValue(), e);
- }
- }
-
- field = new DateTimeFieldPanel("value", label.getDefaultModelObjectAsString(),
- new Model(parsedDate), df.toLocalizedPattern());
- break;
-
- case Enum:
- MapChoiceRenderer<String, String> enumCR =
- new MapChoiceRenderer<String, String>(prop.getEnumValues());
+ @Override
+ @SuppressWarnings("unchecked")
+ protected void populateItem(final ListItem<WorkflowFormPropertyTO> item) {
+ final WorkflowFormPropertyTO prop = item.getModelObject();
+
+ Label label = new Label("key", prop.getName() == null
+ ? prop.getId()
+ : prop.getName());
+ item.add(label);
+
+ FieldPanel field;
+ switch (prop.getType()) {
+ case Boolean:
+ field = new AjaxDropDownChoicePanel("value", label.getDefaultModelObjectAsString(),
+ new Model(Boolean.valueOf(prop.getValue()))).setChoices(Arrays.asList(
+ new String[]{"Yes", "No"}));
+ break;
+
+ case Date:
+ SimpleDateFormat df = StringUtils.isNotBlank(prop.getDatePattern())
+ ? new SimpleDateFormat(prop.getDatePattern())
+ : new SimpleDateFormat();
+ Date parsedDate = null;
+ if (StringUtils.isNotBlank(prop.getValue())) {
+ try {
+ parsedDate = df.parse(prop.getValue());
+ } catch (ParseException e) {
+ LOG.error("Unparsable date: {}", prop.getValue(), e);
+ }
+ }
- field = new AjaxDropDownChoicePanel("value", label.getDefaultModelObjectAsString(),
- new Model(prop.getValue())).setChoiceRenderer(enumCR).setChoices(new Model() {
+ field = new DateTimeFieldPanel("value", label.getDefaultModelObjectAsString(),
+ new Model(parsedDate), df.toLocalizedPattern());
+ break;
+
+ case Enum:
+ MapChoiceRenderer<String, String> enumCR =
+ new MapChoiceRenderer<String, String>(prop.getEnumValues());
- private static final long serialVersionUID = -858521070366432018L;
+ field = new AjaxDropDownChoicePanel("value", label.getDefaultModelObjectAsString(),
+ new Model(prop.getValue())).setChoiceRenderer(enumCR).setChoices(new Model() {
- @Override
- public Serializable getObject() {
- return new ArrayList(prop.getEnumValues().keySet());
- }
- });
- break;
+ private static final long serialVersionUID = -858521070366432018L;
- case Long:
- field = new AjaxNumberFieldPanel("value", label.getDefaultModelObjectAsString(),
- new Model(Long.valueOf(prop.getValue())), Long.class);
- break;
+ @Override
+ public Serializable getObject() {
+ return new ArrayList(prop.getEnumValues().keySet());
+ }
+ });
+ break;
- case String:
- default:
- field = new AjaxTextFieldPanel("value", PARENT_PATH, new Model(prop.getValue()));
- break;
- }
+ case Long:
+ field = new AjaxNumberFieldPanel("value", label.getDefaultModelObjectAsString(),
+ new Model(Long.valueOf(prop.getValue())), Long.class);
+ break;
+
+ case String:
+ default:
+ field = new AjaxTextFieldPanel("value", PARENT_PATH, new Model(prop.getValue()));
+ break;
+ }
- field.setReadOnly(!prop.isWritable());
- if (prop.isRequired()) {
- field.addRequiredLabel();
- }
+ field.setReadOnly(!prop.isWritable());
+ if (prop.isRequired()) {
+ field.addRequiredLabel();
+ }
- item.add(field);
- }
- };
+ item.add(field);
+ }
+ };
- final AjaxButton userDetails = new IndicatingAjaxButton("userDetails", new Model(getString("userDetails"))) {
+ final AjaxButton userDetails = new IndicatingAjaxButton("userDetails",
+ new Model<String>(getString("userDetails"))) {
private static final long serialVersionUID = -4804368561204623354L;
@@ -175,6 +177,8 @@ public class ApprovalModalPage extends B
return new ViewUserModalPage(ApprovalModalPage.this.getPageReference(), editUserWin,
userRestClient.read(formTO.getUserId())) {
+ private static final long serialVersionUID = -2819994749866481607L;
+
@Override
protected void closeAction(final AjaxRequestTarget target, final Form form) {
setResponsePage(ApprovalModalPage.this);
@@ -189,7 +193,7 @@ public class ApprovalModalPage extends B
MetaDataRoleAuthorizationStrategy.authorize(userDetails, ENABLE,
xmlRolesReader.getAllAllowedRoles("Users", "read"));
- final AjaxButton submit = new IndicatingAjaxButton("apply", new Model(getString("submit"))) {
+ final AjaxButton submit = new IndicatingAjaxButton("apply", new Model<String>(getString("submit"))) {
private static final long serialVersionUID = -958724007591692537L;
@@ -199,6 +203,7 @@ public class ApprovalModalPage extends B
Map<String, WorkflowFormPropertyTO> props = formTO.getPropertyMap();
for (int i = 0; i < propView.size(); i++) {
+ @SuppressWarnings("unchecked")
ListItem<WorkflowFormPropertyTO> item = (ListItem<WorkflowFormPropertyTO>) propView.get(i);
String input = ((FieldPanel) item.get("value")).getField().getInput();
@@ -253,6 +258,7 @@ public class ApprovalModalPage extends B
@Override
protected void onError(final AjaxRequestTarget target, final Form form) {
+ // nothing
}
};
Added: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ConnObjectModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ConnObjectModalPage.java?rev=1453389&view=auto
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ConnObjectModalPage.java (added)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ConnObjectModalPage.java Wed Mar 6 15:39:39 2013
@@ -0,0 +1,101 @@
+/*
+ * 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.console.pages;
+
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import org.apache.syncope.common.to.AttributeTO;
+import org.apache.syncope.common.to.ConnObjectTO;
+import org.apache.syncope.console.markup.html.list.AltListView;
+import org.apache.syncope.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.console.wicket.markup.html.form.MultiValueSelectorPanel;
+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.Panel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.LoadableDetachableModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.util.ListModel;
+
+public class ConnObjectModalPage extends BaseModalPage {
+
+ private static final long serialVersionUID = -6469290753080058487L;
+
+ public ConnObjectModalPage(final ConnObjectTO connObjectTO) {
+ super();
+
+ final Form<Void> form = new Form<Void>("form");
+ form.setEnabled(false);
+ add(form);
+
+ IModel<List<AttributeTO>> formProps = new LoadableDetachableModel<List<AttributeTO>>() {
+
+ private static final long serialVersionUID = 5275935387613157437L;
+
+ @Override
+ protected List<AttributeTO> load() {
+ List<AttributeTO> attrs = connObjectTO.getAttributes();
+ Collections.sort(attrs, new Comparator<AttributeTO>() {
+
+ @Override
+ public int compare(final AttributeTO attr1, final AttributeTO attr2) {
+ if (attr1 == null || attr1.getSchema() == null) {
+ return -1;
+ }
+ if (attr2 == null || attr2.getSchema() == null) {
+ return 1;
+ }
+ return attr1.getSchema().compareTo(attr2.getSchema());
+ }
+ });
+
+ return attrs;
+ }
+ };
+ final ListView<AttributeTO> propView = new AltListView<AttributeTO>("propView", formProps) {
+
+ private static final long serialVersionUID = 3109256773218160485L;
+
+ @Override
+ protected void populateItem(final ListItem<AttributeTO> item) {
+ final AttributeTO prop = item.getModelObject();
+
+ Label label = new Label("key", prop.getSchema());
+ item.add(label);
+
+ Panel field;
+ if (prop.getValues().isEmpty()) {
+ field = new AjaxTextFieldPanel("value",
+ prop.getSchema(), new Model<String>());
+ } else if (prop.getValues().size() == 1) {
+ field = new AjaxTextFieldPanel("value",
+ prop.getSchema(), new Model<String>(prop.getValues().get(0)));
+ } else {
+ field = new MultiValueSelectorPanel<String>("value", new ListModel<String>(prop.getValues()),
+ new AjaxTextFieldPanel("panel", prop.getSchema(), new Model<String>()));
+ }
+ item.add(field);
+ }
+ };
+ form.add(propView);
+ }
+}
Propchange: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ConnObjectModalPage.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ConnObjectModalPage.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ConnObjectModalPage.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/EditUserModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/EditUserModalPage.java?rev=1453389&r1=1453388&r2=1453389&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/EditUserModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/EditUserModalPage.java Wed Mar 6 15:39:39 2013
@@ -18,6 +18,7 @@
*/
package org.apache.syncope.console.pages;
+import static org.apache.wicket.Component.RENDER;
import java.util.ArrayList;
import org.apache.syncope.common.mod.UserMod;
import org.apache.syncope.common.to.UserTO;
@@ -30,6 +31,7 @@ import org.apache.syncope.console.pages.
import org.apache.syncope.console.rest.UserRestClient;
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.extensions.ajax.markup.html.modal.ModalWindow;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.Form;
@@ -63,8 +65,10 @@ public class EditUserModalPage extends U
if (userTO.getId() != 0) {
form.addOrReplace(new Label("pwdChangeInfo", new ResourceModel("pwdChangeInfo")));
- statusPanel = new StatusPanel("statuspanel", userTO, new ArrayList<StatusBean>());
+ statusPanel = new StatusPanel("statuspanel", userTO, new ArrayList<StatusBean>(), getPageReference());
statusPanel.setOutputMarkupId(true);
+ MetaDataRoleAuthorizationStrategy.authorize(
+ statusPanel, RENDER, xmlRolesReader.getAllAllowedRoles("Resources", "getConnectorObject"));
form.addOrReplace(statusPanel);
form.addOrReplace(new AccountInformationPanel("accountinformation", userTO));
Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResultStatusModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResultStatusModalPage.java?rev=1453389&r1=1453388&r2=1453389&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResultStatusModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResultStatusModalPage.java Wed Mar 6 15:39:39 2013
@@ -252,8 +252,8 @@ public class ResultStatusModalPage exten
final Fragment beforeValue;
final Fragment afterValue;
if ("__ENABLE__".equals(name)) {
- beforeValue = getStatusIcon("beforeValue", before);
- afterValue = getStatusIcon("afterValue", after);
+ beforeValue = getStatusIcon("beforeValue", propTO.getResource(), before);
+ afterValue = getStatusIcon("afterValue", propTO.getResource(), after);
} else {
beforeValue = getLabelValue("beforeValue", name, beforeAttrMap);
afterValue = getLabelValue("afterValue", name, afterAttrMap);
@@ -311,14 +311,15 @@ public class ResultStatusModalPage exten
/**
* Get fragment for user status icon.
*
- * @param id component id to be replaced with the fragment content.
- * @param objectTO connector object TO.
+ * @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 ConnObjectTO objectTO) {
+ private Fragment getStatusIcon(final String id, final String resourceName, final ConnObjectTO objectTO) {
final Image image;
final String alt, title;
- switch (statusUtils.getRemoteStatus(objectTO).getStatus()) {
+ switch (statusUtils.getStatusBean(resourceName, objectTO).getStatus()) {
case ACTIVE:
image = new Image("status", "statuses/active.png");
Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/RoleModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/RoleModalPage.java?rev=1453389&r1=1453388&r2=1453389&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/RoleModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/RoleModalPage.java Wed Mar 6 15:39:39 2013
@@ -25,11 +25,11 @@ import org.apache.syncope.common.to.Role
import org.apache.syncope.common.util.AttributableOperations;
import org.apache.syncope.console.pages.panels.RolePanel;
import org.apache.syncope.console.rest.RoleRestClient;
-import org.apache.syncope.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton;
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.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.Form;
@@ -92,16 +92,15 @@ public class RoleModalPage extends BaseM
form.setModel(new CompoundPropertyModel(roleTO));
- this.rolePanel = new RolePanel("rolePanel", form, roleTO, mode);
+ this.rolePanel = new RolePanel("rolePanel", form, roleTO, mode, getPageReference());
form.add(rolePanel);
- final AjaxButton submit = new ClearIndicatingAjaxButton("submit", new ResourceModel("submit"),
- getPageReference()) {
+ final AjaxButton submit = new IndicatingAjaxButton("submit", new ResourceModel("submit")) {
private static final long serialVersionUID = -958724007591692537L;
@Override
- protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
try {
submitAction(target, form);
@@ -122,12 +121,12 @@ public class RoleModalPage extends BaseM
}
};
- final AjaxButton cancel = new ClearIndicatingAjaxButton("cancel", new ResourceModel("cancel"), pageRef) {
+ final AjaxButton cancel = new IndicatingAjaxButton("cancel", new ResourceModel("cancel")) {
private static final long serialVersionUID = -958724007591692537L;
@Override
- protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
closeAction(target, form);
}
};
Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/StatusModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/StatusModalPage.java?rev=1453389&r1=1453388&r2=1453389&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/StatusModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/StatusModalPage.java Wed Mar 6 15:39:39 2013
@@ -25,10 +25,11 @@ import org.apache.syncope.common.to.User
import org.apache.syncope.console.commons.StatusBean;
import org.apache.syncope.console.pages.panels.StatusPanel;
import org.apache.syncope.console.rest.UserRestClient;
-import org.apache.syncope.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton;
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.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.model.ResourceModel;
@@ -51,17 +52,19 @@ public class StatusModalPage extends Bas
final List<StatusBean> statuses = new ArrayList<StatusBean>();
- final StatusPanel statusPanel = new StatusPanel("statuspanel", attributable, statuses);
+ final StatusPanel statusPanel = new StatusPanel("statuspanel", attributable, statuses, null);
+ MetaDataRoleAuthorizationStrategy.authorize(
+ statusPanel, RENDER, xmlRolesReader.getAllAllowedRoles("Resources", "getConnectorObject"));
form.add(statusPanel);
final AjaxButton disable;
if (attributable instanceof UserTO) {
- disable = new ClearIndicatingAjaxButton("disable", new ResourceModel("disable", "Disable"), pageRef) {
+ disable = new IndicatingAjaxButton("disable", new ResourceModel("disable", "Disable")) {
private static final long serialVersionUID = -958724007591692537L;
@Override
- protected void onSubmitInternal(final AjaxRequestTarget target, final Form form) {
+ protected void onSubmit(final AjaxRequestTarget target, final Form form) {
try {
userRestClient.suspend(attributable.getId(), statuses);
@@ -94,12 +97,12 @@ public class StatusModalPage extends Bas
final AjaxButton enable;
if (attributable instanceof UserTO) {
- enable = new ClearIndicatingAjaxButton("enable", new ResourceModel("enable", "Enable"), pageRef) {
+ enable = new IndicatingAjaxButton("enable", new ResourceModel("enable", "Enable")) {
private static final long serialVersionUID = -958724007591692537L;
@Override
- protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
try {
userRestClient.reactivate(attributable.getId(), statuses);
@@ -129,12 +132,12 @@ public class StatusModalPage extends Bas
}
form.add(enable);
- final AjaxButton cancel = new ClearIndicatingAjaxButton("cancel", new ResourceModel("cancel"), pageRef) {
+ final AjaxButton cancel = new IndicatingAjaxButton("cancel", new ResourceModel("cancel")) {
private static final long serialVersionUID = -958724007591692537L;
@Override
- protected void onSubmitInternal(final AjaxRequestTarget target, final Form form) {
+ protected void onSubmit(final AjaxRequestTarget target, final Form form) {
window.close(target);
}
};
Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/AttributesPanel.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/AttributesPanel.java?rev=1453389&r1=1453388&r2=1453389&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/AttributesPanel.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/AttributesPanel.java Wed Mar 6 15:39:39 2013
@@ -20,6 +20,7 @@ package org.apache.syncope.console.pages
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -130,7 +131,7 @@ public class AttributesPanel extends Pan
item.add(panel);
} else {
item.add(new MultiValueSelectorPanel<String>(
- "panel", new PropertyModel(attributeTO, "values"), panel));
+ "panel", new PropertyModel<List<String>>(attributeTO, "values"), panel));
}
}
};
@@ -168,54 +169,53 @@ public class AttributesPanel extends Pan
return entityData;
}
+ @SuppressWarnings({"rawtypes", "unchecked"})
private FieldPanel getFieldPanel(final SchemaTO schemaTO, final Form form, final AttributeTO attributeTO) {
-
- final FieldPanel panel;
-
final boolean required = templateMode ? false : schemaTO.getMandatoryCondition().equalsIgnoreCase("true");
final boolean readOnly = templateMode ? false : schemaTO.isReadonly();
final AttributeSchemaType type = templateMode ? AttributeSchemaType.String : schemaTO.getType();
+ final FieldPanel panel;
switch (type) {
case Boolean:
- panel = new AjaxCheckBoxPanel("panel", schemaTO.getName(), new Model());
+ panel = new AjaxCheckBoxPanel("panel", schemaTO.getName(), new Model<Boolean>());
panel.setRequired(required);
break;
case Date:
- final String dataPattern = schemaTO.getConversionPattern() != null
- ? schemaTO.getConversionPattern()
- : SyncopeConstants.DEFAULT_DATE_PATTERN;
+ final String dataPattern = schemaTO.getConversionPattern() == null
+ ? SyncopeConstants.DEFAULT_DATE_PATTERN
+ : schemaTO.getConversionPattern();
- if (!dataPattern.contains("H")) {
- panel = new DateTextFieldPanel("panel", schemaTO.getName(), new Model(), dataPattern);
+ if (dataPattern.contains("H")) {
+ panel = new DateTimeFieldPanel("panel", schemaTO.getName(), new Model<Date>(), dataPattern);
if (required) {
panel.addRequiredLabel();
+ ((DateTimeFieldPanel) panel).setFormValidator(form);
}
+ panel.setStyleSheet("ui-widget-content ui-corner-all");
} else {
- panel = new DateTimeFieldPanel("panel", schemaTO.getName(), new Model(), dataPattern);
+ panel = new DateTextFieldPanel("panel", schemaTO.getName(), new Model<Date>(), dataPattern);
if (required) {
panel.addRequiredLabel();
- ((DateTimeFieldPanel) panel).setFormValidator(form);
}
- panel.setStyleSheet("ui-widget-content ui-corner-all");
}
break;
case Enum:
panel = new AjaxDropDownChoicePanel<String>("panel", schemaTO.getName(), new Model<String>());
- ((AjaxDropDownChoicePanel) panel).setChoices(getEnumeratedValues(schemaTO));
+ ((AjaxDropDownChoicePanel<String>) panel).setChoices(getEnumeratedValues(schemaTO));
if (StringUtils.isNotBlank(schemaTO.getEnumerationKeys())) {
((AjaxDropDownChoicePanel) panel).setChoiceRenderer(new IChoiceRenderer<String>() {
private static final long serialVersionUID = -3724971416312135885L;
- final Map<String, String> valueMap = getEnumeratedKeyValues(schemaTO);
+ private final Map<String, String> valueMap = getEnumeratedKeyValues(schemaTO);
@Override
public String getDisplayValue(final String value) {
@@ -223,7 +223,7 @@ public class AttributesPanel extends Pan
}
@Override
- public String getIdValue(final String value, int i) {
+ public String getIdValue(final String value, final int i) {
return value;
}
});
@@ -236,7 +236,7 @@ public class AttributesPanel extends Pan
break;
default:
- panel = new AjaxTextFieldPanel("panel", schemaTO.getName(), new Model());
+ panel = new AjaxTextFieldPanel("panel", schemaTO.getName(), new Model<String>());
if (required) {
panel.addRequiredLabel();
}
Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/RolePanel.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/RolePanel.java?rev=1453389&r1=1453388&r2=1453389&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/RolePanel.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/RolePanel.java Wed Mar 6 15:39:39 2013
@@ -18,15 +18,23 @@
*/
package org.apache.syncope.console.pages.panels;
+import static org.apache.wicket.Component.RENDER;
+
+import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.apache.syncope.common.to.RoleTO;
import org.apache.syncope.console.commons.SelectChoiceRenderer;
+import org.apache.syncope.console.commons.StatusBean;
+import org.apache.syncope.console.commons.XMLRolesReader;
import org.apache.syncope.console.pages.RoleModalPage;
import org.apache.syncope.console.rest.AuthRestClient;
import org.apache.syncope.console.wicket.markup.html.form.AjaxCheckBoxPanel;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
import org.apache.wicket.extensions.markup.html.form.palette.Palette;
+import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.PropertyModel;
@@ -40,13 +48,32 @@ public class RolePanel extends Panel {
@SpringBean
private AuthRestClient entitlementRestClient;
+ @SpringBean
+ private XMLRolesReader xmlRolesReader;
+
private final Palette<String> entitlementsPalette;
public RolePanel(final String id, final Form form, final RoleTO roleTO, final RoleModalPage.Mode mode) {
+ this(id, form, roleTO, mode, null);
+ }
+
+ public RolePanel(final String id, final Form form, final RoleTO roleTO, final RoleModalPage.Mode mode,
+ final PageReference pageref) {
+
super(id);
this.add(new RoleDetailsPanel("details", roleTO, form, mode == RoleModalPage.Mode.TEMPLATE));
+ if (pageref == null || roleTO.getId() == 0) {
+ this.add(new Label("statuspanel", ""));
+ } else {
+ StatusPanel statusPanel = new StatusPanel("statuspanel", roleTO, new ArrayList<StatusBean>(), pageref);
+ statusPanel.setOutputMarkupId(true);
+ MetaDataRoleAuthorizationStrategy.authorize(
+ statusPanel, RENDER, xmlRolesReader.getAllAllowedRoles("Resources", "getConnectorObject"));
+ this.add(statusPanel);
+ }
+
//--------------------------------
// Attributes panel
this.add(new AttributesPanel("attributes", roleTO, form, mode == RoleModalPage.Mode.TEMPLATE));
Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/StatusPanel.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/StatusPanel.java?rev=1453389&r1=1453388&r2=1453389&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/StatusPanel.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/StatusPanel.java Wed Mar 6 15:39:39 2013
@@ -20,11 +20,12 @@ package org.apache.syncope.console.pages
import java.util.ArrayList;
import java.util.Collection;
-import java.util.HashMap;
+import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang.StringUtils;
import org.apache.syncope.common.to.AbstractAttributableTO;
+import org.apache.syncope.common.to.ConnObjectTO;
import org.apache.syncope.common.to.PropagationRequestTO;
import org.apache.syncope.common.to.RoleTO;
import org.apache.syncope.common.to.UserTO;
@@ -32,11 +33,21 @@ import org.apache.syncope.console.common
import org.apache.syncope.console.commons.StatusUtils;
import org.apache.syncope.console.commons.StatusUtils.Status;
import org.apache.syncope.console.markup.html.list.AltListView;
+import org.apache.syncope.console.pages.ConnObjectModalPage;
import org.apache.syncope.console.rest.RoleRestClient;
import org.apache.syncope.console.rest.UserRestClient;
+import org.apache.syncope.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.console.wicket.markup.html.form.ActionLinksPanel;
import org.apache.wicket.Component;
+import org.apache.wicket.Page;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
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.CssContentHeaderItem;
+import org.apache.wicket.markup.head.IHeaderResponse;
+import org.apache.wicket.markup.html.IHeaderContributor;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.Check;
import org.apache.wicket.markup.html.form.CheckGroup;
@@ -45,12 +56,13 @@ import org.apache.wicket.markup.html.ima
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.Model;
import org.apache.wicket.model.ResourceModel;
import org.apache.wicket.spring.injection.annot.SpringBean;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class StatusPanel extends Panel {
+public class StatusPanel extends Panel implements IHeaderContributor {
/**
* Logger.
@@ -59,13 +71,21 @@ public class StatusPanel extends Panel {
private static final long serialVersionUID = -4064294905566247728L;
+ private static final int CONNOBJECT_WIN_HEIGHT = 400;
+
+ private static final int CONNOBJECT_WIN_WIDTH = 600;
+
@SpringBean
private UserRestClient userRestClient;
@SpringBean
private RoleRestClient roleRestClient;
- private final StatusUtils statusUtils;
+ private final ModalWindow connObjectWin;
+
+ private final AbstractAttributableTO attributable;
+
+ private final Map<String, ConnObjectTO> connObjects;
private final Map<String, StatusBean> initialStatusBeanMap;
@@ -74,12 +94,17 @@ public class StatusPanel extends Panel {
private final ListView<StatusBean> statusBeansListView;
public <T extends AbstractAttributableTO> StatusPanel(final String id, final AbstractAttributableTO attributable,
- final List<StatusBean> selectedResources) {
+ final List<StatusBean> selectedResources, final PageReference pageref) {
super(id);
- statusUtils = new StatusUtils((attributable instanceof UserTO ? userRestClient : roleRestClient));
+ this.attributable = attributable;
- final List<StatusBean> statusBeans = new ArrayList<StatusBean>();
+ connObjectWin = new ModalWindow("connObjectWin");
+ connObjectWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ connObjectWin.setInitialHeight(CONNOBJECT_WIN_HEIGHT);
+ connObjectWin.setInitialWidth(CONNOBJECT_WIN_WIDTH);
+ connObjectWin.setCookieName("connobject-modal");
+ add(connObjectWin);
final StatusBean syncope = new StatusBean();
syncope.setResourceName("Syncope");
@@ -103,23 +128,22 @@ public class StatusPanel extends Panel {
syncope.setStatus(Status.ACTIVE);
}
- statusBeans.add(syncope);
- statusBeans.addAll(statusUtils.getRemoteStatuses(attributable));
+ StatusUtils statusUtils = new StatusUtils((attributable instanceof UserTO ? userRestClient : roleRestClient));
- initialStatusBeanMap = new HashMap<String, StatusBean>(statusBeans.size());
- for (StatusBean statusBean : statusBeans) {
- initialStatusBeanMap.put(statusBean.getResourceName(), statusBean);
- }
+ connObjects = statusUtils.getConnectorObjects(attributable);
- checkGroup = new CheckGroup<StatusBean>("group", selectedResources) {
+ List<StatusBean> statusBeans = new ArrayList<StatusBean>(connObjects.size() + 1);
+ statusBeans.add(syncope);
+ initialStatusBeanMap = new LinkedHashMap<String, StatusBean>(connObjects.size() + 1);
+ initialStatusBeanMap.put(syncope.getResourceName(), syncope);
+ for (Map.Entry<String, ConnObjectTO> entry : connObjects.entrySet()) {
+ final StatusBean statusBean = statusUtils.getStatusBean(entry.getKey(), entry.getValue());
- private static final long serialVersionUID = 4085912362037539780L;
+ initialStatusBeanMap.put(entry.getKey(), statusBean);
+ statusBeans.add(statusBean);
+ }
- @Override
- protected boolean wantOnSelectionChangedNotifications() {
- return true;
- }
- };
+ checkGroup = new CheckGroup<StatusBean>("group", selectedResources);
checkGroup.setOutputMarkupId(true);
add(checkGroup);
@@ -179,6 +203,7 @@ public class StatusPanel extends Panel {
tag.put("title", title);
}
});
+ item.add(image);
final Check<StatusBean> check = new Check<StatusBean>("check", item.getModel(), checkGroup);
check.setEnabled(checkVisibility);
@@ -195,7 +220,38 @@ public class StatusPanel extends Panel {
item.add(new Label("accountLink", ""));
}
- item.add(image);
+ if (pageref != null
+ && connObjects.containsKey(item.getModelObject().getResourceName())
+ && connObjects.get(item.getModelObject().getResourceName()) != null) {
+
+ final ConnObjectTO connObjectTO = connObjects.get(item.getModelObject().getResourceName());
+
+ ActionLinksPanel connObject = new ActionLinksPanel("connObject", new Model(), pageref);
+
+ connObject.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target) {
+ connObjectWin.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ return new ConnObjectModalPage(connObjectTO);
+ }
+ });
+
+ connObjectWin.show(target);
+ }
+ }, ActionLink.ActionType.SEARCH, "Resources", "getConnectorObject");
+
+ item.add(connObject);
+ } else {
+ item.add(new Label("connObject", new Model<String>()));
+ }
}
};
statusBeansListView.setReuseItems(true);
@@ -235,4 +291,17 @@ public class StatusPanel extends Panel {
}
}
}
+
+ @Override
+ public void renderHead(final IHeaderResponse response) {
+ if (this.attributable instanceof RoleTO) {
+ response.render(new CssContentHeaderItem(
+ "div#check{"
+ + "display:none;"
+ + "}"
+ + "div#status{"
+ + "display:none;"
+ + "}", null, null));
+ }
+ }
}
Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/markup/html/form/ActionLinksPanel.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/markup/html/form/ActionLinksPanel.java?rev=1453389&r1=1453388&r2=1453389&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/markup/html/form/ActionLinksPanel.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/markup/html/form/ActionLinksPanel.java Wed Mar 6 15:39:39 2013
@@ -88,9 +88,9 @@ public class ActionLinksPanel extends Pa
case CLAIM:
fragment = new Fragment("panelClaim", "fragmentClaim", this);
- fragment.addOrReplace(new ClearIndicatingAjaxLink("claimLink", pageRef) {
+ fragment.addOrReplace(new ClearIndicatingAjaxLink<Void>("claimLink", pageRef) {
- private static final long serialVersionUID = -7978723352517770644L;
+ private static final long serialVersionUID = -6957616042924610290L;
@Override
protected void onClickInternal(final AjaxRequestTarget target) {
@@ -102,9 +102,9 @@ public class ActionLinksPanel extends Pa
case CREATE:
fragment = new Fragment("panelCreate", "fragmentCreate", this);
- fragment.addOrReplace(new ClearIndicatingAjaxLink("createLink", pageRef) {
+ fragment.addOrReplace(new ClearIndicatingAjaxLink<Void>("createLink", pageRef) {
- private static final long serialVersionUID = -7978723352517770644L;
+ private static final long serialVersionUID = -6957616042924610290L;
@Override
protected void onClickInternal(final AjaxRequestTarget target) {
@@ -116,9 +116,9 @@ public class ActionLinksPanel extends Pa
case EDIT:
fragment = new Fragment("panelEdit", "fragmentEdit", this);
- fragment.addOrReplace(new ClearIndicatingAjaxLink("editLink", pageRef) {
+ fragment.addOrReplace(new ClearIndicatingAjaxLink<Void>("editLink", pageRef) {
- private static final long serialVersionUID = -7978723352517770644L;
+ private static final long serialVersionUID = -6957616042924610290L;
@Override
protected void onClickInternal(final AjaxRequestTarget target) {
@@ -130,9 +130,9 @@ public class ActionLinksPanel extends Pa
case USER_TEMPLATE:
fragment = new Fragment("panelUserTemplate", "fragmentUserTemplate", this);
- fragment.addOrReplace(new ClearIndicatingAjaxLink("userTemplateLink", pageRef) {
+ fragment.addOrReplace(new ClearIndicatingAjaxLink<Void>("userTemplateLink", pageRef) {
- private static final long serialVersionUID = -7978723352517770644L;
+ private static final long serialVersionUID = -6957616042924610290L;
@Override
protected void onClickInternal(final AjaxRequestTarget target) {
@@ -144,9 +144,9 @@ public class ActionLinksPanel extends Pa
case ROLE_TEMPLATE:
fragment = new Fragment("panelRoleTemplate", "fragmentRoleTemplate", this);
- fragment.addOrReplace(new ClearIndicatingAjaxLink("roleTemplateLink", pageRef) {
+ fragment.addOrReplace(new ClearIndicatingAjaxLink<Void>("roleTemplateLink", pageRef) {
- private static final long serialVersionUID = -7978723352517770644L;
+ private static final long serialVersionUID = -6957616042924610290L;
@Override
protected void onClickInternal(final AjaxRequestTarget target) {
@@ -158,9 +158,9 @@ public class ActionLinksPanel extends Pa
case ENABLE:
fragment = new Fragment("panelEnable", "fragmentEnable", this);
- fragment.addOrReplace(new ClearIndicatingAjaxLink("enableLink", pageRef) {
+ fragment.addOrReplace(new ClearIndicatingAjaxLink<Void>("enableLink", pageRef) {
- private static final long serialVersionUID = -7978723352517770644L;
+ private static final long serialVersionUID = -6957616042924610290L;
@Override
protected void onClickInternal(final AjaxRequestTarget target) {
@@ -172,9 +172,9 @@ public class ActionLinksPanel extends Pa
case SEARCH:
fragment = new Fragment("panelSearch", "fragmentSearch", this);
- fragment.addOrReplace(new ClearIndicatingAjaxLink("searchLink", pageRef) {
+ fragment.addOrReplace(new ClearIndicatingAjaxLink<Void>("searchLink", pageRef) {
- private static final long serialVersionUID = -7978723352517770644L;
+ private static final long serialVersionUID = -6957616042924610290L;
@Override
protected void onClickInternal(final AjaxRequestTarget target) {
@@ -186,9 +186,9 @@ public class ActionLinksPanel extends Pa
case EXECUTE:
fragment = new Fragment("panelExecute", "fragmentExecute", this);
- fragment.addOrReplace(new ClearIndicatingAjaxLink("executeLink", pageRef) {
+ fragment.addOrReplace(new ClearIndicatingAjaxLink<Void>("executeLink", pageRef) {
- private static final long serialVersionUID = -7978723352517770644L;
+ private static final long serialVersionUID = -6957616042924610290L;
@Override
protected void onClickInternal(final AjaxRequestTarget target) {
@@ -200,9 +200,9 @@ public class ActionLinksPanel extends Pa
case DRYRUN:
fragment = new Fragment("panelDryRun", "fragmentDryRun", this);
- fragment.addOrReplace(new ClearIndicatingAjaxLink("dryRunLink", pageRef) {
+ fragment.addOrReplace(new ClearIndicatingAjaxLink<Void>("dryRunLink", pageRef) {
- private static final long serialVersionUID = -7978723352517770644L;
+ private static final long serialVersionUID = -6957616042924610290L;
@Override
protected void onClickInternal(final AjaxRequestTarget target) {
@@ -214,9 +214,9 @@ public class ActionLinksPanel extends Pa
case DELETE:
fragment = new Fragment("panelDelete", "fragmentDelete", this);
- fragment.addOrReplace(new IndicatingDeleteOnConfirmAjaxLink("deleteLink", pageRef) {
+ fragment.addOrReplace(new IndicatingDeleteOnConfirmAjaxLink<Void>("deleteLink", pageRef) {
- private static final long serialVersionUID = -7978723352517770644L;
+ private static final long serialVersionUID = -6957616042924610290L;
@Override
protected void onClickInternal(final AjaxRequestTarget target) {
@@ -229,9 +229,9 @@ public class ActionLinksPanel extends Pa
case SELECT:
fragment = new Fragment("panelSelect", "fragmentSelect", this);
- fragment.addOrReplace(new ClearIndicatingAjaxLink("selectLink", pageRef) {
+ fragment.addOrReplace(new ClearIndicatingAjaxLink<Void>("selectLink", pageRef) {
- private static final long serialVersionUID = -7978723352517770644L;
+ private static final long serialVersionUID = -6957616042924610290L;
@Override
protected void onClickInternal(final AjaxRequestTarget target) {
@@ -244,9 +244,9 @@ public class ActionLinksPanel extends Pa
case EXPORT:
fragment = new Fragment("panelExport", "fragmentExport", this);
- fragment.addOrReplace(new ClearIndicatingAjaxLink("exportLink", pageRef) {
+ fragment.addOrReplace(new ClearIndicatingAjaxLink<Void>("exportLink", pageRef) {
- private static final long serialVersionUID = -7978723352517770644L;
+ private static final long serialVersionUID = -6957616042924610290L;
@Override
protected void onClickInternal(final AjaxRequestTarget target) {
Added: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnObjectModalPage.html
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnObjectModalPage.html?rev=1453389&view=auto
==============================================================================
--- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnObjectModalPage.html (added)
+++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnObjectModalPage.html Wed Mar 6 15:39:39 2013
@@ -0,0 +1,37 @@
+<!--
+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.
+-->
+<wicket:extend>
+ <p class="ui-widget ui-corner-all ui-widget-header"><wicket:message key="title"/></p>
+
+<div style="margin:10px">
+ <form wicket:id="form">
+ <div id="formtable">
+ <div class="tablerow" wicket:id="propView">
+ <div class="tablecolumn_label medium_dynamicsize">
+ <span wicket:id="key">[key]</span>
+ </div>
+ <div class="tablecolumn_field medium_dynamicsize">
+ <span wicket:id="value">[value]</span>
+
+ </div>
+ </div>
+ </div>
+ </form>
+</div>
+</wicket:extend>
Propchange: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnObjectModalPage.html
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnObjectModalPage.html
------------------------------------------------------------------------------
svn:keywords = Date Revision Author HeadURL Id
Propchange: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnObjectModalPage.html
------------------------------------------------------------------------------
svn:mime-type = text/html
Added: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnObjectModalPage.properties
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnObjectModalPage.properties?rev=1453389&view=auto
==============================================================================
--- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnObjectModalPage.properties (added)
+++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnObjectModalPage.properties Wed Mar 6 15:39:39 2013
@@ -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.
+title=Resource data
Propchange: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnObjectModalPage.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnObjectModalPage.properties
------------------------------------------------------------------------------
svn:keywords = Date Revision Author HeadURL Id
Added: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnObjectModalPage_it.properties
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnObjectModalPage_it.properties?rev=1453389&view=auto
==============================================================================
--- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnObjectModalPage_it.properties (added)
+++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnObjectModalPage_it.properties Wed Mar 6 15:39:39 2013
@@ -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.
+title=Dati sulla risorsa
Propchange: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnObjectModalPage_it.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnObjectModalPage_it.properties
------------------------------------------------------------------------------
svn:keywords = Date Revision Author HeadURL Id
Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/StatusModalPage.html
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/StatusModalPage.html?rev=1453389&r1=1453388&r2=1453389&view=diff
==============================================================================
--- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/StatusModalPage.html (original)
+++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/StatusModalPage.html Wed Mar 6 15:39:39 2013
@@ -17,30 +17,30 @@ specific language governing permissions
under the License.
-->
<wicket:head>
- <style>
- .submit{
- display: block;
- clear: both;
- float: none;
- margin-left: 10px;
- padding-top: 10px;
- }
- </style>
+ <style>
+ .submit{
+ display: block;
+ clear: both;
+ float: none;
+ margin-left: 10px;
+ padding-top: 10px;
+ }
+ </style>
</wicket:head>
<wicket:extend>
- <form wicket:id="form">
- <p class="ui-widget ui-corner-all ui-widget-header">
- <wicket:message key="title"/>
- </p>
+ <form wicket:id="form">
+ <p class="ui-widget ui-corner-all ui-widget-header">
+ <wicket:message key="title"/>
+ </p>
- <div style="display: block; margin: 10px">
- <span wicket:id="statuspanel">[Status Panel]</span>
- </div>
+ <div style="display: block; margin: 10px">
+ <span wicket:id="statuspanel">[Status Panel]</span>
+ </div>
- <div class="submit">
- <input type="submit" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" wicket:id="enable"/>
- <input type="submit" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" wicket:id="disable"/>
- <input type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" wicket:id="cancel"/>
- </div>
- </form>
+ <div class="submit">
+ <input type="submit" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" wicket:id="enable"/>
+ <input type="submit" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" wicket:id="disable"/>
+ <input type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" wicket:id="cancel"/>
+ </div>
+ </form>
</wicket:extend>
Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/UserModalPage.html
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/UserModalPage.html?rev=1453389&r1=1453388&r2=1453389&view=diff
==============================================================================
--- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/UserModalPage.html (original)
+++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/UserModalPage.html Wed Mar 6 15:39:39 2013
@@ -40,7 +40,7 @@ under the License.
<div id="tabs-1">
<span wicket:id="details">[user details]</span>
<div wicket:id="pwdChangeInfo" style="margin-top: 15px;">[pwdChangeInfo]</div>
- <span wicket:id="statuspanel">[Sattus Panel]</span>
+ <span wicket:id="statuspanel">[Status Panel]</span>
<span wicket:id="accountinformation">[Account Information]</span>
</div>
<div id="tabs-2">
Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/RolePanel.html
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/RolePanel.html?rev=1453389&r1=1453388&r2=1453389&view=diff
==============================================================================
--- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/RolePanel.html (original)
+++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/RolePanel.html Wed Mar 6 15:39:39 2013
@@ -20,6 +20,7 @@ under the License.
<div id="tabs-1">
<span wicket:id="details">[role details]</span>
+ <span wicket:id="statuspanel">[Status Panel]</span>
</div>
<div id="tabs-2">
Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/StatusPanel.html
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/StatusPanel.html?rev=1453389&r1=1453388&r2=1453389&view=diff
==============================================================================
--- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/StatusPanel.html (original)
+++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/StatusPanel.html Wed Mar 6 15:39:39 2013
@@ -46,7 +46,15 @@ under the License.
div#status{
margin-top: 3px;
height: 25px;
- width: 10%;
+ width: 5%;
+ float: left;
+ text-align: center;
+ }
+
+ div#connObject{
+ margin-top: 3px;
+ height: 25px;
+ width: 5%;
float: left;
text-align: center;
}
@@ -88,6 +96,8 @@ under the License.
<wicket:message key="statusheader"/>
</span>
</div>
+ <div id="connObject">
+ </div>
</div>
<span wicket:id="group">
@@ -106,10 +116,14 @@ under the License.
<div id="status">
<img wicket:id="icon"/>
</div>
+ <div id="connObject">
+ <span wicket:id="connObject">[connObject]</span>
+ </div>
</div>
</span>
</div>
</div>
+ <div wicket:id="connObjectWin">[Show modal window for showing connector object]</div>
</wicket:panel>