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/01/03 18:38:35 UTC
svn commit: r1428501 - in /syncope/trunk: ./
console/src/main/java/org/apache/syncope/console/commons/
console/src/main/java/org/apache/syncope/console/pages/
console/src/main/java/org/apache/syncope/console/pages/panels/
console/src/main/resources/org...
Author: ilgrosso
Date: Thu Jan 3 17:38:35 2013
New Revision: 1428501
URL: http://svn.apache.org/viewvc?rev=1428501&view=rev
Log:
[SYNCOPE-260] Unmerging unwanted commit for WIP SYNCOPE-172
Modified:
syncope/trunk/ (props changed)
syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/PreferenceManager.java
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ReportletConfModalPage.java
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/PoliciesPanel.java
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/ResourceMappingPanel.java
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage.html
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage.properties
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage_it.properties
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/ResourceMappingPanel.html
Propchange: syncope/trunk/
------------------------------------------------------------------------------
Reverse-merged /syncope/branches/1_0_X:r1421371-1428462
Merged /syncope/branches/1_0_X:r1428463-1428498
Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/PreferenceManager.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/PreferenceManager.java?rev=1428501&r1=1428500&r2=1428501&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/PreferenceManager.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/PreferenceManager.java Thu Jan 3 17:38:35 2013
@@ -148,7 +148,7 @@ public class PreferenceManager {
try {
cookieUtils.save(PREFMAN_KEY, new String(Base64.encodeBase64(setPrefs(current).getBytes())));
} catch (IOException e) {
- LOG.error("Could not save {} info: {}", getClass().getSimpleName(), current, e);
+ LOG.error("Could not save {} info: {}", new Object[]{getClass().getSimpleName(), current, e});
}
}
@@ -166,7 +166,7 @@ public class PreferenceManager {
try {
cookieUtils.save(PREFMAN_KEY, new String(Base64.encodeBase64(setPrefs(current).getBytes())));
} catch (IOException e) {
- LOG.error("Could not save {} info: {}", getClass().getSimpleName(), current, e);
+ LOG.error("Could not save {} info: {}", new Object[]{getClass().getSimpleName(), current, e});
}
}
Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ReportletConfModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ReportletConfModalPage.java?rev=1428501&r1=1428500&r2=1428501&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ReportletConfModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ReportletConfModalPage.java Thu Jan 3 17:38:35 2013
@@ -113,7 +113,6 @@ public class ReportletConfModalPage exte
final AjaxDropDownChoicePanel<String> reportletClass = new AjaxDropDownChoicePanel<String>("reportletClass",
"reportletClass", new IModel<String>() {
-
private static final long serialVersionUID = -2316468110411802130L;
@Override
@@ -143,7 +142,6 @@ public class ReportletConfModalPage exte
((DropDownChoice) reportletClass.getField()).setNullValid(true);
reportletClass.addRequiredLabel();
reportletClass.getField().add(new AjaxFormComponentUpdatingBehavior("onchange") {
-
private static final long serialVersionUID = 5538299138211283825L;
@Override
@@ -158,7 +156,6 @@ public class ReportletConfModalPage exte
propertiesContainer.add(buildPropView());
final AjaxButton submit = new AjaxButton("apply", new ResourceModel("apply")) {
-
private static final long serialVersionUID = -958724007591692537L;
@Override
@@ -192,7 +189,6 @@ public class ReportletConfModalPage exte
form.add(submit);
final IndicatingAjaxButton cancel = new IndicatingAjaxButton("cancel", new ResourceModel("cancel")) {
-
private static final long serialVersionUID = -958724007591692537L;
@Override
@@ -235,7 +231,6 @@ public class ReportletConfModalPage exte
private ListView<String> buildPropView() {
LoadableDetachableModel<List<String>> propViewModel = new LoadableDetachableModel<List<String>>() {
-
private static final long serialVersionUID = 5275935387613157437L;
@Override
@@ -254,7 +249,6 @@ public class ReportletConfModalPage exte
};
propView = new ListView<String>("propView", propViewModel) {
-
private static final long serialVersionUID = 9101744072914090143L;
@Override
@@ -268,8 +262,8 @@ public class ReportletConfModalPage exte
try {
field = ReportletConfModalPage.this.reportletConf.getClass().getDeclaredField(fieldName);
} catch (Exception e) {
- LOG.error("Could not find field {} in class {}", fieldName,
- ReportletConfModalPage.this.reportletConf.getClass(), e);
+ LOG.error("Could not find field {} in class {}", new Object[]{fieldName,
+ ReportletConfModalPage.this.reportletConf.getClass(), e});
}
if (field == null) {
return;
@@ -291,8 +285,7 @@ public class ReportletConfModalPage exte
Class<?> listItemType = String.class;
if (field.getGenericType() instanceof ParameterizedType) {
- listItemType =
- (Class<?>) ((ParameterizedType) field.getGenericType()).getActualTypeArguments()[0];
+ listItemType = (Class<?>) ((ParameterizedType) field.getGenericType()).getActualTypeArguments()[0];
}
FormAttributeField annotation = field.getAnnotation(FormAttributeField.class);
Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java?rev=1428501&r1=1428500&r2=1428501&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java Thu Jan 3 17:38:35 2013
@@ -26,7 +26,6 @@ import org.apache.syncope.console.pages.
import org.apache.syncope.console.pages.panels.ResourceMappingPanel;
import org.apache.syncope.console.pages.panels.ResourceSecurityPanel;
import org.apache.syncope.console.rest.ResourceRestClient;
-import org.apache.syncope.types.AttributableType;
import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.form.AjaxButton;
@@ -64,10 +63,9 @@ public class ResourceModalPage extends B
//--------------------------------
//--------------------------------
- // Resource mapping panels
+ // Resource mapping panel
//--------------------------------
- form.add(new ResourceMappingPanel("umapping", resourceTO, AttributableType.USER));
- form.add(new ResourceMappingPanel("rmapping", resourceTO, AttributableType.ROLE));
+ form.add(new ResourceMappingPanel("mapping", resourceTO));
//--------------------------------
//--------------------------------
Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/PoliciesPanel.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/PoliciesPanel.java?rev=1428501&r1=1428500&r2=1428501&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/PoliciesPanel.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/PoliciesPanel.java Thu Jan 3 17:38:35 2013
@@ -22,6 +22,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
+
import org.apache.wicket.Page;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
@@ -184,8 +185,8 @@ public class PoliciesPanel extends Panel
} catch (SyncopeClientCompositeErrorException e) {
error(getString("operation_error"));
- LOG.error("While deleting resource {}({})", accountPolicyTO.getId(),
- accountPolicyTO.getDescription(), e);
+ LOG.error("While deleting resource {}({})", new Object[] { accountPolicyTO.getId(),
+ accountPolicyTO.getDescription() }, e);
}
target.add(container);
@@ -292,7 +293,7 @@ public class PoliciesPanel extends Panel
Collections.sort(policies, comparator);
- return policies.subList((int) first, (int) first + (int) count).iterator();
+ return policies.subList((int)first, (int)first + (int)count).iterator();
}
@Override
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=1428501&r1=1428500&r2=1428501&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 Jan 3 17:38:35 2013
@@ -39,10 +39,7 @@ import org.apache.syncope.console.wicket
import org.apache.syncope.types.AttributableType;
import org.apache.syncope.types.ConnConfProperty;
import org.apache.syncope.types.IntMappingType;
-import org.apache.wicket.Component;
import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.attributes.AjaxCallListener;
-import org.apache.wicket.ajax.attributes.AjaxRequestAttributes;
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
import org.apache.wicket.ajax.markup.html.form.AjaxButton;
import org.apache.wicket.event.IEvent;
@@ -58,106 +55,91 @@ import org.apache.wicket.model.ResourceM
import org.apache.wicket.spring.injection.annot.SpringBean;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.apache.wicket.Component;
+import org.apache.wicket.ajax.attributes.AjaxCallListener;
+import org.apache.wicket.ajax.attributes.AjaxRequestAttributes;
/**
* Resource mapping panel.
*/
public class ResourceMappingPanel extends Panel {
- private static final long serialVersionUID = -7982691107029848579L;
-
/**
- * Logger.
- */
- private static final Logger LOG = LoggerFactory.getLogger(ResourceMappingPanel.class);
-
- /**
- * OnChange event name.
- */
- private static final String ON_CHANGE = "onchange";
-
- /**
- * Mapping field style sheet.
+ * Serial verion UID.
*/
- private static final String FIELD_STYLE = "ui-widget-content ui-corner-all short_fixedsize";
-
- /**
- * Mapping field style sheet.
- */
- private static final String DEF_FIELD_STYLE = "ui-widget-content ui-corner-all";
+ private static final long serialVersionUID = -7982691107029848579L;
/**
- * Mapping field style sheet.
+ * Logger.
*/
- private static final String SHORT_FIELD_STYLE = "ui-widget-content ui-corner-all veryshort_fixedsize";
+ protected static final Logger LOG = LoggerFactory.getLogger(ResourceMappingPanel.class);
/**
* Schema rest client.
*/
@SpringBean
- private SchemaRestClient schemaRestClient;
+ private transient SchemaRestClient schemaRestClient;
/**
* ConnInstance rest client.
*/
@SpringBean
- private ConnectorRestClient connRestClient;
+ private transient ConnectorRestClient connRestClient;
/**
* Resource schema name.
*/
- private final List<String> schemaNames;
+ private transient List<String> schemaNames;
/**
* Internal attribute types.
*/
- private final List<IntMappingType> attrTypes = new ArrayList<IntMappingType>();
+ private transient List<IntMappingType> attrTypes = new ArrayList<IntMappingType>();
/**
* Add mapping button.
*/
- private final AjaxButton addMappingBtn;
+ private final transient AjaxButton addMappingBtn;
/**
* All mappings.
*/
- private final ListView mappings;
+ private final transient ListView mappings;
/**
* External resource to be updated.
*/
- private final ResourceTO resourceTO;
-
- private final AttributableType attrType;
+ private final transient ResourceTO resourceTO;
/**
* Mapping container.
*/
- private final WebMarkupContainer mappingContainer;
+ private final transient WebMarkupContainer mappingContainer;
/**
* AccountLink container.
*/
- private final WebMarkupContainer accountLinkContainer;
+ private final transient WebMarkupContainer accountLinkContainer;
- private MappingTO getMapping() {
- MappingTO result = null;
+ /**
+ * OnChange event name.
+ */
+ private static String onchange = "onchange";
- if (AttributableType.USER == attrType) {
- if (this.resourceTO.getUmapping() == null) {
- this.resourceTO.setUmapping(new MappingTO());
- }
- result = this.resourceTO.getUmapping();
- }
- if (AttributableType.ROLE == attrType) {
- if (this.resourceTO.getRmapping() == null) {
- this.resourceTO.setRmapping(new MappingTO());
- }
- result = this.resourceTO.getRmapping();
- }
+ /**
+ * Mapping field style sheet.
+ */
+ private static String fieldStyle = "ui-widget-content ui-corner-all short_fixedsize";
- return result;
- }
+ /**
+ * Mapping field style sheet.
+ */
+ private static String defFieldStyle = "ui-widget-content ui-corner-all";
+
+ /**
+ * Mapping field style sheet.
+ */
+ private static String shortFieldStyle = "ui-widget-content ui-corner-all veryshort_fixedsize";
/**
* Attribute Mapping Panel.
@@ -165,26 +147,24 @@ public class ResourceMappingPanel extend
* @param panelid panel id.
* @param resourceTO external resource.
*/
- public ResourceMappingPanel(final String panelid, final ResourceTO resourceTO, final AttributableType attrType) {
+ public ResourceMappingPanel(final String panelid, final ResourceTO resourceTO) {
+
super(panelid);
setOutputMarkupId(true);
this.resourceTO = resourceTO;
- this.attrType = attrType;
-
- if (this.resourceTO.getConnectorId() != null && this.resourceTO.getConnectorId() > 0) {
- schemaNames =
- getResourceSchemaNames(this.resourceTO.getConnectorId(), this.resourceTO.getConnConfProperties());
- } else {
- schemaNames = Collections.<String>emptyList();
+ if (resourceTO.getUmapping() == null) {
+ resourceTO.setUmapping(new MappingTO());
}
+ initResourceSchemaNames();
+
accountLinkContainer = new WebMarkupContainer("accountLinkContainer");
accountLinkContainer.setOutputMarkupId(true);
add(accountLinkContainer);
boolean accountLinkEnabled = false;
- if (getMapping().getAccountLink() != null) {
+ if (resourceTO.getUmapping().getAccountLink() != null) {
accountLinkEnabled = true;
}
final AjaxCheckBoxPanel accountLinkCheckbox = new AjaxCheckBoxPanel("accountLinkCheckbox",
@@ -195,7 +175,7 @@ public class ResourceMappingPanel extend
accountLinkContainer.add(accountLinkCheckbox);
final AjaxTextFieldPanel accountLink = new AjaxTextFieldPanel("accountLink", new ResourceModel("accountLink",
- "accountLink").getObject(), new PropertyModel<String>(getMapping(), "accountLink"));
+ "accountLink").getObject(), new PropertyModel<String>(resourceTO.getUmapping(), "accountLink"));
accountLink.setEnabled(accountLinkEnabled);
accountLinkContainer.add(accountLink);
@@ -223,8 +203,11 @@ public class ResourceMappingPanel extend
mappingContainer.setOutputMarkupId(true);
add(mappingContainer);
- mappings = new ListView<MappingItemTO>("mappings", getMapping().getItems()) {
+ mappings = new ListView<MappingItemTO>("mappings", resourceTO.getUmapping().getItems()) {
+ /**
+ * Serial version UID.
+ */
private static final long serialVersionUID = 4949588177564901031L;
@Override
@@ -232,12 +215,14 @@ public class ResourceMappingPanel extend
final MappingItemTO mapItem = item.getModelObject();
- AttributableType entity = null;
+ final AttributableType entity;
if (mapItem.getIntMappingType() != null) {
entity = mapItem.getIntMappingType().getAttributableType();
+ } else {
+ entity = null;
}
- attrTypes.clear();
- attrTypes.addAll(getAttributeTypes(entity));
+
+ attrTypes = getAttributeTypes(entity);
item.add(new AjaxDecoratedCheckbox("toRemove", new Model<Boolean>(Boolean.FALSE)) {
@@ -246,25 +231,25 @@ public class ResourceMappingPanel extend
@Override
protected void onUpdate(final AjaxRequestTarget target) {
int index = -1;
- for (int i = 0; i < getMapping().getItems().size() && index == -1; i++) {
- if (mapItem.equals(getMapping().getItems().get(i))) {
+ for (int i = 0; i < resourceTO.getUmapping().getItems().size() && index == -1; i++) {
+ if (mapItem.equals(resourceTO.getUmapping().getItems().get(i))) {
index = i;
}
}
if (index != -1) {
- getMapping().getItems().remove(index);
+ resourceTO.getUmapping().getItems().remove(index);
item.getParent().removeAll();
target.add(mappingContainer);
}
}
@Override
- protected void updateAjaxAttributes(final AjaxRequestAttributes attributes) {
+ protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
super.updateAjaxAttributes(attributes);
final AjaxCallListener ajaxCallListener = new AjaxCallListener() {
-
+
private static final long serialVersionUID = 7160235486520935153L;
@Override
@@ -280,7 +265,7 @@ public class ResourceMappingPanel extend
getString("intAttrNames"), new PropertyModel<String>(mapItem, "intAttrName"));
intAttrNames.setChoices(schemaNames);
intAttrNames.setRequired(true);
- intAttrNames.setStyleSheet(FIELD_STYLE);
+ intAttrNames.setStyleSheet(fieldStyle);
item.add(intAttrNames);
final AjaxDropDownChoicePanel<IntMappingType> typesPanel =
@@ -292,25 +277,25 @@ public class ResourceMappingPanel extend
typesPanel.setRequired(true);
typesPanel.setChoices(attrTypes);
- typesPanel.setStyleSheet(FIELD_STYLE);
+ typesPanel.setStyleSheet(fieldStyle);
item.add(typesPanel);
final AjaxDropDownChoicePanel mappingTypesPanel = new AjaxDropDownChoicePanel("mappingTypes",
new ResourceModel("mappingTypes", "mappingTypes").getObject(), new Model(entity));
mappingTypesPanel.setChoices(Arrays.asList(AttributableType.values()));
- mappingTypesPanel.setStyleSheet(DEF_FIELD_STYLE);
+ mappingTypesPanel.setStyleSheet(defFieldStyle);
item.add(mappingTypesPanel);
- mappingTypesPanel.getField().add(new AjaxFormComponentUpdatingBehavior(ON_CHANGE) {
+ mappingTypesPanel.getField().add(new AjaxFormComponentUpdatingBehavior(onchange) {
private static final long serialVersionUID = -1107858522700306810L;
@Override
protected void onUpdate(final AjaxRequestTarget target) {
- attrTypes.clear();
- attrTypes.addAll(getAttributeTypes((AttributableType) mappingTypesPanel.getModelObject()));
+
+ attrTypes = getAttributeTypes((AttributableType) mappingTypesPanel.getModelObject());
typesPanel.setChoices(attrTypes);
List<String> emptyList = Collections.emptyList();
@@ -323,9 +308,11 @@ public class ResourceMappingPanel extend
});
final FieldPanel extAttrName;
+
if (schemaNames.isEmpty()) {
extAttrName = new AjaxTextFieldPanel("extAttrName", new ResourceModel("extAttrNames",
"extAttrNames").getObject(), new PropertyModel<String>(mapItem, "extAttrName"));
+
} else {
extAttrName = new AjaxDropDownChoicePanel<String>("extAttrName", new ResourceModel("extAttrNames",
"extAttrNames").getObject(), new PropertyModel(mapItem, "extAttrName"));
@@ -337,10 +324,11 @@ public class ResourceMappingPanel extend
required = true;
}
+
extAttrName.setRequired(required);
extAttrName.setEnabled(required);
- extAttrName.setStyleSheet(FIELD_STYLE);
+ extAttrName.setStyleSheet(fieldStyle);
item.add(extAttrName);
final AjaxTextFieldPanel mandatory = new AjaxTextFieldPanel("mandatoryCondition", new ResourceModel(
@@ -349,14 +337,14 @@ public class ResourceMappingPanel extend
mandatory.setChoices(Arrays.asList(new String[]{"true", "false"}));
- mandatory.setStyleSheet(SHORT_FIELD_STYLE);
+ mandatory.setStyleSheet(shortFieldStyle);
item.add(mandatory);
final AjaxCheckBoxPanel accountId = new AjaxCheckBoxPanel("accountId", new ResourceModel("accountId",
"accountId").getObject(), new PropertyModel(mapItem, "accountid"));
- accountId.getField().add(new AjaxFormComponentUpdatingBehavior(ON_CHANGE) {
+ accountId.getField().add(new AjaxFormComponentUpdatingBehavior(onchange) {
private static final long serialVersionUID = -1107858522700306810L;
@@ -374,7 +362,7 @@ public class ResourceMappingPanel extend
final AjaxCheckBoxPanel password = new AjaxCheckBoxPanel("password", new ResourceModel("password",
"password").getObject(), new PropertyModel(mapItem, "password"));
- password.getField().add(new AjaxFormComponentUpdatingBehavior(ON_CHANGE) {
+ password.getField().add(new AjaxFormComponentUpdatingBehavior(onchange) {
private static final long serialVersionUID = -1107858522700306810L;
@@ -391,11 +379,8 @@ public class ResourceMappingPanel extend
});
item.add(password);
- if (AttributableType.USER != ResourceMappingPanel.this.attrType) {
- password.setVisible(false);
- }
- typesPanel.getField().add(new AjaxFormComponentUpdatingBehavior(ON_CHANGE) {
+ typesPanel.getField().add(new AjaxFormComponentUpdatingBehavior(onchange) {
private static final long serialVersionUID = -1107858522700306810L;
@@ -423,7 +408,7 @@ public class ResourceMappingPanel extend
@Override
protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
- getMapping().getItems().add(new MappingItemTO());
+ resourceTO.getUmapping().getItems().add(new MappingItemTO());
target.add(mappingContainer);
}
@@ -434,8 +419,20 @@ public class ResourceMappingPanel extend
};
addMappingBtn.setDefaultFormProcessing(false);
- addMappingBtn.setEnabled(this.resourceTO.getConnectorId() != null && this.resourceTO.getConnectorId() > 0);
+ addMappingBtn.setEnabled(resourceTO.getConnectorId() != null && resourceTO.getConnectorId() > 0);
mappingContainer.add(addMappingBtn);
+
+ }
+
+ /**
+ * Initialize resource schema names.
+ */
+ private void initResourceSchemaNames() {
+ if (resourceTO != null && resourceTO.getConnectorId() != null && resourceTO.getConnectorId() > 0) {
+ schemaNames = getResourceSchemaNames(resourceTO.getConnectorId(), resourceTO.getConnConfProperties());
+ } else {
+ schemaNames = Collections.emptyList();
+ }
}
/**
@@ -449,11 +446,13 @@ public class ResourceMappingPanel extend
final List<String> names = new ArrayList<String>();
try {
+
final ConnInstanceTO connInstanceTO = new ConnInstanceTO();
connInstanceTO.setId(connectorId);
connInstanceTO.setConfiguration(conf);
names.addAll(connRestClient.getSchemaNames(connInstanceTO));
+
} catch (Exception e) {
LOG.warn("Error retrieving resource schema names", e);
}
@@ -463,7 +462,9 @@ public class ResourceMappingPanel extend
@Override
public void onEvent(final IEvent<?> event) {
+
if (event.getPayload() instanceof ConnConfModEvent) {
+
final AjaxRequestTarget target = ((ConnConfModEvent) event.getPayload()).getTarget();
final List<ConnConfProperty> conf = ((ConnConfModEvent) event.getPayload()).getConfiguration();
@@ -472,9 +473,7 @@ public class ResourceMappingPanel extend
addMappingBtn.setEnabled(resourceTO.getConnectorId() != null && resourceTO.getConnectorId() > 0);
- schemaNames.clear();
- schemaNames.addAll(
- getResourceSchemaNames(resourceTO.getConnectorId(), new HashSet<ConnConfProperty>(conf)));
+ schemaNames = getResourceSchemaNames(resourceTO.getConnectorId(), new HashSet<ConnConfProperty>(conf));
target.add(mappingContainer);
}
@@ -518,8 +517,6 @@ public class ResourceMappingPanel extend
case UserId:
case Password:
case Username:
- case RoleId:
- case RoleName:
default:
toBeUpdated.setRequired(false);
toBeUpdated.setEnabled(false);
Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage.html
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage.html?rev=1428501&r1=1428500&r2=1428501&view=diff
==============================================================================
--- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage.html (original)
+++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage.html Thu Jan 3 17:38:35 2013
@@ -49,23 +49,21 @@ under the License.
<div id="tabs">
<ul>
<li class="tabs-selected"><a href="#resource"><span><wicket:message key="resource"/></span></a></li>
- <li><a href="#umapping"><span><wicket:message key="umapping"/></span></a></li>
- <li><a href="#rmapping"><span><wicket:message key="rmapping"/></span></a></li>
+ <li><a href="#mappings"><span><wicket:message key="mappings"/></span></a></li>
<li><a href="#connectorProperties"><span><wicket:message key="connectorProperties"/></span></a></li>
<li><a href="#security"><span><wicket:message key="security"/></span></a></li>
</ul>
<div id="resource">
<span wicket:id="details">[details]</span>
</div>
- <div id="umapping">
- <span wicket:id="umapping">[umapping]</span>
- </div>
- <div id="rmapping">
- <span wicket:id="rmapping">[rmapping]</span>
+ <div id="mappings">
+ <span wicket:id="mapping">[mapping]</span>
</div>
+
<div id="connectorProperties">
<span wicket:id="connconf">[connconf]</span>
</div>
+
<div id="security">
<span wicket:id="security">[security]</span>
</div>
Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage.properties
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage.properties?rev=1428501&r1=1428500&r2=1428501&view=diff
==============================================================================
--- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage.properties (original)
+++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage.properties Thu Jan 3 17:38:35 2013
@@ -14,8 +14,8 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-resource=Resource details
-umapping=User mapping
+resource=Resource Details
+mappings=Schema Mappings
connectorProperties=Connector properties
security=Security
create_attribute=Create new resource
@@ -25,7 +25,7 @@ existing_resources=Existing resources
action=Action
edit_attribute=Edit resource
title=Resource
-extAttrNames=External attributes
+extAttrNames=External Attributes
intMappingTypes=Internal mapping types
entity=Entity
roleSchema=Role Schema
@@ -35,7 +35,7 @@ password=Password
mappingUserSchema=Mapping User Schema
mappingRoleSchema=Mapping Role Schema
delete=Delete
-intAttrNames=Internal attributes
+intAttrNames=Internal Attributes
enforceMandatoryCondition=Enforce mandatory condition
fieldName=Field name
@@ -50,10 +50,9 @@ deleteTraceLevel=Delete trace level
syncTraceLevel=Synchronization trace level
propagationPriority=Propagation priority
propagationPrimary=Propagation primary
-resetToken=Reset token
+resetToken=Reset Token
success_connection=Successful connection
error_connection=Connection failure
check=Check connection
actionsClass=Actions class
-rmapping=Role mapping
Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage_it.properties
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage_it.properties?rev=1428501&r1=1428500&r2=1428501&view=diff
==============================================================================
--- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage_it.properties (original)
+++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage_it.properties Thu Jan 3 17:38:35 2013
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
resource=Dettagli Risorsa
-umapping=Mapping utenti
+mappings=Schema Mapping
connectorProperties=Propriet\u00e0\u00a0 Connettore
security=Sicurezza
@@ -51,10 +51,9 @@ deleteTraceLevel=Livello di tracciamento
syncTraceLevel=Livello di tracciamento delle sincronizzazioni
propagationPriority=Priorit\u00e0 in propagazione
propagationPrimary=Primaria in propagazione
-resetToken=Reset token
+resetToken=Reset Token
success_connection=Connessione avvenuta con successo
error_connection=Connessione non riuscita
check=Verifica connessione
actionsClass=Classe azioni
-rmapping=Mapping ruoli
Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/ResourceMappingPanel.html
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/ResourceMappingPanel.html?rev=1428501&r1=1428500&r2=1428501&view=diff
==============================================================================
--- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/ResourceMappingPanel.html (original)
+++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/ResourceMappingPanel.html Thu Jan 3 17:38:35 2013
@@ -16,99 +16,101 @@ KIND, either express or implied. See th
specific language governing permissions and limitations
under the License.
-->
-<wicket:panel>
- <div id="formtable">
- <div class="tablerow">
- <div class="tablecolumn_field all_dynamicsize">
- <table id="mappingUserSchema"
- class="ui-widget ui-widget-content ui-corner-all"
- style="font-size: 1em;margin-top:2px;"
- width="100%" cellpadding="2px" cellspacing="1px"
- wicket:id="mappingContainer">
- <thead>
- <tr class="ui-widget-header">
- <th><wicket:message key="delete"/></th>
- <th><wicket:message key="entity"/></th>
- <th><wicket:message key="intMappingTypes"/></th>
- <th><wicket:message key="intAttrNames"/></th>
- <th><wicket:message key="extAttrNames"/></th>
- <th><wicket:message key="mandatoryCondition"/></th>
- <th><wicket:message key="accountId"/></th>
- <th><wicket:message key="password"/></th>
- </tr>
- </thead>
- <tfoot>
- <tr>
- <td colspan="7" style="padding: 5px">
- <input type="submit" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
- wicket:id="addUserSchemaMappingBtn" />
- </td>
- </tr>
- </tfoot>
- <tbody>
- <tr wicket:id="mappings">
- <td align="center" valign="middle">
- <input type="checkbox" class="text ui-widget-content ui-corner-all" wicket:id="toRemove"/>
- </td>
- <td align="center" valign="middle">
- <span wicket:id="mappingTypes">[mappingTypes]</span>
- </td>
- <td align="center" valign="middle">
- <span wicket:id="intMappingTypes">[intMappingTypes]</span>
- </td>
- <td align="center" valign="middle">
- <span wicket:id="intAttrNames">[intAttrNames]</span>
- </td>
- <td align="center" valign="middle">
- <span wicket:id="extAttrName">[extAttrName]</span>
- </td>
- <td align="center" valign="middle">
- <span wicket:id="mandatoryCondition">[mandatoryCondition]</span>
- </td>
- <td align="center" valign="middle">
- <span wicket:id="accountId">[accountId]</span>
- </td>
- <td align="center" valign="middle">
- <span wicket:id="password">[password]</span>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
+<html>
+ <wicket:panel>
+ <div id="formtable">
+ <div class="tablerow">
+ <div class="tablecolumn_field all_dynamicsize">
+ <table id="mappingUserSchema"
+ class="ui-widget ui-widget-content ui-corner-all"
+ style="font-size: 1em;margin-top:2px;"
+ width="100%" cellpadding="2px" cellspacing="1px"
+ wicket:id="mappingContainer">
+ <thead>
+ <tr class="ui-widget-header">
+ <th><wicket:message key="delete"/></th>
+ <th><wicket:message key="entity"/></th>
+ <th><wicket:message key="intMappingTypes"/></th>
+ <th><wicket:message key="intAttrNames"/></th>
+ <th><wicket:message key="extAttrNames"/></th>
+ <th><wicket:message key="mandatoryCondition"/></th>
+ <th><wicket:message key="accountId"/></th>
+ <th><wicket:message key="password"/></th>
+ </tr>
+ </thead>
+ <tfoot>
+ <tr>
+ <td colspan="7" style="padding: 5px">
+ <input type="submit" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="addUserSchemaMappingBtn" />
+ </td>
+ </tr>
+ </tfoot>
+ <tbody>
+ <tr wicket:id="mappings">
+ <td align="center" valign="middle">
+ <input type="checkbox" class="text ui-widget-content ui-corner-all" wicket:id="toRemove"/>
+ </td>
+ <td align="center" valign="middle">
+ <span wicket:id="mappingTypes">[mappingTypes]</span>
+ </td>
+ <td align="center" valign="middle">
+ <span wicket:id="intMappingTypes">[intMappingTypes]</span>
+ </td>
+ <td align="center" valign="middle">
+ <span wicket:id="intAttrNames">[intAttrNames]</span>
+ </td>
+ <td align="center" valign="middle">
+ <span wicket:id="extAttrName">[extAttrName]</span>
+ </td>
+ <td align="center" valign="middle">
+ <span wicket:id="mandatoryCondition">[mandatoryCondition]</span>
+ </td>
+ <td align="center" valign="middle">
+ <span wicket:id="accountId">[accountId]</span>
+ </td>
+ <td align="center" valign="middle">
+ <span wicket:id="password">[password]</span>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
- <div class="tablerow">
- <div class="tablecolumn_field all_dynamicsize">
- <table id="accountLinkTable"
- class="ui-widget ui-widget-content ui-corner-all"
- style="font-size: 1em;margin-top:2px;"
- border-width="1px;" border-color="#cccccc;" border-style="solid;"
- width="100%" cellpadding="2px" cellspacing="1px"
- wicket:id="accountLinkContainer">
- <thead>
- <tr class="ui-widget-header">
- <th width="10%" align="left"><wicket:message key="enable"/></th>
- <th align="left"><wicket:message key="accountLink"/></th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td width="10%" align="left" valign="middle">
- <span wicket:id="accountLinkCheckbox">[accountLinkCheckbox]</span>
- </td>
- <td align="left" valign="middle">
- <span wicket:id="accountLink">[accountLink]</span>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- </div>
+ <div class="tablerow">
+ <div class="tablecolumn_field all_dynamicsize">
+ <table id="accountLinkTable"
+ class="ui-widget ui-widget-content ui-corner-all"
+ style="font-size: 1em;margin-top:2px;"
+ border-width="1px;" border-color="#cccccc;" border-style="solid;"
+ width="100%" cellpadding="2px" cellspacing="1px"
+ wicket:id="accountLinkContainer">
+ <thead>
+ <tr class="ui-widget-header">
+ <th width="10%" align="left"><wicket:message key="enable"/></th>
+ <th align="left"><wicket:message key="accountLink"/></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td width="10%" align="left" valign="middle">
+ <span wicket:id="accountLinkCheckbox">[accountLinkCheckbox]</span>
+ </td>
+ <td align="left" valign="middle">
+ <span wicket:id="accountLink">[accountLink]</span>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
- <script type="text/javascript">
- $(function() {
- $('div#mappings div#formtable div.tablerow:even').addClass("alt");
- });
- </script>
-</wicket:panel>
+ <script type="text/javascript">
+ $(function() {
+ $('div#mappings div#formtable div.tablerow:even').addClass("alt");
+ });
+ </script>
+ </wicket:panel>
+</html>