Author: chris.laprun(a)jboss.com
Date: 2010-06-01 20:27:24 -0400 (Tue, 01 Jun 2010)
New Revision: 3224
Added:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/MarkupService.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/PortletManagementService.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/RegistrationService.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/ServiceDescriptionService.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/WSRPService.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/
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/consumer/src/main/java/org/gatein/wsrp/services/v1/V1ServiceDescriptionService.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v2/
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v2/V2MarkupService.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v2/V2PortletManagementService.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v2/V2RegistrationService.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v2/V2ServiceDescriptionService.java
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/EndpointConfigurationInfo.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/main/java/org/gatein/wsrp/services/ServiceWrapper.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
Log:
- Introduced concept of intermediary *Service classes to mirror the WSRP interfaces and
dispatch to appropriate version of WS.
- Started migrating code to use new Service classes. Shouldn't use WSRP interfaces
directly.
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/EndpointConfigurationInfo.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/EndpointConfigurationInfo.java 2010-06-02
00:12:02 UTC (rev 3223)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/EndpointConfigurationInfo.java 2010-06-02
00:27:24 UTC (rev 3224)
@@ -25,7 +25,11 @@
import org.gatein.common.util.ParameterValidation;
import org.gatein.pc.api.InvokerUnavailableException;
+import org.gatein.wsrp.services.MarkupService;
+import org.gatein.wsrp.services.PortletManagementService;
+import org.gatein.wsrp.services.RegistrationService;
import org.gatein.wsrp.services.SOAPServiceFactory;
+import org.gatein.wsrp.services.ServiceDescriptionService;
import org.gatein.wsrp.services.ServiceFactory;
import org.oasis.wsrp.v2.WSRPV2MarkupPortType;
import org.oasis.wsrp.v2.WSRPV2PortletManagementPortType;
@@ -101,24 +105,56 @@
return serviceFactory;
}
- WSRPV2ServiceDescriptionPortType getServiceDescriptionService() throws
InvokerUnavailableException
+ ServiceDescriptionService getServiceDescriptionService() throws
InvokerUnavailableException
{
- return getService(WSRPV2ServiceDescriptionPortType.class);
+ try
+ {
+ return serviceFactory.getServiceDescriptionService();
+ }
+ catch (Exception e)
+ {
+ throw new InvokerUnavailableException("Couldn't access
ServiceDescription service. Cause: "
+ + e.getLocalizedMessage(), e);
+ }
}
- WSRPV2MarkupPortType getMarkupService() throws InvokerUnavailableException
+ MarkupService getMarkupService() throws InvokerUnavailableException
{
- return getService(WSRPV2MarkupPortType.class);
+ try
+ {
+ return serviceFactory.getMarkupService();
+ }
+ catch (Exception e)
+ {
+ throw new InvokerUnavailableException("Couldn't access Markup service.
Cause: "
+ + e.getLocalizedMessage(), e);
+ }
}
- WSRPV2PortletManagementPortType getPortletManagementService() throws
InvokerUnavailableException
+ PortletManagementService getPortletManagementService() throws
InvokerUnavailableException
{
- return getService(WSRPV2PortletManagementPortType.class);
+ try
+ {
+ return serviceFactory.getPortletManagementService();
+ }
+ catch (Exception e)
+ {
+ throw new InvokerUnavailableException("Couldn't access
PortletManagement service. Cause: "
+ + e.getLocalizedMessage(), e);
+ }
}
- WSRPV2RegistrationPortType getRegistrationService() throws
InvokerUnavailableException
+ RegistrationService getRegistrationService() throws InvokerUnavailableException
{
- return getService(WSRPV2RegistrationPortType.class);
+ try
+ {
+ return serviceFactory.getRegistrationService();
+ }
+ catch (Exception e)
+ {
+ throw new InvokerUnavailableException("Couldn't access Registration
service. Cause: "
+ + e.getLocalizedMessage(), e);
+ }
}
private <T> T getService(Class<T> clazz) throws
InvokerUnavailableException
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-06-02
00:12:02 UTC (rev 3223)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java 2010-06-02
00:27:24 UTC (rev 3224)
@@ -50,6 +50,10 @@
import org.gatein.wsrp.api.SessionEvent;
import org.gatein.wsrp.consumer.portlet.WSRPPortlet;
import org.gatein.wsrp.consumer.portlet.info.WSRPPortletInfo;
+import org.gatein.wsrp.services.MarkupService;
+import org.gatein.wsrp.services.PortletManagementService;
+import org.gatein.wsrp.services.RegistrationService;
+import org.gatein.wsrp.services.ServiceDescriptionService;
import org.gatein.wsrp.servlet.UserAccess;
import org.oasis.wsrp.v2.Extension;
import org.oasis.wsrp.v2.FailedPortlets;
@@ -61,10 +65,6 @@
import org.oasis.wsrp.v2.ResetProperty;
import org.oasis.wsrp.v2.RuntimeContext;
import org.oasis.wsrp.v2.SessionParams;
-import org.oasis.wsrp.v2.WSRPV2MarkupPortType;
-import org.oasis.wsrp.v2.WSRPV2PortletManagementPortType;
-import org.oasis.wsrp.v2.WSRPV2RegistrationPortType;
-import org.oasis.wsrp.v2.WSRPV2ServiceDescriptionPortType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -578,25 +578,25 @@
return producerInfo.getEndpointConfigurationInfo();
}
- private WSRPV2ServiceDescriptionPortType getServiceDescriptionService() throws
PortletInvokerException
+ private ServiceDescriptionService getServiceDescriptionService() throws
PortletInvokerException
{
refreshProducerInfo(false);
return getEndpointConfigurationInfo().getServiceDescriptionService();
}
- public WSRPV2MarkupPortType getMarkupService() throws PortletInvokerException
+ public MarkupService getMarkupService() throws PortletInvokerException
{
refreshProducerInfo(false);
return getEndpointConfigurationInfo().getMarkupService();
}
- private WSRPV2PortletManagementPortType getPortletManagementService() throws
PortletInvokerException
+ private PortletManagementService getPortletManagementService() throws
PortletInvokerException
{
refreshProducerInfo(false);
return getEndpointConfigurationInfo().getPortletManagementService();
}
- private WSRPV2RegistrationPortType getRegistrationService() throws
PortletInvokerException
+ private RegistrationService getRegistrationService() throws PortletInvokerException
{
refreshProducerInfo(false);
return getEndpointConfigurationInfo().getRegistrationService();
Added:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/MarkupService.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/MarkupService.java
(rev 0)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/MarkupService.java 2010-06-02
00:27:24 UTC (rev 3224)
@@ -0,0 +1,140 @@
+/*
+* 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.
+*/
+
+package org.gatein.wsrp.services;
+
+import org.oasis.wsrp.v2.AccessDenied;
+import org.oasis.wsrp.v2.EventParams;
+import org.oasis.wsrp.v2.Extension;
+import org.oasis.wsrp.v2.HandleEventsFailed;
+import org.oasis.wsrp.v2.InconsistentParameters;
+import org.oasis.wsrp.v2.InteractionParams;
+import org.oasis.wsrp.v2.InvalidCookie;
+import org.oasis.wsrp.v2.InvalidHandle;
+import org.oasis.wsrp.v2.InvalidRegistration;
+import org.oasis.wsrp.v2.InvalidSession;
+import org.oasis.wsrp.v2.InvalidUserCategory;
+import org.oasis.wsrp.v2.MarkupContext;
+import org.oasis.wsrp.v2.MarkupParams;
+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.PortletStateChangeRequired;
+import org.oasis.wsrp.v2.RegistrationContext;
+import org.oasis.wsrp.v2.ResourceContext;
+import org.oasis.wsrp.v2.ResourceParams;
+import org.oasis.wsrp.v2.ResourceSuspended;
+import org.oasis.wsrp.v2.RuntimeContext;
+import org.oasis.wsrp.v2.SessionContext;
+import org.oasis.wsrp.v2.UnsupportedLocale;
+import org.oasis.wsrp.v2.UnsupportedMimeType;
+import org.oasis.wsrp.v2.UnsupportedMode;
+import org.oasis.wsrp.v2.UnsupportedWindowState;
+import org.oasis.wsrp.v2.UpdateResponse;
+import org.oasis.wsrp.v2.UserContext;
+import org.oasis.wsrp.v2.WSRPV2MarkupPortType;
+
+import javax.xml.ws.Holder;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ */
+public abstract class MarkupService<T> extends WSRPService<T> implements
WSRPV2MarkupPortType
+{
+ protected MarkupService(T service)
+ {
+ super(service);
+ }
+
+ public abstract void getMarkup(
+ RegistrationContext registrationContext,
+ PortletContext portletContext,
+ RuntimeContext runtimeContext,
+ UserContext userContext,
+ MarkupParams markupParams,
+ Holder<MarkupContext> markupContext,
+ Holder<SessionContext> sessionContext,
+ Holder<List<Extension>> extensions)
+ throws AccessDenied, InconsistentParameters, InvalidCookie, InvalidHandle,
InvalidRegistration, InvalidSession,
+ InvalidUserCategory, MissingParameters, ModifyRegistrationRequired,
OperationFailed, ResourceSuspended,
+ UnsupportedLocale, UnsupportedMimeType, UnsupportedMode, UnsupportedWindowState;
+
+ public abstract void getResource(
+ RegistrationContext registrationContext,
+ Holder<PortletContext> portletContext,
+ RuntimeContext runtimeContext,
+ UserContext userContext,
+ ResourceParams resourceParams,
+ Holder<ResourceContext> resourceContext,
+ Holder<SessionContext> sessionContext,
+ Holder<List<Extension>> extensions)
+ throws AccessDenied, InconsistentParameters, InvalidCookie, InvalidHandle,
InvalidRegistration, InvalidSession,
+ InvalidUserCategory, MissingParameters, ModifyRegistrationRequired,
OperationFailed, OperationNotSupported,
+ ResourceSuspended, UnsupportedLocale, UnsupportedMimeType, UnsupportedMode,
UnsupportedWindowState;
+
+ public abstract void performBlockingInteraction(
+ RegistrationContext registrationContext,
+ PortletContext portletContext,
+ RuntimeContext runtimeContext,
+ UserContext userContext,
+ MarkupParams markupParams,
+ InteractionParams interactionParams,
+ Holder<UpdateResponse> updateResponse,
+ Holder<String> redirectURL,
+ Holder<List<Extension>> extensions)
+ throws AccessDenied, InconsistentParameters, InvalidCookie, InvalidHandle,
InvalidRegistration, InvalidSession,
+ InvalidUserCategory, MissingParameters, ModifyRegistrationRequired,
OperationFailed, PortletStateChangeRequired,
+ ResourceSuspended, UnsupportedLocale, UnsupportedMimeType, UnsupportedMode,
UnsupportedWindowState;
+
+ public abstract void handleEvents(
+ RegistrationContext registrationContext,
+ PortletContext portletContext,
+ RuntimeContext runtimeContext,
+ UserContext userContext,
+ MarkupParams markupParams,
+ EventParams eventParams,
+ Holder<UpdateResponse> updateResponse,
+ Holder<List<HandleEventsFailed>> failedEvents,
+ Holder<List<Extension>> extensions)
+ throws AccessDenied, InconsistentParameters, InvalidCookie, InvalidHandle,
InvalidRegistration, InvalidSession,
+ InvalidUserCategory, MissingParameters, ModifyRegistrationRequired,
OperationFailed, OperationNotSupported,
+ PortletStateChangeRequired, ResourceSuspended, UnsupportedLocale,
UnsupportedMimeType, UnsupportedMode,
+ UnsupportedWindowState;
+
+ public abstract List<Extension> releaseSessions(
+ RegistrationContext registrationContext,
+ List<String> sessionIDs,
+ UserContext userContext)
+ throws AccessDenied, InvalidRegistration, MissingParameters,
ModifyRegistrationRequired, OperationFailed,
+ OperationNotSupported, ResourceSuspended;
+
+ public abstract List<Extension> initCookie(
+ RegistrationContext registrationContext,
+ UserContext userContext)
+ throws AccessDenied, InvalidRegistration, ModifyRegistrationRequired,
OperationFailed, OperationNotSupported,
+ ResourceSuspended;
+
+}
Added:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/PortletManagementService.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/PortletManagementService.java
(rev 0)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/PortletManagementService.java 2010-06-02
00:27:24 UTC (rev 3224)
@@ -0,0 +1,212 @@
+/*
+* 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.
+*/
+
+package org.gatein.wsrp.services;
+
+import org.oasis.wsrp.v2.AccessDenied;
+import org.oasis.wsrp.v2.CopiedPortlet;
+import org.oasis.wsrp.v2.ExportByValueNotSupported;
+import org.oasis.wsrp.v2.ExportNoLongerValid;
+import org.oasis.wsrp.v2.ExportedPortlet;
+import org.oasis.wsrp.v2.Extension;
+import org.oasis.wsrp.v2.FailedPortlets;
+import org.oasis.wsrp.v2.ImportPortlet;
+import org.oasis.wsrp.v2.ImportPortletsFailed;
+import org.oasis.wsrp.v2.ImportedPortlet;
+import org.oasis.wsrp.v2.InconsistentParameters;
+import org.oasis.wsrp.v2.InvalidHandle;
+import org.oasis.wsrp.v2.InvalidRegistration;
+import org.oasis.wsrp.v2.InvalidUserCategory;
+import org.oasis.wsrp.v2.Lifetime;
+import org.oasis.wsrp.v2.MissingParameters;
+import org.oasis.wsrp.v2.ModelDescription;
+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.PortletLifetime;
+import org.oasis.wsrp.v2.Property;
+import org.oasis.wsrp.v2.PropertyList;
+import org.oasis.wsrp.v2.RegistrationContext;
+import org.oasis.wsrp.v2.ResetProperty;
+import org.oasis.wsrp.v2.ResourceList;
+import org.oasis.wsrp.v2.ResourceSuspended;
+import org.oasis.wsrp.v2.SetExportLifetime;
+import org.oasis.wsrp.v2.UserContext;
+import org.oasis.wsrp.v2.WSRPV2PortletManagementPortType;
+
+import javax.xml.ws.Holder;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ */
+public abstract class PortletManagementService<T> extends WSRPService<T>
implements WSRPV2PortletManagementPortType
+{
+ public PortletManagementService(T service)
+ {
+ super(service);
+ }
+
+ public abstract void getPortletDescription(
+ RegistrationContext registrationContext,
+ PortletContext portletContext,
+ UserContext userContext,
+ List<String> desiredLocales,
+ Holder<PortletDescription> portletDescription,
+ Holder<ResourceList> resourceList,
+ Holder<List<Extension>> extensions)
+ throws AccessDenied, InconsistentParameters, InvalidHandle, InvalidRegistration,
InvalidUserCategory,
+ MissingParameters, ModifyRegistrationRequired, OperationFailed,
OperationNotSupported, ResourceSuspended;
+
+ public abstract void clonePortlet(
+ RegistrationContext registrationContext,
+ PortletContext portletContext,
+ UserContext userContext,
+ Lifetime lifetime,
+ Holder<String> portletHandle,
+ Holder<byte[]> portletState,
+ Holder<Lifetime> scheduledDestruction,
+ Holder<List<Extension>> extensions)
+ throws AccessDenied, InconsistentParameters, InvalidHandle, InvalidRegistration,
InvalidUserCategory,
+ MissingParameters, ModifyRegistrationRequired, OperationFailed,
OperationNotSupported, ResourceSuspended;
+
+ public abstract void destroyPortlets(
+ RegistrationContext registrationContext,
+ List<String> portletHandles,
+ UserContext userContext,
+ Holder<List<FailedPortlets>> failedPortlets,
+ Holder<List<Extension>> extensions)
+ throws InconsistentParameters, InvalidRegistration, MissingParameters,
ModifyRegistrationRequired,
+ OperationFailed, OperationNotSupported, ResourceSuspended;
+
+ public abstract void getPortletsLifetime(
+ RegistrationContext registrationContext,
+ List<PortletContext> portletContext,
+ UserContext userContext,
+ Holder<List<PortletLifetime>> portletLifetime,
+ Holder<List<FailedPortlets>> failedPortlets,
+ Holder<ResourceList> resourceList,
+ Holder<List<Extension>> extensions)
+ throws AccessDenied, InconsistentParameters, InvalidHandle, InvalidRegistration,
ModifyRegistrationRequired,
+ OperationFailed, OperationNotSupported, ResourceSuspended;
+
+ public abstract void setPortletsLifetime(
+ RegistrationContext registrationContext,
+ List<PortletContext> portletContext,
+ UserContext userContext,
+ Lifetime lifetime,
+ Holder<List<PortletLifetime>> updatedPortlet,
+ Holder<List<FailedPortlets>> failedPortlets,
+ Holder<ResourceList> resourceList,
+ Holder<List<Extension>> extensions)
+ throws AccessDenied, InconsistentParameters, InvalidHandle, InvalidRegistration,
ModifyRegistrationRequired,
+ OperationFailed, OperationNotSupported, ResourceSuspended;
+
+ public abstract void copyPortlets(
+ RegistrationContext toRegistrationContext,
+ UserContext toUserContext,
+ RegistrationContext fromRegistrationContext,
+ UserContext fromUserContext,
+ List<PortletContext> fromPortletContexts,
+ Lifetime lifetime,
+ Holder<List<CopiedPortlet>> copiedPortlets,
+ Holder<List<FailedPortlets>> failedPortlets,
+ Holder<ResourceList> resourceList,
+ Holder<List<Extension>> extensions)
+ throws AccessDenied, InconsistentParameters, InvalidHandle, InvalidRegistration,
InvalidUserCategory,
+ MissingParameters, ModifyRegistrationRequired, OperationFailed,
OperationNotSupported, ResourceSuspended;
+
+ public abstract void exportPortlets(
+ RegistrationContext registrationContext,
+ List<PortletContext> portletContext,
+ UserContext userContext,
+ Holder<Lifetime> lifetime,
+ Boolean exportByValueRequired,
+ Holder<byte[]> exportContext,
+ Holder<List<ExportedPortlet>> exportedPortlet,
+ Holder<List<FailedPortlets>> failedPortlets,
+ Holder<ResourceList> resourceList,
+ Holder<List<Extension>> extensions)
+ throws AccessDenied, ExportByValueNotSupported, InconsistentParameters,
InvalidHandle, InvalidRegistration,
+ InvalidUserCategory, MissingParameters, ModifyRegistrationRequired,
OperationFailed, OperationNotSupported,
+ ResourceSuspended;
+
+ public abstract void importPortlets(
+ RegistrationContext registrationContext,
+ byte[] importContext,
+ List<ImportPortlet> importPortlet,
+ UserContext userContext,
+ Lifetime lifetime,
+ Holder<List<ImportedPortlet>> importedPortlets,
+ Holder<List<ImportPortletsFailed>> importFailed,
+ Holder<ResourceList> resourceList,
+ Holder<List<Extension>> extensions)
+ throws AccessDenied, ExportNoLongerValid, InconsistentParameters,
InvalidRegistration, InvalidUserCategory,
+ MissingParameters, ModifyRegistrationRequired, OperationFailed,
OperationNotSupported, ResourceSuspended;
+
+ public abstract List<Extension> releaseExport(
+ RegistrationContext registrationContext,
+ byte[] exportContext,
+ UserContext userContext);
+
+ public abstract Lifetime setExportLifetime(
+ SetExportLifetime setExportLifetime)
+ throws AccessDenied, InvalidHandle, InvalidRegistration,
ModifyRegistrationRequired, OperationFailed,
+ OperationNotSupported, ResourceSuspended;
+
+ public abstract void setPortletProperties(
+ RegistrationContext registrationContext,
+ PortletContext portletContext,
+ UserContext userContext,
+ PropertyList propertyList,
+ Holder<String> portletHandle,
+ Holder<byte[]> portletState,
+ Holder<Lifetime> scheduledDestruction,
+ Holder<List<Extension>> extensions)
+ throws AccessDenied, InconsistentParameters, InvalidHandle, InvalidRegistration,
InvalidUserCategory,
+ MissingParameters, ModifyRegistrationRequired, OperationFailed,
OperationNotSupported, ResourceSuspended;
+
+ public abstract void getPortletProperties(
+ RegistrationContext registrationContext,
+ PortletContext portletContext,
+ UserContext userContext,
+ List<String> names,
+ Holder<List<Property>> properties,
+ Holder<List<ResetProperty>> resetProperties,
+ Holder<List<Extension>> extensions)
+ throws AccessDenied, InconsistentParameters, InvalidHandle, InvalidRegistration,
InvalidUserCategory,
+ MissingParameters, ModifyRegistrationRequired, OperationFailed,
OperationNotSupported, ResourceSuspended;
+
+ public abstract void getPortletPropertyDescription(
+ RegistrationContext registrationContext,
+ PortletContext portletContext,
+ UserContext userContext,
+ List<String> desiredLocales,
+ Holder<ModelDescription> modelDescription,
+ Holder<ResourceList> resourceList,
+ Holder<List<Extension>> extensions)
+ throws AccessDenied, InconsistentParameters, InvalidHandle, InvalidRegistration,
InvalidUserCategory,
+ MissingParameters, ModifyRegistrationRequired, OperationFailed,
OperationNotSupported, ResourceSuspended;
+}
Added:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/RegistrationService.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/RegistrationService.java
(rev 0)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/RegistrationService.java 2010-06-02
00:27:24 UTC (rev 3224)
@@ -0,0 +1,78 @@
+/*
+* 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.
+*/
+
+package org.gatein.wsrp.services;
+
+import org.oasis.wsrp.v2.AccessDenied;
+import org.oasis.wsrp.v2.Extension;
+import org.oasis.wsrp.v2.GetRegistrationLifetime;
+import org.oasis.wsrp.v2.InvalidHandle;
+import org.oasis.wsrp.v2.InvalidRegistration;
+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.OperationNotSupported;
+import org.oasis.wsrp.v2.RegistrationContext;
+import org.oasis.wsrp.v2.RegistrationData;
+import org.oasis.wsrp.v2.ResourceSuspended;
+import org.oasis.wsrp.v2.SetRegistrationLifetime;
+import org.oasis.wsrp.v2.UserContext;
+import org.oasis.wsrp.v2.WSRPV2RegistrationPortType;
+
+import javax.xml.ws.Holder;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ */
+public abstract class RegistrationService<T> extends WSRPService<T>
implements WSRPV2RegistrationPortType
+{
+ public RegistrationService(T service)
+ {
+ super(service);
+ }
+
+ public abstract 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;
+
+ public abstract List<Extension> deregister(RegistrationContext
registrationContext, UserContext userContext)
+ throws InvalidRegistration, OperationFailed, OperationNotSupported,
ResourceSuspended;
+
+ public abstract void modifyRegistration(
+ RegistrationContext registrationContext, RegistrationData registrationData,
UserContext userContext,
+ Holder<byte[]> registrationState,
+ Holder<Lifetime> scheduledDestruction,
+ Holder<List<Extension>> extensions)
+ throws InvalidRegistration, MissingParameters, OperationFailed,
OperationNotSupported, ResourceSuspended;
+
+ public abstract Lifetime getRegistrationLifetime(GetRegistrationLifetime
getRegistrationLifetime)
+ throws AccessDenied, InvalidHandle, InvalidRegistration,
ModifyRegistrationRequired, OperationFailed,
+ OperationNotSupported, ResourceSuspended;
+
+ public abstract Lifetime setRegistrationLifetime(SetRegistrationLifetime
setRegistrationLifetime)
+ throws AccessDenied, InvalidHandle, InvalidRegistration,
ModifyRegistrationRequired, OperationFailed,
+ OperationNotSupported, ResourceSuspended;
+}
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-06-02
00:12:02 UTC (rev 3223)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/SOAPServiceFactory.java 2010-06-02
00:27:24 UTC (rev 3224)
@@ -24,6 +24,18 @@
package org.gatein.wsrp.services;
import org.gatein.common.util.ParameterValidation;
+import org.gatein.wsrp.services.v1.V1MarkupService;
+import org.gatein.wsrp.services.v1.V1PortletManagementService;
+import org.gatein.wsrp.services.v1.V1RegistrationService;
+import org.gatein.wsrp.services.v1.V1ServiceDescriptionService;
+import org.gatein.wsrp.services.v2.V2MarkupService;
+import org.gatein.wsrp.services.v2.V2PortletManagementService;
+import org.gatein.wsrp.services.v2.V2RegistrationService;
+import org.gatein.wsrp.services.v2.V2ServiceDescriptionService;
+import org.oasis.wsrp.v1.WSRPV1MarkupPortType;
+import org.oasis.wsrp.v1.WSRPV1PortletManagementPortType;
+import org.oasis.wsrp.v1.WSRPV1RegistrationPortType;
+import org.oasis.wsrp.v1.WSRPV1ServiceDescriptionPortType;
import org.oasis.wsrp.v2.WSRPV2MarkupPortType;
import org.oasis.wsrp.v2.WSRPV2PortletManagementPortType;
import org.oasis.wsrp.v2.WSRPV2RegistrationPortType;
@@ -49,9 +61,13 @@
private String wsdlDefinitionURL;
- 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 boolean isV2 = false;
+ private static final String WSRP_V1_URN =
"urn:oasis:names:tc:wsrp:v1:wsdl";
+ private final static QName V1_SERVICE = new QName(WSRP_V1_URN,
"WSRPService");
+ private static final String WSRP_V2_URN =
"urn:oasis:names:tc:wsrp:v2:wsdl";
+ private final static QName V2_SERVICE = new QName(WSRP_V2_URN,
"WSRPService");
+
private Map<Class, Object> services = new ConcurrentHashMap<Class,
Object>();
private String markupURL;
private String serviceDescriptionURL;
@@ -63,6 +79,8 @@
public <T> T getService(Class<T> clazz) throws Exception
{
+ // todo: clean up!
+
if (log.isDebugEnabled())
{
log.debug("Getting service for class " + clazz);
@@ -79,21 +97,25 @@
//
String portAddress = null;
boolean isMandatoryInterface = false;
- if (WSRPV2ServiceDescriptionPortType.class.isAssignableFrom(clazz))
+ if (WSRPV2ServiceDescriptionPortType.class.isAssignableFrom(clazz)
+ || WSRPV1ServiceDescriptionPortType.class.isAssignableFrom(clazz))
{
portAddress = serviceDescriptionURL;
isMandatoryInterface = true;
}
- else if (WSRPV2MarkupPortType.class.isAssignableFrom(clazz))
+ else if (WSRPV2MarkupPortType.class.isAssignableFrom(clazz)
+ || WSRPV1MarkupPortType.class.isAssignableFrom(clazz))
{
portAddress = markupURL;
isMandatoryInterface = true;
}
- else if (WSRPV2RegistrationPortType.class.isAssignableFrom(clazz))
+ else if (WSRPV2RegistrationPortType.class.isAssignableFrom(clazz)
+ || WSRPV1RegistrationPortType.class.isAssignableFrom(clazz))
{
portAddress = registrationURL;
}
- else if (WSRPV2PortletManagementPortType.class.isAssignableFrom(clazz))
+ else if (WSRPV2PortletManagementPortType.class.isAssignableFrom(clazz)
+ || WSRPV1PortletManagementPortType.class.isAssignableFrom(clazz))
{
portAddress = portletManagementURL;
}
@@ -199,26 +221,66 @@
ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(wsdlDefinitionURL,
"WSDL URL", "SOAPServiceFactory");
URI wsdlURL = new URI(wsdlDefinitionURL);
- Service service = Service.create(wsdlURL.toURL(), V2_SERVICE);
+ // try to get v2 of service if possible, first
+ Service service;
+ try
+ {
+ service = Service.create(wsdlURL.toURL(), V2_SERVICE);
- WSRPV2MarkupPortType markupPortType =
service.getPort(WSRPV2MarkupPortType.class);
- services.put(WSRPV2MarkupPortType.class, markupPortType);
- markupURL =
(String)((BindingProvider)markupPortType).getRequestContext().get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
+ WSRPV2MarkupPortType markupPortType =
service.getPort(WSRPV2MarkupPortType.class);
+ services.put(WSRPV2MarkupPortType.class, markupPortType);
+ markupURL =
(String)((BindingProvider)markupPortType).getRequestContext().get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
- WSRPV2ServiceDescriptionPortType sdPort =
service.getPort(WSRPV2ServiceDescriptionPortType.class);
- services.put(WSRPV2ServiceDescriptionPortType.class, sdPort);
- serviceDescriptionURL =
(String)((BindingProvider)sdPort).getRequestContext().get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
+ WSRPV2ServiceDescriptionPortType sdPort =
service.getPort(WSRPV2ServiceDescriptionPortType.class);
+ services.put(WSRPV2ServiceDescriptionPortType.class, sdPort);
+ serviceDescriptionURL =
(String)((BindingProvider)sdPort).getRequestContext().get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
- WSRPV2PortletManagementPortType managementPortType =
service.getPort(WSRPV2PortletManagementPortType.class);
- services.put(WSRPV2PortletManagementPortType.class, managementPortType);
- portletManagementURL =
(String)((BindingProvider)managementPortType).getRequestContext().get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
+ WSRPV2PortletManagementPortType managementPortType =
service.getPort(WSRPV2PortletManagementPortType.class);
+ services.put(WSRPV2PortletManagementPortType.class, managementPortType);
+ portletManagementURL =
(String)((BindingProvider)managementPortType).getRequestContext().get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
- WSRPV2RegistrationPortType registrationPortType =
service.getPort(WSRPV2RegistrationPortType.class);
- services.put(WSRPV2RegistrationPortType.class, registrationPortType);
- registrationURL =
(String)((BindingProvider)registrationPortType).getRequestContext().get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
+ WSRPV2RegistrationPortType registrationPortType =
service.getPort(WSRPV2RegistrationPortType.class);
+ services.put(WSRPV2RegistrationPortType.class, registrationPortType);
+ registrationURL =
(String)((BindingProvider)registrationPortType).getRequestContext().get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
- setFailed(false);
- setAvailable(true);
+ setFailed(false);
+ setAvailable(true);
+ isV2 = true;
+ }
+ catch (IllegalArgumentException e)
+ {
+ // if exception message contains both URNs, then it should mean that we only
have V1 service, so get that
+ // todo: we could allow user to choose what happens here instead of
proceeding automatically...
+ String message = e.getMessage();
+ if (message.contains(WSRP_V1_URN) && message.contains(WSRP_V2_URN))
+ {
+ service = Service.create(wsdlURL.toURL(), V1_SERVICE);
+
+ WSRPV1MarkupPortType markupPortType =
service.getPort(WSRPV1MarkupPortType.class);
+ services.put(WSRPV1MarkupPortType.class, markupPortType);
+ markupURL =
(String)((BindingProvider)markupPortType).getRequestContext().get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
+
+ WSRPV1ServiceDescriptionPortType sdPort =
service.getPort(WSRPV1ServiceDescriptionPortType.class);
+ services.put(WSRPV1ServiceDescriptionPortType.class, sdPort);
+ serviceDescriptionURL =
(String)((BindingProvider)sdPort).getRequestContext().get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
+
+ WSRPV1PortletManagementPortType managementPortType =
service.getPort(WSRPV1PortletManagementPortType.class);
+ services.put(WSRPV1PortletManagementPortType.class, managementPortType);
+ portletManagementURL =
(String)((BindingProvider)managementPortType).getRequestContext().get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
+
+ WSRPV1RegistrationPortType registrationPortType =
service.getPort(WSRPV1RegistrationPortType.class);
+ services.put(WSRPV1RegistrationPortType.class, registrationPortType);
+ registrationURL =
(String)((BindingProvider)registrationPortType).getRequestContext().get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
+
+ setFailed(false);
+ setAvailable(true);
+ isV2 = false;
+ }
+ else
+ {
+ throw new IllegalArgumentException("Couldn't find any WSRP
service in specified WSDL: " + wsdlDefinitionURL);
+ }
+ }
}
catch (MalformedURLException e)
{
@@ -233,4 +295,60 @@
throw e;
}
}
+
+ public ServiceDescriptionService getServiceDescriptionService() throws Exception
+ {
+ if (isV2)
+ {
+ WSRPV2ServiceDescriptionPortType port =
getService(WSRPV2ServiceDescriptionPortType.class);
+ return new V2ServiceDescriptionService(port);
+ }
+ else
+ {
+ WSRPV1ServiceDescriptionPortType port =
getService(WSRPV1ServiceDescriptionPortType.class);
+ return new V1ServiceDescriptionService(port);
+ }
+ }
+
+ public MarkupService getMarkupService() throws Exception
+ {
+ if (isV2)
+ {
+ WSRPV2MarkupPortType port = getService(WSRPV2MarkupPortType.class);
+ return new V2MarkupService(port);
+ }
+ else
+ {
+ WSRPV1MarkupPortType port = getService(WSRPV1MarkupPortType.class);
+ return new V1MarkupService(port);
+ }
+ }
+
+ public PortletManagementService getPortletManagementService() throws Exception
+ {
+ if (isV2)
+ {
+ WSRPV2PortletManagementPortType port =
getService(WSRPV2PortletManagementPortType.class);
+ return new V2PortletManagementService(port);
+ }
+ else
+ {
+ WSRPV1PortletManagementPortType port =
getService(WSRPV1PortletManagementPortType.class);
+ return new V1PortletManagementService(port);
+ }
+ }
+
+ public RegistrationService getRegistrationService() throws Exception
+ {
+ if (isV2)
+ {
+ WSRPV2RegistrationPortType port = getService(WSRPV2RegistrationPortType.class);
+ return new V2RegistrationService(port);
+ }
+ else
+ {
+ WSRPV1RegistrationPortType port = getService(WSRPV1RegistrationPortType.class);
+ return new V1RegistrationService(port);
+ }
+ }
}
Added:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/ServiceDescriptionService.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/ServiceDescriptionService.java
(rev 0)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/ServiceDescriptionService.java 2010-06-02
00:27:24 UTC (rev 3224)
@@ -0,0 +1,79 @@
+/*
+* 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.
+*/
+
+package org.gatein.wsrp.services;
+
+import org.oasis.wsrp.v2.CookieProtocol;
+import org.oasis.wsrp.v2.EventDescription;
+import org.oasis.wsrp.v2.ExportDescription;
+import org.oasis.wsrp.v2.Extension;
+import org.oasis.wsrp.v2.ExtensionDescription;
+import org.oasis.wsrp.v2.InvalidRegistration;
+import org.oasis.wsrp.v2.ItemDescription;
+import org.oasis.wsrp.v2.ModelDescription;
+import org.oasis.wsrp.v2.ModelTypes;
+import org.oasis.wsrp.v2.ModifyRegistrationRequired;
+import org.oasis.wsrp.v2.OperationFailed;
+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 org.oasis.wsrp.v2.WSRPV2ServiceDescriptionPortType;
+
+import javax.xml.ws.Holder;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ */
+public abstract class ServiceDescriptionService<T> extends WSRPService<T>
implements WSRPV2ServiceDescriptionPortType
+{
+ protected ServiceDescriptionService(T service)
+ {
+ super(service);
+ }
+
+ public abstract void getServiceDescription(
+ RegistrationContext registrationContext,
+ List<String> desiredLocales,
+ List<String> portletHandles,
+ UserContext userContext,
+ Holder<Boolean> requiresRegistration,
+ Holder<List<PortletDescription>> offeredPortlets,
+ Holder<List<ItemDescription>> userCategoryDescriptions,
+ Holder<List<ExtensionDescription>> extensionDescriptions,
+ Holder<List<ItemDescription>> customWindowStateDescriptions,
+ Holder<List<ItemDescription>> customModeDescriptions,
+ Holder<CookieProtocol> requiresInitCookie,
+ Holder<ModelDescription> registrationPropertyDescription,
+ Holder<List<String>> locales,
+ Holder<ResourceList> resourceList,
+ Holder<List<EventDescription>> eventDescriptions,
+ Holder<ModelTypes> schemaType,
+ Holder<List<String>> supportedOptions,
+ Holder<ExportDescription> exportDescription,
+ Holder<Boolean> mayReturnRegistrationState,
+ Holder<List<Extension>> extensions)
+ throws InvalidRegistration, ModifyRegistrationRequired, OperationFailed,
ResourceSuspended;
+}
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-06-02
00:12:02 UTC (rev 3223)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/ServiceFactory.java 2010-06-02
00:27:24 UTC (rev 3224)
@@ -69,4 +69,12 @@
void setWSOperationTimeOut(int msBeforeTimeOut);
int getWSOperationTimeOut();
+
+ ServiceDescriptionService getServiceDescriptionService() throws Exception;
+
+ MarkupService getMarkupService() throws Exception;
+
+ PortletManagementService getPortletManagementService() throws Exception;
+
+ RegistrationService getRegistrationService() throws Exception;
}
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/ServiceWrapper.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/ServiceWrapper.java 2010-06-02
00:12:02 UTC (rev 3223)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/ServiceWrapper.java 2010-06-02
00:27:24 UTC (rev 3224)
@@ -72,16 +72,18 @@
setTimeout(bindingProvider.getRequestContext(), parentFactory);
- Class tClass =
(Class)((ParameterizedType)getClass().getGenericSuperclass()).getActualTypeArguments()[0];
- if (tClass.isAssignableFrom(serviceClass))
+ checkAssigmentValidity(this, serviceClass);
+ this.service = (T)service;
+ this.parentFactory = parentFactory;
+ }
+
+ public static void checkAssigmentValidity(ServiceWrapper assignee, Class
expectedImplementedInterface)
+ {
+ Class tClass =
(Class)((ParameterizedType)assignee.getClass().getGenericSuperclass()).getActualTypeArguments()[0];
+ if (!tClass.isAssignableFrom(expectedImplementedInterface))
{
- this.service = (T)service;
+ throw new IllegalArgumentException(assignee + " is not an instance of
" + tClass.getSimpleName());
}
- else
- {
- throw new IllegalArgumentException(service + " is not an instance of "
+ tClass.getSimpleName());
- }
- this.parentFactory = parentFactory;
}
private static void setTimeout(Map<String, Object> requestContext,
ManageableServiceFactory parentFactory)
Added:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/WSRPService.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/WSRPService.java
(rev 0)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/WSRPService.java 2010-06-02
00:27:24 UTC (rev 3224)
@@ -0,0 +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.
+*/
+
+package org.gatein.wsrp.services;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ */
+public class WSRPService<T>
+{
+ protected T service;
+
+ public WSRPService(T service)
+ {
+ this.service = service;
+ }
+}
Added:
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
(rev 0)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1MarkupService.java 2010-06-02
00:27:24 UTC (rev 3224)
@@ -0,0 +1,109 @@
+/*
+* 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.
+*/
+
+package org.gatein.wsrp.services.v1;
+
+import org.gatein.common.NotYetImplemented;
+import org.gatein.wsrp.services.MarkupService;
+import org.oasis.wsrp.v1.WSRPV1MarkupPortType;
+import org.oasis.wsrp.v2.AccessDenied;
+import org.oasis.wsrp.v2.EventParams;
+import org.oasis.wsrp.v2.Extension;
+import org.oasis.wsrp.v2.HandleEventsFailed;
+import org.oasis.wsrp.v2.InconsistentParameters;
+import org.oasis.wsrp.v2.InteractionParams;
+import org.oasis.wsrp.v2.InvalidCookie;
+import org.oasis.wsrp.v2.InvalidHandle;
+import org.oasis.wsrp.v2.InvalidRegistration;
+import org.oasis.wsrp.v2.InvalidSession;
+import org.oasis.wsrp.v2.InvalidUserCategory;
+import org.oasis.wsrp.v2.MarkupContext;
+import org.oasis.wsrp.v2.MarkupParams;
+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.PortletStateChangeRequired;
+import org.oasis.wsrp.v2.RegistrationContext;
+import org.oasis.wsrp.v2.ResourceContext;
+import org.oasis.wsrp.v2.ResourceParams;
+import org.oasis.wsrp.v2.ResourceSuspended;
+import org.oasis.wsrp.v2.RuntimeContext;
+import org.oasis.wsrp.v2.SessionContext;
+import org.oasis.wsrp.v2.UnsupportedLocale;
+import org.oasis.wsrp.v2.UnsupportedMimeType;
+import org.oasis.wsrp.v2.UnsupportedMode;
+import org.oasis.wsrp.v2.UnsupportedWindowState;
+import org.oasis.wsrp.v2.UpdateResponse;
+import org.oasis.wsrp.v2.UserContext;
+
+import javax.xml.ws.Holder;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ */
+public class V1MarkupService extends MarkupService<WSRPV1MarkupPortType>
+{
+ public V1MarkupService(WSRPV1MarkupPortType port)
+ {
+ super(port);
+ }
+
+ @Override
+ public void getMarkup(RegistrationContext registrationContext, PortletContext
portletContext, RuntimeContext runtimeContext, UserContext userContext, MarkupParams
markupParams, Holder<MarkupContext> markupContext, Holder<SessionContext>
sessionContext, Holder<List<Extension>> extensions) throws AccessDenied,
InconsistentParameters, InvalidCookie, InvalidHandle, InvalidRegistration, InvalidSession,
InvalidUserCategory, MissingParameters, ModifyRegistrationRequired, OperationFailed,
ResourceSuspended, UnsupportedLocale, UnsupportedMimeType, UnsupportedMode,
UnsupportedWindowState
+ {
+ throw new NotYetImplemented();
+ }
+
+ @Override
+ public void getResource(RegistrationContext registrationContext,
Holder<PortletContext> portletContext, RuntimeContext runtimeContext, UserContext
userContext, ResourceParams resourceParams, Holder<ResourceContext> resourceContext,
Holder<SessionContext> sessionContext, Holder<List<Extension>>
extensions) throws AccessDenied, InconsistentParameters, InvalidCookie, InvalidHandle,
InvalidRegistration, InvalidSession, InvalidUserCategory, MissingParameters,
ModifyRegistrationRequired, OperationFailed, OperationNotSupported, ResourceSuspended,
UnsupportedLocale, UnsupportedMimeType, UnsupportedMode, UnsupportedWindowState
+ {
+ throw new NotYetImplemented();
+ }
+
+ @Override
+ public void performBlockingInteraction(RegistrationContext registrationContext,
PortletContext portletContext, RuntimeContext runtimeContext, UserContext userContext,
MarkupParams markupParams, InteractionParams interactionParams,
Holder<UpdateResponse> updateResponse, Holder<String> redirectURL,
Holder<List<Extension>> extensions) throws AccessDenied,
InconsistentParameters, InvalidCookie, InvalidHandle, InvalidRegistration, InvalidSession,
InvalidUserCategory, MissingParameters, ModifyRegistrationRequired, OperationFailed,
PortletStateChangeRequired, ResourceSuspended, UnsupportedLocale, UnsupportedMimeType,
UnsupportedMode, UnsupportedWindowState
+ {
+ throw new NotYetImplemented();
+ }
+
+ @Override
+ public void handleEvents(RegistrationContext registrationContext, PortletContext
portletContext, RuntimeContext runtimeContext, UserContext userContext, MarkupParams
markupParams, EventParams eventParams, Holder<UpdateResponse> updateResponse,
Holder<List<HandleEventsFailed>> failedEvents,
Holder<List<Extension>> extensions) throws AccessDenied,
InconsistentParameters, InvalidCookie, InvalidHandle, InvalidRegistration, InvalidSession,
InvalidUserCategory, MissingParameters, ModifyRegistrationRequired, OperationFailed,
OperationNotSupported, PortletStateChangeRequired, ResourceSuspended, UnsupportedLocale,
UnsupportedMimeType, UnsupportedMode, UnsupportedWindowState
+ {
+ throw new NotYetImplemented();
+ }
+
+ @Override
+ public List<Extension> releaseSessions(RegistrationContext registrationContext,
List<String> sessionIDs, UserContext userContext) throws AccessDenied,
InvalidRegistration, MissingParameters, ModifyRegistrationRequired, OperationFailed,
OperationNotSupported, ResourceSuspended
+ {
+ throw new NotYetImplemented();
+ }
+
+ @Override
+ public List<Extension> initCookie(RegistrationContext registrationContext,
UserContext userContext) throws AccessDenied, InvalidRegistration,
ModifyRegistrationRequired, OperationFailed, OperationNotSupported, ResourceSuspended
+ {
+ throw new NotYetImplemented();
+ }
+}
Added:
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
(rev 0)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1PortletManagementService.java 2010-06-02
00:27:24 UTC (rev 3224)
@@ -0,0 +1,151 @@
+/*
+* 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.
+*/
+
+package org.gatein.wsrp.services.v1;
+
+import org.gatein.common.NotYetImplemented;
+import org.gatein.wsrp.services.PortletManagementService;
+import org.oasis.wsrp.v1.WSRPV1PortletManagementPortType;
+import org.oasis.wsrp.v2.AccessDenied;
+import org.oasis.wsrp.v2.CopiedPortlet;
+import org.oasis.wsrp.v2.ExportByValueNotSupported;
+import org.oasis.wsrp.v2.ExportNoLongerValid;
+import org.oasis.wsrp.v2.ExportedPortlet;
+import org.oasis.wsrp.v2.Extension;
+import org.oasis.wsrp.v2.FailedPortlets;
+import org.oasis.wsrp.v2.ImportPortlet;
+import org.oasis.wsrp.v2.ImportPortletsFailed;
+import org.oasis.wsrp.v2.ImportedPortlet;
+import org.oasis.wsrp.v2.InconsistentParameters;
+import org.oasis.wsrp.v2.InvalidHandle;
+import org.oasis.wsrp.v2.InvalidRegistration;
+import org.oasis.wsrp.v2.InvalidUserCategory;
+import org.oasis.wsrp.v2.Lifetime;
+import org.oasis.wsrp.v2.MissingParameters;
+import org.oasis.wsrp.v2.ModelDescription;
+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.PortletLifetime;
+import org.oasis.wsrp.v2.Property;
+import org.oasis.wsrp.v2.PropertyList;
+import org.oasis.wsrp.v2.RegistrationContext;
+import org.oasis.wsrp.v2.ResetProperty;
+import org.oasis.wsrp.v2.ResourceList;
+import org.oasis.wsrp.v2.ResourceSuspended;
+import org.oasis.wsrp.v2.SetExportLifetime;
+import org.oasis.wsrp.v2.UserContext;
+
+import javax.xml.ws.Holder;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ */
+public class V1PortletManagementService extends
PortletManagementService<WSRPV1PortletManagementPortType>
+{
+ public V1PortletManagementService(WSRPV1PortletManagementPortType port)
+ {
+ super(port);
+ }
+
+ @Override
+ public void getPortletDescription(RegistrationContext registrationContext,
PortletContext portletContext, UserContext userContext, List<String> desiredLocales,
Holder<PortletDescription> portletDescription, Holder<ResourceList>
resourceList, Holder<List<Extension>> extensions) throws AccessDenied,
InconsistentParameters, InvalidHandle, InvalidRegistration, InvalidUserCategory,
MissingParameters, ModifyRegistrationRequired, OperationFailed, OperationNotSupported,
ResourceSuspended
+ {
+ throw new NotYetImplemented();
+ }
+
+ @Override
+ public void clonePortlet(RegistrationContext registrationContext, PortletContext
portletContext, UserContext userContext, Lifetime lifetime, Holder<String>
portletHandle, Holder<byte[]> portletState, Holder<Lifetime>
scheduledDestruction, Holder<List<Extension>> extensions) throws AccessDenied,
InconsistentParameters, InvalidHandle, InvalidRegistration, InvalidUserCategory,
MissingParameters, ModifyRegistrationRequired, OperationFailed, OperationNotSupported,
ResourceSuspended
+ {
+ throw new NotYetImplemented();
+ }
+
+ @Override
+ public void destroyPortlets(RegistrationContext registrationContext,
List<String> portletHandles, UserContext userContext,
Holder<List<FailedPortlets>> failedPortlets,
Holder<List<Extension>> extensions) throws InconsistentParameters,
InvalidRegistration, MissingParameters, ModifyRegistrationRequired, OperationFailed,
OperationNotSupported, ResourceSuspended
+ {
+ throw new NotYetImplemented();
+ }
+
+ @Override
+ public void getPortletsLifetime(RegistrationContext registrationContext,
List<PortletContext> portletContext, UserContext userContext,
Holder<List<PortletLifetime>> portletLifetime,
Holder<List<FailedPortlets>> failedPortlets, Holder<ResourceList>
resourceList, Holder<List<Extension>> extensions) throws AccessDenied,
InconsistentParameters, InvalidHandle, InvalidRegistration, ModifyRegistrationRequired,
OperationFailed, OperationNotSupported, ResourceSuspended
+ {
+ throw new NotYetImplemented();
+ }
+
+ @Override
+ public void setPortletsLifetime(RegistrationContext registrationContext,
List<PortletContext> portletContext, UserContext userContext, Lifetime lifetime,
Holder<List<PortletLifetime>> updatedPortlet,
Holder<List<FailedPortlets>> failedPortlets, Holder<ResourceList>
resourceList, Holder<List<Extension>> extensions) throws AccessDenied,
InconsistentParameters, InvalidHandle, InvalidRegistration, ModifyRegistrationRequired,
OperationFailed, OperationNotSupported, ResourceSuspended
+ {
+ throw new NotYetImplemented();
+ }
+
+ @Override
+ public void copyPortlets(RegistrationContext toRegistrationContext, UserContext
toUserContext, RegistrationContext fromRegistrationContext, UserContext fromUserContext,
List<PortletContext> fromPortletContexts, Lifetime lifetime,
Holder<List<CopiedPortlet>> copiedPortlets,
Holder<List<FailedPortlets>> failedPortlets, Holder<ResourceList>
resourceList, Holder<List<Extension>> extensions) throws AccessDenied,
InconsistentParameters, InvalidHandle, InvalidRegistration, InvalidUserCategory,
MissingParameters, ModifyRegistrationRequired, OperationFailed, OperationNotSupported,
ResourceSuspended
+ {
+ throw new NotYetImplemented();
+ }
+
+ @Override
+ public void exportPortlets(RegistrationContext registrationContext,
List<PortletContext> portletContext, UserContext userContext, Holder<Lifetime>
lifetime, Boolean exportByValueRequired, Holder<byte[]> exportContext,
Holder<List<ExportedPortlet>> exportedPortlet,
Holder<List<FailedPortlets>> failedPortlets, Holder<ResourceList>
resourceList, Holder<List<Extension>> extensions) throws AccessDenied,
ExportByValueNotSupported, InconsistentParameters, InvalidHandle, InvalidRegistration,
InvalidUserCategory, MissingParameters, ModifyRegistrationRequired, OperationFailed,
OperationNotSupported, ResourceSuspended
+ {
+ throw new NotYetImplemented();
+ }
+
+ @Override
+ public void importPortlets(RegistrationContext registrationContext, byte[]
importContext, List<ImportPortlet> importPortlet, UserContext userContext, Lifetime
lifetime, Holder<List<ImportedPortlet>> importedPortlets,
Holder<List<ImportPortletsFailed>> importFailed, Holder<ResourceList>
resourceList, Holder<List<Extension>> extensions) throws AccessDenied,
ExportNoLongerValid, InconsistentParameters, InvalidRegistration, InvalidUserCategory,
MissingParameters, ModifyRegistrationRequired, OperationFailed, OperationNotSupported,
ResourceSuspended
+ {
+ throw new NotYetImplemented();
+ }
+
+ @Override
+ public List<Extension> releaseExport(RegistrationContext registrationContext,
byte[] exportContext, UserContext userContext)
+ {
+ throw new NotYetImplemented();
+ }
+
+ @Override
+ public Lifetime setExportLifetime(SetExportLifetime setExportLifetime) throws
AccessDenied, InvalidHandle, InvalidRegistration, ModifyRegistrationRequired,
OperationFailed, OperationNotSupported, ResourceSuspended
+ {
+ throw new NotYetImplemented();
+ }
+
+ @Override
+ public void setPortletProperties(RegistrationContext registrationContext,
PortletContext portletContext, UserContext userContext, PropertyList propertyList,
Holder<String> portletHandle, Holder<byte[]> portletState,
Holder<Lifetime> scheduledDestruction, Holder<List<Extension>>
extensions) throws AccessDenied, InconsistentParameters, InvalidHandle,
InvalidRegistration, InvalidUserCategory, MissingParameters, ModifyRegistrationRequired,
OperationFailed, OperationNotSupported, ResourceSuspended
+ {
+ throw new NotYetImplemented();
+ }
+
+ @Override
+ public void getPortletProperties(RegistrationContext registrationContext,
PortletContext portletContext, UserContext userContext, List<String> names,
Holder<List<Property>> properties, Holder<List<ResetProperty>>
resetProperties, Holder<List<Extension>> extensions) throws AccessDenied,
InconsistentParameters, InvalidHandle, InvalidRegistration, InvalidUserCategory,
MissingParameters, ModifyRegistrationRequired, OperationFailed, OperationNotSupported,
ResourceSuspended
+ {
+ throw new NotYetImplemented();
+ }
+
+ @Override
+ public void getPortletPropertyDescription(RegistrationContext registrationContext,
PortletContext portletContext, UserContext userContext, List<String> desiredLocales,
Holder<ModelDescription> modelDescription, Holder<ResourceList> resourceList,
Holder<List<Extension>> extensions) throws AccessDenied,
InconsistentParameters, InvalidHandle, InvalidRegistration, InvalidUserCategory,
MissingParameters, ModifyRegistrationRequired, OperationFailed, OperationNotSupported,
ResourceSuspended
+ {
+ throw new NotYetImplemented();
+ }
+}
Added:
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
(rev 0)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1RegistrationService.java 2010-06-02
00:27:24 UTC (rev 3224)
@@ -0,0 +1,87 @@
+/*
+* 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.
+*/
+
+package org.gatein.wsrp.services.v1;
+
+import org.gatein.common.NotYetImplemented;
+import org.gatein.wsrp.services.RegistrationService;
+import org.oasis.wsrp.v1.WSRPV1RegistrationPortType;
+import org.oasis.wsrp.v2.AccessDenied;
+import org.oasis.wsrp.v2.Extension;
+import org.oasis.wsrp.v2.GetRegistrationLifetime;
+import org.oasis.wsrp.v2.InvalidHandle;
+import org.oasis.wsrp.v2.InvalidRegistration;
+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.OperationNotSupported;
+import org.oasis.wsrp.v2.RegistrationContext;
+import org.oasis.wsrp.v2.RegistrationData;
+import org.oasis.wsrp.v2.ResourceSuspended;
+import org.oasis.wsrp.v2.SetRegistrationLifetime;
+import org.oasis.wsrp.v2.UserContext;
+
+import javax.xml.ws.Holder;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ */
+public class V1RegistrationService extends
RegistrationService<WSRPV1RegistrationPortType>
+{
+ public V1RegistrationService(WSRPV1RegistrationPortType service)
+ {
+ super(service);
+ }
+
+ @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();
+ }
+
+ @Override
+ public List<Extension> deregister(RegistrationContext registrationContext,
UserContext userContext) throws InvalidRegistration, OperationFailed,
OperationNotSupported, ResourceSuspended
+ {
+ throw new NotYetImplemented();
+ }
+
+ @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();
+ }
+
+ @Override
+ public Lifetime getRegistrationLifetime(GetRegistrationLifetime
getRegistrationLifetime) throws AccessDenied, InvalidHandle, InvalidRegistration,
ModifyRegistrationRequired, OperationFailed, OperationNotSupported, ResourceSuspended
+ {
+ throw new NotYetImplemented();
+ }
+
+ @Override
+ public Lifetime setRegistrationLifetime(SetRegistrationLifetime
setRegistrationLifetime) throws AccessDenied, InvalidHandle, InvalidRegistration,
ModifyRegistrationRequired, OperationFailed, OperationNotSupported, ResourceSuspended
+ {
+ throw new NotYetImplemented();
+ }
+}
Added:
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
(rev 0)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v1/V1ServiceDescriptionService.java 2010-06-02
00:27:24 UTC (rev 3224)
@@ -0,0 +1,78 @@
+/*
+* 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.
+*/
+
+package org.gatein.wsrp.services.v1;
+
+import org.gatein.common.NotYetImplemented;
+import org.gatein.wsrp.services.ServiceDescriptionService;
+import org.oasis.wsrp.v1.WSRPV1ServiceDescriptionPortType;
+import org.oasis.wsrp.v2.CookieProtocol;
+import org.oasis.wsrp.v2.EventDescription;
+import org.oasis.wsrp.v2.ExportDescription;
+import org.oasis.wsrp.v2.Extension;
+import org.oasis.wsrp.v2.ExtensionDescription;
+import org.oasis.wsrp.v2.InvalidRegistration;
+import org.oasis.wsrp.v2.ItemDescription;
+import org.oasis.wsrp.v2.ModelDescription;
+import org.oasis.wsrp.v2.ModelTypes;
+import org.oasis.wsrp.v2.ModifyRegistrationRequired;
+import org.oasis.wsrp.v2.OperationFailed;
+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.xml.ws.Holder;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ */
+public class V1ServiceDescriptionService extends
ServiceDescriptionService<WSRPV1ServiceDescriptionPortType>
+{
+ public V1ServiceDescriptionService(WSRPV1ServiceDescriptionPortType port)
+ {
+ super(port);
+ }
+
+ @Override
+ public void getServiceDescription(
+ RegistrationContext registrationContext, List<String> desiredLocales,
List<String> portletHandles,
+ UserContext userContext, Holder<Boolean> requiresRegistration,
Holder<List<PortletDescription>> offeredPortlets,
+ Holder<List<ItemDescription>> userCategoryDescriptions,
Holder<List<ExtensionDescription>> extensionDescriptions,
+ Holder<List<ItemDescription>> customWindowStateDescriptions,
Holder<List<ItemDescription>> customModeDescriptions,
+ Holder<CookieProtocol> requiresInitCookie, Holder<ModelDescription>
registrationPropertyDescription,
+ Holder<List<String>> locales, Holder<ResourceList> resourceList,
Holder<List<EventDescription>> eventDescriptions,
+ Holder<ModelTypes> schemaType, Holder<List<String>>
supportedOptions, Holder<ExportDescription> exportDescription,
+ Holder<Boolean> mayReturnRegistrationState,
Holder<List<Extension>> extensions)
+ throws InvalidRegistration, ModifyRegistrationRequired, OperationFailed,
ResourceSuspended
+ {
+ throw new NotYetImplemented();
+ /*service.getServiceDescription(registrationContext, desiredLocales,
portletHandles, userContext,
+ requiresRegistration, offeredPortlets, userCategoryDescriptions,
extensionDescriptions,
+ customWindowStateDescriptions, customModeDescriptions, requiresInitCookie,
registrationPropertyDescription,
+ locales, resourceList, eventDescriptions, schemaType, supportedOptions,
exportDescription,
+ mayReturnRegistrationState, extensions);*/
+ }
+}
Added:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v2/V2MarkupService.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v2/V2MarkupService.java
(rev 0)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v2/V2MarkupService.java 2010-06-02
00:27:24 UTC (rev 3224)
@@ -0,0 +1,133 @@
+/*
+* 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.
+*/
+
+package org.gatein.wsrp.services.v2;
+
+import org.gatein.common.NotYetImplemented;
+import org.gatein.wsrp.services.MarkupService;
+import org.oasis.wsrp.v2.AccessDenied;
+import org.oasis.wsrp.v2.EventParams;
+import org.oasis.wsrp.v2.Extension;
+import org.oasis.wsrp.v2.HandleEventsFailed;
+import org.oasis.wsrp.v2.InconsistentParameters;
+import org.oasis.wsrp.v2.InteractionParams;
+import org.oasis.wsrp.v2.InvalidCookie;
+import org.oasis.wsrp.v2.InvalidHandle;
+import org.oasis.wsrp.v2.InvalidRegistration;
+import org.oasis.wsrp.v2.InvalidSession;
+import org.oasis.wsrp.v2.InvalidUserCategory;
+import org.oasis.wsrp.v2.MarkupContext;
+import org.oasis.wsrp.v2.MarkupParams;
+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.PortletStateChangeRequired;
+import org.oasis.wsrp.v2.RegistrationContext;
+import org.oasis.wsrp.v2.ResourceContext;
+import org.oasis.wsrp.v2.ResourceParams;
+import org.oasis.wsrp.v2.ResourceSuspended;
+import org.oasis.wsrp.v2.RuntimeContext;
+import org.oasis.wsrp.v2.SessionContext;
+import org.oasis.wsrp.v2.UnsupportedLocale;
+import org.oasis.wsrp.v2.UnsupportedMimeType;
+import org.oasis.wsrp.v2.UnsupportedMode;
+import org.oasis.wsrp.v2.UnsupportedWindowState;
+import org.oasis.wsrp.v2.UpdateResponse;
+import org.oasis.wsrp.v2.UserContext;
+import org.oasis.wsrp.v2.WSRPV2MarkupPortType;
+
+import javax.xml.ws.Holder;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ */
+public class V2MarkupService extends MarkupService<WSRPV2MarkupPortType>
+{
+ public V2MarkupService(WSRPV2MarkupPortType port)
+ {
+ super(port);
+ }
+
+ @Override
+ public void getMarkup(RegistrationContext registrationContext, PortletContext
portletContext, RuntimeContext runtimeContext, UserContext userContext, MarkupParams
markupParams, Holder<MarkupContext> markupContext, Holder<SessionContext>
sessionContext, Holder<List<Extension>> extensions) throws AccessDenied,
InconsistentParameters, InvalidCookie, InvalidHandle, InvalidRegistration, InvalidSession,
InvalidUserCategory, MissingParameters, ModifyRegistrationRequired, OperationFailed,
ResourceSuspended, UnsupportedLocale, UnsupportedMimeType, UnsupportedMode,
UnsupportedWindowState
+ {
+ service.getMarkup(registrationContext, portletContext, runtimeContext, userContext,
markupParams, markupContext, sessionContext, extensions);
+ }
+
+ @Override
+ public void getResource(RegistrationContext registrationContext,
Holder<PortletContext> portletContext, RuntimeContext runtimeContext, UserContext
userContext, ResourceParams resourceParams, Holder<ResourceContext> resourceContext,
Holder<SessionContext> sessionContext, Holder<List<Extension>>
extensions) throws AccessDenied, InconsistentParameters, InvalidCookie, InvalidHandle,
InvalidRegistration, InvalidSession, InvalidUserCategory, MissingParameters,
ModifyRegistrationRequired, OperationFailed, OperationNotSupported, ResourceSuspended,
UnsupportedLocale, UnsupportedMimeType, UnsupportedMode, UnsupportedWindowState
+ {
+ throw new NotYetImplemented();
+ }
+
+ @Override
+ public void performBlockingInteraction(RegistrationContext registrationContext,
PortletContext portletContext, RuntimeContext runtimeContext, UserContext userContext,
MarkupParams markupParams, InteractionParams interactionParams,
Holder<UpdateResponse> updateResponse, Holder<String> redirectURL,
Holder<List<Extension>> extensions) throws AccessDenied,
InconsistentParameters, InvalidCookie, InvalidHandle, InvalidRegistration, InvalidSession,
InvalidUserCategory, MissingParameters, ModifyRegistrationRequired, OperationFailed,
PortletStateChangeRequired, ResourceSuspended, UnsupportedLocale, UnsupportedMimeType,
UnsupportedMode, UnsupportedWindowState
+ {
+ service.performBlockingInteraction(registrationContext, portletContext,
runtimeContext, userContext, markupParams, interactionParams, updateResponse, redirectURL,
extensions);
+ }
+
+ @Override
+ public void handleEvents(RegistrationContext registrationContext, PortletContext
portletContext, RuntimeContext runtimeContext, UserContext userContext, MarkupParams
markupParams, EventParams eventParams, Holder<UpdateResponse> updateResponse,
Holder<List<HandleEventsFailed>> failedEvents,
Holder<List<Extension>> extensions) throws AccessDenied,
InconsistentParameters, InvalidCookie, InvalidHandle, InvalidRegistration, InvalidSession,
InvalidUserCategory, MissingParameters, ModifyRegistrationRequired, OperationFailed,
OperationNotSupported, PortletStateChangeRequired, ResourceSuspended, UnsupportedLocale,
UnsupportedMimeType, UnsupportedMode, UnsupportedWindowState
+ {
+ throw new NotYetImplemented();
+ }
+
+ @Override
+ public List<Extension> releaseSessions(RegistrationContext registrationContext,
List<String> sessionIDs, UserContext userContext) throws AccessDenied,
InvalidRegistration, MissingParameters, ModifyRegistrationRequired, OperationFailed,
OperationNotSupported, ResourceSuspended
+ {
+ return service.releaseSessions(registrationContext, sessionIDs, userContext);
+ }
+
+ @Override
+ public List<Extension> initCookie(RegistrationContext registrationContext,
UserContext userContext) throws AccessDenied, InvalidRegistration,
ModifyRegistrationRequired, OperationFailed, OperationNotSupported, ResourceSuspended
+ {
+ return service.initCookie(registrationContext, userContext);
+ }
+
+ /*@Override
+ public void performBlockingInteraction(RegistrationContext registrationContext,
PortletContext portletContext, RuntimeContext runtimeContext, UserContext userContext,
MarkupParams markupParams, InteractionParams interactionParams,
Holder<UpdateResponse> updateResponseHolder, Holder<String> redirectURL,
Holder<List<Extension>> listHolder) throws InvalidCookie, MissingParameters,
InvalidSession, UnsupportedWindowState, InconsistentParameters, InvalidUserCategory,
InvalidRegistration, OperationFailed, PortletStateChangeRequired, UnsupportedMode,
InvalidHandle, ResourceSuspended, UnsupportedMimeType, ModifyRegistrationRequired,
AccessDenied, UnsupportedLocale
+ {
+ service.performBlockingInteraction(registrationContext, portletContext,
runtimeContext, userContext, markupParams, interactionParams, updateResponseHolder,
redirectURL, listHolder);
+ }
+
+ @Override
+ public void getMarkup(RegistrationContext registrationContext, PortletContext
portletContext, RuntimeContext runtimeContext, UserContext userContext, MarkupParams
markupParams, Holder<MarkupContext> markupContextHolder,
Holder<SessionContext> sessionContextHolder, Holder<List<Extension>>
listHolder) throws InvalidCookie, MissingParameters, InvalidSession,
UnsupportedWindowState, InconsistentParameters, InvalidUserCategory, InvalidRegistration,
OperationFailed, UnsupportedMode, InvalidHandle, ResourceSuspended, UnsupportedMimeType,
ModifyRegistrationRequired, AccessDenied, UnsupportedLocale
+ {
+ service.getMarkup(registrationContext, portletContext, runtimeContext, userContext,
markupParams, markupContextHolder, sessionContextHolder, listHolder);
+ }
+
+ @Override
+ public void initCookie(RegistrationContext registrationContext, UserContext
userContext) throws OperationFailed, ResourceSuspended, OperationNotSupported,
AccessDenied, ModifyRegistrationRequired, InvalidRegistration
+ {
+ service.initCookie(registrationContext, userContext);
+ }
+
+ @Override
+ public void releaseSessions(RegistrationContext registrationContext,
List<String> idsToRelease, UserContext userContext) throws OperationFailed,
ResourceSuspended, MissingParameters, OperationNotSupported, AccessDenied,
ModifyRegistrationRequired, InvalidRegistration
+ {
+ service.releaseSessions(registrationContext, idsToRelease, userContext);
+ }*/
+}
Added:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v2/V2PortletManagementService.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v2/V2PortletManagementService.java
(rev 0)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v2/V2PortletManagementService.java 2010-06-02
00:27:24 UTC (rev 3224)
@@ -0,0 +1,150 @@
+/*
+* 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.
+*/
+
+package org.gatein.wsrp.services.v2;
+
+import org.gatein.wsrp.services.PortletManagementService;
+import org.oasis.wsrp.v2.AccessDenied;
+import org.oasis.wsrp.v2.CopiedPortlet;
+import org.oasis.wsrp.v2.ExportByValueNotSupported;
+import org.oasis.wsrp.v2.ExportNoLongerValid;
+import org.oasis.wsrp.v2.ExportedPortlet;
+import org.oasis.wsrp.v2.Extension;
+import org.oasis.wsrp.v2.FailedPortlets;
+import org.oasis.wsrp.v2.ImportPortlet;
+import org.oasis.wsrp.v2.ImportPortletsFailed;
+import org.oasis.wsrp.v2.ImportedPortlet;
+import org.oasis.wsrp.v2.InconsistentParameters;
+import org.oasis.wsrp.v2.InvalidHandle;
+import org.oasis.wsrp.v2.InvalidRegistration;
+import org.oasis.wsrp.v2.InvalidUserCategory;
+import org.oasis.wsrp.v2.Lifetime;
+import org.oasis.wsrp.v2.MissingParameters;
+import org.oasis.wsrp.v2.ModelDescription;
+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.PortletLifetime;
+import org.oasis.wsrp.v2.Property;
+import org.oasis.wsrp.v2.PropertyList;
+import org.oasis.wsrp.v2.RegistrationContext;
+import org.oasis.wsrp.v2.ResetProperty;
+import org.oasis.wsrp.v2.ResourceList;
+import org.oasis.wsrp.v2.ResourceSuspended;
+import org.oasis.wsrp.v2.SetExportLifetime;
+import org.oasis.wsrp.v2.UserContext;
+import org.oasis.wsrp.v2.WSRPV2PortletManagementPortType;
+
+import javax.xml.ws.Holder;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ */
+public class V2PortletManagementService extends
PortletManagementService<WSRPV2PortletManagementPortType>
+{
+ public V2PortletManagementService(WSRPV2PortletManagementPortType port)
+ {
+ super(port);
+ }
+
+ @Override
+ public void getPortletDescription(RegistrationContext registrationContext,
PortletContext portletContext, UserContext userContext, List<String> desiredLocales,
Holder<PortletDescription> portletDescription, Holder<ResourceList>
resourceList, Holder<List<Extension>> extensions) throws AccessDenied,
InconsistentParameters, InvalidHandle, InvalidRegistration, InvalidUserCategory,
MissingParameters, ModifyRegistrationRequired, OperationFailed, OperationNotSupported,
ResourceSuspended
+ {
+ service.getPortletDescription(registrationContext, portletContext, userContext,
desiredLocales, portletDescription, resourceList, extensions);
+ }
+
+ @Override
+ public void clonePortlet(RegistrationContext registrationContext, PortletContext
portletContext, UserContext userContext, Lifetime lifetime, Holder<String>
portletHandle, Holder<byte[]> portletState, Holder<Lifetime>
scheduledDestruction, Holder<List<Extension>> extensions) throws AccessDenied,
InconsistentParameters, InvalidHandle, InvalidRegistration, InvalidUserCategory,
MissingParameters, ModifyRegistrationRequired, OperationFailed, OperationNotSupported,
ResourceSuspended
+ {
+ service.clonePortlet(registrationContext, portletContext, userContext, lifetime,
portletHandle, portletState, scheduledDestruction, extensions);
+ }
+
+ @Override
+ public void destroyPortlets(RegistrationContext registrationContext,
List<String> portletHandles, UserContext userContext,
Holder<List<FailedPortlets>> failedPortlets,
Holder<List<Extension>> extensions) throws InconsistentParameters,
InvalidRegistration, MissingParameters, ModifyRegistrationRequired, OperationFailed,
OperationNotSupported, ResourceSuspended
+ {
+ service.destroyPortlets(registrationContext, portletHandles, userContext,
failedPortlets, extensions);
+ }
+
+ @Override
+ public void getPortletsLifetime(RegistrationContext registrationContext,
List<PortletContext> portletContext, UserContext userContext,
Holder<List<PortletLifetime>> portletLifetime,
Holder<List<FailedPortlets>> failedPortlets, Holder<ResourceList>
resourceList, Holder<List<Extension>> extensions) throws AccessDenied,
InconsistentParameters, InvalidHandle, InvalidRegistration, ModifyRegistrationRequired,
OperationFailed, OperationNotSupported, ResourceSuspended
+ {
+ service.getPortletsLifetime(registrationContext, portletContext, userContext,
portletLifetime, failedPortlets, resourceList, extensions);
+ }
+
+ @Override
+ public void setPortletsLifetime(RegistrationContext registrationContext,
List<PortletContext> portletContext, UserContext userContext, Lifetime lifetime,
Holder<List<PortletLifetime>> updatedPortlet,
Holder<List<FailedPortlets>> failedPortlets, Holder<ResourceList>
resourceList, Holder<List<Extension>> extensions) throws AccessDenied,
InconsistentParameters, InvalidHandle, InvalidRegistration, ModifyRegistrationRequired,
OperationFailed, OperationNotSupported, ResourceSuspended
+ {
+ service.setPortletsLifetime(registrationContext, portletContext, userContext,
lifetime, updatedPortlet, failedPortlets, resourceList, extensions);
+ }
+
+ @Override
+ public void copyPortlets(RegistrationContext toRegistrationContext, UserContext
toUserContext, RegistrationContext fromRegistrationContext, UserContext fromUserContext,
List<PortletContext> fromPortletContexts, Lifetime lifetime,
Holder<List<CopiedPortlet>> copiedPortlets,
Holder<List<FailedPortlets>> failedPortlets, Holder<ResourceList>
resourceList, Holder<List<Extension>> extensions) throws AccessDenied,
InconsistentParameters, InvalidHandle, InvalidRegistration, InvalidUserCategory,
MissingParameters, ModifyRegistrationRequired, OperationFailed, OperationNotSupported,
ResourceSuspended
+ {
+ service.copyPortlets(toRegistrationContext, toUserContext, fromRegistrationContext,
fromUserContext, fromPortletContexts, lifetime, copiedPortlets, failedPortlets,
resourceList, extensions);
+ }
+
+ @Override
+ public void exportPortlets(RegistrationContext registrationContext,
List<PortletContext> portletContext, UserContext userContext, Holder<Lifetime>
lifetime, Boolean exportByValueRequired, Holder<byte[]> exportContext,
Holder<List<ExportedPortlet>> exportedPortlet,
Holder<List<FailedPortlets>> failedPortlets, Holder<ResourceList>
resourceList, Holder<List<Extension>> extensions) throws AccessDenied,
ExportByValueNotSupported, InconsistentParameters, InvalidHandle, InvalidRegistration,
InvalidUserCategory, MissingParameters, ModifyRegistrationRequired, OperationFailed,
OperationNotSupported, ResourceSuspended
+ {
+ service.exportPortlets(registrationContext, portletContext, userContext, lifetime,
exportByValueRequired, exportContext, exportedPortlet, failedPortlets, resourceList,
extensions);
+ }
+
+ @Override
+ public void importPortlets(RegistrationContext registrationContext, byte[]
importContext, List<ImportPortlet> importPortlet, UserContext userContext, Lifetime
lifetime, Holder<List<ImportedPortlet>> importedPortlets,
Holder<List<ImportPortletsFailed>> importFailed, Holder<ResourceList>
resourceList, Holder<List<Extension>> extensions) throws AccessDenied,
ExportNoLongerValid, InconsistentParameters, InvalidRegistration, InvalidUserCategory,
MissingParameters, ModifyRegistrationRequired, OperationFailed, OperationNotSupported,
ResourceSuspended
+ {
+ service.importPortlets(registrationContext, importContext, importPortlet,
userContext, lifetime, importedPortlets, importFailed, resourceList, extensions);
+ }
+
+ @Override
+ public List<Extension> releaseExport(RegistrationContext registrationContext,
byte[] exportContext, UserContext userContext)
+ {
+ return service.releaseExport(registrationContext, exportContext, userContext);
+ }
+
+ @Override
+ public Lifetime setExportLifetime(SetExportLifetime setExportLifetime) throws
AccessDenied, InvalidHandle, InvalidRegistration, ModifyRegistrationRequired,
OperationFailed, OperationNotSupported, ResourceSuspended
+ {
+ return service.setExportLifetime(setExportLifetime);
+ }
+
+ @Override
+ public void setPortletProperties(RegistrationContext registrationContext,
PortletContext portletContext, UserContext userContext, PropertyList propertyList,
Holder<String> portletHandle, Holder<byte[]> portletState,
Holder<Lifetime> scheduledDestruction, Holder<List<Extension>>
extensions) throws AccessDenied, InconsistentParameters, InvalidHandle,
InvalidRegistration, InvalidUserCategory, MissingParameters, ModifyRegistrationRequired,
OperationFailed, OperationNotSupported, ResourceSuspended
+ {
+ service.setPortletProperties(registrationContext, portletContext, userContext,
propertyList, portletHandle, portletState, scheduledDestruction, extensions);
+ }
+
+ @Override
+ public void getPortletProperties(RegistrationContext registrationContext,
PortletContext portletContext, UserContext userContext, List<String> names,
Holder<List<Property>> properties, Holder<List<ResetProperty>>
resetProperties, Holder<List<Extension>> extensions) throws AccessDenied,
InconsistentParameters, InvalidHandle, InvalidRegistration, InvalidUserCategory,
MissingParameters, ModifyRegistrationRequired, OperationFailed, OperationNotSupported,
ResourceSuspended
+ {
+ service.getPortletProperties(registrationContext, portletContext, userContext,
names, properties, resetProperties, extensions);
+ }
+
+ @Override
+ public void getPortletPropertyDescription(RegistrationContext registrationContext,
PortletContext portletContext, UserContext userContext, List<String> desiredLocales,
Holder<ModelDescription> modelDescription, Holder<ResourceList> resourceList,
Holder<List<Extension>> extensions) throws AccessDenied,
InconsistentParameters, InvalidHandle, InvalidRegistration, InvalidUserCategory,
MissingParameters, ModifyRegistrationRequired, OperationFailed, OperationNotSupported,
ResourceSuspended
+ {
+ service.getPortletPropertyDescription(registrationContext, portletContext,
userContext, desiredLocales, modelDescription, resourceList, extensions);
+ }
+}
Added:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v2/V2RegistrationService.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v2/V2RegistrationService.java
(rev 0)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v2/V2RegistrationService.java 2010-06-02
00:27:24 UTC (rev 3224)
@@ -0,0 +1,86 @@
+/*
+* 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.
+*/
+
+package org.gatein.wsrp.services.v2;
+
+import org.gatein.wsrp.services.RegistrationService;
+import org.oasis.wsrp.v2.AccessDenied;
+import org.oasis.wsrp.v2.Extension;
+import org.oasis.wsrp.v2.GetRegistrationLifetime;
+import org.oasis.wsrp.v2.InvalidHandle;
+import org.oasis.wsrp.v2.InvalidRegistration;
+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.OperationNotSupported;
+import org.oasis.wsrp.v2.RegistrationContext;
+import org.oasis.wsrp.v2.RegistrationData;
+import org.oasis.wsrp.v2.ResourceSuspended;
+import org.oasis.wsrp.v2.SetRegistrationLifetime;
+import org.oasis.wsrp.v2.UserContext;
+import org.oasis.wsrp.v2.WSRPV2RegistrationPortType;
+
+import javax.xml.ws.Holder;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ */
+public class V2RegistrationService extends
RegistrationService<WSRPV2RegistrationPortType>
+{
+ public V2RegistrationService(WSRPV2RegistrationPortType service)
+ {
+ super(service);
+ }
+
+ @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
+ {
+ service.register(registrationData, lifetime, userContext, registrationState,
scheduledDestruction, extensions, registrationHandle);
+ }
+
+ @Override
+ public List<Extension> deregister(RegistrationContext registrationContext,
UserContext userContext) throws InvalidRegistration, OperationFailed,
OperationNotSupported, ResourceSuspended
+ {
+ return service.deregister(registrationContext, userContext);
+ }
+
+ @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
+ {
+ service.modifyRegistration(registrationContext, registrationData, userContext,
registrationState, scheduledDestruction, extensions);
+ }
+
+ @Override
+ public Lifetime getRegistrationLifetime(GetRegistrationLifetime
getRegistrationLifetime) throws AccessDenied, InvalidHandle, InvalidRegistration,
ModifyRegistrationRequired, OperationFailed, OperationNotSupported, ResourceSuspended
+ {
+ return service.getRegistrationLifetime(getRegistrationLifetime);
+ }
+
+ @Override
+ public Lifetime setRegistrationLifetime(SetRegistrationLifetime
setRegistrationLifetime) throws AccessDenied, InvalidHandle, InvalidRegistration,
ModifyRegistrationRequired, OperationFailed, OperationNotSupported, ResourceSuspended
+ {
+ return null; //To change body of implemented methods use File | Settings | File
Templates.
+ }
+}
Added:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v2/V2ServiceDescriptionService.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v2/V2ServiceDescriptionService.java
(rev 0)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/v2/V2ServiceDescriptionService.java 2010-06-02
00:27:24 UTC (rev 3224)
@@ -0,0 +1,76 @@
+/*
+* 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.
+*/
+
+package org.gatein.wsrp.services.v2;
+
+import org.gatein.wsrp.services.ServiceDescriptionService;
+import org.oasis.wsrp.v2.CookieProtocol;
+import org.oasis.wsrp.v2.EventDescription;
+import org.oasis.wsrp.v2.ExportDescription;
+import org.oasis.wsrp.v2.Extension;
+import org.oasis.wsrp.v2.ExtensionDescription;
+import org.oasis.wsrp.v2.InvalidRegistration;
+import org.oasis.wsrp.v2.ItemDescription;
+import org.oasis.wsrp.v2.ModelDescription;
+import org.oasis.wsrp.v2.ModelTypes;
+import org.oasis.wsrp.v2.ModifyRegistrationRequired;
+import org.oasis.wsrp.v2.OperationFailed;
+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 org.oasis.wsrp.v2.WSRPV2ServiceDescriptionPortType;
+
+import javax.xml.ws.Holder;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ */
+public class V2ServiceDescriptionService extends
ServiceDescriptionService<WSRPV2ServiceDescriptionPortType> implements
WSRPV2ServiceDescriptionPortType
+{
+ public V2ServiceDescriptionService(WSRPV2ServiceDescriptionPortType service)
+ {
+ super(service);
+ }
+
+ @Override
+ public void getServiceDescription(
+ RegistrationContext registrationContext, List<String> desiredLocales,
List<String> portletHandles,
+ UserContext userContext, Holder<Boolean> requiresRegistration,
Holder<List<PortletDescription>> offeredPortlets,
+ Holder<List<ItemDescription>> userCategoryDescriptions,
Holder<List<ExtensionDescription>> extensionDescriptions,
+ Holder<List<ItemDescription>> customWindowStateDescriptions,
Holder<List<ItemDescription>> customModeDescriptions,
+ Holder<CookieProtocol> requiresInitCookie, Holder<ModelDescription>
registrationPropertyDescription,
+ Holder<List<String>> locales, Holder<ResourceList> resourceList,
Holder<List<EventDescription>> eventDescriptions,
+ Holder<ModelTypes> schemaType, Holder<List<String>>
supportedOptions, Holder<ExportDescription> exportDescription,
+ Holder<Boolean> mayReturnRegistrationState,
Holder<List<Extension>> extensions)
+ throws InvalidRegistration, ModifyRegistrationRequired, OperationFailed,
ResourceSuspended
+ {
+ service.getServiceDescription(registrationContext, desiredLocales, portletHandles,
userContext,
+ requiresRegistration, offeredPortlets, userCategoryDescriptions,
extensionDescriptions,
+ customWindowStateDescriptions, customModeDescriptions, requiresInitCookie,
registrationPropertyDescription,
+ locales, resourceList, eventDescriptions, schemaType, supportedOptions,
exportDescription,
+ mayReturnRegistrationState, extensions);
+ }
+}
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-06-02
00:12:02 UTC (rev 3223)
+++
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/BehaviorBackedServiceFactory.java 2010-06-02
00:27:24 UTC (rev 3224)
@@ -26,7 +26,15 @@
import org.gatein.common.NotYetImplemented;
import org.gatein.pc.api.Mode;
import org.gatein.pc.api.WindowState;
+import org.gatein.wsrp.services.MarkupService;
+import org.gatein.wsrp.services.PortletManagementService;
+import org.gatein.wsrp.services.RegistrationService;
+import org.gatein.wsrp.services.ServiceDescriptionService;
import org.gatein.wsrp.services.ServiceFactory;
+import org.gatein.wsrp.services.v1.V1MarkupService;
+import org.gatein.wsrp.services.v1.V1PortletManagementService;
+import org.gatein.wsrp.services.v1.V1RegistrationService;
+import org.gatein.wsrp.services.v1.V1ServiceDescriptionService;
import org.oasis.wsrp.v1.V1AccessDenied;
import org.oasis.wsrp.v1.V1GetMarkup;
import org.oasis.wsrp.v1.V1InconsistentParameters;
@@ -137,6 +145,26 @@
return timeout;
}
+ public ServiceDescriptionService getServiceDescriptionService() throws Exception
+ {
+ return new
V1ServiceDescriptionService(getService(WSRPV1ServiceDescriptionPortType.class));
+ }
+
+ public MarkupService getMarkupService() throws Exception
+ {
+ return new V1MarkupService(getService(WSRPV1MarkupPortType.class));
+ }
+
+ public PortletManagementService getPortletManagementService() throws Exception
+ {
+ return new
V1PortletManagementService(getService(WSRPV1PortletManagementPortType.class));
+ }
+
+ public RegistrationService getRegistrationService() throws Exception
+ {
+ return new V1RegistrationService(getService(WSRPV1RegistrationPortType.class));
+ }
+
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-06-02
00:12:02 UTC (rev 3223)
+++
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/BehaviorBackedServiceFactory.java 2010-06-02
00:27:24 UTC (rev 3224)
@@ -26,7 +26,15 @@
import org.gatein.common.NotYetImplemented;
import org.gatein.pc.api.Mode;
import org.gatein.pc.api.WindowState;
+import org.gatein.wsrp.services.MarkupService;
+import org.gatein.wsrp.services.PortletManagementService;
+import org.gatein.wsrp.services.RegistrationService;
+import org.gatein.wsrp.services.ServiceDescriptionService;
import org.gatein.wsrp.services.ServiceFactory;
+import org.gatein.wsrp.services.v2.V2MarkupService;
+import org.gatein.wsrp.services.v2.V2PortletManagementService;
+import org.gatein.wsrp.services.v2.V2RegistrationService;
+import org.gatein.wsrp.services.v2.V2ServiceDescriptionService;
import org.oasis.wsrp.v2.AccessDenied;
import org.oasis.wsrp.v2.GetMarkup;
import org.oasis.wsrp.v2.InconsistentParameters;
@@ -97,6 +105,26 @@
return null;
}
+ public ServiceDescriptionService getServiceDescriptionService() throws Exception
+ {
+ return new
V2ServiceDescriptionService(getService(WSRPV2ServiceDescriptionPortType.class));
+ }
+
+ public MarkupService getMarkupService() throws Exception
+ {
+ return new V2MarkupService(getService(WSRPV2MarkupPortType.class));
+ }
+
+ public PortletManagementService getPortletManagementService() throws Exception
+ {
+ return new
V2PortletManagementService(getService(WSRPV2PortletManagementPortType.class));
+ }
+
+ public RegistrationService getRegistrationService() throws Exception
+ {
+ return new V2RegistrationService(getService(WSRPV2RegistrationPortType.class));
+ }
+
public BehaviorRegistry getRegistry()
{
return registry;