Package org.ehrbase.service
Class BaseServiceImp
- java.lang.Object
-
- org.ehrbase.service.BaseServiceImp
-
- All Implemented Interfaces:
BaseService
- Direct Known Subclasses:
CompositionServiceImp,ContributionServiceImp,EhrServiceImp,FolderServiceImp,QueryServiceImp,StatusServiceImp,TemplateServiceImp
public class BaseServiceImp extends Object implements BaseService
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEMOGRAPHICstatic StringPARTY
-
Constructor Summary
Constructors Constructor Description BaseServiceImp(KnowledgeCacheService knowledgeCacheService, org.jooq.DSLContext context, ServerConfig serverConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected UUIDcreateInternalUser(String username)Creates a new PARTY_IDENTIFIED corresponding to an authenticated user.protected UUIDgetCurrentUserId()Get default user UUID, derived from authenticated user via Spring Security.
Internally checks and retrieves the matching user UUID, if it already exists with given info.protected I_DomainAccessgetDataAccess()ServerConfiggetServerConfig()UUIDgetSystemUuid()Get default system UUID.
Internally makes use of configured local system's node name.
-
-
-
Field Detail
-
DEMOGRAPHIC
public static final String DEMOGRAPHIC
- See Also:
- Constant Field Values
-
PARTY
public static final String PARTY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BaseServiceImp
public BaseServiceImp(KnowledgeCacheService knowledgeCacheService, org.jooq.DSLContext context, ServerConfig serverConfig)
-
-
Method Detail
-
getDataAccess
protected I_DomainAccess getDataAccess()
-
getSystemUuid
public UUID getSystemUuid()
Get default system UUID.
Internally makes use of configured local system's node name.- Specified by:
getSystemUuidin interfaceBaseService- Returns:
- Default system UUID.
-
getCurrentUserId
protected UUID getCurrentUserId()
Get default user UUID, derived from authenticated user via Spring Security.
Internally checks and retrieves the matching user UUID, if it already exists with given info.- Returns:
- UUID of default user, derived from authenticated user.
-
createInternalUser
protected UUID createInternalUser(String username)
Creates a new PARTY_IDENTIFIED corresponding to an authenticated user.- Parameters:
username- username of the user- Returns:
- the id of the newly created user
-
getServerConfig
public ServerConfig getServerConfig()
- Specified by:
getServerConfigin interfaceBaseService
-
-