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
Classic connector service base class holding connection provider information.
- Author:
- mak
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.saperion.cache.Cache<DdcCacheKey,
com.saperion.cache.data.CacheEntry<DdcCacheKey>> -
Constructor Summary
ConstructorsModifierConstructorDescriptionCreates a new ClassicConnectorService.protected
ClassicConnectorService
(ConnectionProvider<com.saperion.connector.SaClassicConnector> conProvider) Creates a new ClassicConnectorService.ClassicConnectorService
(jakarta.servlet.http.HttpSession session) Creates a new ClassicConnectorService. -
Method Summary
Modifier and TypeMethodDescriptionprotected final AuthenticationException
convertAuthenticationException
(com.saperion.exception.SaAuthenticationException orig) Converts an SaAuthenticationException to an AuthenticationException.protected final com.saperion.intf.DDC
getCachedDDC
(String ddcName) Loads the specified DDC from the cache or, if the cache is not available, from the backend.protected final ConnectionProvider<com.saperion.connector.SaClassicConnector>
Returns the classic connector connection provider.protected final User
Returns the current user from the session.protected final jakarta.servlet.http.HttpSession
Gets the session.protected final ConnectionProvider<com.saperion.connector.wf.SaWFConnector>
Returns the workflow connection provider.final boolean
isActive()
Returns connection status.
-
Field Details
-
ddcCache
protected com.saperion.cache.Cache<DdcCacheKey,com.saperion.cache.data.CacheEntry<DdcCacheKey>> ddcCache
-
-
Constructor Details
-
ClassicConnectorService
public ClassicConnectorService()Creates a new ClassicConnectorService. -
ClassicConnectorService
public ClassicConnectorService(jakarta.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 Details
-
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. -
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 jakarta.servlet.http.HttpSession getSession()Gets the session.- Returns:
- the session
-
getCurrentUserFromSession
Returns the current user from the session.- Returns:
- the current user from the session
-
getCachedDDC
protected final com.saperion.intf.DDC getCachedDDC(String ddcName) throws com.saperion.exception.SaSystemException, com.saperion.exception.SaAuthenticationException Loads 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
-