Package es.caib.seycon.ng.servei
Class SessionCacheServiceBase
- java.lang.Object
-
- es.caib.seycon.ng.servei.SessionCacheServiceBase
-
- All Implemented Interfaces:
es.caib.seycon.ng.servei.SessionCacheService
public abstract class SessionCacheServiceBase extends Object implements es.caib.seycon.ng.servei.SessionCacheService
Spring Service base class for
see es.caib.seycon.ng.servei.SessionCacheServicees.caib.seycon.ng.servei.SessionCacheService
, provides access to all services and entities referenced by this service.
-
-
Constructor Summary
Constructors Constructor Description SessionCacheServiceBase()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description String
clearSession()
String
createSession()
String
getCurrentSessionId()
Object
getObject(String tag)
protected Principal
getPrincipal()
Gets the currentprincipal
if one has been set, otherwise returnsnull
.com.soffid.iam.service.SessionCacheService
getSessionCacheService()
Gets reference tosessionCacheService
.protected abstract String
handleClearSession()
protected abstract String
handleCreateSession()
protected abstract String
handleGetCurrentSessionId()
protected abstract Object
handleGetObject(String tag)
protected abstract void
handlePutObject(String tag, Object value)
protected abstract String
handleSetSession(String sessionId)
void
putObject(String tag, Object value)
String
setSession(String sessionId)
void
setSessionCacheService(com.soffid.iam.service.SessionCacheService sessionCacheService)
Sets reference tosessionCacheService
.
-
-
-
Method Detail
-
setSessionCacheService
public void setSessionCacheService(com.soffid.iam.service.SessionCacheService sessionCacheService)
Sets reference tosessionCacheService
.
-
getSessionCacheService
public com.soffid.iam.service.SessionCacheService getSessionCacheService()
Gets reference tosessionCacheService
.
-
getObject
@Transactional(isolation=DEFAULT, propagation=REQUIRED, rollbackFor=java.lang.Exception.class) public Object getObject(String tag) throws es.caib.seycon.ng.exception.InternalErrorException, es.caib.seycon.ng.exception.InternalErrorException
- Specified by:
getObject
in interfacees.caib.seycon.ng.servei.SessionCacheService
- Throws:
es.caib.seycon.ng.exception.InternalErrorException
-
handleGetObject
protected abstract Object handleGetObject(String tag) throws Exception
- Throws:
Exception
-
clearSession
@Transactional(isolation=DEFAULT, propagation=REQUIRED, rollbackFor=java.lang.Exception.class) public String clearSession() throws es.caib.seycon.ng.exception.InternalErrorException, es.caib.seycon.ng.exception.InternalErrorException
- Specified by:
clearSession
in interfacees.caib.seycon.ng.servei.SessionCacheService
- Throws:
es.caib.seycon.ng.exception.InternalErrorException
-
handleClearSession
protected abstract String handleClearSession() throws Exception
- Throws:
Exception
-
createSession
@Transactional(isolation=DEFAULT, propagation=REQUIRED, rollbackFor=java.lang.Exception.class) public String createSession() throws es.caib.seycon.ng.exception.InternalErrorException, es.caib.seycon.ng.exception.InternalErrorException
- Specified by:
createSession
in interfacees.caib.seycon.ng.servei.SessionCacheService
- Throws:
es.caib.seycon.ng.exception.InternalErrorException
-
handleCreateSession
protected abstract String handleCreateSession() throws Exception
- Throws:
Exception
-
getCurrentSessionId
@Transactional(isolation=DEFAULT, propagation=REQUIRED, rollbackFor=java.lang.Exception.class) public String getCurrentSessionId() throws es.caib.seycon.ng.exception.InternalErrorException, es.caib.seycon.ng.exception.InternalErrorException
- Specified by:
getCurrentSessionId
in interfacees.caib.seycon.ng.servei.SessionCacheService
- Throws:
es.caib.seycon.ng.exception.InternalErrorException
-
handleGetCurrentSessionId
protected abstract String handleGetCurrentSessionId() throws Exception
- Throws:
Exception
-
setSession
@Transactional(isolation=DEFAULT, propagation=REQUIRED, rollbackFor=java.lang.Exception.class) public String setSession(String sessionId) throws es.caib.seycon.ng.exception.InternalErrorException, es.caib.seycon.ng.exception.InternalErrorException
- Specified by:
setSession
in interfacees.caib.seycon.ng.servei.SessionCacheService
- Throws:
es.caib.seycon.ng.exception.InternalErrorException
-
handleSetSession
protected abstract String handleSetSession(String sessionId) throws Exception
- Throws:
Exception
-
putObject
@Transactional(isolation=DEFAULT, propagation=REQUIRED, rollbackFor=java.lang.Exception.class) public void putObject(String tag, Object value) throws es.caib.seycon.ng.exception.InternalErrorException, es.caib.seycon.ng.exception.InternalErrorException
- Specified by:
putObject
in interfacees.caib.seycon.ng.servei.SessionCacheService
- Throws:
es.caib.seycon.ng.exception.InternalErrorException
-
handlePutObject
protected abstract void handlePutObject(String tag, Object value) throws Exception
- Throws:
Exception
-
getPrincipal
protected Principal getPrincipal()
Gets the currentprincipal
if one has been set, otherwise returnsnull
.- Returns:
- the current principal
-
-