public class SimpleMailboxSession extends Object implements MailboxSession, MailboxSession.User
MailboxSession.SessionType, MailboxSession.User
SYSTEM_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()
MailboxSession
getLog
in interface MailboxSession
MailboxSession.getLog()
public void close()
MailboxSession
close
in interface MailboxSession
MailboxSession.close()
public long getSessionId()
MailboxSession
getSessionId
in interface MailboxSession
MailboxSession.getSessionId()
public boolean isOpen()
MailboxSession
isOpen
in interface MailboxSession
MailboxSession.isOpen()
public String toString()
public MailboxSession.User getUser()
getUser
in interface MailboxSession
public String getUserName()
getUserName
in interface MailboxSession.User
public String getOtherUsersSpace()
MailboxSession
getOtherUsersSpace
in interface MailboxSession
MailboxSession.getOtherUsersSpace()
public String getPersonalSpace()
MailboxSession
getPersonalSpace
in interface MailboxSession
MailboxSession.getPersonalSpace()
public Collection<String> getSharedSpaces()
MailboxSession
getSharedSpaces
in interface MailboxSession
MailboxSession.getSharedSpaces()
public List<Locale> getLocalePreferences()
MailboxSession.User
Locale
should be tried in
order until an appropriate translation is obtained.getLocalePreferences
in interface MailboxSession.User
MailboxSession.User.getLocalePreferences()
public Map<Object,Object> getAttributes()
MailboxSession
MailboxSession
.getAttributes
in interface MailboxSession
MailboxSession.getAttributes()
public String getPassword()
MailboxSession.User
getPassword
in interface MailboxSession.User
MailboxSession.User.getPassword()
public char getPathDelimiter()
MailboxSession
getPathDelimiter
in interface MailboxSession
MailboxSession.getPathDelimiter()
public MailboxSession.SessionType getType()
MailboxSession
MailboxSession
is of type MailboxSession.SessionType.User
or MailboxSession.SessionType.System
getType
in interface MailboxSession
MailboxSession.getType()
Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.