Class SAPMockSession

  • All Implemented Interfaces:
    Session, java.io.Serializable

    public class SAPMockSession
    extends DefaultSession
    Copy of MockSession enhanced by removeAttribute method.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      SAPMockSession()
      Standard constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T> java.util.Map<java.lang.String,​T> getAllAttributes()  
      <T> T getAttribute​(java.lang.String name)
      Returns for the given session attribute name the value
      java.lang.String getSessionId()  
      void removeAttribute​(java.lang.String name)
      Removes the given attribute from the current session.
      void setAttribute​(java.lang.String name, java.lang.Object value)
      Sets the given value Object to the Session as attribute with the given name
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SAPMockSession

        public SAPMockSession()
        Standard constructor.
    • Method Detail

      • getAttribute

        public <T> T getAttribute​(java.lang.String name)
        Description copied from interface: Session
        Returns for the given session attribute name the value
        Specified by:
        getAttribute in interface Session
        Overrides:
        getAttribute in class DefaultSession
        Parameters:
        name - the attribute name
        Returns:
        null if no attribute with the given name is stored in the session
      • setAttribute

        public void setAttribute​(java.lang.String name,
                                 java.lang.Object value)
        Description copied from interface: Session
        Sets the given value Object to the Session as attribute with the given name
        Specified by:
        setAttribute in interface Session
        Overrides:
        setAttribute in class DefaultSession
        Parameters:
        name - the name of the attribute
        value - the value to be set
      • removeAttribute

        public void removeAttribute​(java.lang.String name)
        Description copied from interface: Session
        Removes the given attribute from the current session. Do nothing if the attribute doesn't exists in the session.
        Specified by:
        removeAttribute in interface Session
        Overrides:
        removeAttribute in class DefaultSession
        Parameters:
        name - the attribute name