gatein SVN: r3325 - in components/wsrp/trunk: wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/v1 and 1 other directory.
by do-not-reply@jboss.org
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);
}
}
}
14 years, 6 months
gatein SVN: r3324 - portal/trunk/testsuite.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2010-06-14 06:34:50 -0400 (Mon, 14 Jun 2010)
New Revision: 3324
Modified:
portal/trunk/testsuite/GateIn_v3.1.0_BasicPortlets_TestDefinition.ods
portal/trunk/testsuite/GateIn_v3.1.0_MainFucntions_TestDefinition.ods
Log:
Update test case for GateIn_v3.1.0 GA
Modified: portal/trunk/testsuite/GateIn_v3.1.0_BasicPortlets_TestDefinition.ods
===================================================================
(Binary files differ)
Modified: portal/trunk/testsuite/GateIn_v3.1.0_MainFucntions_TestDefinition.ods
===================================================================
(Binary files differ)
14 years, 6 months
gatein SVN: r3323 - portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2010-06-14 06:34:20 -0400 (Mon, 14 Jun 2010)
New Revision: 3323
Modified:
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_12_Portlet.html
Log:
TESTVN-356: Clean and improve
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_12_Portlet.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_12_Portlet.html 2010-06-14 10:01:10 UTC (rev 3322)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_12_Portlet.html 2010-06-14 10:34:20 UTC (rev 3323)
@@ -22,7 +22,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Sign in</td>
<td></td>
</tr>
@@ -42,19 +42,19 @@
<td>gtn</td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>xpath=//div[@id='UIPortalLoginFormAction']/div/div/div</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>link=Application Registry</td>
- <td>1,1</td>
+ <td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Application Registry</td>
- <td>1,1</td>
+ <td></td>
</tr>
<tr>
<td>echo</td>
@@ -67,7 +67,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>xpath=//div[@class='UIVerticalSlideTabs']//div[@class='UIVTabContent']//div[1]//a</td>
<td></td>
</tr>
@@ -107,7 +107,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>xpath=//div[@class='UIVerticalSlideTabs']//div[@class='UIVTabContent']//div[3]//a</td>
<td></td>
</tr>
@@ -137,7 +137,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>xpath=//div[@class='UIVerticalSlideTabs']/div[2]//a</td>
<td></td>
</tr>
@@ -147,7 +147,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>xpath=//div[@class='UIVerticalSlideTabs']//div[@class='UIVTabContent']//div[1]//a</td>
<td></td>
</tr>
@@ -172,7 +172,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>xpath=//div[@class='UIVerticalSlideTabs']//div[@class='UIVTabContent']//div[2]//a</td>
<td></td>
</tr>
@@ -192,15 +192,10 @@
<td></td>
</tr>
<tr>
- <td>waitForElementPresent</td>
+ <td>clickAndWait</td>
<td>link=Sign out</td>
<td></td>
</tr>
-<tr>
- <td>clickAt</td>
- <td>link=Sign out</td>
- <td></td>
-</tr>
</tbody></table>
</body>
14 years, 6 months
gatein SVN: r3322 - in components/wsrp/trunk: consumer/src/main/java/org/gatein/wsrp/services/v1 and 1 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-06-14 06:01:10 -0400 (Mon, 14 Jun 2010)
New Revision: 3322
Modified:
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/spec/v1/V1ToV2Converter.java
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/spec/v1/V2ToV1Converter.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/RegistrationEndpoint.java
Log:
- Implemented registration interface for WSRP 1. WSRP 1 re-implementation in terms of WSRP 2 interfaces should now be complete. TESTING REQUIRED!
Modified: components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/spec/v1/V1ToV2Converter.java
===================================================================
--- components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/spec/v1/V1ToV2Converter.java 2010-06-14 09:44:35 UTC (rev 3321)
+++ components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/spec/v1/V1ToV2Converter.java 2010-06-14 10:01:10 UTC (rev 3322)
@@ -54,6 +54,7 @@
import org.oasis.wsrp.v1.V1PropertyDescription;
import org.oasis.wsrp.v1.V1PropertyList;
import org.oasis.wsrp.v1.V1RegistrationContext;
+import org.oasis.wsrp.v1.V1RegistrationData;
import org.oasis.wsrp.v1.V1ResetProperty;
import org.oasis.wsrp.v1.V1Resource;
import org.oasis.wsrp.v1.V1ResourceList;
@@ -89,6 +90,7 @@
import org.oasis.wsrp.v2.PropertyDescription;
import org.oasis.wsrp.v2.PropertyList;
import org.oasis.wsrp.v2.RegistrationContext;
+import org.oasis.wsrp.v2.RegistrationData;
import org.oasis.wsrp.v2.ResetProperty;
import org.oasis.wsrp.v2.Resource;
import org.oasis.wsrp.v2.ResourceList;
@@ -687,6 +689,47 @@
}
}
+ public static RegistrationData toV2RegistrationData(V1RegistrationData registrationData)
+ {
+ if (registrationData != null)
+ {
+ RegistrationData result = WSRPTypeFactory.createRegistrationData(registrationData.getConsumerName(), registrationData.isMethodGetSupported());
+ result.setConsumerAgent(registrationData.getConsumerAgent());
+
+ List<Property> properties = WSRPUtils.transform(registrationData.getRegistrationProperties(), PROPERTY);
+ if (properties != null)
+ {
+ result.getRegistrationProperties().addAll(properties);
+ }
+ List<String> modes = registrationData.getConsumerModes();
+ if (ParameterValidation.existsAndIsNotEmpty(modes))
+ {
+ result.getConsumerModes().addAll(modes);
+ }
+ List<String> consumerUserScopes = registrationData.getConsumerUserScopes();
+ if (ParameterValidation.existsAndIsNotEmpty(consumerUserScopes))
+ {
+ result.getConsumerUserScopes().addAll(consumerUserScopes);
+ }
+ List<String> windowStates = registrationData.getConsumerWindowStates();
+ if (ParameterValidation.existsAndIsNotEmpty(windowStates))
+ {
+ result.getConsumerWindowStates().addAll(windowStates);
+ }
+ List<Extension> extensions = WSRPUtils.transform(registrationData.getExtensions(), EXTENSION);
+ if (extensions != null)
+ {
+ result.getExtensions().addAll(extensions);
+ }
+
+ return result;
+ }
+ else
+ {
+ return null;
+ }
+ }
+
public static class V1ToV2Extension implements Function<V1Extension, Extension>
{
public Extension apply(V1Extension from)
Modified: components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/spec/v1/V2ToV1Converter.java
===================================================================
--- components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/spec/v1/V2ToV1Converter.java 2010-06-14 09:44:35 UTC (rev 3321)
+++ components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/spec/v1/V2ToV1Converter.java 2010-06-14 10:01:10 UTC (rev 3322)
@@ -52,6 +52,7 @@
import org.oasis.wsrp.v1.V1PropertyDescription;
import org.oasis.wsrp.v1.V1PropertyList;
import org.oasis.wsrp.v1.V1RegistrationContext;
+import org.oasis.wsrp.v1.V1RegistrationData;
import org.oasis.wsrp.v1.V1ResetProperty;
import org.oasis.wsrp.v1.V1Resource;
import org.oasis.wsrp.v1.V1ResourceList;
@@ -91,6 +92,7 @@
import org.oasis.wsrp.v2.PropertyDescription;
import org.oasis.wsrp.v2.PropertyList;
import org.oasis.wsrp.v2.RegistrationContext;
+import org.oasis.wsrp.v2.RegistrationData;
import org.oasis.wsrp.v2.ResetProperty;
import org.oasis.wsrp.v2.Resource;
import org.oasis.wsrp.v2.ResourceList;
@@ -787,6 +789,47 @@
}
}
+ public static V1RegistrationData toV1RegistrationData(RegistrationData registrationData)
+ {
+ if (registrationData != null)
+ {
+ V1RegistrationData result = WSRP1TypeFactory.createRegistrationData(registrationData.getConsumerName(), registrationData.isMethodGetSupported());
+ result.setConsumerAgent(registrationData.getConsumerAgent());
+
+ List<V1Property> properties = WSRPUtils.transform(registrationData.getRegistrationProperties(), PROPERTY);
+ if (properties != null)
+ {
+ result.getRegistrationProperties().addAll(properties);
+ }
+ List<String> modes = registrationData.getConsumerModes();
+ if (ParameterValidation.existsAndIsNotEmpty(modes))
+ {
+ result.getConsumerModes().addAll(modes);
+ }
+ List<String> consumerUserScopes = registrationData.getConsumerUserScopes();
+ if (ParameterValidation.existsAndIsNotEmpty(consumerUserScopes))
+ {
+ result.getConsumerUserScopes().addAll(consumerUserScopes);
+ }
+ List<String> windowStates = registrationData.getConsumerWindowStates();
+ if (ParameterValidation.existsAndIsNotEmpty(windowStates))
+ {
+ result.getConsumerWindowStates().addAll(windowStates);
+ }
+ List<V1Extension> extensions = WSRPUtils.transform(registrationData.getExtensions(), EXTENSION);
+ if (extensions != null)
+ {
+ result.getExtensions().addAll(extensions);
+ }
+
+ return result;
+ }
+ else
+ {
+ return null;
+ }
+ }
+
private static class V2ToV1Extension implements Function<Extension, V1Extension>
{
public V1Extension apply(Extension from)
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 09:44:35 UTC (rev 3321)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1RegistrationService.java 2010-06-14 10:01:10 UTC (rev 3322)
@@ -1,29 +1,37 @@
/*
-* JBoss, a division of Red Hat
-* Copyright 2008, Red Hat Middleware, LLC, and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
+ * JBoss, a division of Red Hat
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.gatein.wsrp.services.v1;
-import org.gatein.common.NotYetImplemented;
+import org.gatein.wsrp.WSRPExceptionFactory;
+import org.gatein.wsrp.WSRPUtils;
import org.gatein.wsrp.services.RegistrationService;
+import org.gatein.wsrp.spec.v1.V1ToV2Converter;
+import org.gatein.wsrp.spec.v1.V2ToV1Converter;
+import org.oasis.wsrp.v1.V1Extension;
+import org.oasis.wsrp.v1.V1InvalidRegistration;
+import org.oasis.wsrp.v1.V1MissingParameters;
+import org.oasis.wsrp.v1.V1OperationFailed;
import org.oasis.wsrp.v1.WSRPV1RegistrationPortType;
import org.oasis.wsrp.v2.AccessDenied;
import org.oasis.wsrp.v2.Extension;
@@ -58,30 +66,96 @@
@Override
public void register(RegistrationData registrationData, Lifetime lifetime, UserContext userContext, Holder<byte[]> registrationState, Holder<Lifetime> scheduledDestruction, Holder<List<Extension>> extensions, Holder<String> registrationHandle) throws MissingParameters, OperationFailed, OperationNotSupported
{
- throw new NotYetImplemented();
+ try
+ {
+ Holder<List<V1Extension>> v1Extensions = new Holder<List<V1Extension>>();
+
+ service.register(
+ registrationData.getConsumerName(),
+ registrationData.getConsumerAgent(),
+ registrationData.isMethodGetSupported(),
+ registrationData.getConsumerModes(),
+ registrationData.getConsumerWindowStates(),
+ registrationData.getConsumerUserScopes(),
+ null,
+ WSRPUtils.transform(registrationData.getRegistrationProperties(), V2ToV1Converter.PROPERTY),
+ new Holder<List<V1Extension>>(),
+ registrationHandle,
+ registrationState
+ );
+
+ extensions.value = WSRPUtils.transform(v1Extensions.value, V1ToV2Converter.EXTENSION);
+ }
+ catch (V1MissingParameters v1MissingParameters)
+ {
+ WSRPExceptionFactory.throwWSException(MissingParameters.class, v1MissingParameters.getMessage(), v1MissingParameters);
+ }
+ catch (V1OperationFailed v1OperationFailed)
+ {
+ WSRPExceptionFactory.throwWSException(OperationFailed.class, v1OperationFailed.getMessage(), v1OperationFailed);
+ }
}
@Override
public List<Extension> deregister(RegistrationContext registrationContext, UserContext userContext) throws InvalidRegistration, OperationFailed, OperationNotSupported, ResourceSuspended
{
- throw new NotYetImplemented();
+ try
+ {
+ Holder<List<V1Extension>> v1Extensions = new Holder<List<V1Extension>>();
+
+ service.deregister(registrationContext.getRegistrationHandle(),
+ registrationContext.getRegistrationState(),
+ v1Extensions);
+
+ return WSRPUtils.transform(v1Extensions.value, V1ToV2Converter.EXTENSION);
+ }
+ catch (V1InvalidRegistration v1InvalidRegistration)
+ {
+ throw WSRPExceptionFactory.createWSException(InvalidRegistration.class, v1InvalidRegistration.getMessage(), v1InvalidRegistration);
+ }
+ catch (V1OperationFailed v1OperationFailed)
+ {
+ throw WSRPExceptionFactory.createWSException(OperationFailed.class, v1OperationFailed.getMessage(), v1OperationFailed);
+ }
}
@Override
public void modifyRegistration(RegistrationContext registrationContext, RegistrationData registrationData, UserContext userContext, Holder<byte[]> registrationState, Holder<Lifetime> scheduledDestruction, Holder<List<Extension>> extensions) throws InvalidRegistration, MissingParameters, OperationFailed, OperationNotSupported, ResourceSuspended
{
- throw new NotYetImplemented();
+ try
+ {
+ Holder<List<V1Extension>> v1Extensions = new Holder<List<V1Extension>>();
+
+ service.modifyRegistration(V2ToV1Converter.toV1RegistrationContext(registrationContext),
+ V2ToV1Converter.toV1RegistrationData(registrationData),
+ registrationState,
+ v1Extensions);
+
+ extensions.value = WSRPUtils.transform(v1Extensions.value, V1ToV2Converter.EXTENSION);
+ }
+ catch (V1InvalidRegistration v1InvalidRegistration)
+ {
+ WSRPExceptionFactory.throwWSException(InvalidRegistration.class, v1InvalidRegistration.getMessage(), v1InvalidRegistration);
+ }
+ catch (V1MissingParameters v1MissingParameters)
+ {
+ WSRPExceptionFactory.throwWSException(MissingParameters.class, v1MissingParameters.getMessage(), v1MissingParameters);
+ }
+ catch (V1OperationFailed v1OperationFailed)
+ {
+ WSRPExceptionFactory.throwWSException(OperationFailed.class, v1OperationFailed.getMessage(), v1OperationFailed);
+ }
}
@Override
public Lifetime getRegistrationLifetime(GetRegistrationLifetime getRegistrationLifetime) throws AccessDenied, InvalidHandle, InvalidRegistration, ModifyRegistrationRequired, OperationFailed, OperationNotSupported, ResourceSuspended
{
- throw new NotYetImplemented();
+ throw WSRPExceptionFactory.createWSException(OperationNotSupported.class, "getRegistrationLifetime is not supported in WSRP 1", null);
}
@Override
public Lifetime setRegistrationLifetime(SetRegistrationLifetime setRegistrationLifetime) throws AccessDenied, InvalidHandle, InvalidRegistration, ModifyRegistrationRequired, OperationFailed, OperationNotSupported, ResourceSuspended
{
- throw new NotYetImplemented();
+ throw WSRPExceptionFactory.createWSException(OperationNotSupported.class, "setRegistrationLifetime is not supported in WSRP 1", null);
}
}
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 09:44:35 UTC (rev 3321)
+++ components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/v1/RegistrationEndpoint.java 2010-06-14 10:01:10 UTC (rev 3322)
@@ -23,19 +23,25 @@
package org.gatein.wsrp.endpoints.v1;
-import org.gatein.common.NotYetImplemented;
+import org.gatein.common.util.ParameterValidation;
+import org.gatein.wsrp.WSRPTypeFactory;
+import org.gatein.wsrp.WSRPUtils;
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;
-import org.oasis.wsrp.v1.V1ModifyRegistration;
import org.oasis.wsrp.v1.V1OperationFailed;
import org.oasis.wsrp.v1.V1Property;
import org.oasis.wsrp.v1.V1RegistrationContext;
import org.oasis.wsrp.v1.V1RegistrationData;
-import org.oasis.wsrp.v1.V1RegistrationState;
import org.oasis.wsrp.v1.WSRPV1RegistrationPortType;
+import org.oasis.wsrp.v2.InvalidRegistration;
+import org.oasis.wsrp.v2.MissingParameters;
import org.oasis.wsrp.v2.ModifyRegistration;
+import org.oasis.wsrp.v2.OperationFailed;
import org.oasis.wsrp.v2.RegistrationContext;
import org.oasis.wsrp.v2.RegistrationData;
import org.oasis.wsrp.v2.RegistrationState;
@@ -76,23 +82,45 @@
@WebParam(mode = WebParam.Mode.OUT, name = "registrationState", targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") Holder<byte[]> registrationState)
throws V1MissingParameters, V1OperationFailed
{
- /*RegistrationData registrationData = new RegistrationData();
- registrationData.setConsumerName(consumerName);
- registrationData.setConsumerAgent(consumerAgent);
- registrationData.getConsumerModes().addAll(consumerModes);
- registrationData.getConsumerWindowStates().addAll(consumerWindowStates);
- registrationData.getConsumerUserScopes().addAll(consumerUserScopes);
+ try
+ {
+ RegistrationData registrationData = WSRPTypeFactory.createRegistrationData(consumerName, methodGetSupported);
+ registrationData.setConsumerAgent(consumerAgent);
+ if (ParameterValidation.existsAndIsNotEmpty(consumerModes))
+ {
+ registrationData.getConsumerModes().addAll(consumerModes);
+ }
+ if (ParameterValidation.existsAndIsNotEmpty(consumerWindowStates))
+ {
+ registrationData.getConsumerWindowStates().addAll(consumerWindowStates);
+ }
+ if (ParameterValidation.existsAndIsNotEmpty(consumerUserScopes))
+ {
+ registrationData.getConsumerUserScopes().addAll(consumerUserScopes);
+ }
// registrationData.getCustomUserProfileData().addAll(customUserProfileData);
- registrationData.getRegistrationProperties().addAll(registrationProperties);
- registrationData.getExtensions().addAll(extensions.value);
+ if (ParameterValidation.existsAndIsNotEmpty(registrationProperties))
+ {
+ registrationData.getRegistrationProperties().addAll(WSRPUtils.transform(registrationProperties, V1ToV2Converter.PROPERTY));
+ }
+ if (ParameterValidation.existsAndIsNotEmpty(extensions.value))
+ {
+ registrationData.getExtensions().addAll(WSRPUtils.transform(extensions.value, V1ToV2Converter.EXTENSION));
+ }
- RegistrationContext registrationContext = producer.register(registrationData);
-
- registrationHandle.value = registrationContext.getRegistrationHandle();
- registrationState.value = registrationContext.getRegistrationState();
- extensions.value = registrationContext.getExtensions();*/
-
- throw new NotYetImplemented();
+ RegistrationContext registrationContext = producer.register(registrationData);
+ registrationHandle.value = registrationContext.getRegistrationHandle();
+ registrationState.value = registrationContext.getRegistrationState();
+ extensions.value = WSRPUtils.transform(registrationContext.getExtensions(), V2ToV1Converter.EXTENSION);
+ }
+ catch (MissingParameters missingParameters)
+ {
+ WSRP1ExceptionFactory.throwWSException(missingParameters.getClass(), missingParameters.getMessage(), missingParameters);
+ }
+ catch (OperationFailed operationFailed)
+ {
+ WSRP1ExceptionFactory.throwWSException(operationFailed.getClass(), operationFailed.getMessage(), operationFailed);
+ }
}
public void deregister(
@@ -101,13 +129,20 @@
@WebParam(name = "extensions", targetNamespace = "urn:oasis:names:tc:wsrp:v1:types", mode = WebParam.Mode.INOUT) Holder<List<V1Extension>> extensions
) throws V1InvalidRegistration, V1OperationFailed
{
- /*RegistrationContext rc = new RegistrationContext();
- rc.setRegistrationHandle(registrationHandle);
- rc.setRegistrationState(registrationState);
-
- producer.deregister(rc);*/
-
- throw new NotYetImplemented();
+ try
+ {
+ RegistrationContext rc = WSRPTypeFactory.createRegistrationContext(registrationHandle);
+ rc.setRegistrationState(registrationState);
+ producer.deregister(rc);
+ }
+ catch (InvalidRegistration invalidRegistration)
+ {
+ WSRP1ExceptionFactory.throwWSException(invalidRegistration.getClass(), invalidRegistration.getMessage(), invalidRegistration);
+ }
+ catch (OperationFailed operationFailed)
+ {
+ WSRP1ExceptionFactory.throwWSException(operationFailed.getClass(), operationFailed.getMessage(), operationFailed);
+ }
}
public void modifyRegistration(
@@ -117,19 +152,33 @@
@WebParam(mode = WebParam.Mode.OUT, name = "extensions", targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") Holder<List<V1Extension>> extensions)
throws V1MissingParameters, V1InvalidRegistration, V1OperationFailed
{
- /*ModifyRegistration modifyRegistration = new ModifyRegistration();
- modifyRegistration.setRegistrationContext(registrationContext);
- modifyRegistration.setRegistrationData(registrationData);
- RegistrationState result = producer.modifyRegistration(modifyRegistration);
+ try
+ {
+ ModifyRegistration modifyRegistration = WSRPTypeFactory.createModifyRegistration(
+ V1ToV2Converter.toV2RegistrationContext(registrationContext),
+ V1ToV2Converter.toV2RegistrationData(registrationData));
- // it is possible (if not likely) that result of modifyRegistration be null
- if (result != null)
+ RegistrationState result = producer.modifyRegistration(modifyRegistration);
+
+ // it is possible (if not likely) that result of modifyRegistration be null
+ if (result != null)
+ {
+ registrationState.value = result.getRegistrationState();
+ extensions.value = WSRPUtils.transform(result.getExtensions(), V2ToV1Converter.EXTENSION);
+ }
+ }
+ catch (MissingParameters missingParameters)
{
- registrationState.value = result.getRegistrationState();
- extensions.value = result.getExtensions();
- }*/
-
- throw new NotYetImplemented();
+ WSRP1ExceptionFactory.throwWSException(missingParameters.getClass(), missingParameters.getMessage(), missingParameters);
+ }
+ catch (InvalidRegistration invalidRegistration)
+ {
+ WSRP1ExceptionFactory.throwWSException(invalidRegistration.getClass(), invalidRegistration.getMessage(), invalidRegistration);
+ }
+ catch (OperationFailed operationFailed)
+ {
+ WSRP1ExceptionFactory.throwWSException(operationFailed.getClass(), operationFailed.getMessage(), operationFailed);
+ }
}
}
14 years, 6 months
gatein SVN: r3321 - components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-06-14 05:44:35 -0400 (Mon, 14 Jun 2010)
New Revision: 3321
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1ServiceDescriptionService.java
Log:
- Minor.
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1ServiceDescriptionService.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1ServiceDescriptionService.java 2010-06-14 09:43:26 UTC (rev 3320)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1ServiceDescriptionService.java 2010-06-14 09:44:35 UTC (rev 3321)
@@ -80,24 +80,35 @@
Holder<Boolean> mayReturnRegistrationState, Holder<List<Extension>> extensions)
throws InvalidRegistration, ModifyRegistrationRequired, OperationFailed, ResourceSuspended
{
- V1RegistrationContext v1RegistrationContext = V2ToV1Converter.toV1RegistrationContext(registrationContext);
- Holder<List<V1PortletDescription>> v1OfferedPortlets = new Holder<List<V1PortletDescription>>();
- Holder<List<V1ItemDescription>> v1UserCategories = new Holder<List<V1ItemDescription>>();
- Holder<List<V1ItemDescription>> v1ProfileITems = new Holder<List<V1ItemDescription>>();
- Holder<List<V1ItemDescription>> v1WindowStates = new Holder<List<V1ItemDescription>>();
- Holder<List<V1ItemDescription>> v1Modes = new Holder<List<V1ItemDescription>>();
- Holder<V1CookieProtocol> v1Cookie = new Holder<V1CookieProtocol>();
- Holder<V1ModelDescription> v1RegistrationProperties = new Holder<V1ModelDescription>();
- Holder<V1ResourceList> v1Resources = new Holder<V1ResourceList>();
- Holder<List<V1Extension>> v1Extensions = new Holder<List<V1Extension>>();
try
{
+ V1RegistrationContext v1RegistrationContext = V2ToV1Converter.toV1RegistrationContext(registrationContext);
+ Holder<List<V1PortletDescription>> v1OfferedPortlets = new Holder<List<V1PortletDescription>>();
+ Holder<List<V1ItemDescription>> v1UserCategories = new Holder<List<V1ItemDescription>>();
+ Holder<List<V1ItemDescription>> v1ProfileITems = new Holder<List<V1ItemDescription>>();
+ Holder<List<V1ItemDescription>> v1WindowStates = new Holder<List<V1ItemDescription>>();
+ Holder<List<V1ItemDescription>> v1Modes = new Holder<List<V1ItemDescription>>();
+ Holder<V1CookieProtocol> v1Cookie = new Holder<V1CookieProtocol>();
+ Holder<V1ModelDescription> v1RegistrationProperties = new Holder<V1ModelDescription>();
+ Holder<V1ResourceList> v1Resources = new Holder<V1ResourceList>();
+ Holder<List<V1Extension>> v1Extensions = new Holder<List<V1Extension>>();
+
service.getServiceDescription(v1RegistrationContext, desiredLocales, requiresRegistration, v1OfferedPortlets,
v1UserCategories,
v1ProfileITems,
v1WindowStates,
v1Modes,
v1Cookie, v1RegistrationProperties, locales, v1Resources, v1Extensions);
+
+ offeredPortlets.value = WSRPUtils.transform(v1OfferedPortlets.value, V1ToV2Converter.PORTLETDESCRIPTION);
+ userCategoryDescriptions.value = WSRPUtils.transform(v1UserCategories.value, V1ToV2Converter.ITEMDESCRIPTION);
+// customUserProfileItemDescriptions.value = description.getCustomUserProfileItemDescriptions();
+ customWindowStateDescriptions.value = WSRPUtils.transform(v1WindowStates.value, V1ToV2Converter.ITEMDESCRIPTION);
+ customModeDescriptions.value = WSRPUtils.transform(v1Modes.value, V1ToV2Converter.ITEMDESCRIPTION);
+ requiresInitCookie.value = V1ToV2Converter.toV2CookieProtocol(v1Cookie.value);
+ registrationPropertyDescription.value = V1ToV2Converter.toV2ModelDescription(v1RegistrationProperties.value);
+ resourceList.value = V1ToV2Converter.toV2ResourceList(v1Resources.value);
+ extensions.value = WSRPUtils.transform(v1Extensions.value, V1ToV2Converter.EXTENSION);
}
catch (V1InvalidRegistration v1InvalidRegistration)
{
@@ -107,15 +118,5 @@
{
throw V1ToV2Converter.toV2Exception(OperationFailed.class, v1OperationFailed);
}
-
- offeredPortlets.value = WSRPUtils.transform(v1OfferedPortlets.value, V1ToV2Converter.PORTLETDESCRIPTION);
- userCategoryDescriptions.value = WSRPUtils.transform(v1UserCategories.value, V1ToV2Converter.ITEMDESCRIPTION);
-// customUserProfileItemDescriptions.value = description.getCustomUserProfileItemDescriptions();
- customWindowStateDescriptions.value = WSRPUtils.transform(v1WindowStates.value, V1ToV2Converter.ITEMDESCRIPTION);
- customModeDescriptions.value = WSRPUtils.transform(v1Modes.value, V1ToV2Converter.ITEMDESCRIPTION);
- requiresInitCookie.value = V1ToV2Converter.toV2CookieProtocol(v1Cookie.value);
- registrationPropertyDescription.value = V1ToV2Converter.toV2ModelDescription(v1RegistrationProperties.value);
- resourceList.value = V1ToV2Converter.toV2ResourceList(v1Resources.value);
- extensions.value = WSRPUtils.transform(v1Extensions.value, V1ToV2Converter.EXTENSION);
}
}
14 years, 6 months
gatein SVN: r3320 - in components/wsrp/trunk: wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/v1 and 1 other directory.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-06-14 05:43:26 -0400 (Mon, 14 Jun 2010)
New Revision: 3320
Modified:
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPTypeFactory.java
components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/v1/PortletManagementEndpoint.java
Log:
- GTNWSRP-43: Replaced direct calls to constructors.
- GTNWSRP-42: Started updating for WSRP 2 type compliance.
Modified: components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPTypeFactory.java
===================================================================
--- components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPTypeFactory.java 2010-06-14 08:58:54 UTC (rev 3319)
+++ components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPTypeFactory.java 2010-06-14 09:43:26 UTC (rev 3320)
@@ -92,9 +92,10 @@
import static org.gatein.wsrp.WSRPRewritingConstants.*;
/**
+ * TODO: NEEDS TO BE UPDATED TO CONFORM TO WSRP 2 XSD, see GTNWSRP-42
+ * <p/>
* Creates minimally valid instances of WSRP types, populated with default values where possible, as per
- * wsrp_v2_types.xsd. See <a href="http://jira.jboss.com/jira/browse/JBPORTAL-808">JBPORTAL-808</a> for more
- * information.
+ * wsrp_v2_types.xsd.
*
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
* @version $Revision: 11317 $
@@ -212,6 +213,18 @@
return description;
}
+ public static GetPortletDescription createGetPortletDescription(RegistrationContext registrationContext, PortletContext portletContext, UserContext userContext)
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNull(registrationContext, "registration context");
+ ParameterValidation.throwIllegalArgExceptionIfNull(portletContext, "portlet context");
+ ParameterValidation.throwIllegalArgExceptionIfNull(userContext, "user context");
+ GetPortletDescription description = new GetPortletDescription();
+ description.setPortletContext(portletContext);
+ description.setRegistrationContext(registrationContext);
+ description.setUserContext(userContext);
+ return description;
+ }
+
/**
* @param registrationContext
* @param portletContext
@@ -239,31 +252,25 @@
return getPortletDescription;
}
- /**
- * registrationContext(RegistrationContext)?, portletContext(PortletContext), userContext(UserContext)?,
- * desiredLocales(xsd:string)*
- *
- * @param registrationContext
- * @param portletContext
- * @return
- * @since 2.4.1
- */
- public static GetPortletProperties createGetPortletProperties(RegistrationContext registrationContext, PortletContext portletContext)
+ public static GetPortletProperties createGetPortletProperties(RegistrationContext registrationContext, PortletContext portletContext, UserContext userContext, List<String> names)
{
ParameterValidation.throwIllegalArgExceptionIfNull(portletContext, "PortletContext");
+ ParameterValidation.throwIllegalArgExceptionIfNull(registrationContext, "RegistrationContext");
+ ParameterValidation.throwIllegalArgExceptionIfNull(userContext, "UserContext");
+ if (!ParameterValidation.existsAndIsNotEmpty(names))
+ {
+ throw new IllegalArgumentException("Must pass a non-null list of property names");
+ }
GetPortletProperties properties = new GetPortletProperties();
properties.setRegistrationContext(registrationContext);
properties.setPortletContext(portletContext);
+ properties.setUserContext(userContext);
+ properties.getNames().addAll(names);
return properties;
}
- /** ====== WSRP Response objects ====== **/
+ /** ====== WSRP Response objects ====== * */
- /**
- * ( updateResponse(UpdateResponse) | redirectURL(xsd:string) ), extensions(Extension)*
- *
- * @return
- */
public static BlockingInteractionResponse createBlockingInteractionResponse(UpdateResponse updateResponse)
{
if (updateResponse == null)
@@ -275,11 +282,6 @@
return interactionResponse;
}
- /**
- * ( updateResponse(UpdateResponse) | redirectURL(xsd:string) ), extensions(Extension)*
- *
- * @return
- */
public static BlockingInteractionResponse createBlockingInteractionResponse(String redirectURL)
{
if (redirectURL == null || redirectURL.length() == 0)
@@ -291,27 +293,11 @@
return interactionResponse;
}
- /**
- * sessionContext(SessionContext)?, portletContext(PortletContext)?, markupContext(MarkupContext)?,
- * navigationalState(xsd:string)? newWindowState(xsd:string)?, newMode(xsd:string)?
- *
- * @return
- */
public static UpdateResponse createUpdateResponse()
{
return new UpdateResponse();
}
- /**
- * portletHandle(xsd:string), markupTypes(MarkupType)+, groupID(xsd:string)?, description(LocalizedString)?,
- * shortTitle(LocalizedString)?, title(LocalizedString)?, displayName(LocalizedString)?, keywords(LocalizedString)*,
- * userCategories(xsd:string)*, userProfileItems(xsd:string)*, usesMethodGet(xsd:boolean[false])?,
- * defaultMarkupSecure(xsd:boolean[false])?, onlySecure(xsd:boolean[false])?, userContextStoredInSession(xsd:boolean[false])?,
- * templatesStoredInSession(xsd:boolean[false])?, hasUserSpecificState(xsd:boolean[false])?,
- * doesUrlTemplateProcessing(xsd:boolean[false])?, extensions(Extension)*
- *
- * @return
- */
public static PortletDescription createPortletDescription(org.gatein.pc.api.PortletContext portletContext, List<MarkupType> markupTypes)
{
PortletContext context = WSRPUtils.convertToWSRPPortletContext(portletContext);
@@ -366,14 +352,6 @@
WSRPConstants.VIEW_MODE, WSRPConstants.NORMAL_WINDOW_STATE);
}
- /**
- * secureClientCommunication(xsd:boolean), locales(xsd:string)+, mimeTypes(xsd:string)+, mode(xsd:string),
- * windowState(xsd:string), clientData({@link ClientData})?, navigationalState(xsd:string)?,
- * markupCharacterSets(xsd:string)*, validateTag(xsd:string)?, validNewModes(xsd:string)*,
- * validNewWindowStates(xsd:string)*, extensions({@link org.oasis.wsrp.v2.Extension})*
- *
- * @return
- */
public static MarkupParams createMarkupParams(boolean secureClientCommunication, List<String> locales,
List<String> mimeTypes, String mode, String windowState)
{
@@ -412,12 +390,6 @@
return createRuntimeContext(WSRPConstants.NONE_USER_AUTHENTICATION);
}
- /**
- * userAuthentication(xsd:string), portletInstanceKey(xsd:string)?, namespacePrefix(xsd:string)?,
- * templates(Templates)?, sessionID(xsd:string)?, extensions(Extension)*
- *
- * @return
- */
public static RuntimeContext createRuntimeContext(String userAuthentication)
{
ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(userAuthentication, "user authentication", "RuntimeContext");
@@ -427,12 +399,6 @@
return runtimeContext;
}
- /**
- * portletHandle(xsd:string), portletState(xsd:base64Binary)?, extensions({@link org.oasis.wsrp.v2.Extension})*
- *
- * @param portletHandle
- * @return
- */
public static PortletContext createPortletContext(String portletHandle)
{
checkPortletHandle(portletHandle);
@@ -443,12 +409,6 @@
}
- /**
- * @param portletHandle
- * @param portletState
- * @return
- * @since 2.6
- */
public static PortletContext createPortletContext(String portletHandle, byte[] portletState)
{
PortletContext pc = createPortletContext(portletHandle);
@@ -466,12 +426,6 @@
return createInteractionParams(StateChange.READ_ONLY);
}
- /**
- * portletStateChange({@link StateChange}), interactionState(xsd:string)?, formParameters(NamedString)*,
- * uploadContexts(UploadContext)*, extensions(Extension)*
- *
- * @return
- */
public static InteractionParams createInteractionParams(StateChange portletStateChange)
{
ParameterValidation.throwIllegalArgExceptionIfNull(portletStateChange, "portletStateChange");
@@ -481,12 +435,6 @@
return interactionParams;
}
- /**
- * registrationContext(RegistrationContext)?
- *
- * @param registrationContext
- * @return
- */
public static InitCookie createInitCookie(RegistrationContext registrationContext)
{
InitCookie initCookie = new InitCookie();
@@ -494,15 +442,6 @@
return initCookie;
}
- /**
- * requiresRegistration(xsd:boolean), offeredPortlets(PortletDescription)*, userCategoryDescriptions(ItemDescription)*,
- * customUserProfileItemDescriptions(ItemDescription)*, customWindowStateDescriptions(ItemDescription)*,
- * customModeDescriptions(ItemDescription)*, requiresInitCookie(CookieProtocol[none])?,
- * registrationPropertyDescription(ModelDescription)?, locales(xsd:string)*, resourceList(ResourceList)?,
- * extensions(Extension)*
- *
- * @return
- */
public static ServiceDescription createServiceDescription(boolean requiresRegistration)
{
ServiceDescription serviceDescription = new ServiceDescription();
@@ -510,11 +449,6 @@
return serviceDescription;
}
- /**
- * markupContext(MarkupContext), sessionContext(SessionContext)?, extensions(Extension)*
- *
- * @return
- */
public static MarkupResponse createMarkupResponse(MarkupContext markupContext)
{
ParameterValidation.throwIllegalArgExceptionIfNull(markupContext, "MarkupContext");
@@ -530,11 +464,6 @@
* textual mime types using the syntax specified in RFC1522[14] (e.g. "text/html; charset=UTF-8"). In this particular
* case this character set MAY be different than the response message.
* <p/>
- * useCachedMarkup(xsd:boolean[false])?, mimeType(xsd:string)?, (markupString(xsd:string) |
- * markupBinary(xsd:base64Binary)), locale(xsd:string)?, requiresUrlRewriting(xsd:boolean[false])?,
- * cacheControl(CacheControl)?, preferredTitle(xsd:string)?, extensions(Extension)*
- *
- * @return
*/
public static MarkupContext createMarkupContext(String mediaType, String markupString)
{
@@ -550,10 +479,6 @@
}
/**
- * useCachedMarkup(xsd:boolean[false])?, mimeType(xsd:string)?, (markupString(xsd:string) |
- * markupBinary(xsd:base64Binary)), locale(xsd:string)?, requiresUrlRewriting(xsd:boolean[false])?,
- * cacheControl(CacheControl)?, preferredTitle(xsd:string)?, extensions(Extension)*
- *
* @param mediaType The mime type of the returned markup. The mimeType field MUST be specified whenever markup is
* returned, and if the markupBinary field is used to return the markup, the mime type MUST include
* the character set for textual mime types using the syntax specified in RFC1522[14] (e.g.
@@ -575,8 +500,6 @@
}
/**
- * sessionID(xsd:string), expires(xsd:int), extensions(Extension)*
- *
* @param sessionID An opaque string the Portlet defines for referencing state that is stored locally on the
* Producer. The maximum length of a sessionID is 4096 characters,
* @param expires Maximum number of seconds between invocations referencing the sessionID before the Producer will
@@ -597,13 +520,7 @@
return sessionContext;
}
- /**
- * For UserProfile and related classes, everything is optional so no need to have factory methods.
- * <p/>
- * userContextKey(xsd:string), userCategories(xsd:string)*, profile(UserProfile)?, extensions(Extension)*
- *
- * @return
- */
+ /** For UserProfile and related classes, everything is optional so no need to have factory methods. */
public static UserContext createUserContext(String userContextKey)
{
ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(userContextKey, "user context key", "UserContext");
@@ -613,10 +530,6 @@
}
/**
- * consumerName(xsd:string), consumerAgent(xsd:string), methodGetSupported(xsd:boolean), consumerModes(xsd:string)*,
- * consumerWindowStates(xsd:string)*, consumerUserScopes(xsd:string)*, customUserProfileData(xsd:string)*,
- * registrationProperties(Property)*, extensions(Extension)*
- *
* @param consumerName A name (preferably unique) that identifies the Consumer [R355] An example of such a name
* would be the Consumer's URL.
* @param methodGetSupported A flag that tells the Producer whether the Consumer has implemented portlet URLs
@@ -650,11 +563,6 @@
return registrationData;
}
- /**
- * ( stringValue(xsd:string) | any* ), @name(xsd:string), @xml:lang
- *
- * @return
- */
public static Property createProperty(String name, String lang, String stringValue)
{
// QName.valueOf validates name
@@ -1044,26 +952,19 @@
return clonePortlet;
}
- /**
- * registrationContext(RegistrationContext)?, portletHandles(xsd:string)+
- *
- * @return
- * @since 2.6
- */
public static DestroyPortlets createDestroyPortlets(RegistrationContext registrationContext, List<String> portletHandles)
{
+ ParameterValidation.throwIllegalArgExceptionIfNull(registrationContext, "RegistrationContext");
ParameterValidation.throwIllegalArgExceptionIfNull(portletHandles, "Portlet handles");
- if (portletHandles.isEmpty())
+ if (!ParameterValidation.existsAndIsNotEmpty(portletHandles))
{
throw new IllegalArgumentException("Cannot create a DestroyPortlets with an empty list of portlet handles!");
}
DestroyPortlets destroyPortlets = new DestroyPortlets();
destroyPortlets.setRegistrationContext(registrationContext);
- if (ParameterValidation.existsAndIsNotEmpty(portletHandles))
- {
- destroyPortlets.getPortletHandles().addAll(portletHandles);
- }
+ destroyPortlets.getPortletHandles().addAll(portletHandles);
+
return destroyPortlets;
}
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 08:58:54 UTC (rev 3319)
+++ components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/v1/PortletManagementEndpoint.java 2010-06-14 09:43:26 UTC (rev 3320)
@@ -23,6 +23,8 @@
package org.gatein.wsrp.endpoints.v1;
+import org.gatein.common.util.ParameterValidation;
+import org.gatein.wsrp.WSRPTypeFactory;
import org.gatein.wsrp.WSRPUtils;
import org.gatein.wsrp.endpoints.WSRPBaseEndpoint;
import org.gatein.wsrp.spec.v1.V1ToV2Converter;
@@ -97,15 +99,16 @@
@WebParam(mode = WebParam.Mode.OUT, name = "extensions", targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") Holder<List<V1Extension>> extensions
) throws V1MissingParameters, V1InconsistentParameters, V1InvalidHandle, V1InvalidRegistration, V1InvalidUserCategory, V1AccessDenied, V1OperationFailed
{
- GetPortletPropertyDescription getPortletPropertyDescription = new GetPortletPropertyDescription();
- getPortletPropertyDescription.setRegistrationContext(V1ToV2Converter.toV2RegistrationContext(registrationContext));
- getPortletPropertyDescription.setPortletContext(V1ToV2Converter.toV2PortletContext(portletContext));
- getPortletPropertyDescription.setUserContext(V1ToV2Converter.toV2UserContext(userContext));
- getPortletPropertyDescription.getDesiredLocales().addAll(desiredLocales);
- PortletPropertyDescriptionResponse descriptionResponse;
try
{
- descriptionResponse = producer.getPortletPropertyDescription(getPortletPropertyDescription);
+ GetPortletPropertyDescription getPortletPropertyDescription = WSRPTypeFactory.createGetPortletPropertyDescription(
+ V1ToV2Converter.toV2RegistrationContext(registrationContext),
+ V1ToV2Converter.toV2PortletContext(portletContext),
+ V1ToV2Converter.toV2UserContext(userContext),
+ desiredLocales
+ );
+ PortletPropertyDescriptionResponse descriptionResponse =
+ producer.getPortletPropertyDescription(getPortletPropertyDescription);
modelDescription.value = V2ToV1Converter.toV1ModelDescription(descriptionResponse.getModelDescription());
resourceList.value = V2ToV1Converter.toV1ResourceList(descriptionResponse.getResourceList());
@@ -151,16 +154,15 @@
@WebParam(mode = WebParam.Mode.OUT, name = "extensions", targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") Holder<List<V1Extension>> extensions
) throws V1MissingParameters, V1InconsistentParameters, V1InvalidHandle, V1InvalidRegistration, V1InvalidUserCategory, V1AccessDenied, V1OperationFailed
{
- SetPortletProperties setPortletProperties = new SetPortletProperties();
- setPortletProperties.setRegistrationContext(V1ToV2Converter.toV2RegistrationContext(registrationContext));
- setPortletProperties.setPortletContext(V1ToV2Converter.toV2PortletContext(portletContext));
- setPortletProperties.setUserContext(V1ToV2Converter.toV2UserContext(userContext));
- setPortletProperties.setPropertyList(V1ToV2Converter.toV2PropertyList(propertyList));
-
- PortletContext response;
try
{
- response = producer.setPortletProperties(setPortletProperties);
+ SetPortletProperties setPortletProperties = WSRPTypeFactory.createSetPortletProperties(
+ V1ToV2Converter.toV2RegistrationContext(registrationContext),
+ V1ToV2Converter.toV2PortletContext(portletContext),
+ V1ToV2Converter.toV2PropertyList(propertyList));
+ setPortletProperties.setUserContext(V1ToV2Converter.toV2UserContext(userContext));
+
+ PortletContext response = producer.setPortletProperties(setPortletProperties);
portletHandle.value = response.getPortletHandle();
portletState.value = response.getPortletState();
extensions.value = WSRPUtils.transform(response.getExtensions(), V2ToV1Converter.EXTENSION);
@@ -204,15 +206,15 @@
@WebParam(mode = WebParam.Mode.OUT, name = "extensions", targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") Holder<List<V1Extension>> extensions
) throws V1MissingParameters, V1InconsistentParameters, V1InvalidHandle, V1InvalidRegistration, V1InvalidUserCategory, V1AccessDenied, V1OperationFailed
{
- ClonePortlet clonePortlet = new ClonePortlet();
- clonePortlet.setRegistrationContext(V1ToV2Converter.toV2RegistrationContext(registrationContext));
- clonePortlet.setPortletContext(V1ToV2Converter.toV2PortletContext(portletContext));
- clonePortlet.setUserContext(V1ToV2Converter.toV2UserContext(userContext));
-
- PortletContext response;
try
{
- response = producer.clonePortlet(clonePortlet);
+ ClonePortlet clonePortlet = WSRPTypeFactory.createClonePortlet(
+ V1ToV2Converter.toV2RegistrationContext(registrationContext),
+ V1ToV2Converter.toV2PortletContext(portletContext),
+ V1ToV2Converter.toV2UserContext(userContext)
+ );
+
+ PortletContext response = producer.clonePortlet(clonePortlet);
portletHandle.value = response.getPortletHandle();
portletState.value = response.getPortletState();
extensions.value = WSRPUtils.transform(response.getExtensions(), V2ToV1Converter.EXTENSION);
@@ -257,14 +259,18 @@
@WebParam(mode = WebParam.Mode.OUT, name = "extensions", targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") Holder<List<V1Extension>> extensions
) throws V1MissingParameters, V1InconsistentParameters, V1InvalidHandle, V1InvalidRegistration, V1InvalidUserCategory, V1AccessDenied, V1OperationFailed
{
- GetPortletDescription getPortletDescription = new GetPortletDescription();
- getPortletDescription.setRegistrationContext(V1ToV2Converter.toV2RegistrationContext(registrationContext));
- getPortletDescription.setPortletContext(V1ToV2Converter.toV2PortletContext(portletContext));
- getPortletDescription.setUserContext(V1ToV2Converter.toV2UserContext(userContext));
- getPortletDescription.getDesiredLocales().addAll(desiredLocales);
-
try
{
+ GetPortletDescription getPortletDescription = WSRPTypeFactory.createGetPortletDescription(
+ V1ToV2Converter.toV2RegistrationContext(registrationContext),
+ V1ToV2Converter.toV2PortletContext(portletContext),
+ V1ToV2Converter.toV2UserContext(userContext)
+ );
+ if (ParameterValidation.existsAndIsNotEmpty(desiredLocales))
+ {
+ getPortletDescription.getDesiredLocales().addAll(desiredLocales);
+ }
+
PortletDescriptionResponse description = producer.getPortletDescription(getPortletDescription);
portletDescription.value = V2ToV1Converter.toV1PortletDescription(description.getPortletDescription());
@@ -311,14 +317,15 @@
@WebParam(mode = WebParam.Mode.OUT, name = "extensions", targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") Holder<List<V1Extension>> extensions
) throws V1MissingParameters, V1InconsistentParameters, V1InvalidHandle, V1InvalidRegistration, V1InvalidUserCategory, V1AccessDenied, V1OperationFailed
{
- GetPortletProperties getPortletProperties = new GetPortletProperties();
- getPortletProperties.setRegistrationContext(V1ToV2Converter.toV2RegistrationContext(registrationContext));
- getPortletProperties.setPortletContext(V1ToV2Converter.toV2PortletContext(portletContext));
- getPortletProperties.setUserContext(V1ToV2Converter.toV2UserContext(userContext));
- getPortletProperties.getNames().addAll(names);
-
try
{
+ GetPortletProperties getPortletProperties = WSRPTypeFactory.createGetPortletProperties(
+ V1ToV2Converter.toV2RegistrationContext(registrationContext),
+ V1ToV2Converter.toV2PortletContext(portletContext),
+ V1ToV2Converter.toV2UserContext(userContext),
+ names
+ );
+
PropertyList result = producer.getPortletProperties(getPortletProperties);
properties.value = WSRPUtils.transform(result.getProperties(), V2ToV1Converter.PROPERTY);
@@ -362,14 +369,12 @@
@WebParam(mode = WebParam.Mode.OUT, name = "extensions", targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") Holder<List<V1Extension>> extensions
) throws V1MissingParameters, V1InconsistentParameters, V1InvalidRegistration, V1OperationFailed
{
- DestroyPortlets destroyPortlets = new DestroyPortlets();
- destroyPortlets.setRegistrationContext(V1ToV2Converter.toV2RegistrationContext(registrationContext));
- destroyPortlets.getPortletHandles().addAll(portletHandles);
-
- DestroyPortletsResponse destroyPortletsResponse;
try
{
- destroyPortletsResponse = producer.destroyPortlets(destroyPortlets);
+ DestroyPortlets destroyPortlets = WSRPTypeFactory.createDestroyPortlets(
+ V1ToV2Converter.toV2RegistrationContext(registrationContext), portletHandles
+ );
+ DestroyPortletsResponse destroyPortletsResponse = producer.destroyPortlets(destroyPortlets);
destroyFailed.value = V2ToV1Converter.toV1DestroyFailed(destroyPortletsResponse.getFailedPortlets());
extensions.value = WSRPUtils.transform(destroyPortletsResponse.getExtensions(), V2ToV1Converter.EXTENSION);
14 years, 6 months
gatein SVN: r3319 - portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2010-06-14 04:58:54 -0400 (Mon, 14 Jun 2010)
New Revision: 3319
Modified:
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_11_AddApplicationIntoCategory.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_12_Portlet.html
Log:
TESTVN-356: Clean and improve
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_11_AddApplicationIntoCategory.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_11_AddApplicationIntoCategory.html 2010-06-14 07:31:05 UTC (rev 3318)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_11_AddApplicationIntoCategory.html 2010-06-14 08:58:54 UTC (rev 3319)
@@ -22,14 +22,14 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Sign in</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>username</td>
- <td>root</td>
+ <td></td>
</tr>
<tr>
<td>type</td>
@@ -42,21 +42,16 @@
<td>gtn</td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>clickAndWait</td>
<td>//div[@id='UIPortalLoginFormAction']/div/div/div</td>
<td></td>
</tr>
<tr>
- <td>waitForElementPresent</td>
+ <td>clickAndWait</td>
<td>link=Application Registry</td>
<td></td>
</tr>
<tr>
- <td>clickAt</td>
- <td>link=Application Registry</td>
- <td>1,1</td>
-</tr>
-<tr>
<td>echo</td>
<td>--Add Category</td>
<td></td>
@@ -64,12 +59,12 @@
<tr>
<td>waitForElementPresent</td>
<td>//div[@id='UIApplicationOrganizer']//div[@class='UIControlbar']/div[1]</td>
- <td>1,1</td>
+ <td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>//div[@id='UIApplicationOrganizer']//div[@class='UIControlbar']/div[1]</td>
- <td>1,1</td>
+ <td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
@@ -102,7 +97,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Add Permission</td>
<td></td>
</tr>
@@ -112,7 +107,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Platform</td>
<td></td>
</tr>
@@ -122,7 +117,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=manager</td>
<td></td>
</tr>
@@ -132,7 +127,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Save</td>
<td></td>
</tr>
@@ -152,7 +147,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Test_cat_11</td>
<td></td>
</tr>
@@ -167,9 +162,9 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>//div[@class='ListContent']//div[@class='SelectedTab']//a[@class='ControlIcon CreateNewIcon']</td>
- <td>1,1</td>
+ <td></td>
</tr>
<tr>
<td>echo</td>
@@ -182,9 +177,9 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>//input[@name='application' and @value='1']</td>
- <td>1,1</td>
+ <td></td>
</tr>
<tr>
<td>type</td>
@@ -192,7 +187,7 @@
<td>test_displayname_11</td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>css=form#UIAddApplicationForm div.UIAction div.ActionButton</td>
<td></td>
</tr>
@@ -202,24 +197,54 @@
<td></td>
</tr>
<tr>
+ <td>click</td>
+ <td>//a[@class='TabLabel' and @title='Administration']</td>
+ <td></td>
+</tr>
+<tr>
<td>echo</td>
<td>--Edit category permissions</td>
<td></td>
</tr>
<tr>
- <td>clickAt</td>
- <td>//a[@class='TabLabel' and @title='Administration']</td>
- <td>1,1</td>
+ <td>waitForElementPresent</td>
+ <td>link=Test_cat_11</td>
+ <td></td>
</tr>
<tr>
+ <td>click</td>
+ <td>link=Test_cat_11</td>
+ <td></td>
+</tr>
+<tr>
<td>waitForElementPresent</td>
+ <td>//a[@onclick="javascript:ajaxGet('/portal/private/classic/administration/registry?portal:componentId=7f5a8dba-5a76-426f-8fdb-3d9db683b0ac&portal:type=action&uicomponent=UIApplicationOrganizer&op=EditCategory&objectId=Test_cat_11&ajaxRequest=true')"]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//a[@onclick="javascript:ajaxGet('/portal/private/classic/administration/registry?portal:componentId=7f5a8dba-5a76-426f-8fdb-3d9db683b0ac&portal:type=action&uicomponent=UIApplicationOrganizer&op=EditCategory&objectId=Test_cat_11&ajaxRequest=true')"]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[(a)onclick="eXo.webui.UIHorizontalTabs.changeTabForUIFormTabpane(this, 'UICategoryForm', 'categoryPermission');javascript:eXo.webui.UIForm.submitEvent('7f5a8dba-5a76-426f-8fdb-3d9db683b0ac#UICategoryForm','SelectTab','&objectId=categoryPermission')"]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[(a)onclick="eXo.webui.UIHorizontalTabs.changeTabForUIFormTabpane(this, 'UICategoryForm', 'categoryPermission');javascript:eXo.webui.UIForm.submitEvent('7f5a8dba-5a76-426f-8fdb-3d9db683b0ac#UICategoryForm','SelectTab','&objectId=categoryPermission')"]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
<td>link=Add Permission</td>
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Add Permission</td>
- <td>1,1</td>
+ <td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
@@ -227,19 +252,19 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>//div[@id='ListPermissionSelector']//a[@title='Organization']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>link=manager</td>
- <td>1,1</td>
+ <td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=manager</td>
- <td>1,1</td>
+ <td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
@@ -252,9 +277,9 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Test_cat_11</td>
- <td>1,1</td>
+ <td></td>
</tr>
<tr>
<td>echo</td>
@@ -267,7 +292,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>//div[@class='ListContent']//div[@class='UIVTabContent']/div[1]//a[@class='ControlIcon DeletePortalIcon']</td>
<td></td>
</tr>
@@ -292,12 +317,12 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>//div[@class='SelectedTab']//a[@class='ControlIcon DeleteIcon']</td>
<td></td>
</tr>
<tr>
- <td>assertConfirmation</td>
+ <td>waitForConfirmation</td>
<td>Are you sure to delete this category and all applications on it?</td>
<td></td>
</tr>
@@ -312,15 +337,10 @@
<td></td>
</tr>
<tr>
- <td>waitForElementPresent</td>
+ <td>clickAndWait</td>
<td>link=Sign out</td>
<td></td>
</tr>
-<tr>
- <td>clickAt</td>
- <td>link=Sign out</td>
- <td></td>
-</tr>
</tbody></table>
</body>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_12_Portlet.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_12_Portlet.html 2010-06-14 07:31:05 UTC (rev 3318)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_12_Portlet.html 2010-06-14 08:58:54 UTC (rev 3319)
@@ -87,23 +87,13 @@
<td></td>
</tr>
<tr>
- <td>waitForElementPresent</td>
- <td>xpath=//div[@class='UIVerticalSlideTabs']//div[@class='UIVTabContent']//div[3]//a</td>
- <td></td>
+ <td>waitForText</td>
+ <td>//div[@id='UIApplicationOrganizer']/div[2]/div[1]/div/div/div[2]/div/div[1]/div[2]/div[2]/a[1]</td>
+ <td>New Account</td>
</tr>
<tr>
- <td>clickAt</td>
- <td>xpath=//div[@class='UIVerticalSlideTabs']//div[@class='UIVTabContent']//div[3]//a</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForTextPresent</td>
- <td>AccountPortlet</td>
- <td></td>
-</tr>
-<tr>
<td>verifyTextPresent</td>
- <td>AccountPortlet</td>
+ <td>New Account</td>
<td></td>
</tr>
<tr>
@@ -113,12 +103,12 @@
</tr>
<tr>
<td>waitForElementPresent</td>
- <td>xpath=//div[@class='UIVerticalSlideTabs']//div[@class='UIVTabContent']//div[4]//a</td>
+ <td>xpath=//div[@class='UIVerticalSlideTabs']//div[@class='UIVTabContent']//div[3]//a</td>
<td></td>
</tr>
<tr>
<td>clickAt</td>
- <td>xpath=//div[@class='UIVerticalSlideTabs']//div[@class='UIVTabContent']//div[4]//a</td>
+ <td>xpath=//div[@class='UIVerticalSlideTabs']//div[@class='UIVTabContent']//div[3]//a</td>
<td></td>
</tr>
<tr>
14 years, 6 months
gatein SVN: r3318 - portal/trunk/portlet/exoadmin/src/main/webapp/skin/navigation/webui/component.
by do-not-reply@jboss.org
Author: thuy.nguyen
Date: 2010-06-14 03:31:05 -0400 (Mon, 14 Jun 2010)
New Revision: 3318
Modified:
portal/trunk/portlet/exoadmin/src/main/webapp/skin/navigation/webui/component/DefaultStylesheet.css
Log:
GTNPORTAL-1282: Add Group Navigation form UI is broken in IE7
Modified: portal/trunk/portlet/exoadmin/src/main/webapp/skin/navigation/webui/component/DefaultStylesheet.css
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/webapp/skin/navigation/webui/component/DefaultStylesheet.css 2010-06-14 04:42:55 UTC (rev 3317)
+++ portal/trunk/portlet/exoadmin/src/main/webapp/skin/navigation/webui/component/DefaultStylesheet.css 2010-06-14 07:31:05 UTC (rev 3318)
@@ -50,6 +50,7 @@
width: 27%;
overflow: hidden;
white-space: normal;
+ word-wrap: break-word;
}
.UIPortalNavigationPortlet .UIManagement table.ManagementBlock td.Content {
14 years, 6 months
gatein SVN: r3317 - portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2010-06-14 00:42:55 -0400 (Mon, 14 Jun 2010)
New Revision: 3317
Modified:
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_06_UsersManagement.html
Log:
TESTVN-356: Clean and improve
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_06_UsersManagement.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_06_UsersManagement.html 2010-06-14 04:42:16 UTC (rev 3316)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_06_UsersManagement.html 2010-06-14 04:42:55 UTC (rev 3317)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<link rel="selenium.base" href="http://localhost:8080/portal" />
+<link rel="selenium.base" href="http://localhost:8080" />
<title>Test_SNF_PRL_06_UsersManagement</title>
</head>
<body>
@@ -47,27 +47,17 @@
<td></td>
</tr>
<tr>
- <td>waitForElementPresent</td>
+ <td>clickAndWait</td>
<td>link=Group</td>
<td></td>
</tr>
<tr>
- <td>click</td>
- <td>link=Group</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForElementPresent</td>
+ <td>clickAndWait</td>
<td>link=Users and groups management</td>
<td></td>
</tr>
<tr>
- <td>clickAt</td>
- <td>link=Users and groups management</td>
- <td></td>
-</tr>
-<tr>
- <td>waitForTextPresent</td>
+ <td>verifyTextPresent</td>
<td>User Name</td>
<td></td>
</tr>
@@ -92,7 +82,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>xpath=//div[@id='UIListUsersGird']//tbody/tr[3]//td[5]//div//img</td>
<td></td>
</tr>
@@ -107,9 +97,9 @@
<td>test_user_06</td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Save</td>
- <td>1,1</td>
+ <td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
@@ -117,17 +107,17 @@
<td></td>
</tr>
<tr>
- <td>verifyElementPresent</td>
+ <td>click</td>
<td>css=div#UIOrganizationPortlet div.ManagementTabContent > div.UIPopupWindow div.ActionButton</td>
- <td>1,1</td>
+ <td></td>
</tr>
<tr>
- <td>clickAt</td>
- <td>css=div#UIOrganizationPortlet div.ManagementTabContent > div.UIPopupWindow div.ActionButton</td>
- <td>1,1</td>
+ <td>waitForElementPresent</td>
+ <td>xpath=//div[@id='UIListUsersGird']//tbody/tr[3]//td[5]//div//img</td>
+ <td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>xpath=//div[@id='UIListUsersGird']//tbody/tr[3]//td[5]//div//img</td>
<td></td>
</tr>
@@ -137,13 +127,8 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>xpath=//div[@id='UIUserManagement']//div[@class='TabsContainer']/div[2]//div[@class='MiddleTab']</td>
- <td>1,1</td>
-</tr>
-<tr>
- <td>waitForElementPresent</td>
- <td>user.name.given</td>
<td></td>
</tr>
<tr>
@@ -182,9 +167,9 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>css=div#UIOrganizationPortlet div.ManagementTabContent > div.UIPopupWindow div.ActionButton</td>
- <td>1,1</td>
+ <td></td>
</tr>
<tr>
<td>echo</td>
@@ -202,19 +187,24 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>waitForElementPresent</td>
<td>xpath=//div[@id='UIListUsersGird']//tbody/tr[3]//td[5]//div//img</td>
<td></td>
</tr>
<tr>
+ <td>click</td>
+ <td>xpath=//div[@id='UIListUsersGird']//tbody/tr[3]//td[5]//div//img</td>
+ <td></td>
+</tr>
+<tr>
<td>waitForElementPresent</td>
<td>xpath=//div[@id='UIUserManagement']//div[@class='TabsContainer']/div[2]//div[@class='MiddleTab']</td>
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>xpath=//div[@id='UIUserManagement']//div[@class='TabsContainer']/div[2]//div[@class='MiddleTab']</td>
- <td>1,1</td>
+ <td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
@@ -242,18 +232,18 @@
<td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>firstName</td>
+ <td></td>
+</tr>
+<tr>
<td>type</td>
<td>firstName</td>
<td>Mary</td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Save</td>
- <td>1,1</td>
-</tr>
-<tr>
- <td>waitForElementPresent</td>
- <td>css=div#UIOrganizationPortlet div.ManagementTabContent > div.UIPopupWindow div.ActionButton</td>
<td></td>
</tr>
<tr>
@@ -267,7 +257,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>css=div#UIOrganizationPortlet div.ManagementTabContent > div.UIPopupWindow div.ActionButton</td>
<td>1,1</td>
</tr>
@@ -277,15 +267,10 @@
<td>Mary</td>
</tr>
<tr>
- <td>waitForElementPresent</td>
+ <td>clickAndWait</td>
<td>link=Sign out</td>
<td></td>
</tr>
-<tr>
- <td>clickAt</td>
- <td>link=Sign out</td>
- <td></td>
-</tr>
</tbody></table>
</body>
14 years, 6 months
gatein SVN: r3316 - portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2010-06-14 00:42:16 -0400 (Mon, 14 Jun 2010)
New Revision: 3316
Added:
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_14_07_003_CheckCloneNodeDoesNotLinkToAnyPage.html
Log:
TESTVN-399: Create new GateIn Selenium Scrips
Added: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_14_07_003_CheckCloneNodeDoesNotLinkToAnyPage.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_14_07_003_CheckCloneNodeDoesNotLinkToAnyPage.html (rev 0)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_14_07_003_CheckCloneNodeDoesNotLinkToAnyPage.html 2010-06-14 04:42:16 UTC (rev 3316)
@@ -0,0 +1,292 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="" />
+<title>Test_POR_14_07_003_CheckCloneNodeDoesNotLinkToAnyPage</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Test_POR_14_07_003_CheckCloneNodeDoesNotLinkToAnyPage</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>username</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>username</td>
+ <td>root</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>password</td>
+ <td>gtn</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>xpath=//div[@id='UIPortalLoginFormAction']/div/div/div/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Create new node does not link to any page--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Edit Navigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Edit Navigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Add Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Add Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>name</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>name</td>
+ <td>POR_14_07_003</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>label</td>
+ <td>POR_14_07_003</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Clone node--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>componentExoContextMenu</td>
+ <td>//a[@class='NodeIcon DefaultPageIcon' and @title='POR_14_07_003']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Clone Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Clone Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Paste Clone node--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>componentExoContextMenu</td>
+ <td>//a[@class='NodeIcon DefaultPageIcon NodeSelected' and @title='Home']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='NavigationNodePopupMenu']/div/div[2]/div/div/div[7]/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Check page list in Manage Page--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Page Management</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Page Management</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Check existing of page with title 'Test_POR_14_07_003'</td>
+ <td>Test_POR_14_07_003</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>searchTerm</td>
+ <td>Test_POR_14_07_003</td>
+</tr>
+<tr>
+ <td>select</td>
+ <td>searchOption</td>
+ <td>label=Title</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>xpath=//form[@id='UIPageSearch']/div[2]/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>xpath=//form[@id='UIPageSearch']/div[2]/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>xpath=//div[@id='UIPortalApplication']/div[@class='UIPopupWindow UIDragObject']//div[@class='MiddleLeftSideDecorator']//div[@class='UIPopupMessages']/div[@class='MessageActionBar']//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>xpath=//div[@id='UIPortalApplication']/div[@class='UIPopupWindow UIDragObject']//div[@class='MiddleLeftSideDecorator']//div[@class='UIPopupMessages']/div[@class='MessageActionBar']//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Delete node --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Edit Navigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Edit Navigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>componentExoContextMenu</td>
+ <td>//a[@class='NodeIcon DefaultPageIcon' and @title='POR_14_07_003']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Delete Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Delete Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertConfirmation</td>
+ <td>Are you sure you want to delete this node?</td>
+ <td></td>
+</tr>
+<tr>
+ <td>componentExoContextMenu</td>
+ <td>//div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[8]/div/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Delete Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Delete Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertConfirmation</td>
+ <td>Are you sure you want to delete this node?</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Sign out--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
14 years, 6 months