You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2013/03/27 11:24:30 UTC

svn commit: r1461503 [1/3] - in /syncope/trunk: ./ archetype/src/main/resources/archetype-resources/console/ archetype/src/main/resources/archetype-resources/core/ build-tools/ build-tools/src/main/java/org/apache/syncope/buildtools/ build-tools/src/ma...

Author: ilgrosso
Date: Wed Mar 27 10:24:29 2013
New Revision: 1461503

URL: http://svn.apache.org/r1461503
Log:
[SYNCOPE-137] Major changes in ConnId management: wiki page about new configuration options follows

Added:
    syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/ConnIdStartStopListener.java   (with props)
    syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/validation/entity/ConnInstanceCheck.java   (with props)
    syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/validation/entity/ConnInstanceValidator.java   (with props)
    syncope/trunk/core/src/test/java/org/apache/syncope/core/init/ConnectorManagerTest.java
      - copied, changed from r1460576, syncope/trunk/core/src/test/java/org/apache/syncope/core/init/ConnInstanceLoaderTest.java
Removed:
    syncope/trunk/core/src/test/java/org/apache/syncope/core/init/ConnInstanceLoaderTest.java
Modified:
    syncope/trunk/archetype/src/main/resources/archetype-resources/console/pom.xml
    syncope/trunk/archetype/src/main/resources/archetype-resources/core/pom.xml
    syncope/trunk/build-tools/pom.xml
    syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/ApacheDSStartStopListener.java
    syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/H2StartStopListener.java
    syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/ServiceTimeoutServlet.java
    syncope/trunk/build-tools/src/main/webapp/WEB-INF/web.xml
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnBundleTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnInstanceTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/EntityViolationType.java
    syncope/trunk/console/pom.xml
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ConnectorModalPage.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Resources.java
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnectorModalPage.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnectorModalPage.properties
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnectorModalPage_it.properties
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Resources.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Users.html
    syncope/trunk/core/src/main/java/org/apache/syncope/core/init/ConnectorManager.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/ConnInstance.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/ConnectorFacadeProxy.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/ConnInstanceController.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/ConnInstanceDataBinder.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/SchemaDataBinder.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/util/ConnIdBundleManager.java
    syncope/trunk/core/src/main/resources/connid.properties
    syncope/trunk/core/src/main/resources/logback.xml
    syncope/trunk/core/src/test/java/org/apache/syncope/core/AbstractTest.java
    syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/ConnInstanceTest.java
    syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/ConnInstanceTestITCase.java
    syncope/trunk/core/src/test/resources/connid.properties
    syncope/trunk/core/src/test/resources/content.xml
    syncope/trunk/pom.xml
    syncope/trunk/standalone/pom.xml
    syncope/trunk/standalone/src/main/resources/README

Modified: syncope/trunk/archetype/src/main/resources/archetype-resources/console/pom.xml
URL: http://svn.apache.org/viewvc/syncope/trunk/archetype/src/main/resources/archetype-resources/console/pom.xml?rev=1461503&r1=1461502&r2=1461503&view=diff
==============================================================================
--- syncope/trunk/archetype/src/main/resources/archetype-resources/console/pom.xml (original)
+++ syncope/trunk/archetype/src/main/resources/archetype-resources/console/pom.xml Wed Mar 27 10:24:29 2013
@@ -106,30 +106,10 @@ under the License.
     </dependency>
     <dependency>
       <groupId>org.connid.bundles.soap</groupId>
-      <artifactId>org.connid.bundles.soap</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.connid.bundles.soap</groupId>
       <artifactId>wssample</artifactId>
       <type>war</type>
       <scope>test</scope>
     </dependency>
-    <dependency>
-      <groupId>org.connid.bundles.db</groupId>
-      <artifactId>org.connid.bundles.db.table</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.connid.bundles</groupId>
-      <artifactId>org.connid.bundles.csvdir</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.connid.bundles</groupId>
-      <artifactId>org.connid.bundles.ldap</artifactId>
-      <scope>test</scope>
-    </dependency>
     <!-- /TEST -->    
   </dependencies>
 

Modified: syncope/trunk/archetype/src/main/resources/archetype-resources/core/pom.xml
URL: http://svn.apache.org/viewvc/syncope/trunk/archetype/src/main/resources/archetype-resources/core/pom.xml?rev=1461503&r1=1461502&r2=1461503&view=diff
==============================================================================
--- syncope/trunk/archetype/src/main/resources/archetype-resources/core/pom.xml (original)
+++ syncope/trunk/archetype/src/main/resources/archetype-resources/core/pom.xml Wed Mar 27 10:24:29 2013
@@ -81,31 +81,11 @@ under the License.
     </dependency>
     <dependency>
       <groupId>org.connid.bundles.soap</groupId>
-      <artifactId>org.connid.bundles.soap</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.connid.bundles.soap</groupId>
       <artifactId>wssample</artifactId>
       <type>war</type>
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>org.connid.bundles.db</groupId>
-      <artifactId>org.connid.bundles.db.table</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.connid.bundles</groupId>
-      <artifactId>org.connid.bundles.csvdir</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.connid.bundles</groupId>
-      <artifactId>org.connid.bundles.ldap</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
       <scope>test</scope>

Modified: syncope/trunk/build-tools/pom.xml
URL: http://svn.apache.org/viewvc/syncope/trunk/build-tools/pom.xml?rev=1461503&r1=1461502&r2=1461503&view=diff
==============================================================================
--- syncope/trunk/build-tools/pom.xml (original)
+++ syncope/trunk/build-tools/pom.xml Wed Mar 27 10:24:29 2013
@@ -81,6 +81,27 @@ under the License.
     </dependency>
 
     <dependency>
+      <groupId>org.connid</groupId>
+      <artifactId>connid-framework</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.connid</groupId>
+      <artifactId>connid-framework-internal</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.codehaus.groovy</groupId>
+      <artifactId>groovy-all</artifactId>
+    </dependency>
+      
+    <dependency>
+      <groupId>org.connid.bundles.db</groupId>
+      <artifactId>org.connid.bundles.db.table</artifactId>
+      <version>${connid.db.table.version}</version>
+      <scope>runtime</scope>
+    </dependency>
+      
+    <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-api</artifactId>
       <version>1.5.6</version>
@@ -104,7 +125,7 @@ under the License.
   </dependencies>
 
   <build>
-    <plugins>
+    <plugins>      
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-war-plugin</artifactId>
@@ -131,10 +152,12 @@ under the License.
         <inherited>true</inherited>
         <configuration>
           <container>
-            <containerId>jetty6x</containerId>
-            <type>embedded</type>
-            <log>${cargo.log}</log>
-            <output>${cargo.output}</output>
+            <dependencies>
+              <dependency>
+                <groupId>com.h2database</groupId>
+                <artifactId>h2</artifactId>
+              </dependency>
+            </dependencies>
           </container>
           <configuration>
             <properties>

Modified: syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/ApacheDSStartStopListener.java
URL: http://svn.apache.org/viewvc/syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/ApacheDSStartStopListener.java?rev=1461503&r1=1461502&r2=1461503&view=diff
==============================================================================
--- syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/ApacheDSStartStopListener.java (original)
+++ syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/ApacheDSStartStopListener.java Wed Mar 27 10:24:29 2013
@@ -44,6 +44,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.schema.loader.ldif.LdifSchemaLoader;
 import org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager;
 import org.apache.directory.shared.ldap.schema.registries.SchemaLoader;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Start and stop an embedded ApacheDS instance alongside with Servlet Context.
