|
Oracle Secure Global Desktop Web Services API Documentation Release 4.7 E21396-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tarantella.tta.webservices.client.views.SessionBean
public class SessionBean
The class caches data on a Secure Global Desktop (SGD) user session, to avoid having to make repeated requests to the SGD server. Like any cache, it can become invalid and it is the caller's responsibility to ensure the data is current.
The SessionBean represents a user's interaction with SGD. A typical web service application will make the following initialisation calls before delivering its specific functionality:
authenticate(String, String, String, String) |
Authenticates and creates a session. The response is parsed and data
can be accessed through various methods of this class. For example,
the session cookie is accessible through getSessionCookie()
and can be used in other API calls. Note, methods implemented on this class
do not take a cookie, but use the internal copy. |
setTCCConfiguration(String, String, String, String) |
Tells the server about the client device and web server to enable it to generate suitable HTML to launch the SGD Client |
startTCC(String, String, String) |
Generates the HTML and parameters needed to launch the SGD Client. |
Constructor Summary | |
---|---|
SessionBean()
Default constructor. |
|
SessionBean(IServiceLocator locator)
Constructor. |
|
SessionBean(IServiceLocator locatorArg,
java.lang.String sessionCookieArg)
Constructor. |
|
SessionBean(java.lang.String sessionCookieArg)
Constructor. |
Method Summary | |
---|---|
void |
addValue(java.lang.String attname,
java.lang.Object attvalue)
Stores an arbitrary value on the session. |
boolean |
associateTCC()
Checks the list of views returned in the authenticate response and tries to associate this view with an SGD CLient already running for another view. |
java.lang.String |
authenticate(java.lang.String username,
java.lang.String password,
java.lang.String clientId,
java.lang.String locale)
Creates and authenticates a user session. |
java.lang.String |
authenticateExt(java.lang.String username,
java.lang.String password,
java.lang.String clientId,
java.lang.String locale,
Item[] additionalCreds,
Item[] loginContext)
Creates and authenticates a user session that requires more credentials than just a username and password. |
java.lang.String |
authenticateMoreInfo(Item[] additionalCreds)
Provides more information to authenticate a user session. |
java.lang.String |
authenticateMoreInfo(Item[] additionalCreds,
java.lang.String prefLang)
Provides more information to authenticate a user session. |
DataRequest[] |
authenticateMoreInfoPrompts()
Gets information about additional credentials required in multi-stage authentication. |
java.lang.String |
endMultiViewSession()
Ends a user session. |
java.lang.String |
endSession(boolean logout)
Ends a user session. |
java.lang.String |
endSession(boolean logout,
boolean allViews)
Ends a user session and optionally all views of the session. |
java.util.Map<java.lang.String,java.lang.String> |
getAppDomainCache()
Return the cache of Application domains. |
java.lang.String |
getAttribute(java.lang.String store,
java.lang.String attributeName)
Gets the named attribute from the named store. |
java.lang.String[] |
getAttributeArray(java.lang.String store,
java.lang.String attributeName)
Gets the named attribute from the named store. |
java.lang.Object |
getAttributeObject(java.lang.String store,
java.lang.String attributeName)
Gets a named attribute from the named store. |
CombinedView |
getCombinedView(java.lang.String name)
Gets a named combined view. |
java.util.HashMap<java.lang.String,CombinedView> |
getCombinedViews()
Gets a map of the combined views. |
java.lang.String |
getDisplayName()
Gets the user's display name. |
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<com.tarantella.tta.webservices.impl.DynamicApplicationServerDetails>>> |
getDynamicApplicationServerDetailsCache()
Return the cache of Dynamic Application server details. |
java.util.HashMap<java.lang.String,java.lang.String> |
getDynamicAppPasscacheOverrides()
Return the cache of Dynamic Application Passcache overrides. |
EmulatorSessionsView |
getEmulatorSessionsView(java.lang.String name)
Gets a named application session view. |
java.util.HashMap<java.lang.String,EmulatorSessionsView> |
getEmulatorSessionsViews()
Gets a map of the application session views. |
EventsView |
getEventsView()
Gets an event view. |
java.util.HashMap<java.lang.String,EventsView> |
getEventsViews()
Gets a map of the event views. |
boolean |
getIsAdministrator()
Checks if the user is an SGD administrator |
IServiceLocator |
getLocator()
Gets the service locator |
PrintJobsView |
getPrintJobsView(java.lang.String name)
Gets a named print jobs view. |
java.util.HashMap<java.lang.String,PrintJobsView> |
getPrintJobsViews()
Gets a map of the print jobs views. |
java.lang.String |
getSessionCookie()
Gets the user session cookie. |
java.lang.String |
getStartTCCHelperId()
Gets the ID of the SGD Client Helper that started the SGD Client. |
java.lang.String |
getTheme()
Deprecated. Gets the user's theme. |
java.lang.Object |
getValue(java.lang.String attname)
Gets an arbitrary value from the session store. |
java.util.HashMap<java.lang.String,java.lang.Object> |
getValues()
Gets the local values. |
java.lang.String |
getVersion()
Gets version information for the SGD server. |
WebtopGroupContainer |
getWebtopGroupContainer(java.lang.String name)
Gets a named assigned applications group container. |
java.util.HashMap<java.lang.String,WebtopGroupContainer> |
getWebtopGroupViews()
Gets a map of the assigned application group containers. |
WebtopViewBean |
getWebtopView(java.lang.String name)
Gets a named assigned applications view. |
java.util.HashMap<java.lang.String,WebtopViewBean> |
getWebtopViews()
Gets a map of the assigned applications views. |
boolean |
haveAuthentication()
Tests if the session is already authenticated. |
boolean |
haveTccConnection()
Tests if there is a connection between the SGD Client and the SGD server. |
boolean |
isAuthenticated()
Tests if the session is already authenticated. |
boolean |
isEndingSession()
Checks if the session is in process of ending. |
boolean |
isReallyAuthenticated()
Tests if the session is already authenticated. |
boolean |
isTccAssociationAvailable()
Tests if it is possible to associate with an existing SGD Client. |
java.lang.String |
lookupPrefs(java.lang.String[] desiredPreferences)
Looks-up preferences for the user owning the session. |
java.lang.String |
lookupSession(java.lang.String[] desiredAttributes)
Looks-up a user session. |
java.lang.String |
lookupUser(java.lang.String[] desiredAttributes)
Looks-up attributes for the user who owns the user session. |
java.lang.String |
modifyPrefs(Item[] data)
Modifies preferences for the user owning the session. |
java.lang.String |
modifySession(Item[] data,
java.lang.String mode)
Modifies a user session. |
void |
rebuildState()
Rebuilds basic internal state. |
java.lang.String |
refreshClientInfo()
Requests an update of client information from the SGD Client. |
void |
refreshSessionState()
Refreshes internal cached state with content from the SGD server. |
java.lang.Object |
removeValue(java.lang.String attname)
Removes an arbitrary value from the session. |
java.lang.String |
restart(java.lang.String reconnectToken)
Requests that a user session is linked to an SGD Client after an SGD server restart. |
void |
setAppDomainCache(java.util.Map<java.lang.String,java.lang.String> appDomainCache)
Sets the cache of Application domains to the given value. |
void |
setDisplayName(java.lang.String displayName)
Sets the user's display name. |
void |
setDynamicApplicationServerDetailsCache(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<com.tarantella.tta.webservices.impl.DynamicApplicationServerDetails>>> dynamicAppserverDetails)
Sets the cache of Dynamic Application server details to the given value. |
void |
setDynamicAppPasscacheOverrides(java.util.HashMap<java.lang.String,java.lang.String> dynamicAppPasscacheOverrrides)
Sets the cache of Dynamic Application passcache overrides to the given value. |
void |
setIsAdministrator(boolean admin)
Sets the local flag indicating that the session belongs to an SGD administrator. |
void |
setLocator(IServiceLocator locator)
Sets a service locator |
java.lang.String |
setSessionIdentity(java.lang.String username,
java.lang.String clientId,
java.lang.String locale,
java.lang.String proxyUser,
java.lang.String proxyCred)
Requests that a user session is identified with a particular user. |
void |
setTCCConfiguration(java.lang.String userAgent,
java.lang.String baseUrl,
java.lang.String version,
java.lang.String type)
Sets the configuration for selecting SGD Client. |
void |
setTCCConfigurationOverrides(java.lang.String userAgent,
java.lang.String baseUrl,
java.lang.String version,
java.lang.String type,
Item[] overrides)
Sets the configuration needed to select appropriate SGD Client. |
void |
setValues(java.util.HashMap<java.lang.String,java.lang.Object> map)
Sets the local values. |
java.lang.String |
startTCC(java.lang.String helperId,
java.lang.String handlerURL,
java.lang.String target)
Gets the information necessary to start the SGD Client. |
java.lang.String |
translateString(java.lang.String enString,
java.lang.String prefLang)
Translates a known string from English to the preferred language. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SessionBean()
public SessionBean(java.lang.String sessionCookieArg)
sessionCookieArg
- Existing session cookie.public SessionBean(IServiceLocator locator)
locator
- Web service locator.public SessionBean(IServiceLocator locatorArg, java.lang.String sessionCookieArg)
locatorArg
- Locator of web service end-points.sessionCookieArg
- Existing session cookie.Method Detail |
---|
public IServiceLocator getLocator()
public void setLocator(IServiceLocator locator)
locator
- Locator of web service end-points.public java.lang.String authenticate(java.lang.String username, java.lang.String password, java.lang.String clientId, java.lang.String locale) throws java.rmi.RemoteException
username
- Username credential.password
- Password credential.clientId
- Arbitrary identifier for the client device. This parameter
determines whether the SGD server joins or grabs any
existing session belonging to the user.locale
- Preferred locale of the user.
ITarantellaWebtopSession.authenticate(String, String, String, String)
.
This response is parsed within the method and data made accessible through
getSessionCookie()
and getAttribute(String, String)
.
java.rmi.RemoteException
- On receipt of a SOAP fault.public java.lang.String authenticateExt(java.lang.String username, java.lang.String password, java.lang.String clientId, java.lang.String locale, Item[] additionalCreds, Item[] loginContext) throws java.rmi.RemoteException
username
- Username credential.password
- Password credential.clientId
- Arbitrary identifier for the client device. This parameter
determines whether the SGD server joins or grabs any
existing session belonging to the user.locale
- Preferred locale of the user.additionalCreds
- Array of additional credentials.loginContext
- Context of the multi-stage login.
This will have been returned in the SOAP fault from a previous
authentication request.
ITarantellaWebtopSession.authenticateExt(String, String, String, String, Item[], Item[])
.
java.rmi.RemoteException
- On receipt of a SOAP fault.public java.lang.String authenticateMoreInfo(Item[] additionalCreds, java.lang.String prefLang) throws java.rmi.RemoteException
additionalCreds
- Array of additional credentials.prefLang
- Preferred language.
ITarantellaWebtopSession.authenticateExt(
String, String, String, String, Item[], Item[])
for details.
java.rmi.RemoteException
- On receipt of a SOAP fault.public java.lang.String authenticateMoreInfo(Item[] additionalCreds) throws java.rmi.RemoteException
additionalCreds
- Array of additional credentials.
ITarantellaWebtopSession.authenticateExt(
String, String, String, String, Item[], Item[])
for details.
java.rmi.RemoteException
- On receipt of a SOAP fault.public java.lang.String endSession(boolean logout, boolean allViews) throws java.rmi.RemoteException
logout
- Flag indicating if the user session is logged-out (true)
or just ended (false).allViews
- Flag indicating if all views are logged-out (true)
or just the current view (false).
ITarantellaWebtopSession.endSession(String, boolean)
.
java.rmi.RemoteException
- On receipt of a SOAP fault.public java.lang.String endSession(boolean logout) throws java.rmi.RemoteException
logout
- Flag indicating if the user session is logged-out (true)
or just ended (false).
ITarantellaWebtopSession.endSession(String, boolean)
.
java.rmi.RemoteException
- On receipt of a SOAP fault.public java.lang.String endMultiViewSession() throws java.rmi.RemoteException
ITarantellaWebtopSession.endMultiViewSession(String)
.
java.rmi.RemoteException
- On receipt of a SOAP fault.public java.lang.String lookupSession(java.lang.String[] desiredAttributes) throws java.rmi.RemoteException
desiredAttributes
- Array of attributes wanted in the response.
For available shortcuts, see ITarantellaWebtopSession.lookupSession(String, String[])
)
ITarantellaWebtopSession.lookupSession(String, String[])
.
The response is parsed within the method and the data stored in groups based
on the source of the attributes. The data is accessible through getAttribute(String, String)
. For available stores, see ITarantellaWebtopSession.lookupSession(String, String[])
)
java.rmi.RemoteException
- On receipt of a SOAP fault.public java.lang.String modifySession(Item[] data, java.lang.String mode) throws java.rmi.RemoteException
data
- Array of attributes to change.mode
- Type of modification. See ITarantellaWebtopSession.modifySession(String, Item[], String)
.
for details.
ITarantellaWebtopSession.modifySession(String, Item[], String)
.
java.rmi.RemoteException
- On receipt of a SOAP fault.public java.lang.String refreshClientInfo() throws java.rmi.RemoteException
IConstantsXML.NAME_CLIENT_ATTRS
group.
ITarantellaWebtopSession.refreshClientInfo(String)
.
java.rmi.RemoteException
- On receipt of a SOAP fault.public java.lang.String restart(java.lang.String reconnectToken) throws java.rmi.RemoteException
reconnectToken
- A token to associate the user session with an
existing SGD Client.
ITarantellaWebtopSession.restart(String, String)
.
java.rmi.RemoteException
- On receipt of a SOAP fault.public java.lang.String setSessionIdentity(java.lang.String username, java.lang.String clientId, java.lang.String locale, java.lang.String proxyUser, java.lang.String proxyCred) throws java.rmi.RemoteException
username
- The owner of the user session.clientId
- Arbitrary identifier for the client device. This parameter
determines whether the SGD server joins or grabs any
existing session belonging to the user.locale
- Preferred locale of the user.proxyUser
- The proxy user.proxyCred
- The proxy credential.
ITarantellaExternalAuth.setSessionIdentity(String, String, String)
.
java.rmi.RemoteException
- On receipt of a SOAP fault.public void setTCCConfiguration(java.lang.String userAgent, java.lang.String baseUrl, java.lang.String version, java.lang.String type) throws java.rmi.RemoteException
ITarantellaWebtopSession.setTCCConfiguration(String, String, String, String, String)
for details.
userAgent
- Identifies the browser hosting the SGD Client Helper.baseUrl
- Base URL to access the SGD Client.version
- Version of the SGD Client. This is an arbitrary value,
but is often set to the version of the SGD software.type
- Type of SGD Client Helper to use. Must be java
.
java.rmi.RemoteException
- On receipt of a SOAP fault.public void setTCCConfigurationOverrides(java.lang.String userAgent, java.lang.String baseUrl, java.lang.String version, java.lang.String type, Item[] overrides) throws java.rmi.RemoteException
userAgent
- Identifies the browser hosting the SGD Client Helper.baseUrl
- Base URL to access the SGD Client.version
- Version of the SGD Client. This is an arbitrary value,
but is often set to the version of the SGD software.type
- Type of SGD Client Helper to use. Must be java
.overrides
- Parameter overrides. See ITarantellaWebtopSession.setTCCConfigurationOverrides(String, String, String, String, String, Item[])
for details of allowed overrides.
java.rmi.RemoteException
- On receipt of a SOAP fault.public java.lang.String startTCC(java.lang.String helperId, java.lang.String handlerURL, java.lang.String target) throws java.rmi.RemoteException
helperId
- Identifies SGD Client Helper ID.handlerURL
- URL of the handler of the connection message.target
- Output window or frame for the connection message.
codeFragment
from the response to
ITarantellaWebtopSession.startTCC(String, String, String, String)
.
java.rmi.RemoteException
- On receipt of a SOAP fault.public boolean associateTCC()
setTCCConfiguration(String, String, String, String)
and startTCC(String, String, String)
.public java.lang.String getVersion() throws java.rmi.RemoteException
java.rmi.RemoteException
- On receipt of a SOAP fault.public java.util.HashMap<java.lang.String,CombinedView> getCombinedViews()
public CombinedView getCombinedView(java.lang.String name)
name
- The name of the combined view.
public java.util.HashMap<java.lang.String,EmulatorSessionsView> getEmulatorSessionsViews()
public EmulatorSessionsView getEmulatorSessionsView(java.lang.String name)
name
- The name of the application session view.
public java.util.HashMap<java.lang.String,WebtopViewBean> getWebtopViews()
public WebtopViewBean getWebtopView(java.lang.String name)
name
- The name of the assigned applications view.
public java.util.HashMap<java.lang.String,PrintJobsView> getPrintJobsViews()
public PrintJobsView getPrintJobsView(java.lang.String name)
name
- The name of the print jobs view.
public java.util.HashMap<java.lang.String,EventsView> getEventsViews()
public EventsView getEventsView()
public java.util.HashMap<java.lang.String,WebtopGroupContainer> getWebtopGroupViews()
public WebtopGroupContainer getWebtopGroupContainer(java.lang.String name)
name
- The name of the assigned applications group container.
public java.lang.String getSessionCookie()
public java.lang.String getTheme()
public java.lang.String getDisplayName()
public java.lang.String getStartTCCHelperId()
public boolean isEndingSession()
public boolean getIsAdministrator()
public void addValue(java.lang.String attname, java.lang.Object attvalue)
attname
- The name of the attribute.attvalue
- The value to be stored.public java.lang.Object removeValue(java.lang.String attname)
attname
- The name of the attribute.
public java.lang.Object getValue(java.lang.String attname)
attname
- The name of the attribute.
public boolean isReallyAuthenticated()
public boolean haveAuthentication()
public boolean isAuthenticated()
public java.lang.String lookupUser(java.lang.String[] desiredAttributes) throws java.rmi.RemoteException
desiredAttributes
- Array of attributes wanted in the response.
IConstants.LOCAL_ATTRS
is a shortcut to get those attributes
that can be retrieved cheaply.
ITarantellaUser.lookupUser(String, String[])
for details.
java.rmi.RemoteException
- On receipt of a SOAP fault.public java.lang.String lookupPrefs(java.lang.String[] desiredPreferences) throws java.rmi.RemoteException
desiredPreferences
- The preferences wanted.
ITarantellaUser.lookupPrefs(String, String[])
for details.
java.rmi.RemoteException
- On receipt of a SOAP fault.public java.lang.String modifyPrefs(Item[] data) throws java.rmi.RemoteException
data
- The preferences to be set.
ITarantellaUser.modifyPrefs(String, Item[])
for details.
java.rmi.RemoteException
- On receipt of a SOAP fault.public java.lang.Object getAttributeObject(java.lang.String store, java.lang.String attributeName)
authenticate(String, String, String, String)
and lookupSession(String[])
. Unless the data has been obtained
from the server previously, it will be missing from the cache.
store
- The attribute store. A store is created for each source
of attributes (see ITarantellaWebtopSession.lookupSession(String, String[])
)
for the names of the stores. If store
is not one of the
named stores, it tries each store in this order until the attribute is
found or the stores exhausted.attributeName
- Name of the attribute.
public java.lang.String[] getAttributeArray(java.lang.String store, java.lang.String attributeName)
getAttributeObject(String, String)
for details.
store
- The attribute store.attributeName
- Name of the attribute.
public java.lang.String getAttribute(java.lang.String store, java.lang.String attributeName)
getAttributeObject(String, String)
for details.
store
- The attribute store.attributeName
- Name of the attribute.
public DataRequest[] authenticateMoreInfoPrompts()
IConstantsGUI
.
public boolean haveTccConnection()
public java.lang.String translateString(java.lang.String enString, java.lang.String prefLang)
enString
- English stringprefLang
- Preferred language
public void refreshSessionState()
public boolean isTccAssociationAvailable()
public void rebuildState()
public void setIsAdministrator(boolean admin)
admin
- Flag indicating that this session belongs to an SGD
administrator.public void setDisplayName(java.lang.String displayName)
displayName
- User's display name.public java.util.HashMap<java.lang.String,java.lang.Object> getValues()
public void setValues(java.util.HashMap<java.lang.String,java.lang.Object> map)
map
- Local values.public java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<com.tarantella.tta.webservices.impl.DynamicApplicationServerDetails>>> getDynamicApplicationServerDetailsCache()
public void setDynamicApplicationServerDetailsCache(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<com.tarantella.tta.webservices.impl.DynamicApplicationServerDetails>>> dynamicAppserverDetails)
dynamicAppserverDetails
- The value to set. If this is null, the
dynamic application server details cache
will not be updated.public java.util.Map<java.lang.String,java.lang.String> getAppDomainCache()
public void setAppDomainCache(java.util.Map<java.lang.String,java.lang.String> appDomainCache)
appDomainCache
- The value to set. If this is null, the application
domain cache will not be set.public java.util.HashMap<java.lang.String,java.lang.String> getDynamicAppPasscacheOverrides()
public void setDynamicAppPasscacheOverrides(java.util.HashMap<java.lang.String,java.lang.String> dynamicAppPasscacheOverrrides)
dynamicAppPasscacheOverrrides
- The value to set. If this is null,
the dynamic application passcache
overrides will not be updated.
|
Oracle Secure Global Desktop Web Services API Documentation Release 4.7 E21396-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |