syncope git commit: [SYNCOPE-1060] missing fix about dates on membership attributes on self registration

2017-04-10 Thread andreapatricelli
Repository: syncope
Updated Branches:
  refs/heads/2_0_X 7ce0a5599 -> be1eb72ba


[SYNCOPE-1060] missing fix about dates on membership attributes on self 
registration


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/be1eb72b
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/be1eb72b
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/be1eb72b

Branch: refs/heads/2_0_X
Commit: be1eb72ba507ea0f74c983ec52cce558fb669627
Parents: 7ce0a55
Author: Andrea Patricelli 
Authored: Fri Apr 7 17:05:37 2017 +0200
Committer: Andrea Patricelli 
Committed: Mon Apr 10 09:04:56 2017 +0200

--
 .../enduser/resources/BaseUserSelfResource.java | 67 
 .../resources/UserSelfCreateResource.java   | 36 ---
 .../enduser/resources/UserSelfReadResource.java | 20 +-
 .../resources/UserSelfUpdateResource.java   | 24 +--
 4 files changed, 80 insertions(+), 67 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/syncope/blob/be1eb72b/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/BaseUserSelfResource.java
--
diff --git 
a/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/BaseUserSelfResource.java
 
b/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/BaseUserSelfResource.java
new file mode 100644
index 000..6071642
--- /dev/null
+++ 
b/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/BaseUserSelfResource.java
@@ -0,0 +1,67 @@
+/*
+ * 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.enduser.resources;
+
+import java.text.ParseException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import org.apache.commons.lang3.time.FastDateFormat;
+import org.apache.syncope.common.lib.to.AttrTO;
+import org.apache.syncope.common.lib.to.PlainSchemaTO;
+
+public abstract class BaseUserSelfResource extends BaseResource {
+
+private static final long serialVersionUID = -5892402817902884085L;
+
+protected void dateToMillis(final Map plainAttrMap, final 
PlainSchemaTO plainSchema)
+throws ParseException {
+if (plainAttrMap.containsKey(plainSchema.getKey())) {
+FastDateFormat fmt = 
FastDateFormat.getInstance(plainSchema.getConversionPattern());
+
+AttrTO dateAttr = plainAttrMap.get(plainSchema.getKey());
+List milliValues = new 
ArrayList<>(dateAttr.getValues().size());
+for (String value : dateAttr.getValues()) {
+milliValues.add(String.valueOf(fmt.parse(value).getTime()));
+}
+dateAttr.getValues().clear();
+dateAttr.getValues().addAll(milliValues);
+}
+}
+
+protected void millisToDate(final Map plainAttrMap, final 
PlainSchemaTO plainSchema)
+throws IllegalArgumentException {
+if (plainAttrMap.containsKey(plainSchema.getKey())) {
+FastDateFormat fmt = 
FastDateFormat.getInstance(plainSchema.getConversionPattern());
+
+AttrTO dateAttr = plainAttrMap.get(plainSchema.getKey());
+List formattedValues = new 
ArrayList<>(dateAttr.getValues().size());
+for (String value : dateAttr.getValues()) {
+try {
+formattedValues.add(fmt.format(Long.valueOf(value)));
+} catch (NumberFormatException e) {
+throw new IllegalArgumentException("Invalid format value 
for " + value);
+}
+}
+dateAttr.getValues().clear();
+dateAttr.getValues().addAll(formattedValues);
+}
+}
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/be1eb72b/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/UserSelfCreateResource.java

syncope git commit: [SYNCOPE-1060] missing fix about dates on membership attributes on self registration

2017-04-10 Thread andreapatricelli
Repository: syncope
Updated Branches:
  refs/heads/master b024bc8ee -> fad07ef43


[SYNCOPE-1060] missing fix about dates on membership attributes on self 
registration


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/fad07ef4
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/fad07ef4
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/fad07ef4

Branch: refs/heads/master
Commit: fad07ef43d271a302f1b3fb5c99ee6dc68cfdbff
Parents: b024bc8
Author: Andrea Patricelli 
Authored: Fri Apr 7 17:05:37 2017 +0200
Committer: Andrea Patricelli 
Committed: Mon Apr 10 09:02:22 2017 +0200

--
 .../enduser/resources/BaseUserSelfResource.java | 67 
 .../resources/UserSelfCreateResource.java   | 36 ---
 .../enduser/resources/UserSelfReadResource.java | 20 +-
 .../resources/UserSelfUpdateResource.java   | 24 +--
 4 files changed, 80 insertions(+), 67 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/syncope/blob/fad07ef4/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/BaseUserSelfResource.java
--
diff --git 
a/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/BaseUserSelfResource.java
 
b/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/BaseUserSelfResource.java
new file mode 100644
index 000..6071642
--- /dev/null
+++ 
b/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/BaseUserSelfResource.java
@@ -0,0 +1,67 @@
+/*
+ * 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.enduser.resources;
+
+import java.text.ParseException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import org.apache.commons.lang3.time.FastDateFormat;
+import org.apache.syncope.common.lib.to.AttrTO;
+import org.apache.syncope.common.lib.to.PlainSchemaTO;
+
+public abstract class BaseUserSelfResource extends BaseResource {
+
+private static final long serialVersionUID = -5892402817902884085L;
+
+protected void dateToMillis(final Map plainAttrMap, final 
PlainSchemaTO plainSchema)
+throws ParseException {
+if (plainAttrMap.containsKey(plainSchema.getKey())) {
+FastDateFormat fmt = 
FastDateFormat.getInstance(plainSchema.getConversionPattern());
+
+AttrTO dateAttr = plainAttrMap.get(plainSchema.getKey());
+List milliValues = new 
ArrayList<>(dateAttr.getValues().size());
+for (String value : dateAttr.getValues()) {
+milliValues.add(String.valueOf(fmt.parse(value).getTime()));
+}
+dateAttr.getValues().clear();
+dateAttr.getValues().addAll(milliValues);
+}
+}
+
+protected void millisToDate(final Map plainAttrMap, final 
PlainSchemaTO plainSchema)
+throws IllegalArgumentException {
+if (plainAttrMap.containsKey(plainSchema.getKey())) {
+FastDateFormat fmt = 
FastDateFormat.getInstance(plainSchema.getConversionPattern());
+
+AttrTO dateAttr = plainAttrMap.get(plainSchema.getKey());
+List formattedValues = new 
ArrayList<>(dateAttr.getValues().size());
+for (String value : dateAttr.getValues()) {
+try {
+formattedValues.add(fmt.format(Long.valueOf(value)));
+} catch (NumberFormatException e) {
+throw new IllegalArgumentException("Invalid format value 
for " + value);
+}
+}
+dateAttr.getValues().clear();
+dateAttr.getValues().addAll(formattedValues);
+}
+}
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/fad07ef4/client/enduser/src/main/java/org/apache/syncope/client/enduser/resources/UserSelfCreateResource.java

[1/2] syncope git commit: Upgrading Jackson, LOG4J, AngularJS

2017-04-10 Thread ilgrosso
Repository: syncope
Updated Branches:
  refs/heads/2_0_X 23fdc9140 -> 7ce0a5599
  refs/heads/master dbf07add3 -> b024bc8ee


Upgrading Jackson, LOG4J, AngularJS


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/7ce0a559
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/7ce0a559
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/7ce0a559

Branch: refs/heads/2_0_X
Commit: 7ce0a559979878dbbf7979c1eb624ca82846c345
Parents: 23fdc91
Author: Francesco Chicchiriccò 
Authored: Mon Apr 10 08:19:25 2017 +0200
Committer: Francesco Chicchiriccò 
Committed: Mon Apr 10 08:19:25 2017 +0200

--
 pom.xml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/syncope/blob/7ce0a559/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 557faa0..f9a10d9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -359,7 +359,7 @@ under the License.
 
 3.1.10
 
-2.8.7
+2.8.8
 
 4.3.7.RELEASE
 4.2.2.RELEASE
@@ -384,7 +384,7 @@ under the License.
 1.7.25
 3.2.0
 
-2.8.1
+2.8.2
 3.3.6
 
 2.5
@@ -429,7 +429,7 @@ under the License.
 0.10.11
 7.0.1
 
-1.6.3
+1.6.4
 0.3.2
 1.3.3
 0.19.6



[2/2] syncope git commit: Upgrading Jackson, LOG4J, AngularJS

2017-04-10 Thread ilgrosso
Upgrading Jackson, LOG4J, AngularJS


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/b024bc8e
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/b024bc8e
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/b024bc8e

Branch: refs/heads/master
Commit: b024bc8eea9a27c87cb67f89e1d8a51d8f8f880d
Parents: dbf07ad
Author: Francesco Chicchiriccò 
Authored: Mon Apr 10 08:19:25 2017 +0200
Committer: Francesco Chicchiriccò 
Committed: Mon Apr 10 08:19:42 2017 +0200

--
 pom.xml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/syncope/blob/b024bc8e/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 27c69a9..678a035 100644
--- a/pom.xml
+++ b/pom.xml
@@ -359,7 +359,7 @@ under the License.
 
 3.2.0-SNAPSHOT
 
-2.8.7
+2.8.8
 
 4.3.7.RELEASE
 4.2.2.RELEASE
@@ -383,7 +383,7 @@ under the License.
 1.7.25
 3.2.0
 
-2.8.1
+2.8.2
 3.3.6
 
 2.5
@@ -427,7 +427,7 @@ under the License.
 0.10.11
 7.0.1
 
-1.6.3
+1.6.4
 0.3.2
 1.3.3
 0.19.6