Package com.saperion.ngc.model
Class ClassicConnectorService
- java.lang.Object
-
- com.saperion.ngc.model.ClassicConnectorService
-
- All Implemented Interfaces:
Service
- Direct Known Subclasses:
AuthClassicConnectorService,DocClassicConnectorService,NavigationClassicConnectorService,QueryClassicConnectorService,SettingsClassicConnectorService,UserManagementClassicConnectorService,WorkflowConnectorService
public class ClassicConnectorService extends java.lang.Object implements Service
Classic connector service base class holding connection provider information.- Author:
- mak
-
-
Field Summary
Fields Modifier and Type Field Description protected com.saperion.cache.Cache<DdcCacheKey,com.saperion.cache.data.CacheEntry<DdcCacheKey>>ddcCache
-
Constructor Summary
Constructors Modifier Constructor Description ClassicConnectorService()Creates a new ClassicConnectorService.protectedClassicConnectorService(ConnectionProvider<com.saperion.connector.SaClassicConnector> conProvider)Creates a new ClassicConnectorService.ClassicConnectorService(javax.servlet.http.HttpSession session)Creates a new ClassicConnectorService.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AuthenticationExceptionconvertAuthenticationException(com.saperion.exception.SaAuthenticationException orig)Converts an SaAuthenticationException to an AuthenticationException.protected com.saperion.intf.DDCgetCachedDDC(java.lang.String ddcName)Loads the specified DDC from the cache or, if the cache is not available, from the backend.protected ConnectionProvider<com.saperion.connector.SaClassicConnector>getConnectionProvider()Returns the classic connector connection provider.protected UsergetCurrentUserFromSession()Returns the current user from the session.protected javax.servlet.http.HttpSessiongetSession()Gets the session.protected ConnectionProvider<com.saperion.connector.wf.SaWFConnector>getWfConnectionProvider()Returns the workflow connection provider.booleanisActive()Returns connection status.
-
-
-
Field Detail
-
ddcCache
protected com.saperion.cache.Cache<DdcCacheKey,com.saperion.cache.data.CacheEntry<DdcCacheKey>> ddcCache
-
-
Constructor Detail
-
ClassicConnectorService
public ClassicConnectorService()
Creates a new ClassicConnectorService.
-
ClassicConnectorService
public ClassicConnectorService(javax.servlet.http.HttpSession session)
Creates a new ClassicConnectorService.- Parameters:
session- HTTP session
-
ClassicConnectorService
protected ClassicConnectorService(ConnectionProvider<com.saperion.connector.SaClassicConnector> conProvider)
Creates a new ClassicConnectorService.- Parameters:
conProvider- Provider
-
-
Method Detail
-
getConnectionProvider
protected final ConnectionProvider<com.saperion.connector.SaClassicConnector> getConnectionProvider()
Returns the classic connector connection provider.- Returns:
- connection provider
-
getWfConnectionProvider
protected final ConnectionProvider<com.saperion.connector.wf.SaWFConnector> getWfConnectionProvider()
Returns the workflow connection provider.- Returns:
- workflow connection provider
-
isActive
public final boolean isActive()
Returns connection status.- Specified by:
isActivein interfaceService- Returns:
- true if user is logged on, otherwise false.
- See Also:
Service.isActive()
-
convertAuthenticationException
protected final AuthenticationException convertAuthenticationException(com.saperion.exception.SaAuthenticationException orig)
Converts an SaAuthenticationException to an AuthenticationException.- Parameters:
orig- classic connector exception- Returns:
- NGC exception
-
getSession
protected final javax.servlet.http.HttpSession getSession()
Gets the session.- Returns:
- the session
-
getCurrentUserFromSession
protected final User getCurrentUserFromSession()
Returns the current user from the session.- Returns:
- the current user from the session
-
getCachedDDC
protected final com.saperion.intf.DDC getCachedDDC(java.lang.String ddcName) throws com.saperion.exception.SaSystemException, com.saperion.exception.SaAuthenticationExceptionLoads the specified DDC from the cache or, if the cache is not available, from the backend.- Parameters:
ddcName- the name of the DDC- Returns:
- the DDC
- Throws:
com.saperion.exception.SaSystemException- system error when loading DDCcom.saperion.exception.SaAuthenticationException- authentication error when loading DDC
-
-