syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbernha...@apache.org
Subject svn commit: r1416827 [1/5] - in /syncope/branches/cxf/core/src: main/java/org/apache/syncope/core/init/ main/java/org/apache/syncope/core/notification/ main/java/org/apache/syncope/core/persistence/dao/ main/java/org/apache/syncope/core/persistence/dao...
Date Tue, 04 Dec 2012 09:02:36 GMT
Author: jbernhardt
Date: Tue Dec  4 09:02:21 2012
New Revision: 1416827

URL: http://svn.apache.org/viewvc?rev=1416827&view=rev
Log:
Checkin updated Role and User Service implementations, as well as modified Exception handling.

Added:
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/QueryResourceInfoComperator.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/RoleController.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/UserController.java
    syncope/branches/cxf/core/src/test/java/org/apache/syncope/core/notification/NotificationTests.java
    syncope/branches/cxf/core/src/test/java/org/apache/syncope/core/rest/AbstractRoleTestITCase.java
    syncope/branches/cxf/core/src/test/java/org/apache/syncope/core/rest/AbstractUserTestITCase.java
    syncope/branches/cxf/core/src/test/java/org/apache/syncope/core/rest/RoleJsonTestITCase.java
    syncope/branches/cxf/core/src/test/java/org/apache/syncope/core/rest/RoleXmlTestITCase.java
    syncope/branches/cxf/core/src/test/java/org/apache/syncope/core/rest/UserJsonTestITCase.java
    syncope/branches/cxf/core/src/test/java/org/apache/syncope/core/rest/UserXmlTestITCase.java
Modified:
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/init/ConnInstanceLoader.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/AttrDAO.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/AttrValueDAO.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/ConfDAO.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/ConnInstanceDAO.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/DerAttrDAO.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/DerSchemaDAO.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/EntitlementDAO.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/LoggerDAO.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/MembershipDAO.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/NotificationDAO.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/ReportDAO.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/ReportExecDAO.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/ResourceDAO.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/RoleDAO.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/SchemaDAO.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/TaskDAO.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/TaskExecDAO.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/UserDAO.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/UserRequestDAO.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/VirAttrDAO.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/VirSchemaDAO.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/ConnInstanceDAOImpl.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/NotificationDAOImpl.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/ReportDAOImpl.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/ReportExecDAOImpl.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/ResourceDAOImpl.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/TaskExecDAOImpl.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/UserRequestDAOImpl.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/validation/entity/EntityValidationInterceptor.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/propagation/AbstractPropagationTaskExecutor.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/propagation/ConnectorFacadeProxy.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/propagation/PropagationManager.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/ConnInstanceController.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/DerivedSchemaController.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/LoggerController.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/NotificationController.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/PolicyController.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/ReportController.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/ResourceController.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/SchemaController.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/TaskController.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/UserRequestController.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/VirtualSchemaController.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/WorkflowController.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/data/ConnInstanceDataBinder.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/data/ResourceDataBinder.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/data/RoleDataBinder.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/data/TaskDataBinder.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/data/UserDataBinder.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/data/UserRequestDataBinder.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/sync/SyncopeSyncResultHanlder.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/util/ConnBundleManager.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/util/ConnObjectUtil.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/workflow/AbstractUserWorkflowAdapter.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/workflow/ActivitiUserWorkflowAdapter.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/workflow/NoOpUserWorkflowAdapter.java
    syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/workflow/UserWorkflowAdapter.java
    syncope/branches/cxf/core/src/main/resources/restContext.xml
    syncope/branches/cxf/core/src/main/webapp/WEB-INF/web.xml
    syncope/branches/cxf/core/src/test/java/org/apache/syncope/core/AbstractTest.java
    syncope/branches/cxf/core/src/test/java/org/apache/syncope/core/persistence/dao/AttrTest.java
    syncope/branches/cxf/core/src/test/java/org/apache/syncope/core/persistence/dao/NotificationTest.java
    syncope/branches/cxf/core/src/test/java/org/apache/syncope/core/persistence/dao/PolicyTest.java
    syncope/branches/cxf/core/src/test/java/org/apache/syncope/core/persistence/dao/ResourceTest.java
    syncope/branches/cxf/core/src/test/java/org/apache/syncope/core/persistence/dao/SchemaTest.java
    syncope/branches/cxf/core/src/test/java/org/apache/syncope/core/persistence/dao/TaskTest.java
    syncope/branches/cxf/core/src/test/java/org/apache/syncope/core/persistence/dao/UserTest.java
    syncope/branches/cxf/core/src/test/java/org/apache/syncope/core/persistence/relationships/RoleTest.java
    syncope/branches/cxf/core/src/test/java/org/apache/syncope/core/rest/AbstractTest.java
    syncope/branches/cxf/core/src/test/java/org/apache/syncope/core/rest/AuthenticationTestITCase.java
    syncope/branches/cxf/core/src/test/java/org/apache/syncope/core/rest/ConfigurationTestITCase.java
    syncope/branches/cxf/core/src/test/java/org/apache/syncope/core/rest/ConnInstanceTestITCase.java
    syncope/branches/cxf/core/src/test/java/org/apache/syncope/core/rest/DerivedSchemaTestITCase.java
    syncope/branches/cxf/core/src/test/java/org/apache/syncope/core/rest/LoggerTestITCase.java
    syncope/branches/cxf/core/src/test/java/org/apache/syncope/core/rest/NotificationTestITCase.java
    syncope/branches/cxf/core/src/test/java/org/apache/syncope/core/rest/PolicyTestITCase.java
    syncope/branches/cxf/core/src/test/java/org/apache/syncope/core/rest/ReportTestITCase.java
    syncope/branches/cxf/core/src/test/java/org/apache/syncope/core/rest/ResourceTestITCase.java
    syncope/branches/cxf/core/src/test/java/org/apache/syncope/core/rest/SchemaTestITCase.java
    syncope/branches/cxf/core/src/test/java/org/apache/syncope/core/rest/TaskTestITCase.java
    syncope/branches/cxf/core/src/test/java/org/apache/syncope/core/rest/UserRequestTestITCase.java
    syncope/branches/cxf/core/src/test/java/org/apache/syncope/core/rest/VirtualSchemaTestITCase.java
    syncope/branches/cxf/core/src/test/resources/restClientContext.xml

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/init/ConnInstanceLoader.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/init/ConnInstanceLoader.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/init/ConnInstanceLoader.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/init/ConnInstanceLoader.java Tue Dec  4 09:02:21 2012
@@ -21,6 +21,7 @@ package org.apache.syncope.core.init;
 import java.util.Locale;
 import java.util.Set;
 import org.apache.commons.lang.SerializationUtils;
+import org.apache.syncope.NotFoundException;
 import org.apache.syncope.core.persistence.beans.ConnInstance;
 import org.apache.syncope.core.persistence.beans.ExternalResource;
 import org.apache.syncope.core.persistence.dao.ResourceDAO;
@@ -28,7 +29,6 @@ import org.apache.syncope.core.propagati
 import org.apache.syncope.core.rest.data.ResourceDataBinder;
 import org.apache.syncope.core.util.ApplicationContextProvider;
 import org.apache.syncope.core.util.ConnBundleManager;
-import org.apache.syncope.core.util.NotFoundException;
 import org.apache.syncope.types.ConnConfProperty;
 import org.identityconnectors.common.l10n.CurrentLocale;
 import org.slf4j.Logger;

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java Tue Dec  4 09:02:21 2012
@@ -24,6 +24,8 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+
+import org.apache.syncope.NotFoundException;
 import org.apache.syncope.core.persistence.beans.Notification;
 import org.apache.syncope.core.persistence.beans.NotificationTask;
 import org.apache.syncope.core.persistence.beans.SyncopeConf;
@@ -41,7 +43,6 @@ import org.apache.syncope.core.persisten
 import org.apache.syncope.core.rest.data.UserDataBinder;
 import org.apache.syncope.core.util.ConnObjectUtil;
 import org.apache.syncope.core.util.EntitlementUtil;
-import org.apache.syncope.core.util.NotFoundException;
 import org.apache.syncope.types.IntMappingType;
 import org.apache.velocity.app.VelocityEngine;
 import org.apache.velocity.exception.VelocityException;

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/AttrDAO.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/AttrDAO.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/AttrDAO.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/AttrDAO.java Tue Dec  4 09:02:21 2012
@@ -18,9 +18,9 @@
  */
 package org.apache.syncope.core.persistence.dao;
 
-import org.apache.syncope.core.persistence.validation.entity.InvalidEntityException;
 import java.util.List;
 import org.apache.syncope.core.persistence.beans.AbstractAttr;
