|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbe.ehealth.technicalconnector.service.kgss.KgssManager
public final class KgssManager
Simplifies the usage of KGSS. It allows for caching of KGSS keys and easy requesting of new keys and existing keys from KGSS Web Service
Field Summary | |
---|---|
static String |
PROP_KGSS_IDENTIFIER_APPLICATIONID
Property to specify the applicationId used by the KGSS |
Method Summary | |
---|---|
void |
add(List<CredentialType> allowedReaders,
byte[] myEtk)
Requests a new key from KGSS and adds it to the cache |
void |
add(String cacheId,
List<CredentialType> allowedReaders,
byte[] myEtk)
Requests a new key from KGSS and adds it to the cache |
boolean |
containsKey(String key)
Check if the KeyCache contains a certain key, based on the KeyCache ID KeyCache ID's are formatted either: - "(" + keyId + ")" - normal caching - "(" + patientId + "#" + prescriptionType + ")" - prepare prescription keys Returns true if this map contains a mapping for the specified key. |
void |
flushCache()
Flush cache. |
KeyResult |
get(String keyId,
byte[] myEtk)
Gets a key from the KeyCache, if the key is not present in the cache it will be retrieved from the KGSS Web Service and added to the KeyCache. |
static KgssManager |
getInstance()
Gets the single instance of KeyCacheManager. |
static KgssManager |
getInstance(KgssService kgssService)
Gets the single instance of KeyCacheManager. |
KeyResult |
getNewKeyFromKgss(List<CredentialType> allowedReaders,
byte[] myEtk)
Retrieves a new key from the KGSS Web Service and returns it. |
KeyResult |
remove(String key)
Removes the mapping for a key from this map if it is present (optional operation). |
void |
setKgssService(KgssService service)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PROP_KGSS_IDENTIFIER_APPLICATIONID
Default value: KGSS
Method Detail |
---|
public static KgssManager getInstance()
public static KgssManager getInstance(KgssService kgssService)
kgssService
-
public KeyResult get(String keyId, byte[] myEtk) throws TechnicalConnectorException
keyId
- The KeyIdentifiermyEtk
- The ETK of the application
TechnicalConnectorException
- When a technical exception occurspublic void add(List<CredentialType> allowedReaders, byte[] myEtk) throws TechnicalConnectorException
allowedReaders
- the allowed readersmyEtk
- the my etk
TechnicalConnectorException
- the technical connector exceptionpublic void add(String cacheId, List<CredentialType> allowedReaders, byte[] myEtk) throws TechnicalConnectorException
cacheId
- the cache idallowedReaders
- the allowed readersmyEtk
- the my etk
TechnicalConnectorException
- the technical connector exceptionpublic KeyResult remove(String key)
(key==null ? k==null : key.equals(k))
, that mapping is removed. (The map
can contain at most one such mapping.)
Returns the value to which this map previously associated the key, or null if the map contained no mapping for the key.
If this map permits null values, then a return value of null does not necessarily indicate that the map contained no mapping for the key; it's also possible that the map explicitly mapped the key to null.
The map will not contain a mapping for the specified key once the call returns.
key
- key whose mapping is to be removed from the map
public boolean containsKey(String key)
key
- the KeyCacheId
public KeyResult getNewKeyFromKgss(List<CredentialType> allowedReaders, byte[] myEtk) throws TechnicalConnectorException
allowedReaders
- the allowed readersmyEtk
- The ETK of the application
TechnicalConnectorException
- the technical connector exceptionpublic void flushCache()
flushCache
in interface SessionServiceWithCache
public void setKgssService(KgssService service)
service
- the service to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |