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 2015/01/12 18:41:10 UTC

[7/7] syncope git commit: [SYNCOPE-620] server-rest-cxf

[SYNCOPE-620] server-rest-cxf


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/8b4e52d7
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/8b4e52d7
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/8b4e52d7

Branch: refs/heads/2_0_X
Commit: 8b4e52d74596ae729330d8904ae9fddcc190504d
Parents: 65adad7
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Mon Jan 12 18:40:54 2015 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Mon Jan 12 18:40:54 2015 +0100

----------------------------------------------------------------------
 .../common/rest/api/CollectionWrapper.java      |  80 +++++
 .../common/rest/api/ConfigurationService.java   | 112 -------
 .../common/rest/api/ConnectorService.java       | 201 ------------
 .../common/rest/api/EntitlementService.java     |  53 ---
 .../syncope/common/rest/api/JAXRSService.java   |  39 ---
 .../syncope/common/rest/api/LoggerService.java  |  98 ------
 .../common/rest/api/NotificationService.java    |  97 ------
 .../syncope/common/rest/api/PolicyService.java  | 128 --------
 .../syncope/common/rest/api/Preference.java     |  59 ++++
 .../syncope/common/rest/api/ReportService.java  | 195 -----------
 .../common/rest/api/ResourceService.java        | 184 -----------
 .../syncope/common/rest/api/RoleService.java    | 313 ------------------
 .../syncope/common/rest/api/SchemaService.java  | 119 -------
 .../rest/api/SecurityQuestionService.java       | 110 -------
 .../syncope/common/rest/api/TaskService.java    | 245 --------------
 .../common/rest/api/UserSelfService.java        | 145 ---------
 .../syncope/common/rest/api/UserService.java    | 321 -------------------
 .../common/rest/api/UserWorkflowService.java    | 108 -------
 .../common/rest/api/WorkflowService.java        |  89 -----
 .../rest/api/service/ConfigurationService.java  | 112 +++++++
 .../rest/api/service/ConnectorService.java      | 201 ++++++++++++
 .../rest/api/service/EntitlementService.java    |  53 +++
 .../common/rest/api/service/JAXRSService.java   |  39 +++
 .../common/rest/api/service/LoggerService.java  |  98 ++++++
 .../rest/api/service/NotificationService.java   |  97 ++++++
 .../common/rest/api/service/PolicyService.java  | 128 ++++++++
 .../common/rest/api/service/ReportService.java  | 195 +++++++++++
 .../rest/api/service/ResourceService.java       | 184 +++++++++++
 .../common/rest/api/service/RoleService.java    | 313 ++++++++++++++++++
 .../common/rest/api/service/SchemaService.java  | 119 +++++++
 .../api/service/SecurityQuestionService.java    | 110 +++++++
 .../common/rest/api/service/TaskService.java    | 245 ++++++++++++++
 .../rest/api/service/UserSelfService.java       | 145 +++++++++
 .../common/rest/api/service/UserService.java    | 321 +++++++++++++++++++
 .../rest/api/service/UserWorkflowService.java   | 108 +++++++
 .../rest/api/service/WorkflowService.java       |  90 ++++++
 .../syncope/server/logic/WorkflowLogic.java     |   1 +
 syncope620/server/pom.xml                       |   1 +
 syncope620/server/rest-cxf/pom.xml              |  93 ++++++
 .../rest/cxf/QueryResourceInfoComparator.java   | 113 +++++++
 .../rest/cxf/service/AbstractServiceImpl.java   | 227 +++++++++++++
 .../server/rest/cxf/service/AddETagFilter.java  |  50 +++
 .../cxf/service/ConfigurationServiceImpl.java   |  91 ++++++
 .../rest/cxf/service/ConnectorServiceImpl.java  | 133 ++++++++
 .../cxf/service/EntitlementServiceImpl.java     |  44 +++
 .../rest/cxf/service/LoggerServiceImpl.java     | 114 +++++++
 .../cxf/service/NotificationServiceImpl.java    |  66 ++++
 .../rest/cxf/service/PolicyServiceImpl.java     | 125 ++++++++
 .../rest/cxf/service/ReportServiceImpl.java     | 131 ++++++++
 .../rest/cxf/service/ResourceServiceImpl.java   | 151 +++++++++
 .../cxf/service/RestServiceExceptionMapper.java | 284 ++++++++++++++++
 .../rest/cxf/service/RoleServiceImpl.java       | 227 +++++++++++++
 .../rest/cxf/service/SchemaServiceImpl.java     |  75 +++++
 .../service/SecurityQuestionServiceImpl.java    |  73 +++++
 .../rest/cxf/service/TaskServiceImpl.java       | 158 +++++++++
 .../rest/cxf/service/UserSelfServiceImpl.java   | 100 ++++++
 .../rest/cxf/service/UserServiceImpl.java       | 251 +++++++++++++++
 .../cxf/service/UserWorkflowServiceImpl.java    |  64 ++++
 .../rest/cxf/service/WorkflowServiceImpl.java   | 116 +++++++
 .../src/main/resources/restCXFContext.xml       | 122 +++++++
 60 files changed, 5507 insertions(+), 2557 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/8b4e52d7/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/CollectionWrapper.java