@@ -52,6 +54,11 @@ import org.apache.directory.shared.ldap.
  */
 public class ApacheDSStartStopListener implements ServletContextListener {
 
+    /**
+     * Logger.
+     */
+    private static final Logger LOG = LoggerFactory.getLogger(ApacheDSStartStopListener.class);
+
     private DirectoryService service;
 
     private LdapServer server;
@@ -176,7 +183,7 @@ public class ApacheDSStartStopListener i
         final LdifURLLoader contentLoader = new LdifURLLoader(service.getAdminSession(),
                 servletContext.getResource("/WEB-INF/classes/content.ldif"));
         final int numEntries = contentLoader.execute();
-        servletContext.log("Successfully created " + numEntries + " entries");
+        LOG.info("Successfully created {} entries", numEntries);
     }
 
     /**
@@ -197,8 +204,8 @@ public class ApacheDSStartStopListener i
             initDirectoryService(sce.getServletContext(), workDir);
 
             server = new LdapServer();
-            server.setTransports(new TcpTransport(Integer.valueOf(sce.getServletContext().getInitParameter(
-                    "testds.port"))));
+            server.setTransports(
+                    new TcpTransport(Integer.valueOf(sce.getServletContext().getInitParameter("testds.port"))));
             server.setDirectoryService(service);
 
             server.start();
@@ -208,14 +215,14 @@ public class ApacheDSStartStopListener i
 
             result = service.getAdminSession().lookup(new DN("o=isp"));
         } catch (Exception e) {
-            sce.getServletContext().log("Fatal error in context init", e);
+            LOG.error("Fatal error in context init", e);
             throw new RuntimeException(e);
         }
 
         if (result == null) {
             throw new RuntimeException("Base DN not found");
         } else {
-            sce.getServletContext().log("ApacheDS startup completed succesfully");
+            LOG.info("ApacheDS startup completed succesfully");
         }
     }
 
@@ -234,7 +241,7 @@ public class ApacheDSStartStopListener i
                 service.shutdown();
             }
         } catch (Exception e) {
-            scEvent.getServletContext().log("Fatal error in context shutdown", e);
+            LOG.error("Fatal error in context shutdown", e);
             throw new RuntimeException(e);
         }
     }

Added: syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/ConnIdStartStopListener.java
URL: http://svn.apache.org/viewvc/syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/ConnIdStartStopListener.java?rev=1461503&view=auto
==============================================================================
--- syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/ConnIdStartStopListener.java (added)
+++ syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/ConnIdStartStopListener.java Wed Mar 27 10:24:29 2013
@@ -0,0 +1,103 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.buildtools;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import org.identityconnectors.common.security.SecurityUtil;
+import org.identityconnectors.framework.impl.api.local.ThreadClassLoaderManager;
+import org.identityconnectors.framework.server.ConnectorServer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ConnIdStartStopListener implements ServletContextListener {
+
+    /**
+     * Logger.
+     */
+    private static final Logger LOG = LoggerFactory.getLogger(ConnIdStartStopListener.class);
+
+    private static final String SERVER = "ConnIdConnectorServer";
+
+    /**
+     * Build list of URLs from bundles available under /WEB-INF/lib
+     *
+     * @param ctx ServletContext needed for getting ConnId jar bundles URLs
+     */
+    private List<URL> getBundleURLs(final ServletContext ctx) {
+        final List<URL> bundleURLs = new ArrayList<URL>();
+
+        for (String bundleFile : new String[] {
+            "testconnectorserver.soap.bundle",
+            "testconnectorserver.db.bundle",
+            "testconnectorserver.csvdir.bundle",
+            "testconnectorserver.ldap.bundle"}) {
+
+            URL url = null;
+            try {
+                url = ctx.getResource("/WEB-INF/lib/" + ctx.getInitParameter(bundleFile));
+            } catch (MalformedURLException e) {
+                // ignore
+            }
+            if (url != null) {
+                bundleURLs.add(url);
+            }
+        }
+
+        LOG.info("ConnId bundles loaded: " + bundleURLs);
+
+        return bundleURLs;
+    }
+
+    @Override
+    public void contextInitialized(final ServletContextEvent sce) {
+        final ConnectorServer _server = ConnectorServer.newInstance();
+
+        try {
+            _server.setPort(Integer.parseInt(
+                    sce.getServletContext().getInitParameter("testconnectorserver.port")));
+
+            _server.setBundleURLs(getBundleURLs(sce.getServletContext()));
+
+            _server.setKeyHash(SecurityUtil.computeBase64SHA1Hash(
+                    sce.getServletContext().getInitParameter("testconnectorserver.key").toCharArray()));
+
+            _server.start();
+            LOG.info("ConnId connector server listening on port " + _server.getPort());
+        } catch (Exception e) {
+            LOG.error("Could not start ConnId connector server", e);
+        }
+
+        sce.getServletContext().setAttribute(SERVER, _server);
+    }
+
+    @Override
+    public void contextDestroyed(final ServletContextEvent sce) {
+        final ConnectorServer _server = (ConnectorServer) sce.getServletContext().getAttribute(SERVER);
+        if (_server != null && _server.isStarted()) {
+            _server.stop();
+        }
+        ThreadClassLoaderManager.clearInstance();
+    }
+}

