From cfe797ec57756c374a55c5692966b48864e2e1ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francesco=20Chicchiricc=C3=B2?= Date: Tue, 10 Dec 2024 14:27:34 +0100 Subject: [PATCH] [SYNCOPE-1846] Allow for extensions --- .../client/console/wizards/any/Relationships.java | 6 +++++- .../core/provisioning/java/ConnectorFacadeProxy.java | 10 +++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/Relationships.java b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/Relationships.java index f017a2d8578..a04054e42f4 100644 --- a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/Relationships.java +++ b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/Relationships.java @@ -122,6 +122,10 @@ public Component getHeader(final String id, final Component parent, final IWizar return super.getHeader(id, parent, wizard).setVisible(false); } + protected Specification newSpecification() { + return new Specification(); + } + protected Fragment getViewFragment() { Fragment viewFragment = new Fragment("relationships", "viewFragment", this); viewFragment.setOutputMarkupId(true); @@ -145,7 +149,7 @@ protected Fragment getViewFragment() { public void onClick(final AjaxRequestTarget target, final RelationshipTO ignore) { Fragment addFragment = new Fragment("relationships", "addFragment", Relationships.this); addOrReplace(addFragment); - addFragment.add(new Specification().setRenderBodyOnly(true)); + addFragment.add(newSpecification().setRenderBodyOnly(true)); target.add(Relationships.this); } }, ActionType.CREATE, AnyEntitlement.UPDATE.getFor(anyTO.getType())).hideLabel(); diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/ConnectorFacadeProxy.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/ConnectorFacadeProxy.java index 68cc8a56bca..d38a8b472c3 100644 --- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/ConnectorFacadeProxy.java +++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/ConnectorFacadeProxy.java @@ -508,15 +508,15 @@ private static Object getPropertyValue(final String propType, final List valu value = values.get(0) == null || values.get(0).toString().isEmpty() ? null : values.get(0).toString().charAt(0); } else if (Integer.class.equals(propertySchemaClass) || Integer.TYPE.equals(propertySchemaClass)) { - value = Integer.parseInt(values.get(0).toString()); + value = Integer.valueOf(values.get(0).toString()); } else if (Long.class.equals(propertySchemaClass) || Long.TYPE.equals(propertySchemaClass)) { - value = Long.parseLong(values.get(0).toString()); + value = Long.valueOf(values.get(0).toString()); } else if (Float.class.equals(propertySchemaClass) || Float.TYPE.equals(propertySchemaClass)) { - value = Float.parseFloat(values.get(0).toString()); + value = Float.valueOf(values.get(0).toString()); } else if (Double.class.equals(propertySchemaClass) || Double.TYPE.equals(propertySchemaClass)) { - value = Double.parseDouble(values.get(0).toString()); + value = Double.valueOf(values.get(0).toString()); } else if (Boolean.class.equals(propertySchemaClass) || Boolean.TYPE.equals(propertySchemaClass)) { - value = Boolean.parseBoolean(values.get(0).toString()); + value = Boolean.valueOf(values.get(0).toString()); } else if (URI.class.equals(propertySchemaClass)) { value = URI.create(values.get(0).toString()); } else if (File.class.equals(propertySchemaClass)) {