You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by md...@apache.org on 2013/07/18 12:42:06 UTC

svn commit: r1504420 - in /syncope/trunk: ./ common/src/main/java/org/apache/syncope/common/types/ core/src/main/java/org/apache/syncope/core/rest/utils/ core/src/main/webapp/ core/src/test/java/org/apache/syncope/core/rest/

Author: mdisabatino
Date: Thu Jul 18 10:42:06 2013
New Revision: 1504420

URL: http://svn.apache.org/r1504420
Log:
Merge from 1_1_X

Modified:
    syncope/trunk/   (props changed)
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/SyncopeClientExceptionType.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/utils/RestServiceExceptionMapper.java
    syncope/trunk/core/src/main/webapp/syncopeClientError.jsp
    syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java

Propchange: syncope/trunk/
------------------------------------------------------------------------------
  Merged /syncope/branches/1_1_X:r1504400-1504416

Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/SyncopeClientExceptionType.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/types/SyncopeClientExceptionType.java?rev=1504420&r1=1504419&r2=1504420&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/SyncopeClientExceptionType.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/SyncopeClientExceptionType.java Thu Jul 18 10:42:06 2013
@@ -60,7 +60,6 @@ public enum SyncopeClientExceptionType {
     InvalidSyncTask("Syncope.InvalidSyncTask", "Syncope.InvalidSyncTask.element"),
     InvalidValues("Syncope.InvalidValues", "Syncope.InvalidValues.attributeName"),
     NotFound("Syncope.NotFound", "Syncope.NotFound.entity"),
-    Propagation("Syncope.Propagation", "Syncope.Propagation.resourceName"),
     RejectedUserCreate("Syncope.RejectUserCreate", "Syncope.RejectUserCreate.userId"),
     RequiredValuesMissing("Syncope.RequiredValuesMissing", "Syncope.RequiredValuesMissing.attributeName"),
     Scheduling("Syncope.Scheduling", "Syncope.Scheduling.message"),

Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/utils/RestServiceExceptionMapper.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/utils/RestServiceExceptionMapper.java?rev=1504420&r1=1504419&r2=1504420&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/utils/RestServiceExceptionMapper.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/utils/RestServiceExceptionMapper.java Thu Jul 18 10:42:06 2013
@@ -38,7 +38,6 @@ import org.apache.syncope.common.validat
 import org.apache.syncope.core.persistence.dao.MissingConfKeyException;
 import org.apache.syncope.core.persistence.dao.NotFoundException;
 import org.apache.syncope.core.persistence.validation.entity.InvalidEntityException;
-import org.apache.syncope.core.propagation.PropagationException;
 import org.apache.syncope.core.rest.controller.UnauthorizedRoleException;
 import org.apache.syncope.core.workflow.WorkflowException;
 import org.identityconnectors.framework.common.exceptions.ConfigurationException;
@@ -186,9 +185,6 @@ public class RestServiceExceptionMapper 
             return responseBuilder.build();
         } else if (ex instanceof WorkflowException) {
             return buildResponse(responseBuilder, SyncopeClientExceptionType.Workflow, getExMessage(ex));
-        } else if (ex instanceof PropagationException) {
-            return buildResponse(responseBuilder, SyncopeClientExceptionType.Propagation, getMessage(ex,
-                    ((PropagationException) ex).getResourceName()));
         } else if (ex instanceof InvalidSearchConditionException) {
             return buildResponse(responseBuilder, SyncopeClientExceptionType.InvalidSearchCondition, getExMessage(ex));
         } else if (ex instanceof PersistenceException) {

Modified: syncope/trunk/core/src/main/webapp/syncopeClientError.jsp
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/webapp/syncopeClientError.jsp?rev=1504420&r1=1504419&r2=1504420&view=diff
==============================================================================
--- syncope/trunk/core/src/main/webapp/syncopeClientError.jsp (original)
+++ syncope/trunk/core/src/main/webapp/syncopeClientError.jsp Thu Jul 18 10:42:06 2013
@@ -28,7 +28,6 @@ under the License.
 <%@page import="org.apache.syncope.core.persistence.dao.MissingConfKeyException"%>
 <%@page import="org.apache.syncope.common.validation.SyncopeClientException"%>
 <%@page import="org.apache.syncope.common.validation.SyncopeClientCompositeErrorException"%>
-<%@page import="org.apache.syncope.core.propagation.PropagationException"%>
 <%@page import="org.apache.syncope.core.workflow.WorkflowException"%>
 <%@page import="org.apache.syncope.common.types.SyncopeClientExceptionType"%>
 <%@page import="org.apache.syncope.core.persistence.dao.NotFoundException"%>
@@ -90,13 +89,6 @@ under the License.
                 SyncopeClientExceptionType.Workflow.getElementHeaderName(), "Currently unavailable. Please try later.");
 
         statusCode = HttpServletResponse.SC_BAD_REQUEST;
-    } else if (ex instanceof PropagationException) {
-        response.setHeader(SyncopeClientErrorHandler.EXCEPTION_TYPE_HEADER,
-                SyncopeClientExceptionType.Propagation.getHeaderValue());
-        response.setHeader(SyncopeClientExceptionType.Propagation.getElementHeaderName(),
-                ((PropagationException) ex).getResourceName());
-
-        statusCode = HttpServletResponse.SC_BAD_REQUEST;
     } else if (ex instanceof SyncopeClientCompositeErrorException) {
         for (SyncopeClientException sce : ((SyncopeClientCompositeErrorException) ex).getExceptions()) {
             response.addHeader(

Modified: syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java?rev=1504420&r1=1504419&r2=1504420&view=diff
==============================================================================
--- syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java (original)
+++ syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java Thu Jul 18 10:42:06 2013
@@ -255,9 +255,9 @@ public class UserTestITCase extends Abst
         try {
             userTO = userService.update(userMod.getId(), userMod);
         } catch (SyncopeClientCompositeErrorException scce) {
-            sce = scce.getException(SyncopeClientExceptionType.Propagation);
+            sce = scce.getException(SyncopeClientExceptionType.InvalidSyncopeUser);
         }
-        assertNull(sce);
+        assertNotNull(sce);
     }
 
     @Test
@@ -593,7 +593,7 @@ public class UserTestITCase extends Abst
         Exception exception = null;
         try {
             jdbcTemplate.queryForObject("SELECT id FROM test WHERE id=?",
-                    new String[] {userTO.getUsername()}, Integer.class);
+                    new String[]{userTO.getUsername()}, Integer.class);
         } catch (EmptyResultDataAccessException e) {
             exception = e;
         }
@@ -1927,12 +1927,12 @@ public class UserTestITCase extends Abst
         assertNotNull(prop);
         assertEquals("ws-target-resource-1", prop.getResource());
         assertEquals(PropagationTaskExecStatus.SUBMITTED, prop.getStatus());
-        
+
         // 6. restore initial cipher algorithm
         pwdCipherAlgo.setValue(origpwdCipherAlgo);
         configurationService.update(pwdCipherAlgo.getKey(), pwdCipherAlgo);
     }
-    
+
     @Test
     public void isseSYNCOPE136Random() {
         // 1. create user with no resources