Package com.logicaldoc.util.servlet
Class MockServletSession
java.lang.Object
com.logicaldoc.util.servlet.MockServletSession
- All Implemented Interfaces:
javax.servlet.http.HttpSession
A servlet session useful for doing tests, you can easily setup the map of
attributes
- Since:
- 8.3.3
- Author:
- Marco Meschieri - LogicalDOC
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute(String name) longgetId()longintjavax.servlet.ServletContextjavax.servlet.http.HttpSessionContextString[]voidbooleanisNew()voidvoidremoveAttribute(String arg0) voidremoveValue(String arg0) voidsetAttribute(String name, Object value) voidsetAttributes(Map<String, Object> attributes) voidsetMaxInactiveInterval(int arg0)
-
Constructor Details
-
MockServletSession
public MockServletSession()
-
-
Method Details
-
getAttributes
-
setAttributes
-
getAttribute
- Specified by:
getAttributein interfacejavax.servlet.http.HttpSession
-
getAttributeNames
- Specified by:
getAttributeNamesin interfacejavax.servlet.http.HttpSession
-
getCreationTime
public long getCreationTime()- Specified by:
getCreationTimein interfacejavax.servlet.http.HttpSession
-
getId
- Specified by:
getIdin interfacejavax.servlet.http.HttpSession
-
getLastAccessedTime
public long getLastAccessedTime()- Specified by:
getLastAccessedTimein interfacejavax.servlet.http.HttpSession
-
getMaxInactiveInterval
public int getMaxInactiveInterval()- Specified by:
getMaxInactiveIntervalin interfacejavax.servlet.http.HttpSession
-
getServletContext
public javax.servlet.ServletContext getServletContext()- Specified by:
getServletContextin interfacejavax.servlet.http.HttpSession
-
getSessionContext
public javax.servlet.http.HttpSessionContext getSessionContext()- Specified by:
getSessionContextin interfacejavax.servlet.http.HttpSession
-
getValue
- Specified by:
getValuein interfacejavax.servlet.http.HttpSession
-
getValueNames
- Specified by:
getValueNamesin interfacejavax.servlet.http.HttpSession
-
invalidate
public void invalidate()- Specified by:
invalidatein interfacejavax.servlet.http.HttpSession
-
isNew
public boolean isNew()- Specified by:
isNewin interfacejavax.servlet.http.HttpSession
-
putValue
- Specified by:
putValuein interfacejavax.servlet.http.HttpSession
-
removeAttribute
- Specified by:
removeAttributein interfacejavax.servlet.http.HttpSession
-
removeValue
- Specified by:
removeValuein interfacejavax.servlet.http.HttpSession
-
setAttribute
- Specified by:
setAttributein interfacejavax.servlet.http.HttpSession
-
setMaxInactiveInterval
public void setMaxInactiveInterval(int arg0) - Specified by:
setMaxInactiveIntervalin interfacejavax.servlet.http.HttpSession
-