+import org.apache.syncope.validation.InvalidEntityException;
 
 public interface AttrDAO extends DAO {
 

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/AttrValueDAO.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/AttrValueDAO.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/AttrValueDAO.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/AttrValueDAO.java Tue Dec  4 09:02:21 2012
@@ -20,7 +20,7 @@ package org.apache.syncope.core.persiste
 
 import java.util.List;
 import org.apache.syncope.core.persistence.beans.AbstractAttrValue;
-import org.apache.syncope.core.persistence.validation.entity.InvalidEntityException;
+import org.apache.syncope.validation.InvalidEntityException;
 
 public interface AttrValueDAO extends DAO {
 

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/ConfDAO.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/ConfDAO.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/ConfDAO.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/ConfDAO.java Tue Dec  4 09:02:21 2012
@@ -20,7 +20,7 @@ package org.apache.syncope.core.persiste
 
 import java.util.List;
 import org.apache.syncope.core.persistence.beans.SyncopeConf;
-import org.apache.syncope.core.persistence.validation.entity.InvalidEntityException;
+import org.apache.syncope.validation.InvalidEntityException;
 
 public interface ConfDAO extends DAO {
 

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/ConnInstanceDAO.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/ConnInstanceDAO.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/ConnInstanceDAO.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/ConnInstanceDAO.java Tue Dec  4 09:02:21 2012
@@ -20,7 +20,7 @@ package org.apache.syncope.core.persiste
 
 import java.util.List;
 import org.apache.syncope.core.persistence.beans.ConnInstance;
-import org.apache.syncope.core.persistence.validation.entity.InvalidEntityException;
+import org.apache.syncope.validation.InvalidEntityException;
 
 public interface ConnInstanceDAO extends DAO {
 

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/DerAttrDAO.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/DerAttrDAO.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/DerAttrDAO.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/DerAttrDAO.java Tue Dec  4 09:02:21 2012
@@ -20,7 +20,7 @@ package org.apache.syncope.core.persiste
 
 import java.util.List;
 import org.apache.syncope.core.persistence.beans.AbstractDerAttr;
-import org.apache.syncope.core.persistence.validation.entity.InvalidEntityException;
+import org.apache.syncope.validation.InvalidEntityException;
 
 public interface DerAttrDAO extends DAO {
 

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/DerSchemaDAO.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/DerSchemaDAO.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/DerSchemaDAO.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/DerSchemaDAO.java Tue Dec  4 09:02:21 2012
@@ -21,8 +21,8 @@ package org.apache.syncope.core.persiste
 import java.util.List;
 import org.apache.syncope.core.persistence.beans.AbstractDerAttr;
 import org.apache.syncope.core.persistence.beans.AbstractDerSchema;
-import org.apache.syncope.core.persistence.validation.entity.InvalidEntityException;
 import org.apache.syncope.core.util.AttributableUtil;
+import org.apache.syncope.validation.InvalidEntityException;
 
 public interface DerSchemaDAO extends DAO {
 

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/EntitlementDAO.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/EntitlementDAO.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/EntitlementDAO.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/EntitlementDAO.java Tue Dec  4 09:02:21 2012
@@ -21,7 +21,7 @@ package org.apache.syncope.core.persiste
 import java.util.List;
 import org.apache.syncope.core.persistence.beans.Entitlement;
 import org.apache.syncope.core.persistence.beans.role.SyncopeRole;
-import org.apache.syncope.core.persistence.validation.entity.InvalidEntityException;
+import org.apache.syncope.validation.InvalidEntityException;
 
 public interface EntitlementDAO extends DAO {
 

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/LoggerDAO.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/LoggerDAO.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/LoggerDAO.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/LoggerDAO.java Tue Dec  4 09:02:21 2012
@@ -20,8 +20,8 @@ package org.apache.syncope.core.persiste
 
 import java.util.List;
 import org.apache.syncope.core.persistence.beans.SyncopeLogger;
-import org.apache.syncope.core.persistence.validation.entity.InvalidEntityException;
 import org.apache.syncope.types.SyncopeLoggerType;
+import org.apache.syncope.validation.InvalidEntityException;
 
 public interface LoggerDAO extends DAO {
 

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/MembershipDAO.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/MembershipDAO.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/MembershipDAO.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/MembershipDAO.java Tue Dec  4 09:02:21 2012
@@ -22,7 +22,7 @@ import java.util.List;
 import org.apache.syncope.core.persistence.beans.membership.Membership;
 import org.apache.syncope.core.persistence.beans.role.SyncopeRole;
 import org.apache.syncope.core.persistence.beans.user.SyncopeUser;
-import org.apache.syncope.core.persistence.validation.entity.InvalidEntityException;
+import org.apache.syncope.validation.InvalidEntityException;
 
 public interface MembershipDAO extends DAO {
 

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/NotificationDAO.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/NotificationDAO.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/NotificationDAO.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/NotificationDAO.java Tue Dec  4 09:02:21 2012
@@ -20,7 +20,7 @@ package org.apache.syncope.core.persiste
 
 import java.util.List;
 import org.apache.syncope.core.persistence.beans.Notification;
-import org.apache.syncope.core.persistence.validation.entity.InvalidEntityException;
+import org.apache.syncope.validation.InvalidEntityException;
 
 public interface NotificationDAO extends DAO {
 

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/ReportDAO.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/ReportDAO.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/ReportDAO.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/ReportDAO.java Tue Dec  4 09:02:21 2012
@@ -20,7 +20,7 @@ package org.apache.syncope.core.persiste
 
 import java.util.List;
 import org.apache.syncope.core.persistence.beans.Report;
-import org.apache.syncope.core.persistence.validation.entity.InvalidEntityException;
+import org.apache.syncope.validation.InvalidEntityException;
 
 public interface ReportDAO extends DAO {
 

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/ReportExecDAO.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/ReportExecDAO.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/ReportExecDAO.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/ReportExecDAO.java Tue Dec  4 09:02:21 2012
@@ -21,7 +21,7 @@ package org.apache.syncope.core.persiste
 import java.util.List;
 import org.apache.syncope.core.persistence.beans.Report;
 import org.apache.syncope.core.persistence.beans.ReportExec;
-import org.apache.syncope.core.persistence.validation.entity.InvalidEntityException;
+import org.apache.syncope.validation.InvalidEntityException;
 
 public interface ReportExecDAO extends DAO {
 

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/ResourceDAO.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/ResourceDAO.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/ResourceDAO.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/ResourceDAO.java Tue Dec  4 09:02:21 2012
@@ -21,8 +21,8 @@ package org.apache.syncope.core.persiste
 import java.util.List;
 import org.apache.syncope.core.persistence.beans.ExternalResource;
 import org.apache.syncope.core.persistence.beans.SchemaMapping;
-import org.apache.syncope.core.persistence.validation.entity.InvalidEntityException;
 import org.apache.syncope.types.IntMappingType;
+import org.apache.syncope.validation.InvalidEntityException;
 
 public interface ResourceDAO extends DAO {
 

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/RoleDAO.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/RoleDAO.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/RoleDAO.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/RoleDAO.java Tue Dec  4 09:02:21 2012
@@ -24,7 +24,7 @@ import org.apache.syncope.core.persisten
 import org.apache.syncope.core.persistence.beans.membership.Membership;
 import org.apache.syncope.core.persistence.beans.role.SyncopeRole;
 import org.apache.syncope.core.persistence.beans.user.SyncopeUser;
-import org.apache.syncope.core.persistence.validation.entity.InvalidEntityException;
+import org.apache.syncope.validation.InvalidEntityException;
 
 public interface RoleDAO extends DAO {
 

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/SchemaDAO.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/SchemaDAO.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/SchemaDAO.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/SchemaDAO.java Tue Dec  4 09:02:21 2012
@@ -21,8 +21,8 @@ package org.apache.syncope.core.persiste
 import java.util.List;
 import org.apache.syncope.core.persistence.beans.AbstractAttr;
 import org.apache.syncope.core.persistence.beans.AbstractSchema;
-import org.apache.syncope.core.persistence.validation.entity.InvalidEntityException;
 import org.apache.syncope.core.util.AttributableUtil;
+import org.apache.syncope.validation.InvalidEntityException;
 
 public interface SchemaDAO extends DAO {
 

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/TaskDAO.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/TaskDAO.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/TaskDAO.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/TaskDAO.java Tue Dec  4 09:02:21 2012
@@ -23,7 +23,7 @@ import org.apache.syncope.core.persisten
 import org.apache.syncope.core.persistence.beans.PropagationTask;
 import org.apache.syncope.core.persistence.beans.Task;
 import org.apache.syncope.core.persistence.beans.user.SyncopeUser;
-import org.apache.syncope.core.persistence.validation.entity.InvalidEntityException;
+import org.apache.syncope.validation.InvalidEntityException;
 
 public interface TaskDAO extends DAO {
 

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/TaskExecDAO.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/TaskExecDAO.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/TaskExecDAO.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/TaskExecDAO.java Tue Dec  4 09:02:21 2012
@@ -21,7 +21,7 @@ package org.apache.syncope.core.persiste
 import java.util.List;
 import org.apache.syncope.core.persistence.beans.Task;
 import org.apache.syncope.core.persistence.beans.TaskExec;
-import org.apache.syncope.core.persistence.validation.entity.InvalidEntityException;
+import org.apache.syncope.validation.InvalidEntityException;
 
 public interface TaskExecDAO extends DAO {
 

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/UserDAO.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/UserDAO.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/UserDAO.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/UserDAO.java Tue Dec  4 09:02:21 2012
@@ -23,8 +23,8 @@ import java.util.Set;
 import org.apache.syncope.core.persistence.beans.ExternalResource;
 import org.apache.syncope.core.persistence.beans.user.SyncopeUser;
 import org.apache.syncope.core.persistence.beans.user.UAttrValue;
-import org.apache.syncope.core.persistence.validation.entity.InvalidEntityException;
 import org.apache.syncope.controller.InvalidSearchConditionException;
+import org.apache.syncope.validation.InvalidEntityException;
 
 public interface UserDAO extends DAO {
 

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/UserRequestDAO.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/UserRequestDAO.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/UserRequestDAO.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/UserRequestDAO.java Tue Dec  4 09:02:21 2012
@@ -20,7 +20,7 @@ package org.apache.syncope.core.persiste
 
 import java.util.List;
 import org.apache.syncope.core.persistence.beans.UserRequest;
-import org.apache.syncope.core.persistence.validation.entity.InvalidEntityException;
+import org.apache.syncope.validation.InvalidEntityException;
 
 public interface UserRequestDAO extends DAO {
 

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/VirAttrDAO.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/VirAttrDAO.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/VirAttrDAO.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/VirAttrDAO.java Tue Dec  4 09:02:21 2012
@@ -20,7 +20,7 @@ package org.apache.syncope.core.persiste
 
 import java.util.List;
 import org.apache.syncope.core.persistence.beans.AbstractVirAttr;
-import org.apache.syncope.core.persistence.validation.entity.InvalidEntityException;
+import org.apache.syncope.validation.InvalidEntityException;
 
 public interface VirAttrDAO extends DAO {
 

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/VirSchemaDAO.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/VirSchemaDAO.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/VirSchemaDAO.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/VirSchemaDAO.java Tue Dec  4 09:02:21 2012
@@ -21,8 +21,8 @@ package org.apache.syncope.core.persiste
 import java.util.List;
 import org.apache.syncope.core.persistence.beans.AbstractVirAttr;
 import org.apache.syncope.core.persistence.beans.AbstractVirSchema;
-import org.apache.syncope.core.persistence.validation.entity.InvalidEntityException;
 import org.apache.syncope.core.util.AttributableUtil;
+import org.apache.syncope.validation.InvalidEntityException;
 
 public interface VirSchemaDAO extends DAO {
 

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/ConnInstanceDAOImpl.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/ConnInstanceDAOImpl.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/ConnInstanceDAOImpl.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/ConnInstanceDAOImpl.java Tue Dec  4 09:02:21 2012
@@ -22,12 +22,13 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 import javax.persistence.Query;
+
+import org.apache.syncope.NotFoundException;
 import org.apache.syncope.core.init.ConnInstanceLoader;
 import org.apache.syncope.core.persistence.beans.ConnInstance;
 import org.apache.syncope.core.persistence.beans.ExternalResource;
 import org.apache.syncope.core.persistence.dao.ConnInstanceDAO;
 import org.apache.syncope.core.persistence.dao.ResourceDAO;
-import org.apache.syncope.core.util.NotFoundException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Repository;
 

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/NotificationDAOImpl.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/NotificationDAOImpl.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/NotificationDAOImpl.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/NotificationDAOImpl.java Tue Dec  4 09:02:21 2012
@@ -23,7 +23,7 @@ import javax.persistence.Query;
 import org.springframework.stereotype.Repository;
 import org.apache.syncope.core.persistence.beans.Notification;
 import org.apache.syncope.core.persistence.dao.NotificationDAO;
-import org.apache.syncope.core.persistence.validation.entity.InvalidEntityException;
+import org.apache.syncope.validation.InvalidEntityException;
 
 @Repository
 public class NotificationDAOImpl extends AbstractDAOImpl implements NotificationDAO {

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/ReportDAOImpl.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/ReportDAOImpl.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/ReportDAOImpl.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/ReportDAOImpl.java Tue Dec  4 09:02:21 2012
@@ -22,7 +22,7 @@ import java.util.List;
 import javax.persistence.Query;
 import org.apache.syncope.core.persistence.beans.Report;
 import org.apache.syncope.core.persistence.dao.ReportDAO;
-import org.apache.syncope.core.persistence.validation.entity.InvalidEntityException;
+import org.apache.syncope.validation.InvalidEntityException;
 import org.springframework.stereotype.Repository;
 import org.springframework.transaction.annotation.Transactional;
 

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/ReportExecDAOImpl.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/ReportExecDAOImpl.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/ReportExecDAOImpl.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/ReportExecDAOImpl.java Tue Dec  4 09:02:21 2012
@@ -23,7 +23,7 @@ import javax.persistence.Query;
 import org.apache.syncope.core.persistence.beans.Report;
 import org.apache.syncope.core.persistence.beans.ReportExec;
 import org.apache.syncope.core.persistence.dao.ReportExecDAO;
-import org.apache.syncope.core.persistence.validation.entity.InvalidEntityException;
+import org.apache.syncope.validation.InvalidEntityException;
 import org.springframework.stereotype.Repository;
 import org.springframework.transaction.annotation.Transactional;
 

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/ResourceDAOImpl.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/ResourceDAOImpl.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/ResourceDAOImpl.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/ResourceDAOImpl.java Tue Dec  4 09:02:21 2012
@@ -22,6 +22,8 @@ import java.util.List;
 import javax.persistence.NoResultException;
 import javax.persistence.Query;
 import javax.persistence.TypedQuery;
+
+import org.apache.syncope.NotFoundException;
 import org.apache.syncope.core.init.ConnInstanceLoader;
 import org.apache.syncope.core.persistence.beans.ExternalResource;
 import org.apache.syncope.core.persistence.beans.PropagationTask;
@@ -33,7 +35,6 @@ import org.apache.syncope.core.persisten
 import org.apache.syncope.core.persistence.dao.RoleDAO;
 import org.apache.syncope.core.persistence.dao.TaskDAO;
 import org.apache.syncope.core.persistence.dao.UserDAO;
-import org.apache.syncope.core.util.NotFoundException;
 import org.apache.syncope.types.IntMappingType;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Repository;

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/TaskExecDAOImpl.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/TaskExecDAOImpl.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/TaskExecDAOImpl.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/TaskExecDAOImpl.java Tue Dec  4 09:02:21 2012
@@ -26,7 +26,7 @@ import org.apache.syncope.core.persisten
 import org.apache.syncope.core.persistence.beans.TaskExec;
 import org.apache.syncope.core.persistence.dao.TaskDAO;
 import org.apache.syncope.core.persistence.dao.TaskExecDAO;
-import org.apache.syncope.core.persistence.validation.entity.InvalidEntityException;
+import org.apache.syncope.validation.InvalidEntityException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Repository;
 import org.springframework.transaction.annotation.Transactional;

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/UserRequestDAOImpl.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/UserRequestDAOImpl.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/UserRequestDAOImpl.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/UserRequestDAOImpl.java Tue Dec  4 09:02:21 2012
@@ -24,7 +24,7 @@ import org.springframework.stereotype.Re
 import org.springframework.transaction.annotation.Transactional;
 import org.apache.syncope.core.persistence.beans.UserRequest;
 import org.apache.syncope.core.persistence.dao.UserRequestDAO;
-import org.apache.syncope.core.persistence.validation.entity.InvalidEntityException;
+import org.apache.syncope.validation.InvalidEntityException;
 
 @Repository
 @Transactional(noRollbackFor = { Throwable.class })

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/validation/entity/EntityValidationInterceptor.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/validation/entity/EntityValidationInterceptor.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/validation/entity/EntityValidationInterceptor.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/persistence/validation/entity/EntityValidationInterceptor.java Tue Dec  4 09:02:21 2012
@@ -21,6 +21,8 @@ package org.apache.syncope.core.persiste
 import java.util.Set;
 import javax.validation.ConstraintViolation;
 import javax.validation.Validator;
+
+import org.apache.syncope.validation.InvalidEntityException;
 import org.aspectj.lang.ProceedingJoinPoint;
 import org.aspectj.lang.annotation.Around;
 import org.aspectj.lang.annotation.Aspect;

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/propagation/AbstractPropagationTaskExecutor.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/propagation/AbstractPropagationTaskExecutor.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/propagation/AbstractPropagationTaskExecutor.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/propagation/AbstractPropagationTaskExecutor.java Tue Dec  4 09:02:21 2012
@@ -18,6 +18,7 @@
  */
 package org.apache.syncope.core.propagation;
 
+import org.apache.syncope.NotFoundException;
 import org.apache.syncope.propagation.PropagationException;
 import java.io.PrintWriter;
 import java.io.StringWriter;
@@ -37,7 +38,6 @@ import org.apache.syncope.core.persisten
 import org.apache.syncope.core.persistence.dao.UserDAO;
 import org.apache.syncope.core.util.ApplicationContextProvider;
 import org.apache.syncope.core.util.ConnObjectUtil;
-import org.apache.syncope.core.util.NotFoundException;
 import org.apache.syncope.types.PropagationMode;
 import org.apache.syncope.types.PropagationTaskExecStatus;
 import org.apache.syncope.types.TraceLevel;

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/propagation/ConnectorFacadeProxy.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/propagation/ConnectorFacadeProxy.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/propagation/ConnectorFacadeProxy.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/propagation/ConnectorFacadeProxy.java Tue Dec  4 09:02:21 2012
@@ -24,12 +24,13 @@ import java.util.Arrays;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
+
+import org.apache.syncope.NotFoundException;
 import org.apache.syncope.core.persistence.beans.ConnInstance;
 import org.apache.syncope.core.persistence.beans.ExternalResource;
 import org.apache.syncope.core.persistence.beans.SchemaMapping;
 import org.apache.syncope.core.persistence.dao.MissingConfKeyException;
 import org.apache.syncope.core.util.ConnBundleManager;
-import org.apache.syncope.core.util.NotFoundException;
 import org.apache.syncope.core.util.SchemaMappingUtil;
 import org.apache.syncope.types.ConnConfProperty;
 import org.apache.syncope.types.ConnectorCapability;

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/propagation/PropagationManager.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/propagation/PropagationManager.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/propagation/PropagationManager.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/propagation/PropagationManager.java Tue Dec  4 09:02:21 2012
@@ -29,6 +29,7 @@ import org.apache.commons.collections.ke
 import org.apache.commons.jexl2.JexlContext;
 import org.apache.commons.jexl2.MapContext;
 import org.apache.commons.lang.StringUtils;
+import org.apache.syncope.NotFoundException;
 import org.apache.syncope.core.persistence.beans.AbstractAttrValue;
 import org.apache.syncope.core.persistence.beans.AbstractAttributable;
 import org.apache.syncope.core.persistence.beans.AbstractSchema;
@@ -43,7 +44,6 @@ import org.apache.syncope.core.persisten
 import org.apache.syncope.core.rest.data.UserDataBinder;
 import org.apache.syncope.core.util.AttributableUtil;
 import org.apache.syncope.core.util.JexlUtil;
-import org.apache.syncope.core.util.NotFoundException;
 import org.apache.syncope.core.util.SchemaMappingUtil;
 import org.apache.syncope.core.workflow.WorkflowResult;
 import org.apache.syncope.mod.AttributeMod;

Added: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/QueryResourceInfoComperator.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/QueryResourceInfoComperator.java?rev=1416827&view=auto
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/QueryResourceInfoComperator.java (added)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/QueryResourceInfoComperator.java Tue Dec  4 09:02:21 2012
@@ -0,0 +1,115 @@
+/*
+ * 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.core.rest;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.cxf.jaxrs.ext.ResourceComparator;
+import org.apache.cxf.jaxrs.model.ClassResourceInfo;
+import org.apache.cxf.jaxrs.model.OperationResourceInfo;
+import org.apache.cxf.jaxrs.model.OperationResourceInfoComparator;
+import org.apache.cxf.jaxrs.model.Parameter;
+import org.apache.cxf.jaxrs.utils.JAXRSUtils;
+import org.apache.cxf.message.Message;
+
+public class QueryResourceInfoComperator extends OperationResourceInfoComparator implements
+        ResourceComparator {
+
+    public QueryResourceInfoComperator() {
+        super(null, null);
+    }
+
+    @Override
+    public int compare(ClassResourceInfo cri1, ClassResourceInfo cri2, Message message) {
+        // Leave Class selection to CXF
+        return 0;
+    }
+
+    @Override
+    public int compare(OperationResourceInfo oper1, OperationResourceInfo oper2, Message message) {
+
+        // Check if CXF can make a decision
+        int cxfResult = super.compare(oper1, oper2);
+        if (cxfResult != 0)
+            return cxfResult;
+
+        int op1Counter = getMatchingRate(oper1, message);
+        int op2Counter = getMatchingRate(oper2, message);
+
+        return op1Counter == op2Counter
+                ? 0
+                : op1Counter < op2Counter
+                        ? 1
+                        : -1;
+    }
+
+    /**
+     * This method calculates a number indicating a good or bad match between
+     * values provided within the request and expected method parameters. A
+     * higher number means a better match.
+     *
+     * @param operation
+     *            The operation to be rated, based on contained parameterInfo
+     *            values.
+     * @param message
+     *            A message containing query and header values from user request
+     * @return A positive or negative number, indicating a good match between
+     *         query and method
+     */
+    protected int getMatchingRate(OperationResourceInfo operation, Message message) {
+
+        List<Parameter> params = operation.getParameters();
+        if (params == null || params.size() == 0)
+            return 0;
+
+        // Get Request QueryParams
+        String query = (String) message.get(Message.QUERY_STRING);
+        Map<String, List<String>> qParams = JAXRSUtils.getStructuredParams(query, "&", true, false);
+        // Get Request Headers
+        Map<?, ?> qHeader = (java.util.Map<?, ?>) message.get(Message.PROTOCOL_HEADERS);
+
+        int rate = 0;
+        for (Parameter p : params) {
+            switch (p.getType()) {
+            case QUERY:
+                if (qParams.containsKey(p.getName()))
+                    rate += 2;
+                else if (p.getDefaultValue() == null)
+                    rate -= 1;
+                break;
+            case FORM:
+                if (qParams.containsKey(p.getName()))
+                    rate += 2;
+                else if (p.getDefaultValue() == null)
+                    rate -= 1;
+                break;
+            case HEADER:
+                if (qHeader.containsKey(p.getName()))
+                    rate += 2;
+                else if (p.getDefaultValue() == null)
+                    rate -= 1;
+                break;
+            default:
+                break;
+            }
+        }
+        return rate;
+    }
+}

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/ConnInstanceController.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/ConnInstanceController.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/ConnInstanceController.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/ConnInstanceController.java Tue Dec  4 09:02:21 2012
@@ -26,6 +26,7 @@ import java.util.Locale;
 import java.util.Set;
 import javax.servlet.http.HttpServletResponse;
 import org.apache.commons.lang.StringUtils;
+import org.apache.syncope.NotFoundException;
 import org.apache.syncope.core.audit.AuditManager;
 import org.apache.syncope.core.init.ConnInstanceLoader;
 import org.apache.syncope.core.persistence.beans.ConnInstance;
@@ -36,7 +37,6 @@ import org.apache.syncope.core.persisten
 import org.apache.syncope.core.propagation.ConnectorFacadeProxy;
 import org.apache.syncope.core.rest.data.ConnInstanceDataBinder;
 import org.apache.syncope.core.util.ConnBundleManager;
-import org.apache.syncope.core.util.NotFoundException;
 import org.apache.syncope.to.ConnBundleTO;
 import org.apache.syncope.to.ConnInstanceTO;
 import org.apache.syncope.types.AuditElements.Category;

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/DerivedSchemaController.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/DerivedSchemaController.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/DerivedSchemaController.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/DerivedSchemaController.java Tue Dec  4 09:02:21 2012
@@ -21,11 +21,12 @@ package org.apache.syncope.core.rest.con
 import java.util.ArrayList;
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
+
+import org.apache.syncope.NotFoundException;
 import org.apache.syncope.core.audit.AuditManager;
 import org.apache.syncope.core.persistence.beans.AbstractDerSchema;
 import org.apache.syncope.core.persistence.dao.DerSchemaDAO;
 import org.apache.syncope.core.rest.data.DerivedSchemaDataBinder;
-import org.apache.syncope.core.util.NotFoundException;
 import org.apache.syncope.to.DerivedSchemaTO;
 import org.apache.syncope.types.AuditElements.Category;
 import org.apache.syncope.types.AuditElements.Result;

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/LoggerController.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/LoggerController.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/LoggerController.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/LoggerController.java Tue Dec  4 09:02:21 2012
@@ -23,10 +23,11 @@ import ch.qos.logback.classic.Logger;
 import ch.qos.logback.classic.LoggerContext;
 import java.util.ArrayList;
 import java.util.List;
+
+import org.apache.syncope.NotFoundException;
 import org.apache.syncope.core.audit.AuditManager;
 import org.apache.syncope.core.persistence.beans.SyncopeLogger;
 import org.apache.syncope.core.persistence.dao.LoggerDAO;
-import org.apache.syncope.core.util.NotFoundException;
 import org.apache.syncope.to.LoggerTO;
 import org.apache.syncope.types.AuditElements.Category;
 import org.apache.syncope.types.AuditElements.LoggerSubCategory;

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/NotificationController.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/NotificationController.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/NotificationController.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/NotificationController.java Tue Dec  4 09:02:21 2012
@@ -21,11 +21,12 @@ package org.apache.syncope.core.rest.con
 import java.util.ArrayList;
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
+
+import org.apache.syncope.NotFoundException;
 import org.apache.syncope.core.audit.AuditManager;
 import org.apache.syncope.core.persistence.beans.Notification;
 import org.apache.syncope.core.persistence.dao.NotificationDAO;
 import org.apache.syncope.core.rest.data.NotificationDataBinder;
-import org.apache.syncope.core.util.NotFoundException;
 import org.apache.syncope.to.NotificationTO;
 import org.apache.syncope.types.AuditElements.Category;
 import org.apache.syncope.types.AuditElements.NotificationSubCategory;

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/PolicyController.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/PolicyController.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/PolicyController.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/PolicyController.java Tue Dec  4 09:02:21 2012
@@ -22,6 +22,8 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Locale;
 import javax.servlet.http.HttpServletResponse;
+
+import org.apache.syncope.NotFoundException;
 import org.apache.syncope.core.audit.AuditManager;
 import org.apache.syncope.core.persistence.beans.AccountPolicy;
 import org.apache.syncope.core.persistence.beans.PasswordPolicy;
@@ -29,7 +31,6 @@ import org.apache.syncope.core.persisten
 import org.apache.syncope.core.persistence.beans.SyncPolicy;
 import org.apache.syncope.core.persistence.dao.PolicyDAO;
 import org.apache.syncope.core.rest.data.PolicyDataBinder;
-import org.apache.syncope.core.util.NotFoundException;
 import org.apache.syncope.to.AccountPolicyTO;
 import org.apache.syncope.to.PasswordPolicyTO;
 import org.apache.syncope.to.PolicyTO;

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/ReportController.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/ReportController.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/ReportController.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/ReportController.java Tue Dec  4 09:02:21 2012
@@ -36,6 +36,7 @@ import org.apache.cocoon.sax.SAXPipeline
 import org.apache.cocoon.sax.component.XMLGenerator;
 import org.apache.cocoon.sax.component.XMLSerializer;
 import org.apache.cocoon.sax.component.XSLTTransformer;
+import org.apache.syncope.NotFoundException;
 import org.apache.syncope.core.audit.AuditManager;
 import org.apache.syncope.core.init.JobInstanceLoader;
 import org.apache.syncope.core.persistence.beans.Report;
@@ -44,7 +45,6 @@ import org.apache.syncope.core.persisten
 import org.apache.syncope.core.persistence.dao.ReportExecDAO;
 import org.apache.syncope.core.report.Reportlet;
 import org.apache.syncope.core.rest.data.ReportDataBinder;
-import org.apache.syncope.core.util.NotFoundException;
 import org.apache.syncope.report.ReportletConf;
 import org.apache.syncope.to.ReportExecTO;
 import org.apache.syncope.to.ReportTO;

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/ResourceController.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/ResourceController.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/ResourceController.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/ResourceController.java Tue Dec  4 09:02:21 2012
@@ -22,6 +22,8 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Set;
 import javax.servlet.http.HttpServletResponse;
+
+import org.apache.syncope.NotFoundException;
 import org.apache.syncope.core.audit.AuditManager;
 import org.apache.syncope.core.init.ConnInstanceLoader;
 import org.apache.syncope.core.init.ImplementationClassNamesLoader;
@@ -35,7 +37,6 @@ import org.apache.syncope.core.propagati
 import org.apache.syncope.core.rest.data.ResourceDataBinder;
 import org.apache.syncope.core.util.ConnBundleManager;
 import org.apache.syncope.core.util.ConnObjectUtil;
-import org.apache.syncope.core.util.NotFoundException;
 import org.apache.syncope.to.ConnObjectTO;
 import org.apache.syncope.to.ResourceTO;
 import org.apache.syncope.to.SchemaMappingTO;

Added: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/RoleController.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/RoleController.java?rev=1416827&view=auto
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/RoleController.java (added)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/RoleController.java Tue Dec  4 09:02:21 2012
@@ -0,0 +1,213 @@
+/*
+ * 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.core.rest.controller;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriInfo;
+
+import org.apache.syncope.NotFoundException;
+import org.apache.syncope.controller.ContextAware;
+import org.apache.syncope.controller.RoleService;
+import org.apache.syncope.controller.UnauthorizedRoleException;
+import org.apache.syncope.core.audit.AuditManager;
+import org.apache.syncope.core.persistence.beans.role.SyncopeRole;
+import org.apache.syncope.core.persistence.beans.user.SyncopeUser;
+import org.apache.syncope.core.persistence.dao.RoleDAO;
+import org.apache.syncope.core.persistence.dao.UserDAO;
+import org.apache.syncope.core.rest.data.RoleDataBinder;
+import org.apache.syncope.core.util.EntitlementUtil;
+import org.apache.syncope.mod.RoleMod;
+import org.apache.syncope.to.RoleTO;
+import org.apache.syncope.types.AuditElements.Category;
+import org.apache.syncope.types.AuditElements.Result;
+import org.apache.syncope.types.AuditElements.RoleSubCategory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.security.core.context.SecurityContextHolder;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PathVariable;
+
+@Controller
+public class RoleController extends AbstractController implements RoleService, ContextAware {
+
+    @Autowired
+    private AuditManager auditManager;
+
+    @Autowired
+    private RoleDAO roleDAO;
+
+    @Autowired
+    private UserDAO userDAO;
+
+    @Autowired
+    private RoleDataBinder dataBinder;
+
+    protected UriInfo uriInfo;
+
+    @Override
+    public RoleTO read(final Long roleId) throws NotFoundException, UnauthorizedRoleException {
+
+        SyncopeRole role = dataBinder.getSyncopeRole(roleId);
+        Set<Long> allowedRoleIds = EntitlementUtil.getRoleIds(EntitlementUtil.getOwnedEntitlementNames());
+
+        SyncopeUser authUser = userDAO.find(SecurityContextHolder.getContext().getAuthentication().getName());
+        // authUser == null for admin user
+        if (authUser != null) {
+            allowedRoleIds.addAll(authUser.getRoleIds());
+        }
+
+        if (!allowedRoleIds.contains(role.getId())) {
+            throw new UnauthorizedRoleException(role.getId());
+        }
+
+        auditManager.audit(Category.role, RoleSubCategory.selfRead, Result.success,
+                "Successfully read role: " + role.getId());
+
+        return dataBinder.getRoleTO(role);
+    }
+
+
+
+    @Override
+    public RoleTO parent(final Long roleId) throws NotFoundException, UnauthorizedRoleException {
+
+        SyncopeRole role = dataBinder.getSyncopeRole(roleId);
+
+        Set<Long> allowedRoleIds = EntitlementUtil.getRoleIds(EntitlementUtil.getOwnedEntitlementNames());
+        if (role.getParent() != null && !allowedRoleIds.contains(role.getParent().getId())) {
+            throw new UnauthorizedRoleException(role.getParent().getId());
+        }
+
+        RoleTO result = role.getParent() == null
+                ? null
+                : dataBinder.getRoleTO(role.getParent());
+
+        auditManager.audit(Category.role, RoleSubCategory.parent, Result.success, result == null
+                ? "Role " + role.getId() + " is a root role"
+                : "Found parent for role " + role.getId() + ": " + result.getId());
+
+        return result;
+    }
+
+    @Override
+    public List<RoleTO> children(final Long roleId) throws NotFoundException {
+        SyncopeRole role = dataBinder.getSyncopeRole(roleId);
+
+        Set<Long> allowedRoleIds = EntitlementUtil.getRoleIds(EntitlementUtil.getOwnedEntitlementNames());
+
+        List<SyncopeRole> children = roleDAO.findChildren(role);
+        List<RoleTO> childrenTOs = new ArrayList<RoleTO>(children.size());
+        for (SyncopeRole child : children) {
+            if (allowedRoleIds.contains(child.getId())) {
+                childrenTOs.add(dataBinder.getRoleTO(child));
+            }
+        }
+
+        auditManager.audit(Category.role, RoleSubCategory.children, Result.success,
+                "Found " + childrenTOs.size() + " children of role " + roleId);
+
+        return childrenTOs;
+    }
+
+    @Override
+    public List<RoleTO> list() {
+        List<SyncopeRole> roles = roleDAO.findAll();
+        List<RoleTO> roleTOs = new ArrayList<RoleTO>(roles.size());
+        for (SyncopeRole role : roles) {
+            roleTOs.add(dataBinder.getRoleTO(role));
+        }
+
+        auditManager.audit(Category.role, RoleSubCategory.list, Result.success,
+                "Successfully listed all roles: " + roleTOs.size());
+
+        return roleTOs;
+    }
+
+    @Override
+    public Response create(final RoleTO roleTO) throws UnauthorizedRoleException {
+
+        LOG.debug("Role create called with parameters {}", roleTO);
+
+        Set<Long> allowedRoleIds = EntitlementUtil.getRoleIds(EntitlementUtil.getOwnedEntitlementNames());
+        if (roleTO.getParent() != 0 && !allowedRoleIds.contains(roleTO.getParent())) {
+            throw new UnauthorizedRoleException(roleTO.getParent());
+        }
+
+        SyncopeRole role = roleDAO.save(dataBinder.create(roleTO));
+
+        auditManager.audit(Category.role, RoleSubCategory.create, Result.success,
+                "Successfully created role: " + role.getId());
+
+        URI newRoleURI = getUriInfo().getAbsolutePathBuilder().path(role.getId().toString()).build();
+        return Response.created(newRoleURI).build();
+    }
+
+    @Override
+    public RoleTO update(final Long roleId, final RoleMod roleMod) throws NotFoundException,
+            UnauthorizedRoleException {
+        LOG.debug("Role update called with parameter {}", roleMod);
+
+        SyncopeRole role = dataBinder.getSyncopeRole(roleId);
+
+        Set<Long> allowedRoleIds = EntitlementUtil.getRoleIds(EntitlementUtil.getOwnedEntitlementNames());
+        if (!allowedRoleIds.contains(role.getId())) {
+            throw new UnauthorizedRoleException(role.getId());
+        }
+
+        // Updates only elements set in roleMod
+        dataBinder.update(role, roleMod);
+        role = roleDAO.save(role);
+
+        auditManager.audit(Category.role, RoleSubCategory.update, Result.success,
+                "Successfully updated role: " + role.getId());
+
+        return dataBinder.getRoleTO(role);
+    }
+
+    @Override
+    public Response delete(final Long roleId) throws NotFoundException, UnauthorizedRoleException {
+        SyncopeRole role = dataBinder.getSyncopeRole(roleId);
+
+        Set<Long> allowedRoleIds = EntitlementUtil.getRoleIds(EntitlementUtil.getOwnedEntitlementNames());
+        if (!allowedRoleIds.contains(role.getId())) {
+            throw new UnauthorizedRoleException(role.getId());
+        }
+
+        auditManager.audit(Category.role, RoleSubCategory.delete, Result.success,
+                "Successfully deleted role: " + role.getId());
+
+        roleDAO.delete(roleId);
+
+        return Response.ok().build();
+    }
+
+    public UriInfo getUriInfo() {
+        return uriInfo;
+    }
+
+    @Override
+    public void setUriInfo(UriInfo uriInfo) {
+        this.uriInfo = uriInfo;
+    }
+}

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/SchemaController.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/SchemaController.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/SchemaController.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/SchemaController.java Tue Dec  4 09:02:21 2012
@@ -21,12 +21,13 @@ package org.apache.syncope.core.rest.con
 import java.util.ArrayList;
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
+
+import org.apache.syncope.NotFoundException;
 import org.apache.syncope.core.audit.AuditManager;
 import org.apache.syncope.core.persistence.beans.AbstractSchema;
 import org.apache.syncope.core.persistence.dao.SchemaDAO;
 import org.apache.syncope.core.rest.data.SchemaDataBinder;
 import org.apache.syncope.core.util.AttributableUtil;
-import org.apache.syncope.core.util.NotFoundException;
 import org.apache.syncope.to.SchemaTO;
 import org.apache.syncope.types.AuditElements.Category;
 import org.apache.syncope.types.AuditElements.Result;

Modified: syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/TaskController.java
URL: http://svn.apache.org/viewvc/syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/TaskController.java?rev=1416827&r1=1416826&r2=1416827&view=diff
==============================================================================
--- syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/TaskController.java (original)
+++ syncope/branches/cxf/core/src/main/java/org/apache/syncope/core/rest/controller/TaskController.java Tue Dec  4 09:02:21 2012
@@ -23,6 +23,8 @@ import java.util.Date;
 import java.util.List;
 import java.util.Set;
 import javax.servlet.http.HttpServletResponse;
+
+import org.apache.syncope.NotFoundException;
 import org.apache.syncope.core.audit.AuditManager;
 import org.apache.syncope.core.init.ImplementationClassNamesLoader;
 import org.apache.syncope.core.init.JobInstanceLoader;
@@ -37,7 +39,6 @@ import org.apache.syncope.core.propagati
 import org.apache.syncope.core.rest.data.TaskDataBinder;
 import org.apache.syncope.core.quartz.AbstractTaskJob;
 import org.apache.syncope.core.notification.NotificationJob;
-import org.apache.syncope.core.util.NotFoundException;
 import org.apache.syncope.core.util.TaskUtil;
 import org.apache.syncope.to.SchedTaskTO;
 import org.apache.syncope.to.SyncTaskTO;



Mime
View raw message