You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by md...@apache.org on 2015/11/12 11:34:48 UTC
[1/2] syncope git commit: [SYNCOPE-156] Schemas management
Repository: syncope
Updated Branches:
refs/heads/master 93ed788b5 -> 01612160f
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/resources/org/apache/syncope/client/console/panels/DerSchemaDetails_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/DerSchemaDetails_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/DerSchemaDetails_it.properties
new file mode 100644
index 0000000..6418695
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/DerSchemaDetails_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.
+required_alert=Tutti i campi sono richiesti.
+expression=Expression
+edit_attribute=Modifica attributo
+attributes=Attributi derivati
+title=Schema Derivato
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/resources/org/apache/syncope/client/console/panels/DerSchemaDetails_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/DerSchemaDetails_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/DerSchemaDetails_pt_BR.properties
new file mode 100644
index 0000000..cf896b5
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/DerSchemaDetails_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.
+required_alert=Todos os campos do formaul\u00e1rio s\u00e3o obrigat\u00f3rios
+expression=Express\u00e3o
+edit_attribute=Alterar Atributo
+attributes=Atributos Derivados
+title=Esquema Derivado
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/resources/org/apache/syncope/client/console/panels/PlainSchemaDetails.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/PlainSchemaDetails.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/PlainSchemaDetails.html
new file mode 100644
index 0000000..79ef7a1
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/PlainSchemaDetails.html
@@ -0,0 +1,89 @@
+<!--
+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://xmlns.jcp.org/jsf/composite">
+ <wicket:panel>
+ <form wicket:id="form">
+ <div class="form-group">
+ <span wicket:id="key">[name]</span>
+ </div>
+ <div class="form-group">
+ <span wicket:id="type">[type]</span>
+ </div>
+
+ <div class="form-group" wicket:id="conversionParams">
+ <span wicket:id="conversionPattern">[conversionPattern]</span>
+ </div>
+
+ <div class="form-group" wicket:id="typeParams">
+ <div wicket:id="enumParams">
+ <div class="form-group">
+ <span wicket:id="enumerationValues">[enumerationValues]</span>
+ </div>
+ <div class="form-group">
+ <span wicket:id="enumerationKeys">[enumerationKeys]</span>
+ </div>
+ </div>
+ <div wicket:id="encryptedParams">
+ <div class="form-group">
+ <span wicket:id="secretKey">[secretKey]</span>
+ </div>
+ <div class="form-group">
+ <span wicket:id="cipherAlgorithm">[cipherAlgorithm]</span>
+ </div>
+ </div>
+ <div wicket:id="binaryParams">
+ <div class="form-group">
+ <span wicket:id="mimeType">[mimeType]</span>
+ </div>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <span wicket:id="validatorClass">[validatorClass]</span>
+ </div>
+
+ <div class="form-group">
+ <label for="mandatoryCondition"><wicket:message key="mandatoryCondition"/></label>
+ <input type="text" id="mandatoryCondition" class="form-control col-xs-4" wicket:id="mandatoryCondition"/>
+ <a class="tooltips" wicket:id="questionMarkJexlHelp" href="#" alt="Click to help" title="Click to help">
+ <span class="glyphicon glyphicon-info-sign"></span>
+ <span wicket:id="jexlHelp" class="tooltips">
+ <wicket:message key="jexl_info"/>
+ <ul>
+ <li><wicket:message key="jexl_ex1"/></li>
+ <li><wicket:message key="jexl_ex2"/></li>
+ </ul>
+ <a href="#" wicket:id="jexlLink" target="_blank"><wicket:message key="jexl_syntax_url"/></a>
+ </span>
+ </a>
+ </div>
+ <div class="form-group">
+ <div class="form-group">
+ <span wicket:id="uniqueConstraint">[uniqueConstraint]</span>
+ </div>
+ <div class="form-group">
+ <span wicket:id="multivalue">[multivalue]</span>
+ </div>
+ <div class="form-group">
+ <span wicket:id="readonly">[readonly]</span>
+ </div>
+ </div>
+ </form>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/resources/org/apache/syncope/client/console/panels/PlainSchemaDetails.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/PlainSchemaDetails.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/PlainSchemaDetails.properties
new file mode 100644
index 0000000..512fc01
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/PlainSchemaDetails.properties
@@ -0,0 +1,33 @@
+# 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.
+required_alert=All form fields are required.
+mandatoryCondition=Mandatory
+enumerationValues= Enumeration values
+enumerationKeys= Enumeration labels
+uniqueConstraint=Unique
+multivalue=Multivalue
+multivalueAndUniqueConstr.validation='Multivalue' and 'Unique constraint' options can't be both checked
+type=Type
+validatorClass=Validator class
+conversionPattern=Conversion pattern
+action=Action
+edit_attribute=Edit attribute
+title=Schema
+readonly=Read-only
+secretKey=Secret key
+cipherAlgorithm=Cipher algorithm
+mimeType=MIME Type
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/resources/org/apache/syncope/client/console/panels/PlainSchemaDetails_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/PlainSchemaDetails_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/PlainSchemaDetails_it.properties
new file mode 100644
index 0000000..4896749
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/PlainSchemaDetails_it.properties
@@ -0,0 +1,33 @@
+# 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.
+required_alert=Tutti i campi sono richiesti
+mandatoryCondition=Obbligatorio
+enumerationValues= Valori enumeration
+enumerationKeys= Label enumeration
+multivalue=Multivalore
+type=Tipo
+validatorClass=Validatore
+conversionPattern=Conversion pattern
+action=Azione
+edit_attribute=Modifica attributo
+title=Schema
+readonly=Read-only
+uniqueConstraint=Univoco
+multivalueAndUniqueConstr.validation=Le opzioni 'Multivalore' e 'Vincolo unique' non possono essere entrambe impostate
+secretKey=Chiave segreta
+cipherAlgorithm=Algoritmo di cifratura
+mimeType=MIME Type
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/resources/org/apache/syncope/client/console/panels/PlainSchemaDetails_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/PlainSchemaDetails_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/PlainSchemaDetails_pt_BR.properties
new file mode 100644
index 0000000..beae751
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/PlainSchemaDetails_pt_BR.properties
@@ -0,0 +1,33 @@
+# 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.
+required_alert=Todos os campos s\u00e3o obrigat\u00f3rios
+mandatoryCondition=obrigat\u00f3rio
+enumerationValues= Valores enumerados
+enumerationKeys= R\u00f3tulos de enumera\u00e7\u00e3o
+uniqueConstraint=\u00danico
+multivalue=Multivalorado
+multivalueAndUniqueConstr.validation=As op\u00e7\u00f5es 'Multivalorado' e 'Restri\u00e7\u00e3o \u00fanica' n\u00e3o podem serem ambas selecionadas
+type=Tipo
+validatorClass=Classe de Valida\u00e7\u00e3o
+conversionPattern=Padr\u00e3o de Convers\u00e3o
+action=A\u00e7\u00e3o
+edit_attribute=Editar Atributo
+title=Esquema
+readonly=Apenas leitura
+secretKey=Chave secreta
+cipherAlgorithm=Algoritmo de criptografia
+mimeType=MIME Type
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchemaModalPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchemaModalPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchemaModalPanel.html
new file mode 100644
index 0000000..b11fa1d
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchemaModalPanel.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:extend>
+ <div class="form-group">
+ <form wicket:id="kindForm">
+ <span wicket:id="kind">[kind]</span>
+ </form>
+ </div>
+ <div wicket:id="details">[details]</div>
+ </wicket:extend>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchemaModalPanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchemaModalPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchemaModalPanel.properties
new file mode 100644
index 0000000..881403b
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchemaModalPanel.properties
@@ -0,0 +1,18 @@
+# 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.
+kind=Schema type
+createSchema=Create new schema
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchemaModalPanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchemaModalPanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchemaModalPanel_it.properties
new file mode 100644
index 0000000..5c438b9
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchemaModalPanel_it.properties
@@ -0,0 +1,18 @@
+# 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.
+kind=Tipo schema
+createSchema=Crea un nuovo schema
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchemaModalPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchemaModalPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchemaModalPanel_pt_BR.properties
new file mode 100644
index 0000000..f31e84e
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchemaModalPanel_pt_BR.properties
@@ -0,0 +1,18 @@
+# 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.
+kind=Schema type
+createSchema=Cria um novo schema
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchemasPanel$SchemaTypePanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchemasPanel$SchemaTypePanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchemasPanel$SchemaTypePanel.html
new file mode 100644
index 0000000..47be190
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchemasPanel$SchemaTypePanel.html
@@ -0,0 +1,39 @@
+<!--
+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="schemaWrapContainer">
+ <span wicket:id="schemaContainer">
+ <table class="table table-bordered table-hover dataTable" wicket:id="datatable">[datatable]</table>
+ </span>
+ <span style="float:right">
+ <form wicket:id="paginator" style="display:inline">
+ <div class="col-sm-6">
+ <div class="dataTables_length">
+ <label>
+ <wicket:message key="displayRows"/>
+ <select class="form-control input-sm" wicket:id="rowsChooser"/>
+ </label>
+ </div>
+ </div>
+ </form>
+ </span>
+ </div>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchemasPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchemasPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchemasPanel.html
new file mode 100644
index 0000000..a006d12
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchemasPanel.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<!--
+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.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://xmlns.jcp.org/jsf/composite">
+ <body>
+ <wicket:panel>
+ <div wicket:id="collapsePanel"></div>
+ </wicket:panel>
+ </body>
+</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchemasPanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchemasPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchemasPanel.properties
new file mode 100644
index 0000000..f9b8e4b
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchemasPanel.properties
@@ -0,0 +1,27 @@
+# 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.
+mandatoryCondition=Mandatory
+enumerationValues= Enumeration values
+enumerationKeys= Enumeration labels
+uniqueConstraint=Unique
+multivalue=Multivalue
+type=Type
+title=Schema
+readonly=Read-only
+expression=Expression
+provision=Provision
+extAttrName=ExtAttrName
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchemasPanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchemasPanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchemasPanel_it.properties
new file mode 100644
index 0000000..d6f5f25
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchemasPanel_it.properties
@@ -0,0 +1,27 @@
+# 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.
+mandatoryCondition=Obbligatorio
+enumerationValues= Valori enumeration
+enumerationKeys= Label enumeration
+multivalue=Multivalore
+type=Tipo
+title=Schema
+readonly=Read-only
+uniqueConstraint=Univoco
+expression=Express\u00e3o
+provision=Provision
+extAttrName=ExtAttrName
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchemasPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchemasPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchemasPanel_pt_BR.properties
new file mode 100644
index 0000000..9700c5b
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/SchemasPanel_pt_BR.properties
@@ -0,0 +1,27 @@
+# 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.
+mandatoryCondition=obrigat\u00f3rio
+enumerationValues= Valores enumerados
+enumerationKeys= R\u00f3tulos de enumera\u00e7\u00e3o
+uniqueConstraint=\u00danico
+multivalue=Multivalorado
+type=Tipo
+title=Esquema
+readonly=Apenas leitura
+expression=Espressione
+provision=Provision
+extAttrName=ExtAttrName
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/resources/org/apache/syncope/client/console/panels/VirSchemaDetails.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/VirSchemaDetails.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/VirSchemaDetails.html
new file mode 100644
index 0000000..abdf05b
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/VirSchemaDetails.html
@@ -0,0 +1,43 @@
+<!--
+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 class="form-group">
+ <form wicket:id="form">
+ <div class="form-group">
+ <div class="form-group">
+ <span wicket:id="key">[name]</span>
+ </div>
+ <div class="form-group">
+ <span wicket:id="readonly">[readonly]</span>
+ </div>
+ <div class="form-group">
+ <span wicket:id="resource">[resource]</span>
+ </div>
+ <div class="form-group">
+ <span wicket:id="provision">[provision]</span>
+ </div>
+ <div class="form-group">
+ <span wicket:id="extAttrName">[extAttrName]</span>
+ </div>
+ </div>
+ </form>
+ </div>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/resources/org/apache/syncope/client/console/panels/VirSchemaDetails.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/VirSchemaDetails.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/VirSchemaDetails.properties
new file mode 100644
index 0000000..d76fa24
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/VirSchemaDetails.properties
@@ -0,0 +1,24 @@
+# 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.
+required_alert=All form fields are required.
+edit_attribute=Edit attribute
+attributes=Virtual attributes
+title=Virtual Schema
+readonly=Read-only
+resource=Resource
+provision=Provision
+extAttrName=External attribute
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/resources/org/apache/syncope/client/console/panels/VirSchemaDetails_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/VirSchemaDetails_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/VirSchemaDetails_it.properties
new file mode 100644
index 0000000..1dc21b0
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/VirSchemaDetails_it.properties
@@ -0,0 +1,24 @@
+# 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.
+required_alert=Tutti i campi sono richiesti.
+edit_attribute=Modifica attributo
+attributes=Attributi virtuali
+title=Schema Virtuale
+readonly=Read-only
+resource=Risorsa
+provision=Provision
+extAttrName=Attributo esterno
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/resources/org/apache/syncope/client/console/panels/VirSchemaDetails_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/VirSchemaDetails_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/VirSchemaDetails_pt_BR.properties
new file mode 100644
index 0000000..e47e9e8
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/VirSchemaDetails_pt_BR.properties
@@ -0,0 +1,24 @@
+# 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.
+required_alert=Todos os campos do formul\u00e1rio s\u00e3o obrigat\u00f3rios
+edit_attribute=Editar Atributo
+attributes=Atributos Virtuais
+title=Esquema Virtual
+readonly=Apenas Leitura
+resource=Recurso
+provision=Provision
+extAttrName=Atributo Externo
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/common/lib/src/main/java/org/apache/syncope/common/lib/to/VirSchemaTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/VirSchemaTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/VirSchemaTO.java
index 8c3df1b..1d0534d 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/VirSchemaTO.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/VirSchemaTO.java
@@ -27,6 +27,8 @@ public class VirSchemaTO extends AbstractSchemaTO {
private boolean readonly;
+ private String resource;
+
private long provision;
private String extAttrName;
@@ -39,6 +41,14 @@ public class VirSchemaTO extends AbstractSchemaTO {
this.readonly = readonly;
}
+ public String getResource() {
+ return resource;
+ }
+
+ public void setResource(final String resource) {
+ this.resource = resource;
+ }
+
public long getProvision() {
return provision;
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/SchemaDataBinderImpl.java
----------------------------------------------------------------------
diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/SchemaDataBinderImpl.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/SchemaDataBinderImpl.java
index 6e9837f..002fbd9 100644
--- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/SchemaDataBinderImpl.java
+++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/SchemaDataBinderImpl.java
@@ -52,7 +52,7 @@ public class SchemaDataBinderImpl implements SchemaDataBinder {
private static final Logger LOG = LoggerFactory.getLogger(SchemaDataBinder.class);
- private static final String[] IGNORE_PROPERTIES = { "anyTypeClass", "provision" };
+ private static final String[] IGNORE_PROPERTIES = { "anyTypeClass", "provision", "resource" };
@Autowired
private AnyTypeClassDAO anyTypeClassDAO;
@@ -264,6 +264,7 @@ public class SchemaDataBinderImpl implements SchemaDataBinder {
VirSchemaTO schemaTO = new VirSchemaTO();
BeanUtils.copyProperties(schema, schemaTO, IGNORE_PROPERTIES);
schemaTO.setAnyTypeClass(schema.getAnyTypeClass() == null ? null : schema.getAnyTypeClass().getKey());
+ schemaTO.setResource(schema.getProvision().getResource().getKey());
schemaTO.setProvision(schema.getProvision().getKey());
return schemaTO;
[2/2] syncope git commit: [SYNCOPE-156] Schemas management
Posted by md...@apache.org.
[SYNCOPE-156] Schemas management
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/01612160
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/01612160
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/01612160
Branch: refs/heads/master
Commit: 01612160f16fe45b8f2f206a06d2ad3dc566dbd7
Parents: 93ed788
Author: Marco Di Sabatino Di Diodoro <md...@apache.org>
Authored: Thu Nov 12 11:26:05 2015 +0100
Committer: Marco Di Sabatino Di Diodoro <md...@apache.org>
Committed: Thu Nov 12 11:31:05 2015 +0100
----------------------------------------------------------------------
.../syncope/client/console/pages/BasePage.java | 6 +
.../syncope/client/console/pages/Schemas.java | 143 +++++++
.../panels/AbstractSchemaDetailsPanel.java | 82 ++++
.../console/panels/AnyTypeClassesPanel.java | 32 ++
.../client/console/panels/DerSchemaDetails.java | 80 ++++
.../console/panels/PlainSchemaDetails.java | 425 +++++++++++++++++++
.../client/console/panels/SchemaModalPanel.java | 119 ++++++
.../client/console/panels/SchemasPanel.java | 372 ++++++++++++++++
.../client/console/panels/VirSchemaDetails.java | 162 +++++++
.../markup/html/form/MultiFieldPanel.java | 2 +-
.../client/console/wizards/any/PlainAttrs.java | 6 +-
.../SyncopeConsoleApplication.properties | 1 +
.../SyncopeConsoleApplication_it.properties | 1 +
.../SyncopeConsoleApplication_pt_BR.properties | 1 +
.../syncope/client/console/pages/BasePage.html | 2 +-
.../console/pages/BasePage_pt_BR.properties | 4 +-
.../syncope/client/console/pages/Schemas.html | 54 +++
.../client/console/pages/Schemas.properties | 18 +
.../client/console/pages/Schemas_it.properties | 18 +
.../console/pages/Schemas_pt_BR.properties | 18 +
.../client/console/panels/DerSchemaDetails.html | 47 ++
.../console/panels/DerSchemaDetails.properties | 21 +
.../panels/DerSchemaDetails_it.properties | 21 +
.../panels/DerSchemaDetails_pt_BR.properties | 21 +
.../console/panels/PlainSchemaDetails.html | 89 ++++
.../panels/PlainSchemaDetails.properties | 33 ++
.../panels/PlainSchemaDetails_it.properties | 33 ++
.../panels/PlainSchemaDetails_pt_BR.properties | 33 ++
.../client/console/panels/SchemaModalPanel.html | 28 ++
.../console/panels/SchemaModalPanel.properties | 18 +
.../panels/SchemaModalPanel_it.properties | 18 +
.../panels/SchemaModalPanel_pt_BR.properties | 18 +
.../panels/SchemasPanel$SchemaTypePanel.html | 39 ++
.../client/console/panels/SchemasPanel.html | 28 ++
.../console/panels/SchemasPanel.properties | 27 ++
.../console/panels/SchemasPanel_it.properties | 27 ++
.../panels/SchemasPanel_pt_BR.properties | 27 ++
.../client/console/panels/VirSchemaDetails.html | 43 ++
.../console/panels/VirSchemaDetails.properties | 24 ++
.../panels/VirSchemaDetails_it.properties | 24 ++
.../panels/VirSchemaDetails_pt_BR.properties | 24 ++
.../syncope/common/lib/to/VirSchemaTO.java | 10 +
.../java/data/SchemaDataBinderImpl.java | 3 +-
43 files changed, 2194 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java
index 1ea44d5..a0435e0 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java
@@ -83,6 +83,12 @@ public class BasePage extends AbstractBasePage implements IAjaxIndicatorAware {
WebMarkupContainer confULContainer = new WebMarkupContainer(getULContainerId("configuration"));
confLIContainer.add(confULContainer);
+ liContainer = new WebMarkupContainer(getLIContainerId("schemas"));
+ confULContainer.add(liContainer);
+ BookmarkablePageLink<Page> schemaLink = new BookmarkablePageLink<>("schemas", Schemas.class);
+// MetaDataRoleAuthorizationStrategy.authorize(schemaLink, WebPage.ENABLE, Entitlement.SCHEMA_LIST);
+ liContainer.add(schemaLink);
+
liContainer = new WebMarkupContainer(getLIContainerId("workflow"));
confULContainer.add(liContainer);
BookmarkablePageLink<Page> link = new BookmarkablePageLink<>("workflow", Workflow.class);
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/java/org/apache/syncope/client/console/pages/Schemas.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/Schemas.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/Schemas.java
new file mode 100644
index 0000000..421ef00
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/Schemas.java
@@ -0,0 +1,143 @@
+/*
+ * 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.pages;
+
+import static org.apache.wicket.Component.ENABLE;
+
+import de.agilecoders.wicket.core.markup.html.bootstrap.tabs.AjaxBootstrapTabbedPanel;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.syncope.client.console.SyncopeConsoleSession;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.panels.SchemasPanel;
+import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicatingAjaxLink;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
+import org.apache.syncope.common.lib.to.AbstractSchemaTO;
+import org.apache.syncope.common.lib.types.Entitlement;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
+import org.apache.wicket.extensions.markup.html.tabs.AbstractTab;
+import org.apache.wicket.extensions.markup.html.tabs.ITab;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.panel.EmptyPanel;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+import org.apache.syncope.client.console.panels.SchemaModalPanel;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+
+public class Schemas extends BasePage {
+
+ private static final long serialVersionUID = 8091922398776299403L;
+
+ private final BaseModal<AbstractSchemaTO> modal;
+
+ public Schemas(final PageParameters parameters) {
+ super(parameters);
+
+ this.modal = new BaseModal<>("modal");
+
+ final WebMarkupContainer content = new WebMarkupContainer("content");
+ content.add(new Label("header", "AnyTypeClasses/Schemas"));
+ content.setOutputMarkupId(true);
+ content.add(new AjaxBootstrapTabbedPanel<>("tabbedPanel", buildTabList(getPageReference())));
+ content.add(buildCreateSchemaLink());
+ add(content);
+
+ modal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
+
+ private static final long serialVersionUID = 8804221891699487139L;
+
+ @Override
+ public void onClose(final AjaxRequestTarget target) {
+ target.add();
+ modal.show(false);
+
+ if (((AbstractBasePage) Schemas.this.getPage()).isModalResult()) {
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ feedbackPanel.refresh(target);
+ ((AbstractBasePage) Schemas.this.getPage()).setModalResult(false);
+ }
+ }
+ });
+
+ add(modal);
+
+ }
+
+ private List<ITab> buildTabList(final PageReference pageReference) {
+
+ final List<ITab> tabs = new ArrayList<>();
+
+ tabs.add(new AbstractTab(new Model<>("AnyTypeClasses")) {
+
+ private static final long serialVersionUID = -6815067322125799251L;
+
+ @Override
+ public Panel getPanel(final String panelId) {
+// final AnyTypeClassesPanel objectClassesPanel =
+// new AnyTypeClassesPanel(panelId, getPageReference(), false);
+// objectClassesPanel.setEnabled(false);
+// return objectClassesPanel;
+ return new EmptyPanel(panelId);
+ }
+ });
+
+ tabs.add(new AbstractTab(new Model<>("Schemas")) {
+
+ private static final long serialVersionUID = -6815067322125799251L;
+
+ @Override
+ public Panel getPanel(final String panelId) {
+ return new SchemasPanel(panelId, getPageReference(), modal);
+ }
+ });
+
+ return tabs;
+ }
+
+ private AjaxLink<Void> buildCreateSchemaLink() {
+
+ final AjaxLink<Void> createLink = new ClearIndicatingAjaxLink<Void>("createSchemaLink", getPageReference()) {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ protected void onClickInternal(final AjaxRequestTarget target) {
+ modal.header(new ResourceModel("createSchema"));
+
+ final SchemaModalPanel panel = new SchemaModalPanel(modal, getPageReference(), true);
+
+ target.add(modal.setContent(panel));
+ modal.addSumbitButton();
+ modal.show(true);
+ }
+ };
+
+ if (SyncopeConsoleSession.get().owns(Entitlement.SCHEMA_CREATE)) {
+ MetaDataRoleAuthorizationStrategy.authorize(createLink, ENABLE, Entitlement.SCHEMA_CREATE);
+ }
+
+ return createLink;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSchemaDetailsPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSchemaDetailsPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSchemaDetailsPanel.java
new file mode 100644
index 0000000..8522d33
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSchemaDetailsPanel.java
@@ -0,0 +1,82 @@
+/*
+ * 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.panels;
+
+import static org.apache.syncope.client.console.panels.AbstractModalPanel.FORM;
+import org.apache.syncope.client.console.pages.AbstractBasePage;
+import org.apache.syncope.client.console.rest.SchemaRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.common.lib.to.AbstractSchemaTO;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.PropertyModel;
+
+public abstract class AbstractSchemaDetailsPanel extends Panel {
+
+ private static final long serialVersionUID = -9096843774956370327L;
+
+ /**
+ * Schema rest client for create and update operations
+ */
+ protected final SchemaRestClient schemaRestClient = new SchemaRestClient();
+
+ /**
+ * Feedback panel specified by the caller.
+ */
+ protected final NotificationPanel feedbackPanel;
+
+ /**
+ * Schema form
+ */
+ protected final Form<AbstractSchemaTO> schemaForm;
+
+ protected final AbstractSchemaTO schemaTO;
+
+ private final AbstractBasePage page;
+
+ public AbstractSchemaDetailsPanel(
+ final String id,
+ final PageReference pageReference,
+ final BaseModal<AbstractSchemaTO> modal) {
+ super(id);
+
+ this.page = (AbstractBasePage) pageReference.getPage();
+ this.feedbackPanel = page.getFeedbackPanel();
+ this.schemaTO = modal.getFormModel();
+
+ schemaForm = new Form<>(FORM);
+ schemaForm.setModel(new CompoundPropertyModel<>(schemaTO));
+ schemaForm.setOutputMarkupId(true);
+
+ final AjaxTextFieldPanel name =
+ new AjaxTextFieldPanel("key", getString("key"), new PropertyModel<String>(schemaTO, "key"));
+ name.addRequiredLabel();
+ name.setEnabled(schemaTO.getKey() == null || schemaTO.getKey().isEmpty());
+
+ schemaForm.add(name);
+ add(schemaForm);
+ }
+
+ public abstract void getOnSubmit(final AjaxRequestTarget target, final BaseModal<?> modal, final Form<?> form,
+ final PageReference pageReference, final boolean createFlag);
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypeClassesPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypeClassesPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypeClassesPanel.java
new file mode 100644
index 0000000..2d1c07f
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyTypeClassesPanel.java
@@ -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.
+ */
+package org.apache.syncope.client.console.panels;
+
+import org.apache.wicket.PageReference;
+import org.apache.wicket.markup.html.panel.Panel;
+
+public class AnyTypeClassesPanel extends Panel {
+
+ private static final long serialVersionUID = -2356760296223908382L;
+
+ public AnyTypeClassesPanel(final String id, final PageReference pageReference, final boolean unwraped) {
+ super(id);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/java/org/apache/syncope/client/console/panels/DerSchemaDetails.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/DerSchemaDetails.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/DerSchemaDetails.java
new file mode 100644
index 0000000..d8b42be
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/DerSchemaDetails.java
@@ -0,0 +1,80 @@
+/*
+ * 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.panels;
+
+import static org.apache.syncope.client.console.panels.AbstractModalPanel.LOG;
+
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.JexlHelpUtils;
+import org.apache.syncope.client.console.pages.AbstractBasePage;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.common.lib.to.AbstractSchemaTO;
+import org.apache.syncope.common.lib.to.DerSchemaTO;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.PropertyModel;
+
+public class DerSchemaDetails extends AbstractSchemaDetailsPanel {
+
+ private static final long serialVersionUID = 6668789770131753386L;
+
+ public DerSchemaDetails(final String id,
+ final PageReference pageReference,
+ final BaseModal<AbstractSchemaTO> modal) {
+ super(id, pageReference, modal);
+
+ final AjaxTextFieldPanel expression = new AjaxTextFieldPanel("expression", getString("expression"),
+ new PropertyModel<String>(schemaTO, "expression"));
+ expression.addRequiredLabel();
+ schemaForm.add(expression);
+
+ final WebMarkupContainer jexlHelp = JexlHelpUtils.getJexlHelpWebContainer("jexlHelp");
+
+ final AjaxLink<Void> questionMarkJexlHelp = JexlHelpUtils.getAjaxLink(jexlHelp, "questionMarkJexlHelp");
+ schemaForm.add(questionMarkJexlHelp);
+ questionMarkJexlHelp.add(jexlHelp);
+ }
+
+ @Override
+ public void getOnSubmit(final AjaxRequestTarget target,
+ final BaseModal<?> modal, final Form<?> form, final PageReference pageReference, final boolean createFlag) {
+
+ try {
+ final DerSchemaTO updatedDerSchemaTO = DerSchemaTO.class.cast(form.getModelObject());
+ if (createFlag) {
+ schemaRestClient.createDerSchema(updatedDerSchemaTO);
+ } else {
+ schemaRestClient.updateDerSchema(updatedDerSchemaTO);
+ }
+
+ if (pageReference.getPage() instanceof AbstractBasePage) {
+ ((AbstractBasePage) pageReference.getPage()).setModalResult(true);
+ }
+ modal.close(target);
+ } catch (Exception e) {
+ LOG.error("While creating or updating derived schema", e);
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ modal.getFeedbackPanel().refresh(target);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/java/org/apache/syncope/client/console/panels/PlainSchemaDetails.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/PlainSchemaDetails.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/PlainSchemaDetails.java
new file mode 100644
index 0000000..2e5acda
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/PlainSchemaDetails.java
@@ -0,0 +1,425 @@
+/*
+ * 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.panels;
+
+import static org.apache.syncope.client.console.panels.AbstractModalPanel.LOG;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.JexlHelpUtils;
+import org.apache.syncope.client.console.init.MIMETypesLoader;
+import org.apache.syncope.client.console.pages.AbstractBasePage;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.MultiFieldPanel;
+import org.apache.syncope.common.lib.SyncopeConstants;
+import org.apache.syncope.common.lib.to.AbstractSchemaTO;
+import org.apache.syncope.common.lib.to.PlainSchemaTO;
+import org.apache.syncope.common.lib.types.AttrSchemaType;
+import org.apache.syncope.common.lib.types.CipherAlgorithm;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.LoadableDetachableModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.util.ListModel;
+import org.apache.wicket.util.string.Strings;
+
+public class PlainSchemaDetails extends AbstractSchemaDetailsPanel {
+
+ private static final long serialVersionUID = 5378100729213456451L;
+
+ private static final MIMETypesLoader MIME_TYPES_INITIALIZER = new MIMETypesLoader();
+
+ private final MultiFieldPanel<String> enumerationValues;
+
+ private final MultiFieldPanel<String> enumerationKeys;
+
+ public PlainSchemaDetails(
+ final String id,
+ final PageReference pageReference,
+ final BaseModal<AbstractSchemaTO> modal) {
+ super(id, pageReference, modal);
+
+ final AjaxDropDownChoicePanel<AttrSchemaType> type = new AjaxDropDownChoicePanel<>(
+ "type", getString("type"), new PropertyModel<AttrSchemaType>(schemaTO, "type"));
+
+ type.setChoices(Arrays.asList(AttrSchemaType.values()));
+ type.setEnabled(schemaTO.getKey() == null || schemaTO.getKey().isEmpty());
+ type.addRequiredLabel();
+
+ schemaForm.add(type);
+
+ // long, double, date
+ final AjaxTextFieldPanel conversionPattern = new AjaxTextFieldPanel("conversionPattern",
+ getString("conversionPattern"), new PropertyModel<String>(schemaTO, "conversionPattern"));
+
+ schemaForm.add(conversionPattern);
+
+ final WebMarkupContainer conversionParams = new WebMarkupContainer("conversionParams");
+ conversionParams.setOutputMarkupPlaceholderTag(true);
+ conversionParams.add(conversionPattern);
+
+ schemaForm.add(conversionParams);
+
+ final WebMarkupContainer typeParams = new WebMarkupContainer("typeParams");
+
+ typeParams.setOutputMarkupPlaceholderTag(true);
+
+ // enum
+ final AjaxTextFieldPanel enumerationValuesPanel =
+ new AjaxTextFieldPanel("panel", "enumerationValues", new Model<String>(null));
+
+ enumerationValues = new MultiFieldPanel.Builder<>(
+ new ListModel<String>()).build(
+ "enumerationValues",
+ "enumerationValues",
+ enumerationValuesPanel);
+ enumerationValues.setModelObject(getEnumValuesAsList(((PlainSchemaTO) schemaTO).getEnumerationValues()));
+
+ enumerationKeys = new MultiFieldPanel.Builder<>(
+ new ListModel<String>()).build(
+ "enumerationKeys",
+ "enumerationKeys",
+ new AjaxTextFieldPanel("panel", "enumerationKeys", new Model<String>()));
+ enumerationKeys.setModelObject(getEnumValuesAsList(((PlainSchemaTO) schemaTO).getEnumerationKeys()));
+
+ final WebMarkupContainer enumParams = new WebMarkupContainer("enumParams");
+ enumParams.setOutputMarkupPlaceholderTag(true);
+ enumParams.add(enumerationValues);
+ enumParams.add(enumerationKeys);
+ typeParams.add(enumParams);
+
+ // encrypted
+ final AjaxTextFieldPanel secretKey = new AjaxTextFieldPanel("secretKey",
+ getString("secretKey"), new PropertyModel<String>(schemaTO, "secretKey"));
+
+ final AjaxDropDownChoicePanel<CipherAlgorithm> cipherAlgorithm = new AjaxDropDownChoicePanel<>(
+ "cipherAlgorithm", getString("cipherAlgorithm"),
+ new PropertyModel<CipherAlgorithm>(schemaTO, "cipherAlgorithm"));
+
+ cipherAlgorithm.setChoices(Arrays.asList(CipherAlgorithm.values()));
+
+ final WebMarkupContainer encryptedParams = new WebMarkupContainer("encryptedParams");
+ encryptedParams.setOutputMarkupPlaceholderTag(true);
+ encryptedParams.add(secretKey);
+ encryptedParams.add(cipherAlgorithm);
+
+ typeParams.add(encryptedParams);
+
+ // binary
+ final AjaxTextFieldPanel mimeType = new AjaxTextFieldPanel("mimeType",
+ getString("mimeType"), new PropertyModel<String>(schemaTO, "mimeType"));
+
+ mimeType.setChoices(MIME_TYPES_INITIALIZER.getMimeTypes());
+
+ final WebMarkupContainer binaryParams = new WebMarkupContainer("binaryParams");
+ binaryParams.setOutputMarkupPlaceholderTag(true);
+ binaryParams.add(mimeType);
+ typeParams.add(binaryParams);
+ schemaForm.add(typeParams);
+
+ // show or hide
+ showHide(schemaTO, type,
+ conversionParams, conversionPattern,
+ enumParams, enumerationValuesPanel, enumerationValues, enumerationKeys,
+ encryptedParams, secretKey, cipherAlgorithm,
+ binaryParams, mimeType);
+
+ type.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ PlainSchemaDetails.this.showHide(schemaTO, type,
+ conversionParams, conversionPattern,
+ enumParams, enumerationValuesPanel, enumerationValues, enumerationKeys,
+ encryptedParams, secretKey, cipherAlgorithm,
+ binaryParams, mimeType);
+ target.add(conversionParams);
+ target.add(typeParams);
+ }
+ }
+ );
+
+ final IModel<List<String>> validatorsList = new LoadableDetachableModel<List<String>>() {
+
+ private static final long serialVersionUID = 5275935387613157437L;
+
+ @Override
+ protected List<String> load() {
+ return schemaRestClient.getAllValidatorClasses();
+ }
+ };
+
+ final AjaxDropDownChoicePanel<String> validatorClass = new AjaxDropDownChoicePanel<>("validatorClass",
+ getString("validatorClass"), new PropertyModel<String>(schemaTO, "validatorClass"));
+ ((DropDownChoice) validatorClass.getField()).setNullValid(true);
+ validatorClass.setChoices(validatorsList.getObject());
+ schemaForm.add(validatorClass);
+
+ final AutoCompleteTextField<String> mandatoryCondition =
+ new AutoCompleteTextField<String>("mandatoryCondition") {
+
+ private static final long serialVersionUID = -2428903969518079100L;
+
+ @Override
+ protected Iterator<String> getChoices(final String input) {
+ List<String> choices = new ArrayList<>();
+
+ if (Strings.isEmpty(input)) {
+ choices = Collections.emptyList();
+ } else if ("true".startsWith(input.toLowerCase())) {
+ choices.add("true");
+ } else if ("false".startsWith(input.toLowerCase())) {
+ choices.add("false");
+ }
+
+ return choices.iterator();
+ }
+ };
+ mandatoryCondition.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ }
+ });
+ schemaForm.add(mandatoryCondition);
+
+ final WebMarkupContainer pwdJexlHelp = JexlHelpUtils.getJexlHelpWebContainer("jexlHelp");
+
+ final AjaxLink<Void> pwdQuestionMarkJexlHelp = JexlHelpUtils.getAjaxLink(pwdJexlHelp, "questionMarkJexlHelp");
+ schemaForm.add(pwdQuestionMarkJexlHelp);
+ pwdQuestionMarkJexlHelp.add(pwdJexlHelp);
+
+ final AjaxCheckBoxPanel multivalue = new AjaxCheckBoxPanel("multivalue", getString("multivalue"),
+ new PropertyModel<Boolean>(schemaTO, "multivalue"));
+ schemaForm.add(multivalue);
+
+ final AjaxCheckBoxPanel readonly = new AjaxCheckBoxPanel("readonly", getString("readonly"),
+ new PropertyModel<Boolean>(schemaTO, "readonly"));
+ schemaForm.add(readonly);
+
+ final AjaxCheckBoxPanel uniqueConstraint = new AjaxCheckBoxPanel("uniqueConstraint",
+ getString("uniqueConstraint"), new PropertyModel<Boolean>(schemaTO, "uniqueConstraint"));
+ schemaForm.add(uniqueConstraint);
+
+ }
+
+ private void showHide(final AbstractSchemaTO schema, final AjaxDropDownChoicePanel<AttrSchemaType> type,
+ final WebMarkupContainer conversionParams, final AjaxTextFieldPanel conversionPattern,
+ final WebMarkupContainer enumParams, final AjaxTextFieldPanel enumerationValuesPanel,
+ final MultiFieldPanel<String> enumerationValues, final MultiFieldPanel<String> enumerationKeys,
+ final WebMarkupContainer encryptedParams,
+ final AjaxTextFieldPanel secretKey, final AjaxDropDownChoicePanel<CipherAlgorithm> cipherAlgorithm,
+ final WebMarkupContainer binaryParams, final AjaxTextFieldPanel mimeType) {
+
+ final int typeOrdinal = Integer.parseInt(type.getField().getValue());
+ if (AttrSchemaType.Long.ordinal() == typeOrdinal
+ || AttrSchemaType.Double.ordinal() == typeOrdinal
+ || AttrSchemaType.Date.ordinal() == typeOrdinal) {
+
+ conversionParams.setVisible(true);
+
+ enumParams.setVisible(false);
+ if (enumerationValuesPanel.isRequired()) {
+ enumerationValuesPanel.removeRequiredLabel();
+ }
+ enumerationValues.setModelObject(getEnumValuesAsList(null));
+ enumerationKeys.setModelObject(getEnumValuesAsList(null));
+
+ encryptedParams.setVisible(false);
+ if (secretKey.isRequired()) {
+ secretKey.removeRequiredLabel();
+ }
+ secretKey.setModelObject(null);
+ if (cipherAlgorithm.isRequired()) {
+ cipherAlgorithm.removeRequiredLabel();
+ }
+ cipherAlgorithm.setModelObject(null);
+
+ binaryParams.setVisible(false);
+ mimeType.setModelObject(null);
+ } else if (AttrSchemaType.Enum.ordinal() == typeOrdinal) {
+ conversionParams.setVisible(false);
+ conversionPattern.setModelObject(null);
+
+ enumParams.setVisible(true);
+ if (!enumerationValuesPanel.isRequired()) {
+ enumerationValuesPanel.addRequiredLabel();
+ }
+ enumerationValues.setModelObject(getEnumValuesAsList(((PlainSchemaTO) schema).getEnumerationValues()));
+ enumerationKeys.setModelObject(getEnumValuesAsList(((PlainSchemaTO) schema).getEnumerationKeys()));
+
+ encryptedParams.setVisible(false);
+ if (secretKey.isRequired()) {
+ secretKey.removeRequiredLabel();
+ }
+ secretKey.setModelObject(null);
+ if (cipherAlgorithm.isRequired()) {
+ cipherAlgorithm.removeRequiredLabel();
+ }
+ cipherAlgorithm.setModelObject(null);
+
+ binaryParams.setVisible(false);
+ mimeType.setModelObject(null);
+ } else if (AttrSchemaType.Encrypted.ordinal() == typeOrdinal) {
+ conversionParams.setVisible(false);
+ conversionPattern.setModelObject(null);
+
+ enumParams.setVisible(false);
+ if (enumerationValuesPanel.isRequired()) {
+ enumerationValuesPanel.removeRequiredLabel();
+ }
+ enumerationValues.setModelObject(getEnumValuesAsList(null));
+ enumerationKeys.setModelObject(getEnumValuesAsList(null));
+
+ encryptedParams.setVisible(true);
+ if (!secretKey.isRequired()) {
+ secretKey.addRequiredLabel();
+ }
+ if (cipherAlgorithm.isRequired()) {
+ cipherAlgorithm.addRequiredLabel();
+ }
+
+ binaryParams.setVisible(false);
+ mimeType.setModelObject(null);
+ } else if (AttrSchemaType.Binary.ordinal() == typeOrdinal) {
+ conversionParams.setVisible(false);
+ conversionPattern.setModelObject(null);
+
+ enumParams.setVisible(false);
+ if (enumerationValuesPanel.isRequired()) {
+ enumerationValuesPanel.removeRequiredLabel();
+ }
+ enumerationValues.setModelObject(getEnumValuesAsList(null));
+ enumerationKeys.setModelObject(getEnumValuesAsList(null));
+
+ encryptedParams.setVisible(false);
+ if (secretKey.isRequired()) {
+ secretKey.removeRequiredLabel();
+ }
+ secretKey.setModelObject(null);
+ if (cipherAlgorithm.isRequired()) {
+ cipherAlgorithm.removeRequiredLabel();
+ }
+ cipherAlgorithm.setModelObject(null);
+
+ binaryParams.setVisible(true);
+ } else {
+ conversionParams.setVisible(false);
+ conversionPattern.setModelObject(null);
+
+ enumParams.setVisible(false);
+ if (enumerationValuesPanel.isRequired()) {
+ enumerationValuesPanel.removeRequiredLabel();
+ }
+ enumerationValues.setModelObject(getEnumValuesAsList(null));
+ enumerationKeys.setModelObject(getEnumValuesAsList(null));
+
+ encryptedParams.setVisible(false);
+ if (secretKey.isRequired()) {
+ secretKey.removeRequiredLabel();
+ }
+ secretKey.setModelObject(null);
+ if (cipherAlgorithm.isRequired()) {
+ cipherAlgorithm.removeRequiredLabel();
+ }
+ cipherAlgorithm.setModelObject(null);
+
+ binaryParams.setVisible(false);
+ mimeType.setModelObject(null);
+ }
+ }
+
+ private String getEnumValuesAsString(final List<String> enumerationValues) {
+ final StringBuilder builder = new StringBuilder();
+
+ for (String str : enumerationValues) {
+ if (StringUtils.isNotBlank(str)) {
+ if (builder.length() > 0) {
+ builder.append(SyncopeConstants.ENUM_VALUES_SEPARATOR);
+ }
+
+ builder.append(str.trim());
+ }
+ }
+
+ return builder.toString();
+ }
+
+ private List<String> getEnumValuesAsList(final String enumerationValues) {
+ final List<String> values = new ArrayList<>();
+
+ if (StringUtils.isNotBlank(enumerationValues)) {
+ for (String value : enumerationValues.split(SyncopeConstants.ENUM_VALUES_SEPARATOR)) {
+ values.add(value.trim());
+ }
+ } else {
+ values.add(StringUtils.EMPTY);
+ }
+
+ return values;
+ }
+
+ @Override
+ public void getOnSubmit(final AjaxRequestTarget target, final BaseModal<?> modal,
+ final Form<?> form, final PageReference pageReference, final boolean createFlag) {
+
+ try {
+ final PlainSchemaTO updatedPlainSchemaTO = PlainSchemaTO.class.cast(form.getModelObject());
+
+ updatedPlainSchemaTO.setEnumerationValues(
+ getEnumValuesAsString(enumerationValues.getView().getModelObject()));
+ updatedPlainSchemaTO.setEnumerationKeys(getEnumValuesAsString(enumerationKeys.getView().getModelObject()));
+
+ if (createFlag) {
+ schemaRestClient.createPlainSchema(updatedPlainSchemaTO);
+ } else {
+ schemaRestClient.updatePlainSchema(updatedPlainSchemaTO);
+ }
+
+ if (pageReference.getPage() instanceof AbstractBasePage) {
+ ((AbstractBasePage) pageReference.getPage()).setModalResult(true);
+ }
+ modal.close(target);
+ } catch (Exception e) {
+ LOG.error("While creating or updating plain schema", e);
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ modal.getFeedbackPanel().refresh(target);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemaModalPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemaModalPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemaModalPanel.java
new file mode 100644
index 0000000..2f589cc
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemaModalPanel.java
@@ -0,0 +1,119 @@
+/*
+ * 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.panels;
+
+import java.util.Arrays;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
+import org.apache.syncope.common.lib.to.AbstractSchemaTO;
+import org.apache.syncope.common.lib.types.SchemaType;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.Model;
+
+public class SchemaModalPanel extends AbstractModalPanel {
+
+ private static final long serialVersionUID = -4681998932778822125L;
+
+ private AbstractSchemaDetailsPanel schemaPanel;
+
+ private final boolean createFlag;
+
+ public SchemaModalPanel(
+ final BaseModal<AbstractSchemaTO> modal,
+ final PageReference pageRef, final boolean createFlag) {
+ super(modal, pageRef);
+
+ this.createFlag = createFlag;
+ final BaseModal<AbstractSchemaTO> schemaModal = modal;
+
+ final Panel panel = this;
+ final Form<SchemaType> kindForm = new Form<>("kindForm");
+ add(kindForm);
+
+ final AjaxDropDownChoicePanel<SchemaType> kind = new AjaxDropDownChoicePanel<>(
+ "kind", getString("kind"), new Model<SchemaType>());
+ kind.setChoices(Arrays.asList(SchemaType.values()));
+ kind.setOutputMarkupId(true);
+
+ SchemaType schemaType = SchemaType.PLAIN;
+ if (!createFlag) {
+ schemaType = SchemaType.fromToClass(schemaModal.getFormModel().getClass());
+ kind.setModelObject(schemaType);
+ kind.setEnabled(false);
+ }
+
+ ((DropDownChoice) kind.getField()).setNullValid(false);
+ kindForm.add(kind);
+
+ kind.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ schemaPanel = getSchemaPanel("details", kind.getModelObject(), modal);
+ panel.addOrReplace(schemaPanel);
+ target.add(panel);
+ }
+ });
+
+ schemaPanel = getSchemaPanel("details", schemaType, modal);
+ schemaPanel.setOutputMarkupId(true);
+ addOrReplace(schemaPanel);
+ }
+
+ private AbstractSchemaDetailsPanel getSchemaPanel(final String id,
+ final SchemaType schemaType, final BaseModal<AbstractSchemaTO> modal) {
+ final AbstractSchemaDetailsPanel panel;
+
+ if (createFlag) {
+ try {
+ Class<? extends AbstractSchemaTO> schemaTOClass = schemaType.getToClass();
+ modal.setFormModel((AbstractSchemaTO) schemaTOClass.newInstance());
+ } catch (InstantiationException | IllegalAccessException ex) {
+ LOG.error("SchemaType not found", ex);
+ }
+ }
+
+ switch (schemaType) {
+ case DERIVED:
+ panel = new DerSchemaDetails(id, pageRef, modal);
+ break;
+ case VIRTUAL:
+ panel = new VirSchemaDetails(id, pageRef, modal);
+ break;
+ case PLAIN:
+ default:
+ panel = new PlainSchemaDetails(id, pageRef, modal);
+ }
+ panel.setOutputMarkupId(true);
+ return panel;
+ }
+
+ @Override
+ public void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ schemaPanel.getOnSubmit(target, modal, form, pageRef, createFlag);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemasPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemasPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemasPanel.java
new file mode 100644
index 0000000..a66afa6
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemasPanel.java
@@ -0,0 +1,372 @@
+/*
+ * 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.panels;
+
+import de.agilecoders.wicket.core.markup.html.bootstrap.tabs.Collapsible;
+import java.io.Serializable;
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.PreferenceManager;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
+import org.apache.syncope.client.console.pages.AbstractBasePage;
+import org.apache.syncope.client.console.rest.SchemaRestClient;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.AjaxFallbackDataTable;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.SelectChoiceRenderer;
+import org.apache.syncope.common.lib.to.AbstractSchemaTO;
+import org.apache.syncope.common.lib.types.Entitlement;
+import org.apache.syncope.common.lib.types.SchemaType;
+import org.apache.wicket.AttributeModifier;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
+import org.apache.wicket.extensions.markup.html.repeater.data.sort.SortOrder;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
+import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
+import org.apache.wicket.extensions.markup.html.tabs.AbstractTab;
+import org.apache.wicket.extensions.markup.html.tabs.ITab;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.markup.repeater.Item;
+import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.model.ResourceModel;
+import org.springframework.beans.BeanWrapper;
+import org.springframework.beans.BeanWrapperImpl;
+import org.springframework.util.ReflectionUtils;
+
+public class SchemasPanel extends Panel {
+
+ private static final long serialVersionUID = -1140213992451232279L;
+
+ private static final Map<SchemaType, String> PAGINATOR_ROWS_KEYS =
+ new HashMap<SchemaType, String>() {
+
+ private static final long serialVersionUID = 3109256773218160485L;
+
+ {
+ put(SchemaType.PLAIN, Constants.PREF_CONF_SCHEMA_PAGINATOR_ROWS);
+ put(SchemaType.DERIVED, Constants.PREF_CONF_SCHEMA_PAGINATOR_ROWS);
+ put(SchemaType.VIRTUAL, Constants.PREF_CONF_SCHEMA_PAGINATOR_ROWS);
+ }
+ };
+
+ private static final Map<SchemaType, List<String>> COL_NAMES = new HashMap<SchemaType, List<String>>() {
+
+ private static final long serialVersionUID = 3109256773218160485L;
+
+ {
+ put(SchemaType.PLAIN, Arrays.asList(new String[] { "key", "type",
+ "mandatoryCondition", "uniqueConstraint", "multivalue", "readonly" }));
+ put(SchemaType.DERIVED, Arrays.asList(new String[] { "key", "expression" }));
+ put(SchemaType.VIRTUAL, Arrays.asList(new String[] { "key", "provision", "extAttrName", "readonly" }));
+ }
+ };
+
+ private final NotificationPanel feedbackPanel;
+
+ private final AbstractBasePage page;
+
+ private final SchemaRestClient schemaRestClient = new SchemaRestClient();
+
+ private final PreferenceManager prefMan = new PreferenceManager();
+
+ private final PageReference pageReference;
+
+ private final BaseModal<AbstractSchemaTO> modal;
+
+ public SchemasPanel(final String id, final PageReference pageReference, final BaseModal<AbstractSchemaTO> modal) {
+ super(id);
+
+ this.pageReference = pageReference;
+ this.page = (AbstractBasePage) pageReference.getPage();
+ this.feedbackPanel = page.getFeedbackPanel();
+ this.modal = modal;
+
+ final Collapsible collapsible = new Collapsible("collapsePanel", buildTabList());
+ collapsible.setOutputMarkupId(true);
+ add(collapsible);
+
+ }
+
+ private List<ITab> buildTabList() {
+
+ final List<ITab> tabs = new ArrayList<>();
+
+ for (final SchemaType schemaType : SchemaType.values()) {
+ tabs.add(new AbstractTab(new Model<>(schemaType.name())) {
+
+ private static final long serialVersionUID = 1037272333056449378L;
+
+ @Override
+ public Panel getPanel(final String panelId) {
+ return new SchemaTypePanel(panelId, schemaType);
+ }
+ });
+ }
+ return tabs;
+ }
+
+ private <T extends SchemaModalPanel> List<IColumn<AbstractSchemaTO, String>> getColumns(
+ final WebMarkupContainer webContainer,
+ final SchemaType schemaType,
+ final Collection<String> fields) {
+
+ final List<IColumn<AbstractSchemaTO, String>> columns = new ArrayList<>();
+
+ for (final String field : fields) {
+ final Field clazzField = ReflectionUtils.findField(schemaType.getToClass(), field);
+
+ if (clazzField != null) {
+ if (clazzField.getType().equals(Boolean.class) || clazzField.getType().equals(boolean.class)) {
+ columns.add(new AbstractColumn<AbstractSchemaTO, String>(new ResourceModel(field)) {
+
+ private static final long serialVersionUID = 8263694778917279290L;
+
+ @Override
+ public void populateItem(final Item<ICellPopulator<AbstractSchemaTO>> item,
+ final String componentId, final IModel<AbstractSchemaTO> model) {
+
+ BeanWrapper bwi = new BeanWrapperImpl(model.getObject());
+ Object obj = bwi.getPropertyValue(field);
+
+ item.add(new Label(componentId, StringUtils.EMPTY));
+ if (Boolean.valueOf(obj.toString())) {
+ item.add(new AttributeModifier("class", "glyphicon glyphicon-ok"));
+ item.add(new AttributeModifier("style", "display: table-cell; text-align: center;"));
+ }
+ }
+
+ @Override
+ public String getCssClass() {
+ return "short_fixedsize";
+ }
+ });
+ } else {
+ final IColumn<AbstractSchemaTO, String> column =
+ new PropertyColumn<AbstractSchemaTO, String>(new ResourceModel(field), field, field) {
+
+ private static final long serialVersionUID = 3282547854226892169L;
+
+ @Override
+ public String getCssClass() {
+ String css = super.getCssClass();
+ if ("key".equals(field)) {
+ css = StringUtils.isBlank(css)
+ ? "medium_fixedsize"
+ : css + " medium_fixedsize";
+ }
+ return css;
+ }
+ };
+ columns.add(column);
+ }
+ }
+ }
+
+ columns.add(new AbstractColumn<AbstractSchemaTO, String>(new ResourceModel("actions", "")) {
+
+ private static final long serialVersionUID = 2054811145491901166L;
+
+ @Override
+ public String getCssClass() {
+ return "action";
+ }
+
+ @Override
+ public void populateItem(final Item<ICellPopulator<AbstractSchemaTO>> item, final String componentId,
+ final IModel<AbstractSchemaTO> model) {
+
+ final AbstractSchemaTO schemaTO = model.getObject();
+
+ final ActionLinksPanel.Builder<Serializable> actionLinks = ActionLinksPanel.builder(pageReference);
+ actionLinks.setDisableIndicator(true);
+ actionLinks.addWithRoles(new ActionLink<Serializable>() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final Serializable ignore) {
+ modal.header(Model.of(schemaTO.getKey()));
+ modal.setFormModel(schemaTO);
+ modal.addSumbitButton();
+ modal.show(true);
+ target.add(modal.setContent(new SchemaModalPanel(modal, pageReference, false)));
+ }
+ }, ActionLink.ActionType.EDIT, Entitlement.SCHEMA_UPDATE).addWithRoles(new ActionLink<Serializable>() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final Serializable ignore) {
+
+ switch (schemaType) {
+ case DERIVED:
+ schemaRestClient.deleteDerSchema(schemaTO.getKey());
+ break;
+
+ case VIRTUAL:
+ schemaRestClient.deleteVirSchema(schemaTO.getKey());
+ break;
+
+ default:
+ schemaRestClient.deletePlainSchema(schemaTO.getKey());
+ break;
+ }
+
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ feedbackPanel.refresh(target);
+
+ target.add(webContainer);
+ }
+ }, ActionLink.ActionType.DELETE, Entitlement.SCHEMA_DELETE);
+
+ item.add(actionLinks.build(componentId));
+ }
+ });
+
+ return columns;
+ }
+
+ private final class SchemaTypePanel extends Panel {
+
+ private static final long serialVersionUID = 2854050613688773575L;
+
+ private int pageRows;
+
+ private SchemaTypePanel(final String id, final SchemaType schemaType) {
+ super(id);
+ setup(schemaType);
+ }
+
+ private void setup(final SchemaType schemaType) {
+
+ final WebMarkupContainer schemaWrapContainer = new WebMarkupContainer("schemaWrapContainer");
+ schemaWrapContainer.setOutputMarkupId(true);
+ add(schemaWrapContainer);
+
+ if (schemaType != SchemaType.VIRTUAL) {
+ schemaWrapContainer.add(new AttributeModifier("style", "width:auto;"));
+ }
+
+ final WebMarkupContainer schemaContainer = new WebMarkupContainer("schemaContainer");
+ schemaContainer.setOutputMarkupId(true);
+ schemaWrapContainer.add(schemaContainer);
+
+ final String paginatorRowsKey = PAGINATOR_ROWS_KEYS.get(schemaType);
+ pageRows = prefMan.getPaginatorRows(getRequest(), paginatorRowsKey);
+
+ final List<IColumn<AbstractSchemaTO, String>> tableCols = getColumns(schemaContainer,
+ schemaType, COL_NAMES.get(schemaType));
+
+ final AjaxFallbackDataTable<AbstractSchemaTO, String> table =
+ new AjaxFallbackDataTable<>("datatable",
+ tableCols, new SchemaProvider(schemaType), pageRows, schemaContainer);
+ table.setOutputMarkupId(true);
+ schemaContainer.add(table);
+
+ schemaWrapContainer.add(getPaginatorForm(schemaContainer, table, "paginator", this, paginatorRowsKey));
+ }
+ }
+
+ private Form<Void> getPaginatorForm(final WebMarkupContainer webContainer,
+ final AjaxFallbackDataTable<AbstractSchemaTO, String> dataTable,
+ final String formname, final SchemaTypePanel schemaTypePanel, final String rowsPerPagePrefName) {
+
+ final Form<Void> form = new Form<>(formname);
+
+ final DropDownChoice<Integer> rowChooser = new DropDownChoice<>("rowsChooser",
+ new PropertyModel<Integer>(schemaTypePanel, "pageRows"), prefMan.getPaginatorChoices(),
+ new SelectChoiceRenderer<Integer>());
+
+ rowChooser.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ prefMan.set(getRequest(), getResponse(), rowsPerPagePrefName, rowChooser.getInput());
+ dataTable.setItemsPerPage(rowChooser.getModelObject());
+
+ target.add(webContainer);
+ }
+ });
+
+ form.add(rowChooser);
+
+ return form;
+ }
+
+ private final class SchemaProvider extends SortableDataProvider<AbstractSchemaTO, String> {
+
+ private static final long serialVersionUID = -185944053385660794L;
+
+ private final SortableDataProviderComparator<AbstractSchemaTO> comparator;
+
+ private final SchemaType schemaType;
+
+ private SchemaProvider(final SchemaType schemaType) {
+ super();
+
+ this.schemaType = schemaType;
+
+ // Default sorting
+ setSort("key", SortOrder.ASCENDING);
+ comparator = new SortableDataProviderComparator<>(this);
+ }
+
+ @Override
+ public Iterator<AbstractSchemaTO> iterator(final long first, final long count) {
+ @SuppressWarnings("unchecked")
+ final List<AbstractSchemaTO> list = schemaRestClient.getSchemas(this.schemaType);
+
+ Collections.sort(list, comparator);
+ return list.subList((int) first, (int) first + (int) count).iterator();
+ }
+
+ @Override
+ public long size() {
+ return schemaRestClient.getSchemas(this.schemaType).size();
+ }
+
+ @Override
+ public IModel<AbstractSchemaTO> model(final AbstractSchemaTO object) {
+ return new CompoundPropertyModel<>(object);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/java/org/apache/syncope/client/console/panels/VirSchemaDetails.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/VirSchemaDetails.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/VirSchemaDetails.java
new file mode 100644
index 0000000..4914e84
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/VirSchemaDetails.java
@@ -0,0 +1,162 @@
+/*
+ * 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.panels;
+
+import static org.apache.syncope.client.console.panels.AbstractModalPanel.LOG;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.collections4.Transformer;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.pages.AbstractBasePage;
+import org.apache.syncope.client.console.rest.ResourceRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.common.lib.to.AbstractSchemaTO;
+import org.apache.syncope.common.lib.to.ProvisionTO;
+import org.apache.syncope.common.lib.to.ResourceTO;
+import org.apache.syncope.common.lib.to.VirSchemaTO;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.markup.html.form.ChoiceRenderer;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.PropertyModel;
+
+public class VirSchemaDetails extends AbstractSchemaDetailsPanel {
+
+ private static final long serialVersionUID = 5979623248182851337L;
+
+ private final ResourceRestClient resourceRestClient = new ResourceRestClient();
+
+ private Map<Long, String> anys = new HashMap<>();
+
+ private final AjaxDropDownChoicePanel<Long> provision;
+
+ public VirSchemaDetails(final String id,
+ final PageReference pageReference,
+ final BaseModal<AbstractSchemaTO> modal) {
+ super(id, pageReference, modal);
+
+ final AjaxCheckBoxPanel readonly = new AjaxCheckBoxPanel("readonly", getString("readonly"),
+ new PropertyModel<Boolean>(schemaTO, "readonly"));
+ schemaForm.add(readonly);
+
+ final AjaxDropDownChoicePanel<String> resource = new AjaxDropDownChoicePanel<>(
+ "resource", getString("resource"), new PropertyModel<String>(schemaTO, "resource"));
+ resource.setChoices(
+ CollectionUtils.collect(resourceRestClient.getAll(), new Transformer<ResourceTO, String>() {
+
+ @Override
+ public String transform(final ResourceTO input) {
+ return input.getKey();
+ }
+ }, new ArrayList<String>()));
+
+ resource.setOutputMarkupId(true);
+ resource.addRequiredLabel();
+ schemaForm.add(resource);
+
+ provision = new AjaxDropDownChoicePanel<>(
+ "provision", getString("provision"), new PropertyModel<Long>(schemaTO, "provision"));
+
+ provision.setChoices(new ArrayList<>(anys.keySet()));
+ provision.setChoiceRenderer(new AnyTypeRenderer());
+ provision.setOutputMarkupId(true);
+ provision.setOutputMarkupPlaceholderTag(true);
+ provision.addRequiredLabel();
+ provision.setVisible(false);
+
+ schemaForm.add(provision);
+
+ final AjaxTextFieldPanel extAttrName = new AjaxTextFieldPanel(
+ "extAttrName", getString("extAttrName"), new PropertyModel<String>(schemaTO, "extAttrName"));
+ extAttrName.addRequiredLabel();
+ schemaForm.add(extAttrName);
+
+ add(schemaForm);
+
+ resource.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ anys.clear();
+ if (resource != null & resource.getModelObject() != null) {
+ for (ProvisionTO provisionTO : resourceRestClient.read(resource.getModelObject()).getProvisions()) {
+ anys.put(provisionTO.getKey(), provisionTO.getAnyType());
+ }
+ }
+ provision.setChoices(new ArrayList<>(anys.keySet()));
+ provision.setModelObject(0L);
+ provision.setVisible(true);
+ target.add(provision);
+ }
+ });
+ }
+
+ @Override
+ public void getOnSubmit(final AjaxRequestTarget target,
+ final BaseModal<?> modal, final Form<?> form, final PageReference pageReference, final boolean createFlag) {
+
+ try {
+ final VirSchemaTO updatedVirSchemaTO = VirSchemaTO.class.cast(form.getModelObject());
+
+ if (createFlag) {
+ schemaRestClient.createVirSchema(updatedVirSchemaTO);
+ } else {
+ schemaRestClient.updateVirSchema(updatedVirSchemaTO);
+ }
+
+ if (pageReference.getPage() instanceof AbstractBasePage) {
+ ((AbstractBasePage) pageReference.getPage()).setModalResult(true);
+ }
+ modal.close(target);
+
+ } catch (Exception e) {
+ LOG.error("While creating or updating VirSchema", e);
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ modal.getFeedbackPanel().refresh(target);
+ }
+ }
+
+ private class AnyTypeRenderer extends ChoiceRenderer<Long> {
+
+ private static final long serialVersionUID = 2840364232128308553L;
+
+ AnyTypeRenderer() {
+ super();
+ }
+
+ @Override
+ public Object getDisplayValue(final Long object) {
+ return anys.get(object);
+ }
+
+ @Override
+ public String getIdValue(final Long object, final int index) {
+ return String.valueOf(object != null ? object : 0L);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.java
index c634db9..2237d39 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/MultiFieldPanel.java
@@ -71,7 +71,7 @@ public final class MultiFieldPanel<E extends Serializable> extends AbstractField
container.add(form);
// -----------------------
- if (model.getObject().isEmpty()) {
+ if (model.getObject() != null && model.getObject().isEmpty()) {
form.addOrReplace(getNoDataFragment(model, name));
} else {
form.addOrReplace(getDataFragment(model, name));
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/PlainAttrs.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/PlainAttrs.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/PlainAttrs.java
index c592dad..49574c8 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/PlainAttrs.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/PlainAttrs.java
@@ -207,7 +207,7 @@ public class PlainAttrs extends WizardStep {
"panel", schemaTO.getKey(), new Model<Date>(), schemaTO.getConversionPattern());
break;
case Enum:
- panel = new AjaxDropDownChoicePanel<String>("panel", schemaTO.getKey(), new Model<String>(), false);
+ panel = new AjaxDropDownChoicePanel<>("panel", schemaTO.getKey(), new Model<String>(), false);
((AjaxDropDownChoicePanel<String>) panel).setChoices(getEnumeratedValues(schemaTO));
if (StringUtils.isNotBlank(schemaTO.getEnumerationKeys())) {
@@ -241,7 +241,7 @@ public class PlainAttrs extends WizardStep {
break;
case Long:
- panel = new SpinnerFieldPanel<Long>("panel", schemaTO.getKey(), Long.class, new Model<Long>());
+ panel = new SpinnerFieldPanel<>("panel", schemaTO.getKey(), Long.class, new Model<Long>());
if (required) {
panel.addRequiredLabel();
@@ -249,7 +249,7 @@ public class PlainAttrs extends WizardStep {
break;
case Double:
- panel = new SpinnerFieldPanel<Double>("panel", schemaTO.getKey(), Double.class, new Model<Double>());
+ panel = new SpinnerFieldPanel<>("panel", schemaTO.getKey(), Double.class, new Model<Double>());
if (required) {
panel.addRequiredLabel();
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/resources/org/apache/syncope/client/console/SyncopeConsoleApplication.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/SyncopeConsoleApplication.properties b/client/console/src/main/resources/org/apache/syncope/client/console/SyncopeConsoleApplication.properties
index a5fe511..dc84f30 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/SyncopeConsoleApplication.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/SyncopeConsoleApplication.properties
@@ -53,3 +53,4 @@ jexl_ex2='new.' + surname
jexl_syntax_url=Full JEXL reference
create=Create
key=Key
+types=Types
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/resources/org/apache/syncope/client/console/SyncopeConsoleApplication_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/SyncopeConsoleApplication_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/SyncopeConsoleApplication_it.properties
index 1f1e827..536cb4e 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/SyncopeConsoleApplication_it.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/SyncopeConsoleApplication_it.properties
@@ -52,3 +52,4 @@ jexl_ex2='new.' + surname
jexl_syntax_url=Sintassi JEXL completa
create=Crea
key=Chiave
+types=Tipi
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/resources/org/apache/syncope/client/console/SyncopeConsoleApplication_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/SyncopeConsoleApplication_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/SyncopeConsoleApplication_pt_BR.properties
index de966d2..58c022b 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/SyncopeConsoleApplication_pt_BR.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/SyncopeConsoleApplication_pt_BR.properties
@@ -52,3 +52,4 @@ jexl_ex2='novo.' + sobrenome
jexl_syntax_url=Refer\u00eancia JEXL completa
create=Criar
key=Chave
+types=Tipos
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html
index e74af55..755a846 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html
@@ -116,7 +116,7 @@ under the License.
<li wicket:id="workflowLI"><a href="#" wicket:id="workflow"><i class="fa fa-circle-o"></i>Workflow</a></li>
<li><a href="#"><i class="fa fa-circle-o"></i>Logs</a></li>
<li><a href="#"><i class="fa fa-circle-o"></i>Layouts</a></li>
- <li><a href="#"><i class="fa fa-circle-o"></i>Schemas</a></li>
+ <li wicket:id="schemasLI"><a href="#" wicket:id="schemas"><i class="fa fa-circle-o"></i><wicket:message key="types"/></a></li>
<li><a href="#"><i class="fa fa-circle-o"></i>Notifications</a></li>
</ul>
</li>
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_pt_BR.properties
index 97349d4..301bff8 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_pt_BR.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage_pt_BR.properties
@@ -15,5 +15,5 @@
# specific language governing permissions and limitations
# under the License.
displayRows=Linhas para mostrar\:
-home=In\u00EDcio
-version=VERS\u00C3O
+home=In\u00edcio
+version=VERS\u00c3O
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/resources/org/apache/syncope/client/console/pages/Schemas.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Schemas.html b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Schemas.html
new file mode 100644
index 0000000..d16dd64
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Schemas.html
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<!--
+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 class="wrapper">
+ <div class="admin-content-page" wicket:id="content">
+ <div class="box box-solid box-primary">
+ <div class="box-header with-border">
+ <h3 class="box-title">
+ <span wicket:id="header"></span>
+ </h3>
+ <div class="box-tools pull-right">
+ <ul class="nav navbar-nav actions">
+ <li>
+ <a wicket:message="title:createAnyTypeClass"><!-- <a wicket:id="createAnyTypeClassLink">-->
+ <i class="glyphicon glyphicon-duplicate"></i>
+ </a>
+ </li>
+ <li>
+ <a wicket:message="title:createSchema" wicket:id="createSchemaLink">
+ <i class="glyphicon glyphicon-list-alt"></i>
+ </a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div class="box-body">
+ <div class="realms">
+ <div wicket:id="tabbedPanel"></div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div wicket:id="modal"></div>
+ </wicket:extend>
+</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/resources/org/apache/syncope/client/console/pages/Schemas.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Schemas.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Schemas.properties
new file mode 100644
index 0000000..9defe37
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Schemas.properties
@@ -0,0 +1,18 @@
+# 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.
+createSchema=Create new schema
+createAnyTypeClass=Create new AnyTypeClass
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/resources/org/apache/syncope/client/console/pages/Schemas_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Schemas_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Schemas_it.properties
new file mode 100644
index 0000000..e9994ec
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Schemas_it.properties
@@ -0,0 +1,18 @@
+# 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.
+createSchema=Crea un nuovo schema
+createAnyTypeClass=Crea un nuovo AnyTypeClass
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/resources/org/apache/syncope/client/console/pages/Schemas_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Schemas_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Schemas_pt_BR.properties
new file mode 100644
index 0000000..1d42eb5
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Schemas_pt_BR.properties
@@ -0,0 +1,18 @@
+# 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.
+createSchema=Cria um novo schema
+createAnyTypeClass=Cria um novo AnyTypeClass
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/resources/org/apache/syncope/client/console/panels/DerSchemaDetails.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/DerSchemaDetails.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/DerSchemaDetails.html
new file mode 100644
index 0000000..c6281eb
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/DerSchemaDetails.html
@@ -0,0 +1,47 @@
+<!--
+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 style="margin: 5px;">
+ <form wicket:id="form">
+ <div id="formtable">
+ <div class="form-group">
+ <span wicket:id="key">[name]</span>
+ </div>
+ <div class="form-group">
+ <div class="form-group">
+ <span wicket:id="expression">[expression]</span>
+ <a class="tooltips" wicket:id="questionMarkJexlHelp" href="#" alt="Click to help" title="Click to help">
+ <span class="glyphicon glyphicon-info-sign"></span>
+ <span wicket:id="jexlHelp" class="tooltips">
+ <wicket:message key="jexl_info"/>
+ <ul>
+ <li><wicket:message key="jexl_ex1"/></li>
+ <li><wicket:message key="jexl_ex2"/></li>
+ </ul>
+ <a href="#" wicket:id="jexlLink" target="_blank"><wicket:message key="jexl_syntax_url"/></a>
+ </span>
+ </a>
+ </div>
+ </div>
+ </div>
+ </form>
+ </div>
+ </wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/01612160/client/console/src/main/resources/org/apache/syncope/client/console/panels/DerSchemaDetails.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/DerSchemaDetails.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/DerSchemaDetails.properties
new file mode 100644
index 0000000..f12956e
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/DerSchemaDetails.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.
+required_alert=All form fields are required.
+expression=Expression
+edit_attribute=Edit attribute
+attributes=Derived attributes
+title=Derived Schema