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/07/23 13:52:07 UTC

svn commit: r1505995 [1/4] - in /syncope/trunk: ./ build-tools/ build-tools/src/main/resources/ client/src/main/java/org/apache/syncope/client/http/ client/src/main/java/org/apache/syncope/client/rest/ client/src/main/java/org/apache/syncope/client/ser...

Author: ilgrosso
Date: Tue Jul 23 11:52:05 2013
New Revision: 1505995

URL: http://svn.apache.org/r1505995
Log:
[SYNCOPE-286] Removing Spring MVC REST services

Added:
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/DerSchemaTO.java
      - copied, changed from r1505658, syncope/trunk/common/src/main/java/org/apache/syncope/common/to/DerivedSchemaTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/VirSchemaTO.java
      - copied, changed from r1505658, syncope/trunk/common/src/main/java/org/apache/syncope/common/to/VirtualSchemaTO.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/ConnectorController.java
      - copied, changed from r1505658, 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/controller/EntitlementController.java
      - copied, changed from r1505658, syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/AuthenticationController.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/UserWorkflowController.java   (with props)
    syncope/trunk/core/src/main/java/org/apache/syncope/core/services/AbstractServiceImpl.java   (with props)
Removed:
    syncope/trunk/client/src/main/java/org/apache/syncope/client/http/
    syncope/trunk/client/src/main/java/org/apache/syncope/client/services/
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/DerivedSchemaTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/VirtualSchemaTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/validation/SyncopeClientErrorHandler.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/AuthenticationController.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/controller/DerivedSchemaController.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/VirtualSchemaController.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/DerivedSchemaDataBinder.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/VirtualSchemaDataBinder.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/services/DummyHTTPServletResponse.java
    syncope/trunk/core/src/main/webapp/syncopeClientError.jsp
    syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/jaxrs/
Modified:
    syncope/trunk/build-tools/pom.xml
    syncope/trunk/build-tools/src/main/resources/applicationContext.xml
    syncope/trunk/client/src/main/java/org/apache/syncope/client/rest/RestClientExceptionMapper.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/services/ConfigurationService.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/services/SchemaService.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractSchemaTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnInstanceTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnObjectTO.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/AuditElements.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/SchemaType.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/validation/SyncopeClientCompositeErrorException.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/DerivedSchemaModalPage.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/VirtualSchemaModalPage.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/VirtualAttributesPanel.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ConfigurationRestClient.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/SchemaRestClient.java
    syncope/trunk/console/src/main/resources/configuration.properties
    syncope/trunk/console/src/main/resources/logback.xml
    syncope/trunk/console/src/test/resources/configuration.properties
    syncope/trunk/core/pom.xml
    syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/validation/entity/InvalidEntityException.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/AbstractController.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/ConfigurationController.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/LoggerController.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/NotificationController.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/PolicyController.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/ReportController.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/ResourceController.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/RoleController.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/SchemaController.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/TaskController.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/UserController.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/UserRequestController.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/WorkflowController.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/rest/data/TaskDataBinder.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/UserDataBinder.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/utils/RestServiceExceptionMapper.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/services/ConfigurationServiceImpl.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/services/ConnectorServiceImpl.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/services/ContextAware.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/services/EntitlementServiceImpl.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/services/LoggerServiceImpl.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/services/NotificationServiceImpl.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/services/PolicyServiceImpl.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/services/ReportServiceImpl.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/services/ResourceServiceImpl.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/services/RoleServiceImpl.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/services/SchemaServiceImpl.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/services/TaskServiceImpl.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/services/UserRequestServiceImpl.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/services/UserServiceImpl.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/services/UserWorkflowServiceImpl.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/services/WorkflowServiceImpl.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/util/AttributableUtil.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/util/TaskUtil.java
    syncope/trunk/core/src/main/resources/logback.xml
    syncope/trunk/core/src/main/resources/restContext.xml
    syncope/trunk/core/src/main/webapp/WEB-INF/web.xml
    syncope/trunk/core/src/test/java/org/apache/syncope/core/notification/NotificationTest.java
    syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/NotificationTest.java
    syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/AbstractTest.java
    syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/AuthenticationTestITCase.java
    syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/ConfigurationTestITCase.java
    syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/DerivedSchemaTestITCase.java
    syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/RoleTestITCase.java
    syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserRequestTestITCase.java
    syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java
    syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/VirtualSchemaTestITCase.java
    syncope/trunk/core/src/test/resources/restClientContext.xml
    syncope/trunk/pom.xml

Modified: syncope/trunk/build-tools/pom.xml
URL: http://svn.apache.org/viewvc/syncope/trunk/build-tools/pom.xml?rev=1505995&r1=1505994&r2=1505995&view=diff
==============================================================================
--- syncope/trunk/build-tools/pom.xml (original)
+++ syncope/trunk/build-tools/pom.xml Tue Jul 23 11:52:05 2013
@@ -69,10 +69,6 @@ under the License.
       <groupId>org.springframework</groupId>
       <artifactId>spring-web</artifactId>
     </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-webmvc</artifactId>
-    </dependency>
 
     <dependency>
       <groupId>com.h2database</groupId>

Modified: syncope/trunk/build-tools/src/main/resources/applicationContext.xml
URL: http://svn.apache.org/viewvc/syncope/trunk/build-tools/src/main/resources/applicationContext.xml?rev=1505995&r1=1505994&r2=1505995&view=diff
==============================================================================
--- syncope/trunk/build-tools/src/main/resources/applicationContext.xml (original)
+++ syncope/trunk/build-tools/src/main/resources/applicationContext.xml Tue Jul 23 11:52:05 2013
@@ -16,7 +16,6 @@ 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.
-
 -->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -24,11 +23,11 @@ under the License.
                            http://www.springframework.org/schema/beans/spring-beans.xsd">
 
   <bean id="testDataSource"
-          class="org.springframework.jdbc.datasource.DriverManagerDataSource">
+        class="org.springframework.jdbc.datasource.DriverManagerDataSource">
     <property name="driverClassName" value="${testdb.driver}"/>
     <property name="url" value="${testdb.url}"/>
     <property name="username" value="${testdb.username}"/>
     <property name="password" value="${testdb.password}"/>
   </bean>
 
-</beans>
\ No newline at end of file
+</beans>

Modified: syncope/trunk/client/src/main/java/org/apache/syncope/client/rest/RestClientExceptionMapper.java
URL: http://svn.apache.org/viewvc/syncope/trunk/client/src/main/java/org/apache/syncope/client/rest/RestClientExceptionMapper.java?rev=1505995&r1=1505994&r2=1505995&view=diff
==============================================================================
--- syncope/trunk/client/src/main/java/org/apache/syncope/client/rest/RestClientExceptionMapper.java (original)
+++ syncope/trunk/client/src/main/java/org/apache/syncope/client/rest/RestClientExceptionMapper.java Tue Jul 23 11:52:05 2013
@@ -32,7 +32,6 @@ import org.apache.cxf.jaxrs.client.Respo
 import org.apache.http.HttpStatus;
 import org.apache.syncope.common.types.SyncopeClientExceptionType;
 import org.apache.syncope.common.validation.SyncopeClientCompositeErrorException;
