Return-Path: X-Original-To: apmail-syncope-commits-archive@www.apache.org Delivered-To: apmail-syncope-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BAC1910689 for ; Thu, 10 Oct 2013 14:38:55 +0000 (UTC) Received: (qmail 90708 invoked by uid 500); 10 Oct 2013 14:38:52 -0000 Delivered-To: apmail-syncope-commits-archive@syncope.apache.org Received: (qmail 90667 invoked by uid 500); 10 Oct 2013 14:38:52 -0000 Mailing-List: contact commits-help@syncope.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@syncope.apache.org Delivered-To: mailing list commits@syncope.apache.org Received: (qmail 90583 invoked by uid 99); 10 Oct 2013 14:38:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Oct 2013 14:38:48 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Oct 2013 14:38:32 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id A2FE323888E7; Thu, 10 Oct 2013 14:38:09 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1531003 [2/9] - in /syncope/trunk: ./ common/src/main/java/org/apache/syncope/common/ common/src/main/java/org/apache/syncope/common/mod/ common/src/main/java/org/apache/syncope/common/to/ common/src/main/java/org/apache/syncope/common/uti... Date: Thu, 10 Oct 2013 14:38:00 -0000 To: commits@syncope.apache.org From: ilgrosso@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20131010143809.A2FE323888E7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/UserModalPage.java URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/UserModalPage.java?rev=1531003&r1=1531002&r2=1531003&view=diff ============================================================================== --- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/UserModalPage.java (original) +++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/UserModalPage.java Thu Oct 10 14:37:56 2013 @@ -117,19 +117,19 @@ public abstract class UserModalPage exte //-------------------------------- // Attributes panel //-------------------------------- - form.add(new AttributesPanel("attributes", userTO, form, mode == Mode.TEMPLATE)); + form.add(new AttributesPanel("attrs", userTO, form, mode == Mode.TEMPLATE)); //-------------------------------- //-------------------------------- // Derived attributes panel //-------------------------------- - form.add(new DerivedAttributesPanel("derivedAttributes", userTO)); + form.add(new DerivedAttributesPanel("derAttrs", userTO)); //-------------------------------- //-------------------------------- // Virtual attributes panel //-------------------------------- - form.add(new VirtualAttributesPanel("virtualAttributes", userTO, mode == Mode.TEMPLATE)); + form.add(new VirtualAttributesPanel("virAttrs", userTO, mode == Mode.TEMPLATE)); //-------------------------------- //-------------------------------- Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/VirtualSchemaModalPage.java URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/VirtualSchemaModalPage.java?rev=1531003&r1=1531002&r2=1531003&view=diff ============================================================================== --- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/VirtualSchemaModalPage.java (original) +++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/VirtualSchemaModalPage.java Thu Oct 10 14:37:56 2013 @@ -77,9 +77,9 @@ public class VirtualSchemaModalPage exte VirSchemaTO schemaTO = (VirSchemaTO) form.getDefaultModelObject(); try { if (createFlag) { - schemaRestClient.createVirtualSchema(kind, schemaTO); + schemaRestClient.createVirSchema(kind, schemaTO); } else { - schemaRestClient.updateVirtualSchema(kind, schemaTO); + schemaRestClient.updateVirSchema(kind, schemaTO); } if (pageRef.getPage() instanceof BasePage) { ((BasePage) pageRef.getPage()).setModalResult(true); Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/AbstractSearchPanel.java URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/AbstractSearchPanel.java?rev=1531003&r1=1531002&r2=1531003&view=diff ============================================================================== --- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/AbstractSearchPanel.java (original) +++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/AbstractSearchPanel.java Thu Oct 10 14:37:56 2013 @@ -59,7 +59,7 @@ public abstract class AbstractSearchPane */ protected static final Logger LOG = LoggerFactory.getLogger(AbstractSearchPanel.class); - protected static final String[] ATTRIBUTES_NOTINCLUDED = {"attributes", "derivedAttributes", "virtualAttributes", + protected static final String[] ATTRIBUTES_NOTINCLUDED = {"attrs", "derAttrs", "virAttrs", "serialVersionUID", "memberships", "entitlements", "resources", "password", "propagationTOs", "propagationStatusMap"}; Added: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/AttrTemplatesPanel.java URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/AttrTemplatesPanel.java?rev=1531003&view=auto ============================================================================== --- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/AttrTemplatesPanel.java (added) +++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/AttrTemplatesPanel.java Thu Oct 10 14:37:56 2013 @@ -0,0 +1,171 @@ +/* + * 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.panels; + +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import org.apache.syncope.common.to.RoleTO; +import org.apache.syncope.common.types.AttributableType; +import org.apache.syncope.common.types.SchemaType; +import org.apache.syncope.console.commons.Constants; +import org.apache.syncope.console.commons.SelectChoiceRenderer; +import org.apache.syncope.console.rest.RoleRestClient; +import org.apache.syncope.console.rest.SchemaRestClient; +import org.apache.syncope.console.wicket.markup.html.form.NonI18nPalette; +import org.apache.wicket.ajax.AjaxRequestTarget; +import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; +import org.apache.wicket.event.Broadcast; +import org.apache.wicket.extensions.markup.html.form.palette.component.Recorder; +import org.apache.wicket.markup.html.panel.Panel; +import org.apache.wicket.model.PropertyModel; +import org.apache.wicket.model.util.ListModel; +import org.apache.wicket.spring.injection.annot.SpringBean; + +public class AttrTemplatesPanel extends Panel { + + public enum Type { + + rAttrTemplates, + rDerAttrTemplates, + rVirAttrTemplates, + mAttrTemplates, + mDerAttrTemplates, + mVirAttrTemplates; + + } + + private static final long serialVersionUID = 1016028222120619000L; + + @SpringBean + private SchemaRestClient schemaRestClient; + + @SpringBean + private RoleRestClient roleRestClient; + + private final RoleTO roleTO; + + private final NonI18nPalette rAttrTemplates; + + private final NonI18nPalette rDerAttrTemplates; + + private final NonI18nPalette rVirAttrTemplates; + + public AttrTemplatesPanel(final String id, final RoleTO roleTO) { + super(id); + this.roleTO = roleTO; + + rAttrTemplates = buildPalette(Type.rAttrTemplates, + schemaRestClient.getSchemaNames(AttributableType.ROLE, SchemaType.NORMAL)); + this.add(rAttrTemplates); + rDerAttrTemplates = buildPalette(Type.rDerAttrTemplates, + schemaRestClient.getSchemaNames(AttributableType.ROLE, SchemaType.DERIVED)); + this.add(rDerAttrTemplates); + rVirAttrTemplates = buildPalette(Type.rVirAttrTemplates, + schemaRestClient.getSchemaNames(AttributableType.ROLE, SchemaType.VIRTUAL)); + this.add(rVirAttrTemplates); + + this.add(buildPalette(Type.mAttrTemplates, + schemaRestClient.getSchemaNames(AttributableType.MEMBERSHIP, SchemaType.NORMAL))); + this.add(buildPalette(Type.mDerAttrTemplates, + schemaRestClient.getSchemaNames(AttributableType.MEMBERSHIP, SchemaType.DERIVED))); + this.add(buildPalette(Type.mVirAttrTemplates, + schemaRestClient.getSchemaNames(AttributableType.MEMBERSHIP, SchemaType.VIRTUAL))); + } + + private NonI18nPalette buildPalette(final Type type, final List allSchemas) { + if (allSchemas != null && !allSchemas.isEmpty()) { + Collections.sort(allSchemas); + } + ListModel availableSchemas = new ListModel(allSchemas); + + return new NonI18nPalette(type.name(), new PropertyModel>(roleTO, type.name()), + availableSchemas, new SelectChoiceRenderer(), 8, false) { + + private static final long serialVersionUID = 2295567122085510330L; + + @Override + protected Recorder newRecorderComponent() { + final Recorder recorder = super.newRecorderComponent(); + + switch (type) { + case rAttrTemplates: + case rDerAttrTemplates: + case rVirAttrTemplates: + recorder.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) { + + private static final long serialVersionUID = -1107858522700306810L; + + @Override + protected void onUpdate(final AjaxRequestTarget target) { + send(getPage(), Broadcast.BREADTH, new RoleAttrTemplatesChange(type, target)); + } + }); + break; + + default: + } + + return recorder; + } + }; + } + + public Collection getSelected(final Type type) { + Collection selected; + switch (type) { + case rAttrTemplates: + selected = this.rAttrTemplates.getModelCollection(); + break; + + case rDerAttrTemplates: + selected = this.rDerAttrTemplates.getModelCollection(); + break; + + case rVirAttrTemplates: + selected = this.rVirAttrTemplates.getModelCollection(); + break; + + default: + selected = Collections.emptyList(); + } + + return selected; + } + + public static class RoleAttrTemplatesChange { + + private final Type type; + + private final AjaxRequestTarget target; + + public RoleAttrTemplatesChange(final Type type, final AjaxRequestTarget target) { + this.type = type; + this.target = target; + } + + public Type getType() { + return type; + } + + public AjaxRequestTarget getTarget() { + return target; + } + } +} Propchange: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/AttrTemplatesPanel.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/AttrTemplatesPanel.java ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision HeadURL Propchange: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/AttrTemplatesPanel.java ------------------------------------------------------------------------------ svn:mime-type = text/plain 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=1531003&r1=1531002&r2=1531003&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 Thu Oct 10 14:37:56 2013 @@ -19,24 +19,28 @@ package org.apache.syncope.console.pages.panels; import java.util.ArrayList; -import java.util.Collection; import java.util.Date; import java.util.HashMap; +import java.util.HashSet; import java.util.List; +import java.util.ListIterator; import java.util.Map; +import java.util.Set; import java.util.TreeMap; import org.apache.commons.lang3.StringUtils; import org.apache.syncope.common.SyncopeConstants; import org.apache.syncope.common.to.AbstractAttributableTO; import org.apache.syncope.common.to.AttributeTO; +import org.apache.syncope.common.to.MembershipTO; import org.apache.syncope.common.to.RoleTO; import org.apache.syncope.common.to.SchemaTO; import org.apache.syncope.common.to.UserTO; import org.apache.syncope.common.types.AttributableType; import org.apache.syncope.common.types.AttributeSchemaType; -import org.apache.syncope.console.commons.Constants; import org.apache.syncope.console.commons.JexlHelpUtil; import org.apache.syncope.console.markup.html.list.AltListView; +import org.apache.syncope.console.pages.panels.AttrTemplatesPanel.RoleAttrTemplatesChange; +import org.apache.syncope.console.rest.RoleRestClient; import org.apache.syncope.console.rest.SchemaRestClient; import org.apache.syncope.console.wicket.markup.html.form.AjaxCheckBoxPanel; import org.apache.syncope.console.wicket.markup.html.form.AjaxDropDownChoicePanel; @@ -46,6 +50,7 @@ import org.apache.syncope.console.wicket import org.apache.syncope.console.wicket.markup.html.form.FieldPanel; import org.apache.syncope.console.wicket.markup.html.form.MultiValueSelectorPanel; import org.apache.wicket.ajax.markup.html.AjaxLink; +import org.apache.wicket.event.IEvent; import org.apache.wicket.markup.html.WebMarkupContainer; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.Form; @@ -53,8 +58,6 @@ import org.apache.wicket.markup.html.for import org.apache.wicket.markup.html.list.ListItem; import org.apache.wicket.markup.html.list.ListView; import org.apache.wicket.markup.html.panel.Panel; -import org.apache.wicket.model.IModel; -import org.apache.wicket.model.LoadableDetachableModel; import org.apache.wicket.model.Model; import org.apache.wicket.model.PropertyModel; import org.apache.wicket.spring.injection.annot.SpringBean; @@ -66,43 +69,37 @@ public class AttributesPanel extends Pan @SpringBean private SchemaRestClient schemaRestClient; - private final boolean templateMode; + @SpringBean + private RoleRestClient roleRestClient; - public AttributesPanel(final String id, final T entityTO, final Form form, - final boolean templateMode) { + private final AbstractAttributableTO entityTO; - super(id); - this.templateMode = templateMode; + private final boolean templateMode; - final IModel> schemas = new LoadableDetachableModel>() { + private final AttrTemplatesPanel attrTemplates; - private static final long serialVersionUID = -2012833443695917883L; + private final Map schemas = new TreeMap(); - @Override - protected Map load() { - final List schemaTOs; - if (entityTO instanceof RoleTO) { - schemaTOs = schemaRestClient.getSchemas(AttributableType.ROLE); - } else if (entityTO instanceof UserTO) { - schemaTOs = schemaRestClient.getSchemas(AttributableType.USER); - } else { - schemaTOs = schemaRestClient.getSchemas(AttributableType.MEMBERSHIP); - } + public AttributesPanel(final String id, final T entityTO, final Form form, + final boolean templateMode) { - final Map schemas = new TreeMap(); + this(id, entityTO, form, templateMode, null); + } - for (SchemaTO schemaTO : schemaTOs) { - schemas.put(schemaTO.getName(), schemaTO); - } + public AttributesPanel(final String id, final T entityTO, final Form form, + final boolean templateMode, final AttrTemplatesPanel attrTemplates) { - return schemas; - } - }; + super(id); + this.entityTO = entityTO; + this.templateMode = templateMode; + this.attrTemplates = attrTemplates; + this.setOutputMarkupId(true); - initEntityData(entityTO, schemas.getObject().values()); + setSchemas(); + setAttrs(); final ListView attributeView = new AltListView("schemas", - new PropertyModel>(entityTO, "attributes")) { + new PropertyModel>(entityTO, "attrs")) { private static final long serialVersionUID = 9101744072914090143L; @@ -122,10 +119,9 @@ public class AttributesPanel extends Pan item.add(new Label("name", attributeTO.getSchema())); - final FieldPanel panel = - getFieldPanel(schemas.getObject().get(attributeTO.getSchema()), form, attributeTO); + final FieldPanel panel = getFieldPanel(schemas.get(attributeTO.getSchema()), form, attributeTO); - if (templateMode || !schemas.getObject().get(attributeTO.getSchema()).isMultivalue()) { + if (templateMode || !schemas.get(attributeTO.getSchema()).isMultivalue()) { item.add(panel); } else { item.add(new MultiValueSelectorPanel( @@ -137,12 +133,54 @@ public class AttributesPanel extends Pan add(attributeView); } - private void initEntityData(final AbstractAttributableTO entityTO, final Collection schemas) { + private void filter(final List schemaTOs, final Set allowed) { + for (ListIterator itor = schemaTOs.listIterator(); itor.hasNext();) { + SchemaTO schema = itor.next(); + if (!allowed.contains(schema.getName())) { + itor.remove(); + } + } + } + + private void setSchemas() { + List schemaTOs; + + if (entityTO instanceof RoleTO) { + final RoleTO roleTO = (RoleTO) entityTO; + + schemaTOs = schemaRestClient.getSchemas(AttributableType.ROLE); + Set allowed; + if (attrTemplates == null) { + allowed = new HashSet(roleTO.getRAttrTemplates()); + } else { + allowed = new HashSet(attrTemplates.getSelected(AttrTemplatesPanel.Type.rAttrTemplates)); + if (roleTO.isInheritTemplates() && roleTO.getParent() != 0) { + allowed.addAll(roleRestClient.read(roleTO.getParent()).getRAttrTemplates()); + } + } + filter(schemaTOs, allowed); + } else if (entityTO instanceof UserTO) { + schemaTOs = schemaRestClient.getSchemas(AttributableType.USER); + } else { + schemaTOs = schemaRestClient.getSchemas(AttributableType.MEMBERSHIP); + Set allowed = new HashSet( + roleRestClient.read(((MembershipTO) entityTO).getRoleId()).getMAttrTemplates()); + filter(schemaTOs, allowed); + } + + schemas.clear(); + + for (SchemaTO schemaTO : schemaTOs) { + schemas.put(schemaTO.getName(), schemaTO); + } + } + + private void setAttrs() { final List entityData = new ArrayList(); - final Map attrMap = entityTO.getAttributeMap(); + final Map attrMap = entityTO.getAttrMap(); - for (SchemaTO schema : schemas) { + for (SchemaTO schema : schemas.values()) { AttributeTO attributeTO = new AttributeTO(); attributeTO.setSchema(schema.getName()); @@ -157,8 +195,8 @@ public class AttributesPanel extends Pan entityData.add(attributeTO); } - entityTO.getAttributes().clear(); - entityTO.getAttributes().addAll(entityData); + entityTO.getAttrs().clear(); + entityTO.getAttrs().addAll(entityData); } @SuppressWarnings({"rawtypes", "unchecked"}) @@ -245,11 +283,11 @@ public class AttributesPanel extends Pan final String[] values = StringUtils.isBlank(schemaTO.getEnumerationValues()) ? new String[0] - : schemaTO.getEnumerationValues().split(Constants.ENUM_VALUES_SEPARATOR); + : schemaTO.getEnumerationValues().split(SyncopeConstants.ENUM_VALUES_SEPARATOR); final String[] keys = StringUtils.isBlank(schemaTO.getEnumerationKeys()) ? new String[0] - : schemaTO.getEnumerationKeys().split(Constants.ENUM_VALUES_SEPARATOR); + : schemaTO.getEnumerationKeys().split(SyncopeConstants.ENUM_VALUES_SEPARATOR); for (int i = 0; i < values.length; i++) { res.put(values[i].trim(), keys.length > i ? keys[i].trim() : null); @@ -263,7 +301,7 @@ public class AttributesPanel extends Pan final String[] values = StringUtils.isBlank(schemaTO.getEnumerationValues()) ? new String[0] - : schemaTO.getEnumerationValues().split(Constants.ENUM_VALUES_SEPARATOR); + : schemaTO.getEnumerationValues().split(SyncopeConstants.ENUM_VALUES_SEPARATOR); for (String value : values) { res.add(value.trim()); @@ -271,4 +309,16 @@ public class AttributesPanel extends Pan return res; } + + @Override + public void onEvent(final IEvent event) { + if ((event.getPayload() instanceof RoleAttrTemplatesChange)) { + final RoleAttrTemplatesChange update = (RoleAttrTemplatesChange) event.getPayload(); + if (attrTemplates != null && update.getType() == AttrTemplatesPanel.Type.rAttrTemplates) { + setSchemas(); + setAttrs(); + update.getTarget().add(this); + } + } + } } Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/DerivedAttributesPanel.java URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/DerivedAttributesPanel.java?rev=1531003&r1=1531002&r2=1531003&view=diff ============================================================================== --- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/DerivedAttributesPanel.java (original) +++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/DerivedAttributesPanel.java Thu Oct 10 14:37:56 2013 @@ -18,13 +18,17 @@ */ package org.apache.syncope.console.pages.panels; +import java.util.ArrayList; import java.util.List; import org.apache.syncope.common.to.AbstractAttributableTO; import org.apache.syncope.common.to.AttributeTO; +import org.apache.syncope.common.to.MembershipTO; import org.apache.syncope.common.to.RoleTO; import org.apache.syncope.common.to.UserTO; import org.apache.syncope.common.types.AttributableType; import org.apache.syncope.console.commons.Constants; +import org.apache.syncope.console.pages.panels.AttrTemplatesPanel.RoleAttrTemplatesChange; +import org.apache.syncope.console.rest.RoleRestClient; import org.apache.syncope.console.rest.SchemaRestClient; import org.apache.syncope.console.wicket.markup.html.form.AjaxDecoratedCheckbox; import org.apache.wicket.Component; @@ -34,6 +38,7 @@ import org.apache.wicket.ajax.attributes import org.apache.wicket.ajax.attributes.IAjaxCallListener; import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; import org.apache.wicket.ajax.markup.html.form.AjaxButton; +import org.apache.wicket.event.IEvent; import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton; import org.apache.wicket.markup.html.WebMarkupContainer; import org.apache.wicket.markup.html.form.DropDownChoice; @@ -48,44 +53,57 @@ import org.apache.wicket.model.Model; import org.apache.wicket.model.PropertyModel; import org.apache.wicket.model.ResourceModel; import org.apache.wicket.spring.injection.annot.SpringBean; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; public class DerivedAttributesPanel extends Panel { - /** - * Logger. - */ - protected static final Logger LOG = LoggerFactory.getLogger(DerivedAttributesPanel.class); - private static final long serialVersionUID = -5387344116983102292L; @SpringBean private SchemaRestClient schemaRestClient; + @SpringBean + private RoleRestClient roleRestClient; + + private final AttrTemplatesPanel attrTemplates; + public DerivedAttributesPanel(final String id, final T entityTO) { + this(id, entityTO, null); + } + + public DerivedAttributesPanel(final String id, final T entityTO, + final AttrTemplatesPanel attrTemplates) { + super(id); + this.attrTemplates = attrTemplates; setOutputMarkupId(true); - final IModel> derivedSchemaNames = new LoadableDetachableModel>() { + final IModel> derSchemas = new LoadableDetachableModel>() { private static final long serialVersionUID = 5275935387613157437L; @Override protected List load() { - List derivedSchemaNames; + List derSchemaNames; + if (entityTO instanceof RoleTO) { - derivedSchemaNames = getDerivedSchemaNames(AttributableType.ROLE); + final RoleTO roleTO = (RoleTO) entityTO; + + if (attrTemplates == null) { + derSchemaNames = roleTO.getRDerAttrTemplates(); + } else { + derSchemaNames = new ArrayList( + attrTemplates.getSelected(AttrTemplatesPanel.Type.rDerAttrTemplates)); + if (roleTO.isInheritTemplates() && roleTO.getParent() != 0) { + derSchemaNames.addAll(roleRestClient.read(roleTO.getParent()).getRDerAttrTemplates()); + } + } } else if (entityTO instanceof UserTO) { - derivedSchemaNames = getDerivedSchemaNames(AttributableType.USER); + derSchemaNames = schemaRestClient.getDerSchemaNames(AttributableType.USER); } else { - derivedSchemaNames = getDerivedSchemaNames(AttributableType.MEMBERSHIP); + derSchemaNames = roleRestClient.read(((MembershipTO) entityTO).getRoleId()).getMDerAttrTemplates(); } - return derivedSchemaNames; - } - private List getDerivedSchemaNames(final AttributableType type) { - return schemaRestClient.getDerivedSchemaNames(type); + return derSchemaNames; } }; @@ -100,7 +118,7 @@ public class DerivedAttributesPanel exte @Override protected void onSubmit(final AjaxRequestTarget target, final Form form) { - entityTO.getDerivedAttributes().add(new AttributeTO()); + entityTO.getDerAttrs().add(new AttributeTO()); target.add(attributesContainer); } @@ -112,8 +130,8 @@ public class DerivedAttributesPanel exte add(addAttributeBtn.setDefaultFormProcessing(Boolean.FALSE)); - final ListView attributes = new ListView("attributes", - new PropertyModel>(entityTO, "derivedAttributes")) { + ListView attributes = new ListView("attrs", + new PropertyModel>(entityTO, "derAttrs")) { private static final long serialVersionUID = 9101744072914090143L; @@ -127,7 +145,7 @@ public class DerivedAttributesPanel exte @Override protected void onUpdate(final AjaxRequestTarget target) { - entityTO.getDerivedAttributes().remove(attributeTO); + entityTO.getDerAttrs().remove(attributeTO); target.add(attributesContainer); } @@ -149,15 +167,14 @@ public class DerivedAttributesPanel exte }); final DropDownChoice schemaChoice = new DropDownChoice("schema", - new PropertyModel(attributeTO, "schema"), derivedSchemaNames); + new PropertyModel(attributeTO, "schema"), derSchemas); schemaChoice.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_BLUR) { private static final long serialVersionUID = -1107858522700306810L; @Override - protected void onUpdate(final AjaxRequestTarget art) { - + protected void onUpdate(final AjaxRequestTarget target) { attributeTO.setSchema(schemaChoice.getModelObject()); } }); @@ -181,4 +198,14 @@ public class DerivedAttributesPanel exte attributesContainer.add(attributes); } + + @Override + public void onEvent(final IEvent event) { + if ((event.getPayload() instanceof RoleAttrTemplatesChange)) { + final RoleAttrTemplatesChange update = (RoleAttrTemplatesChange) event.getPayload(); + if (attrTemplates != null && update.getType() == AttrTemplatesPanel.Type.rDerAttrTemplates) { + update.getTarget().add(this); + } + } + } } Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/ResourceMappingPanel.java URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/ResourceMappingPanel.java?rev=1531003&r1=1531002&r2=1531003&view=diff ============================================================================== --- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/ResourceMappingPanel.java (original) +++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/ResourceMappingPanel.java Thu Oct 10 14:37:56 2013 @@ -577,13 +577,13 @@ public class ResourceMappingPanel extend case UserDerivedSchema: case RoleDerivedSchema: case MembershipDerivedSchema: - toBeUpdated.setChoices(schemaRestClient.getDerivedSchemaNames(type.getAttributableType())); + toBeUpdated.setChoices(schemaRestClient.getDerSchemaNames(type.getAttributableType())); break; case UserVirtualSchema: case RoleVirtualSchema: case MembershipVirtualSchema: - toBeUpdated.setChoices(schemaRestClient.getVirtualSchemaNames(type.getAttributableType())); + toBeUpdated.setChoices(schemaRestClient.getVirSchemaNames(type.getAttributableType())); break; case UserId: Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/RoleDetailsPanel.java URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/RoleDetailsPanel.java?rev=1531003&r1=1531002&r2=1531003&view=diff ============================================================================== --- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/RoleDetailsPanel.java (original) +++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/RoleDetailsPanel.java Thu Oct 10 14:37:56 2013 @@ -21,16 +21,21 @@ package org.apache.syncope.console.pages import org.apache.syncope.common.to.RoleTO; import org.apache.syncope.common.to.UserTO; import org.apache.syncope.common.types.AttributableType; +import org.apache.syncope.console.commons.Constants; import org.apache.syncope.console.commons.JexlHelpUtil; import org.apache.syncope.console.pages.RoleSelectModalPage; import org.apache.syncope.console.pages.UserOwnerSelectModalPage; +import org.apache.syncope.console.pages.panels.AttrTemplatesPanel.RoleAttrTemplatesChange; +import org.apache.syncope.console.pages.panels.AttrTemplatesPanel.Type; import org.apache.syncope.console.rest.RoleRestClient; import org.apache.syncope.console.rest.UserRestClient; import org.apache.syncope.console.wicket.markup.html.form.AjaxCheckBoxPanel; import org.apache.syncope.console.wicket.markup.html.form.AjaxTextFieldPanel; import org.apache.wicket.Page; import org.apache.wicket.ajax.AjaxRequestTarget; +import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; import org.apache.wicket.ajax.markup.html.AjaxLink; +import org.apache.wicket.event.Broadcast; import org.apache.wicket.event.IEvent; import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxLink; import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow; @@ -109,7 +114,7 @@ public class RoleDetailsPanel extends Pa } }; parentFragment.add(parentSelect); - final IndicatingAjaxLink parentReset = new IndicatingAjaxLink("parentReset") { + final IndicatingAjaxLink parentReset = new IndicatingAjaxLink("parentReset") { private static final long serialVersionUID = -7978723352517770644L; @@ -146,7 +151,7 @@ public class RoleDetailsPanel extends Pa userOwner.setReadOnly(true); userOwner.setOutputMarkupId(true); ownerContainer.add(userOwner); - final IndicatingAjaxLink userOwnerSelect = new IndicatingAjaxLink("userOwnerSelect") { + final IndicatingAjaxLink userOwnerSelect = new IndicatingAjaxLink("userOwnerSelect") { private static final long serialVersionUID = -7978723352517770644L; @@ -165,7 +170,7 @@ public class RoleDetailsPanel extends Pa } }; ownerContainer.add(userOwnerSelect); - final IndicatingAjaxLink userOwnerReset = new IndicatingAjaxLink("userOwnerReset") { + final IndicatingAjaxLink userOwnerReset = new IndicatingAjaxLink("userOwnerReset") { private static final long serialVersionUID = -7978723352517770644L; @@ -182,7 +187,7 @@ public class RoleDetailsPanel extends Pa roleOwner.setReadOnly(true); roleOwner.setOutputMarkupId(true); ownerContainer.add(roleOwner); - final IndicatingAjaxLink roleOwnerSelect = new IndicatingAjaxLink("roleOwnerSelect") { + final IndicatingAjaxLink roleOwnerSelect = new IndicatingAjaxLink("roleOwnerSelect") { private static final long serialVersionUID = -7978723352517770644L; @@ -202,7 +207,7 @@ public class RoleDetailsPanel extends Pa } }; ownerContainer.add(roleOwnerSelect); - final IndicatingAjaxLink roleOwnerReset = new IndicatingAjaxLink("roleOwnerReset") { + final IndicatingAjaxLink roleOwnerReset = new IndicatingAjaxLink("roleOwnerReset") { private static final long serialVersionUID = -7978723352517770644L; @@ -217,6 +222,21 @@ public class RoleDetailsPanel extends Pa final AjaxCheckBoxPanel inhOwner = new AjaxCheckBoxPanel("inheritOwner", "inheritOwner", new PropertyModel(roleTO, "inheritOwner")); this.add(inhOwner); + + final AjaxCheckBoxPanel inhTemplates = new AjaxCheckBoxPanel("inheritTemplates", "inheritTemplates", + new PropertyModel(roleTO, "inheritTemplates")); + inhTemplates.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) { + + private static final long serialVersionUID = -1107858522700306810L; + + @Override + protected void onUpdate(final AjaxRequestTarget target) { + send(getPage(), Broadcast.BREADTH, new RoleAttrTemplatesChange(Type.rAttrTemplates, target)); + send(getPage(), Broadcast.BREADTH, new RoleAttrTemplatesChange(Type.rDerAttrTemplates, target)); + send(getPage(), Broadcast.BREADTH, new RoleAttrTemplatesChange(Type.rVirAttrTemplates, target)); + } + }); + this.add(inhTemplates); } /** 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=1531003&r1=1531002&r2=1531003&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 Thu Oct 10 14:37:56 2013 @@ -31,6 +31,8 @@ import org.apache.syncope.console.common 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.rest.RoleRestClient; +import org.apache.syncope.console.rest.SchemaRestClient; import org.apache.syncope.console.wicket.markup.html.form.AjaxCheckBoxPanel; import org.apache.syncope.console.wicket.markup.html.form.AjaxPalettePanel; import org.apache.wicket.PageReference; @@ -47,12 +49,15 @@ public class RolePanel extends Panel { private static final long serialVersionUID = 4216376097320768369L; @SpringBean - private AuthRestClient entitlementRestClient; + private AuthRestClient authRestClient; + + @SpringBean + private SchemaRestClient schemaRestClient; @SpringBean private XMLRolesReader xmlRolesReader; - private final AjaxPalettePanel entitlementsPalette; + private final AjaxPalettePanel entitlements; public static class Builder implements Serializable { @@ -117,70 +122,75 @@ public class RolePanel extends Panel { this.add(new SysInfoPanel("systeminformation", builder.roleTO)); //-------------------------------- + // Attribute templates panel + //-------------------------------- + AttrTemplatesPanel attrTemplates = new AttrTemplatesPanel("templates", builder.roleTO); + this.add(attrTemplates); + + //-------------------------------- // Attributes panel + //-------------------------------- this.add(new AttributesPanel( - "attributes", builder.roleTO, builder.form, builder.mode == RoleModalPage.Mode.TEMPLATE)); + "attrs", builder.roleTO, builder.form, builder.mode == RoleModalPage.Mode.TEMPLATE, attrTemplates)); - final AjaxCheckBoxPanel inhAttributes = new AjaxCheckBoxPanel("inheritAttributes", "inheritAttributes", - new PropertyModel(builder.roleTO, "inheritAttributes")); + final AjaxCheckBoxPanel inhAttributes = new AjaxCheckBoxPanel("inheritAttrs", "inheritAttrs", + new PropertyModel(builder.roleTO, "inheritAttrs")); inhAttributes.setOutputMarkupId(true); this.add(inhAttributes); //-------------------------------- //-------------------------------- - // Derived attributes container + // Derived attributes panel //-------------------------------- - this.add(new DerivedAttributesPanel("derivedAttributes", builder.roleTO)); + this.add(new DerivedAttributesPanel("derAttrs", builder.roleTO, attrTemplates)); - final AjaxCheckBoxPanel inhDerivedAttributes = new AjaxCheckBoxPanel("inheritDerivedAttributes", - "inheritDerivedAttributes", new PropertyModel(builder.roleTO, "inheritDerivedAttributes")); - inhDerivedAttributes.setOutputMarkupId(true); + final AjaxCheckBoxPanel inhDerivedAttributes = new AjaxCheckBoxPanel("inheritDerAttrs", + "inheritDerAttrs", new PropertyModel(builder.roleTO, "inheritDerAttrs")); inhDerivedAttributes.setOutputMarkupId(true); this.add(inhDerivedAttributes); //-------------------------------- //-------------------------------- - // Virtual attributes container + // Virtual attributes panel //-------------------------------- this.add(new VirtualAttributesPanel( - "virtualAttributes", builder.roleTO, builder.mode == RoleModalPage.Mode.TEMPLATE)); + "virAttrs", builder.roleTO, builder.mode == RoleModalPage.Mode.TEMPLATE, attrTemplates)); - final AjaxCheckBoxPanel inhVirtualAttributes = new AjaxCheckBoxPanel("inheritVirtualAttributes", - "inheritVirtualAttributes", new PropertyModel(builder.roleTO, "inheritVirtualAttributes")); - inhVirtualAttributes.setOutputMarkupId(true); + final AjaxCheckBoxPanel inhVirtualAttributes = new AjaxCheckBoxPanel("inheritVirAttrs", + "inheritVirAttrs", new PropertyModel(builder.roleTO, "inheritVirAttrs")); inhVirtualAttributes.setOutputMarkupId(true); this.add(inhVirtualAttributes); //-------------------------------- //-------------------------------- - // Security container + // Resources panel //-------------------------------- - - this.add(new RoleSecurityPanel("security", builder.roleTO).setOutputMarkupId(true)); + this.add(new ResourcesPanel.Builder("resources").attributableTO(builder.roleTO).build(). + setOutputMarkupId(true)); //-------------------------------- //-------------------------------- - // Resources container - //-------------------------------- - - this.add(new ResourcesPanel.Builder("resources").attributableTO(builder.roleTO).build() - .setOutputMarkupId(true)); + // Entitlements //-------------------------------- - ListModel selectedEntitlements = new ListModel(builder.roleTO.getEntitlements()); - List allEntitlements = entitlementRestClient.getAllEntitlements(); + List allEntitlements = authRestClient.getAllEntitlements(); if (allEntitlements != null && !allEntitlements.isEmpty()) { Collections.sort(allEntitlements); } ListModel availableEntitlements = new ListModel(allEntitlements); - entitlementsPalette = - new AjaxPalettePanel("entitlementsPalette", selectedEntitlements, availableEntitlements); - this.add(entitlementsPalette); + entitlements = new AjaxPalettePanel("entitlements", selectedEntitlements, availableEntitlements); + this.add(entitlements); + + //-------------------------------- + // Security panel + //-------------------------------- + this.add(new RoleSecurityPanel("security", builder.roleTO).setOutputMarkupId(true)); + //-------------------------------- } public Collection getSelectedEntitlements() { - return this.entitlementsPalette.getModelCollection(); + return this.entitlements.getModelCollection(); } } Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/SyncTasks.java URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/SyncTasks.java?rev=1531003&r1=1531002&r2=1531003&view=diff ============================================================================== --- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/SyncTasks.java (original) +++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/SyncTasks.java Thu Oct 10 14:37:56 2013 @@ -264,6 +264,7 @@ public class SyncTasks extends AbstractT Form paginatorForm = new Form("PaginatorForm"); + @SuppressWarnings({"unchecked", "rawtypes"}) final DropDownChoice rowsChooser = new DropDownChoice("rowsChooser", new PropertyModel(this, "paginatorRows"), prefMan.getPaginatorChoices()); @@ -292,7 +293,7 @@ public class SyncTasks extends AbstractT add(paginatorForm); // create new user - AjaxLink createLink = new ClearIndicatingAjaxLink("createLink", pageRef) { + AjaxLink createLink = new ClearIndicatingAjaxLink("createLink", pageRef) { private static final long serialVersionUID = -7978723352517770644L; Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchResultPanel.java URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchResultPanel.java?rev=1531003&r1=1531002&r2=1531003&view=diff ============================================================================== --- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchResultPanel.java (original) +++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchResultPanel.java Thu Oct 10 14:37:56 2013 @@ -79,8 +79,8 @@ public class UserSearchResultPanel exten super(id, filtered, searchCond, callerRef, restClient); this.schemaNames = schemaRestClient.getSchemaNames(AttributableType.USER); - this.dSchemaNames = schemaRestClient.getDerivedSchemaNames(AttributableType.USER); - this.vSchemaNames = schemaRestClient.getVirtualSchemaNames(AttributableType.USER); + this.dSchemaNames = schemaRestClient.getDerSchemaNames(AttributableType.USER); + this.vSchemaNames = schemaRestClient.getVirSchemaNames(AttributableType.USER); initResultTable(); } Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/VirtualAttributesPanel.java URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/VirtualAttributesPanel.java?rev=1531003&r1=1531002&r2=1531003&view=diff ============================================================================== --- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/VirtualAttributesPanel.java (original) +++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/VirtualAttributesPanel.java Thu Oct 10 14:37:56 2013 @@ -19,16 +19,22 @@ package org.apache.syncope.console.pages.panels; import java.util.ArrayList; -import java.util.HashMap; +import java.util.HashSet; import java.util.List; +import java.util.ListIterator; import java.util.Map; +import java.util.Set; +import java.util.TreeMap; import org.apache.syncope.common.to.AbstractAttributableTO; import org.apache.syncope.common.to.AttributeTO; +import org.apache.syncope.common.to.MembershipTO; import org.apache.syncope.common.to.RoleTO; import org.apache.syncope.common.to.UserTO; import org.apache.syncope.common.to.VirSchemaTO; import org.apache.syncope.common.types.AttributableType; import org.apache.syncope.console.commons.Constants; +import org.apache.syncope.console.pages.panels.AttrTemplatesPanel.RoleAttrTemplatesChange; +import org.apache.syncope.console.rest.RoleRestClient; import org.apache.syncope.console.rest.SchemaRestClient; import org.apache.syncope.console.wicket.markup.html.form.AjaxDecoratedCheckbox; import org.apache.syncope.console.wicket.markup.html.form.AjaxTextFieldPanel; @@ -39,6 +45,7 @@ import org.apache.wicket.ajax.attributes import org.apache.wicket.ajax.attributes.AjaxRequestAttributes; import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; import org.apache.wicket.ajax.markup.html.form.AjaxButton; +import org.apache.wicket.event.IEvent; import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton; import org.apache.wicket.markup.html.WebMarkupContainer; import org.apache.wicket.markup.html.form.ChoiceRenderer; @@ -61,43 +68,78 @@ public class VirtualAttributesPanel exte @SpringBean private SchemaRestClient schemaRestClient; + @SpringBean + private RoleRestClient roleRestClient; + + private final AttrTemplatesPanel attrTemplates; + + private final Map schemas = new TreeMap(); + public VirtualAttributesPanel(final String id, final T entityTO, final boolean templateMode) { + this(id, entityTO, templateMode, null); + } + + public VirtualAttributesPanel(final String id, final T entityTO, + final boolean templateMode, final AttrTemplatesPanel attrTemplates) { + super(id); + this.attrTemplates = attrTemplates; + this.setOutputMarkupId(true); - setOutputMarkupId(true); + final IModel> virSchemas = new LoadableDetachableModel>() { - final IModel> schemas = - new LoadableDetachableModel>() { + private static final long serialVersionUID = 5275935387613157437L; - private static final long serialVersionUID = -5489981430516587774L; + private void filter(final List schemaTOs, final Set allowed) { + for (ListIterator itor = schemaTOs.listIterator(); itor.hasNext();) { + VirSchemaTO schema = itor.next(); + if (!allowed.contains(schema.getName())) { + itor.remove(); + } + } + } @Override - protected Map load() { - final List schemaTOs; + protected List load() { + List schemaTOs; + if (entityTO instanceof RoleTO) { - schemaTOs = schemaRestClient.getVirtualSchemas(AttributableType.ROLE); + final RoleTO roleTO = (RoleTO) entityTO; + + schemaTOs = schemaRestClient.getVirSchemas(AttributableType.ROLE); + Set allowed; + if (attrTemplates == null) { + allowed = new HashSet(roleTO.getRVirAttrTemplates()); + } else { + allowed = new HashSet(attrTemplates.getSelected( + AttrTemplatesPanel.Type.rVirAttrTemplates)); + if (roleTO.isInheritTemplates() && roleTO.getParent() != 0) { + allowed.addAll(roleRestClient.read(roleTO.getParent()).getRVirAttrTemplates()); + } + } + filter(schemaTOs, allowed); } else if (entityTO instanceof UserTO) { - schemaTOs = schemaRestClient.getVirtualSchemas(AttributableType.USER); + schemaTOs = schemaRestClient.getVirSchemas(AttributableType.USER); } else { - schemaTOs = schemaRestClient.getVirtualSchemas(AttributableType.MEMBERSHIP); + schemaTOs = schemaRestClient.getVirSchemas(AttributableType.MEMBERSHIP); + Set allowed = new HashSet( + roleRestClient.read(((MembershipTO) entityTO).getRoleId()).getMVirAttrTemplates()); + filter(schemaTOs, allowed); } - final Map schemas = new HashMap(); + schemas.clear(); for (VirSchemaTO schemaTO : schemaTOs) { schemas.put(schemaTO.getName(), schemaTO); } - return schemas; + return new ArrayList(schemas.keySet()); } }; - final List virtualSchemaNames = new ArrayList(schemas.getObject().keySet()); - final WebMarkupContainer attributesContainer = new WebMarkupContainer("virAttrContainer"); - attributesContainer.setOutputMarkupId(true); add(attributesContainer); @@ -107,7 +149,7 @@ public class VirtualAttributesPanel exte @Override protected void onSubmit(final AjaxRequestTarget target, final Form form) { - entityTO.getVirtualAttributes().add(new AttributeTO()); + entityTO.getVirAttrs().add(new AttributeTO()); target.add(attributesContainer); } @@ -119,12 +161,13 @@ public class VirtualAttributesPanel exte add(addAttributeBtn.setDefaultFormProcessing(Boolean.FALSE)); - ListView attributes = new ListView("attributes", - new PropertyModel>(entityTO, "virtualAttributes")) { + ListView attributes = new ListView("attrs", + new PropertyModel>(entityTO, "virAttrs")) { private static final long serialVersionUID = 9101744072914090143L; @Override + @SuppressWarnings("unchecked") protected void populateItem(final ListItem item) { final AttributeTO attributeTO = item.getModelObject(); @@ -134,7 +177,7 @@ public class VirtualAttributesPanel exte @Override protected void onUpdate(final AjaxRequestTarget target) { - entityTO.getVirtualAttributes().add(attributeTO); + entityTO.getVirAttrs().remove(attributeTO); target.add(attributesContainer); } @@ -160,7 +203,7 @@ public class VirtualAttributesPanel exte } if (attributeTO.getSchema() != null) { - VirSchemaTO attributeSchema = schemas.getObject().get(attributeTO.getSchema()); + VirSchemaTO attributeSchema = schemas.get(attributeTO.getSchema()); if (attributeSchema != null) { attributeTO.setReadonly(attributeSchema.isReadonly()); } @@ -175,12 +218,12 @@ public class VirtualAttributesPanel exte } else { panel = new AjaxTextFieldPanel("panel", "values", new Model(null)); panel.setReadOnly(attributeTO.isReadonly()); - multiPanel = new MultiValueSelectorPanel("values", new PropertyModel>(attributeTO, - "values"), panel); + multiPanel = new MultiValueSelectorPanel("values", + new PropertyModel>(attributeTO, "values"), panel); } final DropDownChoice schemaChoice = new DropDownChoice("schema", - new PropertyModel(attributeTO, "schema"), virtualSchemaNames, + new PropertyModel(attributeTO, "schema"), virSchemas, new ChoiceRenderer() { private static final long serialVersionUID = 3109256773218160485L; @@ -201,13 +244,11 @@ public class VirtualAttributesPanel exte @Override protected void onUpdate(final AjaxRequestTarget target) { - attributeTO.setSchema(schemaChoice.getModelObject()); - VirSchemaTO attributeSchema = - schemas.getObject().get(attributeTO.getSchema()); - if (attributeSchema != null) { - attributeTO.setReadonly(attributeSchema.isReadonly()); + VirSchemaTO virSchema = schemas.get(attributeTO.getSchema()); + if (virSchema != null) { + attributeTO.setReadonly(virSchema.isReadonly()); panel.setReadOnly(attributeTO.isReadonly()); } @@ -241,4 +282,14 @@ public class VirtualAttributesPanel exte attributesContainer.add(attributes); } + + @Override + public void onEvent(final IEvent event) { + if ((event.getPayload() instanceof RoleAttrTemplatesChange)) { + final RoleAttrTemplatesChange update = (RoleAttrTemplatesChange) event.getPayload(); + if (attrTemplates != null && update.getType() == AttrTemplatesPanel.Type.rVirAttrTemplates) { + update.getTarget().add(this); + } + } + } } Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/SchemaRestClient.java URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/SchemaRestClient.java?rev=1531003&r1=1531002&r2=1531003&view=diff ============================================================================== --- syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/SchemaRestClient.java (original) +++ syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/SchemaRestClient.java Thu Oct 10 14:37:56 2013 @@ -60,7 +60,6 @@ public class SchemaRestClient extends Ba * * @return List of schemas. */ - @SuppressWarnings("unchecked") public List getSchemas(final AttributableType type) { List schemas = null; @@ -73,6 +72,21 @@ public class SchemaRestClient extends Ba return schemas; } + public List getSchemaNames(final AttributableType attrType, final SchemaType schemaType) { + final List schemaNames = new ArrayList(); + + try { + final List schemas = getSchemas(attrType, schemaType); + for (AbstractSchemaTO schemaTO : schemas) { + schemaNames.add(schemaTO.getName()); + } + } catch (SyncopeClientCompositeException e) { + LOG.error("While getting all user schema names", e); + } + + return schemaNames; + } + /** * Get schema names. * @@ -82,8 +96,7 @@ public class SchemaRestClient extends Ba final List schemaNames = new ArrayList(); try { - @SuppressWarnings("unchecked") - final List schemas = getService(SchemaService.class).list(type, SchemaType.NORMAL); + final List schemas = getSchemas(type); for (SchemaTO schemaTO : schemas) { schemaNames.add(schemaTO.getName()); } @@ -100,17 +113,16 @@ public class SchemaRestClient extends Ba * @return List of derived schemas. */ @SuppressWarnings("unchecked") - public List getDerivedSchemas(final AttributableType type) { - - List userDerivedSchemas = null; + public List getDerSchemas(final AttributableType type) { + List userDerSchemas = null; try { - userDerivedSchemas = getService(SchemaService.class).list(type, SchemaType.DERIVED); + userDerSchemas = getService(SchemaService.class).list(type, SchemaType.DERIVED); } catch (SyncopeClientCompositeException e) { LOG.error("While getting all user derived schemas", e); } - return userDerivedSchemas; + return userDerSchemas; } /** @@ -118,21 +130,20 @@ public class SchemaRestClient extends Ba * * @return List of derived schema names. */ - public List getDerivedSchemaNames(final AttributableType type) { - final List userDerivedSchemasNames = new ArrayList(); + public List getDerSchemaNames(final AttributableType type) { + final List userDerSchemasNames = new ArrayList(); try { - @SuppressWarnings("unchecked") final List userDerSchemas = getService(SchemaService.class).list(type, SchemaType.DERIVED); for (DerSchemaTO schemaTO : userDerSchemas) { - userDerivedSchemasNames.add(schemaTO.getName()); + userDerSchemasNames.add(schemaTO.getName()); } } catch (SyncopeClientCompositeException e) { LOG.error("While getting all user derived schema names", e); } - return userDerivedSchemasNames; + return userDerSchemasNames; } /** @@ -141,16 +152,16 @@ public class SchemaRestClient extends Ba * @return List of derived schemas. */ @SuppressWarnings("unchecked") - public List getVirtualSchemas(final AttributableType type) { - List userVirtualSchemas = null; + public List getVirSchemas(final AttributableType type) { + List userVirSchemas = null; try { - userVirtualSchemas = getService(SchemaService.class).list(type, SchemaType.VIRTUAL); + userVirSchemas = getService(SchemaService.class).list(type, SchemaType.VIRTUAL); } catch (SyncopeClientCompositeException e) { LOG.error("While getting all user derived schemas", e); } - return userVirtualSchemas; + return userVirSchemas; } /** @@ -158,20 +169,20 @@ public class SchemaRestClient extends Ba * * @return List of virtual schema names. */ - public List getVirtualSchemaNames(final AttributableType type) { - final List userVirtualSchemasNames = new ArrayList(); + public List getVirSchemaNames(final AttributableType type) { + final List userVirSchemasNames = new ArrayList(); try { @SuppressWarnings("unchecked") final List userVirSchemas = getService(SchemaService.class).list(type, SchemaType.VIRTUAL); for (VirSchemaTO schemaTO : userVirSchemas) { - userVirtualSchemasNames.add(schemaTO.getName()); + userVirSchemasNames.add(schemaTO.getName()); } } catch (SyncopeClientCompositeException e) { LOG.error("While getting all user derived schema names", e); } - return userVirtualSchemasNames; + return userVirSchemasNames; } /** @@ -226,7 +237,7 @@ public class SchemaRestClient extends Ba * * @param schemaTO */ - public void createDerivedSchema(final AttributableType type, final DerSchemaTO schemaTO) { + public void createDerSchema(final AttributableType type, final DerSchemaTO schemaTO) { getService(SchemaService.class).create(type, SchemaType.DERIVED, schemaTO); } @@ -235,7 +246,7 @@ public class SchemaRestClient extends Ba * * @param schemaTO */ - public void createVirtualSchema(final AttributableType type, final VirSchemaTO schemaTO) { + public void createVirSchema(final AttributableType type, final VirSchemaTO schemaTO) { getService(SchemaService.class).create(type, SchemaType.VIRTUAL, schemaTO); } @@ -243,9 +254,9 @@ public class SchemaRestClient extends Ba * Load an already existent user derived schema by its name. * * @param name (e.g.:surname) - * @return DerivedSchemaTO + * @return DerSchemaTO */ - public DerSchemaTO readDerivedSchema(final AttributableType type, final String name) { + public DerSchemaTO readDerSchema(final AttributableType type, final String name) { DerSchemaTO derivedSchemaTO = null; try { derivedSchemaTO = getService(SchemaService.class).read(type, SchemaType.DERIVED, name); @@ -260,7 +271,7 @@ public class SchemaRestClient extends Ba * * @param schemaTO updated */ - public void updateDerivedSchema(final AttributableType type, final DerSchemaTO schemaTO) { + public void updateDerSchema(final AttributableType type, final DerSchemaTO schemaTO) { getService(SchemaService.class).update(type, SchemaType.DERIVED, schemaTO.getName(), schemaTO); } @@ -269,7 +280,7 @@ public class SchemaRestClient extends Ba * * @param schemaTO updated */ - public void updateVirtualSchema(final AttributableType type, final VirSchemaTO schemaTO) { + public void updateVirSchema(final AttributableType type, final VirSchemaTO schemaTO) { getService(SchemaService.class).update(type, SchemaType.VIRTUAL, schemaTO.getName(), schemaTO); } @@ -278,7 +289,7 @@ public class SchemaRestClient extends Ba * * @param name (e.g.:surname) */ - public DerSchemaTO deleteDerivedSchema(final AttributableType type, final String name) { + public DerSchemaTO deleteDerSchema(final AttributableType type, final String name) { DerSchemaTO schemaTO = getService(SchemaService.class).read(type, SchemaType.DERIVED, name); getService(SchemaService.class).delete(type, SchemaType.DERIVED, name); return schemaTO; @@ -289,7 +300,7 @@ public class SchemaRestClient extends Ba * * @param name (e.g.:surname) */ - public VirSchemaTO deleteVirtualSchema(final AttributableType type, final String name) { + public VirSchemaTO deleteVirSchema(final AttributableType type, final String name) { VirSchemaTO schemaTO = getService(SchemaService.class).read(type, SchemaType.VIRTUAL, name); getService(SchemaService.class).delete(type, SchemaType.VIRTUAL, name); return schemaTO; Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/extensions/markup/html/repeater/data/table/AttrColumn.java URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/extensions/markup/html/repeater/data/table/AttrColumn.java?rev=1531003&r1=1531002&r2=1531003&view=diff ============================================================================== --- syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/extensions/markup/html/repeater/data/table/AttrColumn.java (original) +++ syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/extensions/markup/html/repeater/data/table/AttrColumn.java Thu Oct 10 14:37:56 2013 @@ -53,22 +53,20 @@ public class AttrColumn extends Abstract switch (schemaType) { case NORMAL: - if (rowModel.getObject().getAttributeMap().containsKey(name)) { - values = rowModel.getObject().getAttributeMap().get(name).getValues(); + if (rowModel.getObject().getAttrMap().containsKey(name)) { + values = rowModel.getObject().getAttrMap().get(name).getValues(); } break; case VIRTUAL: - if (rowModel.getObject().getVirtualAttributeMap().containsKey(name)) { - - values = rowModel.getObject().getVirtualAttributeMap().get(name).getValues(); + if (rowModel.getObject().getVirAttrMap().containsKey(name)) { + values = rowModel.getObject().getVirAttrMap().get(name).getValues(); } break; case DERIVED: - if (rowModel.getObject().getDerivedAttributeMap().containsKey(name)) { - - values = rowModel.getObject().getDerivedAttributeMap().get(name).getValues(); + if (rowModel.getObject().getDerAttrMap().containsKey(name)) { + values = rowModel.getObject().getDerAttrMap().get(name).getValues(); } break; Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/markup/html/form/AjaxCheckBoxPanel.java URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/markup/html/form/AjaxCheckBoxPanel.java?rev=1531003&r1=1531002&r2=1531003&view=diff ============================================================================== --- syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/markup/html/form/AjaxCheckBoxPanel.java (original) +++ syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/markup/html/form/AjaxCheckBoxPanel.java Thu Oct 10 14:37:56 2013 @@ -20,13 +20,13 @@ package org.apache.syncope.console.wicke import java.io.Serializable; import java.util.List; +import org.apache.commons.lang3.StringUtils; import org.apache.syncope.console.commons.Constants; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; import org.apache.wicket.markup.html.form.CheckBox; import org.apache.wicket.model.IModel; import org.apache.wicket.model.Model; -import org.springframework.util.StringUtils; public class AjaxCheckBoxPanel extends FieldPanel { @@ -73,7 +73,7 @@ public class AjaxCheckBoxPanel extends F public Serializable getObject() { Boolean value = null; - if (list != null && !list.isEmpty() && StringUtils.hasText(list.get(0).toString())) { + if (list != null && !list.isEmpty() && StringUtils.isNotBlank(list.get(0).toString())) { value = "true".equalsIgnoreCase(list.get(0).toString()); } @@ -82,7 +82,7 @@ public class AjaxCheckBoxPanel extends F @Override public void setObject(final Serializable object) { - if (object != null && object instanceof Boolean) { + if (object instanceof Boolean) { list.clear(); list.add(((Boolean) object).toString()); } Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/markup/html/form/AjaxPalettePanel.java URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/markup/html/form/AjaxPalettePanel.java?rev=1531003&r1=1531002&r2=1531003&view=diff ============================================================================== --- syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/markup/html/form/AjaxPalettePanel.java (original) +++ syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/markup/html/form/AjaxPalettePanel.java Thu Oct 10 14:37:56 2013 @@ -31,7 +31,7 @@ public class AjaxPalettePanel extends private static final long serialVersionUID = 7738499668258805567L; - final Palette palette; + protected final Palette palette; public AjaxPalettePanel(final String id, final IModel> model, final ListModel choices) { this(id, model, choices, false); @@ -60,7 +60,7 @@ public class AjaxPalettePanel extends } @Override - public AbstractFieldPanel setModelObject(final Serializable object) { + public AjaxPalettePanel setModelObject(final Serializable object) { palette.setDefaultModelObject(object); return this; } Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/markup/html/form/FieldPanel.java URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/markup/html/form/FieldPanel.java?rev=1531003&r1=1531002&r2=1531003&view=diff ============================================================================== --- syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/markup/html/form/FieldPanel.java (original) +++ syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/markup/html/form/FieldPanel.java Thu Oct 10 14:37:56 2013 @@ -28,15 +28,15 @@ import org.apache.wicket.markup.html.pan import org.apache.wicket.model.IModel; import org.apache.wicket.model.Model; -public abstract class FieldPanel extends AbstractFieldPanel { +public abstract class FieldPanel extends AbstractFieldPanel implements Cloneable { private static final long serialVersionUID = -198988924922541273L; protected FormComponent field = null; - final protected String id; + protected final String id; - final protected String name; + protected final String name; protected String title = null; @@ -58,7 +58,7 @@ public abstract class FieldPanel setTitle(final String title) { this.title = title; field.add(AttributeModifier.replace("title", title != null ? title @@ -67,7 +67,7 @@ public abstract class FieldPanel setStyleSheet(final String classes) { field.add(AttributeModifier.replace("class", classes != null ? classes : "")); @@ -75,25 +75,25 @@ public abstract class FieldPanel setRequired(boolean required) { field.setRequired(required); return this; } - public FieldPanel setReadOnly(boolean readOnly) { + public FieldPanel setReadOnly(boolean readOnly) { field.setEnabled(!readOnly); return this; } - public FieldPanel setNewModel(final IModel model) { + public FieldPanel setNewModel(final IModel model) { field.setModel(model); return this; } @Override - public FieldPanel setModelObject(T object) { + public FieldPanel setModelObject(T object) { field.setModelObject(object); return this; } @@ -116,36 +116,37 @@ public abstract class FieldPanel item) { - setNewModel(new Model() { + public FieldPanel setNewModel(final ListItem item) { + setNewModel(new Model() { private static final long serialVersionUID = 6799404673615637845L; @Override - public Serializable getObject() { + public T getObject() { return item.getModelObject(); } @Override - public void setObject(final Serializable object) { + public void setObject(final T object) { if (object != null && !object.toString().isEmpty()) { - item.setModelObject((T) object); + item.setModelObject(object); } } }); return this; } - public FieldPanel setNewModel(final List list) { + @SuppressWarnings({"unchecked", "rawtypes"}) + public FieldPanel setNewModel(final List list) { setNewModel(new Model() { private static final long serialVersionUID = 1088212074765051906L; @Override public Serializable getObject() { - return list != null && !list.isEmpty() - ? list.get(0) - : null; + return list == null || list.isEmpty() + ? null + : list.get(0); } @Override @@ -162,11 +163,12 @@ public abstract class FieldPanel clone() { + final FieldPanel panel; try { - panel = this.getClass().getConstructor(new Class[]{String.class, String.class, IModel.class}) - .newInstance(id, name, new Model(null)); + panel = this.getClass().getConstructor(new Class[] {String.class, String.class, IModel.class}) + .newInstance(id, name, new Model(null)); } catch (Exception e) { LOG.error("Error cloning field panel", e); return null; @@ -183,7 +185,7 @@ public abstract class FieldPanel addRequiredLabel() { if (!isRequired()) { setRequired(true); } @@ -199,7 +201,7 @@ public abstract class FieldPanel removeRequiredLabel() { if (isRequired()) { setRequired(false); } Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/markup/html/tree/TreeActionLinkPanel.java URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/markup/html/tree/TreeActionLinkPanel.java?rev=1531003&r1=1531002&r2=1531003&view=diff ============================================================================== --- syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/markup/html/tree/TreeActionLinkPanel.java (original) +++ syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/markup/html/tree/TreeActionLinkPanel.java Thu Oct 10 14:37:56 2013 @@ -51,7 +51,7 @@ public class TreeActionLinkPanel extends @SpringBean private XMLRolesReader xmlRolesReader; - private Fragment fragment; + private final Fragment fragment; public TreeActionLinkPanel(final String id, final long idRole, final ModalWindow window, final PageReference pageRef) { @@ -61,10 +61,9 @@ public class TreeActionLinkPanel extends fragment = new Fragment("menuPanel", idRole == 0 ? "fakerootFrag" : "roleFrag", this); - fragment.setOutputMarkupId(true); - final AjaxLink createRoleLink = new ClearIndicatingAjaxLink("createRoleLink", pageRef) { + final AjaxLink createRoleLink = new ClearIndicatingAjaxLink("createRoleLink", pageRef) { private static final long serialVersionUID = -7978723352517770644L; @@ -78,8 +77,7 @@ public class TreeActionLinkPanel extends public Page createPage() { RoleTO roleTO = new RoleTO(); roleTO.setParent(idRole); - RoleModalPage form = new RoleModalPage(pageRef, window, roleTO); - return form; + return new RoleModalPage(pageRef, window, roleTO); } }); @@ -87,14 +85,14 @@ public class TreeActionLinkPanel extends } }; - MetaDataRoleAuthorizationStrategy.authorize(createRoleLink, ENABLE, xmlRolesReader.getAllAllowedRoles("Roles", - "create")); + MetaDataRoleAuthorizationStrategy.authorize(createRoleLink, ENABLE, + xmlRolesReader.getAllAllowedRoles("Roles", "create")); createRoleLink.setOutputMarkupId(true); fragment.add(createRoleLink); if (idRole != 0) { - final AjaxLink updateRoleLink = new ClearIndicatingAjaxLink("updateRoleLink", pageRef) { + final AjaxLink updateRoleLink = new ClearIndicatingAjaxLink("updateRoleLink", pageRef) { private static final long serialVersionUID = -7978723352517770644L; @@ -106,9 +104,7 @@ public class TreeActionLinkPanel extends @Override public Page createPage() { - RoleTO roleTO = restClient.read(idRole); - RoleModalPage form = new RoleModalPage(pageRef, window, roleTO); - return form; + return new RoleModalPage(pageRef, window, restClient.read(idRole)); } }); @@ -116,20 +112,20 @@ public class TreeActionLinkPanel extends } }; - MetaDataRoleAuthorizationStrategy.authorize(updateRoleLink, ENABLE, xmlRolesReader.getAllAllowedRoles( - "Roles", "read")); + MetaDataRoleAuthorizationStrategy.authorize(updateRoleLink, ENABLE, + xmlRolesReader.getAllAllowedRoles("Roles", "read")); updateRoleLink.setOutputMarkupId(true); fragment.add(updateRoleLink); - final AjaxLink dropRoleLink = new IndicatingOnConfirmAjaxLink("dropRoleLink", pageRef) { + final AjaxLink dropRoleLink = new IndicatingOnConfirmAjaxLink("dropRoleLink", pageRef) { private static final long serialVersionUID = -7978723352517770644L; @Override protected void onClickInternal(final AjaxRequestTarget target) { try { - final RoleTO roleTO = (RoleTO) restClient.delete(idRole); + final RoleTO roleTO = restClient.delete(idRole); ((Roles) pageRef.getPage()).setModalResult(true); @@ -151,8 +147,8 @@ public class TreeActionLinkPanel extends } }; - MetaDataRoleAuthorizationStrategy.authorize(dropRoleLink, ENABLE, xmlRolesReader.getAllAllowedRoles( - "Roles", "delete")); + MetaDataRoleAuthorizationStrategy.authorize(dropRoleLink, ENABLE, + xmlRolesReader.getAllAllowedRoles("Roles", "delete")); dropRoleLink.setOutputMarkupId(true); fragment.add(dropRoleLink); Modified: syncope/trunk/console/src/main/resources/log4j2.xml URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/log4j2.xml?rev=1531003&r1=1531002&r2=1531003&view=diff ============================================================================== --- syncope/trunk/console/src/main/resources/log4j2.xml (original) +++ syncope/trunk/console/src/main/resources/log4j2.xml Thu Oct 10 14:37:56 2013 @@ -41,19 +41,19 @@ under the License. - + - + - + - + @@ -61,7 +61,7 @@ under the License. - + Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/BaseModalPage.html URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/BaseModalPage.html?rev=1531003&r1=1531002&r2=1531003&view=diff ============================================================================== --- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/BaseModalPage.html (original) +++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/BaseModalPage.html Thu Oct 10 14:37:56 2013 @@ -27,6 +27,7 @@ under the License. Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/BasePage.html URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/BasePage.html?rev=1531003&r1=1531002&r2=1531003&view=diff ============================================================================== --- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/BasePage.html (original) +++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/BasePage.html Thu Oct 10 14:37:56 2013 @@ -42,6 +42,7 @@ under the License. $(document).ready(function() { $("#tabs").tabs(); $("#roletabs").tabs(); + $("#attrTemplateTabs").tabs(); $("#user").tabs(); $("#role").tabs(); $("#membership").tabs(); Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/MembershipModalPage.html URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/MembershipModalPage.html?rev=1531003&r1=1531002&r2=1531003&view=diff ============================================================================== --- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/MembershipModalPage.html (original) +++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/MembershipModalPage.html Thu Oct 10 14:37:56 2013 @@ -28,7 +28,7 @@ under the License.
- [membership attributes] + [membership attributes] [System Information]
@@ -39,11 +39,11 @@ under the License.
- [membership derived attributes] + [membership derived attributes]
- [membership virtual attributes] + [membership virtual attributes]
Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/MembershipModalPage.properties URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/MembershipModalPage.properties?rev=1531003&r1=1531002&r2=1531003&view=diff ============================================================================== --- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/MembershipModalPage.properties (original) +++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/MembershipModalPage.properties Thu Oct 10 14:37:56 2013 @@ -22,14 +22,14 @@ add=+ drop=- edit=Edit delete=Delete -derivedAttributes=Derived Attributes -derivedAttributeToBeRemoved=Delete -derivedAttributeName=Name -derivedAttributeValue=Derived value +derAttrs=Derived Attributes +derAttrToRemove=Delete +derAttrName=Name +derAttrValue=Derived value -virtualAttributes=Virtual Attributes -virtualAttributeToBeRemoved=Delete -virtualAttributeName=Name -virtualAttributeValue=Virtual value +virAttrs=Virtual Attributes +virAttrToRemove=Delete +virAttrName=Name +virAttrValue=Virtual value addAttributeBtn=Add