----------------------------------------------------------------------
diff --git a/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/CollectionWrapper.java b/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/CollectionWrapper.java
new file mode 100644
index 0000000..070f73c
--- /dev/null
+++ b/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/CollectionWrapper.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.common.rest.api;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import org.apache.syncope.common.lib.to.LoggerTO;
+import org.apache.syncope.common.lib.types.AuditLoggerName;
+import org.apache.syncope.common.lib.types.LoggerLevel;
+import org.apache.syncope.common.lib.wrap.AbstractWrappable;
+
+public final class CollectionWrapper {
+
+    private CollectionWrapper() {
+        // empty constructor for static utility class
+    }
+
+    public static <E, T extends AbstractWrappable<E>> List<T> wrap(final E element, final Class<T> reference) {
+        return Collections.singletonList(AbstractWrappable.getInstance(reference, element));
+    }
+
+    public static <E, T extends AbstractWrappable<E>> List<T> wrap(
+            final Collection<E> collection, final Class<T> reference) {
+
+        List<T> response = new ArrayList<T>();
+        for (E element : collection) {
+            response.add(AbstractWrappable.getInstance(reference, element));
+        }
+        return response;
+    }
+
+    public static <T extends AbstractWrappable<String>> List<String> unwrap(final Collection<T> collection) {
+        List<String> response = new ArrayList<String>();
+        for (T item : collection) {
+            response.add(item.getElement());
+        }
+        return response;
+    }
+
+    public static List<AuditLoggerName> wrapLogger(final Collection<LoggerTO> logger) {
+        List<AuditLoggerName> respons = new ArrayList<AuditLoggerName>();
+        for (LoggerTO l : logger) {
+            try {
+                respons.add(AuditLoggerName.fromLoggerName(l.getName()));
+            } catch (Exception ignore) {
+                // ignore
+            }
+        }
+        return respons;
+    }
+
+    public static List<LoggerTO> unwrapLogger(final Collection<AuditLoggerName> auditNames) {
+        List<LoggerTO> respons = new ArrayList<LoggerTO>();
+        for (AuditLoggerName l : auditNames) {
+            LoggerTO loggerTO = new LoggerTO();
+            loggerTO.setName(l.toLoggerName());
+            loggerTO.setLevel(LoggerLevel.DEBUG);
+            respons.add(loggerTO);
+        }
+        return respons;
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/8b4e52d7/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/ConfigurationService.java
----------------------------------------------------------------------
diff --git a/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/ConfigurationService.java b/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/ConfigurationService.java
deleted file mode 100644
index c76a5c6..0000000
--- a/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/ConfigurationService.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.common.rest.api;
-
-import java.util.List;
-import javax.validation.constraints.NotNull;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.apache.syncope.common.lib.to.AttrTO;
-import org.apache.syncope.common.lib.to.ConfTO;
-import org.apache.syncope.common.lib.wrap.MailTemplate;
-import org.apache.syncope.common.lib.wrap.Validator;
-
-/**
- * REST operations for configuration.
- */
-@Path("configurations")
-public interface ConfigurationService extends JAXRSService {
-
-    /**
-     * Exports internal storage content as downloadable XML file.
-     *
-     * @return internal storage content as downloadable XML file
-     */
-    @GET
-    @Path("stream")
-    Response export();
-
-    /**
-     * Returns a list of known mail-template names.
-     *
-     * @return a list of known mail-template names
-     */
-    @GET
-    @Path("mailTemplates")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    List<MailTemplate> getMailTemplates();
-
-    /**
-     * Returns a list of known validator names.
-     *
-     * @return a list of known validator names
-     */
-    @GET
-    @Path("validators")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    List<Validator> getValidators();
-
-    /**
-     * Returns all configuration parameters.
-     *
-     * @return all configuration parameters
-     */
-    @GET
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    ConfTO list();
-
-    /**
-     * Returns configuration parameter with matching key.
-     *
-     * @param key identifier of configuration to be read
-     * @return configuration parameter with matching key
-     */
-    @GET
-    @Path("{key}")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    AttrTO read(@NotNull @PathParam("key") String key);
-
-    /**
-     * Creates / updates the configuration parameter with the given key.
-     *
-     * @param key parameter key
-     * @param value parameter value
-     */
-    @PUT
-    @Path("{key}")
-    @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    void set(@NotNull @PathParam("key") String key, @NotNull AttrTO value);
-
-    /**
-     * Deletes the configuration parameter with matching key.
-     *
-     * @param key configuration parameter key
-     */
-    @DELETE
-    @Path("{key}")
-    @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    void delete(@NotNull @PathParam("key") String key);
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/8b4e52d7/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/ConnectorService.java
----------------------------------------------------------------------
diff --git a/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/ConnectorService.java b/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/ConnectorService.java
deleted file mode 100644
index 793a2cf..0000000
--- a/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/ConnectorService.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.common.rest.api;
-
-import java.util.List;
-import javax.validation.constraints.NotNull;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.apache.cxf.jaxrs.model.wadl.Description;
-import org.apache.cxf.jaxrs.model.wadl.Descriptions;
-import org.apache.cxf.jaxrs.model.wadl.DocTarget;
-import org.apache.syncope.common.lib.to.BulkAction;
-import org.apache.syncope.common.lib.to.BulkActionResult;
-import org.apache.syncope.common.lib.to.ConnBundleTO;
-import org.apache.syncope.common.lib.to.ConnIdObjectClassTO;
-import org.apache.syncope.common.lib.to.ConnInstanceTO;
-import org.apache.syncope.common.lib.to.PlainSchemaTO;
-import org.apache.syncope.common.lib.types.ConnConfProperty;
-
-/**
- * REST operations for connector bundles and instances.
- */
-@Path("connectors")
-public interface ConnectorService extends JAXRSService {
-
-    /**
-     * Returns available connector bundles with property keys in selected language.
-     *
-     * @param lang language to select property keys; default language is English
-     * @return available connector bundles with property keys in selected language
-     */
-    @GET
-    @Path("bundles")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    List<ConnBundleTO> getBundles(@QueryParam("lang") String lang);
-
-    /**
-     * Returns configuration for given connector instance.
-     *
-     * @param connInstanceId connector instance id to read configuration from
-     * @return configuration for given connector instance
-     */
-    @GET
-    @Path("{connInstanceId}/configuration")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    List<ConnConfProperty> getConfigurationProperties(@NotNull @PathParam("connInstanceId") Long connInstanceId);
-
-    /**
-     * Returns schema names for connector bundle matching the given connector instance id.
-     *
-     * @param connInstanceId connector instance id to be used for schema lookup
-     * @param connInstanceTO connector instance object to provide special configuration properties
-     * @param includeSpecial if set to true, special schema names (like '__PASSWORD__') will be included;
-     * default is false
-     * @return schema names for connector bundle matching the given connector instance id
-     */
-    @POST
-    @Path("{connInstanceId}/schemaNames")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    List<PlainSchemaTO> getSchemaNames(@NotNull @PathParam("connInstanceId") Long connInstanceId,
-            @NotNull ConnInstanceTO connInstanceTO,
-            @QueryParam("includeSpecial") @DefaultValue("false") boolean includeSpecial);
-
-    /**
-     * Returns supported object classes for connector bundle matching the given connector instance id.
-     *
-     * @param connInstanceId connector instance id to be used for schema lookup
-     * @param connInstanceTO connector instance object to provide special configuration properties
-     * @return supported object classes for connector bundle matching the given connector instance id
-     */
-    @POST
-    @Path("{connInstanceId}/supportedObjectClasses")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    List<ConnIdObjectClassTO> getSupportedObjectClasses(
-            @NotNull @PathParam("connInstanceId") Long connInstanceId,
-            @NotNull ConnInstanceTO connInstanceTO);
-
-    /**
-     * Returns connector instance with matching id.
-     *
-     * @param connInstanceId connector instance id to be read
-     * @return connector instance with matching id
-     */
-    @GET
-    @Path("{connInstanceId}")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    ConnInstanceTO read(@NotNull @PathParam("connInstanceId") Long connInstanceId);
-
-    /**
-     * Returns connector instance for matching resource.
-     *
-     * @param resourceName resource name to be used for connector lookup
-     * @return connector instance for matching resource
-     */
-    @GET
-    @Path("byResource/{resourceName}")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    ConnInstanceTO readByResource(@NotNull @PathParam("resourceName") String resourceName);
-
-    /**
-     * Returns a list of all connector instances with property keys in the matching language.
-     *
-     * @param lang language to select property keys, null for default (English).
-     * An ISO 639 alpha-2 or alpha-3 language code, or a language subtag up to 8 characters in length.
-     * @return list of all connector instances with property keys in the matching language
-     */
-    @GET
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    List<ConnInstanceTO> list(@QueryParam("lang") String lang);
-
-    /**
-     * Creates a new connector instance.
-     *
-     * @param connInstanceTO connector instance to be created
-     * @return <tt>Response</tt> object featuring <tt>Location</tt> header of created connector instance
-     */
-    @Descriptions({
-        @Description(target = DocTarget.RESPONSE,
-                value = "Featuring <tt>Location</tt> header of created connector instance")
-    })
-    @POST
-    @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    Response create(@NotNull ConnInstanceTO connInstanceTO);
-
-    /**
-     * Updates the connector instance matching the provided id.
-     *
-     * @param connInstanceId connector instance id to be updated
-     * @param connInstanceTO connector instance to be stored
-     */
-    @PUT
-    @Path("{connInstanceId}")
-    @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    void update(@NotNull @PathParam("connInstanceId") Long connInstanceId, @NotNull ConnInstanceTO connInstanceTO);
-
-    /**
-     * Deletes the connector instance matching the provided id.
-     *
-     * @param connInstanceId connector instance id to be deleted
-     */
-    @DELETE
-    @Path("{connInstanceId}")
-    void delete(@NotNull @PathParam("connInstanceId") Long connInstanceId);
-
-    /**
-     * @param connInstanceTO connector instance to be used for connection check
-     * @return true if connection could be established
-     */
-    @POST
-    @Path("check")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    boolean check(@NotNull ConnInstanceTO connInstanceTO);
-
-    /**
-     * Reload all connector bundles and instances.
-     */
-    @POST
-    @Path("reload")
-    void reload();
-
-    /**
-     * Executes the provided bulk action.
-     *
-     * @param bulkAction list of connector instance ids against which the bulk action will be performed.
-     * @return Bulk action result
-     */
-    @POST
-    @Path("bulk")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    BulkActionResult bulk(@NotNull BulkAction bulkAction);
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/8b4e52d7/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/EntitlementService.java
----------------------------------------------------------------------
diff --git a/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/EntitlementService.java b/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/EntitlementService.java
deleted file mode 100644
index 220980a..0000000
--- a/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/EntitlementService.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.common.rest.api;
-
-import java.util.List;
-
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import org.apache.syncope.common.lib.wrap.EntitlementTO;
-
-/**
- * REST operations for entitlements.
- */
-@Path("entitlements")
-public interface EntitlementService extends JAXRSService {
-
-    /**
-     * Returns a list of all known entitlements.
-     *
-     * @return list of all known entitlements
-     */
-    @GET
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    List<EntitlementTO> getAllEntitlements();
-
-    /**
-     * Returns a list of entitlements assigned to user making the current request.
-     *
-     * @return list of entitlements assigned to user making the current request
-     */
-    @GET
-    @Path("own")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    List<EntitlementTO> getOwnEntitlements();
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/8b4e52d7/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/JAXRSService.java
----------------------------------------------------------------------
diff --git a/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/JAXRSService.java b/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/JAXRSService.java
deleted file mode 100644
index 4170584..0000000
--- a/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/JAXRSService.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.common.rest.api;
-
-public interface JAXRSService {
-
-    final String PARAM_FIQL = "fiql";
-
-    final String PARAM_PAGE = "page";
-
-    final String DEFAULT_PARAM_PAGE = "1";
-
-    final int DEFAULT_PARAM_PAGE_VALUE = Integer.valueOf(DEFAULT_PARAM_PAGE);
-
-    final String PARAM_SIZE = "size";
-
-    final String DEFAULT_PARAM_SIZE = "25";
-
-    final int DEFAULT_PARAM_SIZE_VALUE = Integer.valueOf(DEFAULT_PARAM_SIZE);
-
-    final String PARAM_ORDERBY = "orderby";
-
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/8b4e52d7/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/LoggerService.java
----------------------------------------------------------------------
diff --git a/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/LoggerService.java b/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/LoggerService.java
deleted file mode 100644
index cfe3a32..0000000
--- a/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/LoggerService.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.common.rest.api;
-
-import java.util.List;
-import javax.validation.constraints.NotNull;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import org.apache.syncope.common.lib.to.EventCategoryTO;
-import org.apache.syncope.common.lib.to.LoggerTO;
-import org.apache.syncope.common.lib.types.LoggerType;
-
-/**
- * REST operations for logging and auditing.
- */
-@Path("logger")
-public interface LoggerService extends JAXRSService {
-
-    /**
-     * Returns a list of all managed events in audit.
-     *
-     * @return list of all managed events in audit
-     */
-    @GET
-    @Path("events")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    List<EventCategoryTO> events();
-
-    /**
-     * Returns logger with matching type and name.
-     *
-     * @param type LoggerType to be selected.
-     * @param name Logger name to be read
-     * @return logger with matching type and name
-     */
-    @GET
-    @Path("{type}/{name}")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    LoggerTO read(@NotNull @PathParam("type") LoggerType type, @NotNull @PathParam("name") final String name);
-
-    /**
-     * Returns a list of loggers with matching type.
-     *
-     * @param type LoggerType to be selected
-     * @return list of loggers with matching type
-     */
-    @GET
-    @Path("{type}")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    List<LoggerTO> list(@NotNull @PathParam("type") LoggerType type);
-
-    /**
-     * Creates or updates (if existing) the logger with matching name.
-     *
-     * @param type LoggerType to be selected
-     * @param name Logger name to be updated
-     * @param logger Logger to be created or updated
-     */
-    @PUT
-    @Path("{type}/{name}")
-    @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    void update(@NotNull @PathParam("type") LoggerType type, @NotNull @PathParam("name") String name,
-            @NotNull LoggerTO logger);
-
-    /**
-     * Deletes the logger with matching name.
-     *
-     * @param type LoggerType to be selected
-     * @param name Logger name to be deleted
-     */
-    @DELETE
-    @Path("{type}/{name}")
-    void delete(@NotNull @PathParam("type") LoggerType type, @NotNull @PathParam("name") String name);
-
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/8b4e52d7/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/NotificationService.java
----------------------------------------------------------------------
diff --git a/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/NotificationService.java b/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/NotificationService.java
deleted file mode 100644
index 348f25b..0000000
--- a/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/NotificationService.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.common.rest.api;
-
-import java.util.List;
-import javax.validation.constraints.NotNull;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.apache.cxf.jaxrs.model.wadl.Description;
-import org.apache.cxf.jaxrs.model.wadl.Descriptions;
-import org.apache.cxf.jaxrs.model.wadl.DocTarget;
-import org.apache.syncope.common.lib.to.NotificationTO;
-
-/**
- * REST operations for notifications.
- */
-@Path("notifications")
-public interface NotificationService extends JAXRSService {
-
-    /**
-     * Returns notification with matching id.
-     *
-     * @param notificationId id of notification to be read
-     * @return notification with matching id
-     */
-    @GET
-    @Path("{notificationId}")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    NotificationTO read(@NotNull @PathParam("notificationId") Long notificationId);
-
-    /**
-     * Returns a list of all notifications.
-     *
-     * @return list of all notifications.
-     */
-    @GET
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    List<NotificationTO> list();
-
-    /**
-     * Creates a new notification.
-     *
-     * @param notificationTO Creates a new notification.
-     * @return <tt>Response</tt> object featuring <tt>Location</tt> header of created notification
-     */
-    @Descriptions({
-        @Description(target = DocTarget.RESPONSE,
-                value = "Featuring <tt>Location</tt> header of created notification")
-    })
-    @POST
-    @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    Response create(@NotNull NotificationTO notificationTO);
-
-    /**
-     * Updates the notification matching the given id.
-     *
-     * @param notificationId id of notification to be updated
-     * @param notificationTO notification to be stored
-     */
-    @PUT
-    @Path("{notificationId}")
-    @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    void update(@NotNull @PathParam("notificationId") Long notificationId, @NotNull NotificationTO notificationTO);
-
-    /**
-     * Deletes the notification matching the given id.
-     *
-     * @param notificationId id for notification to be deleted
-     */
-    @DELETE
-    @Path("{notificationId}")
-    void delete(@NotNull @PathParam("notificationId") Long notificationId);
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/8b4e52d7/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/PolicyService.java
----------------------------------------------------------------------
diff --git a/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/PolicyService.java b/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/PolicyService.java
deleted file mode 100644
index 18cfe29..0000000
--- a/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/PolicyService.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.common.rest.api;
-
-import java.util.List;
-import javax.validation.constraints.NotNull;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.MatrixParam;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.apache.cxf.jaxrs.model.wadl.Description;
-import org.apache.cxf.jaxrs.model.wadl.Descriptions;
-import org.apache.cxf.jaxrs.model.wadl.DocTarget;
-import org.apache.syncope.common.lib.to.AbstractPolicyTO;
-import org.apache.syncope.common.lib.types.PolicyType;
-import org.apache.syncope.common.lib.wrap.CorrelationRuleClass;
-
-/**
- * REST operations for policies.
- */
-@Path("policies")
-public interface PolicyService extends JAXRSService {
-
-    /**
-     * Returns a list of classes to be used as correlation rules.
-     *
-     * @return list of classes to be used as correlation rules
-     */
-    @GET
-    @Path("syncCorrelationRuleClasses")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    List<CorrelationRuleClass> getSyncCorrelationRuleClasses();
-
-    /**
-     * Returns the policy matching the given id.
-     *
-     * @param policyId id of requested policy
-     * @param <T> response type (extending PolicyTO)
-     * @return policy with matching id
-     */
-    @GET
-    @Path("{policyId}")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    <T extends AbstractPolicyTO> T read(@NotNull @PathParam("policyId") Long policyId);
-
-    /**
-     * Returns the global policy for the given type.
-     *
-     * @param type PolicyType to read global policy from
-     * @param <T> response type (extending PolicyTO)
-     * @return global policy for matching type
-     */
-    @GET
-    @Path("global")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    <T extends AbstractPolicyTO> T readGlobal(@NotNull @MatrixParam("type") PolicyType type);
-
-    /**
-     * Returns a list of policies of the matching type.
-     *
-     * @param type Type selector for requested policies
-     * @param <T> response type (extending PolicyTO)
-     * @return list of policies with matching type
-     */
-    @GET
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    <T extends AbstractPolicyTO> List<T> list(@NotNull @MatrixParam("type") PolicyType type);
-
-    /**
-     * Create a new policy.
-     *
-     * @param policyTO Policy to be created (needs to match type)
-     * @param <T> response type (extending PolicyTO)
-     * @return <tt>Response</tt> object featuring <tt>Location</tt> header of created policy
-     */
-    @Descriptions({
-        @Description(target = DocTarget.RESPONSE, value = "Featuring <tt>Location</tt> header of created policy")
-    })
-    @POST
-    @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    <T extends AbstractPolicyTO> Response create(@NotNull T policyTO);
-
-    /**
-     * Updates policy matching the given id.
-     *
-     * @param policyId id of policy to be updated
-     * @param policyTO Policy to replace existing policy
-     * @param <T> response type (extending PolicyTO)
-     */
-    @PUT
-    @Path("{policyId}")
-    @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    <T extends AbstractPolicyTO> void update(@NotNull @PathParam("policyId") Long policyId, @NotNull T policyTO);
-
-    /**
-     * Delete policy matching the given id.
-     *
-     * @param policyId id of policy to be deleted
-     * @param <T> response type (extending PolicyTO)
-     */
-    @DELETE
-    @Path("{policyId}")
-    <T extends AbstractPolicyTO> void delete(@NotNull @PathParam("policyId") Long policyId);
-
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/8b4e52d7/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/Preference.java
----------------------------------------------------------------------
diff --git a/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/Preference.java b/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/Preference.java
new file mode 100644
index 0000000..5cda9cf
--- /dev/null
+++ b/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/Preference.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.common.rest.api;
+
+/**
+ * Preferences available to be specified during requests.
+ *
+ * @see RESTHeaders#PREFER
+ * @see RESTHeaders#PREFERENCE_APPLIED
+ */
+public enum Preference {
+
+    NONE(""),
+    RETURN_CONTENT("return-content"),
+    RETURN_NO_CONTENT("return-no-content");
+
+    private String literal;
+
+    private Preference(final String literal) {
+        this.literal = literal;
+    }
+
+    @Override
+    public String toString() {
+        return literal;
+    }
+
+    public static Preference fromString(final String literal) {
+        Preference result = null;
+
+        for (Preference preference : values()) {
+            if (preference.toString().equalsIgnoreCase(literal)) {
+                result = preference;
+            }
+        }
+
+        if (result == null) {
+            result = NONE;
+        }
+
+        return result;
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/8b4e52d7/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/ReportService.java
----------------------------------------------------------------------
diff --git a/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/ReportService.java b/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/ReportService.java
deleted file mode 100644
index 4911af7..0000000
--- a/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/ReportService.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.common.rest.api;
-
-import java.util.List;
-import javax.validation.constraints.Min;
-import javax.validation.constraints.NotNull;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.apache.cxf.jaxrs.model.wadl.Description;
-import org.apache.cxf.jaxrs.model.wadl.Descriptions;
-import org.apache.cxf.jaxrs.model.wadl.DocTarget;
-import org.apache.syncope.common.lib.to.PagedResult;
-import org.apache.syncope.common.lib.to.ReportExecTO;
-import org.apache.syncope.common.lib.to.ReportTO;
-import org.apache.syncope.common.lib.types.ReportExecExportFormat;
-import org.apache.syncope.common.lib.wrap.ReportletConfClass;
-
-/**
- * REST operations for reports.
- */
-@Path("reports")
-public interface ReportService extends JAXRSService {
-
-    /**
-     * Returns a list of available classes for reportlet configuration.
-     *
-     * @return list of available classes for reportlet configuration
-     */
-    @GET
-    @Path("reportletConfClasses")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    List<ReportletConfClass> getReportletConfClasses();
-
-    /**
-     * Returns report with matching id.
-     *
-     * @param reportId id of report to be read
-     * @return report with matching id
-     */
-    @GET
-    @Path("{reportId}")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    ReportTO read(@NotNull @PathParam("reportId") Long reportId);
-
-    /**
-     * Returns report execution with matching id.
-     *
-     * @param executionId report execution id to be selected
-     * @return report execution with matching id
-     */
-    @GET
-    @Path("executions/{executionId}")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    ReportExecTO readExecution(@NotNull @PathParam("executionId") Long executionId);
-
-    /**
-     * Returns a paged list of all existing reports.
-     *
-     * @return paged list of all existing reports
-     */
-    @GET
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    PagedResult<ReportTO> list();
-
-    /**
-     * Returns a paged list of all existing reports.
-     *
-     * @param orderBy list of ordering clauses, separated by comma
-     * @return paged list of all existing reports
-     */
-    @GET
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    PagedResult<ReportTO> list(@QueryParam(PARAM_ORDERBY) String orderBy);
-
-    /**
-     * Returns a paged list of all existing reports matching page/size conditions.
-     *
-     * @param page selected page in relation to size
-     * @param size number of entries per page
-     * @return paged list of existing reports matching page/size conditions
-     */
-    @GET
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    PagedResult<ReportTO> list(
-            @NotNull @Min(1) @QueryParam(PARAM_PAGE) @DefaultValue(DEFAULT_PARAM_PAGE) Integer page,
-            @NotNull @Min(1) @QueryParam(PARAM_SIZE) @DefaultValue(DEFAULT_PARAM_SIZE) Integer size);
-
-    /**
-     * Returns a paged list of all existing reports matching page/size conditions.
-     *
-     * @param page selected page in relation to size
-     * @param size number of entries per page
-     * @param orderBy list of ordering clauses, separated by comma
-     * @return paged list of existing reports matching page/size conditions
-     */
-    @GET
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    PagedResult<ReportTO> list(
-            @NotNull @Min(1) @QueryParam(PARAM_PAGE) @DefaultValue(DEFAULT_PARAM_PAGE) Integer page,
-            @NotNull @Min(1) @QueryParam(PARAM_SIZE) @DefaultValue(DEFAULT_PARAM_SIZE) Integer size,
-            @QueryParam(PARAM_ORDERBY) String orderBy);
-
-    /**
-     * Creates a new report.
-     *
-     * @param reportTO report to be created
-     * @return <tt>Response</tt> object featuring <tt>Location</tt> header of created report
-     */
-    @Descriptions({
-        @Description(target = DocTarget.RESPONSE, value = "Featuring <tt>Location</tt> header of created report")
-    })
-    @POST
-    @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    Response create(@NotNull ReportTO reportTO);
-
-    /**
-     * Updates report with matching id.
-     *
-     * @param reportId id for report to be updated
-     * @param reportTO report to be stored
-     */
-    @PUT
-    @Path("{reportId}")
-    @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    void update(@NotNull @PathParam("reportId") Long reportId, ReportTO reportTO);
-
-    /**
-     * Deletes report with matching id.
-     *
-     * @param reportId Deletes report with matching id
-     */
-    @DELETE
-    @Path("{reportId}")
-    void delete(@NotNull @PathParam("reportId") Long reportId);
-
-    /**
-     * Deletes report execution with matching id.
-     *
-     * @param executionId id of execution report to be deleted
-     */
-    @DELETE
-    @Path("executions/{executionId}")
-    void deleteExecution(@NotNull @PathParam("executionId") Long executionId);
-
-    /**
-     * Executes the report with matching id.
-     *
-     * @param reportId id of report to be executed
-     * @return report execution result
-     */
-    @POST
-    @Path("{reportId}/execute")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    ReportExecTO execute(@NotNull @PathParam("reportId") Long reportId);
-
-    /**
-     * Exports the report execution with matching id in the requested format.
-     *
-     * @param executionId id of execution report to be selected
-     * @param fmt file-format selection
-     * @return a stream for content download
-     */
-    @GET
-    @Path("executions/{executionId}/stream")
-    @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    Response exportExecutionResult(@NotNull @PathParam("executionId") Long executionId,
-            @QueryParam("format") ReportExecExportFormat fmt);
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/8b4e52d7/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/ResourceService.java
----------------------------------------------------------------------
diff --git a/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/ResourceService.java b/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/ResourceService.java
deleted file mode 100644
index 6ddd3af..0000000
--- a/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/ResourceService.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.common.rest.api;
-
-import java.util.List;
-import javax.validation.constraints.NotNull;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.MatrixParam;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.apache.cxf.jaxrs.model.wadl.Description;
-import org.apache.cxf.jaxrs.model.wadl.Descriptions;
-import org.apache.cxf.jaxrs.model.wadl.DocTarget;
-import org.apache.syncope.common.lib.to.BulkAction;
-import org.apache.syncope.common.lib.to.BulkActionResult;
-import org.apache.syncope.common.lib.to.ConnObjectTO;
-import org.apache.syncope.common.lib.to.ResourceTO;
-import org.apache.syncope.common.lib.types.ResourceDeassociationActionType;
-import org.apache.syncope.common.lib.types.SubjectType;
-import org.apache.syncope.common.lib.wrap.PropagationActionClass;
-import org.apache.syncope.common.lib.wrap.SubjectId;
-
-/**
- * REST operations for external resources.
- */
-@Path("resources")
-public interface ResourceService extends JAXRSService {
-
-    /**
-     * Returns connector object from the external resource, for the given type and id.
-     *
-     * @param resourceName Name of resource to read connector object from
-     * @param type user / role
-     * @param id user id / role id
-     * @return connector object from the external resource, for the given type and id
-     */
-    @GET
-    @Path("{resourceName}/{type}/{id}")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    ConnObjectTO getConnectorObject(@NotNull @PathParam("resourceName") String resourceName,
-            @NotNull @PathParam("type") SubjectType type, @NotNull @PathParam("id") Long id);
-
-    /**
-     * Returns a list of classes that can be used to customize the propagation process.
-     *
-     * @return list of classes that can be used to customize the propagation process
-     */
-    @GET
-    @Path("propagationActionsClasses")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    List<PropagationActionClass> getPropagationActionsClasses();
-
-    /**
-     * Returns the resource with matching name.
-     *
-     * @param resourceName Name of resource to be read
-     * @return resource with matching name
-     */
-    @GET
-    @Path("{resourceName}")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    ResourceTO read(@NotNull @PathParam("resourceName") String resourceName);
-
-    /**
-     * Returns a list of all resources.
-     *
-     * @return list of all resources
-     */
-    @GET
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    List<ResourceTO> list();
-
-    /**
-     * Returns a list of resources using matching connector instance id.
-     *
-     * @param connInstanceId Connector id to filter for resources
-     * @return resources using matching connector instance id
-     */
-    @GET
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    List<ResourceTO> list(@NotNull @MatrixParam("connectorId") Long connInstanceId);
-
-    /**
-     * Creates a new resource.
-     *
-     * @param resourceTO Resource to be created
-     * @return <tt>Response</tt> object featuring <tt>Location</tt> header of created resource
-     */
-    @Descriptions({
-        @Description(target = DocTarget.RESPONSE,
-                value = "Featuring <tt>Location</tt> header of created resource")
-    })
-    @POST
-    @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    Response create(@NotNull ResourceTO resourceTO);
-
-    /**
-     * Updates the resource matching the given name.
-     *
-     * @param resourceName name of resource to be updated
-     * @param resourceTO resource to be stored
-     */
-    @PUT
-    @Path("{resourceName}")
-    @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    void update(@NotNull @PathParam("resourceName") String resourceName, @NotNull ResourceTO resourceTO);
-
-    /**
-     * Deletes the resource matching the given name.
-     *
-     * @param resourceName name of resource to be deleted
-     */
-    @DELETE
-    @Path("{resourceName}")
-    @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    void delete(@NotNull @PathParam("resourceName") String resourceName);
-
-    /**
-     * Checks wether the connection to resource could be established.
-     *
-     * @param resourceTO resource to be checked
-     * @return true if connection to resource could be established
-     */
-    @POST
-    @Path("check")
-    @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    boolean check(@NotNull ResourceTO resourceTO);
-
-    /**
-     * De-associate users or roles (depending on the provided subject type) from the given resource.
-     *
-     * @param resourceName name of resource
-     * @param subjectType subject type (user or role)
-     * @param type resource de-association action type
-     * @param subjectIds users or roles against which the bulk action will be performed
-     * @return <tt>Response</tt> object featuring {@link BulkActionResult} as <tt>Entity</tt>
-     */
-    @Descriptions({
-        @Description(target = DocTarget.RESPONSE,
-                value = "Featuring <tt>BulkActionResult</tt> as <tt>Entity</tt>")
-    })
-    @POST
-    @Path("{resourceName}/bulkDeassociation/{subjType}/{type}")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    BulkActionResult bulkDeassociation(@NotNull @PathParam("resourceName") String resourceName,
-            @NotNull @PathParam("subjType") SubjectType subjectType,
-            @NotNull @PathParam("type") ResourceDeassociationActionType type, @NotNull List<SubjectId> subjectIds);
-
-    /**
-     * Executes the provided bulk action.
-     *
-     * @param bulkAction list of resource names against which the bulk action will be performed
-     * @return Bulk action result
-     */
-    @POST
-    @Path("bulk")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    BulkActionResult bulk(@NotNull BulkAction bulkAction);
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/8b4e52d7/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/RoleService.java
----------------------------------------------------------------------
diff --git a/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/RoleService.java b/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/RoleService.java
deleted file mode 100644
index 6692648..0000000
--- a/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/RoleService.java
+++ /dev/null
@@ -1,313 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.common.rest.api;
-
-import java.util.List;
-import javax.validation.constraints.Min;
-import javax.validation.constraints.NotNull;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.apache.cxf.jaxrs.model.wadl.Description;
-import org.apache.cxf.jaxrs.model.wadl.Descriptions;
-import org.apache.cxf.jaxrs.model.wadl.DocTarget;
-import org.apache.syncope.common.lib.mod.RoleMod;
-import org.apache.syncope.common.lib.to.BulkAction;
-import org.apache.syncope.common.lib.to.BulkActionResult;
-import org.apache.syncope.common.lib.to.PagedResult;
-import org.apache.syncope.common.lib.to.RoleTO;
-import org.apache.syncope.common.lib.types.ResourceAssociationActionType;
-import org.apache.syncope.common.lib.types.ResourceDeassociationActionType;
-import org.apache.syncope.common.lib.wrap.ResourceName;
-
-/**
- * REST operations for roles.
- */
-@Path("roles")
-public interface RoleService extends JAXRSService {
-
-    /**
-     * Returns children roles of given role.
-     *
-     * @param roleId id of role to get children from
-     * @return children roles of given role
-     */
-    @GET
-    @Path("{roleId}/children")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    List<RoleTO> children(@NotNull @PathParam("roleId") Long roleId);
-
-    /**
-     * Returns parent role of the given role (or null if no parent exists).
-     *
-     * @param roleId id of role to get parent role from
-     * @return parent role of the given role (or null if no parent exists)
-     */
-    @GET
-    @Path("{roleId}/parent")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    RoleTO parent(@NotNull @PathParam("roleId") Long roleId);
-
-    /**
-     * Reads the role matching the provided roleId.
-     *
-     * @param roleId id of role to be read
-     * @return role with matching id
-     */
-    @GET
-    @Path("{roleId}")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    RoleTO read(@NotNull @PathParam("roleId") Long roleId);
-
-    /**
-     * This method is similar to {@link #read(Long)}, but uses different authentication handling to ensure that a user
-     * can read his own roles.
-     *
-     * @param roleId id of role to be read
-     * @return role with matching id
-     */
-    @Descriptions({
-        @Description(target = DocTarget.METHOD,
-                value = "This method is similar to <tt>read()</tt>, but uses different authentication handling to "
-                + "ensure that a user can read his own roles.")
-    })
-    @GET
-    @Path("{roleId}/own")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    RoleTO readSelf(@NotNull @PathParam("roleId") Long roleId);
-
-    /**
-     * Returns a paged list of existing roles.
-     *
-     * @return paged list of all existing roles
-     */
-    @GET
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    PagedResult<RoleTO> list();
-
-    /**
-     * Returns a paged list of existing roles.
-     *
-     * @param orderBy list of ordering clauses, separated by comma
-     * @return paged list of all existing roles
-     */
-    @GET
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    PagedResult<RoleTO> list(@QueryParam(PARAM_ORDERBY) String orderBy);
-
-    /**
-     * Returns a paged list of existing roles matching page/size conditions.
-     *
-     * @param page result page number
-     * @param size number of entries per page
-     * @return paged list of existing roles matching page/size conditions
-     */
-    @GET
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    PagedResult<RoleTO> list(
-            @NotNull @Min(1) @QueryParam(PARAM_PAGE) @DefaultValue(DEFAULT_PARAM_PAGE) Integer page,
-            @NotNull @Min(1) @QueryParam(PARAM_SIZE) @DefaultValue(DEFAULT_PARAM_SIZE) Integer size);
-
-    /**
-     * Returns a paged list of existing roles matching page/size conditions.
-     *
-     * @param page result page number
-     * @param size number of entries per page
-     * @param orderBy list of ordering clauses, separated by comma
-     * @return paged list of existing roles matching page/size conditions
-     */
-    @GET
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    PagedResult<RoleTO> list(
-            @NotNull @Min(1) @QueryParam(PARAM_PAGE) @DefaultValue(DEFAULT_PARAM_PAGE) Integer page,
-            @NotNull @Min(1) @QueryParam(PARAM_SIZE) @DefaultValue(DEFAULT_PARAM_SIZE) Integer size,
-            @QueryParam(PARAM_ORDERBY) String orderBy);
-
-    /**
-     * Returns a paged list of roles matching the provided FIQL search condition.
-     *
-     * @param fiql FIQL search expression
-     * @return paged list of roles matching the provided FIQL search condition
-     */
-    @GET
-    @Path("search")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    PagedResult<RoleTO> search(@NotNull @QueryParam(PARAM_FIQL) String fiql);
-
-    /**
-     * Returns a paged list of roles matching the provided FIQL search condition.
-     *
-     * @param fiql FIQL search expression
-     * @param orderBy list of ordering clauses, separated by comma
-     * @return paged list of roles matching the provided FIQL search condition
-     */
-    @GET
-    @Path("search")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    PagedResult<RoleTO> search(
-            @NotNull @QueryParam(PARAM_FIQL) String fiql, @QueryParam(PARAM_ORDERBY) String orderBy);
-
-    /**
-     * Returns a paged list of roles matching the provided FIQL search condition.
-     *
-     * @param fiql FIQL search expression
-     * @param page result page number
-     * @param size number of entries per page
-     * @return paged list of roles matching the provided FIQL search condition
-     */
-    @GET
-    @Path("search")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    PagedResult<RoleTO> search(@QueryParam(PARAM_FIQL) String fiql,
-            @NotNull @Min(1) @QueryParam(PARAM_PAGE) @DefaultValue(DEFAULT_PARAM_PAGE) Integer page,
-            @NotNull @Min(1) @QueryParam(PARAM_SIZE) @DefaultValue(DEFAULT_PARAM_SIZE) Integer size);
-
-    /**
-     * Returns a paged list of roles matching the provided FIQL search condition.
-     *
-     * @param fiql FIQL search expression
-     * @param page result page number
-     * @param size number of entries per page
-     * @param orderBy list of ordering clauses, separated by comma
-     * @return paged list of roles matching the provided FIQL search condition
-     */
-    @GET
-    @Path("search")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    PagedResult<RoleTO> search(@QueryParam(PARAM_FIQL) String fiql,
-            @NotNull @Min(1) @QueryParam(PARAM_PAGE) @DefaultValue(DEFAULT_PARAM_PAGE) Integer page,
-            @NotNull @Min(1) @QueryParam(PARAM_SIZE) @DefaultValue(DEFAULT_PARAM_SIZE) Integer size,
-            @QueryParam(PARAM_ORDERBY) String orderBy);
-
-    /**
-     * Creates a new role.
-     *
-     * @param roleTO role to be created
-     * @return <tt>Response</tt> object featuring <tt>Location</tt> header of created role as well as the role itself
-     * enriched with propagation status information - {@link RoleTO} as <tt>Entity</tt>
-     */
-    @Descriptions({
-        @Description(target = DocTarget.RESPONSE,
-                value = "Featuring <tt>Location</tt> header of created role as well as the "
-                + "role itself enriched with propagation status information - <tt>RoleTO</tt> as <tt>Entity</tt>")
-    })
-    @POST
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    Response create(@NotNull RoleTO roleTO);
-
-    /**
-     * Updates role matching the provided roleId.
-     *
-     * @param roleId id of role to be updated
-     * @param roleMod modification to be applied to role matching the provided roleId
-     * @return <tt>Response</tt> object featuring the updated role enriched with propagation status information
-     * - {@link RoleTO} as <tt>Entity</tt>
-     */
-    @Descriptions({
-        @Description(target = DocTarget.RESPONSE,
-                value = "Featuring the updated role enriched with propagation status information - "
-                + "<tt>RoleTO</tt> as <tt>Entity</tt>")
-    })
-    @POST
-    @Path("{roleId}")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    Response update(@NotNull @PathParam("roleId") Long roleId, @NotNull RoleMod roleMod);
-
-    /**
-     * Deletes role matching provided roleId.
-     *
-     * @param roleId id of role to be deleted
-     * @return <tt>Response</tt> object featuring the deleted role enriched with propagation status information
-     * - {@link RoleTO} as <tt>Entity</tt>
-     */
-    @Descriptions({
-        @Description(target = DocTarget.RESPONSE,
-                value = "Featuring the deleted role enriched with propagation status information - "
-                + "<tt>RoleTO</tt> as <tt>Entity</tt>")
-    })
-    @DELETE
-    @Path("{roleId}")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    Response delete(@NotNull @PathParam("roleId") Long roleId);
-
-    /**
-     * Executes resource-related operations on given role.
-     *
-     * @param roleId role id.
-     * @param type resource association action type
-     * @param resourceNames external resources to be used for propagation-related operations
-     * @return <tt>Response</tt> object featuring
-     * {@link org.apache.syncope.common.reqres.BulkActionResult} as <tt>Entity</tt>
-     */
-    @Descriptions({
-        @Description(target = DocTarget.RESPONSE,
-                value = "Featuring <tt>BulkActionResult</tt> as <tt>Entity</tt>")
-    })
-    @POST
-    @Path("{roleId}/deassociate/{type}")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    Response bulkDeassociation(@NotNull @PathParam("roleId") Long roleId,
-            @NotNull @PathParam("type") ResourceDeassociationActionType type,
-            @NotNull List<ResourceName> resourceNames);
-
-    /**
-     * Executes resource-related operations on given role.
-     *
-     * @param roleId role id.
-     * @param type resource association action type
-     * @param resourceNames external resources to be used for propagation-related operations
-     * @return <tt>Response</tt> object featuring {@link org.apache.syncope.common.reqres.BulkActionResult}
-     * as <tt>Entity</tt>
-     */
-    @Descriptions({
-        @Description(target = DocTarget.RESPONSE,
-                value = "Featuring <tt>BulkActionResult</tt> as <tt>Entity</tt>")
-    })
-    @POST
-    @Path("{roleId}/associate/{type}")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    Response bulkAssociation(@NotNull @PathParam("roleId") Long roleId,
-            @NotNull @PathParam("type") ResourceAssociationActionType type,
-            @NotNull List<ResourceName> resourceNames);
-
-    /**
-     * Executes the provided bulk action.
-     *
-     * @param bulkAction list of role ids against which the bulk action will be performed.
-     * @return Bulk action result
-     */
-    @POST
-    @Path("bulk")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    BulkActionResult bulk(@NotNull BulkAction bulkAction);
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/8b4e52d7/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/SchemaService.java
----------------------------------------------------------------------
diff --git a/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/SchemaService.java b/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/SchemaService.java
deleted file mode 100644
index 84ac9d6..0000000
--- a/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/SchemaService.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.common.rest.api;
-
-import java.util.List;
-import javax.validation.constraints.NotNull;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.apache.cxf.jaxrs.model.wadl.Description;
-import org.apache.cxf.jaxrs.model.wadl.Descriptions;
-import org.apache.cxf.jaxrs.model.wadl.DocTarget;
-import org.apache.syncope.common.lib.to.AbstractSchemaTO;
-import org.apache.syncope.common.lib.types.AttributableType;
-import org.apache.syncope.common.lib.types.SchemaType;
-
-/**
- * REST operations for attribute schemas.
- */
-@Path("schemas/{kind}/{type}")
-public interface SchemaService extends JAXRSService {
-
-    /**
-     * Returns schema matching the given kind, type and name.
-     *
-     * @param <T> actual SchemaTO
-     * @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 schema matching the given kind, type and name
-     */
-    @GET
-    @Path("{name}")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    <T extends AbstractSchemaTO> T read(@NotNull @PathParam("kind") AttributableType attrType,
-            @NotNull @PathParam("type") SchemaType schemaType, @NotNull @PathParam("name") String schemaName);
-
-    /**
-     * Returns a list of schemas with matching kind and type.
-     *
-     * @param <T> actual SchemaTO
-     * @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
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    <T extends AbstractSchemaTO> List<T> list(
-            @NotNull @PathParam("kind") AttributableType attrType, @NotNull @PathParam("type") SchemaType schemaType);
-
-    /**
-     * Creates a new schema.
-     *
-     * @param <T> actual SchemaTO
-     * @param attrType kind for schema to be created
-     * @param schemaType type for schema to be created
-     * @param schemaTO schema to be created
-     * @return <tt>Response</tt> object featuring <tt>Location</tt> header of created schema
-     */
-    @Descriptions({
-        @Description(target = DocTarget.RESPONSE, value = "Featuring <tt>Location</tt> header of created schema")
-    })
-    @POST
-    @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    <T extends AbstractSchemaTO> Response create(@NotNull @PathParam("kind") AttributableType attrType,
-            @NotNull @PathParam("type") SchemaType schemaType, @NotNull T schemaTO);
-
-    /**
-     * Updates the schema matching the given kind, type and name.
-     *
-     * @param <T> actual SchemaTO
-     * @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 updated schema to be stored
-     */
-    @PUT
-    @Path("{name}")
-    @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    <T extends AbstractSchemaTO> void update(@NotNull @PathParam("kind") AttributableType attrType,
-            @NotNull @PathParam("type") SchemaType schemaType,
-            @NotNull @PathParam("name") String schemaName, @NotNull T schemaTO);
-
-    /**
-     * Deletes the schema matching the given kind, type and name.
-     *
-     * @param attrType kind for schema to be deleted
-     * @param schemaType type for schema to be deleted
-     * @param schemaName name of schema to be deleted
-     */
-    @DELETE
-    @Path("{name}")
-    void delete(@NotNull @PathParam("kind") AttributableType attrType,
-            @NotNull @PathParam("type") SchemaType schemaType,
-            @NotNull @PathParam("name") String schemaName);
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/8b4e52d7/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/SecurityQuestionService.java
----------------------------------------------------------------------
diff --git a/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/SecurityQuestionService.java b/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/SecurityQuestionService.java
deleted file mode 100644
index b52fbcf..0000000
--- a/syncope620/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/SecurityQuestionService.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.common.rest.api;
-
-import java.util.List;
-import javax.validation.constraints.NotNull;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.apache.cxf.jaxrs.model.wadl.Description;
-import org.apache.cxf.jaxrs.model.wadl.Descriptions;
-import org.apache.cxf.jaxrs.model.wadl.DocTarget;
-import org.apache.syncope.common.lib.to.SecurityQuestionTO;
-
-/**
- * REST operations for configuration.
- */
-@Path("securityQuestions")
-public interface SecurityQuestionService extends JAXRSService {
-
-    /**
-     * Returns a list of all security questions.
-     *
-     * @return list of all security questions
-     */
-    @GET
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    List<SecurityQuestionTO> list();
-
-    /**
-     * Returns security question with matching id.
-     *
-     * @param securityQuestionId security question id to be read
-     * @return security question with matching id
-     */
-    @GET
-    @Path("{securityQuestionId}")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    SecurityQuestionTO read(@NotNull @PathParam("securityQuestionId") Long securityQuestionId);
-
-    /**
-     * Creates a new security question.
-     *
-     * @param securityQuestionTO security question to be created
-     * @return <tt>Response</tt> object featuring <tt>Location</tt> header of created security question
-     */
-    @Descriptions({
-        @Description(target = DocTarget.RESPONSE,
-                value = "Featuring <tt>Location</tt> header of created security question")
-    })
-    @POST
-    @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    Response create(@NotNull SecurityQuestionTO securityQuestionTO);
-
-    /**
-     * Updates the security question matching the provided id.
-     *
-     * @param securityQuestionId security question id to be updated
-     * @param securityQuestionTO security question to be stored
-     */
-    @PUT
-    @Path("{securityQuestionId}")
-    @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    void update(@NotNull @PathParam("securityQuestionId") Long securityQuestionId,
-            @NotNull SecurityQuestionTO securityQuestionTO);
-
-    /**
-     * Deletes the security question matching the provided id.
-     *
-     * @param securityQuestionId security question id to be deleted
-     */
-    @DELETE
-    @Path("{securityQuestionId}")
-    void delete(@NotNull @PathParam("securityQuestionId") Long securityQuestionId);
-
-    /**
-     * Ask for security question configured for the user matching the given username, if any.
-     *
-     * @param username username for which the security question is requested
-     * @return security question, if configured for the user matching the given username
-     */
-    @GET
-    @Path("byUser/{username}")
-    @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    SecurityQuestionTO readByUser(@NotNull @PathParam("username") String username);
-}