Class MockWebRequest
java.lang.Object
com.broadleafcommerce.data.tracking.core.interlink.MockWebRequest
- All Implemented Interfaces:
org.springframework.web.context.request.NativeWebRequest,org.springframework.web.context.request.RequestAttributes,org.springframework.web.context.request.WebRequest
public class MockWebRequest
extends Object
implements org.springframework.web.context.request.NativeWebRequest
Using known values from
InterlinkRequest and URI related information, provide a subset of
data about the request in the form of a NativeRequest instance. This is useful for
ContextInfo construction during direct method calls in InterlinkClient instances.-
Field Summary
Fields inherited from interface org.springframework.web.context.request.RequestAttributes
REFERENCE_REQUEST, REFERENCE_SESSION, SCOPE_REQUEST, SCOPE_SESSION -
Constructor Summary
ConstructorsConstructorDescriptionMockWebRequest(InterlinkRequest request, org.springframework.web.util.UriComponents uriComponents) -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckNotModified(long lastModifiedTimestamp) booleancheckNotModified(String etag) booleancheckNotModified(String etag, long lastModifiedTimestamp) getAttribute(String name, int scope) String[]getAttributeNames(int scope) getDescription(boolean includeClientInfo) String[]getHeaderValues(String headerName) <T> TgetNativeRequest(Class<T> requiredType) <T> TgetNativeResponse(Class<T> requiredType) getParameter(String paramName) String[]getParameterValues(String paramName) booleanisSecure()booleanisUserInRole(String role) voidregisterDestructionCallback(String name, Runnable callback, int scope) voidremoveAttribute(String name, int scope) resolveReference(String key) voidsetAttribute(String name, Object value, int scope) toString()
-
Constructor Details
-
MockWebRequest
public MockWebRequest(InterlinkRequest request, org.springframework.web.util.UriComponents uriComponents)
-
-
Method Details
-
getNativeRequest
- Specified by:
getNativeRequestin interfaceorg.springframework.web.context.request.NativeWebRequest
-
getNativeResponse
- Specified by:
getNativeResponsein interfaceorg.springframework.web.context.request.NativeWebRequest
-
getNativeRequest
- Specified by:
getNativeRequestin interfaceorg.springframework.web.context.request.NativeWebRequest
-
getNativeResponse
- Specified by:
getNativeResponsein interfaceorg.springframework.web.context.request.NativeWebRequest
-
getHeader
- Specified by:
getHeaderin interfaceorg.springframework.web.context.request.WebRequest
-
getHeaderValues
- Specified by:
getHeaderValuesin interfaceorg.springframework.web.context.request.WebRequest
-
getHeaderNames
- Specified by:
getHeaderNamesin interfaceorg.springframework.web.context.request.WebRequest
-
getParameter
- Specified by:
getParameterin interfaceorg.springframework.web.context.request.WebRequest
-
getParameterValues
- Specified by:
getParameterValuesin interfaceorg.springframework.web.context.request.WebRequest
-
getParameterNames
- Specified by:
getParameterNamesin interfaceorg.springframework.web.context.request.WebRequest
-
getParameterMap
- Specified by:
getParameterMapin interfaceorg.springframework.web.context.request.WebRequest
-
getLocale
- Specified by:
getLocalein interfaceorg.springframework.web.context.request.WebRequest
-
getContextPath
- Specified by:
getContextPathin interfaceorg.springframework.web.context.request.WebRequest
-
getRemoteUser
- Specified by:
getRemoteUserin interfaceorg.springframework.web.context.request.WebRequest
-
getUserPrincipal
- Specified by:
getUserPrincipalin interfaceorg.springframework.web.context.request.WebRequest
-
isUserInRole
- Specified by:
isUserInRolein interfaceorg.springframework.web.context.request.WebRequest
-
isSecure
public boolean isSecure()- Specified by:
isSecurein interfaceorg.springframework.web.context.request.WebRequest
-
checkNotModified
public boolean checkNotModified(long lastModifiedTimestamp) - Specified by:
checkNotModifiedin interfaceorg.springframework.web.context.request.WebRequest
-
checkNotModified
- Specified by:
checkNotModifiedin interfaceorg.springframework.web.context.request.WebRequest
-
checkNotModified
- Specified by:
checkNotModifiedin interfaceorg.springframework.web.context.request.WebRequest
-
getDescription
- Specified by:
getDescriptionin interfaceorg.springframework.web.context.request.WebRequest
-
getAttribute
- Specified by:
getAttributein interfaceorg.springframework.web.context.request.RequestAttributes
-
setAttribute
- Specified by:
setAttributein interfaceorg.springframework.web.context.request.RequestAttributes
-
removeAttribute
- Specified by:
removeAttributein interfaceorg.springframework.web.context.request.RequestAttributes
-
getAttributeNames
- Specified by:
getAttributeNamesin interfaceorg.springframework.web.context.request.RequestAttributes
-
registerDestructionCallback
- Specified by:
registerDestructionCallbackin interfaceorg.springframework.web.context.request.RequestAttributes
-
resolveReference
- Specified by:
resolveReferencein interfaceorg.springframework.web.context.request.RequestAttributes
-
getSessionId
- Specified by:
getSessionIdin interfaceorg.springframework.web.context.request.RequestAttributes
-
getSessionMutex
- Specified by:
getSessionMutexin interfaceorg.springframework.web.context.request.RequestAttributes
-
toString
-