syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From skylar...@apache.org
Subject [1/2] syncope git commit: [SYNCOPE-1295] New structured wizard to edit SCIM 2.0 configuration
Date Thu, 07 Jun 2018 07:22:32 GMT
Repository: syncope
Updated Branches:
  refs/heads/2_0_X 06e5dcd80 -> a613585e9


http://git-wip-us.apache.org/repos/asf/syncope/blob/a613585e/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_pt_BR.properties
b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_pt_BR.properties
new file mode 100644
index 0000000..cbcf4a3
--- /dev/null
+++ b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_pt_BR.properties
@@ -0,0 +1,17 @@
+# 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.
+scimConfGeneral=General

http://git-wip-us.apache.org/repos/asf/syncope/blob/a613585e/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_ru.properties
----------------------------------------------------------------------
diff --git a/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_ru.properties
b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_ru.properties
new file mode 100644
index 0000000..cbcf4a3
--- /dev/null
+++ b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/pages/SCIMConfPage_ru.properties
@@ -0,0 +1,17 @@
+# 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.
+scimConfGeneral=General

http://git-wip-us.apache.org/repos/asf/syncope/blob/a613585e/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/panels/SCIMConfAccordionContainer.html
----------------------------------------------------------------------
diff --git a/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/panels/SCIMConfAccordionContainer.html
b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/panels/SCIMConfAccordionContainer.html
new file mode 100644
index 0000000..265a138
--- /dev/null
+++ b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/panels/SCIMConfAccordionContainer.html
@@ -0,0 +1,29 @@
+<!--
+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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+  <wicket:panel>
+    <div wicket:id="accordionContainer">
+      <div class="form-group">
+        <span wicket:id="accordionContent">
+          [accordionContent]
+        </span>
+      </div>
+    </div>
+  </wicket:panel>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/syncope/blob/a613585e/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/panels/SCIMConfEnterpriseUserPanel.html
----------------------------------------------------------------------
diff --git a/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/panels/SCIMConfEnterpriseUserPanel.html
b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/panels/SCIMConfEnterpriseUserPanel.html
new file mode 100644
index 0000000..8892d4c
--- /dev/null
+++ b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/panels/SCIMConfEnterpriseUserPanel.html
@@ -0,0 +1,32 @@
+<!--
+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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+  <wicket:panel>
+    <div wicket:id="costCenter"/>
+    <div wicket:id="department"/>
+    <div wicket:id="division"/>
+    <div wicket:id="employeeNumber"/>
+    <div wicket:id="organization"/>
+
+    <div style="margin-top: 15px;">
+      <label wicket:id="managerLabel"/>
+      <div wicket:id="managerAccordion"></div>
+    </div>
+  </wicket:panel>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/syncope/blob/a613585e/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/panels/SCIMConfGeneralPanel.html
----------------------------------------------------------------------
diff --git a/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/panels/SCIMConfGeneralPanel.html
b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/panels/SCIMConfGeneralPanel.html
new file mode 100644
index 0000000..dba5865
--- /dev/null
+++ b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/panels/SCIMConfGeneralPanel.html
@@ -0,0 +1,28 @@
+<!--
+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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+  <wicket:panel>
+    <div wicket:id="creationDate"></div>
+    <div wicket:id="lastChangeDate"></div>
+    <div wicket:id="bulkMaxOperations"></div>
+    <div wicket:id="bulkMaxMaxPayloadSize"></div>
+    <div wicket:id="filterMaxResults"></div>
+    <div wicket:id="eTagValue"></div>
+  </wicket:panel>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/syncope/blob/a613585e/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/panels/SCIMConfPanel.html
----------------------------------------------------------------------
diff --git a/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/panels/SCIMConfPanel.html
b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/panels/SCIMConfPanel.html
new file mode 100644
index 0000000..27194af
--- /dev/null
+++ b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/panels/SCIMConfPanel.html
@@ -0,0 +1,32 @@
+<!--
+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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+  <wicket:extend>
+    <div wicket:id="tabbedPanel"></div>
+    <div class="modal-footer">
+      <a href="#" 
+         class="btn btn-primary" 
+         wicket:id="saveButton"
+         alt="Save" 
+         title="Save">
+        <wicket:message key="saveButton"/>
+      </a>
+    </div>
+  </wicket:extend>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/syncope/blob/a613585e/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/panels/SCIMConfPanel.properties
----------------------------------------------------------------------
diff --git a/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/panels/SCIMConfPanel.properties
b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/panels/SCIMConfPanel.properties
new file mode 100644
index 0000000..40063bd
--- /dev/null
+++ b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/panels/SCIMConfPanel.properties
@@ -0,0 +1,21 @@
+# 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.
+tab1=General
+tab2=User
+tab3=EnterpriseUser
+
+saveButton=Save

