wt.session
Interface SessionManager

All Known Implementing Classes:
SessionManagerFwd, StandardSessionManager

public interface SessionManager

Interface containing the methods for setting and retrieving the current principal.

Supported API: true

Extendable: false


Field Summary
static String ACCEPT_LANGUAGE
           
 
Method Summary
 void destroySessionContext(String prefix, String sessionId)
          Given prefix and sessionId of a SessionContext created via getContext(prefix,sessionId), find that session and destroy it.
 WTPrincipal getAdministrator()
          Returns the default administrator.
 Vector getLanguagePreference()
          

Supported API: false
 Locale getLocale()
          

Supported API: false
 WTPrincipal getPrincipal()
          Retrieves current principal.
 WTPrincipalReference getPrincipalReference()
          Retrieves a reference to the current principal.
 WTPrincipal setAdministrator()
          Sets the default administrator as the current principal.
 void setAuthenticatedPrincipal(String web_name)
          Set the current principal given its web server authentication id.
 WTPrincipal setPrincipal(String name)
          Sets the current principal given the principal's name.
 

Field Detail

ACCEPT_LANGUAGE

public static final String ACCEPT_LANGUAGE
See Also:
Constant Field Values
Method Detail

getPrincipal

public WTPrincipal getPrincipal()
                         throws WTException
Retrieves current principal.

Supported API: true

Returns:
WTPrincipal
Throws:
WTException

getPrincipalReference

public WTPrincipalReference getPrincipalReference()
                                           throws WTException
Retrieves a reference to the current principal.

Supported API: true

Returns:
WTPrincipalReference
Throws:
WTException

setPrincipal

public WTPrincipal setPrincipal(String name)
                         throws WTException
Sets the current principal given the principal's name. Throws 'UserNotFoundexception' if principal can't be found.

This method is accessible at the client only when the wt.session.clientAuthenticatedLogin is set to false in wt.properties or the current principal is part of the administrators group.

Supported API: true

Parameters:
name -
Returns:
WTPrincipal
Throws:
WTException

setAdministrator

public WTPrincipal setAdministrator()
                             throws WTException
Sets the default administrator as the current principal.

This method is accessible at the client only when the wt.session.clientAuthenticatedLogin is set to false in wt.properties or the current principal is part of the administrators group.

Supported API: true

Returns:
WTPrincipal
Throws:
WTException

getAdministrator

public WTPrincipal getAdministrator()
                             throws WTException
Returns the default administrator.

Supported API: true

Returns:
WTPrincipal
Throws:
WTException

setAuthenticatedPrincipal

public void setAuthenticatedPrincipal(String web_name)
                               throws WTException
Set the current principal given its web server authentication id. Throws 'UserNotFoundException' if principal can't be found.

Supported API: true

Parameters:
web_name -
Throws:
WTException

getLocale

public Locale getLocale()
                 throws WTException


Supported API: false

Returns:
Locale
Throws:
WTException

getLanguagePreference

public Vector getLanguagePreference()
                             throws WTException


Supported API: false

Returns:
Vector
Throws:
WTException

destroySessionContext

public void destroySessionContext(String prefix,
                                  String sessionId)
                           throws WTException
Given prefix and sessionId of a SessionContext created via getContext(prefix,sessionId), find that session and destroy it.

This is intended for use from the servlet engine to allow the Windchill SessionContext to be destroyed when the servlet session is destroyed to release objects more quickly in some cases.

Supported API: false

Parameters:
prefix - used guarentee uniqueness to the key
sessionId - session id of the JSP/Servlet engine calling the method server
Throws:
WTException