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 2015/08/07 13:43:37 UTC
[15/16] syncope git commit: Merge from 1_2_X, upgrading CXF,
Activiti and Hibernate Validator
Merge from 1_2_X, upgrading CXF, Activiti and Hibernate Validator
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/91644a80
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/91644a80
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/91644a80
Branch: refs/heads/master
Commit: 91644a80aa8c88846e14571fbce5f8d3998cfa43
Parents: 7eca0ab 61a371f
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Fri Aug 7 13:41:50 2015 +0200
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Fri Aug 7 13:41:50 2015 +0200
----------------------------------------------------------------------
CHANGES | 22 +++++
.../wicket/markup/html/list/AltListView.java | 4 +-
.../html/list/ConnConfPropertyListView.java | 2 +-
pom.xml | 8 +-
src/site/xdoc/downloads.xml | 88 ++++++++++----------
5 files changed, 73 insertions(+), 51 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/91644a80/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/AltListView.java
----------------------------------------------------------------------
diff --cc client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/AltListView.java
index 5a491ae,0000000..3691171
mode 100644,000000..100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/AltListView.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/AltListView.java
@@@ -1,59 -1,0 +1,59 @@@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.console.wicket.markup.html.list;
+
+import java.util.List;
+import org.apache.wicket.markup.ComponentTag;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.model.IModel;
+
+public abstract class AltListView<T> extends ListView<T> {
+
+ private static final long serialVersionUID = 251378224847354710L;
+
+ public AltListView(final String id) {
+ super(id);
+ }
+
- public AltListView(final String id, final IModel<? extends List<? extends T>> model) {
++ public AltListView(final String id, final IModel<? extends List<T>> model) {
+ super(id, model);
+ }
+
- public AltListView(final String id, final List<? extends T> list) {
++ public AltListView(final String id, final List<T> list) {
+ super(id, list);
+ }
+
+ @Override
+ protected ListItem<T> newItem(final int index, final IModel<T> itemModel) {
+ return new ListItem<T>(index, itemModel) {
+
+ private static final long serialVersionUID = 5473483270932376694L;
+
+ @Override
+ protected void onComponentTag(final ComponentTag tag) {
+ if (index % 2 == 0) {
+ tag.append("class", "alt", " ");
+ }
+
+ super.onComponentTag(tag);
+ }
+ };
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/91644a80/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/ConnConfPropertyListView.java
----------------------------------------------------------------------
diff --cc client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/ConnConfPropertyListView.java
index 30775f5,0000000..3fef056
mode 100644,000000..100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/ConnConfPropertyListView.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/ConnConfPropertyListView.java
@@@ -1,152 -1,0 +1,152 @@@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.console.wicket.markup.html.list;
+
+import java.io.Serializable;
+import java.util.List;
+import java.util.Set;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxPasswordFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.FieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.MultiFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.SpinnerFieldPanel;
+import org.apache.syncope.common.lib.types.ConnConfProperty;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.PasswordTextField;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.util.ClassUtils;
+
+public class ConnConfPropertyListView extends AltListView<ConnConfProperty> {
+
+ private static final long serialVersionUID = -5239334900329150316L;
+
+ private static final Logger LOG = LoggerFactory.getLogger(ConnConfPropertyListView.class);
+
+ private final boolean withOverridable;
+
+ private final Set<ConnConfProperty> configuration;
+
- public ConnConfPropertyListView(final String id, final IModel<? extends List<? extends ConnConfProperty>> model,
++ public ConnConfPropertyListView(final String id, final IModel<? extends List<ConnConfProperty>> model,
+ final boolean withOverridable, final Set<ConnConfProperty> configuration) {
+
+ super(id, model);
+ this.configuration = configuration;
+ this.withOverridable = withOverridable;
+ }
+
+ @Override
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ protected void populateItem(final ListItem<ConnConfProperty> item) {
+ final ConnConfProperty property = item.getModelObject();
+
+ final Label label = new Label("connPropAttrSchema",
+ StringUtils.isBlank(property.getSchema().getDisplayName())
+ ? property.getSchema().getName()
+ : property.getSchema().getDisplayName());
+ item.add(label);
+
+ FieldPanel<? extends Serializable> field;
+ boolean required = false;
+ boolean isArray = false;
+
+ if (property.getSchema().isConfidential()
+ || Constants.GUARDED_STRING.equalsIgnoreCase(property.getSchema().getType())
+ || Constants.GUARDED_BYTE_ARRAY.equalsIgnoreCase(property.getSchema().getType())) {
+
+ field = new AjaxPasswordFieldPanel("panel",
+ label.getDefaultModelObjectAsString(), new Model<String>());
+ ((PasswordTextField) field.getField()).setResetPassword(false);
+
+ required = property.getSchema().isRequired();
+ } else {
+ Class<?> propertySchemaClass;
+ try {
+ propertySchemaClass =
+ ClassUtils.forName(property.getSchema().getType(), ClassUtils.getDefaultClassLoader());
+ if (ClassUtils.isPrimitiveOrWrapper(propertySchemaClass)) {
+ propertySchemaClass = org.apache.commons.lang3.ClassUtils.primitiveToWrapper(propertySchemaClass);
+ }
+ } catch (Exception e) {
+ LOG.error("Error parsing attribute type", e);
+ propertySchemaClass = String.class;
+ }
+
+ if (ClassUtils.isAssignable(Number.class, propertySchemaClass)) {
+ @SuppressWarnings("unchecked")
+ final Class<Number> numberClass = (Class<Number>) propertySchemaClass;
+ field = new SpinnerFieldPanel<Number>("panel",
+ label.getDefaultModelObjectAsString(), numberClass, new Model<Number>(), null, null);
+
+ required = property.getSchema().isRequired();
+ } else if (ClassUtils.isAssignable(Boolean.class, propertySchemaClass)) {
+ field = new AjaxCheckBoxPanel("panel",
+ label.getDefaultModelObjectAsString(), new Model<Boolean>());
+ } else {
+ field = new AjaxTextFieldPanel("panel",
+ label.getDefaultModelObjectAsString(), new Model<String>());
+
+ required = property.getSchema().isRequired();
+ }
+
+ if (propertySchemaClass.isArray()) {
+ isArray = true;
+ }
+ }
+
+ field.setTitle(property.getSchema().getHelpMessage());
+
+ if (required) {
+ field.addRequiredLabel();
+ }
+
+ if (isArray) {
+ if (property.getValues().isEmpty()) {
+ property.getValues().add(null);
+ }
+
+ final MultiFieldPanel multiFieldPanel = new MultiFieldPanel("panel",
+ new PropertyModel<List<String>>(property, "values"), field);
+ item.add(multiFieldPanel);
+ } else {
+ setNewFieldModel(field, property.getValues());
+ item.add(field);
+ }
+
+ if (withOverridable) {
+ item.add(new AjaxCheckBoxPanel("connPropAttrOverridable",
+ "connPropAttrOverridable", new PropertyModel<Boolean>(property, "overridable")));
+ }
+
+ configuration.add(property);
+ }
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ private void setNewFieldModel(final FieldPanel field, final List<Object> values) {
+ field.setNewModel(values);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/91644a80/pom.xml
----------------------------------------------------------------------
diff --cc pom.xml
index c4d6be0,994d09f..b94c137
--- a/pom.xml
+++ b/pom.xml
@@@ -326,68 -335,72 +326,68 @@@ under the License
<connid.ldap.version>1.4.0</connid.ldap.version>
<connid.ad.version>1.2.3</connid.ad.version>
- <cxf.version>3.1.2-SNAPSHOT</cxf.version>
- <commons-jexl.version>2.1.1</commons-jexl.version>
- <commons-lang.version>3.3.2</commons-lang.version>
- <commons-codec.version>1.10</commons-codec.version>
++ <cxf.version>3.1.2</cxf.version>
- <activiti.version>5.16.4</activiti.version>
+ <camel.version>2.15.2</camel.version>
- <aspectj.version>1.8.6</aspectj.version>
+ <jackson.version>2.6.0</jackson.version>
- <cxf.version>3.0.6</cxf.version>
- <spring.version>4.0.9.RELEASE</spring.version>
- <spring-security.version>3.2.8.RELEASE</spring-security.version>
- <jackson.version>2.4.6</jackson.version>
- <velocity.version>1.7</velocity.version>
- <velocitytools.version>2.0</velocitytools.version>
- <quartz.version>2.2.1</quartz.version>
+ <spring.version>4.1.7.RELEASE</spring.version>
+ <spring-security.version>4.0.2.RELEASE</spring-security.version>
- <openjpa.version>2.3.0</openjpa.version>
- <hibernate-validator.version>5.1.3.Final</hibernate-validator.version>
- <commons-dbcp.version>1.4</commons-dbcp.version>
- <commons.logging.version>1.1.3</commons.logging.version>
+ <openjpa.version>2.4.0</openjpa.version>
+ <commons-dbcp.version>2.1</commons-dbcp.version>
- <hibernate-validator.version>5.2.0.Final</hibernate-validator.version>
++ <hibernate-validator.version>5.2.1.Final</hibernate-validator.version>
- <cocoon.version>3.0.0-alpha-3</cocoon.version>
+ <jasypt.version>1.9.2</jasypt.version>
+
+ <quartz.version>2.2.1</quartz.version>
- <wicket.version>6.20.0</wicket.version>
+ <cocoon.version>3.0.0-alpha-3</cocoon.version>
- <groovy.version>2.3.10</groovy.version>
+ <groovy.version>2.4.4</groovy.version>
- <activiti.version>5.17.0</activiti.version>
- <h2.version>1.4.187</h2.version>
++ <activiti.version>5.18.0</activiti.version>
- <log4j.version>2.3</log4j.version>
<slf4j.version>1.7.12</slf4j.version>
+ <log4j.version>2.3</log4j.version>
<disruptor.version>3.3.2</disruptor.version>
- <junit.version>4.11</junit.version>
- <selenium.version>2.46.0</selenium.version>
-
- <apacheds.version>1.5.7</apacheds.version>
-
- <httpclient.version>4.3.6</httpclient.version>
+ <commons-io.version>2.4</commons-io.version>
+ <commons-codec.version>1.10</commons-codec.version>
+ <commons-jexl.version>2.1.1</commons-jexl.version>
+ <commons-lang.version>3.4</commons-lang.version>
+ <commons-collection.version>4.0</commons-collection.version>
+ <commons-logging.version>1.1.3</commons-logging.version>
- <tomcat.version>7.0.63</tomcat.version>
+ <h2.version>1.4.187</h2.version>
- <jasypt.version>1.9.2</jasypt.version>
-
- <jquery.version>1.11.1</jquery.version>
- <jquery-ui.version>1.10.4</jquery-ui.version>
- <highlightjs.version>8.0</highlightjs.version>
- <codemirror.version>3.23</codemirror.version>
+ <junit.version>4.12</junit.version>
+ <selenium.version>2.46.0</selenium.version>
- <izpack.version>5.0.3</izpack.version>
- <maven-invoker.version>2.1.1</maven-invoker.version>
-
- <jdeb.version>1.4</jdeb.version>
-
<conf.directory>${project.build.directory}/test-classes</conf.directory>
<bundles.directory>${project.build.directory}/bundles</bundles.directory>
<connid.location>file:${bundles.directory}/</connid.location>
<log.directory>${project.build.directory}/log</log.directory>
<activiti-modeler.directory>${project.build.directory}/activiti-modeler</activiti-modeler.directory>
-
- <cargo.servlet.port>9080</cargo.servlet.port>
- <cargo.tomcat.ajp.port>9889</cargo.tomcat.ajp.port>
- <cargo.rmi.port>9805</cargo.rmi.port>
- <cargo.run.dir>${project.build.directory}/syncope-core-test</cargo.run.dir>
- <cargo.log>${log.directory}/cargo.log</cargo.log>
- <cargo.output>${log.directory}/cargo-output.log</cargo.output>
+
+ <jquery.version>2.1.3</jquery.version>
+ <jquery-ui.version>1.11.4</jquery-ui.version>
+ <jquery-cookie.version>1.4.1-1</jquery-cookie.version>
+ <bootstrap.version>3.3.5</bootstrap.version>
+ <bootstrap-select.version>1.6.3</bootstrap-select.version>
+ <font-awesome.version>4.3.0</font-awesome.version>
+ <ionicons.version>2.0.1</ionicons.version>
+ <highlightjs.version>8.4-4</highlightjs.version>
+ <codemirror.version>5.5</codemirror.version>
+ <jsplumb.version>1.6.4</jsplumb.version>
+
- <wicket.version>7.0.0-M6</wicket.version>
++ <wicket.version>7.0.0</wicket.version>
+ <wicket-jqueryui.version>7.0.0-M6</wicket-jqueryui.version>
+
+ <izpack.version>5.0.3</izpack.version>
+ <httpclient.version>4.3.6</httpclient.version>
+ <maven-invoker.version>2.1.1</maven-invoker.version>
<testds.port>1389</testds.port>
<testdb.webport>9082</testdb.webport>