Remove unused projects
authorMathieu Baudier <mbaudier@argeo.org>
Thu, 24 Mar 2011 02:02:54 +0000 (02:02 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Thu, 24 Mar 2011 02:02:54 +0000 (02:02 +0000)
git-svn-id: https://svn.argeo.org/commons/trunk@4360 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

39 files changed:
security/dep/org.argeo.security.dep.ldap/pom.xml [deleted file]
security/dep/pom.xml
security/runtime/org.argeo.security.ria/.project [deleted file]
security/runtime/org.argeo.security.ria/assembly/ria-security.xml [deleted file]
security/runtime/org.argeo.security.ria/config.json [deleted file]
security/runtime/org.argeo.security.ria/pom.xml [deleted file]
security/runtime/org.argeo.security.ria/src/WEB-INF/web.xml [deleted file]
security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/Manifest.json [deleted file]
security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/Perspective.js [deleted file]
security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/RolesApplet.js [deleted file]
security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/SecurityAPI.js [deleted file]
security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/UserEditorApplet.js [deleted file]
security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/UsersApplet.js [deleted file]
security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/components/CoworkerNatureImpl.js [deleted file]
security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/components/ICredentialPane.js [deleted file]
security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/components/INaturePane.js [deleted file]
security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/components/IUserDataPane.js [deleted file]
security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/components/NaturesManager.js [deleted file]
security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/components/PasswordCredentialImpl.js [deleted file]
security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/components/SimpleUserNatureImpl.js [deleted file]
security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/components/UserEditor.js [deleted file]
security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/components/UserEditorPrefPane.js [deleted file]
security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/model/Nature.js [deleted file]
security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/model/User.js [deleted file]
security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/dialog-apply.png [deleted file]
security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/dialog-cancel.png [deleted file]
security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/document-properties-22.png [deleted file]
security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/document-properties.png [deleted file]
security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/document-save.png [deleted file]
security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/go-next.png [deleted file]
security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/identity.png [deleted file]
security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/list-add.png [deleted file]
security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/list-remove.png [deleted file]
security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/preferences-security.png [deleted file]
security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/preferences-users.png [deleted file]
security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/view-refresh.png [deleted file]
security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/window-close.png [deleted file]
security/runtime/org.argeo.security.ria/src/index.jsp [deleted file]
security/runtime/pom.xml

diff --git a/security/dep/org.argeo.security.dep.ldap/pom.xml b/security/dep/org.argeo.security.dep.ldap/pom.xml
deleted file mode 100644 (file)
index c9e0bca..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-       <modelVersion>4.0.0</modelVersion>
-       <parent>
-               <groupId>org.argeo.commons.security</groupId>
-               <version>0.2.3-SNAPSHOT</version>
-               <artifactId>dep</artifactId>
-               <relativePath>..</relativePath>
-       </parent>
-       <artifactId>org.argeo.security.dep.ldap</artifactId>
-       <packaging>pom</packaging>
-       <name>Commons Security LDAP Dependencies</name>
-       <dependencies>
-               <dependency>
-                       <groupId>org.argeo.commons.security</groupId>
-                       <artifactId>org.argeo.security.mvc</artifactId>
-                       <version>0.2.3-SNAPSHOT</version>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.commons.server</groupId>
-                       <artifactId>org.argeo.server.json</artifactId>
-                       <version>0.2.3-SNAPSHOT</version>
-               </dependency>
-       </dependencies>
-</project>
\ No newline at end of file
index c60a6b2f148aea1c2c4029e436ce56e733cd3245..e09a0513ab447b52ddd52abe898f241824ba8473 100644 (file)
@@ -12,7 +12,6 @@
        <name>Commons Security Dependencies</name>
        <packaging>pom</packaging>
        <modules>
-               <module>org.argeo.security.dep.ldap</module>
                <module>org.argeo.security.dep.ads</module>
                <module>org.argeo.security.dep.node</module>
        </modules>
diff --git a/security/runtime/org.argeo.security.ria/.project b/security/runtime/org.argeo.security.ria/.project
deleted file mode 100644 (file)
index e957cf8..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<projectDescription>\r
-       <name>org.argeo.security.ria</name>\r
-       <comment></comment>\r
-       <projects>\r
-       </projects>\r
-       <buildSpec>\r
-       </buildSpec>\r
-       <natures>\r
-       </natures>\r
-</projectDescription>\r
diff --git a/security/runtime/org.argeo.security.ria/assembly/ria-security.xml b/security/runtime/org.argeo.security.ria/assembly/ria-security.xml
deleted file mode 100644 (file)
index 8fc4497..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<assembly xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">
-       <id>ria-security</id>
-       <includeBaseDirectory>false</includeBaseDirectory>
-       <formats>
-               <format>zip</format>
-       </formats>
-       <fileSets>
-               <fileSet>
-                       <directory>src/argeo-ria-lib/security</directory>
-                       <outputDirectory></outputDirectory>
-                       <includes>
-                               <include>*/**</include>
-                       </includes>
-               </fileSet>
-       </fileSets>
-</assembly>
\ No newline at end of file
diff --git a/security/runtime/org.argeo.security.ria/config.json b/security/runtime/org.argeo.security.ria/config.json
deleted file mode 100644 (file)
index 45eb7eb..0000000
+++ /dev/null
@@ -1,228 +0,0 @@
-{\r
-  "name"    : "ria",\r
-\r
-  "include" :\r
-  [\r
-    {\r
-      "path" : "${QOOXDOO_PATH}/component/apiviewer/api.json",\r
-      "as"   : "apiconf"\r
-    },\r
-    {\r
-      "path" : "${QOOXDOO_PATH}/component/testrunner/testrunner.json",\r
-      "as"   : "testrunner"\r
-    }    \r
-  ],\r
-  \r
-  "let" :\r
-  {\r
-    "APPLICATION"  : "org.argeo.ria",\r
-    "QOOXDOO_PATH" : "src/qooxdoo-sdk",\r
-    "QXTHEME"      : "org.argeo.ria.theme.RiaTheme",\r
-    "API_EXCLUDE"  : ["qx.legacy.*"],\r
-    "LOCALES"      : [ "en" ],\r
-    "ROOT"         : "src/argeo-ria-src",\r
-       "BUILD_PATH"   : "target/classes/argeo-ria",\r
-       "RIA_LIB_PATH" : "src/argeo-ria-lib",\r
-       "RIA_LIB_URI"  : "../argeo-ria-lib",\r
-       "CACHE"            : "cache" ,\r
-       "CUSTOM_PACKAGE" : "org.argeo.security.ria"\r
-  },\r
-\r
-  "jobs" : \r
-  {\r
-    "common" :\r
-    {\r
-      "library" :\r
-      [\r
-        {\r
-          "manifest" : "${QOOXDOO_PATH}/framework/Manifest.json",\r
-          "uri"                 : "../qooxdoo-sdk/framework"\r
-        },\r
-        {\r
-          "manifest" : "${RIA_LIB_PATH}/security/Manifest.json",\r
-          "uri"                 : "${RIA_LIB_URI}/security"\r
-        },\r
-        {\r
-          "manifest" : "${ROOT}/Manifest.json",\r
-          "uri"                 : "."\r
-        }\r
-      ],\r
-\r
-      "include" :\r
-      [\r
-        "${APPLICATION}.Application",\r
-        "${CUSTOM_PACKAGE}.*",\r
-        "${QXTHEME}"\r
-      ],\r
-\r
-      "cache" :\r
-      {\r
-        "compile" :  "${CACHE}"\r
-      },\r
-\r
-      "settings" :\r
-      {\r
-        "qx.version"     : "${QXVERSION}",\r
-        "qx.theme"       : "${QXTHEME}",\r
-        "qx.application" : "${APPLICATION}.Application",\r
-        "ria.branding.splashScreen"    : "ria/ArgeoLogo.png",\r
-        "ria.branding.applicationTitle"        : "Argeo Security RIA",\r
-        "ria.branding.aboutString"     : "Argeo Ria is a product of Argeo",\r
-        "ria.auth.enableAuth"          : "true",\r
-        "ria.auth.credentialsURI"      : "/org.argeo.security.webapp/getCredentials.ria",\r
-        "ria.auth.loginURI"                    : "/org.argeo.security.webapp/login.ria",\r
-        "ria.auth.logoutURI"           : "/org.argeo.security.webapp/logout.ria",\r
-        "ria.StartupPerspective"       : "org.argeo.security.ria.Perspective"          \r
-      }\r
-    },\r
-\r
-    // -- source jobs --------------------------------------------------\r
-\r
-    "source-script" :\r
-    {\r
-      "extend" : ["common"],\r
-\r
-      "compile-options" :\r
-      {\r
-       "paths" : \r
-       {\r
-               "file" : "${ROOT}/script/${APPLICATION}.js",\r
-               "root" : "${ROOT}",\r
-               "resource" : "resource",\r
-               "gzip"  : false\r
-       },\r
-       "code" : \r
-       {\r
-               "locales" :  "${LOCALES}"\r
-       }\r
-      },\r
-      \r
-      "compile" : { "type" : "source" }\r
-    },\r
-\r
-\r
-    "slc-source" :\r
-    {\r
-      "run" :\r
-      [\r
-        "source-script"\r
-      ]\r
-    },\r
-\r
-    // -- build jobs --------------------------------------------------\r
-\r
-    "build-script" :\r
-    {\r
-      "extend" : ["common"],\r
-\r
-      "variants" :\r
-      {\r
-        "qx.debug" : ["off"]\r
-      },\r
-\r
-      "compile-options" :\r
-      {\r
-                 "paths" :\r
-                 {\r
-               "file" : "${BUILD_PATH}/script/${APPLICATION}.js",\r
-                   "gzip"     : false\r
-                 },\r
-                 "uris" :\r
-                 {\r
-                   "script"   : "script",\r
-                   "resource" : "resource"\r
-                 },\r
-                 "code" :\r
-                 {\r
-                   "format"   : true,\r
-                   "locales"  : "${LOCALES}",\r
-                   "optimize" : ["variables", "basecalls", "privates", "strings"]\r
-                 }\r
-      },\r
-      "compile" : { "type" : "build" }\r
-    },\r
-\r
-\r
-    "build-resources":\r
-    {\r
-      "extend" : ["common"],\r
-\r
-      "copy-resources" :\r
-      {\r
-        "target"          : "${BUILD_PATH}",\r
-        "resource-filter" : true\r
-      }\r
-    },\r
-\r
-    "my-build-files" :\r
-    {\r
-      "extend" : ["common"],\r
-\r
-      "copy-files" :\r
-      {\r
-        "files" :\r
-        [\r
-          "index.html"\r
-        ],\r
-               "source" : "${ROOT}",\r
-        "target" : "${BUILD_PATH}"\r
-      }\r
-    },\r
-       \r
-    "slc-build" :\r
-    {\r
-      "run" :\r
-      [\r
-        "build-script",\r
-        "my-build-files",\r
-        "build-resources"\r
-      ]\r
-    },\r
-    \r
-    "slc-api" :\r
-    {\r
-      "extend" : ["apiconf::build"],\r
-\r
-      "let" :\r
-      {\r
-        "APIVIEWER_ROOT" : "${QOOXDOO_PATH}/component/apiviewer",\r
-        "BUILD_PATH" : "./target/site/argeo-ria-api/",\r
-        "API_INCLUDE" : ["${APPLICATION}.*", "${CUSTOM_PACKAGE}.*"]\r
-      },\r
-\r
-      "library" :\r
-      [\r
-        {\r
-          "manifest" : "${ROOT}/Manifest.json",\r
-          "uri"      : ".."\r
-        },\r
-        {\r
-          "manifest" : "${RIA_LIB_PATH}/security/Manifest.json",\r
-          "uri"      : "${RIA_LIB_URI}/security"\r
-        }       \r
-      ]\r
-    },\r
-    \r
-    "slc-test" :\r
-    {\r
-      "extend" : ["testrunner::build"],\r
-\r
-      "let" :\r
-      {\r
-        "TESTRUNNER_ROOT" : "${QOOXDOO_PATH}/component/testrunner",\r
-        "TEST_INCLUDE"    : "${APPLICATION}.test.*",\r
-        "BUILD_PATH"      : "./target/site/argeo-ria-test/"\r
-      },\r
-\r
-      "library" :\r
-      [\r
-        {\r
-          "manifest" : "${ROOT}/Manifest.json",\r
-          "uri"      : ".."\r
-        }\r
-      ]\r
-    }\r
-    \r
-       \r
-  }\r
-}\r
diff --git a/security/runtime/org.argeo.security.ria/pom.xml b/security/runtime/org.argeo.security.ria/pom.xml
deleted file mode 100644 (file)
index e3f9e49..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-       <modelVersion>4.0.0</modelVersion>
-       <parent>
-               <groupId>org.argeo.commons.security</groupId>
-               <artifactId>runtime</artifactId>
-               <version>0.2.3-SNAPSHOT</version>
-               <relativePath>..</relativePath>
-       </parent>
-       <groupId>org.argeo.commons.security</groupId>
-       <artifactId>org.argeo.security.ria</artifactId>
-       <packaging>jar</packaging>
-       <name>Commons Security RIA</name>
-       <build>
-               <resources>
-                       <resource>
-                               <directory>src</directory>
-                               <includes>
-                                       <include>index.jsp</include>
-                                       <include>WEB-INF/*</include>
-                               </includes>
-                       </resource>
-               </resources>
-               <plugins>
-                       <plugin>
-                               <groupId>org.argeo.maven.plugins</groupId>
-                               <artifactId>maven-argeo-qooxdoo-plugin</artifactId>
-                               <version>${version.maven-argeo-qooxdoo}</version>
-                               <configuration>
-                                       <sdkVersion>1.1.0</sdkVersion>
-                               </configuration>
-                               <executions>
-                                       <execution>
-                                               <id>env</id>
-                                               <phase>initialize</phase>
-                                               <goals>
-                                                       <goal>env</goal>
-                                               </goals>
-                                       </execution>
-                                       <execution>
-                                               <id>env-site</id>
-                                               <phase>pre-site</phase>
-                                               <goals>
-                                                       <goal>env</goal>
-                                               </goals>
-                                       </execution>
-                                       <execution>
-                                               <id>slc-source</id>
-                                               <phase>test</phase>
-                                               <goals>
-                                                       <goal>generate</goal>
-                                               </goals>
-                                               <configuration>
-                                                       <job>slc-source</job>
-                                               </configuration>
-                                       </execution>
-                                       <execution>
-                                               <id>slc-build</id>
-                                               <phase>test</phase>
-                                               <goals>
-                                                       <goal>generate</goal>
-                                               </goals>
-                                               <configuration>
-                                                       <job>slc-build</job>
-                                               </configuration>
-                                       </execution>
-                               </executions>
-                       </plugin>
-                       <plugin>
-                               <groupId>org.apache.felix</groupId>
-                               <artifactId>maven-bundle-plugin</artifactId>
-                               <version>${version.maven-bundle-plugin}</version>
-                               <configuration>
-                                       <instructions>
-                                               <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
-                                               <Bundle-Version>${project.version}-r${buildNumber}</Bundle-Version>
-                                               <Export-Package />
-                                               <Import-Package>
-                                                       javax.servlet,
-                                                       javax.servlet.http,
-                                                       javax.servlet.jsp,
-                                                       javax.servlet.jsp.jstl.core,
-                                                       javax.servlet.jsp.jstl.fmt,
-                                                       javax.servlet.jsp.jstl.tlv,
-                                                       javax.servlet.resources
-                                               </Import-Package>
-                                               <Web-ContextPath>org.argeo.security.ria</Web-ContextPath>
-                                       </instructions>
-                               </configuration>
-                               <executions>
-                                       <execution>
-                                               <id>bundle-manifest</id>
-                                               <phase>process-classes</phase>
-                                               <goals>
-                                                       <goal>manifest</goal>
-                                               </goals>
-                                       </execution>
-                               </executions>
-                       </plugin>
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-dependency-plugin</artifactId>
-                               <executions>
-                                       <execution>
-                                               <id>unpack-argeo-ria-sdk</id>
-                                               <phase>initialize</phase>
-                                               <goals>
-                                                       <goal>unpack</goal>
-                                               </goals>
-                                               <configuration>
-                                                       <artifactItems>
-                                                               <artifactItem>
-                                                                       <groupId>org.argeo.ria</groupId>
-                                                                       <artifactId>org.argeo.ria.core</artifactId>
-                                                                       <classifier>ria</classifier>
-                                                                       <type>zip</type>
-                                                                       <outputDirectory>src/argeo-ria-src</outputDirectory>
-                                                               </artifactItem>
-                                                       </artifactItems>
-                                                       <overWriteReleases>false</overWriteReleases>
-                                                       <overWriteSnapshots>true</overWriteSnapshots>
-                                               </configuration>
-                                       </execution>
-                               </executions>
-                       </plugin>
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-assembly-plugin</artifactId>
-                               <executions>
-                                       <execution>
-                                               <id>assembly-ria</id>
-                                               <phase>package</phase>
-                                               <goals>
-                                                       <goal>single</goal>
-                                               </goals>
-                                               <configuration>
-                                                       <descriptors>
-                                                               <descriptor>assembly/ria-security.xml</descriptor>
-                                                       </descriptors>
-                                               </configuration>
-                                       </execution>
-                               </executions>
-                       </plugin>
-               </plugins>
-       </build>
-       <dependencyManagement>
-               <dependencies>
-                       <dependency>
-                               <groupId>org.argeo.ria</groupId>
-                               <artifactId>org.argeo.ria.core</artifactId>
-                               <version>${version.argeo-ria}</version>
-                       </dependency>
-               </dependencies>
-       </dependencyManagement>
-</project>
\ No newline at end of file
diff --git a/security/runtime/org.argeo.security.ria/src/WEB-INF/web.xml b/security/runtime/org.argeo.security.ria/src/WEB-INF/web.xml
deleted file mode 100644 (file)
index 37e3204..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-    Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
-
-    Licensed 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.
-
--->
-
-<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
-       version="2.5">
-
-       <display-name>Argeo Security UI</display-name>
-
-</web-app>
diff --git a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/Manifest.json b/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/Manifest.json
deleted file mode 100644 (file)
index 4f64685..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-{\r
-  "info" : \r
-  {\r
-    "name" : "org.argeo.security.ria",\r
-\r
-    "summary" : "Ria library for security management",\r
-    "description" : "Ria library for security management",\r
-    \r
-    "homepage" : "http://www.argeo.org/",\r
-\r
-    "license" : "LGPL",\r
-    "authors" : \r
-    [\r
-      {\r
-        "name" : "Charles du Jeu",\r
-        "email" : "charles.dujeu@argeo.org"\r
-      }\r
-    ],\r
-\r
-    "version" : "trunk",\r
-    "qooxdoo-versions": ["1.1"]\r
-  },\r
-  \r
-  "provides" : \r
-  {\r
-    "namespace"   : "org.argeo.security.ria",\r
-    "encoding"    : "utf-8",\r
-    "class"       : "class",\r
-    "resource"    : "resource",\r
-    "translation" : "translation",\r
-    "type"        : "library"\r
-  }\r
-}\r
-\r
diff --git a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/Perspective.js b/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/Perspective.js
deleted file mode 100644 (file)
index 7309b45..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/**\r
- * IPerspective Implementation : Horizontal split pane defining two panes,\r
- * "list" and "applet".\r
- */\r
-/* ************************************************************************\r
-\r
-#asset(org/argeo/security/ria/*)\r
-\r
-************************************************************************ */\r
-\r
-qx.Class.define("org.argeo.security.ria.Perspective", {\r
-       extend : qx.core.Object,\r
-       implement : [org.argeo.ria.components.IPerspective],\r
-\r
-       construct : function() {\r
-               this.base(arguments);\r
-       },\r
-\r
-       statics : {\r
-               LABEL : "RIA Security",\r
-               ICON : "org/argeo/security/ria/preferences-security.png",\r
-               ACCESS:"!ROLE_ANONYMOUS"\r
-       },\r
-       \r
-\r
-       members : {\r
-\r
-               initViewPanes : function(viewsManager) {\r
-\r
-                       this._firstSplit = new qx.ui.splitpane.Pane("horizontal");\r
-                       this._secondSplit = new qx.ui.splitpane.Pane("horizontal");\r
-                       this._secondSplit.setDecorator(null);\r
-                       \r
-                       var rolesPane = new org.argeo.ria.components.ViewPane("roles", "Roles");\r
-                       viewsManager.registerViewPane(rolesPane);\r
-                       var usersPane = new org.argeo.ria.components.ViewPane("users", "Users");\r
-                       viewsManager.registerViewPane(usersPane);\r
-                       var editorPane = new org.argeo.ria.components.TabbedViewPane("editor", "Editor");\r
-                       viewsManager.registerViewPane(editorPane);\r
-                       \r
-                       this._firstSplit.add(rolesPane, 1);\r
-                       this._firstSplit.add(this._secondSplit, 4);\r
-                       \r
-                       this._secondSplit.add(usersPane, 3);\r
-                       this._secondSplit.add(editorPane, 4);\r
-                       \r
-                       viewsManager.getViewPanesContainer().add(this._firstSplit, {flex : 1});\r
-               },\r
-\r
-               initViews : function(viewsManager) {\r
-\r
-                       var rolesView = viewsManager.initIViewClass(org.argeo.security.ria.RolesApplet, "roles");\r
-                       var usersView = viewsManager.initIViewClass(org.argeo.security.ria.UsersApplet, "users");\r
-                       \r
-                       rolesView.load();                       \r
-                       usersView.load();\r
-                       \r
-               },\r
-\r
-               remove : function(viewsManager) {\r
-                       viewsManager.getViewPanesContainer().remove(this._firstSplit);\r
-               }\r
-\r
-       }\r
-\r
-});
\ No newline at end of file
diff --git a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/RolesApplet.js b/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/RolesApplet.js
deleted file mode 100644 (file)
index 9ae4eff..0000000
+++ /dev/null
@@ -1,421 +0,0 @@
-/**
- * A simple Hello World applet for documentation purpose. 
- * The only associated command is the "Close" command.
- */
-/* *************************************************
-#asset(org/argeo/ria/sample/window-close.png)
-****************************************************/
-qx.Class.define("org.argeo.security.ria.RolesApplet",
-{
-  extend : qx.ui.container.Composite,
-  implement : [org.argeo.ria.components.IView], 
-
-  construct : function(){
-       this.base(arguments);
-       this.setLayout(new qx.ui.layout.VBox());
-  },
-
-  properties : 
-  {
-       /**
-        * The viewPane inside which this applet is added. 
-        */
-       view : {
-               init : null
-       },
-       /**
-        * Commands definition, see {@link org.argeo.ria.event.CommandsManager#definitions} 
-        */
-       commands : {
-               init : {
-                       "reload" : {
-                               label           : "Reload Data",
-                               icon            : "org/argeo/security/ria/view-refresh.png",
-                               shortcut        : "Control+h",
-                               enabled         : true,
-                               menu            : "Roles",
-                               toolbar         : "roles",
-                               callback        : function(e){
-                                       this.loadRolesList();
-                               },
-                               command         : null
-                       },                      
-                       "new_role" : {
-                               label           : "Create Role", 
-                               icon            : "org/argeo/security/ria/list-add.png",
-                               shortcut        : null,
-                               enabled         : true,
-                               menu            : "Roles",
-                               toolbar         : null,
-                               callback        : function(e){
-                                       // Prompt for new name
-                                       var modal = new org.argeo.ria.components.Modal();
-                                       modal.makePromptForm("Please enter a role name", function(roleName){
-                                               var service = org.argeo.security.ria.SecurityAPI.getCreateRoleService(roleName);
-                                               service.addListener("completed", function(response){
-                                                       this.loadRolesList();
-                                               }, this);
-                                               service.send();
-                                       }, this);
-                                       modal.attachAndShow();
-                               },
-                               command         : null
-                       },      
-                       "delete_role" : {
-                               label           : "Delete Role", 
-                               icon            : "org/argeo/security/ria/list-remove.png",
-                               shortcut        : null,
-                               enabled         : true,
-                               menu            : "Roles",
-                               toolbar         : null,
-                               callback        : function(e){
-                                       // Call service to delete
-                                       var roles = this.getViewSelection().getNodes();
-                                       var modal = new org.argeo.ria.components.Modal("Delete");                                       
-                                       modal.addConfirm("Are you sure you want to delete the selected roles?");
-                                       modal.addListener("ok", function(e){
-                                               for(var i=0;i<roles.length;i++){
-                                                       var service = org.argeo.security.ria.SecurityAPI.getDeleteRoleService(roles[i]);
-                                                       service.addListener("completed", function(response){
-                                                               this.loadRolesList();
-                                                       }, this);
-                                                       service.send();
-                                               }
-                                       }, this);
-                                       modal.attachAndShow();                                  
-                               },
-                               selectionChange : function(viewName, data){
-                                       if(viewName != "roles") return;
-                                       this.setEnabled(!(data == null || !data.length));                                       
-                               },
-                               command         : null
-                       },                                              
-                       "edit_role" : {
-                               label           : "Edit Role", 
-                               icon            : "org/argeo/security/ria/document-properties.png",
-                               shortcut        : "Control+r",
-                               enabled         : true,
-                               menu            : "Roles",
-                               toolbar         : null,
-                               callback        : function(e){
-                                       // Call service to delete
-                                       this.setGuiMode("edit");
-                               },
-                               selectionChange : function(viewName, data){
-                                       if(viewName != "roles") return;
-                                       this.setEnabled(!(data == null || !data.length || data.length > 1));                                    
-                               },
-                               command         : null
-                       }                                               
-               }
-       },
-       viewSelection : {
-               nullable:false, 
-               check:"org.argeo.ria.components.ViewSelection"
-       },
-       guiMode : {
-               apply : "_applyGuiMode"
-       },
-       rolesList : {
-               check : "Array",
-               event : "changeRolesList"
-       },      
-       chooserOriginalSelection : {},
-       chooserSelectionModified : {
-               init:false,
-               event : "chooserSelectionWasModified"
-       },
-       instanceId : {init:""},
-       instanceLabel : {init:""}
-  },
-
-  members :
-  {
-       /**
-        * Called at applet creation. Just registers viewPane.
-        * @param viewPane {org.argeo.ria.components.ViewPane} The viewPane.
-        */
-       init : function(viewPane){
-               this.setView(viewPane);
-               this.setViewSelection(new org.argeo.ria.components.ViewSelection(viewPane.getViewId()));
-               
-               this.toolBar = new qx.ui.toolbar.ToolBar();
-               this.toolBarPart = new qx.ui.toolbar.Part();
-               this.toolBar.add(this.toolBarPart);             
-               viewPane.add(this.toolBar);
-               
-               this.tableModel = new qx.ui.table.model.Simple();
-               this.tableModel.setColumns(["Role Name"]);
-               this.table = new qx.ui.table.Table(this.tableModel, {
-                               tableColumnModel: function(obj){
-                                       return new qx.ui.table.columnmodel.Resize(obj)
-                               }
-                       });
-               this.table.setStatusBarVisible(false);
-               this.table.setShowCellFocusIndicator(false);
-               this.table.setColumnVisibilityButtonVisible(false);
-               this.table.highlightFocusedRow(false);                  
-               viewPane.add(this.table, {height:"100%"});
-               this.table.getSelectionModel().addListener("changeSelection", function(){
-                       this._selectionToValues(this.table.getSelectionModel(), this.getViewSelection());
-               }, this);
-               
-               this.rolesUsersStub = {"ROLE_ADMIN":["gandalf"],"ROLE_USER":["demo","frodo","gandalf"]};
-                                       
-               this.toggleButton = new qx.ui.form.ToggleButton("Filter", "org/argeo/security/ria/go-next.png");
-               this.toggleButton.set({
-                       show:"icon",
-                       margin:2,
-                       toolTip :new qx.ui.tooltip.ToolTip("Apply automatic filtering on Users list")                   
-               });
-                               
-               // TOGGLE THE GUI MODES                 
-               this.toggleButton.addListener("changeValue", function(event){
-                       this.setGuiMode(event.getData()?"filter":"clear");
-               }, this);
-               
-               this.saveButton = new qx.ui.form.Button("Save", "org/argeo/security/ria/document-save.png");
-               this.saveButton.set({
-                       show:"icon",
-                       margin:2,
-                       toolTip :new qx.ui.tooltip.ToolTip("Save changes"),
-                       visibility : "excluded"
-               });
-               
-               this.cancelButton = new qx.ui.form.Button("Cancel", "org/argeo/security/ria/window-close.png");
-               this.cancelButton.set({
-                       show:"icon",
-                       margin:2,
-                       toolTip :new qx.ui.tooltip.ToolTip("Cancel changes"),
-                       visibility : "excluded"                         
-               });
-               
-               this.saveButton.addListener("execute", function(){
-                       if(!this.usersAppletReference){
-                               this.setGuiMode(this.initialState);
-                               return;
-                       }
-                       var newSelection = this.usersAppletReference.getViewSelection().getNodes();
-                       var diff = this._selectionDiff(this.getChooserOriginalSelection(), newSelection);
-                       this.saveRoleModifications(diff.deltaPlus, diff.deltaMinus);
-                       this.setGuiMode(this.initialState);
-               }, this);
-               this.cancelButton.addListener("execute", function(){
-                       if(!this.getChooserSelectionModified()){
-                               this.setGuiMode(this.initialState);
-                               return;
-                       }
-                       var modal = new org.argeo.ria.components.Modal("Warning");
-                       modal.addConfirm("There are unsaved changes!\n Are you sure you want to close?");
-                       modal.addListener("ok", function(){
-                               this.setGuiMode(this.initialState);
-                       }, this);
-                       modal.attachAndShow();                  
-               }, this);
-               
-               this.table.addListener("cellDblclick", function(cellEvent){
-                       this.setGuiMode("edit");
-               }, this);
-               this.addListener("changeRolesList", function(event){
-                       var data = [];
-                       event.getData().forEach(function(el){data.push([el]);});
-                       this.tableModel.setData(data);                                                  
-               }, this);
-               
-               this.setGuiMode("clear");
-       },
-       
-       _applyGuiMode : function(guiMode, previousMode){
-               var selectionModel = this.table.getSelectionModel();
-               if(!this.usersAppletReference){
-                       var vManager = org.argeo.ria.components.ViewsManager.getInstance();
-                       this.usersAppletReference = vManager.getViewPaneById("users").getContent();
-               }
-               
-               this.saveButton.setVisibility((guiMode=="edit"?"visible":"excluded"));
-               this.cancelButton.setVisibility((guiMode=="edit"?"visible":"excluded"));
-               this.table.setEnabled((guiMode=="edit"?false:true));
-               this.toggleButton.setVisibility((guiMode=="edit"?"excluded":"visible"));                        
-               
-               if(guiMode == "filter"){
-                       if(this.usersAppletReference){
-                               this.usersAppletReference.setGuiMode(("filter"));
-                               var viewSel = this.usersAppletReference.getViewSelection();
-                               viewSel.removeListener("changeSelection", this.monitorChooserSelectionChanges, this);                   
-                       }
-                       selectionModel.addListener("changeSelection", this.selectionToFilter, this);
-                       if(selectionModel.getSelectedCount()){
-                               var orig = selectionModel.getSelectedRanges()[0].minIndex;
-                       }
-                       selectionModel.setSelectionMode(qx.ui.table.selection.Model.MULTIPLE_INTERVAL_SELECTION_TOGGLE);
-                       if(orig){
-                               selectionModel.addSelectionInterval(orig, orig);
-                       }
-                       this.selectionToFilter();                       
-               }else if(guiMode == "edit"){
-                       if(!this.usersAppletReference) return;
-                       this.initialState = previousMode;
-                       if(previousMode == "filter"){
-                               this.usersAppletReference.setGuiMode(("clear"));
-                               selectionModel.removeListener("changeSelection", this.selectionToFilter, this);
-                       }
-                       this.usersAppletReference.setGuiMode(("chooser"));
-                       this.selectionToChooser(); // Warning, to be called before calling listener!
-                       var viewSel = this.usersAppletReference.getViewSelection();
-                       viewSel.addListener("changeSelection", this.monitorChooserSelectionChanges, this);
-               }else if(guiMode == "clear"){
-                       if(this.usersAppletReference){
-                               this.usersAppletReference.setGuiMode(("clear"));
-                               var viewSel = this.usersAppletReference.getViewSelection();
-                               viewSel.removeListener("changeSelection", this.monitorChooserSelectionChanges, this);                   
-                       }
-                       this.table.setEnabled(true);
-                       selectionModel.removeListener("changeSelection", this.selectionToFilter, this);
-                       if(selectionModel.getSelectedCount()){
-                               var orig = selectionModel.getSelectedRanges()[0].minIndex;
-                       }
-                       selectionModel.setSelectionMode(qx.ui.table.selection.Model.SINGLE_SELECTION);                          
-                       if(orig){
-                               selectionModel.addSelectionInterval(orig, orig);
-                       }
-               }
-       },
-       
-       saveRoleModifications : function(deltaPlus, deltaMinus){
-               // LOAD CONCERNED USERS
-               var selectionModel = this.table.getSelectionModel();
-               if(!selectionModel.getSelectedCount()){
-                       return;
-               }
-               var roleValue = this._selectionToValues(selectionModel)[0];
-               
-               var users = deltaPlus.concat(deltaMinus);
-               var modal = new org.argeo.ria.components.Modal("Batch Update", "", "Please wait, updating roles for selected users");
-               modal.attachAndShow();
-               for(var i=0;i<users.length;i++){
-                       var user = users[i];
-                       var userDetailService = org.argeo.security.ria.SecurityAPI.getUserDetailsService(users[i]);
-                       userDetailService.addListener("completed", function(response){
-                               var userRoles = response.getContent().roles;
-                               if(qx.lang.Array.contains(deltaPlus, user)){
-                                       userRoles.push(roleValue);
-                               }else if(qx.lang.Array.contains(deltaMinus, user)){
-                                       qx.lang.Array.remove(userRoles, roleValue);
-                               }
-                               var userSaveService = org.argeo.security.ria.SecurityAPI.getUpdateUserService(response.getContent());
-                               userSaveService.setAsynchronous(false);
-                               userSaveService.send();
-                       }, this);
-                       userDetailService.setAsynchronous(false);
-                       userDetailService.send();
-               }
-               this.fireDataEvent("changeRolesList", this.getRolesList());
-               modal.hide();
-               modal.destroy();
-       },
-       
-       monitorChooserSelectionChanges : function(event){
-               if(!this.usersAppletReference || this.getChooserSelectionModified()) return;
-               var initialSelection = this.getChooserOriginalSelection();
-               var crtSelection = event.getTarget().getNodes();
-               if(!qx.lang.Array.equals(initialSelection.sort(), crtSelection.sort())){
-                       this.setChooserSelectionModified(true);                         
-                       this.saveButton.setEnabled(true);
-               }
-       },
-       
-       selectionToFilter : function(){
-               if(!this.usersAppletReference) return;
-               var selectionModel = this.table.getSelectionModel();
-               if(!selectionModel.getSelectedCount()){
-                       this.usersAppletReference.resetHiddenRows();
-                       return;
-               }
-               this.usersAppletReference.applyFilter(this._selectionToValues(selectionModel), "roles", true);                  
-       },
-       
-       selectionToChooser : function(){
-               if(!this.usersAppletReference) return;
-               var selectionModel = this.table.getSelectionModel();
-               if(!selectionModel.getSelectedCount()){
-                       this.usersAppletReference.resetHiddenRows();
-                       return;
-               }
-               var uniqueValue = this._selectionToValues(selectionModel)[0];
-               //var initSelection = this.rolesUsersStub[uniqueValue];
-               this.usersAppletReference.applySelection(uniqueValue, "roles");
-               var initSelection = this.usersAppletReference.getViewSelection().getNodes(); 
-               this.setChooserOriginalSelection(initSelection);
-               this.setChooserSelectionModified(false);
-               this.saveButton.setEnabled(false);
-       },
-       
-       _selectionToValues : function(selectionModel, viewSelection){           
-               if(viewSelection){
-                       viewSelection.setBatchMode(true);
-                       viewSelection.clear();
-               }
-               if(!selectionModel.getSelectedCount()) return [];
-               var ranges = selectionModel.getSelectedRanges();
-               var values = [];
-               for(var i=0;i<ranges.length;i++){
-                       for(var j=ranges[i].minIndex;j<=ranges[i].maxIndex;j++){                                        
-                               values.push(this.tableModel.getData()[j][0]);
-                               if(viewSelection){
-                                       viewSelection.addNode(this.tableModel.getData()[j][0]);
-                               }
-                       }
-               }
-               if(viewSelection){
-                       viewSelection.setBatchMode(false);
-               }
-               return values;
-       },
-       
-       _selectionDiff : function(initialSelection, modifiedSelection){
-               var deltaMinus = qx.lang.Array.clone(initialSelection);
-               var deltaPlus = qx.lang.Array.clone(modifiedSelection);
-               qx.lang.Array.exclude(deltaPlus, initialSelection);
-               qx.lang.Array.exclude(deltaMinus, modifiedSelection);
-               return {deltaPlus : deltaPlus, deltaMinus : deltaMinus};
-       },
-       
-       /**
-        * Load a given row : the data passed must be a simple data array.
-        * @param data {Element} The text xml description. 
-        */
-       load : function(){
-               
-               var commands = this.getCommands();
-               this.toolBarPart.add(commands["new_role"].command.getToolbarButton());
-               this.toolBarPart.add(commands["delete_role"].command.getToolbarButton());
-               this.toolBarPart.add(commands["edit_role"].command.getToolbarButton());                 
-               this.toolBar.addSpacer();
-               this.toolBar.add(this.toggleButton);
-               this.toolBar.add(this.saveButton);              
-               this.toolBar.add(this.cancelButton);                            
-               this.toolBar.setShow("icon");
-               
-               this.loadRolesList();
-               
-       },
-       
-       loadRolesList : function(){
-               this.setRolesList([]);
-               var service = org.argeo.security.ria.SecurityAPI.getListRolesService();
-               service.addListener("completed", function(response){
-                       this.setRolesList(response.getContent());
-               }, this);
-               service.send();                 
-       },
-                
-       addScroll : function(){
-               return false;
-       },
-       
-       close : function(){
-               return false;
-       }
-       
-  }
-});
\ No newline at end of file
diff --git a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/SecurityAPI.js b/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/SecurityAPI.js
deleted file mode 100644 (file)
index 55b9053..0000000
+++ /dev/null
@@ -1,189 +0,0 @@
-qx.Class.define("org.argeo.security.ria.SecurityAPI", {\r
-       extend : qx.core.Object,\r
-       statics : {\r
-               \r
-               DEFAULT_CONTEXT : "/org.argeo.security.webapp",\r
-               \r
-               CREDENTIALS_SERVICE : "getCredentials.security",\r
-               \r
-               USERS_LIST_SERVICE : "getUsersList.security",\r
-               USER_EXISTS_SERVICE : "userExists.security",            \r
-               DELETE_USER_SERVICE : "deleteUser.security",\r
-               UPDATE_USER_SERVICE : "updateUser.security",\r
-               UPDATE_USER_SELF_SERVICE : "updateUserSelf.security",\r
-               GET_USER_DETAILS_SERVICE : "getUserDetails.security",\r
-               CREATE_USER_SERVICE : "createUser.security",\r
-               UPDATE_USER_PASS_SERVICE : "updateUserPassword.security",\r
-               UPDATE_PASS_SERVICE : "updatePassword.security",\r
-\r
-               ROLES_LIST_SERVICE : "getRolesList.security",\r
-               CREATE_ROLE_SERVICE : "createRole.security",\r
-               DELETE_ROLE_SERVICE : "deleteRole.security",            \r
-\r
-               /**\r
-                * Standard Request getter\r
-                * @param serviceName {String} The name of the service to call (without base context)\r
-                * @param fireReloadEventType {String} Whether query should trigger a ReloadEvent\r
-                * @param iLoadStatusables {org.argeo.ria.components.ILoadStatusables[]} Gui parts to update\r
-                * @return {qx.io.remote.Request}\r
-                */\r
-               getServiceRequest : function(serviceName) {\r
-                       var serviceManager = org.argeo.ria.remote.RequestManager.getInstance();\r
-                       return serviceManager.getRequest(\r
-                               org.argeo.security.ria.SecurityAPI.DEFAULT_CONTEXT + "/" + serviceName, \r
-                               "GET",\r
-                               "application/json");\r
-               },\r
-               \r
-               /**\r
-                * \r
-                * @param {qx.io.remote.Request} request\r
-                * @param {Array} argumentsArray\r
-                * @param {Integer} startIndex\r
-                */\r
-               parseOptionalArguments : function(request, argumentsArray, startIndex){\r
-                       // Attach Error listener\r
-                       request.addListener("completed", function(response){\r
-                               var jSonContent = response.getContent();  \r
-                               if(typeof jSonContent == "object" && jSonContent.status && jSonContent.status == "ERROR"){\r
-                                       org.argeo.ria.components.Logger.getInstance().error(jSonContent.message);\r
-                                       response.getTarget().abort();\r
-                               }                               \r
-                       });\r
-\r
-                       // Attach ILoadStatusables & reloadEvents\r
-                       if(argumentsArray.length <= startIndex) return;\r
-                       var serviceManager = org.argeo.ria.remote.RequestManager.getInstance();\r
-                       for(var i=startIndex;i<argumentsArray.length;i++){\r
-                               var argument = argumentsArray[i];\r
-                               if(qx.lang.Type.isArray(argument)){\r
-                                       serviceManager.attachILoadStatusables(request, argument);\r
-                               }else if(typeof argument == "string"){\r
-                                       serviceManager.attachReloadEventType(request, argument);\r
-                               }\r
-                       }\r
-               },\r
-               \r
-               getCredentialsService : function(){\r
-                       var req = org.argeo.security.ria.SecurityAPI.getServiceRequest(org.argeo.security.ria.SecurityAPI.CREDENTIALS_SERVICE);\r
-                       org.argeo.security.ria.SecurityAPI.parseOptionalArguments(req, arguments, 0);\r
-                       return req;                     \r
-               },\r
-               \r
-               /**\r
-                * @return  {qx.io.remote.Request}\r
-                */\r
-               getListUsersService : function(getNatures){\r
-                       var req = org.argeo.security.ria.SecurityAPI.getServiceRequest(org.argeo.security.ria.SecurityAPI.USERS_LIST_SERVICE);\r
-                       org.argeo.security.ria.SecurityAPI.parseOptionalArguments(req, arguments, 1);\r
-                       req.setParameter("getNatures", (getNatures || false));\r
-                       return req;\r
-               },\r
-               \r
-               /**\r
-                * @return  {qx.io.remote.Request}\r
-                */\r
-               getUserExistsService : function(userName){\r
-                       var req = org.argeo.security.ria.SecurityAPI.getServiceRequest(org.argeo.security.ria.SecurityAPI.USER_EXISTS_SERVICE);\r
-                       org.argeo.security.ria.SecurityAPI.parseOptionalArguments(req, arguments, 1);\r
-                       req.setParameter("username", userName);\r
-                       return req;\r
-               },\r
-               \r
-               /**\r
-                * @return  {qx.io.remote.Request}\r
-                */\r
-               getDeleteUserService : function(userName){\r
-                       var req = org.argeo.security.ria.SecurityAPI.getServiceRequest(org.argeo.security.ria.SecurityAPI.DELETE_USER_SERVICE);\r
-                       org.argeo.security.ria.SecurityAPI.parseOptionalArguments(req, arguments, 1);\r
-                       req.setParameter("username", userName);\r
-                       return req;\r
-               },\r
-               \r
-               /**\r
-                * @return  {qx.io.remote.Request}\r
-                */\r
-               getUpdateUserService : function(userObject, self){\r
-                       var service = (self?org.argeo.security.ria.SecurityAPI.UPDATE_USER_SELF_SERVICE:org.argeo.security.ria.SecurityAPI.UPDATE_USER_SERVICE);\r
-                       var req = org.argeo.security.ria.SecurityAPI.getServiceRequest(service);\r
-                       req.setMethod("POST");\r
-                       org.argeo.security.ria.SecurityAPI.parseOptionalArguments(req, arguments, 1);\r
-                       var jsonString = qx.util.Json.stringify(userObject);\r
-                       req.setData(jsonString);\r
-                       return req;\r
-               },\r
-               \r
-               /**\r
-                * @return  {qx.io.remote.Request}\r
-                */\r
-               getUserDetailsService : function(userName){\r
-                       var req = org.argeo.security.ria.SecurityAPI.getServiceRequest(org.argeo.security.ria.SecurityAPI.GET_USER_DETAILS_SERVICE);\r
-                       org.argeo.security.ria.SecurityAPI.parseOptionalArguments(req, arguments, 1);\r
-                       req.setParameter("username", userName);\r
-                       return req;\r
-               },\r
-               \r
-               /**\r
-                * @return  {qx.io.remote.Request}\r
-                */\r
-               getCreateUserService : function(userObject){\r
-                       var req = org.argeo.security.ria.SecurityAPI.getServiceRequest(org.argeo.security.ria.SecurityAPI.CREATE_USER_SERVICE);\r
-                       req.setMethod("POST");\r
-                       org.argeo.security.ria.SecurityAPI.parseOptionalArguments(req, arguments, 1);\r
-                       var jsonString = qx.util.Json.stringify(userObject);\r
-                       req.setData(jsonString);\r
-                       return req;\r
-               },\r
-               \r
-               /**\r
-                * @return  {qx.io.remote.Request}\r
-                */\r
-               getUpdatePassService : function(oldPassword, newPassword){\r
-                       var req = org.argeo.security.ria.SecurityAPI.getServiceRequest(org.argeo.security.ria.SecurityAPI.UPDATE_PASS_SERVICE);\r
-                       org.argeo.security.ria.SecurityAPI.parseOptionalArguments(req, arguments, 2);\r
-                       req.setParameter("password", newPassword);\r
-                       req.setParameter("oldPassword", oldPassword);\r
-                       return req;\r
-               },\r
-               \r
-               /**\r
-                * @return  {qx.io.remote.Request}\r
-                */\r
-               getUpdateUserPassService : function(userName, userPassword){\r
-                       var req = org.argeo.security.ria.SecurityAPI.getServiceRequest(org.argeo.security.ria.SecurityAPI.UPDATE_USER_PASS_SERVICE);\r
-                       org.argeo.security.ria.SecurityAPI.parseOptionalArguments(req, arguments, 2);\r
-                       req.setParameter("username", userName);\r
-                       req.setParameter("password", userPassword);\r
-                       return req;\r
-               },\r
-               \r
-               /**\r
-                * @return  {qx.io.remote.Request}\r
-                */\r
-               getListRolesService : function(){\r
-                       var req = org.argeo.security.ria.SecurityAPI.getServiceRequest(org.argeo.security.ria.SecurityAPI.ROLES_LIST_SERVICE);\r
-                       org.argeo.security.ria.SecurityAPI.parseOptionalArguments(req, arguments, 0);\r
-                       return req;\r
-               },\r
-                               \r
-               /**\r
-                * @return  {qx.io.remote.Request}\r
-                */\r
-               getCreateRoleService : function(roleName){\r
-                       var req = org.argeo.security.ria.SecurityAPI.getServiceRequest(org.argeo.security.ria.SecurityAPI.CREATE_ROLE_SERVICE);\r
-                       org.argeo.security.ria.SecurityAPI.parseOptionalArguments(req, arguments, 1);\r
-                       req.setParameter("role", roleName);\r
-                       return req;\r
-               },\r
-               \r
-               /**\r
-                * @return  {qx.io.remote.Request}\r
-                */\r
-               getDeleteRoleService : function(roleName){\r
-                       var req = org.argeo.security.ria.SecurityAPI.getServiceRequest(org.argeo.security.ria.SecurityAPI.DELETE_ROLE_SERVICE);\r
-                       org.argeo.security.ria.SecurityAPI.parseOptionalArguments(req, arguments, 1);\r
-                       req.setParameter("role", roleName);\r
-                       return req;\r
-               }                               \r
-       }\r
-});
\ No newline at end of file
diff --git a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/UserEditorApplet.js b/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/UserEditorApplet.js
deleted file mode 100644 (file)
index 85de9ae..0000000
+++ /dev/null
@@ -1,235 +0,0 @@
-/**
- * A simple Hello World applet for documentation purpose. 
- * The only associated command is the "Close" command.
- */
-/* *************************************************
-#asset(org/argeo/security/ria/*)
-****************************************************/
-qx.Class.define("org.argeo.security.ria.UserEditorApplet",
-{
-  extend : org.argeo.security.ria.components.UserEditor,
-  implement : [org.argeo.ria.components.IView], 
-  
-  construct : function(){
-       this.base(arguments);
-  },
-  
-  properties : 
-  {
-       /**
-        * The viewPane inside which this applet is added. 
-        */
-       view : {
-               init : null
-       },      
-       /**
-        * Commands definition, see {@link org.argeo.ria.event.CommandsManager#definitions} 
-        */
-       commands : {
-               init : {
-                       "save_user" : {
-                               label           : "Save", 
-                               icon            : "org/argeo/security/ria/document-save.png",
-                               shortcut        : "Control+s",
-                               enabled         : true,
-                               menu            : "Users",
-                               toolbar         : "user",
-                               callback        : function(e){
-                                       // CALL SERVICE AND GET UP TO DATE USER
-                                       this.saveUser();
-                               },
-                               selectionChange : function(viewName, data){
-                                       if(viewName != "editor") return;
-                                       var iApplet = org.argeo.ria.components.ViewsManager.getInstance().getViewPaneById("editor").getContent();
-                                       this.setEnabled(iApplet.getModified());
-                               },
-                               command         : null
-                       },
-                       "add_nature" : {
-                               label           : "Add Nature ...", 
-                               icon            : "org/argeo/security/ria/list-add.png",
-                               shortcut        : null,
-                               enabled         : true,
-                               menu            : "Natures",
-                               toolbar         : null,
-                               callback        : function(e){
-                               },
-                               submenuCallback : function(commandClass){
-                                       this._addNatureTab(commandClass, null, true);
-                               },
-                               submenu         : [
-                                       {"label" : "Totot", "icon":"","commandId" : "toto"},
-                                       {"label" : "Totot", "icon":"","commandId" : "toto"}
-                               ],
-                               selectionChange : function(viewName, data){
-                                       if(viewName != "editor") return;
-                                       var iApplet = org.argeo.ria.components.ViewsManager.getInstance().getViewPaneById("editor").getContent();
-                                       if(iApplet && iApplet.getCurrentNatureTabs() && iApplet.getNaturesManager().getDetectedNatures()
-                                               && iApplet.getCurrentNatureTabs().length < qx.lang.Object.getLength(iApplet.getNaturesManager().getDetectedNatures())){
-                                               this.setEnabled(true);
-                                       }else{
-                                               this.setEnabled(false);
-                                       }
-                               },
-                               command         : null                                  
-                       },
-                       "remove_nature" : {
-                               label           : "Remove Nature", 
-                               icon            : "org/argeo/security/ria/list-remove.png",
-                               shortcut        : null,
-                               enabled         : true,
-                               menu            : "Natures",
-                               toolbar         : null,
-                               callback        : function(e){
-                                       this.removeSelectedTab();
-                               },
-                               selectionChange : function(viewName, data){
-                                       if(viewName != "editor") return;
-                                       var iApplet = org.argeo.ria.components.ViewsManager.getInstance().getViewPaneById("editor").getContent();
-                                       if(iApplet && iApplet.getSelectedNatureTab() && iApplet.getSelectedNatureTab().getUserData("NATURE_CLASS")){
-                                               this.setEnabled(true);
-                                       }else{
-                                               this.setEnabled(false);
-                                       }
-                               },
-                               command         : null
-                       },
-                       "close" : {
-                               label           : "Close", 
-                               icon            : "org/argeo/security/ria/window-close.png",
-                               shortcut        : "Control+w",
-                               enabled         : true,
-                               menu            : "Users",
-                               toolbar         : "user",
-                               callback        : function(e){
-                                       // Call service to delete
-                                       var iApplet = org.argeo.ria.components.ViewsManager.getInstance().getViewPaneById("editor").getContent();
-                                       if(!iApplet.getModified() && !iApplet.getNaturesModified()){
-                                               this.getView().closeCurrent();
-                                               return;
-                                       }
-                                       var modal = new org.argeo.ria.components.Modal("Warning");
-                                       modal.addConfirm("There are unsaved changes!\n Are you sure you want to close?");
-                                       modal.addListener("ok", function(){
-                                               this.getView().closeCurrent();
-                                       }, this);
-                                       modal.attachAndShow();
-                               },
-                               command         : null
-                       }                                               
-               }
-       },
-       viewSelection : {
-               nullable:false, 
-               check:"org.argeo.ria.components.ViewSelection"
-       },
-       instanceId : {
-               init:"",
-               event : "changeInstanceId"
-       },
-       instanceLabel : {
-               init:"Editor",
-               event : "changeInstanceLabel"
-       }
-  },
-
-  members :
-  {
-       /**
-        * Called at applet creation. Just registers viewPane.
-        * @param viewPane {org.argeo.ria.components.ViewPane} The viewPane.
-        */
-       init : function(viewPane, data){
-               if(!data.USER){
-                       var now = new Date();
-                       this.setInstanceId(now.getTime());
-                       this.setInstanceLabel("New User");                      
-               }else{
-                       this.setInstanceId(data.USER);
-                       this.setInstanceLabel("User " + data.USER);
-               }
-               this.setView(viewPane);
-               this.setViewSelection(new org.argeo.ria.components.ViewSelection(viewPane.getViewId()));
-
-               this.initGUI(data.ROLES_LIST);
-               
-               this.addListener("savedUser", function(e){  
-                       if(this.getCurrentUser()){
-                               this.setInstanceLabel("User " + this.getCurrentUser().getName());
-                               this.setInstanceId(this.getCurrentUser().getName());
-                       }
-               }, this);
-                                                       
-       },
-       
-       /**
-        * Load a given row : the data passed must be a simple data array.
-        * @param data {Element} The text xml description. 
-        */
-       load : function(userName){
-               if(this.getLoaded()){
-                       return;
-               }               
-               // MUST BE DONE AFTER COMMANDS ARE INITIALIZED! 
-               var commands = this.getCommands();
-               var saveButton = commands["save_user"].command.getFormButton(); 
-               var closeButton = commands["close"].command.getFormButton(); 
-               var removeButton = commands["remove_nature"].command.getFormButton();
-               var natureButton = commands["add_nature"].command.getFormButton();
-               
-               this.getNaturesManager().addListener("changeNonAssignedNatures", function(event){
-                       var natures = event.getData();
-                       var newMenu = [];
-                       for(var key in natures){
-                               newMenu.push({
-                                       "label" : natures[key].NATURE_LABEL, 
-                                       "icon":"", 
-                                       "commandId" : natures[key]
-                                       });
-                       }
-                       commands["add_nature"].command.setMenuDef(newMenu);             
-               }, this);
-               
-               natureButton.setShow("icon");
-               removeButton.setShow("icon");
-               saveButton.setShow("icon");
-               closeButton.setShow("icon");
-               
-               this.buttonGB.add(saveButton);
-               this.buttonGB.add(closeButton);                 
-               this.natureButtonGB.add(natureButton);
-               this.natureButtonGB.add(removeButton);
-               
-               if(userName){
-                       this.loadUserData(userName);
-                       this._setGuiInCreateMode(false);                        
-               }else{
-                       this.setCurrentUser(new org.argeo.security.ria.model.User());
-                       this._setGuiInCreateMode(true);
-                       this._attachListeners();
-                       this.setModified(true);
-               }
-               
-               
-               this.setLoaded(true);
-               
-       },
-                
-       _applyDetailsModified : function(value){                
-               if(value) this.getViewSelection().triggerEvent();
-       },
-       
-       _applyNaturesModified : function(value){
-               if(value) this.getViewSelection().triggerEvent();
-       },      
-       
-       addScroll : function(){
-               return false;
-       },
-       
-       close : function(){
-               return false;
-       }
-       
-  }
-});
\ No newline at end of file
diff --git a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/UsersApplet.js b/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/UsersApplet.js
deleted file mode 100644 (file)
index 1149cb7..0000000
+++ /dev/null
@@ -1,329 +0,0 @@
-/**
- * A simple Hello World applet for documentation purpose. 
- * The only associated command is the "Close" command.
- */
-/* *************************************************
-#asset(org/argeo/security/ria/*)
-****************************************************/
-qx.Class.define("org.argeo.security.ria.UsersApplet",
-{
-  extend : qx.ui.container.Composite,
-  implement : [org.argeo.ria.components.IView], 
-
-  construct : function(){
-       this.base(arguments);
-       this.setLayout(new qx.ui.layout.VBox());
-  },
-
-  properties : 
-  {
-       /**
-        * The viewPane inside which this applet is added. 
-        */
-       view : {
-               init : null
-       },
-       /**
-        * Commands definition, see {@link org.argeo.ria.event.CommandsManager#definitions} 
-        */
-       commands : {
-               init : {
-                       "new_user" : {
-                               label           : "New User", 
-                               icon            : "org/argeo/security/ria/list-add.png",
-                               shortcut        : "Control+n",
-                               enabled         : true,
-                               menu            : "Users",
-                               toolbar         : null,
-                               callback        : function(e){
-                                       // Call service to delete
-                                       var classObj = org.argeo.security.ria.UserEditorApplet;
-                                       var initData = {USER:null,ROLES_LIST:this.getRolesList()};
-                                       var iView = org.argeo.ria.components.ViewsManager.getInstance().initIViewClass(classObj, "editor", initData);
-                                       iView.load();
-                                       iView.addListener("savedUser", function(e){
-                                               this.refreshUserEntry(e.getData());
-                                       }, this);                                       
-                               },
-                               command         : null
-                       },      
-                       "delete_user" : {
-                               label           : "Delete User", 
-                               icon            : "org/argeo/security/ria/list-remove.png",
-                               shortcut        : "Control+d",
-                               enabled         : true,
-                               menu            : "Users",
-                               toolbar         : null,
-                               callback        : function(e){
-                                       // Call service to delete
-                                       var username = this.getViewSelection().getNodes()[0];                                   
-                                       var deleteService = org.argeo.security.ria.SecurityAPI.getDeleteUserService(username);
-                                       deleteService.addListener("completed", function(response){
-                                               if(response.getContent().status && response.getContent().status == "OK"){
-                                                       this.loadUsersList();
-                                               }
-                                       }, this);
-                                       // Check if tab is opened before closing!
-                                       var editorTabPane = org.argeo.ria.components.ViewsManager.getInstance().getViewPaneById("editor");
-                                       var iApplet = editorTabPane.contentExists(username);
-                                       var modal = new org.argeo.ria.components.Modal("Delete");
-                                       if(iApplet){
-                                               if(iApplet.getModified()){
-                                                       modal.addConfirm("There are unsaved changes, are you sure you want to delete this user?");
-                                                       modal.addListener("ok", function(e){
-                                                               editorTabPane.closeCurrent();
-                                                               deleteService.send();
-                                                       }, this);
-                                                       modal.attachAndShow();
-                                               }else{
-                                                       modal.addConfirm("Are you sure you want to delete user " + username + "?");
-                                                       modal.addListener("ok", function(e){
-                                                               editorTabPane.closeCurrent();
-                                                               deleteService.send();
-                                                       }, this);
-                                                       modal.attachAndShow();
-                                               }
-                                       }else{
-                                               modal.addConfirm("Are you sure you want to delete user " + username + "?");
-                                               modal.addListener("ok", function(e){
-                                                       deleteService.send();
-                                               }, this);
-                                               modal.attachAndShow();
-                                       }
-                               },
-                               selectionChange : function(viewName, data){
-                                       if(viewName != "users") return;
-                                       this.setEnabled(!(data == null || !data.length || data.length>1));                                      
-                               },
-                               command         : null
-                       },                      
-                       "edit_user" : {
-                               label           : "Edit User", 
-                               icon            : "org/argeo/security/ria/document-properties.png",
-                               shortcut        : "Control+u",
-                               enabled         : true,
-                               menu            : "Users",
-                               toolbar         : null,
-                               callback        : function(e){
-                                       // Call service to delete
-                                       var crtUser = this.getViewSelection().getNodes()[0];                                    
-                                       var classObj = org.argeo.security.ria.UserEditorApplet;
-                                       var initData = {USER:crtUser,ROLES_LIST:this.getRolesList()};
-                                       var iView = org.argeo.ria.components.ViewsManager.getInstance().initIViewClass(classObj, "editor", initData);
-                                       iView.load(crtUser);
-                                       iView.addListener("savedUser", function(e){
-                                               this.refreshUserEntry(e.getData());
-                                       }, this);
-                               },
-                               selectionChange : function(viewName, data){
-                                       if(viewName != "users") return;
-                                       this.setEnabled(!(data == null || !data.length || data.length > 1));                                    
-                               },
-                               command         : null
-                       }
-               }
-       },
-       
-       guiMode : {
-               init : "filter",
-               apply : "_applyGuiMode"
-       },
-       
-       viewSelection : {
-               nullable:false, 
-               check:"org.argeo.ria.components.ViewSelection"
-       },
-       usersList : {
-               check : "Map",
-               apply : "_applyUsersList",
-               event : "changeUsersList"
-       },
-       rolesList : {
-               check : "Array"
-       },
-       instanceId : {init:""},
-       instanceLabel : {init:""}
-  },
-
-  members :
-  {
-       /**
-        * Called at applet creation. Just registers viewPane.
-        * @param viewPane {org.argeo.ria.components.ViewPane} The viewPane.
-        */
-       init : function(viewPane){
-               this.setView(viewPane);
-               this.setViewSelection(new org.argeo.ria.components.ViewSelection(viewPane.getViewId()));
-               
-               this.toolBar = new qx.ui.toolbar.ToolBar();
-               this.toolBarPart = new qx.ui.toolbar.Part();
-               this.toolBar.add(this.toolBarPart);             
-               viewPane.add(this.toolBar);
-                               
-               this.tableModel = new qx.ui.table.model.Filtered();
-               this.tableModel.setColumns(["username", "roles"]);
-               this.table = new qx.ui.table.Table(this.tableModel, {
-                               tableColumnModel: function(obj){
-                                       return new qx.ui.table.columnmodel.Resize(obj)
-                               }
-                       });
-               this.table.setStatusBarVisible(false);
-               this.table.setShowCellFocusIndicator(false);
-               this.table.setColumnVisibilityButtonVisible(false);
-               this.table.highlightFocusedRow(false);                  
-               viewPane.add(this.table, {height:"100%"});
-               this.table.getSelectionModel().addListener("changeSelection", function(){
-                       this._selectionToValues(this.table.getSelectionModel(), this.getViewSelection());
-               }, this);
-               this.table.addListener("cellDblclick", function(cellEvent){
-                       this.getCommands()["edit_user"].command.execute();
-               }, this);
-               
-               this.setRolesList([]);
-               this.setUsersList({});          
-               this.setGuiMode("clear");
-       },
-       
-       _applyGuiMode : function(newMode, oldMode){
-               this.table.getSelectionModel().resetSelection();
-               this.resetHiddenRows();
-               if(newMode == "filter"){
-                       this.table.getSelectionModel().setSelectionMode(qx.ui.table.selection.Model.SINGLE_SELECTION);
-               }else if(newMode == "chooser"){
-                       this.table.getSelectionModel().setSelectionMode(qx.ui.table.selection.Model.MULTIPLE_INTERVAL_SELECTION_TOGGLE);
-               }else if(newMode == "clear"){
-                       this.table.getSelectionModel().setSelectionMode(qx.ui.table.selection.Model.SINGLE_SELECTION);
-               }
-       },
-       
-       _selectionToValues : function(selectionModel, viewSelection){           
-               if(viewSelection){
-                       viewSelection.setBatchMode(true);
-                       viewSelection.clear();
-               }
-               if(!selectionModel.getSelectedCount()) return [];
-               var ranges = selectionModel.getSelectedRanges();
-               var values = [];
-               for(var i=0;i<ranges.length;i++){
-                       for(var j=ranges[i].minIndex;j<=ranges[i].maxIndex;j++){                                        
-                               values.push(this.tableModel.getData()[j][0]);
-                               if(viewSelection){
-                                       viewSelection.addNode(this.tableModel.getData()[j][0]);
-                               }
-                       }
-               }
-               if(viewSelection){
-                       viewSelection.setBatchMode(false);
-               }
-               return values;
-       },
-       
-       /**
-        * Load a given row : the data passed must be a simple data array.
-        * @param data {Element} The text xml description. 
-        */
-       load : function(){              
-               var commands = this.getCommands();
-               this.toolBarPart.add(commands["new_user"].command.getToolbarButton());
-               this.toolBarPart.add(commands["delete_user"].command.getToolbarButton());
-               this.toolBarPart.add(commands["edit_user"].command.getToolbarButton());                 
-               this.toolBar.setShow("icon");
-               this.loadUsersList();
-               
-               var rolesApplet = org.argeo.ria.components.ViewsManager.getInstance().getViewPaneById("roles").getContent();
-               rolesApplet.addListener("changeRolesList", function(e){
-                       this.setRolesList(e.getData());
-                       this.loadUsersList();
-               }, this);
-               
-       },
-       
-       loadUsersList : function(){
-               var selectionModel = this.table.getSelectionModel();            
-               selectionModel.resetSelection();                
-               var request = org.argeo.security.ria.SecurityAPI.getListUsersService();
-               request.addListener("completed", function(response){
-                       var jSon = response.getContent();
-                       var usMap = {};
-                       for(var i=0;i<jSon.length;i++){
-                               var user = new org.argeo.security.ria.model.User();
-                               user.load(jSon[i], "json");
-                               usMap[user.getName()] = user;
-                       }
-                       this.setUsersList(usMap);                       
-               }, this);
-               request.send();                 
-       },
-       
-       /**
-        * 
-        * @param {org.argeo.security.ria.model.User} userObject
-        */
-       refreshUserEntry : function(userObject){
-               var userName = userObject.getName();
-               var data = this.tableModel.getDataAsMapArray();
-               var index = 0;
-               var found = false;
-               for(index=0;index<data.length;index++){
-                       if(data[index].username == userName){
-                               found =true;
-                               break;
-                       }
-               }
-               var newRows = [{username:userName,roles:userObject.getRoles().join(",")}];
-               if(found){
-                       this.tableModel.setRowsAsMapArray(newRows, index);
-               }else{
-                       this.tableModel.setRowsAsMapArray(newRows, index);
-               }
-       },
-       
-       _applyUsersList : function(usList){
-               var data = [];
-               qx.lang.Object.getValues(usList).forEach(function(usObject){
-                       data.push([usObject.getName(), usObject.getRoles().join(",")]);
-               });
-               this.tableModel.setData(data);                                  
-       },
-               
-       applySelection : function(selectionValue, target, ignoreCase){
-               var selectionModel = this.table.getSelectionModel();            
-               selectionModel.resetSelection();
-               if(!selectionValue){
-                       return;
-               }
-               selectionModel.setBatchMode(true);
-               var data = this.tableModel.getData();
-               for(var i=0;i<this.tableModel.getRowCount();i++){
-                       var value = this.tableModel.getRowDataAsMap(i)[target];
-                       var pattern = new RegExp(selectionValue, "g"+(ignoreCase?"i":""));
-                       if(pattern.test(value)){
-                               selectionModel.addSelectionInterval(i, i);
-                       }
-               }
-               selectionModel.setBatchMode(false);
-       },
-       
-       applyFilter : function(filterValues, target, ignoreCase){
-               this.table.resetSelection();
-               this.resetHiddenRows();                 
-               for(var i=0;i<filterValues.length;i++){
-                       this.tableModel.addRegex("^((?!"+filterValues[i]+").)*$", target, ignoreCase);
-               }
-               this.tableModel.applyFilters();
-       },
-       
-       resetHiddenRows : function(){
-               this.tableModel.resetHiddenRows();
-       },
-        
-       addScroll : function(){
-               return false;
-       },
-       
-       close : function(){
-               return false;
-       }
-       
-  }
-});
\ No newline at end of file
diff --git a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/components/CoworkerNatureImpl.js b/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/components/CoworkerNatureImpl.js
deleted file mode 100644 (file)
index c91e61a..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-qx.Class.define("org.argeo.security.ria.components.CoworkerNatureImpl", {\r
-       extend : org.argeo.security.ria.components.SimpleUserNatureImpl,\r
-       statics : {\r
-               NATURE_TYPE : "org.argeo.security.nature.CoworkerNature",\r
-               NATURE_LABEL : "Co-Worker",\r
-               NATURE_ICON : "",\r
-               NATURE_RANK : 1\r
-       },\r
-       \r
-       construct : function(){\r
-               this.base(arguments);\r
-               this.setDataMap({\r
-                       type:"org.argeo.security.nature.CoworkerNature"\r
-               });             \r
-       },\r
-               \r
-       members : {\r
-               _createGui : function(){\r
-                       var grid = new qx.ui.layout.Grid(5,5);\r
-                       this.setLayout(grid);\r
-                       grid.setColumnFlex(0,1);\r
-                       grid.setColumnAlign(0,"right", "middle");\r
-                       grid.setColumnFlex(1,3);\r
-                       \r
-                       grid.setRowAlign(0, "right", "top");\r
-                       this.mobileField = new qx.ui.form.TextField();\r
-                       this.phoneField = new qx.ui.form.TextField();\r
-                       \r
-                       var labels = ["Mobile Phone", "Home Phone"]; \r
-                       this.fields = {\r
-                               "mobile": this.mobileField, \r
-                               "telephoneNumber" : this.phoneField\r
-                       };\r
-                       \r
-                       for(var i=0;i<labels.length;i++){\r
-                               this.add(new qx.ui.basic.Label(labels[i]), {row:i,column:0});\r
-                       }\r
-                       var j=0;\r
-                       for(var key in this.fields){                    \r
-                               this.fields[key].addListener("changeValue", function(e){this.fireEvent("modified");}, this);\r
-                               this.add(this.fields[key], {row:j,column:1});\r
-                               j++;\r
-                       }                       \r
-               }               \r
-       }\r
-});
\ No newline at end of file
diff --git a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/components/ICredentialPane.js b/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/components/ICredentialPane.js
deleted file mode 100644 (file)
index 2420403..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-qx.Interface.define("org.argeo.security.ria.components.ICredentialPane", {\r
-       extend  : org.argeo.security.ria.components.IUserDataPane,\r
-       members : {\r
-               setEditMode : function(editMode){return true;}\r
-       }\r
-});
\ No newline at end of file
diff --git a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/components/INaturePane.js b/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/components/INaturePane.js
deleted file mode 100644 (file)
index 713f314..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-qx.Interface.define("org.argeo.security.ria.components.INaturePane", {\r
-       extend  : org.argeo.security.ria.components.IUserDataPane,\r
-       statics : {\r
-               NATURE_TYPE : "",\r
-               NATURE_LABEL : "",\r
-               NATURE_ICON : "",\r
-               NATURE_RANK     : 0\r
-       },\r
-       properties : {\r
-               editMode : {\r
-                       init : true,\r
-                       apply : "_applyEditMode",                       \r
-                       event : "changeEditMode"\r
-               },\r
-               isNew   : {\r
-                       init : false,\r
-                       check : "Boolean"\r
-               }\r
-       },\r
-       members : {\r
-               setData : function(dataMap, format){return true;}\r
-       }\r
-});
\ No newline at end of file
diff --git a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/components/IUserDataPane.js b/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/components/IUserDataPane.js
deleted file mode 100644 (file)
index c3530b6..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-qx.Interface.define("org.argeo.security.ria.components.IUserDataPane", {\r
-       members : {\r
-               getContainer  : function(){return true;},\r
-               getData    : function(format){return true;},\r
-               validate : function(){return true;}\r
-       },\r
-       properties : {\r
-               valid : {}\r
-       },\r
-       events : {\r
-               "modified" : "qx.event.type.Event"                      \r
-       }\r
-});
\ No newline at end of file
diff --git a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/components/NaturesManager.js b/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/components/NaturesManager.js
deleted file mode 100644 (file)
index 8e21466..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-qx.Class.define("org.argeo.security.ria.components.NaturesManager",{\r
-       extend : qx.core.Object,\r
-       properties : {\r
-               detectedNatures : {\r
-                       check : "Map"                   \r
-               },\r
-               nonAssignedNatures : {\r
-                       check : "Map", \r
-                       event : "changeNonAssignedNatures"\r
-               }\r
-       },\r
-       construct : function(){\r
-               this.base(arguments);\r
-               this.detectNatures();\r
-       },\r
-       members : {\r
-               detectNatures : function(){                     \r
-                       var natures = {};\r
-                       var sortedNatures = {};\r
-                       var ranks = {};\r
-                       for (var key in qx.Bootstrap.$$registry) {\r
-                               if (qx.Class.hasInterface(qx.Bootstrap.$$registry[key], org.argeo.security.ria.components.INaturePane)) {\r
-                                       // FILTER BY ROLE HERE!\r
-                                       var klass = qx.Bootstrap.$$registry[key];\r
-                                       natures[klass.NATURE_TYPE] = klass;\r
-                                       ranks[klass.NATURE_TYPE] = klass.NATURE_RANK;\r
-                               }\r
-                       }\r
-                       org.argeo.ria.util.Utils.asort(ranks);\r
-                       for(var key in ranks){\r
-                               sortedNatures[key] = natures[key];\r
-                       }\r
-                       this.setDetectedNatures(sortedNatures);\r
-                       this.setNonAssignedNatures(sortedNatures);\r
-               },\r
-               detectNaturesInData : function(userNaturesList){\r
-                       var detected = this.getDetectedNatures();\r
-                       var userDetected = [];\r
-                       var nonAssigned = qx.lang.Object.clone(detected);\r
-                       for(var i = 0;i<userNaturesList.length;i++){\r
-                               var type = userNaturesList[i].type;\r
-                               if(detected[type]){\r
-                                       userDetected.push({\r
-                                               NATURE_CLASS : detected[type],\r
-                                               NATURE_DATA  : userNaturesList[i]\r
-                                       });\r
-                                       delete(nonAssigned[type]);\r
-                               }                                       \r
-                       }\r
-                       this.setNonAssignedNatures(nonAssigned);\r
-                       return userDetected;\r
-               }\r
-       }\r
-});
\ No newline at end of file
diff --git a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/components/PasswordCredentialImpl.js b/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/components/PasswordCredentialImpl.js
deleted file mode 100644 (file)
index 4872350..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-qx.Class.define("org.argeo.security.ria.components.PasswordCredentialImpl", {\r
-       extend : qx.ui.container.Composite,\r
-       implement : [org.argeo.security.ria.components.ICredentialPane],\r
-       events : {\r
-               "modified" : "qx.event.type.Event"              \r
-       },\r
-       properties : {\r
-               valid : {\r
-                       init : false\r
-               },\r
-               selfEdition : {\r
-                       init : false\r
-               },\r
-               encoderCallback : {\r
-                       init : function(string){\r
-                               var encoderShort = org.argeo.ria.util.Encoder;\r
-                               return "{SHA}"+encoderShort.base64Encode(encoderShort.hexDecode(encoderShort.hash(string, "sha1")));\r
-                       },\r
-                       check : "Function"\r
-               }\r
-       },\r
-       \r
-       construct : function(selfEdition){\r
-               this.base(arguments);\r
-               if(selfEdition){\r
-                       this.setSelfEdition(selfEdition);\r
-               }\r
-               this.setLayout(new qx.ui.layout.HBox(5, "center"));\r
-               this.getLayout().setAlignY("middle");\r
-               if(this.getSelfEdition()){\r
-                       this.oldPass = new qx.ui.form.PasswordField();\r
-                       this.add(new qx.ui.basic.Label("Old"), {flex:1});\r
-                       this.add(this.oldPass, {flex:2});\r
-                       this.oldPass.addListener("changeValue", function(){this.fireEvent("modified");}, this);\r
-               }\r
-               this.add(new qx.ui.basic.Label((selfEdition?"New":"Password")), {flex:1});\r
-               this.pass1 = new qx.ui.form.PasswordField();\r
-               this.add(this.pass1, {flex:2});\r
-               this.add(new qx.ui.basic.Label((selfEdition?"Confirm":"Confirm Password")), {flex:1});\r
-               this.pass2 = new qx.ui.form.PasswordField();\r
-               this.add(this.pass2, {flex:2});\r
-               this.pass1.addListener("changeValue", function(){this.fireEvent("modified");}, this);\r
-               this.pass2.addListener("changeValue", function(){this.fireEvent("modified");}, this);\r
-               this.pass2.addListener("changeValue", this.validate, this);\r
-       },\r
-       \r
-       members : {\r
-               getContainer  : function(){\r
-                       return this;\r
-               },\r
-               getData : function(format){\r
-                       var encoder = this.getEncoderCallback();\r
-                       var encoded = null;                     \r
-                       if(this.pass1.getValue() != null && this.pass1.getValue() != ""){\r
-                               encoded = encoder(this.pass1.getValue()); \r
-                       }\r
-                       if(this.getSelfEdition() && encoded && this.oldPass.getValue()!=""){\r
-                               return {oldPass:encoder(this.oldPass.getValue()), newPass:encoded};\r
-                       }\r
-                       return encoded;\r
-               },\r
-               clear : function(){\r
-                       this.pass1.setValue("");\r
-                       this.pass2.setValue("");                \r
-                       if(this.getSelfEdition()){\r
-                               this.oldPass.setValue("");\r
-                       }\r
-               },\r
-               validate : function(){\r
-                       if(this.pass1.getValue() != this.pass2.getValue()){\r
-                               this.pass1.setValid(false);\r
-                               this.pass2.setValid(false);\r
-                               this.setValid(false);                           \r
-                       }else{\r
-                               this.pass1.setValid(true);\r
-                               this.pass2.setValid(true); \r
-                               this.setValid(true);\r
-                       }\r
-                       return this.getValid();\r
-               },\r
-               setEditMode : function(editMode){return true;}          \r
-       }\r
-});
\ No newline at end of file
diff --git a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/components/SimpleUserNatureImpl.js b/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/components/SimpleUserNatureImpl.js
deleted file mode 100644 (file)
index 8f3b94c..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-qx.Class.define("org.argeo.security.ria.components.SimpleUserNatureImpl", {\r
-       extend : qx.ui.container.Composite,\r
-       implement : [org.argeo.security.ria.components.INaturePane],\r
-       events : {\r
-               "modified" : "qx.event.type.Event"              \r
-       },\r
-       statics : {\r
-               NATURE_TYPE : "org.argeo.security.nature.SimpleUserNature",\r
-               NATURE_LABEL : "Simple User",\r
-               NATURE_ICON : "",\r
-               NATURE_RANK     : 0             \r
-       },\r
-       properties : {\r
-               valid : {\r
-                       init : false\r
-               },\r
-               dataMap : {\r
-                       \r
-               },\r
-               editMode : {\r
-                       init : true,\r
-                       apply : "_applyEditMode",\r
-                       event : "changeEditMode"\r
-               },\r
-               isNew   : {\r
-                       init : false,\r
-                       check : "Boolean"\r
-               }               \r
-       },\r
-       \r
-       construct : function(){\r
-               this.base(arguments);   \r
-               this.setDataMap({\r
-                       type:"org.argeo.security.nature.SimpleUserNature"\r
-               });\r
-               this._createGui();\r
-               this.setEditMode(false);                \r
-       },\r
-               \r
-       members : {             \r
-               \r
-               _createGui : function(){\r
-                       var grid = new qx.ui.layout.Grid(5,5);\r
-                       this.setLayout(grid);\r
-                       grid.setColumnFlex(0,1);\r
-                       grid.setColumnAlign(0,"right", "middle");\r
-                       grid.setColumnFlex(1,3);\r
-                                       \r
-                       this.mailField = new qx.ui.form.TextField();\r
-                       this.fNameField = new qx.ui.form.TextField();\r
-                       this.nameField = new qx.ui.form.TextField();\r
-                       this.descriptionField = new qx.ui.form.TextArea();\r
-                       \r
-                       var labels = ["Email", "First Name", "Last Name", "Description"]; \r
-                       this.fields = {\r
-                               "email" : this.mailField, \r
-                               "firstName": this.fNameField, \r
-                               "lastName" : this.nameField,\r
-                               "description" : this.descriptionField\r
-                       };\r
-                       \r
-                       for(var i=0;i<labels.length;i++){\r
-                               this.add(new qx.ui.basic.Label(labels[i]), {row:i,column:0});\r
-                       }\r
-                       var j=0;\r
-                       for(var key in this.fields){                    \r
-                               this.fields[key].addListener("changeValue", function(e){this.fireEvent("modified");}, this);\r
-                               this.add(this.fields[key], {row:j,column:1});\r
-                               j++;\r
-                       }       \r
-               },\r
-               \r
-               _applyEditMode : function(value){\r
-                       for(var key in this.fields){\r
-                               if(value && this.fields[key].getReadOnly && this.fields[key].getReadOnly()) continue;\r
-                               this.fields[key].setEnabled(value);                             \r
-                       }\r
-               },\r
-               \r
-               getContainer  : function(){\r
-                       return this;\r
-               },\r
-               setData    : function(dataMap, format){\r
-                       for(var key in this.fields){\r
-                               if(dataMap[key]){\r
-                                       if(qx.Class.hasInterface(qx.Class.getByName(this.fields[key].classname), qx.ui.form.IModelSelection)){\r
-                                               this.fields[key].setModelSelection([dataMap[key]]);\r
-                                       }else{\r
-                                               this.fields[key].setValue(dataMap[key]);\r
-                                       }\r
-                               }\r
-                       }\r
-                       this.setDataMap(dataMap);\r
-               },\r
-               getData    : function(format){\r
-                       var dataMap = this.getDataMap();\r
-                       for(var key in this.fields){\r
-                               if(qx.Class.hasInterface(qx.Class.getByName(this.fields[key].classname), qx.ui.form.IModelSelection)){\r
-                                       var sel = this.fields[key].getModelSelection();\r
-                                       if(sel && qx.lang.Type.isArray(sel)) dataMap[key] = sel[0];                                     \r
-                               }else{\r
-                                       dataMap[key] = this.fields[key].getValue();\r
-                               }\r
-                       }\r
-                       this.setDataMap(dataMap);\r
-                       return dataMap;\r
-               },\r
-               validate : function(){return true;}\r
-       }\r
-});
\ No newline at end of file
diff --git a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/components/UserEditor.js b/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/components/UserEditor.js
deleted file mode 100644 (file)
index 0af8bfd..0000000
+++ /dev/null
@@ -1,388 +0,0 @@
-/**
- * A simple Hello World applet for documentation purpose. 
- * The only associated command is the "Close" command.
- */
-/* *************************************************
-#asset(resource/org/argeo/security/ria/*)
-****************************************************/
-qx.Class.define("org.argeo.security.ria.components.UserEditor",
-{
-  extend : qx.ui.container.Composite,
-  
-  construct : function(){
-       this.base(arguments);
-       this.setLayout(new qx.ui.layout.VBox(5));
-  },
-  
-  events : {
-       "savedUser" : "qx.event.type.Data"
-  },
-  
-  properties : 
-  {
-       selfEdition : {
-               init : false
-       },
-       modified : {
-               init : false,
-               apply : "_applyDetailsModified"
-       },
-       naturesModified : {
-               init : false,
-               apply : "_applyNaturesModified"
-       },
-       rolesList : {
-               
-       },
-       loaded : {
-               init : false
-       },
-       currentNatureTabs : {           
-       },
-       naturesManager : { 
-               check : "org.argeo.security.ria.components.NaturesManager"
-       },
-       selectedNatureTab : {   
-               nullable : true
-       },
-       currentUser : {
-       }
-  },
-
-  members :
-  {
-       initGUI : function(ROLES_LIST){
-
-               var naturesManager = new org.argeo.security.ria.components.NaturesManager();
-               this.setNaturesManager(naturesManager);
-               
-               // TOOLBAR
-               this.buttonGB = new qx.ui.container.Composite(new qx.ui.layout.HBox(5, "right"));
-               this.add(this.buttonGB);
-               
-               this.setCurrentNatureTabs([]);
-               this.naturesTab = new qx.ui.tabview.TabView("top");
-               this.naturesTab.addListener("changeSelection", function(e){
-                       this.setSelectedNatureTab(e.getData()[0] || null);
-               }, this);
-               
-               this.basicPage = new qx.ui.tabview.Page("Basic Information");
-               this.basicPage.setLayout(new qx.ui.layout.VBox(5));
-               
-               // GROUPBOXES
-               
-               this.basicGB = new qx.ui.groupbox.GroupBox("Base Informations");
-               var grid = new qx.ui.layout.Grid(5,5);
-               this.basicGB.setLayout(grid);
-               grid.setColumnFlex(0,1);
-               grid.setColumnAlign(0,"right", "middle");
-               grid.setColumnFlex(1,2);
-               this._initializeGroupBox(this.basicGB);
-                               
-               this.passGB = new qx.ui.groupbox.GroupBox("Set/Modify Password");
-               this.passGB.setLayout(new qx.ui.layout.VBox());
-               this._initializeGroupBox(this.passGB);
-
-               this.add(this.basicGB);
-               this.add(this.passGB);
-               
-               // FIELDS
-               this.usernameField = new qx.ui.form.TextField();
-               this.basicGB.add(new qx.ui.basic.Label("Username"), {row:0,column:0});                  
-               this.basicGB.add(this.usernameField, {row:0,column:1});
-               
-               this.rolesField = new org.argeo.ria.components.ui.MultipleComboBox();
-               if(ROLES_LIST){
-                       this.rolesField.setChoiceValues(ROLES_LIST);
-               }
-               this.basicGB.add(new qx.ui.basic.Label("Roles"), {row:1,column:0});             
-               this.basicGB.add(this.rolesField, {row:1,column:1});
-               
-               this.passPane = new org.argeo.security.ria.components.PasswordCredentialImpl(this.getSelfEdition());
-               this.passGB.add(this.passPane.getContainer());
-               
-               //this.naturesTab.add(this.basicPage);
-               this.natureButtonGB = new qx.ui.container.Composite(new qx.ui.layout.HBox(5, "right"));
-               this.natureButtonGB.setMarginTop(15);
-               this.add(this.natureButtonGB);
-               
-       
-               this.add(this.naturesTab, {flex:1});
-               
-               this.naturesTab.setVisibility("excluded");
-               this.fakePane = new qx.ui.container.Composite(new qx.ui.layout.Canvas());
-               this.fakePane.setVisibility("visible");
-               this.fakePane.setDecorator("tabview-pane");
-               this.fakePane.setMarginTop(30);
-               this.add(this.fakePane, {flex:1});
-               
-               title = new qx.ui.basic.Atom("User Details", "org/argeo/security/ria/preferences-users.png");
-               title.setFont(qx.bom.Font.fromString("16px sans-serif bold"));                  
-               this.buttonGB.add(title);
-               this.buttonGB.add(new qx.ui.core.Spacer(), {flex:1});
-
-               var title2 = new qx.ui.basic.Atom("User Natures", "org/argeo/security/ria/identity.png");
-               title2.setFont(qx.bom.Font.fromString("16px sans-serif bold"));                 
-               this.natureButtonGB.add(title2);
-               this.natureButtonGB.add(new qx.ui.core.Spacer(), {flex:1});             
-               
-                                       
-       },
-       
-       saveUser : function(){
-               var user = this.getCurrentUser();
-               if(this.basicGB.getVisibility()!= "excluded"){
-                       user.setName(this.usernameField.getValue());
-                       var roles = this.rolesField.getValue();
-                       if(roles && roles != ""){
-                               user.setRoles(roles.split(","));
-                       }else{
-                               user.setRoles([]);
-                       }
-               }
-               
-               // GO TO AND RETURN FROM SERVER
-               if(user.isCreate()){
-                       if(!this.passPane.validate()){
-                               this.error("Warning, passwords differ!");
-                               return;
-                       }
-                       user.setPassword(this.passPane.getData());
-                       var create = true;
-                       var userExists = false;
-                       var req = org.argeo.security.ria.SecurityAPI.getUserExistsService(user.getName());
-                       req.addListener("completed", function(response){
-                               userExists = response.getContent().value;
-                       }, this);
-                       req.setAsynchronous(false);
-                       req.send();
-                       if(userExists){
-                               this.error("User already exists, choose another name!");
-                               return;
-                       }
-               }else{
-                       var pass = this.passPane.getData();
-                       if(pass != null && !this.passPane.validate()){
-                               this.error("Warning, passwords differ!");
-                               return;                                 
-                       }                       
-               }
-               this.passPane.clear();
-               var saveCompletedCallback = qx.lang.Function.bind(function(){
-                       this._setGuiInCreateMode(false);
-                       this.partialRefreshUser(user, ["details","natures"]);
-                       this.setModified(false);
-                       this.fireDataEvent("savedUser", user);                          
-               }, this);
-               var userService = user.getSaveService(this.getSelfEdition());
-               userService.addListener("completed", function(response){
-                       if(response.getContent().status && response.getContent().status == "ERROR"){
-                               return;
-                       }
-                       user.load(response.getContent(), "json");
-                       if(pass!=null){
-                               var passService;
-                               if(!this.getSelfEdition()){
-                                       passService = org.argeo.security.ria.SecurityAPI.getUpdateUserPassService(user.getName(), pass);
-                               }else{
-                                       passService = org.argeo.security.ria.SecurityAPI.getUpdatePassService(pass.oldPass, pass.newPass);
-                               }
-                               passService.addListener("completed", function(response){
-                                       if(response.getContent().status != "ERROR"){
-                                               this.info(response.getContent().message);
-                                       }
-                                       saveCompletedCallback();
-                               }, this);
-                               passService.send();
-                       }else{
-                               saveCompletedCallback();
-                       }
-               }, this);               
-               userService.send();
-       },
-       
-       _addNatureTab : function(natureClass, natureData, select){
-               var crtTabs = this.getCurrentNatureTabs();
-               if(qx.lang.Array.contains(crtTabs, natureClass.NATURE_TYPE)){
-                       this.error("There can only be one instance of a given nature type!");
-                       return null;
-               }
-               if(!this.naturesTab.isVisible()){
-                       if(this.fakePane) this.fakePane.setVisibility("excluded");
-                       this.naturesTab.setVisibility("visible");
-               }
-               var page = new qx.ui.tabview.Page("Nature : " + natureClass.NATURE_LABEL);
-               page.setLayout(new qx.ui.layout.Dock());
-               page.setUserData("NATURE_CLASS", natureClass);
-               var newClass = new natureClass();
-               page.add(new qx.ui.container.Scroll(newClass.getContainer()), {edge:"center"});
-               
-               buttons = new qx.ui.container.Composite(new qx.ui.layout.HBox(5, "center"));
-               var editB = new qx.ui.form.Button("Edit this Nature", "org/argeo/security/ria/document-properties-22.png");
-               var saveB = new qx.ui.form.Button("Save", "org/argeo/security/ria/dialog-apply.png");
-               var cancelB = new qx.ui.form.Button("Cancel", "org/argeo/security/ria/dialog-cancel.png");
-               buttons.add(editB);
-               buttons.add(saveB);
-               buttons.add(cancelB);
-               page.add(buttons, {edge:"south"});
-               editB.addListener("execute", function(){
-                       newClass.setEditMode(true);
-                       editB.setVisibility("excluded");
-                       saveB.setVisibility("visible");
-                       cancelB.setVisibility("visible");
-               });
-               cancelB.addListener("execute", function(){
-                       if(newClass.getIsNew()){
-                               this._removeNatureTab(natureClass);
-                       }
-                       newClass.setEditMode(false);
-                       editB.setVisibility("visible");
-                       saveB.setVisibility("excluded");
-                       cancelB.setVisibility("excluded");
-               }, this);
-               saveB.addListener("execute", function(){
-                       // SAVE CURRENT NATURE
-                       var data = newClass.getData();
-                       if(newClass.getIsNew()){
-                               this.getCurrentUser().addNature(data);
-                       }else{
-                               this.getCurrentUser().updateNature(data);
-                       }
-                       this.saveUser();
-                       this.setNaturesModified(false);
-                       newClass.setEditMode(false);
-                       editB.setVisibility("visible");
-                       saveB.setVisibility("excluded");
-                       cancelB.setVisibility("excluded");
-               }, this);
-               if(natureData){
-                       newClass.setData(natureData);                   
-                       cancelB.execute();
-               }else{
-                       newClass.setIsNew(true);
-                       editB.execute();
-               }
-               this.naturesTab.add(page);
-               crtTabs.push(natureClass.NATURE_TYPE);
-               newClass.addListener("modified", function(){
-                       this.setNaturesModified(true);
-               }, this);  
-               if(select){
-                       this.naturesTab.setSelection([page]);
-               }
-               return page;
-       },
-       
-       _removeNatureTab : function(natureClass){
-               this.naturesTab.getChildren().forEach(function(el){
-                       if(el.getUserData("NATURE_CLASS") == natureClass){
-                               this.naturesTab.remove(el);
-                               qx.lang.Array.remove(this.getCurrentNatureTabs(), natureClass.NATURE_TYPE);
-                       }
-               }, this);
-               if(this.naturesTab.getChildren().length == 0){
-                       this.naturesTab.setVisibility("excluded");
-                       this.fakePane.setVisibility("visible");
-               }
-       },
-       
-       removeSelectedTab : function(){
-               if(this.naturesTab.isSelectionEmpty()) return;
-               var selected = this.naturesTab.getSelection()[0];
-               var tabClass = selected.getUserData("NATURE_CLASS");
-               var user = this.getCurrentUser();
-               user.removeNature(tabClass.NATURE_TYPE);
-               this.saveUser();
-               this._removeNatureTab(tabClass);
-       },
-       
-       removeAllTabs : function(){
-               while(!this.naturesTab.isSelectionEmpty()){
-                       this._removeNatureTab(this.naturesTab.getSelection()[0].getUserData("NATURE_CLASS"));
-               }
-       },
-         
-       _setGuiInCreateMode : function(bool){
-               if(bool){
-                       if(!this.natureButtonGB.isVisible()) return;
-                       this.natureButtonGB.hide();
-                       this.fakePane.setVisibility("excluded");
-               }else{                          
-                       if(this.natureButtonGB.isVisible()) return;
-                       this.natureButtonGB.show();
-                       this.fakePane.setVisibility("visible");
-               }
-       },
-       
-       _attachListeners : function(){
-               this.usernameField.addListener("changeValue", function(){
-                       this.setModified(true);
-               }, this);
-               this.rolesField.addListener("changeValue", function(){
-                       this.setModified(true);
-               }, this);
-               this.passPane.addListener("modified", function(){
-                       this.setModified(true);
-               }, this);
-       },
-       
-       _initializeGroupBox: function(groupBox){
-               groupBox.setPadding(0);
-               groupBox.getChildrenContainer().setPadding(8);                  
-       },
-       
-       loadUserData : function(userName){
-               var userDataService = org.argeo.security.ria.SecurityAPI.getUserDetailsService(userName);
-               userDataService.addListener("completed", function(response){
-                       var user = new org.argeo.security.ria.model.User();
-                       user.load(response.getContent(), "json");                       
-                       this.setCurrentUser(user);
-                       this.usernameField.setValue(user.getName());
-                       this.usernameField.setReadOnly(true);
-                       this.rolesField.setValue(user.getRoles());
-                       var userNatureTabs = this.getNaturesManager().detectNaturesInData(user.getNatures());
-                       if(userNatureTabs.length){
-                               userNatureTabs.forEach(function(el){
-                                       this._addNatureTab(el.NATURE_CLASS, el.NATURE_DATA);
-                               }, this);
-                       }       
-                       this._attachListeners();                        
-               }, this);
-               userDataService.send();
-       },
-       
-       clearUserData : function(){
-               this.usernameField.setValue("");
-               this.rolesField.setValue([]);
-               this.removeAllTabs();
-       },
-       
-       partialRefreshUser : function(user, target){
-               if(!qx.lang.Type.isArray(target)) target = [target];
-               
-               if(qx.lang.Array.contains(target,"natures")){
-                       if(this.getSelectedNatureTab()){
-                               var selectedTab = this.getSelectedNatureTab().getUserData("NATURE_CLASS");
-                       }
-                       this.removeAllTabs();
-                       var userNatureTabs = this.getNaturesManager().detectNaturesInData(user.getNatures());
-                       if(userNatureTabs.length){
-                               userNatureTabs.forEach(function(el){
-                                       this._addNatureTab(el.NATURE_CLASS, el.NATURE_DATA, (selectedTab && selectedTab == el.NATURE_CLASS));
-                               }, this);
-                       }                       
-               }
-               if(qx.lang.Array.contains(target,"details")){
-                       this.usernameField.setValue(user.getName());
-                       this.rolesField.setValue(user.getRoles());  
-                       this.usernameField.setReadOnly(true);
-                       this.fireEvent("saveUser");
-               }
-       },
-       
-       _applyDetailsModified : function(value){},
-       
-       _applyNaturesModified : function(value){}       
-               
-  }
-});
\ No newline at end of file
diff --git a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/components/UserEditorPrefPane.js b/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/components/UserEditorPrefPane.js
deleted file mode 100644 (file)
index 382e994..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-qx.Class.define("org.argeo.security.ria.components.UserEditorPrefPane", {\r
-\r
-       extend : org.argeo.security.ria.components.UserEditor,\r
-       implement : [org.argeo.ria.components.IPreferencePane],\r
-         \r
-       construct : function(){\r
-               this.base(arguments);\r
-               this.setSelfEdition(true);\r
-               this.initGUI();         \r
-               this.basicGB.setVisibility("excluded");\r
-               var saveButton = new qx.ui.form.Button("Save", "org/argeo/security/ria/document-save.png");\r
-               saveButton.addListener("execute", this.saveUser, this);\r
-               this.buttonGB.add(saveButton);\r
-               var authService = org.argeo.ria.session.AuthService.getInstance();\r
-               this.loadUserData(authService.getUser());\r
-               authService.addListener("changeUser", function(){\r
-                       if(authService.getUser() == "anonymous"){\r
-                               this.clearUserData();\r
-                       }else{\r
-                               this.loadUserData(authService.getUser());\r
-                       }\r
-               }, this);\r
-       },\r
-       \r
-       members : {\r
-               // IPrefPane Implementation\r
-               getPrefPane : function(){                       \r
-                       return new qx.ui.container.Scroll(this);\r
-               },\r
-               \r
-               getPrefLabel : function(){\r
-                       return "User data";\r
-               },\r
-               \r
-               getPrefIcon : function(){\r
-                       return "org/argeo/security/ria/preferences-users.png";\r
-               }                       \r
-       }\r
-});
\ No newline at end of file
diff --git a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/model/Nature.js b/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/model/Nature.js
deleted file mode 100644 (file)
index 981476b..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-qx.Class.define("org.argeo.security.ria.model.Nature", {\r
-       extend : qx.core.Object,\r
-       properties : {\r
-               type : {\r
-                       check : "String"\r
-               },\r
-               data : {\r
-                       check : "Map"\r
-               }\r
-       },\r
-       construct : function(){\r
-               this.base(arguments);\r
-       },\r
-       members : {\r
-               load : function(data, format){\r
-                       this.setData(data);\r
-               }\r
-       }       \r
-});
\ No newline at end of file
diff --git a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/model/User.js b/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/model/User.js
deleted file mode 100644 (file)
index c518535..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-qx.Class.define("org.argeo.security.ria.model.User", {\r
-       extend : qx.core.Object,\r
-       properties : {\r
-               name : {\r
-                       init : "",\r
-                       check : "String"\r
-               },\r
-               password : {\r
-                       nullable : true,\r
-                       check : "String"\r
-               },\r
-               roles : {\r
-                       check : "Array"\r
-               },\r
-               natures :{\r
-                       check : "Array"\r
-               },\r
-               rawData : {\r
-                       \r
-               },\r
-               create : {\r
-                       check : "Boolean",\r
-                       init : true\r
-               }\r
-       },\r
-       construct : function(){\r
-               this.base(arguments);\r
-               this.setRoles([]);\r
-               this.setNatures([]);\r
-               this.setRawData({password:null});\r
-       },\r
-       members : {\r
-               load : function(data, format){\r
-                       this.setCreate(false);\r
-                       this.setName(data.username);\r
-                       this.setRoles(data.roles);\r
-                       this.setNatures(data.userNatures);\r
-                       this.setRawData(data);\r
-               },\r
-               getSaveService : function(self){\r
-                       if(this.isCreate()){\r
-                               var userService = org.argeo.security.ria.SecurityAPI.getCreateUserService(this.toJSON(true));                   \r
-                       }else{\r
-                               var userService = org.argeo.security.ria.SecurityAPI.getUpdateUserService(this.toJSON(), self);                         \r
-                       }\r
-                       userService.addListener("completed", function(response){\r
-                               if(!response || !response.username) return;\r
-                               this.load(response.getContent(), "json");\r
-                       }, this);\r
-                       return userService;                     \r
-               },\r
-               toJSON : function(create){\r
-                       var rawData = this.getRawData();\r
-                       rawData.username = this.getName();\r
-                       rawData.roles = this.getRoles();\r
-                       rawData.userNatures = this.getNatures();\r
-                       if(create) rawData.password = this.getPassword();\r
-                       return rawData;\r
-               },\r
-               _getNatureByType : function(natureType){\r
-                       var found = false;\r
-                       this.getNatures().forEach(function(el){\r
-                               if(el.type == natureType){\r
-                                       found = el;\r
-                               }\r
-                       });             \r
-                       return found;\r
-               },\r
-               addNature : function(nature){\r
-                       if(this._getNatureByType(nature.type)){\r
-                               return;\r
-                       }\r
-                       this.getNatures().push(nature);\r
-               },\r
-               removeNature : function(natureType){\r
-                       var foundNature = this._getNatureByType(natureType)\r
-                       if(foundNature){\r
-                               qx.lang.Array.remove(this.getNatures(), foundNature);\r
-                       }\r
-               },\r
-               updateNature : function(nature){\r
-                       var natures = this.getNatures();\r
-                       for(var i=0;i<natures;i++){\r
-                               if(natures[i].type == nature.type){\r
-                                       natures[i] = nature;\r
-                               }\r
-                       }\r
-               }\r
-       }\r
-       \r
-});
\ No newline at end of file
diff --git a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/dialog-apply.png b/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/dialog-apply.png
deleted file mode 100644 (file)
index a3ae536..0000000
Binary files a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/dialog-apply.png and /dev/null differ
diff --git a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/dialog-cancel.png b/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/dialog-cancel.png
deleted file mode 100644 (file)
index df093e9..0000000
Binary files a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/dialog-cancel.png and /dev/null differ
diff --git a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/document-properties-22.png b/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/document-properties-22.png
deleted file mode 100644 (file)
index 4a94ed9..0000000
Binary files a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/document-properties-22.png and /dev/null differ
diff --git a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/document-properties.png b/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/document-properties.png
deleted file mode 100644 (file)
index f309924..0000000
Binary files a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/document-properties.png and /dev/null differ
diff --git a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/document-save.png b/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/document-save.png
deleted file mode 100644 (file)
index 09f2d75..0000000
Binary files a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/document-save.png and /dev/null differ
diff --git a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/go-next.png b/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/go-next.png
deleted file mode 100644 (file)
index 9065e55..0000000
Binary files a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/go-next.png and /dev/null differ
diff --git a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/identity.png b/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/identity.png
deleted file mode 100644 (file)
index 69abedd..0000000
Binary files a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/identity.png and /dev/null differ
diff --git a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/list-add.png b/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/list-add.png
deleted file mode 100644 (file)
index 0478b7d..0000000
Binary files a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/list-add.png and /dev/null differ
diff --git a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/list-remove.png b/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/list-remove.png
deleted file mode 100644 (file)
index bebd233..0000000
Binary files a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/list-remove.png and /dev/null differ
diff --git a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/preferences-security.png b/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/preferences-security.png
deleted file mode 100644 (file)
index e9428c5..0000000
Binary files a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/preferences-security.png and /dev/null differ
diff --git a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/preferences-users.png b/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/preferences-users.png
deleted file mode 100644 (file)
index 53f3a28..0000000
Binary files a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/preferences-users.png and /dev/null differ
diff --git a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/view-refresh.png b/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/view-refresh.png
deleted file mode 100644 (file)
index bb3803b..0000000
Binary files a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/view-refresh.png and /dev/null differ
diff --git a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/window-close.png b/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/window-close.png
deleted file mode 100644 (file)
index d4f4814..0000000
Binary files a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/resource/org/argeo/security/ria/window-close.png and /dev/null differ
diff --git a/security/runtime/org.argeo.security.ria/src/index.jsp b/security/runtime/org.argeo.security.ria/src/index.jsp
deleted file mode 100644 (file)
index ef8da03..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<%@ page language="java" contentType="text/html"%>\r
-<%\r
-response.sendRedirect("argeo-ria/index.html");\r
-%>\r
index 9ecd07c06f03a0cb00e0af8bfe44360b945df83f..cd8ead702ed53a817fe71a84198943d0bbf68717 100644 (file)
@@ -13,7 +13,6 @@
        <packaging>pom</packaging>
        <modules>
                <module>org.argeo.security.core</module>
-<!--           <module>org.argeo.security.mvc</module> -->
                <module>org.argeo.security.ldap</module>
                <module>org.argeo.security.activemq</module>
                <module>org.argeo.security.jackrabbit</module>
                        </plugin>
                </plugins>
        </build>
-       <profiles>
-               <profile>
-                       <id>withRia</id>
-                       <activation>
-                               <activeByDefault>true</activeByDefault>
-                       </activation>
-                       <modules>
-<!--                           <module>org.argeo.security.ria</module> -->
-                       </modules>
-               </profile>
-               <profile>
-                       <id>withoutRia</id>
-               </profile>
-       </profiles>
-
 </project>
\ No newline at end of file