Author: chris.laprun(a)jboss.com
Date: 2010-06-14 06:46:16 -0400 (Mon, 14 Jun 2010)
New Revision: 3325
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1MarkupService.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1PortletManagementService.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1RegistrationService.java
components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/v1/PortletManagementEndpoint.java
components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/v1/RegistrationEndpoint.java
Log:
- Fixed exception handling. It really is too bad that we can't constrain the code more
using generics to avoid mistakes... :/
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1MarkupService.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1MarkupService.java 2010-06-14
10:34:50 UTC (rev 3324)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1MarkupService.java 2010-06-14
10:46:16 UTC (rev 3325)
@@ -110,55 +110,55 @@
}
catch (V1AccessDenied accessDenied)
{
- throw V2ToV1Converter.toV1Exception(AccessDenied.class, accessDenied);
+ throw V1ToV2Converter.toV2Exception(AccessDenied.class, accessDenied);
}
catch (V1InconsistentParameters inconsistentParameters)
{
- throw V2ToV1Converter.toV1Exception(InconsistentParameters.class,
inconsistentParameters);
+ throw V1ToV2Converter.toV2Exception(InconsistentParameters.class,
inconsistentParameters);
}
catch (V1InvalidCookie invalidCookie)
{
- throw V2ToV1Converter.toV1Exception(InvalidCookie.class, invalidCookie);
+ throw V1ToV2Converter.toV2Exception(InvalidCookie.class, invalidCookie);
}
catch (V1InvalidHandle invalidHandle)
{
- throw V2ToV1Converter.toV1Exception(InvalidHandle.class, invalidHandle);
+ throw V1ToV2Converter.toV2Exception(InvalidHandle.class, invalidHandle);
}
catch (V1InvalidRegistration invalidRegistration)
{
- throw V2ToV1Converter.toV1Exception(InvalidRegistration.class,
invalidRegistration);
+ throw V1ToV2Converter.toV2Exception(InvalidRegistration.class,
invalidRegistration);
}
catch (V1InvalidSession invalidSession)
{
- throw V2ToV1Converter.toV1Exception(InvalidSession.class, invalidSession);
+ throw V1ToV2Converter.toV2Exception(InvalidSession.class, invalidSession);
}
catch (V1InvalidUserCategory invalidUserCategory)
{
- throw V2ToV1Converter.toV1Exception(InvalidUserCategory.class,
invalidUserCategory);
+ throw V1ToV2Converter.toV2Exception(InvalidUserCategory.class,
invalidUserCategory);
}
catch (V1MissingParameters missingParameter)
{
- throw V2ToV1Converter.toV1Exception(MissingParameters.class, missingParameter);
+ throw V1ToV2Converter.toV2Exception(MissingParameters.class, missingParameter);
}
catch (V1OperationFailed operationFailed)
{
- throw V2ToV1Converter.toV1Exception(OperationFailed.class, operationFailed);
+ throw V1ToV2Converter.toV2Exception(OperationFailed.class, operationFailed);
}
catch (V1UnsupportedLocale unsupportedLocale)
{
- throw V2ToV1Converter.toV1Exception(UnsupportedLocale.class,
unsupportedLocale);
+ throw V1ToV2Converter.toV2Exception(UnsupportedLocale.class,
unsupportedLocale);
}
catch (V1UnsupportedMimeType unsupportedMimeType)
{
- throw V2ToV1Converter.toV1Exception(UnsupportedMimeType.class,
unsupportedMimeType);
+ throw V1ToV2Converter.toV2Exception(UnsupportedMimeType.class,
unsupportedMimeType);
}
catch (V1UnsupportedMode unsupportedMode)
{
- throw V2ToV1Converter.toV1Exception(UnsupportedMode.class, unsupportedMode);
+ throw V1ToV2Converter.toV2Exception(UnsupportedMode.class, unsupportedMode);
}
catch (V1UnsupportedWindowState unsupportedWindowState)
{
- throw V2ToV1Converter.toV1Exception(UnsupportedWindowState.class,
unsupportedWindowState);
+ throw V1ToV2Converter.toV2Exception(UnsupportedWindowState.class,
unsupportedWindowState);
}
}
@@ -188,59 +188,59 @@
}
catch (V1AccessDenied accessDenied)
{
- throw V2ToV1Converter.toV1Exception(AccessDenied.class, accessDenied);
+ throw V1ToV2Converter.toV2Exception(AccessDenied.class, accessDenied);
}
catch (V1InconsistentParameters inconsistentParameters)
{
- throw V2ToV1Converter.toV1Exception(InconsistentParameters.class,
inconsistentParameters);
+ throw V1ToV2Converter.toV2Exception(InconsistentParameters.class,
inconsistentParameters);
}
catch (V1InvalidCookie invalidCookie)
{
- throw V2ToV1Converter.toV1Exception(InvalidCookie.class, invalidCookie);
+ throw V1ToV2Converter.toV2Exception(InvalidCookie.class, invalidCookie);
}
catch (V1InvalidHandle invalidHandle)
{
- throw V2ToV1Converter.toV1Exception(InvalidHandle.class, invalidHandle);
+ throw V1ToV2Converter.toV2Exception(InvalidHandle.class, invalidHandle);
}
catch (V1InvalidRegistration invalidRegistration)
{
- throw V2ToV1Converter.toV1Exception(InvalidRegistration.class,
invalidRegistration);
+ throw V1ToV2Converter.toV2Exception(InvalidRegistration.class,
invalidRegistration);
}
catch (V1InvalidSession invalidSession)
{
- throw V2ToV1Converter.toV1Exception(InvalidSession.class, invalidSession);
+ throw V1ToV2Converter.toV2Exception(InvalidSession.class, invalidSession);
}
catch (V1InvalidUserCategory invalidUserCategory)
{
- throw V2ToV1Converter.toV1Exception(InvalidUserCategory.class,
invalidUserCategory);
+ throw V1ToV2Converter.toV2Exception(InvalidUserCategory.class,
invalidUserCategory);
}
catch (V1MissingParameters missingParameters)
{
- throw V2ToV1Converter.toV1Exception(MissingParameters.class,
missingParameters);
+ throw V1ToV2Converter.toV2Exception(MissingParameters.class,
missingParameters);
}
catch (V1OperationFailed operationFailed)
{
- throw V2ToV1Converter.toV1Exception(OperationFailed.class, operationFailed);
+ throw V1ToV2Converter.toV2Exception(OperationFailed.class, operationFailed);
}
catch (V1PortletStateChangeRequired portletStateChangeRequired)
{
- throw V2ToV1Converter.toV1Exception(PortletStateChangeRequired.class,
portletStateChangeRequired);
+ throw V1ToV2Converter.toV2Exception(PortletStateChangeRequired.class,
portletStateChangeRequired);
}
catch (V1UnsupportedLocale unsupportedLocale)
{
- throw V2ToV1Converter.toV1Exception(UnsupportedLocale.class,
unsupportedLocale);
+ throw V1ToV2Converter.toV2Exception(UnsupportedLocale.class,
unsupportedLocale);
}
catch (V1UnsupportedMimeType unsupportedMimeType)
{
- throw V2ToV1Converter.toV1Exception(UnsupportedMimeType.class,
unsupportedMimeType);
+ throw V1ToV2Converter.toV2Exception(UnsupportedMimeType.class,
unsupportedMimeType);
}
catch (V1UnsupportedMode unsupportedMode)
{
- throw V2ToV1Converter.toV1Exception(UnsupportedMode.class, unsupportedMode);
+ throw V1ToV2Converter.toV2Exception(UnsupportedMode.class, unsupportedMode);
}
catch (V1UnsupportedWindowState unsupportedWindowState)
{
- throw V2ToV1Converter.toV1Exception(UnsupportedWindowState.class,
unsupportedWindowState);
+ throw V1ToV2Converter.toV2Exception(UnsupportedWindowState.class,
unsupportedWindowState);
}
}
@@ -259,19 +259,19 @@
}
catch (V1AccessDenied accessDenied)
{
- throw V2ToV1Converter.toV1Exception(AccessDenied.class, accessDenied);
+ throw V1ToV2Converter.toV2Exception(AccessDenied.class, accessDenied);
}
catch (V1InvalidRegistration invalidRegistration)
{
- throw V2ToV1Converter.toV1Exception(InvalidRegistration.class,
invalidRegistration);
+ throw V1ToV2Converter.toV2Exception(InvalidRegistration.class,
invalidRegistration);
}
catch (V1MissingParameters missingParameters)
{
- throw V2ToV1Converter.toV1Exception(MissingParameters.class,
missingParameters);
+ throw V1ToV2Converter.toV2Exception(MissingParameters.class,
missingParameters);
}
catch (V1OperationFailed operationFailed)
{
- throw V2ToV1Converter.toV1Exception(OperationFailed.class, operationFailed);
+ throw V1ToV2Converter.toV2Exception(OperationFailed.class, operationFailed);
}
}
@@ -284,15 +284,15 @@
}
catch (V1AccessDenied accessDenied)
{
- throw V2ToV1Converter.toV1Exception(AccessDenied.class, accessDenied);
+ throw V1ToV2Converter.toV2Exception(AccessDenied.class, accessDenied);
}
catch (V1InvalidRegistration invalidRegistration)
{
- throw V2ToV1Converter.toV1Exception(InvalidRegistration.class,
invalidRegistration);
+ throw V1ToV2Converter.toV2Exception(InvalidRegistration.class,
invalidRegistration);
}
catch (V1OperationFailed operationFailed)
{
- throw V2ToV1Converter.toV1Exception(OperationFailed.class, operationFailed);
+ throw V1ToV2Converter.toV2Exception(OperationFailed.class, operationFailed);
}
}
}
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1PortletManagementService.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1PortletManagementService.java 2010-06-14
10:34:50 UTC (rev 3324)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1PortletManagementService.java 2010-06-14
10:46:16 UTC (rev 3325)
@@ -113,7 +113,7 @@
}
catch (V1AccessDenied v1AccessDenied)
{
- WSRPExceptionFactory.throwWSException(AccessDenied.class,
v1AccessDenied.getMessage(), v1AccessDenied);
+ throw V1ToV2Converter.toV2Exception(AccessDenied.class, v1AccessDenied);
}
catch (V1InconsistentParameters v1InconsistentParameters)
{
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1RegistrationService.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1RegistrationService.java 2010-06-14
10:34:50 UTC (rev 3324)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1RegistrationService.java 2010-06-14
10:46:16 UTC (rev 3325)
@@ -88,11 +88,11 @@
}
catch (V1MissingParameters v1MissingParameters)
{
- WSRPExceptionFactory.throwWSException(MissingParameters.class,
v1MissingParameters.getMessage(), v1MissingParameters);
+ throw V1ToV2Converter.toV2Exception(MissingParameters.class,
v1MissingParameters);
}
catch (V1OperationFailed v1OperationFailed)
{
- WSRPExceptionFactory.throwWSException(OperationFailed.class,
v1OperationFailed.getMessage(), v1OperationFailed);
+ throw V1ToV2Converter.toV2Exception(OperationFailed.class, v1OperationFailed);
}
}
@@ -111,11 +111,11 @@
}
catch (V1InvalidRegistration v1InvalidRegistration)
{
- throw WSRPExceptionFactory.createWSException(InvalidRegistration.class,
v1InvalidRegistration.getMessage(), v1InvalidRegistration);
+ throw V1ToV2Converter.toV2Exception(InvalidRegistration.class,
v1InvalidRegistration);
}
catch (V1OperationFailed v1OperationFailed)
{
- throw WSRPExceptionFactory.createWSException(OperationFailed.class,
v1OperationFailed.getMessage(), v1OperationFailed);
+ throw V1ToV2Converter.toV2Exception(OperationFailed.class, v1OperationFailed);
}
}
@@ -135,15 +135,15 @@
}
catch (V1InvalidRegistration v1InvalidRegistration)
{
- WSRPExceptionFactory.throwWSException(InvalidRegistration.class,
v1InvalidRegistration.getMessage(), v1InvalidRegistration);
+ throw V1ToV2Converter.toV2Exception(InvalidRegistration.class,
v1InvalidRegistration);
}
catch (V1MissingParameters v1MissingParameters)
{
- WSRPExceptionFactory.throwWSException(MissingParameters.class,
v1MissingParameters.getMessage(), v1MissingParameters);
+ throw V1ToV2Converter.toV2Exception(MissingParameters.class,
v1MissingParameters);
}
catch (V1OperationFailed v1OperationFailed)
{
- WSRPExceptionFactory.throwWSException(OperationFailed.class,
v1OperationFailed.getMessage(), v1OperationFailed);
+ throw V1ToV2Converter.toV2Exception(OperationFailed.class, v1OperationFailed);
}
}
Modified:
components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/v1/PortletManagementEndpoint.java
===================================================================
---
components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/v1/PortletManagementEndpoint.java 2010-06-14
10:34:50 UTC (rev 3324)
+++
components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/v1/PortletManagementEndpoint.java 2010-06-14
10:46:16 UTC (rev 3325)
@@ -29,7 +29,6 @@
import org.gatein.wsrp.endpoints.WSRPBaseEndpoint;
import org.gatein.wsrp.spec.v1.V1ToV2Converter;
import org.gatein.wsrp.spec.v1.V2ToV1Converter;
-import org.gatein.wsrp.spec.v1.WSRP1ExceptionFactory;
import org.oasis.wsrp.v1.V1AccessDenied;
import org.oasis.wsrp.v1.V1DestroyFailed;
import org.oasis.wsrp.v1.V1Extension;
@@ -116,31 +115,31 @@
}
catch (AccessDenied accessDenied)
{
- WSRP1ExceptionFactory.throwWSException(accessDenied.getClass(),
accessDenied.getMessage(), accessDenied);
+ throw V2ToV1Converter.toV1Exception(V1AccessDenied.class, accessDenied);
}
catch (InvalidHandle invalidHandle)
{
- WSRP1ExceptionFactory.throwWSException(invalidHandle.getClass(),
invalidHandle.getMessage(), invalidHandle);
+ throw V2ToV1Converter.toV1Exception(V1InvalidHandle.class, invalidHandle);
}
catch (InvalidUserCategory invalidUserCategory)
{
- WSRP1ExceptionFactory.throwWSException(invalidUserCategory.getClass(),
invalidUserCategory.getMessage(), invalidUserCategory);
+ throw V2ToV1Converter.toV1Exception(V1InvalidUserCategory.class,
invalidUserCategory);
}
catch (InconsistentParameters inconsistentParameters)
{
- WSRP1ExceptionFactory.throwWSException(inconsistentParameters.getClass(),
inconsistentParameters.getMessage(), inconsistentParameters);
+ throw V2ToV1Converter.toV1Exception(V1InconsistentParameters.class,
inconsistentParameters);
}
catch (MissingParameters missingParameters)
{
- WSRP1ExceptionFactory.throwWSException(missingParameters.getClass(),
missingParameters.getMessage(), missingParameters);
+ throw V2ToV1Converter.toV1Exception(V1MissingParameters.class,
missingParameters);
}
catch (InvalidRegistration invalidRegistration)
{
- WSRP1ExceptionFactory.throwWSException(invalidRegistration.getClass(),
invalidRegistration.getMessage(), invalidRegistration);
+ throw V2ToV1Converter.toV1Exception(V1InvalidRegistration.class,
invalidRegistration);
}
catch (OperationFailed operationFailed)
{
- WSRP1ExceptionFactory.throwWSException(operationFailed.getClass(),
operationFailed.getMessage(), operationFailed);
+ throw V2ToV1Converter.toV1Exception(V1OperationFailed.class, operationFailed);
}
}
@@ -169,31 +168,31 @@
}
catch (AccessDenied accessDenied)
{
- WSRP1ExceptionFactory.throwWSException(accessDenied.getClass(),
accessDenied.getMessage(), accessDenied);
+ throw V2ToV1Converter.toV1Exception(V1AccessDenied.class, accessDenied);
}
catch (InvalidHandle invalidHandle)
{
- WSRP1ExceptionFactory.throwWSException(invalidHandle.getClass(),
invalidHandle.getMessage(), invalidHandle);
+ throw V2ToV1Converter.toV1Exception(V1InvalidHandle.class, invalidHandle);
}
catch (InvalidUserCategory invalidUserCategory)
{
- WSRP1ExceptionFactory.throwWSException(invalidUserCategory.getClass(),
invalidUserCategory.getMessage(), invalidUserCategory);
+ throw V2ToV1Converter.toV1Exception(V1InvalidUserCategory.class,
invalidUserCategory);
}
catch (InconsistentParameters inconsistentParameters)
{
- WSRP1ExceptionFactory.throwWSException(inconsistentParameters.getClass(),
inconsistentParameters.getMessage(), inconsistentParameters);
+ throw V2ToV1Converter.toV1Exception(V1InconsistentParameters.class,
inconsistentParameters);
}
catch (MissingParameters missingParameters)
{
- WSRP1ExceptionFactory.throwWSException(missingParameters.getClass(),
missingParameters.getMessage(), missingParameters);
+ throw V2ToV1Converter.toV1Exception(V1MissingParameters.class,
missingParameters);
}
catch (InvalidRegistration invalidRegistration)
{
- WSRP1ExceptionFactory.throwWSException(invalidRegistration.getClass(),
invalidRegistration.getMessage(), invalidRegistration);
+ throw V2ToV1Converter.toV1Exception(V1InvalidRegistration.class,
invalidRegistration);
}
catch (OperationFailed operationFailed)
{
- WSRP1ExceptionFactory.throwWSException(operationFailed.getClass(),
operationFailed.getMessage(), operationFailed);
+ throw V2ToV1Converter.toV1Exception(V1OperationFailed.class, operationFailed);
}
}
@@ -221,31 +220,31 @@
}
catch (AccessDenied accessDenied)
{
- WSRP1ExceptionFactory.throwWSException(accessDenied.getClass(),
accessDenied.getMessage(), accessDenied);
+ throw V2ToV1Converter.toV1Exception(V1AccessDenied.class, accessDenied);
}
catch (InvalidHandle invalidHandle)
{
- WSRP1ExceptionFactory.throwWSException(invalidHandle.getClass(),
invalidHandle.getMessage(), invalidHandle);
+ throw V2ToV1Converter.toV1Exception(V1InvalidHandle.class, invalidHandle);
}
catch (InvalidUserCategory invalidUserCategory)
{
- WSRP1ExceptionFactory.throwWSException(invalidUserCategory.getClass(),
invalidUserCategory.getMessage(), invalidUserCategory);
+ throw V2ToV1Converter.toV1Exception(V1InvalidUserCategory.class,
invalidUserCategory);
}
catch (InconsistentParameters inconsistentParameters)
{
- WSRP1ExceptionFactory.throwWSException(inconsistentParameters.getClass(),
inconsistentParameters.getMessage(), inconsistentParameters);
+ throw V2ToV1Converter.toV1Exception(V1InconsistentParameters.class,
inconsistentParameters);
}
catch (MissingParameters missingParameters)
{
- WSRP1ExceptionFactory.throwWSException(missingParameters.getClass(),
missingParameters.getMessage(), missingParameters);
+ throw V2ToV1Converter.toV1Exception(V1MissingParameters.class,
missingParameters);
}
catch (InvalidRegistration invalidRegistration)
{
- WSRP1ExceptionFactory.throwWSException(invalidRegistration.getClass(),
invalidRegistration.getMessage(), invalidRegistration);
+ throw V2ToV1Converter.toV1Exception(V1InvalidRegistration.class,
invalidRegistration);
}
catch (OperationFailed operationFailed)
{
- WSRP1ExceptionFactory.throwWSException(operationFailed.getClass(),
operationFailed.getMessage(), operationFailed);
+ throw V2ToV1Converter.toV1Exception(V1OperationFailed.class, operationFailed);
}
}
@@ -279,31 +278,31 @@
}
catch (AccessDenied accessDenied)
{
- WSRP1ExceptionFactory.throwWSException(accessDenied.getClass(),
accessDenied.getMessage(), accessDenied);
+ throw V2ToV1Converter.toV1Exception(V1AccessDenied.class, accessDenied);
}
catch (InvalidHandle invalidHandle)
{
- WSRP1ExceptionFactory.throwWSException(invalidHandle.getClass(),
invalidHandle.getMessage(), invalidHandle);
+ throw V2ToV1Converter.toV1Exception(V1InvalidHandle.class, invalidHandle);
}
catch (InvalidUserCategory invalidUserCategory)
{
- WSRP1ExceptionFactory.throwWSException(invalidUserCategory.getClass(),
invalidUserCategory.getMessage(), invalidUserCategory);
+ throw V2ToV1Converter.toV1Exception(V1InvalidUserCategory.class,
invalidUserCategory);
}
catch (InconsistentParameters inconsistentParameters)
{
- WSRP1ExceptionFactory.throwWSException(inconsistentParameters.getClass(),
inconsistentParameters.getMessage(), inconsistentParameters);
+ throw V2ToV1Converter.toV1Exception(V1InconsistentParameters.class,
inconsistentParameters);
}
catch (MissingParameters missingParameters)
{
- WSRP1ExceptionFactory.throwWSException(missingParameters.getClass(),
missingParameters.getMessage(), missingParameters);
+ throw V2ToV1Converter.toV1Exception(V1MissingParameters.class,
missingParameters);
}
catch (InvalidRegistration invalidRegistration)
{
- WSRP1ExceptionFactory.throwWSException(invalidRegistration.getClass(),
invalidRegistration.getMessage(), invalidRegistration);
+ throw V2ToV1Converter.toV1Exception(V1InvalidRegistration.class,
invalidRegistration);
}
catch (OperationFailed operationFailed)
{
- WSRP1ExceptionFactory.throwWSException(operationFailed.getClass(),
operationFailed.getMessage(), operationFailed);
+ throw V2ToV1Converter.toV1Exception(V1OperationFailed.class, operationFailed);
}
}
@@ -334,31 +333,31 @@
}
catch (AccessDenied accessDenied)
{
- WSRP1ExceptionFactory.throwWSException(accessDenied.getClass(),
accessDenied.getMessage(), accessDenied);
+ throw V2ToV1Converter.toV1Exception(V1AccessDenied.class, accessDenied);
}
catch (InvalidHandle invalidHandle)
{
- WSRP1ExceptionFactory.throwWSException(invalidHandle.getClass(),
invalidHandle.getMessage(), invalidHandle);
+ throw V2ToV1Converter.toV1Exception(V1InvalidHandle.class, invalidHandle);
}
catch (InvalidUserCategory invalidUserCategory)
{
- WSRP1ExceptionFactory.throwWSException(invalidUserCategory.getClass(),
invalidUserCategory.getMessage(), invalidUserCategory);
+ throw V2ToV1Converter.toV1Exception(V1InvalidUserCategory.class,
invalidUserCategory);
}
catch (InconsistentParameters inconsistentParameters)
{
- WSRP1ExceptionFactory.throwWSException(inconsistentParameters.getClass(),
inconsistentParameters.getMessage(), inconsistentParameters);
+ throw V2ToV1Converter.toV1Exception(V1InconsistentParameters.class,
inconsistentParameters);
}
catch (MissingParameters missingParameters)
{
- WSRP1ExceptionFactory.throwWSException(missingParameters.getClass(),
missingParameters.getMessage(), missingParameters);
+ throw V2ToV1Converter.toV1Exception(V1MissingParameters.class,
missingParameters);
}
catch (InvalidRegistration invalidRegistration)
{
- WSRP1ExceptionFactory.throwWSException(invalidRegistration.getClass(),
invalidRegistration.getMessage(), invalidRegistration);
+ throw V2ToV1Converter.toV1Exception(V1InvalidRegistration.class,
invalidRegistration);
}
catch (OperationFailed operationFailed)
{
- WSRP1ExceptionFactory.throwWSException(operationFailed.getClass(),
operationFailed.getMessage(), operationFailed);
+ throw V2ToV1Converter.toV1Exception(V1OperationFailed.class, operationFailed);
}
}
@@ -381,19 +380,19 @@
}
catch (InconsistentParameters inconsistentParameters)
{
- WSRP1ExceptionFactory.throwWSException(inconsistentParameters.getClass(),
inconsistentParameters.getMessage(), inconsistentParameters);
+ throw V2ToV1Converter.toV1Exception(V1InconsistentParameters.class,
inconsistentParameters);
}
catch (MissingParameters missingParameters)
{
- WSRP1ExceptionFactory.throwWSException(missingParameters.getClass(),
missingParameters.getMessage(), missingParameters);
+ throw V2ToV1Converter.toV1Exception(V1MissingParameters.class,
missingParameters);
}
catch (InvalidRegistration invalidRegistration)
{
- WSRP1ExceptionFactory.throwWSException(invalidRegistration.getClass(),
invalidRegistration.getMessage(), invalidRegistration);
+ throw V2ToV1Converter.toV1Exception(V1InvalidRegistration.class,
invalidRegistration);
}
catch (OperationFailed operationFailed)
{
- WSRP1ExceptionFactory.throwWSException(operationFailed.getClass(),
operationFailed.getMessage(), operationFailed);
+ throw V2ToV1Converter.toV1Exception(V1OperationFailed.class, operationFailed);
}
}
}
Modified:
components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/v1/RegistrationEndpoint.java
===================================================================
---
components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/v1/RegistrationEndpoint.java 2010-06-14
10:34:50 UTC (rev 3324)
+++
components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/v1/RegistrationEndpoint.java 2010-06-14
10:46:16 UTC (rev 3325)
@@ -29,7 +29,6 @@
import org.gatein.wsrp.endpoints.WSRPBaseEndpoint;
import org.gatein.wsrp.spec.v1.V1ToV2Converter;
import org.gatein.wsrp.spec.v1.V2ToV1Converter;
-import org.gatein.wsrp.spec.v1.WSRP1ExceptionFactory;
import org.oasis.wsrp.v1.V1Extension;
import org.oasis.wsrp.v1.V1InvalidRegistration;
import org.oasis.wsrp.v1.V1MissingParameters;
@@ -115,11 +114,11 @@
}
catch (MissingParameters missingParameters)
{
- WSRP1ExceptionFactory.throwWSException(missingParameters.getClass(),
missingParameters.getMessage(), missingParameters);
+ throw V2ToV1Converter.toV1Exception(V1MissingParameters.class,
missingParameters);
}
catch (OperationFailed operationFailed)
{
- WSRP1ExceptionFactory.throwWSException(operationFailed.getClass(),
operationFailed.getMessage(), operationFailed);
+ throw V2ToV1Converter.toV1Exception(V1OperationFailed.class, operationFailed);
}
}
@@ -137,11 +136,11 @@
}
catch (InvalidRegistration invalidRegistration)
{
- WSRP1ExceptionFactory.throwWSException(invalidRegistration.getClass(),
invalidRegistration.getMessage(), invalidRegistration);
+ throw V2ToV1Converter.toV1Exception(V1InvalidRegistration.class,
invalidRegistration);
}
catch (OperationFailed operationFailed)
{
- WSRP1ExceptionFactory.throwWSException(operationFailed.getClass(),
operationFailed.getMessage(), operationFailed);
+ throw V2ToV1Converter.toV1Exception(V1OperationFailed.class, operationFailed);
}
}
@@ -170,15 +169,15 @@
}
catch (MissingParameters missingParameters)
{
- WSRP1ExceptionFactory.throwWSException(missingParameters.getClass(),
missingParameters.getMessage(), missingParameters);
+ throw V2ToV1Converter.toV1Exception(V1MissingParameters.class,
missingParameters);
}
catch (InvalidRegistration invalidRegistration)
{
- WSRP1ExceptionFactory.throwWSException(invalidRegistration.getClass(),
invalidRegistration.getMessage(), invalidRegistration);
+ throw V2ToV1Converter.toV1Exception(V1InvalidRegistration.class,
invalidRegistration);
}
catch (OperationFailed operationFailed)
{
- WSRP1ExceptionFactory.throwWSException(operationFailed.getClass(),
operationFailed.getMessage(), operationFailed);
+ throw V2ToV1Converter.toV1Exception(V1OperationFailed.class, operationFailed);
}
}
}