allParams.putAll(prc.getPortletParameters());
allParams.putAll(this.getPublicParameters());
allParams.remove(ExoPortletInvocationContext.NAVIGATIONAL_STATE_PARAM_NAME);
if (type.equals(ActionInvocation.class)) {
ActionInvocation actionInvocation = new ActionInvocation(pic);
actionInvocation.setRequestContext(new AbstractRequestContext(servletRequest));
String interactionState = servletRequest.getParameter(ExoPortletInvocationContext.INTERACTION_STATE_PARAM_NAME);
if (interactionState != null) {
actionInvocation.setInteractionState(StateString.create(interactionState));
// remove the interaction state from remaining params
allParams.remove(ExoPortletInvocationContext.INTERACTION_STATE_PARAM_NAME);
}
actionInvocation.setForm(allParams);
invocation = type.cast(actionInvocation);
} else if (type.equals(ResourceInvocation.class)) {
ResourceInvocation resourceInvocation = new ResourceInvocation(pic);
resourceInvocation.setRequestContext(new AbstractRequestContext(servletRequest));
String resourceId = servletRequest.getParameter(Constants.RESOURCE_ID_PARAMETER);
if (!ParameterValidation.isNullOrEmpty(resourceId)) {
resourceInvocation.setResourceId(resourceId);
} else if (!ParameterValidation.isNullOrEmpty(prc.getRequestParameter(Constants.RESOURCE_ID_PARAMETER))) {