Author: chris.laprun(a)jboss.com
Date: 2010-05-31 13:24:50 -0400 (Mon, 31 May 2010)
New Revision: 3218
Modified:
components/wsrp/trunk/common/pom.xml
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPExceptionFactory.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/SOAPServiceFactory.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/ServiceFactory.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/ProducerInfoTestCase.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/BehaviorBackedServiceFactory.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/BehaviorBackedServiceFactory.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/PortletManagementBehavior.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/behaviors/BasicPortletManagementBehavior.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/behaviors/DestroyClonesPortletManagementBehavior.java
components/wsrp/trunk/producer/pom.xml
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/RequestProcessor.java
components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/v2/MarkupEndpoint.java
components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/v2/PortletManagementEndpoint.java
components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/v2/RegistrationEndpoint.java
components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/v2/ServiceDescriptionEndpoint.java
Log:
- Fixed improper namespace in JAX-WS annotations for version 2 of service.
- Fixed version 2 deployment of service so that it is working in limited testing.
- Removed now useless methods.
- Fixed improper order in initialization in RequestProcessor.prepareInvocation.
- Cleaned-up POM files a little.
Modified: components/wsrp/trunk/common/pom.xml
===================================================================
--- components/wsrp/trunk/common/pom.xml 2010-05-31 06:35:30 UTC (rev 3217)
+++ components/wsrp/trunk/common/pom.xml 2010-05-31 17:24:50 UTC (rev 3218)
@@ -68,7 +68,6 @@
<dependency>
<groupId>com.google.collections</groupId>
<artifactId>google-collections</artifactId>
- <version>1.0</version>
</dependency>
<!-- tests -->
Modified:
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPExceptionFactory.java
===================================================================
---
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPExceptionFactory.java 2010-05-31
06:35:30 UTC (rev 3217)
+++
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPExceptionFactory.java 2010-05-31
17:24:50 UTC (rev 3218)
@@ -69,8 +69,6 @@
{
private static final Logger log =
LoggerFactory.getLogger(WSRPExceptionFactory.class);
- private static final String NS = "urn:oasis:names:tc:wsrp:v1:types";
-
public static final String ACCESS_DENIED = "AccessDenied";
public static final String INCONSISTENT_PARAMETERS =
"InconsistentParameters";
public static final String INVALID_REGISTRATION = "InvalidRegistration";
@@ -85,7 +83,6 @@
public static final String UNSUPPORTED_MIME_TYPE = "UnsupportedMimeType";
public static final String UNSUPPORTED_MODE = "UnsupportedMode";
public static final String UNSUPPORTED_WINDOW_STATE =
"UnsupportedWindowState";
- private static final String NS_PREFIX = "wsrp";
private static final Map<String, ExceptionFactory<? extends Exception, ? extends
Fault>> errorCodeToExceptions =
new HashMap<String, ExceptionFactory<? extends Exception, ? extends
Fault>>(17);
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java 2010-05-31
06:35:30 UTC (rev 3217)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java 2010-05-31
17:24:50 UTC (rev 3218)
@@ -578,7 +578,7 @@
return producerInfo.getEndpointConfigurationInfo();
}
- public WSRPV2ServiceDescriptionPortType getServiceDescriptionService() throws
PortletInvokerException
+ private WSRPV2ServiceDescriptionPortType getServiceDescriptionService() throws
PortletInvokerException
{
refreshProducerInfo(false);
return getEndpointConfigurationInfo().getServiceDescriptionService();
@@ -590,13 +590,13 @@
return getEndpointConfigurationInfo().getMarkupService();
}
- public WSRPV2PortletManagementPortType getPortletManagementService() throws
PortletInvokerException
+ private WSRPV2PortletManagementPortType getPortletManagementService() throws
PortletInvokerException
{
refreshProducerInfo(false);
return getEndpointConfigurationInfo().getPortletManagementService();
}
- public WSRPV2RegistrationPortType getRegistrationService() throws
PortletInvokerException
+ private WSRPV2RegistrationPortType getRegistrationService() throws
PortletInvokerException
{
refreshProducerInfo(false);
return getEndpointConfigurationInfo().getRegistrationService();
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/SOAPServiceFactory.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/SOAPServiceFactory.java 2010-05-31
06:35:30 UTC (rev 3217)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/SOAPServiceFactory.java 2010-05-31
17:24:50 UTC (rev 3218)
@@ -49,7 +49,8 @@
private String wsdlDefinitionURL;
- private final static QName SERVICE = new
QName("urn:oasis:names:tc:wsrp:v1:wsdl", "WSRPService");
+ private final static QName V1_SERVICE = new
QName("urn:oasis:names:tc:wsrp:v1:wsdl", "WSRPService");
+ private final static QName V2_SERVICE = new
QName("urn:oasis:names:tc:wsrp:v2:wsdl", "WSRPService");
private Map<Class, Object> services = new ConcurrentHashMap<Class,
Object>();
private String markupURL;
@@ -146,53 +147,7 @@
return failed;
}
- public String getServiceDescriptionURL()
- {
- return serviceDescriptionURL;
- }
- public String getMarkupURL()
- {
- return markupURL;
- }
-
- public String getRegistrationURL()
- {
- return registrationURL;
- }
-
- public String getPortletManagementURL()
- {
- return portletManagementURL;
- }
-
- public void setServiceDescriptionURL(String serviceDescriptionURL)
- {
- ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(serviceDescriptionURL,
"Mandatory Service Description interface", null);
- this.serviceDescriptionURL = serviceDescriptionURL;
- setFailed(false); // reset failed status to false since we can't assert it
anymore
- }
-
- public void setMarkupURL(String markupURL)
- {
- ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(markupURL,
"Mandatory Markup interface", null);
- this.markupURL = markupURL;
- setFailed(false); // reset failed status to false since we can't assert it
anymore
- }
-
- public void setRegistrationURL(String registrationURL)
- {
- this.registrationURL = registrationURL;
- setFailed(false); // reset failed status to false since we can't assert it
anymore
- }
-
- public void setPortletManagementURL(String portletManagementURL)
- {
- this.portletManagementURL = portletManagementURL;
- setFailed(false); // reset failed status to false since we can't assert it
anymore
- }
-
-
public void stop()
{
// todo: implement as needed
@@ -244,7 +199,7 @@
ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(wsdlDefinitionURL,
"WSDL URL", "SOAPServiceFactory");
URI wsdlURL = new URI(wsdlDefinitionURL);
- Service service = Service.create(wsdlURL.toURL(), SERVICE);
+ Service service = Service.create(wsdlURL.toURL(), V2_SERVICE);
WSRPV2MarkupPortType markupPortType =
service.getPort(WSRPV2MarkupPortType.class);
services.put(WSRPV2MarkupPortType.class, markupPortType);
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/ServiceFactory.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/ServiceFactory.java 2010-05-31
06:35:30 UTC (rev 3217)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/ServiceFactory.java 2010-05-31
17:24:50 UTC (rev 3218)
@@ -52,22 +52,6 @@
*/
boolean isFailed();
- String getServiceDescriptionURL();
-
- String getMarkupURL();
-
- String getRegistrationURL();
-
- String getPortletManagementURL();
-
- void setServiceDescriptionURL(String serviceDescriptionURL);
-
- void setMarkupURL(String markupURL);
-
- void setRegistrationURL(String registrationURL);
-
- void setPortletManagementURL(String portletManagementURL);
-
void start() throws Exception;
void stop();
Modified:
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/ProducerInfoTestCase.java
===================================================================
---
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/ProducerInfoTestCase.java 2010-05-31
06:35:30 UTC (rev 3217)
+++
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/ProducerInfoTestCase.java 2010-05-31
17:24:50 UTC (rev 3218)
@@ -41,6 +41,7 @@
import org.oasis.wsrp.v2.InvalidUserCategory;
import org.oasis.wsrp.v2.Lifetime;
import org.oasis.wsrp.v2.MissingParameters;
+import org.oasis.wsrp.v2.ModifyRegistrationRequired;
import org.oasis.wsrp.v2.OperationFailed;
import org.oasis.wsrp.v2.OperationFailedFault;
import org.oasis.wsrp.v2.OperationNotSupported;
@@ -359,7 +360,7 @@
{
@Override
- public void getPortletDescription(@WebParam(name = "registrationContext",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") RegistrationContext
registrationContext, @WebParam(name = "portletContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") PortletContext portletContext,
@WebParam(name = "userContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") UserContext userContext, @WebParam(name =
"desiredLocales", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") List<String> desiredLocales,
@WebParam(mode = WebParam.Mode.OUT, name = "portletDescription", targetNamespace
= "urn:oasis:names:tc:wsrp:v1:types") Holder<PortletDescription>
portletDescription, @WebParam(mode = WebParam.Mode.OUT, name = "resourceList",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") Holder<ResourceList>
resourceList, @WebParam(mode = WebParam.Mode.OUT, name = "extensions",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types")
Holder<List<Extension>> extensions) thr!
ows MissingParameters, InconsistentParameters, InvalidHandle, InvalidRegistration,
InvalidUserCategory, AccessDenied, OperationFailed
+ public void getPortletDescription(@WebParam(name = "registrationContext",
targetNamespace = "urn:oasis:names:tc:wsrp:v2:types") RegistrationContext
registrationContext, @WebParam(name = "portletContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") PortletContext portletContext,
@WebParam(name = "userContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") UserContext userContext, @WebParam(name =
"desiredLocales", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") List<String> desiredLocales,
@WebParam(name = "portletDescription", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT)
Holder<PortletDescription> portletDescription, @WebParam(name =
"resourceList", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types",
mode = WebParam.Mode.OUT) Holder<ResourceList> resourceList, @WebParam(name =
"extensions", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types",
mode = WebParam.Mode.OUT) Holder<List<Extension>> extensions) thr!
ows AccessDenied, InconsistentParameters, InvalidHandle, InvalidRegistration,
InvalidUserCategory, MissingParameters, ModifyRegistrationRequired, OperationFailed,
OperationNotSupported, ResourceSuspended
{
super.getPortletDescription(registrationContext, portletContext, userContext,
desiredLocales, portletDescription, resourceList, extensions);
portletDescription.value = createPortletDescription("test2", null);
Modified:
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/BehaviorBackedServiceFactory.java
===================================================================
---
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/BehaviorBackedServiceFactory.java 2010-05-31
06:35:30 UTC (rev 3217)
+++
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/BehaviorBackedServiceFactory.java 2010-05-31
17:24:50 UTC (rev 3218)
@@ -137,46 +137,6 @@
return timeout;
}
- public String getServiceDescriptionURL()
- {
- return SD_URL;
- }
-
- public String getMarkupURL()
- {
- return M_URL;
- }
-
- public String getRegistrationURL()
- {
- return R_URL;
- }
-
- public String getPortletManagementURL()
- {
- return PM_URL;
- }
-
- public void setServiceDescriptionURL(String serviceDescriptionURL)
- {
- // do nothing
- }
-
- public void setMarkupURL(String markupURL)
- {
- // do nothing
- }
-
- public void setRegistrationURL(String registrationURL)
- {
- // do nothing
- }
-
- public void setPortletManagementURL(String portletManagementURL)
- {
- // do nothing
- }
-
public void create() throws Exception
{
throw new NotYetImplemented();
Modified:
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/BehaviorBackedServiceFactory.java
===================================================================
---
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/BehaviorBackedServiceFactory.java 2010-05-31
06:35:30 UTC (rev 3217)
+++
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/BehaviorBackedServiceFactory.java 2010-05-31
17:24:50 UTC (rev 3218)
@@ -137,46 +137,6 @@
return timeout;
}
- public String getServiceDescriptionURL()
- {
- return SD_URL;
- }
-
- public String getMarkupURL()
- {
- return M_URL;
- }
-
- public String getRegistrationURL()
- {
- return R_URL;
- }
-
- public String getPortletManagementURL()
- {
- return PM_URL;
- }
-
- public void setServiceDescriptionURL(String serviceDescriptionURL)
- {
- // do nothing
- }
-
- public void setMarkupURL(String markupURL)
- {
- // do nothing
- }
-
- public void setRegistrationURL(String registrationURL)
- {
- // do nothing
- }
-
- public void setPortletManagementURL(String portletManagementURL)
- {
- // do nothing
- }
-
public void create() throws Exception
{
throw new NotYetImplemented();
Modified:
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/PortletManagementBehavior.java
===================================================================
---
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/PortletManagementBehavior.java 2010-05-31
06:35:30 UTC (rev 3217)
+++
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/PortletManagementBehavior.java 2010-05-31
17:24:50 UTC (rev 3218)
@@ -69,12 +69,12 @@
*/
public class PortletManagementBehavior extends TestProducerBehavior implements
WSRPV2PortletManagementPortType
{
- public void getPortletPropertyDescription(@WebParam(name =
"registrationContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") RegistrationContext registrationContext,
@WebParam(name = "portletContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") PortletContext portletContext,
@WebParam(name = "userContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") UserContext userContext, @WebParam(name =
"desiredLocales", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") List<String> desiredLocales,
@WebParam(mode = WebParam.Mode.OUT, name = "modelDescription", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") Holder<ModelDescription>
modelDescription, @WebParam(mode = WebParam.Mode.OUT, name = "resourceList",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") Holder<ResourceList>
resourceList, @WebParam(mode = WebParam.Mode.OUT, name = "extensions",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types")
Holder<List<Extension>> extensions) thro!
ws MissingParameters, InconsistentParameters, InvalidHandle, InvalidRegistration,
InvalidUserCategory, AccessDenied, OperationFailed
+ public void getPortletPropertyDescription(@WebParam(name =
"registrationContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") RegistrationContext registrationContext,
@WebParam(name = "portletContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") PortletContext portletContext,
@WebParam(name = "userContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") UserContext userContext, @WebParam(name =
"desiredLocales", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") List<String> desiredLocales,
@WebParam(name = "modelDescription", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT)
Holder<ModelDescription> modelDescription, @WebParam(name =
"resourceList", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types",
mode = WebParam.Mode.OUT) Holder<ResourceList> resourceList, @WebParam(name =
"extensions", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types",
mode = WebParam.Mode.OUT) Holder<List<Extension>> extensions) thro!
ws AccessDenied, InconsistentParameters, InvalidHandle, InvalidRegistration,
InvalidUserCategory, MissingParameters, ModifyRegistrationRequired, OperationFailed,
OperationNotSupported, ResourceSuspended
{
incrementCallCount();
}
- public void getPortletDescription(@WebParam(name = "registrationContext",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") RegistrationContext
registrationContext, @WebParam(name = "portletContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") PortletContext portletContext,
@WebParam(name = "userContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") UserContext userContext, @WebParam(name =
"desiredLocales", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") List<String> desiredLocales,
@WebParam(mode = WebParam.Mode.OUT, name = "portletDescription", targetNamespace
= "urn:oasis:names:tc:wsrp:v1:types") Holder<PortletDescription>
portletDescription, @WebParam(mode = WebParam.Mode.OUT, name = "resourceList",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") Holder<ResourceList>
resourceList, @WebParam(mode = WebParam.Mode.OUT, name = "extensions",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types")
Holder<List<Extension>> extensions) throws!
MissingParameters, InconsistentParameters, InvalidHandle, InvalidRegistration,
InvalidUserCategory, AccessDenied, OperationFailed
+ public void getPortletDescription(@WebParam(name = "registrationContext",
targetNamespace = "urn:oasis:names:tc:wsrp:v2:types") RegistrationContext
registrationContext, @WebParam(name = "portletContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") PortletContext portletContext,
@WebParam(name = "userContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") UserContext userContext, @WebParam(name =
"desiredLocales", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") List<String> desiredLocales,
@WebParam(name = "portletDescription", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT)
Holder<PortletDescription> portletDescription, @WebParam(name =
"resourceList", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types",
mode = WebParam.Mode.OUT) Holder<ResourceList> resourceList, @WebParam(name =
"extensions", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types",
mode = WebParam.Mode.OUT) Holder<List<Extension>> extensions) throws!
AccessDenied, InconsistentParameters, InvalidHandle, InvalidRegistration,
InvalidUserCategory, MissingParameters, ModifyRegistrationRequired, OperationFailed,
OperationNotSupported, ResourceSuspended
{
incrementCallCount();
}
@@ -129,7 +129,7 @@
incrementCallCount();
}
- public void getPortletProperties(@WebParam(name = "registrationContext",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") RegistrationContext
registrationContext, @WebParam(name = "portletContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") PortletContext portletContext,
@WebParam(name = "userContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") UserContext userContext, @WebParam(name =
"names", targetNamespace = "urn:oasis:names:tc:wsrp:v1:types")
List<String> names, @WebParam(mode = WebParam.Mode.OUT, name =
"properties", targetNamespace = "urn:oasis:names:tc:wsrp:v1:types")
Holder<List<Property>> properties, @WebParam(mode = WebParam.Mode.OUT, name =
"resetProperties", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") Holder<List<ResetProperty>>
resetProperties, @WebParam(mode = WebParam.Mode.OUT, name = "extensions",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types")
Holder<List<Extension>> extensions) throws MissingParameters, Incons!
istentParameters, InvalidHandle, InvalidRegistration, InvalidUserCategory, AccessDenied,
OperationFailed
+ public void getPortletProperties(@WebParam(name = "registrationContext",
targetNamespace = "urn:oasis:names:tc:wsrp:v2:types") RegistrationContext
registrationContext, @WebParam(name = "portletContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") PortletContext portletContext,
@WebParam(name = "userContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") UserContext userContext, @WebParam(name =
"names", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types")
List<String> names, @WebParam(name = "properties", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT)
Holder<List<Property>> properties, @WebParam(name =
"resetProperties", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT)
Holder<List<ResetProperty>> resetProperties, @WebParam(name =
"extensions", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types",
mode = WebParam.Mode.OUT) Holder<List<Extension>> extensions) throws
AccessDenied, Inconsisten!
tParameters, InvalidHandle, InvalidRegistration, InvalidUserCategory, MissingParameters,
ModifyRegistrationRequired, OperationFailed, OperationNotSupported, ResourceSuspended
{
incrementCallCount();
}
Modified:
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/behaviors/BasicPortletManagementBehavior.java
===================================================================
---
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/behaviors/BasicPortletManagementBehavior.java 2010-05-31
06:35:30 UTC (rev 3217)
+++
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/behaviors/BasicPortletManagementBehavior.java 2010-05-31
17:24:50 UTC (rev 3218)
@@ -89,13 +89,13 @@
}
@Override
- public void getPortletPropertyDescription(@WebParam(name =
"registrationContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") RegistrationContext registrationContext,
@WebParam(name = "portletContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") PortletContext portletContext,
@WebParam(name = "userContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") UserContext userContext, @WebParam(name =
"desiredLocales", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") List<String> desiredLocales,
@WebParam(mode = WebParam.Mode.OUT, name = "modelDescription", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") Holder<ModelDescription>
modelDescription, @WebParam(mode = WebParam.Mode.OUT, name = "resourceList",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") Holder<ResourceList>
resourceList, @WebParam(mode = WebParam.Mode.OUT, name = "extensions",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types")
Holder<List<Extension>> extensions) thro!
ws MissingParameters, InconsistentParameters, InvalidHandle, InvalidRegistration,
InvalidUserCategory, AccessDenied, OperationFailed
+ public void getPortletPropertyDescription(@WebParam(name =
"registrationContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") RegistrationContext registrationContext,
@WebParam(name = "portletContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") PortletContext portletContext,
@WebParam(name = "userContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") UserContext userContext, @WebParam(name =
"desiredLocales", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") List<String> desiredLocales,
@WebParam(name = "modelDescription", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT)
Holder<ModelDescription> modelDescription, @WebParam(name =
"resourceList", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types",
mode = WebParam.Mode.OUT) Holder<ResourceList> resourceList, @WebParam(name =
"extensions", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types",
mode = WebParam.Mode.OUT) Holder<List<Extension>> extensions) thro!
ws AccessDenied, InconsistentParameters, InvalidHandle, InvalidRegistration,
InvalidUserCategory, MissingParameters, ModifyRegistrationRequired, OperationFailed,
OperationNotSupported, ResourceSuspended
{
throw new NotYetImplemented();
}
@Override
- public void getPortletDescription(@WebParam(name = "registrationContext",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") RegistrationContext
registrationContext, @WebParam(name = "portletContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") PortletContext portletContext,
@WebParam(name = "userContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") UserContext userContext, @WebParam(name =
"desiredLocales", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") List<String> desiredLocales,
@WebParam(mode = WebParam.Mode.OUT, name = "portletDescription", targetNamespace
= "urn:oasis:names:tc:wsrp:v1:types") Holder<PortletDescription>
portletDescription, @WebParam(mode = WebParam.Mode.OUT, name = "resourceList",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") Holder<ResourceList>
resourceList, @WebParam(mode = WebParam.Mode.OUT, name = "extensions",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types")
Holder<List<Extension>> extensions) throws!
MissingParameters, InconsistentParameters, InvalidHandle, InvalidRegistration,
InvalidUserCategory, AccessDenied, OperationFailed
+ public void getPortletDescription(@WebParam(name = "registrationContext",
targetNamespace = "urn:oasis:names:tc:wsrp:v2:types") RegistrationContext
registrationContext, @WebParam(name = "portletContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") PortletContext portletContext,
@WebParam(name = "userContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") UserContext userContext, @WebParam(name =
"desiredLocales", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") List<String> desiredLocales,
@WebParam(name = "portletDescription", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT)
Holder<PortletDescription> portletDescription, @WebParam(name =
"resourceList", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types",
mode = WebParam.Mode.OUT) Holder<ResourceList> resourceList, @WebParam(name =
"extensions", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types",
mode = WebParam.Mode.OUT) Holder<List<Extension>> extensions) throws!
AccessDenied, InconsistentParameters, InvalidHandle, InvalidRegistration,
InvalidUserCategory, MissingParameters, ModifyRegistrationRequired, OperationFailed,
OperationNotSupported, ResourceSuspended
{
super.getPortletDescription(registrationContext, portletContext, userContext,
desiredLocales, portletDescription, resourceList, extensions);
@@ -213,7 +213,7 @@
}
@Override
- public void getPortletProperties(@WebParam(name = "registrationContext",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") RegistrationContext
registrationContext, @WebParam(name = "portletContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") PortletContext portletContext,
@WebParam(name = "userContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") UserContext userContext, @WebParam(name =
"names", targetNamespace = "urn:oasis:names:tc:wsrp:v1:types")
List<String> names, @WebParam(mode = WebParam.Mode.OUT, name =
"properties", targetNamespace = "urn:oasis:names:tc:wsrp:v1:types")
Holder<List<Property>> properties, @WebParam(mode = WebParam.Mode.OUT, name =
"resetProperties", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") Holder<List<ResetProperty>>
resetProperties, @WebParam(mode = WebParam.Mode.OUT, name = "extensions",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types")
Holder<List<Extension>> extensions) throws MissingParameters, Incons!
istentParameters, InvalidHandle, InvalidRegistration, InvalidUserCategory, AccessDenied,
OperationFailed
+ public void getPortletProperties(@WebParam(name = "registrationContext",
targetNamespace = "urn:oasis:names:tc:wsrp:v2:types") RegistrationContext
registrationContext, @WebParam(name = "portletContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") PortletContext portletContext,
@WebParam(name = "userContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") UserContext userContext, @WebParam(name =
"names", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types")
List<String> names, @WebParam(name = "properties", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT)
Holder<List<Property>> properties, @WebParam(name =
"resetProperties", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT)
Holder<List<ResetProperty>> resetProperties, @WebParam(name =
"extensions", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types",
mode = WebParam.Mode.OUT) Holder<List<Extension>> extensions) throws
AccessDenied, Inconsisten!
tParameters, InvalidHandle, InvalidRegistration, InvalidUserCategory, MissingParameters,
ModifyRegistrationRequired, OperationFailed, OperationNotSupported, ResourceSuspended
{
String handle = getHandleFrom(portletContext, "portlet context");
Modified:
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/behaviors/DestroyClonesPortletManagementBehavior.java
===================================================================
---
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/behaviors/DestroyClonesPortletManagementBehavior.java 2010-05-31
06:35:30 UTC (rev 3217)
+++
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/behaviors/DestroyClonesPortletManagementBehavior.java 2010-05-31
17:24:50 UTC (rev 3218)
@@ -33,11 +33,14 @@
import org.oasis.wsrp.v2.InvalidRegistration;
import org.oasis.wsrp.v2.InvalidUserCategory;
import org.oasis.wsrp.v2.MissingParameters;
+import org.oasis.wsrp.v2.ModifyRegistrationRequired;
import org.oasis.wsrp.v2.OperationFailed;
+import org.oasis.wsrp.v2.OperationNotSupported;
import org.oasis.wsrp.v2.PortletContext;
import org.oasis.wsrp.v2.PortletDescription;
import org.oasis.wsrp.v2.RegistrationContext;
import org.oasis.wsrp.v2.ResourceList;
+import org.oasis.wsrp.v2.ResourceSuspended;
import org.oasis.wsrp.v2.UserContext;
import javax.jws.WebParam;
@@ -59,7 +62,7 @@
}
@Override
- public void getPortletDescription(@WebParam(name = "registrationContext",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") RegistrationContext
registrationContext, @WebParam(name = "portletContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") PortletContext portletContext,
@WebParam(name = "userContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") UserContext userContext, @WebParam(name =
"desiredLocales", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") List<String> desiredLocales,
@WebParam(mode = WebParam.Mode.OUT, name = "portletDescription", targetNamespace
= "urn:oasis:names:tc:wsrp:v1:types") Holder<PortletDescription>
portletDescription, @WebParam(mode = WebParam.Mode.OUT, name = "resourceList",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") Holder<ResourceList>
resourceList, @WebParam(mode = WebParam.Mode.OUT, name = "extensions",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types")
Holder<List<Extension>> extensions) throws!
MissingParameters, InconsistentParameters, InvalidHandle, InvalidRegistration,
InvalidUserCategory, AccessDenied, OperationFailed
+ public void getPortletDescription(@WebParam(name = "registrationContext",
targetNamespace = "urn:oasis:names:tc:wsrp:v2:types") RegistrationContext
registrationContext, @WebParam(name = "portletContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") PortletContext portletContext,
@WebParam(name = "userContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") UserContext userContext, @WebParam(name =
"desiredLocales", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") List<String> desiredLocales,
@WebParam(name = "portletDescription", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT)
Holder<PortletDescription> portletDescription, @WebParam(name =
"resourceList", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types",
mode = WebParam.Mode.OUT) Holder<ResourceList> resourceList, @WebParam(name =
"extensions", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types",
mode = WebParam.Mode.OUT) Holder<List<Extension>> extensions) throws!
AccessDenied, InconsistentParameters, InvalidHandle, InvalidRegistration,
InvalidUserCategory, MissingParameters, ModifyRegistrationRequired, OperationFailed,
OperationNotSupported, ResourceSuspended
{
// only return the portlet description the first time the method is called since
all other calls happen after
// the clone has been destroyed...
Modified: components/wsrp/trunk/producer/pom.xml
===================================================================
--- components/wsrp/trunk/producer/pom.xml 2010-05-31 06:35:30 UTC (rev 3217)
+++ components/wsrp/trunk/producer/pom.xml 2010-05-31 17:24:50 UTC (rev 3218)
@@ -87,12 +87,8 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
+ <scope>test</scope>
</dependency>
- <dependency>
- <groupId>com.google.collections</groupId>
- <artifactId>google-collections</artifactId>
- <version>1.0</version>
- </dependency>
</dependencies>
<!-- Disable some tests for now until we can find some time to work on migrating
them -->
Modified:
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/RequestProcessor.java
===================================================================
---
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/RequestProcessor.java 2010-05-31
06:35:30 UTC (rev 3217)
+++
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/RequestProcessor.java 2010-05-31
17:24:50 UTC (rev 3218)
@@ -23,11 +23,6 @@
package org.gatein.wsrp.producer;
-import com.google.common.collect.BiMap;
-import com.google.common.collect.HashBiMap;
-import com.google.common.collect.HashMultimap;
-import com.google.common.collect.Maps;
-import com.google.common.collect.Multimap;
import org.gatein.common.net.media.MediaType;
import org.gatein.common.util.MarkupInfo;
import org.gatein.common.util.ParameterValidation;
@@ -43,7 +38,6 @@
import org.gatein.pc.api.spi.UserContext;
import org.gatein.pc.api.spi.WindowContext;
import org.gatein.pc.api.state.AccessMode;
-import org.gatein.pc.api.state.PropertyMap;
import org.gatein.registration.Registration;
import org.gatein.wsrp.UserContextConverter;
import org.gatein.wsrp.WSRPConstants;
@@ -148,22 +142,40 @@
markupRequest = createMarkupRequestFrom(markupTypes, params, portlet);
// prepare information for invocation
+ final org.oasis.wsrp.v2.UserContext wsrpUserContext = getUserContext();
+ checkUserContext(wsrpUserContext);
+
+ SecurityContext securityContext = createSecurityContext(params, runtimeContext,
wsrpUserContext);
+ MarkupInfo streamInfo = createStreamInfo(markupRequest);
+ PortalContext portalContext = createPortalContext(params, markupRequest);
+ UserContext userContext = createUserContext(wsrpUserContext,
markupRequest.getLocale(), desiredLocales);
+ instanceContext = createInstanceContext(portletContext, getAccessMode(),
runtimeContext.getPortletInstanceKey());
+ WindowContext windowContext = createWindowContext(portletContext.getId(),
runtimeContext);
+
+ // prepare the invocation
+ WSRPPortletInvocationContext context = new WSRPPortletInvocationContext(streamInfo,
securityContext, portalContext, userContext, instanceContext, windowContext);
+ PortletInvocation invocation = initInvocation(context);
+
+ invocation.setTarget(portlet.getContext());
+
invocation.setWindowState(WSRPUtils.getJSR168WindowStateFromWSRPName(markupRequest.getWindowState()));
+
invocation.setMode(WSRPUtils.getJSR168PortletModeFromWSRPName(markupRequest.getMode()));
+
NavigationalContext navigationalContext = params.getNavigationalContext();
- if(navigationalContext != null)
+ if (navigationalContext != null)
{
StateString navigationalState =
createNavigationalState(navigationalContext.getOpaqueValue());
invocation.setNavigationalState(navigationalState);
// GTNWSRP-38: public NS
List<NamedString> publicParams = navigationalContext.getPublicValues();
- if(ParameterValidation.existsAndIsNotEmpty(publicParams))
+ if (ParameterValidation.existsAndIsNotEmpty(publicParams))
{
Map<String, String[]> publicNS = new HashMap<String,
String[]>(publicParams.size());
for (NamedString publicParam : publicParams)
{
String paramName = publicParam.getName();
String[] values = publicNS.get(paramName);
- if(ParameterValidation.existsAndIsNotEmpty(values))
+ if (ParameterValidation.existsAndIsNotEmpty(values))
{
int valuesNb = values.length;
String[] newValues = new String[valuesNb + 1];
@@ -173,7 +185,7 @@
}
else
{
- values = new String[] {publicParam.getValue()};
+ values = new String[]{publicParam.getValue()};
publicNS.put(paramName, values);
}
}
@@ -181,25 +193,6 @@
}
}
-
- final org.oasis.wsrp.v2.UserContext wsrpUserContext = getUserContext();
- checkUserContext(wsrpUserContext);
-
- SecurityContext securityContext = createSecurityContext(params, runtimeContext,
wsrpUserContext);
- MarkupInfo streamInfo = createStreamInfo(markupRequest);
- PortalContext portalContext = createPortalContext(params, markupRequest);
- UserContext userContext = createUserContext(wsrpUserContext,
markupRequest.getLocale(), desiredLocales);
- instanceContext = createInstanceContext(portletContext, getAccessMode(),
runtimeContext.getPortletInstanceKey());
- WindowContext windowContext = createWindowContext(portletContext.getId(),
runtimeContext);
-
- // prepare the invocation
- WSRPPortletInvocationContext context = new WSRPPortletInvocationContext(streamInfo,
securityContext, portalContext, userContext, instanceContext, windowContext);
- PortletInvocation invocation = initInvocation(context);
-
- invocation.setTarget(portlet.getContext());
-
invocation.setWindowState(WSRPUtils.getJSR168WindowStateFromWSRPName(markupRequest.getWindowState()));
-
invocation.setMode(WSRPUtils.getJSR168PortletModeFromWSRPName(markupRequest.getMode()));
-
context.contextualize(invocation);
setInvocation(invocation);
}
Modified:
components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/v2/MarkupEndpoint.java
===================================================================
---
components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/v2/MarkupEndpoint.java 2010-05-31
06:35:30 UTC (rev 3217)
+++
components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/v2/MarkupEndpoint.java 2010-05-31
17:24:50 UTC (rev 3218)
@@ -86,37 +86,6 @@
@HandlerChain(file = "wshandlers.xml")
public class MarkupEndpoint extends WSRPBaseEndpoint implements WSRPV2MarkupPortType
{
- public void performBlockingInteraction(
- @WebParam(name = "registrationContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") RegistrationContext registrationContext,
- @WebParam(name = "portletContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") PortletContext portletContext,
- @WebParam(name = "runtimeContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") RuntimeContext runtimeContext,
- @WebParam(name = "userContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") UserContext userContext,
- @WebParam(name = "markupParams", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") MarkupParams markupParams,
- @WebParam(name = "interactionParams", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") InteractionParams interactionParams,
- @WebParam(mode = WebParam.Mode.OUT, name = "updateResponse",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types")
Holder<UpdateResponse> updateResponse,
- @WebParam(mode = WebParam.Mode.OUT, name = "redirectURL", targetNamespace
= "urn:oasis:names:tc:wsrp:v1:types") Holder<String> redirectURL,
- @WebParam(mode = WebParam.Mode.OUT, name = "extensions", targetNamespace
= "urn:oasis:names:tc:wsrp:v1:types") Holder<List<Extension>>
extensions
- ) throws UnsupportedMimeType, UnsupportedMode, UnsupportedWindowState, InvalidCookie,
InvalidSession, MissingParameters,
- UnsupportedLocale, InconsistentParameters, PortletStateChangeRequired,
InvalidHandle, InvalidRegistration,
- InvalidUserCategory, AccessDenied, OperationFailed
- {
- forceSessionAccess();
-
- PerformBlockingInteraction performBlockingInteraction = new
PerformBlockingInteraction();
- performBlockingInteraction.setPortletContext(portletContext);
- performBlockingInteraction.setRuntimeContext(runtimeContext);
- performBlockingInteraction.setMarkupParams(markupParams);
- performBlockingInteraction.setInteractionParams(interactionParams);
- performBlockingInteraction.setRegistrationContext(registrationContext);
- performBlockingInteraction.setUserContext(userContext);
-
- BlockingInteractionResponse interactionResponse =
producer.performBlockingInteraction(performBlockingInteraction);
-
- updateResponse.value = interactionResponse.getUpdateResponse();
- redirectURL.value = interactionResponse.getRedirectURL();
- extensions.value = interactionResponse.getExtensions();
- }
-
public void handleEvents(
@WebParam(name = "registrationContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") RegistrationContext registrationContext,
@WebParam(name = "portletContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") PortletContext portletContext,
@@ -142,7 +111,15 @@
) throws AccessDenied, InvalidRegistration, MissingParameters,
ModifyRegistrationRequired, OperationFailed,
OperationNotSupported, ResourceSuspended
{
- return null; //To change body of implemented methods use File | Settings | File
Templates.
+ forceSessionAccess();
+
+ ReleaseSessions releaseSessions = new ReleaseSessions();
+ releaseSessions.setRegistrationContext(registrationContext);
+ releaseSessions.getSessionIDs().addAll(sessionIDs);
+
+ ReturnAny returnAny = producer.releaseSessions(releaseSessions);
+
+ return returnAny.getExtensions();
}
public List<Extension> initCookie(
@@ -150,37 +127,17 @@
@WebParam(name = "userContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") UserContext userContext
) throws AccessDenied, InvalidRegistration, ModifyRegistrationRequired,
OperationFailed, OperationNotSupported, ResourceSuspended
{
- return null; //To change body of implemented methods use File | Settings | File
Templates.
- }
-
- public List<Extension> releaseSessions(
- @WebParam(name = "registrationContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") RegistrationContext registrationContext,
- @WebParam(name = "sessionIDs", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") List<String> sessionIDs
- ) throws MissingParameters, InvalidRegistration, AccessDenied, OperationFailed
- {
forceSessionAccess();
- ReleaseSessions releaseSessions = new ReleaseSessions();
- releaseSessions.setRegistrationContext(registrationContext);
- releaseSessions.getSessionIDs().addAll(sessionIDs);
+ InitCookie initCookie = new InitCookie();
+ initCookie.setRegistrationContext(registrationContext);
- ReturnAny returnAny = producer.releaseSessions(releaseSessions);
+ ReturnAny returnAny = producer.initCookie(initCookie);
return returnAny.getExtensions();
}
- public void getMarkup(
- @WebParam(name = "registrationContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") RegistrationContext registrationContext,
- @WebParam(name = "portletContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") PortletContext portletContext,
- @WebParam(name = "runtimeContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") RuntimeContext runtimeContext,
- @WebParam(name = "userContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") UserContext userContext,
- @WebParam(name = "markupParams", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") MarkupParams markupParams,
- @WebParam(mode = WebParam.Mode.OUT, name = "markupContext",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types")
Holder<MarkupContext> markupContext,
- @WebParam(mode = WebParam.Mode.OUT, name = "sessionContext",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types")
Holder<SessionContext> sessionContext,
- @WebParam(mode = WebParam.Mode.OUT, name = "extensions", targetNamespace
= "urn:oasis:names:tc:wsrp:v1:types") Holder<List<Extension>>
extensions
- ) throws UnsupportedMimeType, UnsupportedMode, UnsupportedWindowState, InvalidCookie,
InvalidSession, MissingParameters,
- UnsupportedLocale, InconsistentParameters, InvalidHandle, InvalidRegistration,
InvalidUserCategory, AccessDenied,
- OperationFailed
+ public void getMarkup(@WebParam(name = "registrationContext",
targetNamespace = "urn:oasis:names:tc:wsrp:v2:types") RegistrationContext
registrationContext, @WebParam(name = "portletContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") PortletContext portletContext,
@WebParam(name = "runtimeContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") RuntimeContext runtimeContext,
@WebParam(name = "userContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") UserContext userContext, @WebParam(name =
"markupParams", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types")
MarkupParams markupParams, @WebParam(name = "markupContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT)
Holder<MarkupContext> markupContext, @WebParam(name = "sessionContext",
targetNamespace = "urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT)
Holder<SessionContext> sessionContext, @WebParam(name = "extensions",
targetNamespace = "urn:oasi!
s:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT)
Holder<List<Extension>> extensions) throws AccessDenied,
InconsistentParameters, InvalidCookie, InvalidHandle, InvalidRegistration, InvalidSession,
InvalidUserCategory, MissingParameters, ModifyRegistrationRequired, OperationFailed,
ResourceSuspended, UnsupportedLocale, UnsupportedMimeType, UnsupportedMode,
UnsupportedWindowState
{
forceSessionAccess();
@@ -214,17 +171,22 @@
//To change body of implemented methods use File | Settings | File Templates.
}
- public List<Extension> initCookie(
- @WebParam(name = "registrationContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") RegistrationContext registrationContext
- ) throws InvalidRegistration, AccessDenied, OperationFailed
+ public void performBlockingInteraction(@WebParam(name =
"registrationContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") RegistrationContext registrationContext,
@WebParam(name = "portletContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") PortletContext portletContext,
@WebParam(name = "runtimeContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") RuntimeContext runtimeContext,
@WebParam(name = "userContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") UserContext userContext, @WebParam(name =
"markupParams", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types")
MarkupParams markupParams, @WebParam(name = "interactionParams", targetNamespace
= "urn:oasis:names:tc:wsrp:v2:types") InteractionParams interactionParams,
@WebParam(name = "updateResponse", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT)
Holder<UpdateResponse> updateResponse, @WebParam(name = "redirectURL",
targetNamespace = "urn:oasis:na!
mes:tc:wsrp:v2:types", mode = WebParam.Mode.OUT) Holder<String> redirectURL,
@WebParam(name = "extensions", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT)
Holder<List<Extension>> extensions) throws AccessDenied,
InconsistentParameters, InvalidCookie, InvalidHandle, InvalidRegistration, InvalidSession,
InvalidUserCategory, MissingParameters, ModifyRegistrationRequired, OperationFailed,
PortletStateChangeRequired, ResourceSuspended, UnsupportedLocale, UnsupportedMimeType,
UnsupportedMode, UnsupportedWindowState
{
forceSessionAccess();
- InitCookie initCookie = new InitCookie();
- initCookie.setRegistrationContext(registrationContext);
+ PerformBlockingInteraction performBlockingInteraction = new
PerformBlockingInteraction();
+ performBlockingInteraction.setPortletContext(portletContext);
+ performBlockingInteraction.setRuntimeContext(runtimeContext);
+ performBlockingInteraction.setMarkupParams(markupParams);
+ performBlockingInteraction.setInteractionParams(interactionParams);
+ performBlockingInteraction.setRegistrationContext(registrationContext);
+ performBlockingInteraction.setUserContext(userContext);
- ReturnAny returnAny = producer.initCookie(initCookie);
+ BlockingInteractionResponse interactionResponse =
producer.performBlockingInteraction(performBlockingInteraction);
- return returnAny.getExtensions();
+ updateResponse.value = interactionResponse.getUpdateResponse();
+ redirectURL.value = interactionResponse.getRedirectURL();
+ extensions.value = interactionResponse.getExtensions();
}
}
Modified:
components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/v2/PortletManagementEndpoint.java
===================================================================
---
components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/v2/PortletManagementEndpoint.java 2010-05-31
06:35:30 UTC (rev 3217)
+++
components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/v2/PortletManagementEndpoint.java 2010-05-31
17:24:50 UTC (rev 3218)
@@ -88,14 +88,15 @@
public class PortletManagementEndpoint extends WSRPBaseEndpoint implements
WSRPV2PortletManagementPortType
{
public void getPortletPropertyDescription(
- @WebParam(name = "registrationContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") RegistrationContext registrationContext,
- @WebParam(name = "portletContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") PortletContext portletContext,
- @WebParam(name = "userContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") UserContext userContext,
- @WebParam(name = "desiredLocales", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") List<String> desiredLocales,
- @WebParam(mode = WebParam.Mode.OUT, name = "modelDescription",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types")
Holder<ModelDescription> modelDescription,
- @WebParam(mode = WebParam.Mode.OUT, name = "resourceList",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") Holder<ResourceList>
resourceList,
- @WebParam(mode = WebParam.Mode.OUT, name = "extensions", targetNamespace
= "urn:oasis:names:tc:wsrp:v1:types") Holder<List<Extension>>
extensions
- ) throws MissingParameters, InconsistentParameters, InvalidHandle,
InvalidRegistration, InvalidUserCategory, AccessDenied, OperationFailed
+ @WebParam(name = "registrationContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") RegistrationContext registrationContext,
+ @WebParam(name = "portletContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") PortletContext portletContext,
+ @WebParam(name = "userContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") UserContext userContext,
+ @WebParam(name = "desiredLocales", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") List<String> desiredLocales,
+ @WebParam(name = "modelDescription", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT)
Holder<ModelDescription> modelDescription,
+ @WebParam(name = "resourceList", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT)
Holder<ResourceList> resourceList,
+ @WebParam(name = "extensions", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT)
Holder<List<Extension>> extensions)
+ throws AccessDenied, InconsistentParameters, InvalidHandle, InvalidRegistration,
InvalidUserCategory,
+ MissingParameters, ModifyRegistrationRequired, OperationFailed,
OperationNotSupported, ResourceSuspended
{
GetPortletPropertyDescription getPortletPropertyDescription = new
GetPortletPropertyDescription();
getPortletPropertyDescription.setRegistrationContext(registrationContext);
@@ -110,59 +111,16 @@
extensions.value = descriptionResponse.getExtensions();
}
- public void setPortletProperties(
- @WebParam(name = "registrationContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") RegistrationContext registrationContext,
- @WebParam(name = "portletContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") PortletContext portletContext,
- @WebParam(name = "userContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") UserContext userContext,
- @WebParam(name = "propertyList", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") PropertyList propertyList,
- @WebParam(mode = WebParam.Mode.OUT, name = "portletHandle",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") Holder<String>
portletHandle,
- @WebParam(mode = WebParam.Mode.OUT, name = "portletState",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") Holder<byte[]>
portletState,
- @WebParam(mode = WebParam.Mode.OUT, name = "extensions", targetNamespace
= "urn:oasis:names:tc:wsrp:v1:types") Holder<List<Extension>>
extensions
- ) throws MissingParameters, InconsistentParameters, InvalidHandle,
InvalidRegistration, InvalidUserCategory, AccessDenied, OperationFailed
- {
- SetPortletProperties setPortletProperties = new SetPortletProperties();
- setPortletProperties.setRegistrationContext(registrationContext);
- setPortletProperties.setPortletContext(portletContext);
- setPortletProperties.setUserContext(userContext);
- setPortletProperties.setPropertyList(propertyList);
-
- PortletContext response = producer.setPortletProperties(setPortletProperties);
-
- portletHandle.value = response.getPortletHandle();
- portletState.value = response.getPortletState();
- extensions.value = response.getExtensions();
- }
-
- public void clonePortlet(
- @WebParam(name = "registrationContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") RegistrationContext registrationContext,
- @WebParam(name = "portletContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") PortletContext portletContext,
- @WebParam(name = "userContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") UserContext userContext,
- @WebParam(mode = WebParam.Mode.OUT, name = "portletHandle",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") Holder<String>
portletHandle,
- @WebParam(mode = WebParam.Mode.OUT, name = "portletState",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") Holder<byte[]>
portletState,
- @WebParam(mode = WebParam.Mode.OUT, name = "extensions", targetNamespace
= "urn:oasis:names:tc:wsrp:v1:types") Holder<List<Extension>>
extensions
- ) throws MissingParameters, InconsistentParameters, InvalidHandle,
InvalidRegistration, InvalidUserCategory, AccessDenied, OperationFailed
- {
- ClonePortlet clonePortlet = new ClonePortlet();
- clonePortlet.setRegistrationContext(registrationContext);
- clonePortlet.setPortletContext(portletContext);
- clonePortlet.setUserContext(userContext);
-
- PortletContext response = producer.clonePortlet(clonePortlet);
-
- portletHandle.value = response.getPortletHandle();
- portletState.value = response.getPortletState();
- extensions.value = response.getExtensions();
- }
-
public void getPortletDescription(
- @WebParam(name = "registrationContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") RegistrationContext registrationContext,
- @WebParam(name = "portletContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") PortletContext portletContext,
- @WebParam(name = "userContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") UserContext userContext,
- @WebParam(name = "desiredLocales", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") List<String> desiredLocales,
- @WebParam(mode = WebParam.Mode.OUT, name = "portletDescription",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types")
Holder<PortletDescription> portletDescription,
- @WebParam(mode = WebParam.Mode.OUT, name = "resourceList",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") Holder<ResourceList>
resourceList,
- @WebParam(mode = WebParam.Mode.OUT, name = "extensions", targetNamespace
= "urn:oasis:names:tc:wsrp:v1:types") Holder<List<Extension>>
extensions
- ) throws MissingParameters, InconsistentParameters, InvalidHandle,
InvalidRegistration, InvalidUserCategory, AccessDenied, OperationFailed
+ @WebParam(name = "registrationContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") RegistrationContext registrationContext,
+ @WebParam(name = "portletContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") PortletContext portletContext,
+ @WebParam(name = "userContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") UserContext userContext,
+ @WebParam(name = "desiredLocales", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") List<String> desiredLocales,
+ @WebParam(name = "portletDescription", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT)
Holder<PortletDescription> portletDescription,
+ @WebParam(name = "resourceList", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT)
Holder<ResourceList> resourceList,
+ @WebParam(name = "extensions", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT)
Holder<List<Extension>> extensions)
+ throws AccessDenied, InconsistentParameters, InvalidHandle, InvalidRegistration,
InvalidUserCategory,
+ MissingParameters, ModifyRegistrationRequired, OperationFailed,
OperationNotSupported, ResourceSuspended
{
GetPortletDescription getPortletDescription = new GetPortletDescription();
getPortletDescription.setRegistrationContext(registrationContext);
@@ -189,7 +147,16 @@
throws AccessDenied, InconsistentParameters, InvalidHandle, InvalidRegistration,
InvalidUserCategory,
MissingParameters, ModifyRegistrationRequired, OperationFailed,
OperationNotSupported, ResourceSuspended
{
- //To change body of implemented methods use File | Settings | File Templates.
+ ClonePortlet clonePortlet = new ClonePortlet();
+ clonePortlet.setRegistrationContext(registrationContext);
+ clonePortlet.setPortletContext(portletContext);
+ clonePortlet.setUserContext(userContext);
+
+ PortletContext response = producer.clonePortlet(clonePortlet);
+
+ portletHandle.value = response.getPortletHandle();
+ portletState.value = response.getPortletState();
+ extensions.value = response.getExtensions();
}
public void destroyPortlets(
@@ -200,7 +167,14 @@
@WebParam(name = "extensions", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT)
Holder<List<Extension>> extensions)
throws InconsistentParameters, InvalidRegistration, MissingParameters,
ModifyRegistrationRequired, OperationFailed, OperationNotSupported, ResourceSuspended
{
- //To change body of implemented methods use File | Settings | File Templates.
+ DestroyPortlets destroyPortlets = new DestroyPortlets();
+ destroyPortlets.setRegistrationContext(registrationContext);
+ destroyPortlets.getPortletHandles().addAll(portletHandles);
+
+ DestroyPortletsResponse destroyPortletsResponse =
producer.destroyPortlets(destroyPortlets);
+
+ failedPortlets.value = destroyPortletsResponse.getFailedPortlets();
+ extensions.value = destroyPortletsResponse.getExtensions();
}
public void getPortletsLifetime(
@@ -303,18 +277,20 @@
@WebParam(name = "extensions", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT)
Holder<List<Extension>> extensions)
throws AccessDenied, InconsistentParameters, InvalidHandle, InvalidRegistration,
InvalidUserCategory, MissingParameters, ModifyRegistrationRequired, OperationFailed,
OperationNotSupported, ResourceSuspended
{
- //To change body of implemented methods use File | Settings | File Templates.
+ SetPortletProperties setPortletProperties = new SetPortletProperties();
+ setPortletProperties.setRegistrationContext(registrationContext);
+ setPortletProperties.setPortletContext(portletContext);
+ setPortletProperties.setUserContext(userContext);
+ setPortletProperties.setPropertyList(propertyList);
+
+ PortletContext response = producer.setPortletProperties(setPortletProperties);
+
+ portletHandle.value = response.getPortletHandle();
+ portletState.value = response.getPortletState();
+ extensions.value = response.getExtensions();
}
- public void getPortletProperties(
- @WebParam(name = "registrationContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") RegistrationContext registrationContext,
- @WebParam(name = "portletContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") PortletContext portletContext,
- @WebParam(name = "userContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") UserContext userContext,
- @WebParam(name = "names", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") List<String> names,
- @WebParam(mode = WebParam.Mode.OUT, name = "properties", targetNamespace
= "urn:oasis:names:tc:wsrp:v1:types") Holder<List<Property>>
properties,
- @WebParam(mode = WebParam.Mode.OUT, name = "resetProperties",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types")
Holder<List<ResetProperty>> resetProperties,
- @WebParam(mode = WebParam.Mode.OUT, name = "extensions", targetNamespace
= "urn:oasis:names:tc:wsrp:v1:types") Holder<List<Extension>>
extensions
- ) throws MissingParameters, InconsistentParameters, InvalidHandle,
InvalidRegistration, InvalidUserCategory, AccessDenied, OperationFailed
+ public void getPortletProperties(@WebParam(name = "registrationContext",
targetNamespace = "urn:oasis:names:tc:wsrp:v2:types") RegistrationContext
registrationContext, @WebParam(name = "portletContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") PortletContext portletContext,
@WebParam(name = "userContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") UserContext userContext, @WebParam(name =
"names", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types")
List<String> names, @WebParam(name = "properties", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT)
Holder<List<Property>> properties, @WebParam(name =
"resetProperties", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT)
Holder<List<ResetProperty>> resetProperties, @WebParam(name =
"extensions", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types",
mode = WebParam.Mode.OUT) Holder<List<Extension>> extensions) throws
AccessDenied, Inconsisten!
tParameters, InvalidHandle, InvalidRegistration, InvalidUserCategory, MissingParameters,
ModifyRegistrationRequired, OperationFailed, OperationNotSupported, ResourceSuspended
{
GetPortletProperties getPortletProperties = new GetPortletProperties();
getPortletProperties.setRegistrationContext(registrationContext);
@@ -328,21 +304,4 @@
resetProperties.value = result.getResetProperties();
extensions.value = result.getExtensions();
}
-
- /*public void destroyPortlets(
- @WebParam(name = "registrationContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") RegistrationContext registrationContext,
- @WebParam(name = "portletHandles", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") List<String> portletHandles,
- @WebParam(mode = WebParam.Mode.OUT, name = "destroyFailed",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types")
Holder<List<DestroyFailed>> destroyFailed,
- @WebParam(mode = WebParam.Mode.OUT, name = "extensions", targetNamespace
= "urn:oasis:names:tc:wsrp:v1:types") Holder<List<Extension>>
extensions
- ) throws MissingParameters, InconsistentParameters, InvalidRegistration,
OperationFailed
- {
- DestroyPortlets destroyPortlets = new DestroyPortlets();
- destroyPortlets.setRegistrationContext(registrationContext);
- destroyPortlets.getPortletHandles().addAll(portletHandles);
-
- DestroyPortletsResponse destroyPortletsResponse =
producer.destroyPortlets(destroyPortlets);
-
- destroyFailed.value = destroyPortletsResponse.getDestroyFailed();
- extensions.value = destroyPortletsResponse.getExtensions();
- }*/
}
Modified:
components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/v2/RegistrationEndpoint.java
===================================================================
---
components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/v2/RegistrationEndpoint.java 2010-05-31
06:35:30 UTC (rev 3217)
+++
components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/v2/RegistrationEndpoint.java 2010-05-31
17:24:50 UTC (rev 3218)
@@ -35,7 +35,6 @@
import org.oasis.wsrp.v2.ModifyRegistrationRequired;
import org.oasis.wsrp.v2.OperationFailed;
import org.oasis.wsrp.v2.OperationNotSupported;
-import org.oasis.wsrp.v2.Property;
import org.oasis.wsrp.v2.RegistrationContext;
import org.oasis.wsrp.v2.RegistrationData;
import org.oasis.wsrp.v2.RegistrationState;
@@ -65,74 +64,7 @@
@HandlerChain(file = "wshandlers.xml")
public class RegistrationEndpoint extends WSRPBaseEndpoint implements
WSRPV2RegistrationPortType
{
-
public void register(
- @WebParam(name = "consumerName", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") String consumerName,
- @WebParam(name = "consumerAgent", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") String consumerAgent,
- @WebParam(name = "methodGetSupported", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") boolean methodGetSupported,
- @WebParam(name = "consumerModes", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") List<String> consumerModes,
- @WebParam(name = "consumerWindowStates", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") List<String> consumerWindowStates,
- @WebParam(name = "consumerUserScopes", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") List<String> consumerUserScopes,
- @WebParam(name = "customUserProfileData", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") List<String> customUserProfileData,
- @WebParam(name = "registrationProperties", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") List<Property>
registrationProperties,
- @WebParam(mode = WebParam.Mode.INOUT, name = "extensions",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types")
Holder<List<Extension>> extensions,
- @WebParam(mode = WebParam.Mode.OUT, name = "registrationHandle",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") Holder<String>
registrationHandle,
- @WebParam(mode = WebParam.Mode.OUT, name = "registrationState",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") Holder<byte[]>
registrationState)
- throws MissingParameters, OperationFailed
- {
- RegistrationData registrationData = new RegistrationData();
- registrationData.setConsumerName(consumerName);
- registrationData.setConsumerAgent(consumerAgent);
- registrationData.getConsumerModes().addAll(consumerModes);
- registrationData.getConsumerWindowStates().addAll(consumerWindowStates);
- registrationData.getConsumerUserScopes().addAll(consumerUserScopes);
-// registrationData.getCustomUserProfileData().addAll(customUserProfileData);
- registrationData.getRegistrationProperties().addAll(registrationProperties);
- registrationData.getExtensions().addAll(extensions.value);
-
- RegistrationContext registrationContext = producer.register(registrationData);
-
- registrationHandle.value = registrationContext.getRegistrationHandle();
- registrationState.value = registrationContext.getRegistrationState();
- extensions.value = registrationContext.getExtensions();
- }
-
- public void modifyRegistration(
- @WebParam(name = "registrationContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") RegistrationContext registrationContext,
- @WebParam(name = "registrationData", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") RegistrationData registrationData,
- @WebParam(mode = WebParam.Mode.OUT, name = "registrationState",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") Holder<byte[]>
registrationState,
- @WebParam(mode = WebParam.Mode.OUT, name = "extensions", targetNamespace
= "urn:oasis:names:tc:wsrp:v1:types") Holder<List<Extension>>
extensions)
- throws MissingParameters, InvalidRegistration, OperationFailed
- {
- ModifyRegistration modifyRegistration = new ModifyRegistration();
- modifyRegistration.setRegistrationContext(registrationContext);
- modifyRegistration.setRegistrationData(registrationData);
-
- 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 = result.getExtensions();
- }
- }
-
- public List<Extension> deregister(
- @WebParam(name = "registrationHandle", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") String registrationHandle,
- @WebParam(name = "registrationState", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") byte[] registrationState,
- @WebParam(name = "extensions", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") List<Extension> extensions)
- throws InvalidRegistration, OperationFailed
- {
- RegistrationContext rc = new RegistrationContext();
- rc.setRegistrationHandle(registrationHandle);
- rc.setRegistrationState(registrationState);
-
- producer.deregister(rc);
- return null;
- }
-
- public void register(
@WebParam(name = "registrationData", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") RegistrationData registrationData,
@WebParam(name = "lifetime", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") Lifetime lifetime,
@WebParam(name = "userContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") UserContext userContext,
@@ -142,7 +74,11 @@
@WebParam(name = "registrationHandle", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT)
Holder<String> registrationHandle)
throws MissingParameters, OperationFailed, OperationNotSupported
{
- //To change body of implemented methods use File | Settings | File Templates.
+ RegistrationContext registrationContext = producer.register(registrationData);
+
+ registrationHandle.value = registrationContext.getRegistrationHandle();
+ registrationState.value = registrationContext.getRegistrationState();
+ extensions.value = registrationContext.getExtensions();
}
public List<Extension> deregister(
@@ -150,7 +86,8 @@
@WebParam(name = "userContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") UserContext userContext)
throws InvalidRegistration, OperationFailed, OperationNotSupported,
ResourceSuspended
{
- return null; //To change body of implemented methods use File | Settings | File
Templates.
+ producer.deregister(registrationContext);
+ return null;
}
public void modifyRegistration(
@@ -162,7 +99,18 @@
@WebParam(name = "extensions", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT)
Holder<List<Extension>> extensions)
throws InvalidRegistration, MissingParameters, OperationFailed,
OperationNotSupported, ResourceSuspended
{
- //To change body of implemented methods use File | Settings | File Templates.
+ ModifyRegistration modifyRegistration = new ModifyRegistration();
+ modifyRegistration.setRegistrationContext(registrationContext);
+ modifyRegistration.setRegistrationData(registrationData);
+
+ 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 = result.getExtensions();
+ }
}
public Lifetime getRegistrationLifetime(
Modified:
components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/v2/ServiceDescriptionEndpoint.java
===================================================================
---
components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/v2/ServiceDescriptionEndpoint.java 2010-05-31
06:35:30 UTC (rev 3217)
+++
components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/v2/ServiceDescriptionEndpoint.java 2010-05-31
17:24:50 UTC (rev 3218)
@@ -65,41 +65,6 @@
public class ServiceDescriptionEndpoint extends WSRPBaseEndpoint implements
WSRPV2ServiceDescriptionPortType
{
public void getServiceDescription(
- @WebParam(name = "registrationContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") RegistrationContext registrationContext,
- @WebParam(name = "desiredLocales", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") List<String> desiredLocales,
- @WebParam(mode = WebParam.Mode.OUT, name = "requiresRegistration",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") Holder<Boolean>
requiresRegistration,
- @WebParam(mode = WebParam.Mode.OUT, name = "offeredPortlets",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types")
Holder<List<PortletDescription>> offeredPortlets,
- @WebParam(mode = WebParam.Mode.OUT, name = "userCategoryDescriptions",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types")
Holder<List<ItemDescription>> userCategoryDescriptions,
- @WebParam(mode = WebParam.Mode.OUT, name =
"customUserProfileItemDescriptions", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") Holder<List<ItemDescription>>
customUserProfileItemDescriptions,
- @WebParam(mode = WebParam.Mode.OUT, name =
"customWindowStateDescriptions", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") Holder<List<ItemDescription>>
customWindowStateDescriptions,
- @WebParam(mode = WebParam.Mode.OUT, name = "customModeDescriptions",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types")
Holder<List<ItemDescription>> customModeDescriptions,
- @WebParam(mode = WebParam.Mode.OUT, name = "requiresInitCookie",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types")
Holder<CookieProtocol> requiresInitCookie,
- @WebParam(mode = WebParam.Mode.OUT, name =
"registrationPropertyDescription", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") Holder<ModelDescription>
registrationPropertyDescription,
- @WebParam(mode = WebParam.Mode.OUT, name = "locales", targetNamespace =
"urn:oasis:names:tc:wsrp:v1:types") Holder<List<String>> locales,
- @WebParam(mode = WebParam.Mode.OUT, name = "resourceList",
targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") Holder<ResourceList>
resourceList,
- @WebParam(mode = WebParam.Mode.OUT, name = "extensions", targetNamespace
= "urn:oasis:names:tc:wsrp:v1:types") Holder<List<Extension>>
extensions
- ) throws InvalidRegistration, OperationFailed
- {
- GetServiceDescription getServiceDescription = new GetServiceDescription();
- getServiceDescription.setRegistrationContext(registrationContext);
- getServiceDescription.getDesiredLocales().addAll(desiredLocales);
-
- ServiceDescription description =
producer.getServiceDescription(getServiceDescription);
-
- requiresRegistration.value = description.isRequiresRegistration();
- offeredPortlets.value = description.getOfferedPortlets();
- userCategoryDescriptions.value = description.getUserCategoryDescriptions();
-// customUserProfileItemDescriptions.value =
description.getCustomUserProfileItemDescriptions();
- customWindowStateDescriptions.value =
description.getCustomWindowStateDescriptions();
- customModeDescriptions.value = description.getCustomModeDescriptions();
- requiresInitCookie.value = description.getRequiresInitCookie();
- registrationPropertyDescription.value =
description.getRegistrationPropertyDescription();
- locales.value = description.getLocales();
- resourceList.value = description.getResourceList();
- extensions.value = description.getExtensions();
- }
-
- public void getServiceDescription(
@WebParam(name = "registrationContext", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") RegistrationContext registrationContext,
@WebParam(name = "desiredLocales", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") List<String> desiredLocales,
@WebParam(name = "portletHandles", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types") List<String> portletHandles,
@@ -122,6 +87,22 @@
@WebParam(name = "extensions", targetNamespace =
"urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT)
Holder<List<Extension>> extensions)
throws InvalidRegistration, ModifyRegistrationRequired, OperationFailed,
ResourceSuspended
{
- //To change body of implemented methods use File | Settings | File Templates.
+ GetServiceDescription getServiceDescription = new GetServiceDescription();
+ getServiceDescription.setRegistrationContext(registrationContext);
+ getServiceDescription.getDesiredLocales().addAll(desiredLocales);
+
+ ServiceDescription description =
producer.getServiceDescription(getServiceDescription);
+
+ requiresRegistration.value = description.isRequiresRegistration();
+ offeredPortlets.value = description.getOfferedPortlets();
+ userCategoryDescriptions.value = description.getUserCategoryDescriptions();
+// customUserProfileItemDescriptions.value =
description.getCustomUserProfileItemDescriptions();
+ customWindowStateDescriptions.value =
description.getCustomWindowStateDescriptions();
+ customModeDescriptions.value = description.getCustomModeDescriptions();
+ requiresInitCookie.value = description.getRequiresInitCookie();
+ registrationPropertyDescription.value =
description.getRegistrationPropertyDescription();
+ locales.value = description.getLocales();
+ resourceList.value = description.getResourceList();
+ extensions.value = description.getExtensions();
}
}