com.webmethods.caf.faces.data.csp
Class CSPSessionManager
java.lang.Object
com.webmethods.caf.faces.bean.BaseFacesBean
com.webmethods.caf.faces.bean.BaseFacesSessionBean
com.webmethods.caf.faces.data.csp.CSPSessionManager
- All Implemented Interfaces:
- IPageFlowScopeAdapter, Serializable
public class CSPSessionManager
- extends BaseFacesSessionBean
- implements Serializable
This class is intended to be something like a helper for creating
Session
object and getting IRetrieval
module.
- See Also:
- Serialized Form
Methods inherited from class com.webmethods.caf.faces.bean.BaseFacesBean |
createMethodBinding, createValueBinding, error, error, error, error, error, getBean, getFacesContext, getLocale, getResourceInputStream, getResources, getResourcesProvider, getRootCause, getStackTrace, getTreeAttribute, isUserInRole, log, log, log, putTreeAttribute, resetDataBindingClients, resolveDataBinding, resolveDataBinding, resolveExpression, setValue |
CSPSessionManager
public CSPSessionManager()
getImpersonatedUser
public String getImpersonatedUser()
setImpersonatedUser
public void setImpersonatedUser(String userToImpersonate)
create
public static CSPSessionManager create(String serverName,
String host,
int port,
int streamingPort)
createSession
public Session createSession(Credentials credentials)
throws AuthenticationException,
Exception
- Creates and returns
Session
for a given username and password
- Parameters:
credentials
- - used to specify username/password
- Returns:
- a
Session
object for a given username and password
- Throws:
Exception
AuthenticationException
getRetrievalModule
public static RetrievalModule getRetrievalModule(Session session)
throws COMM_Exception
- Throws:
COMM_Exception
getRetrievalModule
public RetrievalModule getRetrievalModule(String username,
String password)
throws AuthenticationException,
Exception
- Throws:
AuthenticationException
Exception
getConversionService
public static ConversionService getConversionService(Session session)
throws COMM_Exception
- Throws:
COMM_Exception
getConversionService
public ConversionService getConversionService(String username,
String password)
throws AuthenticationException,
Exception
- Throws:
AuthenticationException
Exception
getSecurityModule
public static SecurityModule getSecurityModule(Session session)
throws COMM_Exception
- Throws:
COMM_Exception
getSecurityModule
public SecurityModule getSecurityModule(String username,
String password)
throws COMM_Exception,
AuthenticationException,
Exception
- Throws:
COMM_Exception
AuthenticationException
Exception
release
protected void release()
- Description copied from class:
BaseFacesSessionBean
- Override this method to release any resources associated with this session.
Please note, the FacesContext is not valid for this function
- Specified by:
release
in class BaseFacesSessionBean
finalize
protected void finalize()
throws Throwable
- Overrides:
finalize
in class Object
- Throws:
Throwable
connect
public void connect()
throws Exception
- Throws:
Exception
disconnect
public void disconnect()
throws Exception
- Throws:
Exception
isConnected
public boolean isConnected()
getCurrentSession
public Session getCurrentSession()
throws Exception
- Check if session is open and if not create a new Session.
If the in the Credentials a user to impersonate is passed switch the scope of the
Session to the new user.
getSecurityModule(session).isUser(newUser) validates the newUser.
- Returns:
-
- Throws:
Exception
getCredentials
public Credentials getCredentials()
setCredentials
public void setCredentials(Credentials credentials)
getServerName
public String getServerName()
getHost
public String getHost()
getHost
public static String getHost(Session session)
throws COMM_Exception
- Throws:
COMM_Exception
getPort
public int getPort()
getStreamingPort
public int getStreamingPort()
setServerName
public void setServerName(String serverName)
setHost
public void setHost(String host)
setPort
public void setPort(int port)
setStreamingPort
public void setStreamingPort(int streamingPort)