http://git-wip-us.apache.org/repos/asf/syncope/blob/a613585e/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/panels/SCIMConfPanel_it.properties
----------------------------------------------------------------------
diff --git a/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/panels/SCIMConfPanel_it.properties
b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/panels/SCIMConfPanel_it.properties
new file mode 100644
index 0000000..40063bd
--- /dev/null
+++ b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/panels/SCIMConfPanel_it.properties
@@ -0,0 +1,21 @@
+# 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.
+tab1=General
+tab2=User
+tab3=EnterpriseUser
+
+saveButton=Save

http://git-wip-us.apache.org/repos/asf/syncope/blob/a613585e/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/panels/SCIMConfPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/panels/SCIMConfPanel_pt_BR.properties
b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/panels/SCIMConfPanel_pt_BR.properties
new file mode 100644
index 0000000..40063bd
--- /dev/null
+++ b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/panels/SCIMConfPanel_pt_BR.properties
@@ -0,0 +1,21 @@
+# 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.
+tab1=General
+tab2=User
+tab3=EnterpriseUser
+
+saveButton=Save

http://git-wip-us.apache.org/repos/asf/syncope/blob/a613585e/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/panels/SCIMConfPanel_ru.properties
----------------------------------------------------------------------
diff --git a/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/panels/SCIMConfPanel_ru.properties
b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/panels/SCIMConfPanel_ru.properties
new file mode 100644
index 0000000..40063bd
--- /dev/null
+++ b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/panels/SCIMConfPanel_ru.properties
@@ -0,0 +1,21 @@
+# 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.
+tab1=General
+tab2=User
+tab3=EnterpriseUser
+
+saveButton=Save

http://git-wip-us.apache.org/repos/asf/syncope/blob/a613585e/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/panels/SCIMConfUserPanel.html
----------------------------------------------------------------------
diff --git a/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/panels/SCIMConfUserPanel.html
b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/panels/SCIMConfUserPanel.html
new file mode 100644
index 0000000..5208aca
--- /dev/null
+++ b/ext/scimv2/client-console/src/main/resources/org/apache/syncope/client/console/panels/SCIMConfUserPanel.html
@@ -0,0 +1,81 @@
+<!--
+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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+  <wicket:panel>
+    <div wicket:id="displayName"/>
+    <div wicket:id="locale"/>
+    <div wicket:id="nickName"/>
+    <div wicket:id="preferredLanguage"/>
+    <div wicket:id="profileUrl"/>
+    <div wicket:id="timezone"/>
+    <div wicket:id="title"/>
+    <div wicket:id="userType"/>
+
+    <div style="margin-top: 15px;">
+      <label wicket:id="nameLabel"/>
+      <div wicket:id="nameAccordion"/>
+    </div>
+
+    <span wicket:id="x509Certificates">
+      [x509Certificates]
+    </span>
+
+    <div style="margin-top: 15px;">
+      <label wicket:id="addressesLabel"/>
+      <div wicket:id="addressesAccordion_work"/>
+      <div wicket:id="addressesAccordion_home"/>
+      <div wicket:id="addressesAccordion_other"/>
+    </div>
+
+    <div style="margin-top: 15px;">
+      <label wicket:id="emailsLabel"/>
+      <div wicket:id="emailsAccordion_work"/>
+      <div wicket:id="emailsAccordion_home"/>
+      <div wicket:id="emailsAccordion_other"/>      
+    </div>
+
+    <div style="margin-top: 15px;">
+      <label wicket:id="phoneNumbersLabel"/>
+      <div wicket:id="phoneNumbersAccordion_work"/>
+      <div wicket:id="phoneNumbersAccordion_home"/>
+      <div wicket:id="phoneNumbersAccordion_other"/>
+      <div wicket:id="phoneNumbersAccordion_mobile"/>
+      <div wicket:id="phoneNumbersAccordion_fax"/>
+      <div wicket:id="phoneNumbersAccordion_pager"/>
+    </div>
+
+    <div style="margin-top: 15px;">
+      <label wicket:id="imsLabel"/>
+      <div wicket:id="imsAccordion_aim"/>
+      <div wicket:id="imsAccordion_gtalk"/>
+      <div wicket:id="imsAccordion_icq"/>
+      <div wicket:id="imsAccordion_xmpp"/>
+      <div wicket:id="imsAccordion_msn"/>
+      <div wicket:id="imsAccordion_skype"/>
+      <div wicket:id="imsAccordion_qq"/>
+      <div wicket:id="imsAccordion_yahoo"/>
+    </div>
+
+    <div style="margin-top: 15px;">
+      <label wicket:id="photosLabel"/>
+      <div wicket:id="photosAccordion_photo"/>
+      <div wicket:id="photosAccordion_thumbnail"/>
+    </div>
+  </wicket:panel>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/syncope/blob/a613585e/ext/scimv2/common-lib/src/main/java/org/apache/syncope/common/lib/scim/SCIMConf.java
----------------------------------------------------------------------
diff --git a/ext/scimv2/common-lib/src/main/java/org/apache/syncope/common/lib/scim/SCIMConf.java
b/ext/scimv2/common-lib/src/main/java/org/apache/syncope/common/lib/scim/SCIMConf.java
index e7cc2a4..1875eba 100644
--- a/ext/scimv2/common-lib/src/main/java/org/apache/syncope/common/lib/scim/SCIMConf.java
+++ b/ext/scimv2/common-lib/src/main/java/org/apache/syncope/common/lib/scim/SCIMConf.java
@@ -18,10 +18,7 @@
  */
 package org.apache.syncope.common.lib.scim;
 