-import org.apache.syncope.common.validation.SyncopeClientErrorHandler;
 import org.apache.syncope.common.validation.SyncopeClientException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -81,9 +80,10 @@ public class RestClientExceptionMapper i
 
     private SyncopeClientCompositeErrorException checkCompositeException(final Response response) {
         final int statusCode = response.getStatus();
-        List<Object> exTypesInHeaders = response.getHeaders().get(SyncopeClientErrorHandler.EXCEPTION_TYPE_HEADER);
+        List<Object> exTypesInHeaders = response.getHeaders().
+                get(SyncopeClientCompositeErrorException.EXCEPTION_TYPE_HEADER);
         if (exTypesInHeaders == null) {
-            LOG.debug("No " + SyncopeClientErrorHandler.EXCEPTION_TYPE_HEADER + " provided");
+            LOG.debug("No " + SyncopeClientCompositeErrorException.EXCEPTION_TYPE_HEADER + " provided");
             return null;
         }
 
@@ -97,7 +97,7 @@ public class RestClientExceptionMapper i
             try {
                 exceptionType = SyncopeClientExceptionType.getFromHeaderValue(exTypeAsString);
             } catch (IllegalArgumentException e) {
-                LOG.error("Unexpected value of " + SyncopeClientErrorHandler.EXCEPTION_TYPE_HEADER + ": "
+                LOG.error("Unexpected value of " + SyncopeClientCompositeErrorException.EXCEPTION_TYPE_HEADER + ": "
                         + exTypeAsString, e);
             }
             if (exceptionType != null) {

Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/services/ConfigurationService.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/services/ConfigurationService.java?rev=1505995&r1=1505994&r2=1505995&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/services/ConfigurationService.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/services/ConfigurationService.java Tue Jul 23 11:52:05 2013
@@ -48,7 +48,7 @@ public interface ConfigurationService {
      */
     @GET
     @Path("stream")
-    Response dbExport();
+    Response export();
 
     /**
      * @param key Deletes configuration with matching key.

Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/services/SchemaService.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/services/SchemaService.java?rev=1505995&r1=1505994&r2=1505995&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/services/SchemaService.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/services/SchemaService.java Tue Jul 23 11:52:05 2013
@@ -34,53 +34,52 @@ import org.apache.syncope.common.types.S
 public interface SchemaService {
 
     /**
-     * @param kind Kind for schema to be created
-     * @param type Type for schema to be created
+     * @param attrType Kind for schema to be created
+     * @param schemaType Type for schema to be created
      * @param schemaTO Schema to be created
      * @return Response containing URI location for created resource.
      */
     @POST
-    <T extends AbstractSchemaTO> Response create(@PathParam("kind") AttributableType kind,
-            @PathParam("type") SchemaType type, T schemaTO);
+    <T extends AbstractSchemaTO> Response create(@PathParam("kind") AttributableType attrType,
+            @PathParam("type") SchemaType schemaType, T schemaTO);
 
     /**
-     * @param kind Kind for schema to be deleted
-     * @param type Type for schema to be deleted
+     * @param attrType Kind for schema to be deleted
      * @param schemaName Name of schema to be deleted
      */
     @DELETE
     @Path("{name}")
-    void delete(@PathParam("kind") AttributableType kind, @PathParam("type") SchemaType type,
+    void delete(@PathParam("kind") AttributableType attrType, @PathParam("type") SchemaType schemaType,
             @PathParam("name") String schemaName);
 
     /**
-     * @param kind Kind for schemas to be listed
-     * @param type Type for schemas to be listed
+     * @param attrType Kind for schemas to be listed
+     * @param schemaType Type for schemas to be listed
      * @return List of schemas with matching kind and type
      */
     @GET
     <T extends AbstractSchemaTO> List<T> list(
-            @PathParam("kind") AttributableType kind, @PathParam("type") SchemaType type);
+            @PathParam("kind") AttributableType attrType, @PathParam("type") SchemaType schemaType);
 
     /**
-     * @param kind Kind for schemas to be read
-     * @param type Type for schemas to be read
+     * @param attrType Kind for schemas to be read
+     * @param schemaType Type for schemas to be read
      * @param schemaName Name of schema to be read
      * @return Returns schema with matching name, kind and type
      */
     @GET
     @Path("{name}")
-    <T extends AbstractSchemaTO> T read(@PathParam("kind") AttributableType kind, @PathParam("type") SchemaType type,
-            @PathParam("name") String schemaName);
+    <T extends AbstractSchemaTO> T read(@PathParam("kind") AttributableType attrType,
+            @PathParam("type") SchemaType schemaType, @PathParam("name") String schemaName);
 
     /**
-     * @param kind Kind for schemas to be updated
-     * @param type Type for schemas to be updated
+     * @param attrType Kind for schemas to be updated
+     * @param schemaType Type for schemas to be updated
      * @param schemaName Name of schema to be updated
      * @param schemaTO New schema to be stored
      */
     @PUT
     @Path("{name}")
-    <T extends AbstractSchemaTO> void update(@PathParam("kind") AttributableType kind,
-            @PathParam("type") SchemaType type, @PathParam("name") String schemaName, T schemaTO);
+    <T extends AbstractSchemaTO> void update(@PathParam("kind") AttributableType attrType,
+            @PathParam("type") SchemaType schemaType, @PathParam("name") String schemaName, T schemaTO);
 }

Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractSchemaTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractSchemaTO.java?rev=1505995&r1=1505994&r2=1505995&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractSchemaTO.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/AbstractSchemaTO.java Tue Jul 23 11:52:05 2013
@@ -26,7 +26,7 @@ import org.apache.syncope.common.Abstrac
 
 @XmlRootElement(name = "abstractSchema")
 @XmlType
-@XmlSeeAlso({SchemaTO.class, DerivedSchemaTO.class, VirtualSchemaTO.class})
+@XmlSeeAlso({SchemaTO.class, DerSchemaTO.class, VirSchemaTO.class})
 public abstract class AbstractSchemaTO extends AbstractBaseBean {
 
     private static final long serialVersionUID = 4088388951694301759L;

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=1505995&r1=1505994&r2=1505995&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 Tue Jul 23 11:52:05 2013
@@ -34,7 +34,7 @@ import org.apache.syncope.common.Abstrac
 import org.apache.syncope.common.types.ConnConfProperty;
 import org.apache.syncope.common.types.ConnectorCapability;
 
-@XmlRootElement(name = "connector")
+@XmlRootElement(name = "connInstance")
 @XmlType
 public class ConnInstanceTO extends AbstractBaseBean {
 

Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnObjectTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnObjectTO.java?rev=1505995&r1=1505994&r2=1505995&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnObjectTO.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/ConnObjectTO.java Tue Jul 23 11:52:05 2013
@@ -30,7 +30,7 @@ import javax.xml.bind.annotation.XmlRoot
 import javax.xml.bind.annotation.XmlType;
 import org.apache.syncope.common.AbstractBaseBean;
 
-@XmlRootElement(name = "connector")
+@XmlRootElement(name = "connObject")
 @XmlType
 public class ConnObjectTO extends AbstractBaseBean {
 

Copied: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/DerSchemaTO.java (from r1505658, syncope/trunk/common/src/main/java/org/apache/syncope/common/to/DerivedSchemaTO.java)
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/DerSchemaTO.java?p2=syncope/trunk/common/src/main/java/org/apache/syncope/common/to/DerSchemaTO.java&p1=syncope/trunk/common/src/main/java/org/apache/syncope/common/to/DerivedSchemaTO.java&r1=1505658&r2=1505995&rev=1505995&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/DerivedSchemaTO.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/DerSchemaTO.java Tue Jul 23 11:52:05 2013
@@ -23,7 +23,7 @@ import javax.xml.bind.annotation.XmlType
 
 @XmlRootElement(name = "derivedSchema")
 @XmlType
-public class DerivedSchemaTO extends AbstractSchemaTO {
+public class DerSchemaTO extends AbstractSchemaTO {
 
     private static final long serialVersionUID = -6747399803792103108L;
 
@@ -33,7 +33,7 @@ public class DerivedSchemaTO extends Abs
         return expression;
     }
 
-    public void setExpression(String expression) {
+    public void setExpression(final String expression) {
         this.expression = expression;
     }
 }

Copied: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/VirSchemaTO.java (from r1505658, syncope/trunk/common/src/main/java/org/apache/syncope/common/to/VirtualSchemaTO.java)
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/VirSchemaTO.java?p2=syncope/trunk/common/src/main/java/org/apache/syncope/common/to/VirSchemaTO.java&p1=syncope/trunk/common/src/main/java/org/apache/syncope/common/to/VirtualSchemaTO.java&r1=1505658&r2=1505995&rev=1505995&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/VirtualSchemaTO.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/VirSchemaTO.java Tue Jul 23 11:52:05 2013
@@ -21,7 +21,7 @@ package org.apache.syncope.common.to;
 import javax.xml.bind.annotation.XmlRootElement;
 
 @XmlRootElement(name = "virtualSchema")
-public class VirtualSchemaTO extends AbstractSchemaTO {
+public class VirSchemaTO extends AbstractSchemaTO {
 
     private static final long serialVersionUID = -8198557479659701343L;
     

Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/AuditElements.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/types/AuditElements.java?rev=1505995&r1=1505994&r2=1505995&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/AuditElements.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/AuditElements.java Tue Jul 23 11:52:05 2013
@@ -192,17 +192,7 @@ public final class AuditElements {
         create,
         read,
         update,
-        delete,
-        listDerived,
-        createDerived,
-        readDerived,
-        updateDerived,
-        deleteDerived,
-        listVirtual,
-        createVirtual,
-        readVirtual,
-        updateVirtual,
-        deleteVirtual
+        delete
 
     }
 

Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/SchemaType.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/types/SchemaType.java?rev=1505995&r1=1505994&r2=1505995&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/SchemaType.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/SchemaType.java Tue Jul 23 11:52:05 2013
@@ -20,9 +20,9 @@ package org.apache.syncope.common.types;
 
 import javax.xml.bind.annotation.XmlEnum;
 import org.apache.syncope.common.to.AbstractSchemaTO;
-import org.apache.syncope.common.to.DerivedSchemaTO;
+import org.apache.syncope.common.to.DerSchemaTO;
 import org.apache.syncope.common.to.SchemaTO;
-import org.apache.syncope.common.to.VirtualSchemaTO;
+import org.apache.syncope.common.to.VirSchemaTO;
 
 @XmlEnum
 public enum SchemaType {
@@ -30,31 +30,39 @@ public enum SchemaType {
     /**
      * Standard schema for normal attributes to be stored within syncope.
      */
-    NORMAL("schema", SchemaTO.class),
+    NORMAL(SchemaTO.class),
     /**
      * Derived schema calculated based on other attributes.
      */
-    DERIVED("derivedSchema", DerivedSchemaTO.class),
+    DERIVED(DerSchemaTO.class),
     /**
      * Virtual schema for attributes fetched from remote resources only.
      */
-    VIRTUAL("virtualSchema", VirtualSchemaTO.class);
-
-    // TODO remove name once CXF migration is complete
-    private final String name;
+    VIRTUAL(VirSchemaTO.class);
 
     private final Class<? extends AbstractSchemaTO> toClass;
 
-    private SchemaType(final String name, final Class<? extends AbstractSchemaTO> toClass) {
-        this.name = name;
+    private SchemaType(final Class<? extends AbstractSchemaTO> toClass) {
         this.toClass = toClass;
     }
 
-    public String toSpringURL() {
-        return name;
-    }
-
     public Class<? extends AbstractSchemaTO> getToClass() {
         return toClass;
     }
+
+    public static SchemaType fromToClass(final Class<? extends AbstractSchemaTO> toClass) {
+        SchemaType schemaType = null;
+
+        if (SchemaTO.class.equals(toClass)) {
+            schemaType = SchemaType.NORMAL;
+        } else if (DerSchemaTO.class.equals(toClass)) {
+            schemaType = SchemaType.DERIVED;
+        } else if (VirSchemaTO.class.equals(toClass)) {
+            schemaType = SchemaType.VIRTUAL;
+        } else {
+            throw new IllegalArgumentException("Unexpected class: " + toClass.getName());
+        }
+
+        return schemaType;
+    }
 }

Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/validation/SyncopeClientCompositeErrorException.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/validation/SyncopeClientCompositeErrorException.java?rev=1505995&r1=1505994&r2=1505995&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/validation/SyncopeClientCompositeErrorException.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/validation/SyncopeClientCompositeErrorException.java Tue Jul 23 11:52:05 2013
@@ -29,6 +29,8 @@ public class SyncopeClientCompositeError
 
     private static final long serialVersionUID = 7882118041134372129L;
 
+    public static final String EXCEPTION_TYPE_HEADER = "ExceptionType";
+
     private Set<SyncopeClientException> exceptions;
 
     public SyncopeClientCompositeErrorException(final HttpStatus statusCode) {

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/DerivedSchemaModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/DerivedSchemaModalPage.java?rev=1505995&r1=1505994&r2=1505995&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/DerivedSchemaModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/DerivedSchemaModalPage.java Tue Jul 23 11:52:05 2013
@@ -19,7 +19,7 @@
 package org.apache.syncope.console.pages;
 
 import org.apache.syncope.common.AbstractBaseBean;
-import org.apache.syncope.common.to.DerivedSchemaTO;
+import org.apache.syncope.common.to.DerSchemaTO;
 import org.apache.syncope.common.types.AttributableType;
 import org.apache.syncope.common.validation.SyncopeClientCompositeErrorException;
 import org.apache.syncope.console.commons.Constants;
@@ -54,7 +54,7 @@ public class DerivedSchemaModalPage exte
             AbstractBaseBean schema, final boolean createFlag) {
 
         if (schema == null) {
-            schema = new DerivedSchemaTO();
+            schema = new DerSchemaTO();
         }
 
         final Form schemaForm = new Form(FORM);
@@ -85,7 +85,7 @@ public class DerivedSchemaModalPage exte
 
             @Override
             protected void onSubmit(final AjaxRequestTarget target, final Form form) {
-                DerivedSchemaTO schemaTO = (DerivedSchemaTO) form.getDefaultModelObject();
+                DerSchemaTO schemaTO = (DerSchemaTO) form.getDefaultModelObject();
 
                 try {
                     if (createFlag) {

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/VirtualSchemaModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/VirtualSchemaModalPage.java?rev=1505995&r1=1505994&r2=1505995&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/VirtualSchemaModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/VirtualSchemaModalPage.java Tue Jul 23 11:52:05 2013
@@ -19,7 +19,7 @@
 package org.apache.syncope.console.pages;
 
 import org.apache.syncope.common.AbstractBaseBean;
-import org.apache.syncope.common.to.VirtualSchemaTO;
+import org.apache.syncope.common.to.VirSchemaTO;
 import org.apache.syncope.common.types.AttributableType;
 import org.apache.syncope.common.validation.SyncopeClientCompositeErrorException;
 import org.apache.syncope.console.commons.Constants;
@@ -52,7 +52,7 @@ public class VirtualSchemaModalPage exte
             AbstractBaseBean schema, final boolean createFlag) {
 
         if (schema == null) {
-            schema = new VirtualSchemaTO();
+            schema = new VirSchemaTO();
         }
 
         final Form schemaForm = new Form(FORM);
@@ -74,7 +74,7 @@ public class VirtualSchemaModalPage exte
 
             @Override
             protected void onSubmit(final AjaxRequestTarget target, final Form form) {
-                VirtualSchemaTO schemaTO = (VirtualSchemaTO) form.getDefaultModelObject();
+                VirSchemaTO schemaTO = (VirSchemaTO) form.getDefaultModelObject();
                 try {
                     if (createFlag) {
                         schemaRestClient.createVirtualSchema(kind, schemaTO);

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/VirtualAttributesPanel.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/VirtualAttributesPanel.java?rev=1505995&r1=1505994&r2=1505995&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/VirtualAttributesPanel.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/VirtualAttributesPanel.java Tue Jul 23 11:52:05 2013
@@ -26,7 +26,7 @@ import org.apache.syncope.common.to.Abst
 import org.apache.syncope.common.to.AttributeTO;
 import org.apache.syncope.common.to.RoleTO;
 import org.apache.syncope.common.to.UserTO;
-import org.apache.syncope.common.to.VirtualSchemaTO;
+import org.apache.syncope.common.to.VirSchemaTO;
 import org.apache.syncope.common.types.AttributableType;
 import org.apache.syncope.console.commons.Constants;
 import org.apache.syncope.console.rest.SchemaRestClient;
@@ -68,14 +68,14 @@ public class VirtualAttributesPanel exte
 
         setOutputMarkupId(true);
 
-        final IModel<Map<String, VirtualSchemaTO>> schemas =
-                new LoadableDetachableModel<Map<String, VirtualSchemaTO>>() {
+        final IModel<Map<String, VirSchemaTO>> schemas =
+                new LoadableDetachableModel<Map<String, VirSchemaTO>>() {
 
             private static final long serialVersionUID = -5489981430516587774L;
 
             @Override
-            protected Map<String, VirtualSchemaTO> load() {
-                final List<VirtualSchemaTO> schemaTOs;
+            protected Map<String, VirSchemaTO> load() {
+                final List<VirSchemaTO> schemaTOs;
                 if (entityTO instanceof RoleTO) {
                     schemaTOs = schemaRestClient.getVirtualSchemas(AttributableType.ROLE);
                 } else if (entityTO instanceof UserTO) {
@@ -84,9 +84,9 @@ public class VirtualAttributesPanel exte
                     schemaTOs = schemaRestClient.getVirtualSchemas(AttributableType.MEMBERSHIP);
                 }
 
-                final Map<String, VirtualSchemaTO> schemas = new HashMap<String, VirtualSchemaTO>();
+                final Map<String, VirSchemaTO> schemas = new HashMap<String, VirSchemaTO>();
 
-                for (VirtualSchemaTO schemaTO : schemaTOs) {
+                for (VirSchemaTO schemaTO : schemaTOs) {
                     schemas.put(schemaTO.getName(), schemaTO);
                 }
 
@@ -160,7 +160,7 @@ public class VirtualAttributesPanel exte
                 }
 
                 if (attributeTO.getSchema() != null) {
-                    VirtualSchemaTO attributeSchema = schemas.getObject().get(attributeTO.getSchema());
+                    VirSchemaTO attributeSchema = schemas.getObject().get(attributeTO.getSchema());
                     if (attributeSchema != null) {
                         attributeTO.setReadonly(attributeSchema.isReadonly());
                     }
@@ -204,7 +204,7 @@ public class VirtualAttributesPanel exte
 
                         attributeTO.setSchema(schemaChoice.getModelObject());
 
-                        VirtualSchemaTO attributeSchema =
+                        VirSchemaTO attributeSchema =
                                 schemas.getObject().get(attributeTO.getSchema());
                         if (attributeSchema != null) {
                             attributeTO.setReadonly(attributeSchema.isReadonly());

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ConfigurationRestClient.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ConfigurationRestClient.java?rev=1505995&r1=1505994&r2=1505995&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ConfigurationRestClient.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ConfigurationRestClient.java Tue Jul 23 11:52:05 2013
@@ -70,6 +70,6 @@ public class ConfigurationRestClient ext
     }
 
     public Response dbExport() {
-        return getService(ConfigurationService.class).dbExport();
+        return getService(ConfigurationService.class).export();
     }
 }

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/SchemaRestClient.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/SchemaRestClient.java?rev=1505995&r1=1505994&r2=1505995&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/SchemaRestClient.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/SchemaRestClient.java Tue Jul 23 11:52:05 2013
@@ -25,10 +25,10 @@ import java.util.List;
 import org.apache.syncope.common.services.ConfigurationService;
 import org.apache.syncope.common.services.SchemaService;
 import org.apache.syncope.common.to.AbstractSchemaTO;
-import org.apache.syncope.common.to.DerivedSchemaTO;
+import org.apache.syncope.common.to.DerSchemaTO;
 import org.apache.syncope.common.to.SchemaTO;
 import org.apache.syncope.common.to.ValidatorTO;
-import org.apache.syncope.common.to.VirtualSchemaTO;
+import org.apache.syncope.common.to.VirSchemaTO;
 import org.apache.syncope.common.types.AttributableType;
 import org.apache.syncope.common.types.SchemaType;
 import org.apache.syncope.common.util.CollectionWrapper;
@@ -100,9 +100,9 @@ public class SchemaRestClient extends Ba
      * @return List of derived schemas.
      */
     @SuppressWarnings("unchecked")
-    public List<DerivedSchemaTO> getDerivedSchemas(final AttributableType type) {
+    public List<DerSchemaTO> getDerivedSchemas(final AttributableType type) {
 
-        List<DerivedSchemaTO> userDerivedSchemas = null;
+        List<DerSchemaTO> userDerivedSchemas = null;
 
         try {
             userDerivedSchemas = getService(SchemaService.class).list(type, SchemaType.DERIVED);
@@ -123,9 +123,9 @@ public class SchemaRestClient extends Ba
 
         try {
             @SuppressWarnings("unchecked")
-            final List<DerivedSchemaTO> userDerSchemas = getService(SchemaService.class).list(type, SchemaType.DERIVED);
+            final List<DerSchemaTO> userDerSchemas = getService(SchemaService.class).list(type, SchemaType.DERIVED);
 
-            for (DerivedSchemaTO schemaTO : userDerSchemas) {
+            for (DerSchemaTO schemaTO : userDerSchemas) {
                 userDerivedSchemasNames.add(schemaTO.getName());
             }
         } catch (SyncopeClientCompositeErrorException e) {
@@ -141,8 +141,8 @@ public class SchemaRestClient extends Ba
      * @return List of derived schemas.
      */
     @SuppressWarnings("unchecked")
-    public List<VirtualSchemaTO> getVirtualSchemas(final AttributableType type) {
-        List<VirtualSchemaTO> userVirtualSchemas = null;
+    public List<VirSchemaTO> getVirtualSchemas(final AttributableType type) {
+        List<VirSchemaTO> userVirtualSchemas = null;
 
         try {
             userVirtualSchemas = getService(SchemaService.class).list(type, SchemaType.VIRTUAL);
@@ -163,8 +163,8 @@ public class SchemaRestClient extends Ba
 
         try {
             @SuppressWarnings("unchecked")
-            final List<VirtualSchemaTO> userVirSchemas = getService(SchemaService.class).list(type, SchemaType.VIRTUAL);
-            for (VirtualSchemaTO schemaTO : userVirSchemas) {
+            final List<VirSchemaTO> userVirSchemas = getService(SchemaService.class).list(type, SchemaType.VIRTUAL);
+            for (VirSchemaTO schemaTO : userVirSchemas) {
                 userVirtualSchemasNames.add(schemaTO.getName());
             }
         } catch (SyncopeClientCompositeErrorException e) {
@@ -226,7 +226,7 @@ public class SchemaRestClient extends Ba
      *
      * @param schemaTO
      */
-    public void createDerivedSchema(final AttributableType type, final DerivedSchemaTO schemaTO) {
+    public void createDerivedSchema(final AttributableType type, final DerSchemaTO schemaTO) {
         getService(SchemaService.class).create(type, SchemaType.DERIVED, schemaTO);
     }
 
@@ -235,7 +235,7 @@ public class SchemaRestClient extends Ba
      *
      * @param schemaTO
      */
-    public void createVirtualSchema(final AttributableType type, final VirtualSchemaTO schemaTO) {
+    public void createVirtualSchema(final AttributableType type, final VirSchemaTO schemaTO) {
         getService(SchemaService.class).create(type, SchemaType.VIRTUAL, schemaTO);
     }
 
@@ -245,8 +245,8 @@ public class SchemaRestClient extends Ba
      * @param name (e.g.:surname)
      * @return DerivedSchemaTO
      */
-    public DerivedSchemaTO readDerivedSchema(final AttributableType type, final String name) {
-        DerivedSchemaTO derivedSchemaTO = null;
+    public DerSchemaTO readDerivedSchema(final AttributableType type, final String name) {
+        DerSchemaTO derivedSchemaTO = null;
         try {
             derivedSchemaTO = getService(SchemaService.class).read(type, SchemaType.DERIVED, name);
         } catch (SyncopeClientCompositeErrorException e) {
@@ -260,7 +260,7 @@ public class SchemaRestClient extends Ba
      *
      * @param schemaTO updated
      */
-    public void updateDerivedSchema(final AttributableType type, final DerivedSchemaTO schemaTO) {
+    public void updateDerivedSchema(final AttributableType type, final DerSchemaTO schemaTO) {
         getService(SchemaService.class).update(type, SchemaType.DERIVED, schemaTO.getName(), schemaTO);
     }
 
@@ -269,7 +269,7 @@ public class SchemaRestClient extends Ba
      *
      * @param schemaTO updated
      */
-    public void updateVirtualSchema(final AttributableType type, final VirtualSchemaTO schemaTO) {
+    public void updateVirtualSchema(final AttributableType type, final VirSchemaTO schemaTO) {
         getService(SchemaService.class).update(type, SchemaType.VIRTUAL, schemaTO.getName(), schemaTO);
     }
 
@@ -278,8 +278,8 @@ public class SchemaRestClient extends Ba
      *
      * @param name (e.g.:surname)
      */
-    public DerivedSchemaTO deleteDerivedSchema(final AttributableType type, final String name) {
-        DerivedSchemaTO schemaTO = getService(SchemaService.class).read(type, SchemaType.DERIVED, name);
+    public DerSchemaTO deleteDerivedSchema(final AttributableType type, final String name) {
+        DerSchemaTO schemaTO = getService(SchemaService.class).read(type, SchemaType.DERIVED, name);
         getService(SchemaService.class).delete(type, SchemaType.DERIVED, name);
         return schemaTO;
     }
@@ -289,8 +289,8 @@ public class SchemaRestClient extends Ba
      *
      * @param name (e.g.:surname)
      */
-    public VirtualSchemaTO deleteVirtualSchema(final AttributableType type, final String name) {
-        VirtualSchemaTO schemaTO = getService(SchemaService.class).read(type, SchemaType.VIRTUAL, name);
+    public VirSchemaTO deleteVirtualSchema(final AttributableType type, final String name) {
+        VirSchemaTO schemaTO = getService(SchemaService.class).read(type, SchemaType.VIRTUAL, name);
         getService(SchemaService.class).delete(type, SchemaType.VIRTUAL, name);
         return schemaTO;
     }

Modified: syncope/trunk/console/src/main/resources/configuration.properties
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/configuration.properties?rev=1505995&r1=1505994&r2=1505995&view=diff
==============================================================================
--- syncope/trunk/console/src/main/resources/configuration.properties (original)
+++ syncope/trunk/console/src/main/resources/configuration.properties Tue Jul 23 11:52:05 2013
@@ -17,4 +17,4 @@
 scheme=http
 host=localhost
 port=8080
-rootPath=/syncope/cxf/
+rootPath=/syncope/rest/

Modified: syncope/trunk/console/src/main/resources/logback.xml
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/logback.xml?rev=1505995&r1=1505994&r2=1505995&view=diff
==============================================================================
--- syncope/trunk/console/src/main/resources/logback.xml (original)
+++ syncope/trunk/console/src/main/resources/logback.xml Tue Jul 23 11:52:05 2013
@@ -56,7 +56,7 @@ under the License.
   </logger>
     
   <logger name="org.apache.cxf" additivity="false">
-    <level value="INFO"/>
+    <level value="ERROR"/>
     <appender-ref ref="main"/>
   </logger>
     

Modified: syncope/trunk/console/src/test/resources/configuration.properties
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/test/resources/configuration.properties?rev=1505995&r1=1505994&r2=1505995&view=diff
==============================================================================
--- syncope/trunk/console/src/test/resources/configuration.properties (original)
+++ syncope/trunk/console/src/test/resources/configuration.properties Tue Jul 23 11:52:05 2013
@@ -17,4 +17,4 @@
 scheme=http
 host=localhost
 port=9080
-rootPath=/syncope/cxf/
+rootPath=/syncope/rest/

Modified: syncope/trunk/core/pom.xml
URL: http://svn.apache.org/viewvc/syncope/trunk/core/pom.xml?rev=1505995&r1=1505994&r2=1505995&view=diff
==============================================================================
--- syncope/trunk/core/pom.xml (original)
+++ syncope/trunk/core/pom.xml Tue Jul 23 11:52:05 2013
@@ -146,10 +146,6 @@ under the License.
     </dependency>
     <dependency>
       <groupId>org.springframework</groupId>
-      <artifactId>spring-webmvc</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
       <artifactId>spring-oxm</artifactId>
     </dependency>
     <dependency>
@@ -408,6 +404,11 @@ under the License.
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>
         <inherited>true</inherited>
+        <configuration>
+          <systemPropertyVariables>
+            <jaxrsContentType>${jaxrs.content.type}</jaxrsContentType>
+          </systemPropertyVariables>
+        </configuration>
         <executions>
           <execution>
             <id>verify</id>
@@ -512,7 +513,7 @@ under the License.
             </deployable>
             <deployable>
               <location>${cargo.run.dir}</location>
-              <pingURL>http://localhost:${cargo.servlet.port}/syncope/rest/schema/user/list.xml</pingURL>
+              <pingURL>http://localhost:${cargo.servlet.port}/syncope/version.jsp</pingURL>
               <pingTimeout>60000</pingTimeout>
               <properties>
                 <context>syncope</context>
@@ -768,50 +769,6 @@ under the License.
     </profile>
 
     <profile>
-      <id>jaxrs</id>
-
-      <build>
-        <defaultGoal>clean verify</defaultGoal>
-
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-surefire-plugin</artifactId>
-            <inherited>true</inherited>
-            <configuration>
-              <skipTests>true</skipTests>
-            </configuration>
-          </plugin>
-          
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-failsafe-plugin</artifactId>
-            <inherited>true</inherited>
-            <configuration>
-              <excludes>
-                <exclude>**/*TestITCase.java</exclude>
-              </excludes>
-              <includes>
-                <include>**/*TestITCaseJAXRS.java</include>
-              </includes>
-              <systemPropertyVariables>
-                <jaxrsContentType>${jaxrs.content.type}</jaxrsContentType>
-              </systemPropertyVariables>
-            </configuration>
-            <executions>
-              <execution>
-                <id>verify</id>
-                <goals>
-                  <goal>verify</goal>
-                </goals>
-              </execution>
-            </executions>
-          </plugin>
-        </plugins>        
-      </build>
-    </profile>
-    
-    <profile>
       <id>noopworkflow</id>
 
       <build>
@@ -1175,7 +1132,7 @@ under the License.
               <deployables>
                 <deployable>
                   <location>${cargo.run.dir}</location>
-                  <pingURL>http://localhost:${cargo.servlet.port}/syncope/rest/schema/user/list.xml</pingURL>
+                  <pingURL>http://localhost:${cargo.servlet.port}/syncope/version.jsp</pingURL>
                   <pingTimeout>1200000</pingTimeout>
                   <properties>
                     <context>syncope</context>
@@ -1316,7 +1273,7 @@ under the License.
                 </deployable>
                 <deployable>
                   <location>${cargo.run.dir}</location>
-                  <pingURL>http://localhost:${cargo.servlet.port}/syncope/rest/schema/user/list.xml</pingURL>
+                  <pingURL>http://localhost:${cargo.servlet.port}/syncope/version.jsp</pingURL>
                   <pingTimeout>1200000</pingTimeout>
                   <properties>
                     <context>syncope</context>

Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/validation/entity/InvalidEntityException.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/validation/entity/InvalidEntityException.java?rev=1505995&r1=1505994&r2=1505995&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/validation/entity/InvalidEntityException.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/validation/entity/InvalidEntityException.java Tue Jul 23 11:52:05 2013
@@ -32,7 +32,7 @@ public class InvalidEntityException exte
 
     private String entityClassSimpleName;
 
-    private final Map<Class, Set<EntityViolationType>> violations;
+    private final Map<Class<?>, Set<EntityViolationType>> violations;
 
     public InvalidEntityException(final String entityClassSimpleName,
             final Set<ConstraintViolation<Object>> violations) {
@@ -41,7 +41,7 @@ public class InvalidEntityException exte
 
         this.entityClassSimpleName = entityClassSimpleName;
 
-        this.violations = new HashMap<Class, Set<EntityViolationType>>();
+        this.violations = new HashMap<Class<?>, Set<EntityViolationType>>();
         for (ConstraintViolation<Object> violation : violations) {
             int firstComma = violation.getMessageTemplate().indexOf(';');
 
@@ -70,7 +70,7 @@ public class InvalidEntityException exte
 
     public final boolean hasViolation(final EntityViolationType type) {
         boolean found = false;
-        for (Class entity : violations.keySet()) {
+        for (Class<?> entity : violations.keySet()) {
             if (violations.get(entity).contains(type)) {
                 found = true;
             }
@@ -83,7 +83,7 @@ public class InvalidEntityException exte
         return entityClassSimpleName;
     }
 
-    public final Map<Class, Set<EntityViolationType>> getViolations() {
+    public final Map<Class<?>, Set<EntityViolationType>> getViolations() {
         return violations;
     }
 
@@ -91,7 +91,7 @@ public class InvalidEntityException exte
     public String getMessage() {
         StringBuilder sb = new StringBuilder();
 
-        for (Class entity : violations.keySet()) {
+        for (Class<?> entity : violations.keySet()) {
             sb.append(entity.getSimpleName()).append(" ").append(violations.get(entity).toString()).append(", ");
         }
         sb.delete(sb.lastIndexOf(", "), sb.length());

Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/AbstractController.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/AbstractController.java?rev=1505995&r1=1505994&r2=1505995&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/AbstractController.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/AbstractController.java Tue Jul 23 11:52:05 2013
@@ -18,93 +18,16 @@
  */
 package org.apache.syncope.core.rest.controller;
 
-import org.apache.syncope.common.to.PropagationTaskTO;
-import org.apache.syncope.common.to.SchedTaskTO;
-import org.apache.syncope.common.to.SyncTaskTO;
-import org.apache.syncope.common.to.TaskTO;
-import org.apache.syncope.core.persistence.beans.NotificationTask;
-import org.apache.syncope.core.persistence.beans.PropagationTask;
-import org.apache.syncope.core.persistence.beans.SchedTask;
-import org.apache.syncope.core.persistence.beans.SyncTask;
-import org.apache.syncope.core.persistence.beans.Task;
-import org.apache.syncope.core.util.AttributableUtil;
-import org.apache.syncope.core.util.TaskUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.springframework.beans.TypeMismatchException;
 import org.springframework.transaction.annotation.Transactional;
 
-@Transactional(rollbackFor = { Throwable.class })
-public abstract class AbstractController {
+@Transactional(rollbackFor = {Throwable.class})
+abstract class AbstractController {
 
     /**
      * Logger.
      */
     protected static final Logger LOG = LoggerFactory.getLogger(AbstractController.class);
 
-    protected AttributableUtil getAttributableUtil(final String kind) {
-        AttributableUtil result = null;
-
-        try {
-            result = AttributableUtil.valueOf(kind.toUpperCase());
-        } catch (Exception e) {
-            LOG.error("Attributable not supported: " + kind);
-
-            throw new TypeMismatchException(kind, AttributableUtil.class, e);
-        }
-
-        return result;
-    }
-
-    protected TaskUtil getTaskUtil(final String kind) {
-        TaskUtil result = null;
-
-        try {
-            result = TaskUtil.valueOf(kind.toUpperCase());
-        } catch (Exception e) {
-            LOG.error("Task not supported: " + kind);
-
-            throw new TypeMismatchException(kind, TaskUtil.class, e);
-        }
-
-        return result;
-    }
-
-    protected TaskUtil getTaskUtil(final Task task) {
-        TaskUtil result = (task instanceof PropagationTask)
-                ? TaskUtil.PROPAGATION
-                : (task instanceof NotificationTask)
-                        ? TaskUtil.NOTIFICATION
-                        : (task instanceof SyncTask)
-                                ? TaskUtil.SYNC
-                                : (task instanceof SchedTask)
-                                        ? TaskUtil.SCHED
-                                        : null;
-
-        if (result == null) {
-            LOG.error("Task not supported: " + task.getClass().getName());
-
-            throw new TypeMismatchException(task.getClass().getName(), TaskUtil.class);
-        }
-
-        return result;
-    }
-
-    protected TaskUtil getTaskUtil(final TaskTO taskTO) {
-        TaskUtil result = (taskTO instanceof PropagationTaskTO)
-                ? TaskUtil.PROPAGATION
-                : (taskTO instanceof SyncTaskTO)
-                        ? TaskUtil.SYNC
-                        : (taskTO instanceof SchedTaskTO)
-                                ? TaskUtil.SCHED
-                                : null;
-
-        if (result == null) {
-            LOG.error("Task not supported: " + taskTO.getClass().getName());
-
-            throw new TypeMismatchException(taskTO.getClass().getName(), TaskUtil.class);
-        }
-
-        return result;
-    }
 }

Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/ConfigurationController.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/ConfigurationController.java?rev=1505995&r1=1505994&r2=1505995&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/ConfigurationController.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/ConfigurationController.java Tue Jul 23 11:52:05 2013
@@ -24,10 +24,6 @@ import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.ws.rs.core.MediaType;
-import org.apache.syncope.common.SyncopeConstants;
 import org.apache.syncope.common.to.ConfigurationTO;
 import org.apache.syncope.common.types.AuditElements.Category;
 import org.apache.syncope.common.types.AuditElements.ConfigurationSubCategory;
@@ -38,7 +34,6 @@ import org.apache.syncope.core.init.Work
 import org.apache.syncope.core.persistence.beans.SyncopeConf;
 import org.apache.syncope.core.persistence.dao.ConfDAO;
 import org.apache.syncope.core.persistence.dao.MissingConfKeyException;
-import org.apache.syncope.core.persistence.dao.impl.ContentLoader;
 import org.apache.syncope.core.persistence.validation.attrvalue.Validator;
 import org.apache.syncope.core.rest.data.ConfigurationDataBinder;
 import org.apache.syncope.core.util.ContentExporter;
@@ -46,16 +41,10 @@ import org.springframework.beans.factory
 import org.springframework.core.io.Resource;
 import org.springframework.core.io.support.ResourcePatternResolver;
 import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.stereotype.Controller;
+import org.springframework.stereotype.Component;
 import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.servlet.ModelAndView;
 
-@Controller
-@RequestMapping("/configuration")
+@Component
 public class ConfigurationController extends AbstractController {
 
     @Autowired
@@ -80,9 +69,7 @@ public class ConfigurationController ext
     private WorkflowAdapterLoader wfAdapterLoader;
 
     @PreAuthorize("hasRole('CONFIGURATION_CREATE')")
-    @RequestMapping(method = RequestMethod.POST, value = "/create")
-    public ConfigurationTO create(final HttpServletResponse response,
-            @RequestBody final ConfigurationTO configurationTO) {
+    public ConfigurationTO create(final ConfigurationTO configurationTO) {
         LOG.debug("Configuration create called with parameters {}", configurationTO);
 
         SyncopeConf conf = binder.create(configurationTO);
@@ -91,14 +78,11 @@ public class ConfigurationController ext
         auditManager.audit(Category.configuration, ConfigurationSubCategory.create, Result.success,
                 "Successfully created conf: " + conf.getKey());
 
-        response.setStatus(HttpServletResponse.SC_CREATED);
-
         return binder.getConfigurationTO(conf);
     }
 
     @PreAuthorize("hasRole('CONFIGURATION_DELETE')")
-    @RequestMapping(method = RequestMethod.GET, value = "/delete/{key}")
-    public ConfigurationTO delete(@PathVariable("key") final String key) {
+    public ConfigurationTO delete(final String key) {
         SyncopeConf conf = confDAO.find(key);
         ConfigurationTO confToDelete = binder.getConfigurationTO(conf);
         confDAO.delete(key);
@@ -109,8 +93,7 @@ public class ConfigurationController ext
     }
 
     @PreAuthorize("hasRole('CONFIGURATION_LIST')")
-    @RequestMapping(method = RequestMethod.GET, value = "/list")
-    public List<ConfigurationTO> list(final HttpServletRequest request) {
+    public List<ConfigurationTO> list() {
         List<SyncopeConf> configurations = confDAO.findAll();
         List<ConfigurationTO> configurationTOs = new ArrayList<ConfigurationTO>(configurations.size());
 
@@ -125,8 +108,7 @@ public class ConfigurationController ext
     }
 
     @PreAuthorize("hasRole('CONFIGURATION_READ')")
-    @RequestMapping(method = RequestMethod.GET, value = "/read/{key}")
-    public ConfigurationTO read(final HttpServletResponse response, @PathVariable("key") final String key) {
+    public ConfigurationTO read(final String key) {
         ConfigurationTO result;
         try {
             SyncopeConf conf = confDAO.find(key);
@@ -148,8 +130,7 @@ public class ConfigurationController ext
     }
 
     @PreAuthorize("hasRole('CONFIGURATION_UPDATE')")
-    @RequestMapping(method = RequestMethod.POST, value = "/update")
-    public ConfigurationTO update(@RequestBody final ConfigurationTO configurationTO) {
+    public ConfigurationTO update(final ConfigurationTO configurationTO) {
         SyncopeConf conf = confDAO.find(configurationTO.getKey());
         conf.setValue(configurationTO.getValue());
 
@@ -160,19 +141,17 @@ public class ConfigurationController ext
     }
 
     @PreAuthorize("hasRole('CONFIGURATION_LIST')")
-    @RequestMapping(method = RequestMethod.GET, value = "/validators")
-    public ModelAndView getValidators() {
+    public Set<String> getValidators() {
         Set<String> validators = classNamesLoader.getClassNames(ImplementationClassNamesLoader.Type.VALIDATOR);
 
         auditManager.audit(Category.configuration, ConfigurationSubCategory.getValidators, Result.success,
                 "Successfully listed all validators: " + validators.size());
 
-        return new ModelAndView().addObject(validators);
+        return validators;
     }
 
     @PreAuthorize("hasRole('CONFIGURATION_LIST')")
-    @RequestMapping(method = RequestMethod.GET, value = "/mailTemplates")
-    public ModelAndView getMailTemplates() {
+    public Set<String> getMailTemplates() {
         Set<String> htmlTemplates = new HashSet<String>();
         Set<String> textTemplates = new HashSet<String>();
 
@@ -199,24 +178,12 @@ public class ConfigurationController ext
         auditManager.audit(Category.configuration, ConfigurationSubCategory.getMailTemplates, Result.success,
                 "Successfully listed all mail templates: " + htmlTemplates.size());
 
-        return new ModelAndView().addObject(htmlTemplates);
-    }
-
-    @RequestMapping(method = RequestMethod.GET, value = "/dbexport")
-    public void dbExport(final HttpServletResponse response) {
-        response.setContentType(MediaType.TEXT_XML);
-        response.setHeader(SyncopeConstants.CONTENT_DISPOSITION_HEADER,
-                "attachment; filename=" + ContentLoader.CONTENT_XML);
-        try {
-            dbExportInternal(response.getOutputStream());
-        } catch (IOException e) {
-            LOG.error("Getting servlet output stream", e);
-        }
+        return htmlTemplates;
     }
 
     @PreAuthorize("hasRole('CONFIGURATION_READ')")
     @Transactional(readOnly = true)
-    public void dbExportInternal(final OutputStream os) {
+    public void export(final OutputStream os) {
         try {
             exporter.export(os, wfAdapterLoader.getTablePrefix());
 

Copied: syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/ConnectorController.java (from r1505658, syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/ConnInstanceController.java)
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/ConnectorController.java?p2=syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/ConnectorController.java&p1=syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/ConnInstanceController.java&r1=1505658&r2=1505995&rev=1505995&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/ConnInstanceController.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/ConnectorController.java Tue Jul 23 11:52:05 2013
@@ -23,7 +23,6 @@ import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
-import javax.servlet.http.HttpServletResponse;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.syncope.common.to.BulkAction;
 import org.apache.syncope.common.to.BulkActionRes;
@@ -56,18 +55,11 @@ import org.identityconnectors.framework.
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
 import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.stereotype.Controller;
+import org.springframework.stereotype.Component;
 import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.servlet.ModelAndView;
-
-@Controller
-@RequestMapping("/connector")
-public class ConnInstanceController extends AbstractController {
+
+@Component
+public class ConnectorController extends AbstractController {
 
     @Autowired
     private AuditManager auditManager;
@@ -85,8 +77,7 @@ public class ConnInstanceController exte
     private ConnectorFactory connFactory;
 
     @PreAuthorize("hasRole('CONNECTOR_CREATE')")
-    @RequestMapping(method = RequestMethod.POST, value = "/create")
-    public ConnInstanceTO create(final HttpServletResponse response, @RequestBody final ConnInstanceTO connInstanceTO) {
+    public ConnInstanceTO create(final ConnInstanceTO connInstanceTO) {
         LOG.debug("ConnInstance create called with configuration {}", connInstanceTO);
 
         ConnInstance connInstance = binder.getConnInstance(connInstanceTO);
@@ -109,13 +100,11 @@ public class ConnInstanceController exte
             throw scce;
         }
 
-        response.setStatus(HttpServletResponse.SC_CREATED);
         return binder.getConnInstanceTO(connInstance);
     }
 
     @PreAuthorize("hasRole('CONNECTOR_UPDATE')")
-    @RequestMapping(method = RequestMethod.POST, value = "/update")
-    public ConnInstanceTO update(@RequestBody final ConnInstanceTO connInstanceTO) {
+    public ConnInstanceTO update(final ConnInstanceTO connInstanceTO) {
         LOG.debug("Connector update called with configuration {}", connInstanceTO);
 
         ConnInstance connInstance = binder.updateConnInstance(connInstanceTO.getId(), connInstanceTO);
@@ -142,8 +131,7 @@ public class ConnInstanceController exte
     }
 
     @PreAuthorize("hasRole('CONNECTOR_DELETE')")
-    @RequestMapping(method = RequestMethod.GET, value = "/delete/{connInstanceId}")
-    public ConnInstanceTO delete(@PathVariable("connInstanceId") final Long connInstanceId) {
+    public ConnInstanceTO delete(final Long connInstanceId) {
         ConnInstance connInstance = connInstanceDAO.find(connInstanceId);
         if (connInstance == null) {
             throw new NotFoundException("Connector '" + connInstanceId + "'");
@@ -173,9 +161,8 @@ public class ConnInstanceController exte
     }
 
     @PreAuthorize("hasRole('CONNECTOR_LIST')")
-    @RequestMapping(method = RequestMethod.GET, value = "/list")
     @Transactional(readOnly = true)
-    public List<ConnInstanceTO> list(@RequestParam(value = "lang", required = false) final String lang) {
+    public List<ConnInstanceTO> list(final String lang) {
         if (StringUtils.isBlank(lang)) {
             CurrentLocale.set(Locale.ENGLISH);
         } else {
@@ -201,9 +188,8 @@ public class ConnInstanceController exte
     }
 
     @PreAuthorize("hasRole('CONNECTOR_READ')")
-    @RequestMapping(method = RequestMethod.GET, value = "/read/{connInstanceId}")
     @Transactional(readOnly = true)
-    public ConnInstanceTO read(@PathVariable("connInstanceId") final Long connInstanceId) {
+    public ConnInstanceTO read(final Long connInstanceId) {
         ConnInstance connInstance = connInstanceDAO.find(connInstanceId);
         if (connInstance == null) {
             throw new NotFoundException("Connector '" + connInstanceId + "'");
@@ -216,9 +202,8 @@ public class ConnInstanceController exte
     }
 
     @PreAuthorize("hasRole('CONNECTOR_READ')")
-    @RequestMapping(method = RequestMethod.GET, value = "/bundle/list")
     @Transactional(readOnly = true)
-    public List<ConnBundleTO> getBundles(@RequestParam(value = "lang", required = false) final String lang) {
+    public List<ConnBundleTO> getBundles(final String lang) {
         if (StringUtils.isBlank(lang)) {
             CurrentLocale.set(Locale.ENGLISH);
         } else {
@@ -270,12 +255,8 @@ public class ConnInstanceController exte
     }
 
     @PreAuthorize("hasRole('CONNECTOR_READ')")
-    @RequestMapping(method = RequestMethod.POST, value = "/schemaNames/list")
     @Transactional(readOnly = true)
-    public List<String> getSchemaNames(@RequestBody final ConnInstanceTO connInstanceTO,
-            @RequestParam(required = false, value = "includeSpecial", defaultValue = "false")
-            final boolean includeSpecial) {
-
+    public List<String> getSchemaNames(final ConnInstanceTO connInstanceTO, final boolean includeSpecial) {
         final ConnInstance connInstance = connInstanceDAO.find(connInstanceTO.getId());
         if (connInstance == null) {
             throw new NotFoundException("Connector '" + connInstanceTO.getId() + "'");
@@ -299,9 +280,8 @@ public class ConnInstanceController exte
     }
 
     @PreAuthorize("hasRole('CONNECTOR_READ')")
-    @RequestMapping(method = RequestMethod.POST, value = "/supportedObjectClasses/list")
     @Transactional(readOnly = true)
-    public List<String> getSupportedObjectClasses(@RequestBody final ConnInstanceTO connInstanceTO) {
+    public List<String> getSupportedObjectClasses(final ConnInstanceTO connInstanceTO) {
         final ConnInstance connInstance = connInstanceDAO.find(connInstanceTO.getId());
         if (connInstance == null) {
             throw new NotFoundException("Connector '" + connInstanceTO.getId() + "'");
@@ -329,10 +309,8 @@ public class ConnInstanceController exte
     }
 
     @PreAuthorize("hasRole('CONNECTOR_READ')")
-    @RequestMapping(method = RequestMethod.GET, value = "/{connInstanceId}/configurationProperty/list")
     @Transactional(readOnly = true)
-    public List<ConnConfProperty> getConfigurationProperties(
-            @PathVariable("connInstanceId") final Long connInstanceId) {
+    public List<ConnConfProperty> getConfigurationProperties(final Long connInstanceId) {
 
         final ConnInstance connInstance = connInstanceDAO.find(connInstanceId);
         if (connInstance == null) {
@@ -349,9 +327,8 @@ public class ConnInstanceController exte
     }
 
     @PreAuthorize("hasRole('CONNECTOR_READ')")
-    @RequestMapping(method = RequestMethod.POST, value = "/check")
     @Transactional(readOnly = true)
-    public ModelAndView check(@RequestBody final ConnInstanceTO connInstanceTO) {
+    public boolean check(final ConnInstanceTO connInstanceTO) {
         final Connector connector =
                 connFactory.createConnector(binder.getConnInstance(connInstanceTO), connInstanceTO.getConfiguration());
 
@@ -370,13 +347,12 @@ public class ConnInstanceController exte
             result = false;
         }
 
-        return new ModelAndView().addObject(result);
+        return result;
     }
 
     @PreAuthorize("hasRole('CONNECTOR_READ')")
-    @RequestMapping(method = RequestMethod.GET, value = "/{resourceName}/readByResource")
     @Transactional(readOnly = true)
-    public ConnInstanceTO readByResource(@PathVariable("resourceName") final String resourceName) {
+    public ConnInstanceTO readByResource(final String resourceName) {
         ExternalResource resource = resourceDAO.find(resourceName);
         if (resource == null) {
             throw new NotFoundException("Resource '" + resourceName + "'");
@@ -391,7 +367,6 @@ public class ConnInstanceController exte
     }
 
     @PreAuthorize("hasRole('CONNECTOR_RELOAD')")
-    @RequestMapping(method = RequestMethod.POST, value = "/reload")
     @Transactional(readOnly = true)
     public void reload() {
         connFactory.unload();
@@ -402,24 +377,20 @@ public class ConnInstanceController exte
     }
 
     @PreAuthorize("hasRole('CONNECTOR_DELETE') and #bulkAction.operation == #bulkAction.operation.DELETE")
-    @RequestMapping(method = RequestMethod.POST, value = "/bulk")
-    public BulkActionRes bulkAction(@RequestBody final BulkAction bulkAction) {
+    public BulkActionRes bulkAction(final BulkAction bulkAction) {
         LOG.debug("Bulk action '{}' called on '{}'", bulkAction.getOperation(), bulkAction.getTargets());
 
         BulkActionRes res = new BulkActionRes();
 
-        switch (bulkAction.getOperation()) {
-            case DELETE:
-                for (String id : bulkAction.getTargets()) {
-                    try {
-                        res.add(delete(Long.valueOf(id)).getId(), BulkActionRes.Status.SUCCESS);
-                    } catch (Exception e) {
-                        LOG.error("Error performing delete for connector {}", id, e);
-                        res.add(id, BulkActionRes.Status.FAILURE);
-                    }
+        if (bulkAction.getOperation() == BulkAction.Type.DELETE) {
+            for (String id : bulkAction.getTargets()) {
+                try {
+                    res.add(delete(Long.valueOf(id)).getId(), BulkActionRes.Status.SUCCESS);
+                } catch (Exception e) {
+                    LOG.error("Error performing delete for connector {}", id, e);
+                    res.add(id, BulkActionRes.Status.FAILURE);
                 }
-                break;
-            default:
+            }
         }
 
         return res;

Copied: syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/EntitlementController.java (from r1505658, syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/AuthenticationController.java)
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/EntitlementController.java?p2=syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/EntitlementController.java&p1=syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/AuthenticationController.java&r1=1505658&r2=1505995&rev=1505995&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/AuthenticationController.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/EntitlementController.java Tue Jul 23 11:52:05 2013
@@ -30,13 +30,10 @@ import org.apache.syncope.core.persisten
 import org.apache.syncope.core.persistence.dao.EntitlementDAO;
 import org.apache.syncope.core.util.EntitlementUtil;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-
-@Controller
-@RequestMapping("/auth")
-public class AuthenticationController extends AbstractController {
+import org.springframework.stereotype.Component;
+
+@Component
+public class EntitlementController extends AbstractController {
 
     @Autowired
     private AuditManager auditManager;
@@ -44,7 +41,6 @@ public class AuthenticationController ex
     @Autowired
     private EntitlementDAO entitlementDAO;
 
-    @RequestMapping(method = RequestMethod.GET, value = "/allentitlements")
     public List<String> listEntitlements() {
         List<Entitlement> entitlements = entitlementDAO.findAll();
         List<String> result = new ArrayList<String>(entitlements.size());
@@ -55,7 +51,6 @@ public class AuthenticationController ex
         return result;
     }
 
-    @RequestMapping(method = RequestMethod.GET, value = "/entitlements")
     public Set<String> getEntitlements() {
         Set<String> result = EntitlementUtil.getOwnedEntitlementNames();
 

Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/LoggerController.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/LoggerController.java?rev=1505995&r1=1505994&r2=1505995&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/LoggerController.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/LoggerController.java Tue Jul 23 11:52:05 2013
@@ -40,19 +40,14 @@ import org.springframework.beans.BeanUti
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
 import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.stereotype.Controller;
 import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
 
 import ch.qos.logback.classic.Level;
 import ch.qos.logback.classic.Logger;
 import ch.qos.logback.classic.LoggerContext;
+import org.springframework.stereotype.Component;
 
-@Controller
-@RequestMapping("/logger")
+@Component
 public class LoggerController extends AbstractController {
 
     @Autowired
@@ -76,14 +71,12 @@ public class LoggerController extends Ab
     }
 
     @PreAuthorize("hasRole('LOG_LIST')")
-    @RequestMapping(method = RequestMethod.GET, value = "/log/list")
     @Transactional(readOnly = true)
     public List<LoggerTO> listLogs() {
         return list(SyncopeLoggerType.LOG);
     }
 
     @PreAuthorize("hasRole('AUDIT_LIST')")
-    @RequestMapping(method = RequestMethod.GET, value = "/audit/list")
     @Transactional(readOnly = true)
     public List<AuditLoggerName> listAudits() {
         List<AuditLoggerName> result = new ArrayList<AuditLoggerName>();
@@ -141,14 +134,12 @@ public class LoggerController extends Ab
     }
 
     @PreAuthorize("hasRole('LOG_SET_LEVEL')")
-    @RequestMapping(method = RequestMethod.POST, value = "/log/{name}/{level}")
-    public LoggerTO setLogLevel(@PathVariable("name") final String name, @PathVariable("level") final Level level) {
+    public LoggerTO setLogLevel(final String name, final Level level) {
         return setLevel(name, level, SyncopeLoggerType.LOG);
     }
 
     @PreAuthorize("hasRole('AUDIT_ENABLE')")
-    @RequestMapping(method = RequestMethod.PUT, value = "/audit/enable")
-    public void enableAudit(@RequestBody final AuditLoggerName auditLoggerName) {
+    public void enableAudit(final AuditLoggerName auditLoggerName) {
         try {
             setLevel(auditLoggerName.toLoggerName(), Level.DEBUG, SyncopeLoggerType.AUDIT);
         } catch (IllegalArgumentException e) {
@@ -189,14 +180,12 @@ public class LoggerController extends Ab
     }
 
     @PreAuthorize("hasRole('LOG_DELETE')")
-    @RequestMapping(method = RequestMethod.GET, value = "/log/delete/{name}")
-    public LoggerTO deleteLog(@PathVariable("name") final String name) throws NotFoundException {
+    public LoggerTO deleteLog(final String name) throws NotFoundException {
         return delete(name, SyncopeLoggerType.LOG);
     }
 
     @PreAuthorize("hasRole('AUDIT_DISABLE')")
-    @RequestMapping(method = RequestMethod.PUT, value = "/audit/disable")
-    public void disableAudit(@RequestBody final AuditLoggerName auditLoggerName) {
+    public void disableAudit(final AuditLoggerName auditLoggerName) {
         try {
             delete(auditLoggerName.toLoggerName(), SyncopeLoggerType.AUDIT);
         } catch (NotFoundException e) {

Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/NotificationController.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/NotificationController.java?rev=1505995&r1=1505994&r2=1505995&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/NotificationController.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/NotificationController.java Tue Jul 23 11:52:05 2013
@@ -21,7 +21,6 @@ package org.apache.syncope.core.rest.con
 import java.util.ArrayList;
 import java.util.List;
 
-import javax.servlet.http.HttpServletResponse;
 
 import org.apache.syncope.common.to.NotificationTO;
 import org.apache.syncope.common.types.AuditElements.Category;
@@ -34,14 +33,9 @@ import org.apache.syncope.core.persisten
 import org.apache.syncope.core.rest.data.NotificationDataBinder;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.stereotype.Component;
 
-@Controller
-@RequestMapping("/notification")
+@Component
 public class NotificationController extends AbstractController {
 
     @Autowired
@@ -54,8 +48,7 @@ public class NotificationController exte
     private NotificationDataBinder binder;
 
     @PreAuthorize("hasRole('NOTIFICATION_READ')")
-    @RequestMapping(method = RequestMethod.GET, value = "/read/{notificationId}")
-    public NotificationTO read(@PathVariable("notificationId") final Long notificationId) {
+    public NotificationTO read(final Long notificationId) {
         Notification notification = notificationDAO.find(notificationId);
         if (notification == null) {
             LOG.error("Could not find notification '" + notificationId + "'");
@@ -67,7 +60,6 @@ public class NotificationController exte
     }
 
     @PreAuthorize("hasRole('NOTIFICATION_LIST')")
-    @RequestMapping(method = RequestMethod.GET, value = "/list")
     public List<NotificationTO> list() {
         List<Notification> notifications = notificationDAO.findAll();
 
@@ -82,25 +74,20 @@ public class NotificationController exte
         return notificationTOs;
     }
 
-    @RequestMapping(method = RequestMethod.POST, value = "/create")
-    public NotificationTO create(final HttpServletResponse response, @RequestBody final NotificationTO notificationTO) {
-        NotificationTO savedNotificationTO = createInternal(notificationTO);
-        response.setStatus(HttpServletResponse.SC_CREATED);
-        return savedNotificationTO;
-    }
-
     @PreAuthorize("hasRole('NOTIFICATION_CREATE')")
-    public NotificationTO createInternal(final NotificationTO notificationTO) {
+    public NotificationTO create(final NotificationTO notificationTO) {
         LOG.debug("Notification create called with parameter {}", notificationTO);
+
         Notification notification = notificationDAO.save(binder.createNotification(notificationTO));
+
         auditManager.audit(Category.notification, NotificationSubCategory.create, Result.success,
                 "Successfully created notification: " + notification.getId());
+
         return binder.getNotificationTO(notification);
     }
 
     @PreAuthorize("hasRole('NOTIFICATION_UPDATE')")
-    @RequestMapping(method = RequestMethod.POST, value = "/update")
-    public NotificationTO update(@RequestBody final NotificationTO notificationTO) {
+    public NotificationTO update(final NotificationTO notificationTO) {
         LOG.debug("ConnNotificationtor update called with parameter {}", notificationTO);
 
         Notification notification = notificationDAO.find(notificationTO.getId());
@@ -120,8 +107,7 @@ public class NotificationController exte
     }
 
     @PreAuthorize("hasRole('CONNECTOR_DELETE')")
-    @RequestMapping(method = RequestMethod.GET, value = "/delete/{notificationId}")
-    public NotificationTO delete(@PathVariable("notificationId") final Long notificationId) {
+    public NotificationTO delete(final Long notificationId) {
         Notification notification = notificationDAO.find(notificationId);
         if (notification == null) {
             LOG.error("Could not find notificatin '" + notificationId + "'");