Propchange: syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/ConnIdStartStopListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/ConnIdStartStopListener.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/ConnIdStartStopListener.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/H2StartStopListener.java
URL: http://svn.apache.org/viewvc/syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/H2StartStopListener.java?rev=1461503&r1=1461502&r2=1461503&view=diff
==============================================================================
--- syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/H2StartStopListener.java (original)
+++ syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/H2StartStopListener.java Wed Mar 27 10:24:29 2013
@@ -34,7 +34,7 @@ import org.springframework.web.context.W
 import org.springframework.web.context.support.WebApplicationContextUtils;
 
 /**
- * Utility serlvet context listener managing H2 test server instance (to be used as external resource).
+ * Utility servlet context listener managing H2 test server instance (to be used as external resource).
  */
 public class H2StartStopListener implements ServletContextListener {
 

Modified: syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/ServiceTimeoutServlet.java
URL: http://svn.apache.org/viewvc/syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/ServiceTimeoutServlet.java?rev=1461503&r1=1461502&r2=1461503&view=diff
==============================================================================
--- syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/ServiceTimeoutServlet.java (original)
+++ syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/ServiceTimeoutServlet.java Wed Mar 27 10:24:29 2013
@@ -30,6 +30,8 @@ import javax.servlet.http.HttpServletRes
  */
 public class ServiceTimeoutServlet extends HttpServlet {
 
+    private static final long serialVersionUID = -1467488672392710293L;
+
     /**
      * Processes requests for both HTTP
      * <code>GET</code> and
@@ -40,8 +42,9 @@ public class ServiceTimeoutServlet exten
      * @throws ServletException if a servlet-specific error occurs
      * @throws IOException if an I/O error occurs
      */
-    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
+    protected void processRequest(final HttpServletRequest request, final HttpServletResponse response)
             throws ServletException, IOException {
+
         response.setContentType("text/html;charset=UTF-8");
 
         try {
@@ -51,7 +54,6 @@ public class ServiceTimeoutServlet exten
         }
 
         final PrintWriter out = response.getWriter();
-
         try {
             out.println("OK");
         } finally {
@@ -69,8 +71,9 @@ public class ServiceTimeoutServlet exten
      * @throws IOException if an I/O error occurs
      */
     @Override
-    protected void doGet(HttpServletRequest request, HttpServletResponse response)
+    protected void doGet(final HttpServletRequest request, final HttpServletResponse response)
             throws ServletException, IOException {
+
         processRequest(request, response);
     }
 
@@ -84,8 +87,9 @@ public class ServiceTimeoutServlet exten
      * @throws IOException if an I/O error occurs
      */
     @Override
-    protected void doPost(HttpServletRequest request, HttpServletResponse response)
+    protected void doPost(final HttpServletRequest request, final HttpServletResponse response)
             throws ServletException, IOException {
+
         processRequest(request, response);
     }
 

Modified: syncope/trunk/build-tools/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/syncope/trunk/build-tools/src/main/webapp/WEB-INF/web.xml?rev=1461503&r1=1461502&r2=1461503&view=diff
==============================================================================
--- syncope/trunk/build-tools/src/main/webapp/WEB-INF/web.xml (original)
+++ syncope/trunk/build-tools/src/main/webapp/WEB-INF/web.xml Wed Mar 27 10:24:29 2013
@@ -16,44 +16,73 @@ software distributed under the License i
 KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
-
 -->
-<web-app version="2.5" 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">
-    <context-param>
-        <param-name>testds.port</param-name>
-        <param-value>${testds.port}</param-value>
-    </context-param>
-    <context-param>
-        <param-name>testdb.webport</param-name>
-        <param-value>${testdb.webport}</param-value>
-    </context-param>
-    <context-param>
-        <param-name>contextConfigLocation</param-name>
-        <param-value>classpath*:/*Context.xml</param-value>
-    </context-param>
-    <listener>
-        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
-    </listener>
-    <listener>
-        <listener-class>org.apache.syncope.buildtools.ApacheDSStartStopListener</listener-class>
-    </listener>
-    <listener>
-        <listener-class>org.apache.syncope.buildtools.H2StartStopListener</listener-class>
-    </listener>
-    <servlet>
-        <servlet-name>ApacheDSRootDseServlet</servlet-name>
-        <servlet-class>org.apache.syncope.buildtools.ApacheDSRootDseServlet</servlet-class>
-    </servlet>
-    <servlet>
-        <servlet-name>ServiceTimeoutServlet</servlet-name>
-        <servlet-class>org.apache.syncope.buildtools.ServiceTimeoutServlet</servlet-class>
-    </servlet>
-    <servlet-mapping>
-        <servlet-name>ApacheDSRootDseServlet</servlet-name>
-        <url-pattern>/apacheDS</url-pattern>
-    </servlet-mapping>
-    <servlet-mapping>
-        <servlet-name>ServiceTimeoutServlet</servlet-name>
-        <url-pattern>/services/*</url-pattern>
-    </servlet-mapping>
+<web-app version="2.5" 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">
+  <context-param>
+    <param-name>testds.port</param-name>
+    <param-value>${testds.port}</param-value>
+  </context-param>
+  <context-param>
+    <param-name>testdb.webport</param-name>
+    <param-value>${testdb.webport}</param-value>
+  </context-param>
+  <context-param>
+    <param-name>testconnectorserver.port</param-name>
+    <param-value>${testconnectorserver.port}</param-value>
+  </context-param>
+  <context-param>
+    <param-name>testconnectorserver.key</param-name>
+    <param-value>${testconnectorserver.key}</param-value>
+  </context-param>
+  <context-param>
+    <param-name>testconnectorserver.soap.bundle</param-name>
+    <param-value>org.connid.bundles.soap-${connid.soap.version}.jar</param-value>
+  </context-param>
+  <context-param>
+    <param-name>testconnectorserver.db.bundle</param-name>
+    <param-value>org.connid.bundles.db.table-${connid.db.table.version}.jar</param-value>
+  </context-param>
+  <context-param>
+    <param-name>testconnectorserver.csvdir.bundle</param-name>
+    <param-value>org.connid.bundles.csvdir-${connid.csvdir.version}.jar</param-value>
+  </context-param>
+  <context-param>
+    <param-name>testconnectorserver.ldap.bundle</param-name>
+    <param-value>org.connid.bundles.ldap-${connid.ldap.version}.jar</param-value>
+  </context-param>
+  <context-param>
+    <param-name>contextConfigLocation</param-name>
+    <param-value>classpath*:/*Context.xml</param-value>
+  </context-param>
+  <listener>
+    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+  </listener>
+  <listener>
+    <listener-class>org.apache.syncope.buildtools.ApacheDSStartStopListener</listener-class>
+  </listener>
+  <listener>
+    <listener-class>org.apache.syncope.buildtools.H2StartStopListener</listener-class>
+  </listener>
+  <listener>
+    <listener-class>org.apache.syncope.buildtools.ConnIdStartStopListener</listener-class>
+  </listener>
+  <servlet>
+    <servlet-name>ApacheDSRootDseServlet</servlet-name>
+    <servlet-class>org.apache.syncope.buildtools.ApacheDSRootDseServlet</servlet-class>
+  </servlet>
+  <servlet>
+    <servlet-name>ServiceTimeoutServlet</servlet-name>
+    <servlet-class>org.apache.syncope.buildtools.ServiceTimeoutServlet</servlet-class>
+  </servlet>
+  <servlet-mapping>
+    <servlet-name>ApacheDSRootDseServlet</servlet-name>
+    <url-pattern>/apacheDS</url-pattern>
+  </servlet-mapping>
+  <servlet-mapping>
+    <servlet-name>ServiceTimeoutServlet</servlet-name>
+    <url-pattern>/services/*</url-pattern>
+  </servlet-mapping>
 </web-app>

Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnBundleTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnBundleTO.java?rev=1461503&r1=1461502&r2=1461503&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnBundleTO.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnBundleTO.java Wed Mar 27 10:24:29 2013
@@ -37,14 +37,32 @@ public class ConnBundleTO extends Abstra
 
     private String displayName;
 
-    private String bundleName;
+    private String location;
 
-    private String version;
+    private String bundleName;
 
     private String connectorName;
 
+    private String version;
+
     private List<ConnConfPropSchema> properties = new ArrayList<ConnConfPropSchema>();
 
+    public String getDisplayName() {
+        return displayName;
+    }
+
+    public void setDisplayName(final String displayName) {
+        this.displayName = displayName;
+    }
+
+    public String getLocation() {
+        return location;
+    }
+
+    public void setLocation(final String location) {
+        this.location = location;
+    }
+
     public String getBundleName() {
         return bundleName;
     }
@@ -61,20 +79,20 @@ public class ConnBundleTO extends Abstra
         this.connectorName = connectorName;
     }
 
-    public String getDisplayName() {
-        return displayName;
-    }
-
-    public void setDisplayName(final String displayName) {
-        this.displayName = displayName;
-    }
-
     @XmlElementWrapper(name = "properties")
     @XmlElement(name = "connConfPropSchema")
     public List<ConnConfPropSchema> getProperties() {
         return properties;
     }
 
+    public String getVersion() {
+        return version;
+    }
+
+    public void setVersion(final String version) {
+        this.version = version;
+    }
+
     public void setProperties(final List<ConnConfPropSchema> properties) {
         this.properties = properties;
     }
@@ -86,12 +104,4 @@ public class ConnBundleTO extends Abstra
     public boolean removeProperty(final ConnConfPropSchema property) {
         return properties.remove(property);
     }
-
-    public String getVersion() {
-        return version;
-    }
-
-    public void setVersion(final String version) {
-        this.version = version;
-    }
 }

Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnInstanceTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnInstanceTO.java?rev=1461503&r1=1461502&r2=1461503&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnInstanceTO.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnInstanceTO.java Wed Mar 27 10:24:29 2013
@@ -41,12 +41,14 @@ public class ConnInstanceTO extends Abst
 
     private long id;
 
+    private String location;
+
+    private String connectorName;
+
     private String bundleName;
 
     private String version;
 
-    private String connectorName;
-
     private final Set<ConnConfProperty> configuration;
 
     private final Set<ConnectorCapability> capabilities;
@@ -70,11 +72,27 @@ public class ConnInstanceTO extends Abst
         this.id = id;
     }
 
+    public String getLocation() {
+        return location;
+    }
+
+    public void setLocation(final String location) {
+        this.location = location;
+    }
+
+    public String getConnectorName() {
+        return connectorName;
+    }
+
+    public void setConnectorName(final String connectorname) {
+        this.connectorName = connectorname;
+    }
+
     public String getBundleName() {
         return bundleName;
     }
 
-    public void setBundleName(String bundlename) {
+    public void setBundleName(final String bundlename) {
         this.bundleName = bundlename;
     }
 
@@ -82,8 +100,8 @@ public class ConnInstanceTO extends Abst
         return version;
     }
 
-    public void setVersion(String bundleversion) {
-        this.version = bundleversion;
+    public void setVersion(final String version) {
+        this.version = version;
     }
 
     @XmlElementWrapper(name = "configuration")
@@ -97,7 +115,7 @@ public class ConnInstanceTO extends Abst
         Map<String, ConnConfProperty> result;
 
         if (getConfiguration() == null) {
-            result = Collections.emptyMap();
+            result = Collections.<String, ConnConfProperty>emptyMap();
         } else {
             result = new HashMap<String, ConnConfProperty>();
             for (ConnConfProperty prop : getConfiguration()) {
@@ -109,15 +127,15 @@ public class ConnInstanceTO extends Abst
         return result;
     }
 
-    public boolean addConfiguration(ConnConfProperty property) {
+    public boolean addConfiguration(final ConnConfProperty property) {
         return this.configuration.add(property);
     }
 
-    public boolean removeConfiguration(ConnConfProperty property) {
+    public boolean removeConfiguration(final ConnConfProperty property) {
         return this.configuration.remove(property);
     }
 
-    public void setConfiguration(Set<ConnConfProperty> configuration) {
+    public void setConfiguration(final Set<ConnConfProperty> configuration) {
         if (this.configuration != configuration) {
             this.configuration.clear();
             if (configuration != null && !configuration.isEmpty()) {
@@ -126,19 +144,11 @@ public class ConnInstanceTO extends Abst
         }
     }
 
-    public String getConnectorName() {
-        return connectorName;
-    }
-
-    public void setConnectorName(String connectorname) {
-        this.connectorName = connectorname;
-    }
-
-    public boolean addCapability(ConnectorCapability capability) {
+    public boolean addCapability(final ConnectorCapability capability) {
         return capabilities.add(capability);
     }
 
-    public boolean removeCapability(ConnectorCapability capability) {
+    public boolean removeCapability(final ConnectorCapability capability) {
         return capabilities.remove(capability);
     }
 
@@ -161,7 +171,7 @@ public class ConnInstanceTO extends Abst
         return displayName;
     }
 
-    public void setDisplayName(String displayName) {
+    public void setDisplayName(final String displayName) {
         this.displayName = displayName;
     }
 
@@ -179,7 +189,7 @@ public class ConnInstanceTO extends Abst
      *
      * @param timeout.
      */
-    public void setConnRequestTimeout(Integer connRequestTimeout) {
+    public void setConnRequestTimeout(final Integer connRequestTimeout) {
         this.connRequestTimeout = connRequestTimeout;
     }
 }

Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/EntityViolationType.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/types/EntityViolationType.java?rev=1461503&r1=1461502&r2=1461503&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/EntityViolationType.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/EntityViolationType.java Wed Mar 27 10:24:29 2013
@@ -26,6 +26,7 @@ public enum EntityViolationType {
     Standard(""),
     InvalidAccountPolicy("org.apache.syncope.core.validation.accountpolicy"),
     InvalidEntitlementName("org.apache.syncope.core.validation.entitlement.name"),
+    InvalidConnInstanceLocation("org.apache.syncope.core.validation.conninstance.location"),
     InvalidMapping("org.apache.syncope.core.validation.mapping"),
     InvalidMSchema("org.apache.syncope.core.validation.attrvalue.mSchema"),
     InvalidMDerSchema("org.apache.syncope.core.validation.attrvalue.mDerSchema"),

Modified: syncope/trunk/console/pom.xml
URL: http://svn.apache.org/viewvc/syncope/trunk/console/pom.xml?rev=1461503&r1=1461502&r2=1461503&view=diff
==============================================================================
--- syncope/trunk/console/pom.xml (original)
+++ syncope/trunk/console/pom.xml Wed Mar 27 10:24:29 2013
@@ -151,30 +151,10 @@ under the License.
     </dependency>
     <dependency>
       <groupId>org.connid.bundles.soap</groupId>
-      <artifactId>org.connid.bundles.soap</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.connid.bundles.soap</groupId>
       <artifactId>wssample</artifactId>
       <type>war</type>
       <scope>test</scope>
     </dependency>
-    <dependency>
-      <groupId>org.connid.bundles.db</groupId>
-      <artifactId>org.connid.bundles.db.table</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.connid.bundles</groupId>
-      <artifactId>org.connid.bundles.csvdir</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.connid.bundles</groupId>
-      <artifactId>org.connid.bundles.ldap</artifactId>
-      <scope>test</scope>
-    </dependency>
     <!-- /TEST -->
   </dependencies>
 

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ConnectorModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ConnectorModalPage.java?rev=1461503&r1=1461502&r2=1461503&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ConnectorModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ConnectorModalPage.java Wed Mar 27 10:24:29 2013
@@ -18,6 +18,7 @@
  */
 package org.apache.syncope.console.pages;
 
+import static org.apache.wicket.Component.ENABLE;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
@@ -26,6 +27,7 @@ import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
+import org.apache.commons.lang.ArrayUtils;
 import org.apache.commons.lang.StringUtils;
 import org.apache.syncope.common.to.ConnBundleTO;
 import org.apache.syncope.common.to.ConnInstanceTO;
@@ -81,95 +83,193 @@ public class ConnectorModalPage extends 
     // GuardedByteArray is not in classpath
     private static final String GUARDED_BYTE_ARRAY = "org.identityconnectors.common.security.GuardedByteArray";
 
-    private static final List<Class> NUMBER = Arrays.asList(new Class[]{Integer.class, Double.class, Long.class,
-                Float.class, Number.class, Integer.TYPE, Long.TYPE, Double.TYPE, Float.TYPE});
+    private static final Class[] NUMBER = {Integer.class, Double.class, Long.class,
+        Float.class, Number.class, Integer.TYPE, Long.TYPE, Double.TYPE, Float.TYPE};
 
     @SpringBean
     private ConnectorRestClient restClient;
 
-    private CheckBoxMultipleChoice<ConnectorCapability> capabilitiesPalette;
+    private final Map<String, Map<String, Map<String, ConnBundleTO>>> mapConnBundleTOs;
 
-    private WebMarkupContainer propertiesContainer;
-
-    private List<ConnectorCapability> selectedCapabilities;
+    private final List<ConnectorCapability> selectedCapabilities;
 
     private ConnBundleTO bundleTO;
 
     private List<ConnConfProperty> properties;
 
-    public ConnectorModalPage(final PageReference pageRef, final ModalWindow window, final ConnInstanceTO connectorTO) {
-        super();
+    private final WebMarkupContainer propertiesContainer;
 
-        selectedCapabilities = new ArrayList<ConnectorCapability>(connectorTO.getId() == 0
-                ? EnumSet.noneOf(ConnectorCapability.class)
-                : connectorTO.getCapabilities());
+    public ConnectorModalPage(final PageReference pageRef, final ModalWindow window,
+            final ConnInstanceTO connInstanceTO) {
 
-        final IModel<List<ConnectorCapability>> capabilities =
-                new LoadableDetachableModel<List<ConnectorCapability>>() {
+        super();
 
-                    private static final long serialVersionUID = 5275935387613157437L;
+        // general data setup
 
-                    @Override
-                    protected List<ConnectorCapability> load() {
-                        return Arrays.asList(ConnectorCapability.values());
-                    }
-                };
+        selectedCapabilities = new ArrayList<ConnectorCapability>(connInstanceTO.getId() == 0
+                ? EnumSet.noneOf(ConnectorCapability.class)
+                : connInstanceTO.getCapabilities());
 
-        final Map<String, Map<String, ConnBundleTO>> mapConnBundleTO = new HashMap<String, Map<String, ConnBundleTO>>();
+        mapConnBundleTOs = new HashMap<String, Map<String, Map<String, ConnBundleTO>>>();
         for (ConnBundleTO connBundleTO : restClient.getAllBundles()) {
-            if (!mapConnBundleTO.containsKey(connBundleTO.getBundleName())) {
-                mapConnBundleTO.put(connBundleTO.getBundleName(), new HashMap<String, ConnBundleTO>());
+            // by location
+            if (!mapConnBundleTOs.containsKey(connBundleTO.getLocation())) {
+                mapConnBundleTOs.put(connBundleTO.getLocation(), new HashMap<String, Map<String, ConnBundleTO>>());
+            }
+            final Map<String, Map<String, ConnBundleTO>> byLocation = mapConnBundleTOs.get(connBundleTO.getLocation());
+
+            // by name
+            if (!byLocation.containsKey(connBundleTO.getBundleName())) {
+                byLocation.put(connBundleTO.getBundleName(), new HashMap<String, ConnBundleTO>());
             }
-            final Map<String, ConnBundleTO> bundleMap = mapConnBundleTO.get(connBundleTO.getBundleName());
-            if (!bundleMap.containsKey(connBundleTO.getVersion())) {
-                bundleMap.put(connBundleTO.getVersion(), connBundleTO);
+            final Map<String, ConnBundleTO> byName = byLocation.get(connBundleTO.getBundleName());
+
+            // by version
+            if (!byName.containsKey(connBundleTO.getVersion())) {
+                byName.put(connBundleTO.getVersion(), connBundleTO);
             }
         }
 
-        bundleTO = getSelectedBundleTO(mapConnBundleTO, connectorTO);
-        properties = fillProperties(bundleTO, connectorTO);
+        bundleTO = getSelectedBundleTO(connInstanceTO);
+        properties = fillProperties(bundleTO, connInstanceTO);
+
+        // form - first tab
+
+        final Form<ConnInstanceTO> connectorForm = new Form<ConnInstanceTO>("form");
+        connectorForm.setModel(new CompoundPropertyModel<ConnInstanceTO>(connInstanceTO));
+        connectorForm.setOutputMarkupId(true);
+        add(connectorForm);
+
+        propertiesContainer = new WebMarkupContainer("container");
+        propertiesContainer.setOutputMarkupId(true);
+        connectorForm.add(propertiesContainer);
+
+        final Form<ConnInstanceTO> connectorPropForm = new Form<ConnInstanceTO>("connectorPropForm");
+        connectorPropForm.setModel(new CompoundPropertyModel<ConnInstanceTO>(connInstanceTO));
+        connectorPropForm.setOutputMarkupId(true);
+        propertiesContainer.add(connectorPropForm);
 
         final AjaxTextFieldPanel displayName = new AjaxTextFieldPanel(
-                "displayName", "display name", new PropertyModel<String>(connectorTO, "displayName"));
+                "displayName", "display name", new PropertyModel<String>(connInstanceTO, "displayName"));
         displayName.setOutputMarkupId(true);
         displayName.addRequiredLabel();
+        connectorForm.add(displayName);
 
-        final AjaxDropDownChoicePanel<String> bundleName =
-                new AjaxDropDownChoicePanel<String>("connectorName", "connectorName",
-                new Model<String>(bundleTO != null ? bundleTO.getBundleName() : null));
-
-        ((DropDownChoice) bundleName.getField()).setNullValid(true);
+        final AjaxDropDownChoicePanel<String> location =
+                new AjaxDropDownChoicePanel<String>("location", "location",
+                new Model<String>(bundleTO == null ? null : bundleTO.getLocation()));
+        ((DropDownChoice) location.getField()).setNullValid(true);
+        location.setStyleSheet("long_dynamicsize");
+        location.setChoices(new ArrayList<String>(mapConnBundleTOs.keySet()));
+        location.setRequired(true);
+        location.addRequiredLabel();
+        location.setOutputMarkupId(true);
+        location.setEnabled(connInstanceTO.getId() == 0);
+        location.getField().setOutputMarkupId(true);
+        connectorForm.add(location);
 
-        bundleName.setStyleSheet("long_dynamicsize");
-        bundleName.setChoices(new ArrayList<String>(mapConnBundleTO.keySet()));
-        bundleName.setRequired(true);
-        bundleName.addRequiredLabel();
-        bundleName.setOutputMarkupId(true);
-        bundleName.setEnabled(connectorTO.getId() == 0);
-        bundleName.getField().setOutputMarkupId(true);
+        final AjaxDropDownChoicePanel<String> connectorName =
+                new AjaxDropDownChoicePanel<String>("connectorName", "connectorName",
+                new Model<String>(bundleTO == null ? null : bundleTO.getBundleName()));
+        ((DropDownChoice) connectorName.getField()).setNullValid(true);
+        connectorName.setStyleSheet("long_dynamicsize");
+        connectorName.setChoices(bundleTO == null
+                ? new ArrayList<String>()
+                : new ArrayList<String>(mapConnBundleTOs.get(connInstanceTO.getLocation()).keySet()));
+        connectorName.setRequired(true);
+        connectorName.addRequiredLabel();
+        connectorName.setEnabled(connInstanceTO.getLocation() != null);
+        connectorName.setOutputMarkupId(true);
+        connectorName.setEnabled(connInstanceTO.getId() == 0);
+        connectorName.getField().setOutputMarkupId(true);
+        connectorForm.add(connectorName);
 
         final AjaxDropDownChoicePanel<String> version =
                 new AjaxDropDownChoicePanel<String>("version", "version",
-                new Model<String>(bundleTO != null ? bundleTO.getVersion() : null));
-
+                new Model<String>(bundleTO == null ? null : bundleTO.getVersion()));
         version.setStyleSheet("long_dynamicsize");
-        version.setChoices(bundleTO != null
-                ? new ArrayList<String>(mapConnBundleTO.get(connectorTO.getBundleName()).keySet())
-                : new ArrayList<String>());
-
+        version.setChoices(bundleTO == null
+                ? new ArrayList<String>()
+                : new ArrayList<String>(mapConnBundleTOs.get(connInstanceTO.getLocation()).
+                get(connInstanceTO.getBundleName()).keySet()));
         version.setRequired(true);
         version.addRequiredLabel();
-        version.setEnabled(connectorTO != null && connectorTO.getBundleName() != null);
+        version.setEnabled(connInstanceTO.getBundleName() != null);
         version.setOutputMarkupId(true);
         version.addRequiredLabel();
         version.getField().setOutputMarkupId(true);
+        connectorForm.add(version);
 
         final AjaxTextFieldPanel connRequestTimeout = new AjaxTextFieldPanel(
                 "connRequestTimeout",
                 "connRequestTimeout",
-                new PropertyModel<String>(connectorTO, "connRequestTimeout"));
+                new PropertyModel<String>(connInstanceTO, "connRequestTimeout"));
+        connectorForm.add(connRequestTimeout);
+
+        // form - first tab - onchange()
+        location.getField().add(new AjaxFormComponentUpdatingBehavior("onchange") {
+
+            private static final long serialVersionUID = -1107858522700306810L;
 
-        final ListView<ConnConfProperty> view = new AltListView<ConnConfProperty>(
+            @Override
+            protected void onUpdate(final AjaxRequestTarget target) {
+                ((DropDownChoice) location.getField()).setNullValid(false);
+                connInstanceTO.setLocation(location.getModelObject());
+                target.add(location);
+
+                connectorName.setChoices(new ArrayList<String>(
+                        mapConnBundleTOs.get(location.getModelObject()).keySet()));
+                connectorName.setEnabled(true);
+                connectorName.getField().setModelValue(null);
+                target.add(connectorName);
+
+                version.setChoices(new ArrayList<String>());
+                version.getField().setModelValue(null);
+                version.setEnabled(false);
+                target.add(version);
+
+                properties.clear();
+                target.add(propertiesContainer);
+            }
+        });
+        connectorName.getField().add(new AjaxFormComponentUpdatingBehavior("onchange") {
+
+            private static final long serialVersionUID = -1107858522700306810L;
+
+            @Override
+            protected void onUpdate(final AjaxRequestTarget target) {
+                ((DropDownChoice) connectorName.getField()).setNullValid(false);
+                connInstanceTO.setBundleName(connectorName.getModelObject());
+                target.add(connectorName);
+
+                List<String> versions = new ArrayList<String>(
+                        mapConnBundleTOs.get(location.getModelObject()).get(connectorName.getModelObject()).keySet());
+                version.setChoices(versions);
+                version.setEnabled(true);
+                if (versions.size() == 1) {
+                    selectVersion(target, connInstanceTO, version, versions.get(0));
+                    version.getField().setModelObject(versions.get(0));
+                } else {
+                    version.getField().setModelValue(null);
+                    properties.clear();
+                    target.add(propertiesContainer);
+                }
+                target.add(version);
+            }
+        });
+        version.getField().add(new AjaxFormComponentUpdatingBehavior("onchange") {
+
+            private static final long serialVersionUID = -1107858522700306810L;
+
+            @Override
+            protected void onUpdate(final AjaxRequestTarget target) {
+                selectVersion(target, connInstanceTO, version, version.getModelObject());
+            }
+        });
+
+        // form - second tab (properties)
+
+        final ListView<ConnConfProperty> connPropView = new AltListView<ConnConfProperty>(
                 "connectorProperties", new PropertyModel<List<ConnConfProperty>>(this, "properties")) {
 
             private static final long serialVersionUID = 9101744072914090143L;
@@ -186,11 +286,8 @@ public class ConnectorModalPage extends 
                 item.add(label);
 
                 final FieldPanel field;
-
                 boolean required = false;
-
                 boolean isArray = false;
-
                 if (property.getSchema().isConfidential()
                         || GUARDED_STRING.equalsIgnoreCase(property.getSchema().getType())
                         || GUARDED_BYTE_ARRAY.equalsIgnoreCase(property.getSchema().getType())) {
@@ -201,7 +298,6 @@ public class ConnectorModalPage extends 
                     ((PasswordTextField) field.getField()).setResetPassword(false);
 
                     required = property.getSchema().isRequired();
-
                 } else {
                     Class<?> propertySchemaClass;
 
@@ -212,8 +308,7 @@ public class ConnectorModalPage extends 
                         LOG.error("Error parsing attribute type", e);
                         propertySchemaClass = String.class;
                     }
-
-                    if (NUMBER.contains(propertySchemaClass)) {
+                    if (ArrayUtils.contains(NUMBER, propertySchemaClass)) {
                         field = new AjaxNumberFieldPanel("panel",
                                 label.getDefaultModelObjectAsString(), new Model<Number>(),
                                 ClassUtils.resolvePrimitiveIfNecessary(propertySchemaClass));
@@ -256,58 +351,11 @@ public class ConnectorModalPage extends 
                         "connPropAttrOverridable", new PropertyModel<Boolean>(property, "overridable"));
 
                 item.add(overridable);
-                connectorTO.addConfiguration(property);
+                connInstanceTO.addConfiguration(property);
             }
         };
-
-        view.setOutputMarkupId(true);
-
-        bundleName.getField().add(new AjaxFormComponentUpdatingBehavior("onchange") {
-
-            private static final long serialVersionUID = -1107858522700306810L;
-
-            @Override
-            protected void onUpdate(final AjaxRequestTarget target) {
-                ((DropDownChoice) bundleName.getField()).setNullValid(false);
-                // reset all information stored in connectorTO
-                connectorTO.setConfiguration(new HashSet<ConnConfProperty>());
-                connectorTO.setBundleName(bundleName.getField().getModelObject().toString());
-                connectorTO.setVersion(null);
-                properties.clear();
-                version.setEnabled(connectorTO.getBundleName() != null);
-                version.getField().setModelValue(null);
-                List<String> choices = new ArrayList<String>(mapConnBundleTO.get(connectorTO.getBundleName()).keySet());
-                version.setChoices(choices);
-                if (choices.size() == 1) {
-                    connectorTO.setVersion(choices.get(0));
-                    version.getField().setModelObject(choices.get(0));
-                    connectorTO.setDisplayName(displayName.getModelObject());
-                    bundleTO = getSelectedBundleTO(mapConnBundleTO, connectorTO);
-                    properties = fillProperties(bundleTO, connectorTO);
-                }
-                target.add(bundleName);
-                target.add(version);
-                target.add(propertiesContainer);
-            }
-        });
-
-        version.getField().add(new AjaxFormComponentUpdatingBehavior("onchange") {
-
-            private static final long serialVersionUID = -1107858522700306810L;
-
-            @Override
-            protected void onUpdate(final AjaxRequestTarget target) {
-
-                connectorTO.setVersion(version.getField().getModelObject().toString());
-                connectorTO.setDisplayName(displayName.getModelObject());
-                bundleTO = getSelectedBundleTO(mapConnBundleTO, connectorTO);
-                properties.clear();
-                properties = fillProperties(bundleTO, connectorTO);
-                target.add(bundleName);
-                target.add(version);
-                target.add(propertiesContainer);
-            }
-        });
+        connPropView.setOutputMarkupId(true);
+        connectorPropForm.add(connPropView);
 
         final AjaxLink<String> check = new IndicatingAjaxLink<String>("check", new ResourceModel("check")) {
 
@@ -315,10 +363,10 @@ public class ConnectorModalPage extends 
 
             @Override
             public void onClick(final AjaxRequestTarget target) {
-                connectorTO.setBundleName(bundleTO.getBundleName());
-                connectorTO.setVersion(bundleTO.getVersion());
+                connInstanceTO.setBundleName(bundleTO.getBundleName());
+                connInstanceTO.setVersion(bundleTO.getVersion());
 
-                if (restClient.check(connectorTO)) {
+                if (restClient.check(connInstanceTO)) {
                     info(getString("success_connection"));
                 } else {
                     error(getString("error_connection"));
@@ -327,6 +375,26 @@ public class ConnectorModalPage extends 
                 target.add(feedbackPanel);
             }
         };
+        connectorPropForm.add(check);
+
+        // form - third tab (capabilities)
+
+        final IModel<List<ConnectorCapability>> capabilities =
+                new LoadableDetachableModel<List<ConnectorCapability>>() {
+
+            private static final long serialVersionUID = 5275935387613157437L;
+
+            @Override
+            protected List<ConnectorCapability> load() {
+                return Arrays.asList(ConnectorCapability.values());
+            }
+        };
+        CheckBoxMultipleChoice<ConnectorCapability> capabilitiesPalette =
+                new CheckBoxMultipleChoice<ConnectorCapability>("capabilitiesPalette",
+                new PropertyModel<List<ConnectorCapability>>(this, "selectedCapabilities"), capabilities);
+        connectorForm.add(capabilitiesPalette);
+
+        // form - submit / cancel buttons
 
         final AjaxButton submit = new IndicatingAjaxButton("apply", new Model<String>(getString("submit"))) {
 
@@ -336,17 +404,17 @@ public class ConnectorModalPage extends 
             protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
                 final ConnInstanceTO conn = (ConnInstanceTO) form.getModelObject();
 
+                conn.setConnectorName(bundleTO.getConnectorName());
                 conn.setBundleName(bundleTO.getBundleName());
                 conn.setVersion(bundleTO.getVersion());
-                conn.setConfiguration(new HashSet<ConnConfProperty>(view.getModelObject()));
+                conn.setConfiguration(new HashSet<ConnConfProperty>(connPropView.getModelObject()));
 
                 // Set the model object's capabilites to capabilitiesPalette's converted Set
                 conn.setCapabilities(selectedCapabilities.isEmpty()
                         ? EnumSet.noneOf(ConnectorCapability.class)
                         : EnumSet.copyOf(selectedCapabilities));
                 try {
-
-                    if (connectorTO.getId() == 0) {
+                    if (connInstanceTO.getId() == 0) {
                         restClient.create(conn);
                     } else {
                         restClient.update(conn);
@@ -368,6 +436,11 @@ public class ConnectorModalPage extends 
                 target.add(feedbackPanel);
             }
         };
+        String roles = connInstanceTO.getId() == 0
+                ? xmlRolesReader.getAllAllowedRoles("Connectors", "create")
+                : xmlRolesReader.getAllAllowedRoles("Connectors", "update");
+        MetaDataRoleAuthorizationStrategy.authorize(submit, ENABLE, roles);
+        connectorForm.add(submit);
 
         final IndicatingAjaxButton cancel = new IndicatingAjaxButton("cancel", new ResourceModel("cancel")) {
 
@@ -377,83 +450,40 @@ public class ConnectorModalPage extends 
             protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
                 window.close(target);
             }
-
-            @Override
-            protected void onError(final AjaxRequestTarget target, final Form<?> form) {
-            }
         };
-
         cancel.setDefaultFormProcessing(false);
-
-        String roles = connectorTO.getId() == 0
-                ? xmlRolesReader.getAllAllowedRoles("Connectors", "create")
-                : xmlRolesReader.getAllAllowedRoles("Connectors", "update");
-
-        MetaDataRoleAuthorizationStrategy.authorize(submit, ENABLE, roles);
-
-        capabilitiesPalette = new CheckBoxMultipleChoice<ConnectorCapability>("capabilitiesPalette",
-                new PropertyModel<List<ConnectorCapability>>(this,
-                "selectedCapabilities"), capabilities);
-
-        final Form<ConnInstanceTO> connectorForm = new Form<ConnInstanceTO>("form");
-        connectorForm.setModel(new CompoundPropertyModel<ConnInstanceTO>(connectorTO));
-        connectorForm.setOutputMarkupId(true);
-
-        final Form<ConnInstanceTO> connectorPropForm = new Form<ConnInstanceTO>("connectorPropForm");
-        connectorPropForm.setModel(new CompoundPropertyModel<ConnInstanceTO>(connectorTO));
-        connectorPropForm.setOutputMarkupId(true);
-
-        propertiesContainer = new WebMarkupContainer("container");
-        propertiesContainer.setOutputMarkupId(true);
-        propertiesContainer.add(connectorPropForm);
-
-        connectorForm.add(propertiesContainer);
-        connectorPropForm.add(view);
-        connectorPropForm.add(check);
-
-        connectorForm.add(bundleName);
-        connectorForm.add(displayName);
-        connectorForm.add(version);
-        connectorForm.add(connRequestTimeout);
-        connectorForm.add(capabilitiesPalette);
-        connectorForm.add(submit);
         connectorForm.add(cancel);
-        add(connectorForm);
     }
 
-    private ConnBundleTO getSelectedBundleTO(final Map<String, Map<String, ConnBundleTO>> bundles,
-            final ConnInstanceTO connTO) {
-
-        if (connTO != null && StringUtils.isNotBlank(connTO.getBundleName())
-                && StringUtils.isNotBlank(connTO.getVersion())) {
-
-            for (String bKey : bundles.keySet()) {
-                if (bKey.equals(connTO.getBundleName())) {
-                    for (String vKey : bundles.get(bKey).keySet()) {
-                        ConnBundleTO to = bundles.get(bKey).get(vKey);
-                        if (to.getVersion().equals(connTO.getVersion())) {
-                            connTO.setConnectorName(to.getConnectorName());
-                            connTO.setVersion(to.getVersion());
-                            return to;
-                        }
-                    }
+    private ConnBundleTO getSelectedBundleTO(final ConnInstanceTO connInstanceTO) {
+        ConnBundleTO result = null;
+        if (connInstanceTO != null
+                && StringUtils.isNotBlank(connInstanceTO.getLocation())
+                && StringUtils.isNotBlank(connInstanceTO.getBundleName())
+                && StringUtils.isNotBlank(connInstanceTO.getVersion())
+                && mapConnBundleTOs.containsKey(connInstanceTO.getLocation())) {
+
+            Map<String, Map<String, ConnBundleTO>> byLocation = mapConnBundleTOs.get(connInstanceTO.getLocation());
+            if (byLocation.containsKey(connInstanceTO.getBundleName())) {
+                Map<String, ConnBundleTO> byName = byLocation.get(connInstanceTO.getBundleName());
+                if (byName.containsKey(connInstanceTO.getVersion())) {
+                    result = byName.get(connInstanceTO.getVersion());
                 }
             }
         }
-        return null;
+        return result;
     }
 
-    private List<ConnConfProperty> fillProperties(final ConnBundleTO bundleTO, final ConnInstanceTO connTO) {
-
+    private List<ConnConfProperty> fillProperties(final ConnBundleTO bundleTO, final ConnInstanceTO connInstanceTO) {
         final List<ConnConfProperty> props = new ArrayList<ConnConfProperty>();
 
         if (bundleTO != null) {
             for (ConnConfPropSchema key : bundleTO.getProperties()) {
                 final ConnConfProperty propertyTO = new ConnConfProperty();
                 propertyTO.setSchema(key);
-                if (connTO.getId() != 0 && connTO.getConfigurationMap().containsKey(key.getName())) {
-                    propertyTO.setValues(connTO.getConfigurationMap().get(key.getName()).getValues());
-                    propertyTO.setOverridable(connTO.getConfigurationMap().get(key.getName()).isOverridable());
+                if (connInstanceTO.getId() != 0 && connInstanceTO.getConfigurationMap().containsKey(key.getName())) {
+                    propertyTO.setValues(connInstanceTO.getConfigurationMap().get(key.getName()).getValues());
+                    propertyTO.setOverridable(connInstanceTO.getConfigurationMap().get(key.getName()).isOverridable());
                 }
                 props.add(propertyTO);
             }
@@ -463,6 +493,17 @@ public class ConnectorModalPage extends 
         return props;
     }
 
+    private void selectVersion(final AjaxRequestTarget target, final ConnInstanceTO connInstanceTO,
+            final AjaxDropDownChoicePanel<String> version, final String versionValue) {
+
+        connInstanceTO.setVersion(versionValue);
+        target.add(version);
+
+        bundleTO = getSelectedBundleTO(connInstanceTO);
+        properties = fillProperties(bundleTO, connInstanceTO);
+        target.add(propertiesContainer);
+    }
+
     public List<ConnConfProperty> getProperties() {
         return properties;
     }

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Resources.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Resources.java?rev=1461503&r1=1461502&r2=1461503&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Resources.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Resources.java Wed Mar 27 10:24:29 2013
@@ -255,9 +255,8 @@ public class Resources extends BasePage 
 
                             resourceRestClient.delete(resourceTO.getName());
                             info(getString("operation_succeeded"));
-
                         } catch (SyncopeClientCompositeErrorException e) {
-                            error(getString("operation_error"));
+                            error(getString("error") + ":" + e.getMessage());
 
                             LOG.error("While deleting resource " + resourceTO.getName(), e);
                         }
@@ -276,7 +275,7 @@ public class Resources extends BasePage 
                 columns,
                 (ISortableDataProvider<ResourceTO, String>) new ResourcesProvider(),
                 resourcePaginatorRows,
-                Arrays.asList(new ActionLink.ActionType[]{ActionLink.ActionType.DELETE}),
+                Arrays.asList(new ActionLink.ActionType[] {ActionLink.ActionType.DELETE}),
                 resourceRestClient,
                 "name",
                 "Resources",
@@ -361,9 +360,9 @@ public class Resources extends BasePage 
         columns.add(new PropertyColumn(
                 new StringResourceModel("displayName", this, null), "displayName", "displayName"));
         columns.add(new PropertyColumn(
-                new StringResourceModel("version", this, null), "version", "version"));
-        columns.add(new PropertyColumn(
                 new StringResourceModel("bundleName", this, null), "bundleName", "bundleName"));
+        columns.add(new PropertyColumn(
+                new StringResourceModel("version", this, null), "version", "version"));
         columns.add(new AbstractColumn<ConnInstanceTO, String>(new StringResourceModel("actions", this, null, "")) {
 
             private static final long serialVersionUID = 2054811145491901166L;
@@ -412,7 +411,7 @@ public class Resources extends BasePage 
                             connectorRestClient.delete(connectorTO.getId());
                             info(getString("operation_succeeded"));
                         } catch (SyncopeClientCompositeErrorException e) {
-                            error(getString("operation_error"));
+                            error(getString("error") + ":" + e.getMessage());
 
                             LOG.error("While deleting connector " + connectorTO.getId(), e);
                         }
@@ -431,7 +430,7 @@ public class Resources extends BasePage 
                 columns,
                 (ISortableDataProvider<ConnInstanceTO, String>) new ConnectorsProvider(),
                 connectorPaginatorRows,
-                Arrays.asList(new ActionLink.ActionType[]{ActionLink.ActionType.DELETE}),
+                Arrays.asList(new ActionLink.ActionType[] {ActionLink.ActionType.DELETE}),
                 connectorRestClient,
                 "id",
                 "Connectors",

Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnectorModalPage.html
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnectorModalPage.html?rev=1461503&r1=1461502&r2=1461503&view=diff
==============================================================================
--- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnectorModalPage.html (original)
+++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnectorModalPage.html Wed Mar 27 10:24:29 2013
@@ -16,98 +16,110 @@ KIND, either express or implied.  See th
 specific language governing permissions and limitations
 under the License.
 -->
-<wicket:extend>
-  <p class="ui-widget ui-corner-all ui-widget-header"><wicket:message key="title"/></p>
-<div style="margin:10px">
-  <form wicket:id="form">
-    <div id="tabs">
-      <ul>
-        <li class="tabs-selected"><a href="#tabs-1"><span><wicket:message key="tab1"/></span></a></li>
-        <li><a href="#tabs-2"><span><wicket:message key="tab2"/></span></a></li>
-        <li><a href="#tabs-3"><span><wicket:message key="tab3"/></span></a></li>
-      </ul>
-      <div id="tabs-1">
-        <div id="formtable">
-          <div class="tablerow alt">
-            <div class="tablecolumn_label short_dynamicsize">
-              <label for="displayName"><wicket:message key="displayName"/></label>
-            </div>
-            <div class="tablecolumn_field short_dynamicsize">
-              <span wicket:id="displayName">[displayName]</span>
-            </div>
-          </div>
-
-          <div class="tablerow">
-            <div class="tablecolumn_label short_dynamicsize">
-              <label for="name"><wicket:message key="name"/></label>
-            </div>
-            <div class="tablecolumn_field medium_dynamicsize">
-              <span wicket:id="connectorName">[connectorName]</span>
-            </div>
-          </div>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+  <wicket:extend>
+    <p class="ui-widget ui-corner-all ui-widget-header"><wicket:message key="title"/></p>
+    <div style="margin:10px">
+      <form wicket:id="form">
+        <div id="tabs">
+          <ul>
+            <li class="tabs-selected"><a href="#tabs-1"><span><wicket:message key="tab1"/></span></a></li>
+            <li><a href="#tabs-2"><span><wicket:message key="tab2"/></span></a></li>
+            <li><a href="#tabs-3"><span><wicket:message key="tab3"/></span></a></li>
+          </ul>
+          <div id="tabs-1">
+            <div id="formtable">
+              <div class="tablerow alt">
+                <div class="tablecolumn_label short_dynamicsize">
+                  <label for="displayName"><wicket:message key="displayName"/></label>
+                </div>
+                <div class="tablecolumn_field short_dynamicsize">
+                  <span wicket:id="displayName">[displayName]</span>
+                </div>
+              </div>
 
-          <div class="tablerow alt">
-            <div class="tablecolumn_label short_dynamicsize">
-              <label for="version"><wicket:message key="version"/></label>
-            </div>
-            <div class="tablecolumn_field short_dynamicsize">
-              <span wicket:id="version">[version]</span>
-            </div>
-          </div>
-          <div class="tablerow">
-            <div class="tablecolumn_label short_dynamicsize">
-              <label for="connRequestTimeout"><wicket:message key="connRequestTimeout"/></label>
-            </div>
-            <div class="tablecolumn_field short_dynamicsize">
-              <span wicket:id="connRequestTimeout">[connRequestTimeout]</span>
-            </div>
-          </div>
-        </div>
-      </div>
-      <div id="tabs-2">
-        <div id="formtable">
-          <span wicket:id="container">
-            <div style="border-bottom: 10px">
-              <div style="width: 40px; text-align: center; font-size: 7px">
-                <label for="version"><wicket:message key="overridable"/></label>
+              <div class="tablerow">
+                <div class="tablecolumn_label short_dynamicsize">
+                  <label for="location"><wicket:message key="location"/></label>
+                </div>
+                <div class="tablecolumn_field short_dynamicsize">
+                  <span wicket:id="location">[location]</span>
+                </div>
               </div>
-            </div>
-            <form wicket:id="connectorPropForm">
-              <div class="tablerow" wicket:id="connectorProperties">
 
-                <div class="tablecolumn_check" style="width: 27px; text-align: center; margin-right: 10px">
-                  <span wicket:id="connPropAttrOverridable">[connPropAttrOverridable]</span>
+              <div class="tablerow alt">
+                <div class="tablecolumn_label short_dynamicsize">
+                  <label for="name"><wicket:message key="name"/></label>
+                </div>
+                <div class="tablecolumn_field medium_dynamicsize">
+                  <span wicket:id="connectorName">[connectorName]</span>
                 </div>
+              </div>
+
+              <div class="tablerow">
                 <div class="tablecolumn_label short_dynamicsize">
-                  <span wicket:id="connPropAttrSchema">[connPropAttrSchema]</span>
+                  <label for="version"><wicket:message key="version"/></label>
                 </div>
                 <div class="tablecolumn_field short_dynamicsize">
-                  <span wicket:id="panel">[panel]</span>
+                  <span wicket:id="version">[version]</span>
                 </div>
               </div>
-              <div>
-                <a style="position: absolute; top: 2px; right:20px;" wicket:id="check">
-                  <img src="img/ping.png"width="30" height="30"
-                       alt="ping" title="title" wicket:message="title:check"/>
-                </a>
+
+              <div class="tablerow alt">
+                <div class="tablecolumn_label short_dynamicsize">
+                  <label for="connRequestTimeout"><wicket:message key="connRequestTimeout"/></label>
+                </div>
+                <div class="tablecolumn_field short_dynamicsize">
+                  <span wicket:id="connRequestTimeout">[connRequestTimeout]</span>
+                </div>
               </div>
-            </form>
-          </span>
+            </div>
+          </div>
+          <div id="tabs-2">
+            <div id="formtable">
+              <span wicket:id="container">
+                <div style="border-bottom: 10px">
+                  <div style="width: 40px; text-align: center; font-size: 7px">
+                    <label for="version"><wicket:message key="overridable"/></label>
+                  </div>
+                </div>
+                <form wicket:id="connectorPropForm">
+                  <div class="tablerow" wicket:id="connectorProperties">
+
+                    <div class="tablecolumn_check" style="width: 27px; text-align: center; margin-right: 10px">
+                      <span wicket:id="connPropAttrOverridable">[connPropAttrOverridable]</span>
+                    </div>
+                    <div class="tablecolumn_label short_dynamicsize">
+                      <span wicket:id="connPropAttrSchema">[connPropAttrSchema]</span>
+                    </div>
+                    <div class="tablecolumn_field short_dynamicsize">
+                      <span wicket:id="panel">[panel]</span>
+                    </div>
+                  </div>
+                  <div>
+                    <a style="position: absolute; top: 2px; right:20px;" wicket:id="check">
+                      <img src="img/ping.png"width="30" height="30"
+                           alt="ping" title="title" wicket:message="title:check"/>
+                    </a>
+                  </div>
+                </form>
+              </span>
+            </div>
+          </div>
+          <div id="tabs-3">
+            <span wicket:id="capabilitiesPalette"/>
+          </div>
         </div>
-      </div>
-      <div id="tabs-3">
-        <span wicket:id="capabilitiesPalette"/>
-      </div>
-    </div>
 
-    <div style="margin: 20px 10px 0">
-      <input type="submit"
-             class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
-             wicket:id="apply"/>
-      <input type="button"
-             class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
-             wicket:id="cancel"/>
+        <div style="margin: 20px 10px 0">
+          <input type="submit"
+                 class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+                 wicket:id="apply"/>
+          <input type="button"
+                 class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+                 wicket:id="cancel"/>
+        </div>
+      </form>
     </div>
-  </form>
-</div>
-</wicket:extend>
+  </wicket:extend>
+</html>

Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnectorModalPage.properties
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnectorModalPage.properties?rev=1461503&r1=1461502&r2=1461503&view=diff
==============================================================================
--- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnectorModalPage.properties (original)
+++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnectorModalPage.properties Wed Mar 27 10:24:29 2013
@@ -34,3 +34,4 @@ value=Value
 success_connection=Successful connection
 error_connection=Connection failure
 check=Check connection
+location=Location

Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnectorModalPage_it.properties
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnectorModalPage_it.properties?rev=1461503&r1=1461502&r2=1461503&view=diff
==============================================================================
--- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnectorModalPage_it.properties (original)
+++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConnectorModalPage_it.properties Wed Mar 27 10:24:29 2013
@@ -34,3 +34,4 @@ value=Valore
 success_connection=Connessione avvenuta con successo
 error_connection=Connessione non riuscita
 check=Verifica connessione
+location=Posizione

Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Resources.html
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Resources.html?rev=1461503&r1=1461502&r2=1461503&view=diff
==============================================================================
--- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Resources.html (original)
+++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Resources.html Wed Mar 27 10:24:29 2013
@@ -16,66 +16,66 @@ KIND, either express or implied.  See th
 specific language governing permissions and limitations
 under the License.
 -->
-<wicket:extend>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+  <wicket:extend>
 
-  <div id="tabs">
-    <ul>
-      <li class="tabs-selected">
-        <a href="#tabs-1"><span><wicket:message key="tab1"/></span></a>
-      </li>
-      <li><a href="#tabs-2"><span><wicket:message key="tab2"/></span></a></li>
-    </ul>
-    <div id="tabs-1">
-      <div id="users-contain" class="ui-widget" style="width:inherit">
-        <span wicket:id="resourceContainer">
-          <span wicket:id="resourceDatatable">[resources]</span>
-        </span>
-
-        <span style="float:right">
-          <form wicket:id="resourcePaginatorForm" style="display:inline">
-            <label><wicket:message key="displayRows"/></label>
-            <select class="text ui-widget-content ui-corner-all"
-                    wicket:id="rowsChooser"/>
-          </form>
-        </span>
+    <div id="tabs">
+      <ul>
+        <li class="tabs-selected">
+          <a href="#tabs-1"><span><wicket:message key="tab1"/></span></a>
+        </li>
+        <li><a href="#tabs-2"><span><wicket:message key="tab2"/></span></a></li>
+      </ul>
+      <div id="tabs-1">
+        <div id="users-contain" class="ui-widget" style="width:inherit">
+          <span wicket:id="resourceContainer">
+            <span wicket:id="resourceDatatable">[resources]</span>
+          </span>
+
+          <span style="float:right">
+            <form wicket:id="resourcePaginatorForm" style="display:inline">
+              <label><wicket:message key="displayRows"/></label>
+              <select class="text ui-widget-content ui-corner-all" wicket:id="rowsChooser"/>
+            </form>
+          </span>
+        </div>
+
+        <div wicket:id="createResourceWin">[Show modal window for creating resource]</div>
+        <div wicket:id="editResourceWin">[Show modal window for editing resource]</div>
+
+        <a class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" wicket:id="createResourceLink">
+          <wicket:message key="create-resource"/>
+        </a>
       </div>
-
-      <div wicket:id="createResourceWin">[Show modal window for creating resource]</div>
-      <div wicket:id="editResourceWin">[Show modal window for editing resource]</div>
-
-      <a class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" wicket:id="createResourceLink">
-        <wicket:message key="create-resource"/>
-      </a>
-    </div>
-    <div id="tabs-2">
-      <div id="users-contain" class="ui-widget" style="width:inherit">
-        <span wicket:id="connectorContainer">
-          <span wicket:id="connectorDatatable">[connectors]</span>
-        </span>
-
-        <span style="float:right">
-          <form wicket:id="connectorPaginatorForm" style="display:inline">
-            <label><wicket:message key="displayRows"/></label>
-            <select class="text ui-widget-content ui-corner-all"
-                    wicket:id="rowsChooser"/>
-          </form>
-        </span>
+      <div id="tabs-2">
+        <div id="users-contain" class="ui-widget" style="width:inherit">
+          <span wicket:id="connectorContainer">
+            <span wicket:id="connectorDatatable">[connectors]</span>
+          </span>
+
+          <span style="float:right">
+            <form wicket:id="connectorPaginatorForm" style="display:inline">
+              <label><wicket:message key="displayRows"/></label>
+              <select class="text ui-widget-content ui-corner-all" wicket:id="rowsChooser"/>
+            </form>
+          </span>
+        </div>
+
+        <div wicket:id="createConnectorWin">[Show modal window for creating connector]</div>
+        <div wicket:id="editConnectorWin">[Show modal window for editing connector]</div>
+
+        <a class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" wicket:id="createConnectorLink">
+          <wicket:message key="create-connector"/>
+        </a>
       </div>
 
-      <div wicket:id="createConnectorWin">[Show modal window for creating connector]</div>
-      <div wicket:id="editConnectorWin">[Show modal window for editing connector]</div>
-
-      <a class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" wicket:id="createConnectorLink">
-        <wicket:message key="create-connector"/>
-      </a>
+      <div>
+        <a href="#" style="position: absolute; top: 4px; right:20px;" wicket:id="reloadLink">
+          <img src="img/reload_30.png" width="25" height="25"
+               alt="Reload connectors" title="title" wicket:message="title:reloadConnectors"/>
+        </a>
+      </div>    
     </div>
 
-    <div>
-      <a href="#" style="position: absolute; top: 4px; right:20px;" wicket:id="reloadLink">
-        <img src="img/reload_30.png" width="25" height="25"
-             alt="Reload connectors" title="title" wicket:message="title:reloadConnectors"/>
-      </a>
-    </div>    
-  </div>
-
-</wicket:extend>
\ No newline at end of file
+  </wicket:extend>
+</html>

Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Users.html
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Users.html?rev=1461503&r1=1461502&r2=1461503&view=diff
==============================================================================
--- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Users.html (original)
+++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Users.html Wed Mar 27 10:24:29 2013
@@ -16,55 +16,57 @@ KIND, either express or implied.  See th
 specific language governing permissions and limitations
 under the License.
 -->
-<wicket:extend>
-  <div id="tabs">
-    <ul>
-      <li class="tabs-selected">
-        <a href="#tabs-1">
-          <span><wicket:message key="tab1"/>
-          </span>
-        </a>
-      </li>
-      <li>
-        <a href="#tabs-2">
-          <span><wicket:message key="tab2"/>
-          </span>
-        </a>
-      </li>
-    </ul>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+  <wicket:extend>
+    <div id="tabs">
+      <ul>
+        <li class="tabs-selected">
+          <a href="#tabs-1">
+            <span><wicket:message key="tab1"/>
+            </span>
+          </a>
+        </li>
+        <li>
+          <a href="#tabs-2">
+            <span><wicket:message key="tab2"/>
+            </span>
+          </a>
+        </li>
+      </ul>
 
-    <div id="tabs-1">
-      <div id="users-contain" class="ui-widget" style="width:auto">
-        <span wicket:id="listResult"> [search result] </span>
-        <div wicket:id="editModal" ></div>
+      <div id="tabs-1">
+        <div id="users-contain" class="ui-widget" style="width:auto">
+          <span wicket:id="listResult"> [search result] </span>
+          <div wicket:id="editModal" ></div>
+        </div>
+
+        <a class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+           wicket:id="createLink">
+          <wicket:message key="create_user"/>
+        </a>
       </div>
 
-      <a class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
-         wicket:id="createLink">
-        <wicket:message key="create_user"/>
-      </a>
-    </div>
-
-    <div id="tabs-2">
-      <div>
-        <form wicket:id="searchForm">
-          <span wicket:id="searchPanel">searchPanel</span>
-
-          <br/>
-          <a wicket:id="search"
-             class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only">
-            <img src="img/search.png" alt="search"/>
-            <wicket:message key="search"/>
-          </a>
-        </form>
+      <div id="tabs-2">
+        <div>
+          <form wicket:id="searchForm">
+            <span wicket:id="searchPanel">searchPanel</span>
+
+            <br/>
+            <a wicket:id="search"
+               class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only">
+              <img src="img/search.png" alt="search"/>
+              <wicket:message key="search"/>
+            </a>
+          </form>
+        </div>
+
+        <div id="users-contain" class="ui-widget" style="width:auto">
+          <span wicket:id="searchResult">[search result]</span>
+        </div>
       </div>
 
-      <div id="users-contain" class="ui-widget" style="width:auto">
-        <span wicket:id="searchResult">[search result]</span>
-      </div>
     </div>
 
-  </div>
-
-  <wicket:child/>
-</wicket:extend>
+    <wicket:child/>
+  </wicket:extend>
+</html>

Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/init/ConnectorManager.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/init/ConnectorManager.java?rev=1461503&r1=1461502&r2=1461503&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/init/ConnectorManager.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/init/ConnectorManager.java Wed Mar 27 10:24:29 2013
@@ -18,7 +18,6 @@
  */
 package org.apache.syncope.core.init;
 
-import java.util.List;
 import java.util.Locale;
 import java.util.Set;
 import org.apache.commons.lang.SerializationUtils;
@@ -35,7 +34,6 @@ import org.apache.syncope.core.util.Appl
 import org.apache.syncope.core.util.ConnIdBundleManager;
 import org.identityconnectors.common.l10n.CurrentLocale;
 import org.identityconnectors.framework.api.ConnectorFacadeFactory;
-import org.identityconnectors.framework.api.ConnectorInfo;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -109,13 +107,6 @@ class ConnectorManager implements Connec
         // This is needed in order to avoid encoding problems when sending error messages via REST
         CurrentLocale.set(Locale.ENGLISH);
 
-        if (LOG.isDebugEnabled()) {
-            List<ConnectorInfo> connInfos = ConnIdBundleManager.getConnManager().getConnectorInfos();
-            for (ConnectorInfo connInfo : connInfos) {
-                LOG.debug("Found connector bundle {}", connInfo.getConnectorDisplayName());
-            }
-        }
-
         // Load all resource-specific connectors
         int connectors = 0;
         for (ExternalResource resource : resourceDAO.findAll()) {
@@ -147,7 +138,7 @@ class ConnectorManager implements Connec
         LOG.info("Done unloading {} connectors", connectors);
 
         ConnectorFacadeFactory.getInstance().dispose();
-        ConnIdBundleManager.resetConnManager();
+        ConnIdBundleManager.resetConnManagers();
         LOG.info("All connector resources disposed");
     }
 }