-import com.fasterxml.jackson.annotation.JsonIgnore;
 import java.io.Serializable;
-import java.util.Date;
-import org.apache.commons.lang3.StringUtils;
 
 public class SCIMConf implements Serializable {
 
@@ -29,82 +26,18 @@ public class SCIMConf implements Serializable {
 
     public static final String KEY = "scimv2.conf";
 
-    private Date creationDate = new Date();
-
-    private Date lastChangeDate = new Date();
-
-    private int bulkMaxOperations = 1000;
-
-    private int bulkMaxPayloadSize = 1048576;
-
-    private int filterMaxResults = 200;
+    private SCIMGeneralConf generalConf;
 
     private SCIMUserConf userConf;
 
     private SCIMEnterpriseUserConf enterpriseUserConf;
 
-    public Date getCreationDate() {
-        if (creationDate != null) {
-            return new Date(creationDate.getTime());
-        }
-        return null;
-    }
-
-    public void setCreationDate(final Date creationDate) {
-        if (creationDate != null) {
-            this.creationDate = new Date(creationDate.getTime());
-        } else {
-            this.creationDate = null;
-        }
-    }
-
-    public Date getLastChangeDate() {
-        if (lastChangeDate != null) {
-            return new Date(lastChangeDate.getTime());
-        }
-        return null;
-    }
-
-    public void setLastChangeDate(final Date lastChangeDate) {
-        if (lastChangeDate != null) {
-            this.lastChangeDate = new Date(lastChangeDate.getTime());
-        } else {
-            this.lastChangeDate = null;
-        }
-    }
-
-    @JsonIgnore
-    public String getETagValue() {
-        Date etagDate = getLastChangeDate() == null
-                ? getCreationDate() : getLastChangeDate();
-        return etagDate == null
-                ? StringUtils.EMPTY
-                : String.valueOf(etagDate.getTime());
-
-    }
-
-    public int getBulkMaxOperations() {
-        return bulkMaxOperations;
-    }
-
-    public void setBulkMaxOperations(final int bulkMaxOperations) {
-        this.bulkMaxOperations = bulkMaxOperations;
-    }
-
-    public int getBulkMaxPayloadSize() {
-        return bulkMaxPayloadSize;
-    }
-
-    public void setBulkMaxPayloadSize(final int bulkMaxPayloadSize) {
-        this.bulkMaxPayloadSize = bulkMaxPayloadSize;
-    }
-
-    public int getFilterMaxResults() {
-        return filterMaxResults;
+    public SCIMGeneralConf getGeneralConf() {
+        return generalConf;
     }
 
-    public void setFilterMaxResults(final int filterMaxResults) {
-        this.filterMaxResults = filterMaxResults;
+    public void setGeneralConf(final SCIMGeneralConf generalConf) {
+        this.generalConf = generalConf;
     }
 
     public SCIMUserConf getUserConf() {

http://git-wip-us.apache.org/repos/asf/syncope/blob/a613585e/ext/scimv2/common-lib/src/main/java/org/apache/syncope/common/lib/scim/SCIMGeneralConf.java
----------------------------------------------------------------------
diff --git a/ext/scimv2/common-lib/src/main/java/org/apache/syncope/common/lib/scim/SCIMGeneralConf.java
b/ext/scimv2/common-lib/src/main/java/org/apache/syncope/common/lib/scim/SCIMGeneralConf.java
new file mode 100644
index 0000000..cf9bc71
--- /dev/null
+++ b/ext/scimv2/common-lib/src/main/java/org/apache/syncope/common/lib/scim/SCIMGeneralConf.java
@@ -0,0 +1,104 @@
+/*
+ * 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.common.lib.scim;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import java.io.Serializable;
+import java.util.Date;
+import org.apache.commons.lang3.StringUtils;
+
+public class SCIMGeneralConf implements Serializable {
+
+    private static final long serialVersionUID = 3228349133950736647L;
+
+    private Date creationDate = new Date();
+
+    private Date lastChangeDate = new Date();
+
+    private int bulkMaxOperations = 1000;
+
+    private int bulkMaxPayloadSize = 1048576;
+
+    private int filterMaxResults = 200;
+
+    public Date getCreationDate() {
+        if (creationDate != null) {
+            return new Date(creationDate.getTime());
+        }
+        return null;
+    }
+
+    public void setCreationDate(final Date creationDate) {
+        if (creationDate != null) {
+            this.creationDate = new Date(creationDate.getTime());
+        } else {
+            this.creationDate = null;
+        }
+    }
+
+    public Date getLastChangeDate() {
+        if (lastChangeDate != null) {
+            return new Date(lastChangeDate.getTime());
+        }
+        return null;
+    }
+
+    public void setLastChangeDate(final Date lastChangeDate) {
+        if (lastChangeDate != null) {
+            this.lastChangeDate = new Date(lastChangeDate.getTime());
+        } else {
+            this.lastChangeDate = null;
+        }
+    }
+
+    @JsonIgnore
+    public String getETagValue() {
+        Date etagDate = getLastChangeDate() == null
+                ? getCreationDate() : getLastChangeDate();
+        return etagDate == null
+                ? StringUtils.EMPTY
+                : String.valueOf(etagDate.getTime());
+
+    }
+
+    public int getBulkMaxOperations() {
+        return bulkMaxOperations;
+    }
+
+    public void setBulkMaxOperations(final int bulkMaxOperations) {
+        this.bulkMaxOperations = bulkMaxOperations;
+    }
+
+    public int getBulkMaxPayloadSize() {
+        return bulkMaxPayloadSize;
+    }
+
+    public void setBulkMaxPayloadSize(final int bulkMaxPayloadSize) {
+        this.bulkMaxPayloadSize = bulkMaxPayloadSize;
+    }
+
+    public int getFilterMaxResults() {
+        return filterMaxResults;
+    }
+
+    public void setFilterMaxResults(final int filterMaxResults) {
+        this.filterMaxResults = filterMaxResults;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/a613585e/ext/scimv2/logic/src/main/java/org/apache/syncope/core/logic/SCIMDataBinder.java
----------------------------------------------------------------------
diff --git a/ext/scimv2/logic/src/main/java/org/apache/syncope/core/logic/SCIMDataBinder.java
b/ext/scimv2/logic/src/main/java/org/apache/syncope/core/logic/SCIMDataBinder.java
index 6a89169..20cec64 100644
--- a/ext/scimv2/logic/src/main/java/org/apache/syncope/core/logic/SCIMDataBinder.java
+++ b/ext/scimv2/logic/src/main/java/org/apache/syncope/core/logic/SCIMDataBinder.java
@@ -163,6 +163,7 @@ public class SCIMDataBinder {
         attrs.putAll(EntityTOUtils.buildAttrMap(userTO.getPlainAttrs()));
         attrs.putAll(EntityTOUtils.buildAttrMap(userTO.getDerAttrs()));
         attrs.putAll(EntityTOUtils.buildAttrMap(userTO.getVirAttrs()));
+        attrs.put("username", new AttrTO.Builder().schema("username").value(userTO.getUsername()).build());
 
         if (conf.getUserConf() != null) {
             if (output(attributes, excludedAttributes, "name") && conf.getUserConf().getName()
!= null) {
@@ -462,78 +463,72 @@ public class SCIMDataBinder {
                 if (conf.getUserConf().getName().getFamilyName() != null
                         && user.getName().getFamilyName() != null) {
 
-                    userTO.getPlainAttrs().add(new AttrTO.Builder().
-                            schema(conf.getUserConf().getName().getFamilyName()).
-                            value(user.getName().getFamilyName()).build());
+                    setAttribute(userTO, conf.getUserConf().getName().getFamilyName(),
+                            user.getName().getFamilyName());
                 }
                 if (conf.getUserConf().getName().getFormatted() != null
                         && user.getName().getFormatted() != null) {
 
-                    userTO.getPlainAttrs().add(new AttrTO.Builder().
-                            schema(conf.getUserConf().getName().getFormatted()).
-                            value(user.getName().getFormatted()).build());
+                    setAttribute(userTO, conf.getUserConf().getName().getFormatted(),
+                            user.getName().getFormatted());
                 }
                 if (conf.getUserConf().getName().getGivenName() != null
                         && user.getName().getGivenName() != null) {
 
-                    userTO.getPlainAttrs().add(new AttrTO.Builder().
-                            schema(conf.getUserConf().getName().getGivenName()).
-                            value(user.getName().getGivenName()).build());
+                    setAttribute(userTO, conf.getUserConf().getName().getGivenName(),
+                            user.getName().getGivenName());
                 }
                 if (conf.getUserConf().getName().getHonorificPrefix() != null
                         && user.getName().getHonorificPrefix() != null) {
 
-                    userTO.getPlainAttrs().add(new AttrTO.Builder().
-                            schema(conf.getUserConf().getName().getHonorificPrefix()).
-                            value(user.getName().getHonorificPrefix()).build());
+                    setAttribute(userTO, conf.getUserConf().getName().getHonorificPrefix(),
+                            user.getName().getHonorificPrefix());
                 }
                 if (conf.getUserConf().getName().getHonorificSuffix() != null
                         && user.getName().getHonorificSuffix() != null) {
 
-                    userTO.getPlainAttrs().add(new AttrTO.Builder().
-                            schema(conf.getUserConf().getName().getHonorificSuffix()).
-                            value(user.getName().getHonorificSuffix()).build());
+                    setAttribute(userTO, conf.getUserConf().getName().getHonorificSuffix(),
+                            user.getName().getHonorificSuffix());
                 }
                 if (conf.getUserConf().getName().getMiddleName() != null
                         && user.getName().getMiddleName() != null) {
 
-                    userTO.getPlainAttrs().add(new AttrTO.Builder().
-                            schema(conf.getUserConf().getName().getMiddleName()).
-                            value(user.getName().getMiddleName()).build());
+                    setAttribute(userTO, conf.getUserConf().getName().getMiddleName(),
+                            user.getName().getMiddleName());
                 }
             }
 
             if (conf.getUserConf().getDisplayName() != null && user.getDisplayName()
!= null) {
-                userTO.getPlainAttrs().add(new AttrTO.Builder().
-                        schema(conf.getUserConf().getDisplayName()).value(user.getDisplayName()).build());
+                setAttribute(userTO, conf.getUserConf().getDisplayName(),
+                        user.getDisplayName());
             }
             if (conf.getUserConf().getNickName() != null && user.getNickName() !=
null) {
-                userTO.getPlainAttrs().add(new AttrTO.Builder().
-                        schema(conf.getUserConf().getNickName()).value(user.getNickName()).build());
+                setAttribute(userTO, conf.getUserConf().getNickName(),
+                        user.getNickName());
             }
             if (conf.getUserConf().getProfileUrl() != null && user.getProfileUrl()
!= null) {
-                userTO.getPlainAttrs().add(new AttrTO.Builder().
-                        schema(conf.getUserConf().getProfileUrl()).value(user.getProfileUrl()).build());
+                setAttribute(userTO, conf.getUserConf().getProfileUrl(),
+                        user.getProfileUrl());
             }
             if (conf.getUserConf().getTitle() != null && user.getTitle() != null)
{
-                userTO.getPlainAttrs().add(new AttrTO.Builder().
-                        schema(conf.getUserConf().getTitle()).value(user.getTitle()).build());
+                setAttribute(userTO, conf.getUserConf().getTitle(),
+                        user.getTitle());
             }
             if (conf.getUserConf().getUserType() != null && user.getUserType() !=
null) {
-                userTO.getPlainAttrs().add(new AttrTO.Builder().
-                        schema(conf.getUserConf().getUserType()).value(user.getUserType()).build());
+                setAttribute(userTO, conf.getUserConf().getUserType(),
+                        user.getUserType());
             }
             if (conf.getUserConf().getPreferredLanguage() != null && user.getPreferredLanguage()
!= null) {
-                userTO.getPlainAttrs().add(new AttrTO.Builder().
-                        schema(conf.getUserConf().getPreferredLanguage()).value(user.getPreferredLanguage()).build());
+                setAttribute(userTO, conf.getUserConf().getPreferredLanguage(),
+                        user.getPreferredLanguage());
             }
             if (conf.getUserConf().getLocale() != null && user.getLocale() != null)
{
-                userTO.getPlainAttrs().add(new AttrTO.Builder().
-                        schema(conf.getUserConf().getLocale()).value(user.getLocale()).build());
+                setAttribute(userTO, conf.getUserConf().getLocale(),
+                        user.getLocale());
             }
             if (conf.getUserConf().getTimezone() != null && user.getTimezone() !=
null) {
-                userTO.getPlainAttrs().add(new AttrTO.Builder().
-                        schema(conf.getUserConf().getTimezone()).value(user.getTimezone()).build());
+                setAttribute(userTO, conf.getUserConf().getTimezone(),
+                        user.getTimezone());
             }
 
             fill(userTO.getPlainAttrs(), conf.getUserConf().getEmails(), user.getEmails());
@@ -553,28 +548,28 @@ public class SCIMDataBinder {
                     });
                     if (addressConf != null) {
                         if (addressConf.getFormatted() != null && address.getFormatted()
!= null) {
-                            userTO.getPlainAttrs().add(new AttrTO.Builder().
-                                    schema(addressConf.getFormatted()).value(address.getFormatted()).build());
+                            setAttribute(userTO, addressConf.getFormatted(),
+                                    address.getFormatted());
                         }
                         if (addressConf.getStreetAddress() != null && address.getStreetAddress()
!= null) {
-                            userTO.getPlainAttrs().add(new AttrTO.Builder().
-                                    schema(addressConf.getStreetAddress()).value(address.getStreetAddress()).build());
+                            setAttribute(userTO, addressConf.getStreetAddress(),
+                                    address.getStreetAddress());
                         }
                         if (addressConf.getLocality() != null && address.getLocality()
!= null) {
-                            userTO.getPlainAttrs().add(new AttrTO.Builder().
-                                    schema(addressConf.getLocality()).value(address.getLocality()).build());
+                            setAttribute(userTO, addressConf.getLocality(),
+                                    address.getLocality());
                         }
                         if (addressConf.getRegion() != null && address.getFormatted()
!= null) {
-                            userTO.getPlainAttrs().add(new AttrTO.Builder().
-                                    schema(addressConf.getFormatted()).value(address.getFormatted()).build());
+                            setAttribute(userTO, addressConf.getFormatted(),
+                                    address.getFormatted());
                         }
                         if (addressConf.getPostalCode() != null && address.getPostalCode()
!= null) {
-                            userTO.getPlainAttrs().add(new AttrTO.Builder().
-                                    schema(addressConf.getPostalCode()).value(address.getPostalCode()).build());
+                            setAttribute(userTO, addressConf.getPostalCode(),
+                                    address.getPostalCode());
                         }
                         if (addressConf.getCountry() != null && address.getCountry()
!= null) {
-                            userTO.getPlainAttrs().add(new AttrTO.Builder().
-                                    schema(addressConf.getCountry()).value(address.getCountry()).build());
+                            setAttribute(userTO, addressConf.getCountry(),
+                                    address.getCountry());
                         }
                     }
                 }
@@ -583,9 +578,8 @@ public class SCIMDataBinder {
             for (int i = 0; i < user.getX509Certificates().size(); i++) {
                 Value certificate = user.getX509Certificates().get(i);
                 if (conf.getUserConf().getX509Certificates().size() > i) {
-                    userTO.getPlainAttrs().add(new AttrTO.Builder().
-                            schema(conf.getUserConf().getX509Certificates().get(i)).
-                            value(certificate.getValue()).build());
+                    setAttribute(userTO, conf.getUserConf().getX509Certificates().get(i),
+                            certificate.getValue());
                 }
             }
         }
@@ -594,46 +588,40 @@ public class SCIMDataBinder {
             if (conf.getEnterpriseUserConf().getEmployeeNumber() != null
                     && user.getEnterpriseInfo().getEmployeeNumber() != null) {
 
-                userTO.getPlainAttrs().add(new AttrTO.Builder().
-                        schema(conf.getEnterpriseUserConf().getEmployeeNumber()).
-                        value(user.getEnterpriseInfo().getEmployeeNumber()).build());
+                setAttribute(userTO, conf.getEnterpriseUserConf().getEmployeeNumber(),
+                        user.getEnterpriseInfo().getEmployeeNumber());
             }
             if (conf.getEnterpriseUserConf().getCostCenter() != null
                     && user.getEnterpriseInfo().getCostCenter() != null) {
 
-                userTO.getPlainAttrs().add(new AttrTO.Builder().
-                        schema(conf.getEnterpriseUserConf().getCostCenter()).
-                        value(user.getEnterpriseInfo().getCostCenter()).build());
+                setAttribute(userTO, conf.getEnterpriseUserConf().getCostCenter(),
+                        user.getEnterpriseInfo().getCostCenter());
             }
             if (conf.getEnterpriseUserConf().getOrganization() != null
                     && user.getEnterpriseInfo().getOrganization() != null) {
 
-                userTO.getPlainAttrs().add(new AttrTO.Builder().
-                        schema(conf.getEnterpriseUserConf().getOrganization()).
-                        value(user.getEnterpriseInfo().getOrganization()).build());
+                setAttribute(userTO, conf.getEnterpriseUserConf().getOrganization(),
+                        user.getEnterpriseInfo().getOrganization());
             }
             if (conf.getEnterpriseUserConf().getDivision() != null
                     && user.getEnterpriseInfo().getDivision() != null) {
 
-                userTO.getPlainAttrs().add(new AttrTO.Builder().
-                        schema(conf.getEnterpriseUserConf().getDivision()).
-                        value(user.getEnterpriseInfo().getDivision()).build());
+                setAttribute(userTO, conf.getEnterpriseUserConf().getDivision(),
+                        user.getEnterpriseInfo().getDivision());
             }
             if (conf.getEnterpriseUserConf().getDepartment() != null
                     && user.getEnterpriseInfo().getDepartment() != null) {
 
-                userTO.getPlainAttrs().add(new AttrTO.Builder().
-                        schema(conf.getEnterpriseUserConf().getDepartment()).
-                        value(user.getEnterpriseInfo().getDepartment()).build());
+                setAttribute(userTO, conf.getEnterpriseUserConf().getDepartment(),
+                        user.getEnterpriseInfo().getDepartment());
             }
             if (conf.getEnterpriseUserConf().getManager() != null
                     && conf.getEnterpriseUserConf().getManager().getKey() != null
                     && user.getEnterpriseInfo().getManager() != null
                     && user.getEnterpriseInfo().getManager().getValue() != null)
{
 
-                userTO.getPlainAttrs().add(new AttrTO.Builder().
-                        schema(conf.getEnterpriseUserConf().getManager().getKey()).
-                        value(user.getEnterpriseInfo().getManager().getValue()).build());
+                setAttribute(userTO, conf.getEnterpriseUserConf().getManager().getKey(),
+                        user.getEnterpriseInfo().getManager().getValue());
             }
         }
 
@@ -648,6 +636,17 @@ public class SCIMDataBinder {
         return userTO;
     }
 
+    private void setAttribute(final UserTO userTO, final String schema, final String value)
{
+        switch (schema) {
+            case "username":
+                userTO.setUsername(value);
+                break;
+
+            default:
+                userTO.getPlainAttrs().add(new AttrTO.Builder().schema(schema).value(value).build());
+        }
+    }
+
     public SCIMGroup toSCIMGroup(
             final GroupTO groupTO,
             final String location,

http://git-wip-us.apache.org/repos/asf/syncope/blob/a613585e/ext/scimv2/logic/src/main/java/org/apache/syncope/core/logic/SCIMLogic.java
----------------------------------------------------------------------
diff --git a/ext/scimv2/logic/src/main/java/org/apache/syncope/core/logic/SCIMLogic.java b/ext/scimv2/logic/src/main/java/org/apache/syncope/core/logic/SCIMLogic.java
index 04757f2..f09bdeb 100644
--- a/ext/scimv2/logic/src/main/java/org/apache/syncope/core/logic/SCIMLogic.java
+++ b/ext/scimv2/logic/src/main/java/org/apache/syncope/core/logic/SCIMLogic.java
@@ -98,13 +98,15 @@ public class SCIMLogic extends AbstractLogic<AbstractBaseBean> {
                 SERVICE_PROVIDER_CONFIG = new ServiceProviderConfig(
                         new Meta(
                                 Resource.ServiceProviderConfig,
-                                conf.getCreationDate(),
-                                conf.getLastChangeDate(),
-                                conf.getETagValue(),
+                                conf.getGeneralConf().getCreationDate(),
+                                conf.getGeneralConf().getLastChangeDate(),
+                                conf.getGeneralConf().getETagValue(),
                                 uriBuilder.build().toASCIIString()),
                         new ConfigurationOption(false),
-                        new BulkConfigurationOption(false, conf.getBulkMaxOperations(), conf.getBulkMaxPayloadSize()),
-                        new FilterConfigurationOption(true, conf.getFilterMaxResults()),
+                        new BulkConfigurationOption(false,
+                                conf.getGeneralConf().getBulkMaxOperations(),
+                                conf.getGeneralConf().getBulkMaxPayloadSize()),
+                        new FilterConfigurationOption(true, conf.getGeneralConf().getFilterMaxResults()),
                         new ConfigurationOption(true),
                         new ConfigurationOption(true),
                         new ConfigurationOption(true));

http://git-wip-us.apache.org/repos/asf/syncope/blob/a613585e/ext/scimv2/logic/src/main/java/org/apache/syncope/core/logic/scim/SCIMConfManager.java
----------------------------------------------------------------------
diff --git a/ext/scimv2/logic/src/main/java/org/apache/syncope/core/logic/scim/SCIMConfManager.java
b/ext/scimv2/logic/src/main/java/org/apache/syncope/core/logic/scim/SCIMConfManager.java
index ede870b..2804d78 100644
--- a/ext/scimv2/logic/src/main/java/org/apache/syncope/core/logic/scim/SCIMConfManager.java
+++ b/ext/scimv2/logic/src/main/java/org/apache/syncope/core/logic/scim/SCIMConfManager.java
@@ -21,6 +21,7 @@ package org.apache.syncope.core.logic.scim;
 import java.util.Date;
 import javax.ws.rs.core.MediaType;
 import org.apache.syncope.common.lib.scim.SCIMConf;
+import org.apache.syncope.common.lib.scim.SCIMGeneralConf;
 import org.apache.syncope.common.lib.scim.types.SCIMEntitlement;
 import org.apache.syncope.common.lib.to.AttrTO;
 import org.apache.syncope.common.lib.to.PlainSchemaTO;
@@ -84,7 +85,8 @@ public class SCIMConfManager {
             scimConf.setMimeType(MediaType.APPLICATION_JSON);
             schemaLogic.create(SchemaType.PLAIN, scimConf);
         }
-        conf.setLastChangeDate(new Date());
+        conf.setGeneralConf(new SCIMGeneralConf());
+        conf.getGeneralConf().setLastChangeDate(new Date());
 
         configurationLogic.set(new AttrTO.Builder().
                 schema(SCIMConf.KEY).value(Base64.encode(POJOHelper.serialize(conf).getBytes())).build());

http://git-wip-us.apache.org/repos/asf/syncope/blob/a613585e/ext/scimv2/scim-rest-cxf/src/main/java/org/apache/syncope/ext/scimv2/cxf/service/AbstractService.java
----------------------------------------------------------------------
diff --git a/ext/scimv2/scim-rest-cxf/src/main/java/org/apache/syncope/ext/scimv2/cxf/service/AbstractService.java
b/ext/scimv2/scim-rest-cxf/src/main/java/org/apache/syncope/ext/scimv2/cxf/service/AbstractService.java
index 94531a4..4d67101 100644
--- a/ext/scimv2/scim-rest-cxf/src/main/java/org/apache/syncope/ext/scimv2/cxf/service/AbstractService.java
+++ b/ext/scimv2/scim-rest-cxf/src/main/java/org/apache/syncope/ext/scimv2/cxf/service/AbstractService.java
@@ -189,7 +189,7 @@ abstract class AbstractService<R extends SCIMResource> {
             throw new UnsupportedOperationException();
         }
 
-        if (request.getCount() > confManager().get().getFilterMaxResults()) {
+        if (request.getCount() > confManager().get().getGeneralConf().getFilterMaxResults())
{
             throw new BadRequestException(ErrorType.tooMany, "Too many results requested");
         }
 
@@ -223,7 +223,7 @@ abstract class AbstractService<R extends SCIMResource> {
                 SyncopeConstants.ROOT_REALM,
                 false);
 
-        if (result.getLeft() > confManager().get().getFilterMaxResults()) {
+        if (result.getLeft() > confManager().get().getGeneralConf().getFilterMaxResults())
{
             throw new BadRequestException(ErrorType.tooMany, "Too many results found");
         }
 


Mime
View raw message