ParameterValidation.throwIllegalArgExceptionIfNull(portletContext, "PortletContext");
ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(portletContext.getPortletHandle(), "portlet handle", "PortletContext");
ParameterValidation.throwIllegalArgExceptionIfNull(runtimeContext, "RuntimeContext");
ParameterValidation.throwIllegalArgExceptionIfNull(resourceParams, "ResourceParams");
GetResource getResource = new GetResource();
getResource.setRegistrationContext(registrationContext);
getResource.setPortletContext(portletContext);
getResource.setRuntimeContext(runtimeContext);
getResource.setUserContext(userContext);
getResource.setResourceParams(resourceParams);
return getResource;
}