Author: chris.laprun(a)jboss.com
Date: 2010-11-05 13:52:29 -0400 (Fri, 05 Nov 2010)
New Revision: 4960
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/ProducerInfo.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/InvocationHandler.java
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/WSRPProducerImpl.java
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/PortletManagementHandler.java
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/RegistrationHandler.java
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/ActionRequestProcessor.java
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/EventRequestProcessor.java
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/ProcessorFactory.java
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/ProducerHelper.java
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/RenderRequestProcessor.java
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/RequestProcessor.java
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/ResourceRequestProcessor.java
components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/handlers/processors/MimeResponseProcessorTestCase.java
Log:
- GTNWSRP-147: properly support ModifyRegistrationRequired exceptions
+ Make ProducerInfo know that modifying the registration is needed and make the consumer
inactive.
+ Properly react to a ModifyRegistrationRequired exception when refreshing the
ProducerInfo.
+ RegistrationHandler.isRegistrationValid now throws a ModifyRegistrationRequired
exception instead of OperationFailed as was the case in WSRP 1.
+ Propagated exception up the call stacks...
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/ProducerInfo.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/ProducerInfo.java 2010-11-05
17:15:49 UTC (rev 4959)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/ProducerInfo.java 2010-11-05
17:52:29 UTC (rev 4960)
@@ -51,6 +51,7 @@
import org.oasis.wsrp.v2.Lifetime;
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.PortletPropertyDescriptionResponse;
@@ -440,28 +441,7 @@
{
log.debug("OperationFailedFault occurred, might indicate a need to
modify registration", operationFailedFault);
- // attempt to get unregistered service description
- serviceDescription = getServiceDescription(true);
- result.setServiceDescription(serviceDescription);
-
- // re-validate the registration information
- RefreshResult registrationResult =
internalRefreshRegistration(serviceDescription, false, true, true);
- if (registrationResult.hasIssues())
- {
- // if the registration validation has issues, we need to modify our
local information
- setModifyRegistrationRequired(true);
- setActiveAndSave(false);
- }
- else
- {
- // we might be in a situation where the producer changed the
registration back to the initial state
- // which is, granted, pretty rare... attempt modifyRegistration
- log.debug("modifyRegistration was called after
OperationFailedFault when a check of registration data didn't reveal any
issue...");
- modifyRegistration(true);
- }
-
- result.setRegistrationResult(registrationResult);
- return result;
+ return handleModifyRegistrationNeeded(result);
}
else
{
@@ -486,6 +466,10 @@
return refreshInfo(false, serviceDescription, result);
}
+ catch (ModifyRegistrationRequired modifyRegistrationRequired)
+ {
+ return handleModifyRegistrationNeeded(result);
+ }
return refreshInfo(forceRefresh, serviceDescription, result);
}
@@ -493,6 +477,32 @@
return new RefreshResult(RefreshResult.Status.BYPASSED);
}
+ private RefreshResult handleModifyRegistrationNeeded(RefreshResult result) throws
PortletInvokerException
+ {
+ ServiceDescription serviceDescription;// attempt to get unregistered service
description
+ serviceDescription = getServiceDescription(true);
+ result.setServiceDescription(serviceDescription);
+
+ // re-validate the registration information
+ RefreshResult registrationResult = internalRefreshRegistration(serviceDescription,
false, true, true);
+ if (registrationResult.hasIssues())
+ {
+ // if the registration validation has issues, we need to modify our local
information
+ setModifyRegistrationRequired(true);
+ setActiveAndSave(false);
+ }
+ else
+ {
+ // we might be in a situation where the producer changed the registration back
to the initial state
+ // which is, granted, pretty rare... attempt modifyRegistration
+ log.debug("modifyRegistration was called after OperationFailedFault when a
check of registration data didn't reveal any issue...");
+ modifyRegistration(true);
+ }
+
+ result.setRegistrationResult(registrationResult);
+ return result;
+ }
+
private RefreshResult refreshInfo(boolean forceRefresh, ServiceDescription
serviceDescription, RefreshResult result)
throws PortletInvokerException
{
@@ -823,7 +833,7 @@
this.persistentExpirationCacheSeconds = expirationCacheSeconds;
}
- private ServiceDescription getUnmanagedServiceDescription(boolean asUnregistered)
throws PortletInvokerException, OperationFailed, InvalidRegistration
+ private ServiceDescription getUnmanagedServiceDescription(boolean asUnregistered)
throws PortletInvokerException, OperationFailed, InvalidRegistration,
ModifyRegistrationRequired
{
//todo: might need to implement customization of default service description
ServiceDescription serviceDescription;
@@ -912,6 +922,10 @@
{
throw (OperationFailed)e; // rethrow to deal at higher level as meaning can
vary depending on context
}
+ else if (e instanceof ModifyRegistrationRequired)
+ {
+ throw (ModifyRegistrationRequired)e;
+ }
return rethrowAsInvokerUnvailable(e);
}
@@ -931,6 +945,10 @@
{
return rethrowAsInvokerUnvailable(invalidRegistrationFault);
}
+ catch (ModifyRegistrationRequired modifyRegistrationRequired)
+ {
+ return rethrowAsInvokerUnvailable(modifyRegistrationRequired);
+ }
}
private ServiceDescription rethrowAsInvokerUnvailable(Exception e) throws
InvokerUnavailableException
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/InvocationHandler.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/InvocationHandler.java 2010-11-05
17:15:49 UTC (rev 4959)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/InvocationHandler.java 2010-11-05
17:52:29 UTC (rev 4960)
@@ -37,12 +37,14 @@
import org.gatein.wsrp.WSRPConstants;
import org.gatein.wsrp.WSRPTypeFactory;
import org.gatein.wsrp.WSRPUtils;
+import org.gatein.wsrp.consumer.ProducerInfo;
import org.gatein.wsrp.consumer.WSRPConsumerImpl;
import org.gatein.wsrp.spec.v2.WSRP2RewritingConstants;
import org.oasis.wsrp.v2.InvalidCookie;
import org.oasis.wsrp.v2.InvalidRegistration;
import org.oasis.wsrp.v2.InvalidSession;
import org.oasis.wsrp.v2.MarkupParams;
+import org.oasis.wsrp.v2.ModifyRegistrationRequired;
import org.oasis.wsrp.v2.NavigationalContext;
import org.oasis.wsrp.v2.OperationFailed;
import org.oasis.wsrp.v2.PortletContext;
@@ -248,6 +250,17 @@
log.debug("Invalid registration");
consumer.handleInvalidRegistrationFault();
}
+ else if (error instanceof ModifyRegistrationRequired)
+ {
+ ProducerInfo producerInfo = consumer.getProducerInfo();
+
+ log.debug("Producer " + producerInfo.getId() + " indicated that
modifyRegistration should be called.");
+
+ producerInfo.setModifyRegistrationRequired(true);
+ producerInfo.setActiveAndSave(false);
+
+ return new ErrorResponse(error);
+ }
else
{
// other errors cannot be dealt with: we have an error condition
Modified:
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/WSRPProducerImpl.java
===================================================================
---
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/WSRPProducerImpl.java 2010-11-05
17:15:49 UTC (rev 4959)
+++
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/WSRPProducerImpl.java 2010-11-05
17:52:29 UTC (rev 4960)
@@ -499,7 +499,7 @@
return serviceDescriptionHandler.getPortletDescription(portlet, locales);
}
- public Registration getRegistrationOrFailIfInvalid(RegistrationContext
registrationContext) throws InvalidRegistration, OperationFailed
+ public Registration getRegistrationOrFailIfInvalid(RegistrationContext
registrationContext) throws InvalidRegistration, OperationFailed,
ModifyRegistrationRequired
{
Registration registration =
registrationHandler.getRegistrationFrom(registrationContext);
registrationHandler.isRegistrationValid(registration, true);
Modified:
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/PortletManagementHandler.java
===================================================================
---
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/PortletManagementHandler.java 2010-11-05
17:15:49 UTC (rev 4959)
+++
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/PortletManagementHandler.java 2010-11-05
17:52:29 UTC (rev 4960)
@@ -316,18 +316,18 @@
MissingParameters, ModifyRegistrationRequired, OperationFailed,
OperationNotSupported, ResourceSuspended
{
WSRP2ExceptionFactory.throwOperationFailedIfValueIsMissing(copyPortlets,
"copyPortlets");
-
+
List<PortletContext> portletContexts =
copyPortlets.getFromPortletContexts();
-
+
if (!ParameterValidation.existsAndIsNotEmpty(portletContexts))
{
throw WSRP2ExceptionFactory.createWSException(MissingParameters.class,
"Missing required portletContext in CopyPortlets.", null);
}
-
+
Registration fromRegistration =
producer.getRegistrationOrFailIfInvalid(copyPortlets.getFromRegistrationContext());
-
+
RegistrationContext toRegistationContext =
copyPortlets.getToRegistrationContext();
-
+
//if toRegistrationCotnext is null, then we use the fromRegistrationContext (from
spec).
//NOTE: this means we can't move between a PortletContext on a registered
consumer to a non-registered consumer
// between two non-registered consumers will still be ok.
@@ -335,9 +335,9 @@
{
toRegistationContext = copyPortlets.getFromRegistrationContext();
}
-
+
Registration toRegistration =
producer.getRegistrationOrFailIfInvalid(toRegistationContext);
-
+
UserContext fromUserContext = copyPortlets.getFromUserContext();
checkUserAuthorization(fromUserContext);
UserContext toUserContext = copyPortlets.getToUserContext();
@@ -346,29 +346,29 @@
try
{
RegistrationLocal.setRegistration(fromRegistration);
-
+
Map<String, FailedPortlets> failedPortletsMap = new HashMap<String,
FailedPortlets>(portletContexts.size());
-
+
List<CopiedPortlet> copiedPortlets = new
ArrayList<CopiedPortlet>(portletContexts.size());
-
+
for (PortletContext portletContext : portletContexts)
{
try
{
org.gatein.pc.api.PortletContext portalPC =
WSRPUtils.convertToPortalPortletContext(portletContext);
-
+
//NOTE: There are two ways we can do a copy. We can export using one
registration and import using another. This seems the most straight forward way to do
this, just seems a little overkill.
// OR we can copy the portlet, then use the RegistrationManager and
RegistrationPolicy to delete the PC from one registration and add it to another. But we
don't actually
// create the copy under the toRegistration and we would need to add extra
checks here to make sure the toRegistration has the proper permissions.
// Note sure why there is even a copy portlet operation since it can be
replicated by an export and then an import operation.
-
+
org.gatein.pc.api.PortletContext exportedPortletContext =
producer.getPortletInvoker().exportPortlet(PortletStateType.OPAQUE, portalPC);
//Change the registration to the new registration and try and do an
import. This should force the new import to be under the new registration context
RegistrationLocal.setRegistration(toRegistration);
org.gatein.pc.api.PortletContext copiedPortletContext =
producer.getPortletInvoker().importPortlet(PortletStateType.OPAQUE,
exportedPortletContext);
-
+
PortletContext wsrpClonedPC =
WSRPUtils.convertToWSRPPortletContext(copiedPortletContext);
-
+
CopiedPortlet copiedPortlet =
WSRPTypeFactory.createCopiedPortlet(wsrpClonedPC, portletContext.getPortletHandle());
copiedPortlets.add(copiedPortlet);
}
@@ -663,7 +663,7 @@
{
exportContext =
producer.getExportManager().createExportContext(exportByValueRequired, -1, -1, -1);
}
-
+
for (PortletContext portletContext : exportPortlets.getPortletContext())
{
try
@@ -740,7 +740,7 @@
byte[] exportContextBytes =
producer.getExportManager().encodeExportContextData(exportContext);
Lifetime lifetime = null;
-
+
if (exportContext.getCurrentTime() > 0)
{
lifetime = new Lifetime();
@@ -748,7 +748,7 @@
lifetime.setTerminationTime(toXMLGregorianCalendar(exportContext.getTermintationTime()));
lifetime.setRefreshDuration(toDuration(exportContext.getRefreshDuration()));
}
-
+
return WSRPTypeFactory.createExportPortletsResponse(exportContextBytes,
exportedPortlets, new ArrayList<FailedPortlets>(failedPortletsMap.values()),
lifetime, resourceList);
}
catch (Exception e)
@@ -761,7 +761,7 @@
}
}
- public ImportPortletsResponse importPortlets(ImportPortlets importPortlets) throws
OperationFailed, InvalidRegistration, MissingParameters
+ public ImportPortletsResponse importPortlets(ImportPortlets importPortlets) throws
OperationFailed, InvalidRegistration, MissingParameters, ModifyRegistrationRequired
{
WSRP2ExceptionFactory.throwOperationFailedIfValueIsMissing(importPortlets,
"ImportPortlets");
@@ -813,7 +813,7 @@
{
exportPortletData =
producer.getExportManager().createExportPortletData(exportContext, -1, -1, -1,
portletData);
}
-
+
String portletHandle = exportPortletData.getPortletHandle();
byte[] portletState = exportPortletData.getPortletState();
@@ -904,7 +904,7 @@
return WSRPTypeFactory.createReturnAny().getExtensions();
}
- public Lifetime setExportLifetime(SetExportLifetime setExportLifetime) throws
OperationFailed, InvalidRegistration, OperationNotSupported
+ public Lifetime setExportLifetime(SetExportLifetime setExportLifetime) throws
OperationFailed, InvalidRegistration, OperationNotSupported, ModifyRegistrationRequired
{
//this method is only valid if the producer can handle exporting by reference.
if (producer.getExportManager().getPersistenceManager() == null)
@@ -930,7 +930,7 @@
try
{
RegistrationLocal.setRegistration(registration);
-
+
ExportContext exportContext;
if (setExportLifetime != null)
{
Modified:
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/RegistrationHandler.java
===================================================================
---
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/RegistrationHandler.java 2010-11-05
17:15:49 UTC (rev 4959)
+++
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/RegistrationHandler.java 2010-11-05
17:52:29 UTC (rev 4960)
@@ -263,7 +263,7 @@
* @return
* @since 2.6.2
*/
- public boolean isRegistrationValid(Registration reg, boolean throwExceptionIfInvalid)
throws InvalidRegistration, OperationFailed
+ public boolean isRegistrationValid(Registration reg, boolean throwExceptionIfInvalid)
throws InvalidRegistration, OperationFailed, ModifyRegistrationRequired
{
if (reg == null)
{
@@ -290,7 +290,7 @@
{
if (isPending)
{
- throwOperationFailedFault("Registration with handle '" +
reg.getRegistrationHandle()
+ WSRP2ExceptionFactory.throwWSException(ModifyRegistrationRequired.class,
"Registration with handle '" + reg.getRegistrationHandle()
+ "' is pending. Consumer needs to call
modifyRegistration().", null);
}
else
Modified:
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/ActionRequestProcessor.java
===================================================================
---
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/ActionRequestProcessor.java 2010-11-05
17:15:49 UTC (rev 4959)
+++
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/ActionRequestProcessor.java 2010-11-05
17:52:29 UTC (rev 4960)
@@ -40,6 +40,7 @@
import org.oasis.wsrp.v2.InvalidRegistration;
import org.oasis.wsrp.v2.MimeRequest;
import org.oasis.wsrp.v2.MissingParameters;
+import org.oasis.wsrp.v2.ModifyRegistrationRequired;
import org.oasis.wsrp.v2.OperationFailed;
import org.oasis.wsrp.v2.PerformBlockingInteraction;
import org.oasis.wsrp.v2.PortletContext;
@@ -62,7 +63,7 @@
ActionRequestProcessor(ProducerHelper producer, PerformBlockingInteraction
performBlockingInteraction)
throws UnsupportedMimeType, UnsupportedWindowState, InvalidHandle, UnsupportedMode,
MissingParameters,
- InvalidRegistration, OperationFailed
+ InvalidRegistration, OperationFailed, ModifyRegistrationRequired
{
super(producer);
this.performBlockingInteraction = performBlockingInteraction;
Modified:
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/EventRequestProcessor.java
===================================================================
---
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/EventRequestProcessor.java 2010-11-05
17:15:49 UTC (rev 4959)
+++
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/EventRequestProcessor.java 2010-11-05
17:52:29 UTC (rev 4960)
@@ -43,6 +43,7 @@
import org.oasis.wsrp.v2.InvalidRegistration;
import org.oasis.wsrp.v2.MimeRequest;
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;
@@ -65,7 +66,7 @@
{
private HandleEvents handleEvents;
- public EventRequestProcessor(ProducerHelper producer, HandleEvents handleEvents)
throws OperationFailed, UnsupportedMode, InvalidHandle, MissingParameters,
UnsupportedMimeType, UnsupportedWindowState, InvalidRegistration, OperationNotSupported
+ public EventRequestProcessor(ProducerHelper producer, HandleEvents handleEvents)
throws OperationFailed, UnsupportedMode, InvalidHandle, MissingParameters,
UnsupportedMimeType, UnsupportedWindowState, InvalidRegistration, OperationNotSupported,
ModifyRegistrationRequired
{
super(producer);
this.handleEvents = handleEvents;
Modified:
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/ProcessorFactory.java
===================================================================
---
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/ProcessorFactory.java 2010-11-05
17:15:49 UTC (rev 4959)
+++
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/ProcessorFactory.java 2010-11-05
17:52:29 UTC (rev 4960)
@@ -30,6 +30,7 @@
import org.oasis.wsrp.v2.InvalidHandle;
import org.oasis.wsrp.v2.InvalidRegistration;
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.PerformBlockingInteraction;
@@ -45,7 +46,7 @@
{
public static RequestProcessor getProcessorFor(ProducerHelper producer, Object
request)
throws OperationFailed, UnsupportedMode, InvalidHandle, MissingParameters,
UnsupportedMimeType,
- UnsupportedWindowState, InvalidRegistration
+ UnsupportedWindowState, InvalidRegistration, ModifyRegistrationRequired
{
if (request instanceof GetMarkup)
{
Modified:
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/ProducerHelper.java
===================================================================
---
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/ProducerHelper.java 2010-11-05
17:15:49 UTC (rev 4959)
+++
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/ProducerHelper.java 2010-11-05
17:52:29 UTC (rev 4960)
@@ -28,6 +28,7 @@
import org.gatein.registration.Registration;
import org.oasis.wsrp.v2.InvalidHandle;
import org.oasis.wsrp.v2.InvalidRegistration;
+import org.oasis.wsrp.v2.ModifyRegistrationRequired;
import org.oasis.wsrp.v2.OperationFailed;
import org.oasis.wsrp.v2.PortletContext;
import org.oasis.wsrp.v2.PortletDescription;
@@ -47,5 +48,5 @@
PortletDescription getPortletDescription(Portlet portlet, List<String>
locales);
- Registration getRegistrationOrFailIfInvalid(RegistrationContext registrationContext)
throws InvalidRegistration, OperationFailed;
+ Registration getRegistrationOrFailIfInvalid(RegistrationContext registrationContext)
throws InvalidRegistration, OperationFailed, ModifyRegistrationRequired;
}
Modified:
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/RenderRequestProcessor.java
===================================================================
---
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/RenderRequestProcessor.java 2010-11-05
17:15:49 UTC (rev 4959)
+++
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/RenderRequestProcessor.java 2010-11-05
17:52:29 UTC (rev 4960)
@@ -36,6 +36,7 @@
import org.oasis.wsrp.v2.MarkupResponse;
import org.oasis.wsrp.v2.MimeRequest;
import org.oasis.wsrp.v2.MissingParameters;
+import org.oasis.wsrp.v2.ModifyRegistrationRequired;
import org.oasis.wsrp.v2.OperationFailed;
import org.oasis.wsrp.v2.PortletContext;
import org.oasis.wsrp.v2.RegistrationContext;
@@ -54,7 +55,7 @@
private final GetMarkup getMarkup;
public RenderRequestProcessor(ProducerHelper producer, GetMarkup getMarkup) throws
UnsupportedMimeType,
- UnsupportedWindowState, InvalidHandle, UnsupportedMode, MissingParameters,
InvalidRegistration, OperationFailed
+ UnsupportedWindowState, InvalidHandle, UnsupportedMode, MissingParameters,
InvalidRegistration, OperationFailed, ModifyRegistrationRequired
{
super(producer);
this.getMarkup = getMarkup;
Modified:
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/RequestProcessor.java
===================================================================
---
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/RequestProcessor.java 2010-11-05
17:15:49 UTC (rev 4959)
+++
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/RequestProcessor.java 2010-11-05
17:52:29 UTC (rev 4960)
@@ -50,6 +50,7 @@
import org.oasis.wsrp.v2.MarkupType;
import org.oasis.wsrp.v2.MimeRequest;
import org.oasis.wsrp.v2.MissingParameters;
+import org.oasis.wsrp.v2.ModifyRegistrationRequired;
import org.oasis.wsrp.v2.NamedString;
import org.oasis.wsrp.v2.NavigationalContext;
import org.oasis.wsrp.v2.OperationFailed;
@@ -94,7 +95,7 @@
}
void prepareInvocation() throws InvalidRegistration, OperationFailed, InvalidHandle,
- UnsupportedMimeType, UnsupportedWindowState, UnsupportedMode, MissingParameters
+ UnsupportedMimeType, UnsupportedWindowState, UnsupportedMode, MissingParameters,
ModifyRegistrationRequired
{
Registration registration =
producer.getRegistrationOrFailIfInvalid(getRegistrationContext());
Modified:
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/ResourceRequestProcessor.java
===================================================================
---
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/ResourceRequestProcessor.java 2010-11-05
17:15:49 UTC (rev 4959)
+++
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/ResourceRequestProcessor.java 2010-11-05
17:52:29 UTC (rev 4960)
@@ -35,6 +35,7 @@
import org.oasis.wsrp.v2.InvalidRegistration;
import org.oasis.wsrp.v2.MimeRequest;
import org.oasis.wsrp.v2.MissingParameters;
+import org.oasis.wsrp.v2.ModifyRegistrationRequired;
import org.oasis.wsrp.v2.OperationFailed;
import org.oasis.wsrp.v2.PortletContext;
import org.oasis.wsrp.v2.RegistrationContext;
@@ -55,7 +56,7 @@
{
private final GetResource getResource;
- public ResourceRequestProcessor(ProducerHelper producer, GetResource getResource)
throws InvalidRegistration, OperationFailed, MissingParameters, InvalidHandle,
UnsupportedMimeType, UnsupportedWindowState, UnsupportedMode
+ public ResourceRequestProcessor(ProducerHelper producer, GetResource getResource)
throws InvalidRegistration, OperationFailed, MissingParameters, InvalidHandle,
UnsupportedMimeType, UnsupportedWindowState, UnsupportedMode, ModifyRegistrationRequired
{
super(producer);
this.getResource = getResource;
Modified:
components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/handlers/processors/MimeResponseProcessorTestCase.java
===================================================================
---
components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/handlers/processors/MimeResponseProcessorTestCase.java 2010-11-05
17:15:49 UTC (rev 4959)
+++
components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/handlers/processors/MimeResponseProcessorTestCase.java 2010-11-05
17:52:29 UTC (rev 4960)
@@ -40,6 +40,7 @@
import org.oasis.wsrp.v2.InvalidRegistration;
import org.oasis.wsrp.v2.MarkupType;
import org.oasis.wsrp.v2.MissingParameters;
+import org.oasis.wsrp.v2.ModifyRegistrationRequired;
import org.oasis.wsrp.v2.OperationFailed;
import org.oasis.wsrp.v2.PortletDescription;
import org.oasis.wsrp.v2.RegistrationContext;
@@ -58,7 +59,7 @@
{
private static final String PORTLET_HANDLE = "portletHandle";
- public void testShouldUseProvidedNamespace() throws OperationFailed, UnsupportedMode,
InvalidHandle, MissingParameters, UnsupportedMimeType, UnsupportedWindowState,
InvalidRegistration
+ public void testShouldUseProvidedNamespace() throws OperationFailed, UnsupportedMode,
InvalidHandle, MissingParameters, UnsupportedMimeType, UnsupportedWindowState,
InvalidRegistration, ModifyRegistrationRequired
{
String namespace = "namespace";
ServletAccess.setRequestAndResponse(MockHttpServletRequest.createMockRequest(MockHttpSession.createMockSession()),
MockHttpServletResponse.createMockResponse());