public class SimpleMailboxSession extends Object implements MailboxSession, MailboxSession.User
MailboxSession.SessionType, MailboxSession.UserSYSTEM_SESSION_ID| Constructor and Description |
|---|
SimpleMailboxSession(long sessionId,
String userName,
String password,
org.slf4j.Logger log,
List<Locale> localePreferences,
char pathSeparator,
MailboxSession.SessionType type) |
SimpleMailboxSession(long sessionId,
String userName,
String password,
org.slf4j.Logger log,
List<Locale> localePreferences,
List<String> sharedSpaces,
String otherUsersSpace,
char pathSeparator,
MailboxSession.SessionType type) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this session.
|
Map<Object,Object> |
getAttributes()
Return the stored attributes for this
MailboxSession. |
List<Locale> |
getLocalePreferences()
Gets acceptable localisation for this user in preference order.
When localising a phrase, each Locale should be tried in
order until an appropriate translation is obtained. |
org.slf4j.Logger |
getLog()
Gets the logger for this session context.
|
String |
getOtherUsersSpace()
Gets the RFC
2342 other users namespace for the current session.
Note that though servers may offer multiple other users namespaces, support is not offered through this API. |
String |
getPassword()
Return the Password for the logged in user
|
char |
getPathDelimiter()
Return server side, folder path separator
|
String |
getPersonalSpace()
Gets the RFC
2342 personal namespace for the current session.
Note that though servers may offer multiple personal namespaces, support is not offered through this API. |
long |
getSessionId()
Gets the session ID.
|
Collection<String> |
getSharedSpaces()
Iterates the RFC 2342 Shared Namespaces available for the current
session.
|
MailboxSession.SessionType |
getType()
Return if the
MailboxSession is of type MailboxSession.SessionType.User or MailboxSession.SessionType.System |
MailboxSession.User |
getUser()
Gets the user executing this session.
|
String |
getUserName()
Gets the name of the user executing this session.
|
boolean |
isOpen()
Is this session open?
|
String |
toString()
Renders suitably for logging.
|
public SimpleMailboxSession(long sessionId,
String userName,
String password,
org.slf4j.Logger log,
List<Locale> localePreferences,
char pathSeparator,
MailboxSession.SessionType type)
public org.slf4j.Logger getLog()
MailboxSessiongetLog in interface MailboxSessionMailboxSession.getLog()public void close()
MailboxSessionclose in interface MailboxSessionMailboxSession.close()public long getSessionId()
MailboxSessiongetSessionId in interface MailboxSessionMailboxSession.getSessionId()public boolean isOpen()
MailboxSessionisOpen in interface MailboxSessionMailboxSession.isOpen()public String toString()
public MailboxSession.User getUser()
getUser in interface MailboxSessionpublic String getUserName()
getUserName in interface MailboxSession.Userpublic String getOtherUsersSpace()
MailboxSessiongetOtherUsersSpace in interface MailboxSessionMailboxSession.getOtherUsersSpace()public String getPersonalSpace()
MailboxSessiongetPersonalSpace in interface MailboxSessionMailboxSession.getPersonalSpace()public Collection<String> getSharedSpaces()
MailboxSessiongetSharedSpaces in interface MailboxSessionMailboxSession.getSharedSpaces()public List<Locale> getLocalePreferences()
MailboxSession.UserLocale should be tried in
order until an appropriate translation is obtained.getLocalePreferences in interface MailboxSession.UserMailboxSession.User.getLocalePreferences()public Map<Object,Object> getAttributes()
MailboxSessionMailboxSession.getAttributes in interface MailboxSessionMailboxSession.getAttributes()public String getPassword()
MailboxSession.UsergetPassword in interface MailboxSession.UserMailboxSession.User.getPassword()public char getPathDelimiter()
MailboxSessiongetPathDelimiter in interface MailboxSessionMailboxSession.getPathDelimiter()public MailboxSession.SessionType getType()
MailboxSessionMailboxSession is of type MailboxSession.SessionType.User or MailboxSession.SessionType.SystemgetType in interface MailboxSessionMailboxSession.getType()Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.