Method Summary |
|
public boolean | authenticate(String username, String password, boolean newAccount) Authenticates the given user by initializing the mail session,
thus authenticating against the post office of this session.
Note that the credentials (i.e. |
public void | end() Ends this session, by cleaning up user related data
and resources.
If the session is authenticated, then the new last
login String is stored in the users
preferences, before they are saved. |
public void | ensureAdministrator() Tests whether the user associated with this session
is allowed to administrate jwma and throws
a JwmaException if not, thus ensuring an
administrative user. |
public void | ensureAuthenticated() Tests wheter this session is authenticated, throwing
a JwmaException if not, thus ensuring an
authenticated session. |
public void | ensurePostOfficeConnection() Tests wheter a connection to the post office
exists, throwing a JwmaException if
not, thus it ensures that a connection to the
post office exists. |
public void | finalize() Overrides the superclass method to call end(). |
public JwmaStoreImpl | getJwmaStore() Returns the actual mailsession's JwmaStoreImpl. |
public JwmaTransportImpl | getJwmaTransport() Returns the actual mailsession's JwmaTransportImpl. |
public String | getLastLogin() Returns a String representing the
user's last login date and originating host. |
public MailTransportAgent | getMTA() |
public Session | getMailSession() Returns this instances mailsession. |
public PostOffice | getPostOffice() |
public JwmaPreferencesImpl | getPreferences() Returns the JwmaPreferencesImpl instance
of this session instance's user. |
public HttpServletRequest | getRequest() Returns the reference to the actual HttpServletRequest
instance. |
public String | getRequestParameter(String name) Returns the value of a request parameter from this
session's HttpServletRequest. |
public String[] | getRequestParameters(String name) Returns the values of a request parameter from this
session's HttpServletRequest. |
public HttpServletResponse | getResponse() Returns the reference to the actual HttpServletResponse
instance. |
public String | getUserIdentity(String username) Returns the assembled user's identity as String.
Parameters: username - the user's name as String. |
public String | getUserIdentity() Returns the assembled user's identity as String. |
public String | getUsername() Returns the username associated with this JwmaSession. |
public HttpSession | getWebSession() Returns the reference to the actual HttpSession
instance. |
public boolean | isAdministrator() Tests if this session's associated user is an
administrator. |
public boolean | isAuthenticated() Tests if this session is authenticated. |
public boolean | isPostOfficeConnected() Tests if this session has a connection to the post office. |
public boolean | isValidWebSession() Tests if the associated web session is valid. |
public void | redirect(String view) Redirects the the actual HttpServletRequest
to an abstract view. |
public void | redirectToActual() Redirects the the actual HttpServletRequest
to the present view. |
public void | redirectToLast() Redirects the the actual HttpServletRequest
to the last view. |
public void | removeBean(String name) Removes a reference to a bean (model) in the
actual HttpSession. |
public Object | retrieveBean(String name) Returns a reference to a bean(model) in the
actual HttpSession.
If no bean with the given name/identifyer is stored
in the actual session, then it returns null.
Parameters: name - the unique identifier of bean to be stored assession attribute. |
public boolean | savePreferences() Saves the JwmaPreferencesImpl instance
of this session instance's user. |
public void | setLocale() Sets the Locale of this Session to the one
that is stored in the user's preferences. |
public void | setMTA(MailTransportAgent MTA) |
public void | setPostOffice(PostOffice office) |
public void | setRequest(HttpServletRequest request) Sets the reference to the actual HttpServletRequest
instance. |
public void | setResponse(HttpServletResponse response) Sets the reference to the actual HttpServletResponse
instance. |
public void | setWebSession(HttpSession websession) Sets the reference to the actual HttpSession
instance. |
public void | storeBean(String name, Object bean) Stores a reference to a bean(model) in the
actual HttpSession. |