Package de.gematik.bbriccs.smartcards
Class SmartcardArchive
java.lang.Object
de.gematik.bbriccs.smartcards.SmartcardArchive
The SmartcardArchive is a factory for Smartcards, which is used to load, cache and manage
Smartcards from a given directory.
-
Method Summary
Modifier and TypeMethodDescriptionstatic SmartcardArchiveInitialize theSmartcardArchivewith a smartcards index file from a given path.static SmartcardArchiveInitialize theSmartcardArchivewith a smartcards index file from a given path.static SmartcardArchiveInitialize theSmartcardArchivefrom resources.<T extends Smartcard>
TgetByICCSN(Class<T> classType, String iccsn) Get aSmartcardwithclassTypeand identified by its ICCSN.getByICCSN(String iccsn) Get aSmartcardsafely identified by its ICCSN.Get all Smartcard configurations known to thisSmartcardArchivefrom the smartcards index file.getConfigsFor(SmartcardType type) Get all Smartcard configurations known to thisSmartcardArchivefor a specificSmartcardType.getEgk(int idx) Get aEgkfrom thisSmartcardArchiveidentified by its index.getEgkByICCSN(String iccsn) Get aEgkfrom thisSmartcardArchiveidentified by its ICCSN.getEgkByKvnr(String kvnr) Get aEgkfrom thisSmartcardArchiveidentified by its KVNR.Get allEgkSmartcards which are configured in thisSmartcardArchivegetHba(int idx) Get aHbafrom thisSmartcardArchiveidentified by its index.getHbaByICCSN(String iccsn) Get aHbafrom thisSmartcardArchiveidentified by its ICCSN.Get allHbaSmartcards which are configured in thisSmartcardArchivegetICCSNsFor(SmartcardType type) Get all the ICCSNs of the Smartcards of a specificSmartcardTypeknown to thisSmartcardArchivegetSmartcardByICCSN(SmartcardType type, String iccsn) getSmcB(int idx) Get aSmcBfrom thisSmartcardArchiveidentified by its index.getSmcbByICCSN(String iccsn) Get aSmcBfrom thisSmartcardArchiveidentified by its ICCSN.Get allSmcBSmartcards which are configured in thisSmartcardArchive
-
Method Details
-
fromResources
Initialize theSmartcardArchivefrom resources. For this method to work theResourceLoadermust be able to load the smartcards index fileresources/smartcards/smartcards.json- Returns:
- the SmartcardArchive initialized with the
smartcards.jsonfile from resources
-
from
Initialize theSmartcardArchivewith a smartcards index file from a given path.- Parameters:
path- the path to the smartcards index file or the directory containing thesmartcards.jsonfile- Returns:
- the SmartcardArchive initialized with the given smartcards index file
-
from
Initialize theSmartcardArchivewith a smartcards index file from a given path.- Parameters:
archiveFile- pointing to the smartcards.json file or the directory containing the smartcards.json file- Returns:
- the
SmartcardArchiveinitialized with the smartcards.json file from the given File
-
getConfigs
Get all Smartcard configurations known to thisSmartcardArchivefrom the smartcards index file.- Returns:
- a list of all known Smartcard configurations
-
getConfigsFor
Get all Smartcard configurations known to thisSmartcardArchivefor a specificSmartcardType.- Parameters:
type- of Smartcards- Returns:
- a list of all known Smartcard configurations for the given
SmartcardType
-
getICCSNsFor
Get all the ICCSNs of the Smartcards of a specificSmartcardTypeknown to thisSmartcardArchive- Parameters:
type- of Smartcards- Returns:
- a list of all ICCSNs of the Smartcards of the given
SmartcardType
-
getByICCSN
Get aSmartcardwithclassTypeand identified by its ICCSN.- Type Parameters:
T- the type of Smartcard- Parameters:
classType- of the Smartcardiccsn- of the Smartcard- Returns:
- the Smartcard identified by the given ICCSN
-
getSmartcardByICCSN
- Parameters:
type- of the Smartcardiccsn- of the Smartcard- Returns:
- the Smartcard identified by the given ICCSN
-
getByICCSN
Get aSmartcardsafely identified by its ICCSN.- Parameters:
iccsn- of the Smartcard- Returns:
Optionalof theSmartcardif the ICCSN is known to thisSmartcardArchiveor an emptyOptionalotherwise
-
getHba
Get aHbafrom thisSmartcardArchiveidentified by its index.- Parameters:
idx- of theHba- Returns:
- a
Hbafrom thisSmartcardArchiveidentified by its index.
-
getHbaByICCSN
Get aHbafrom thisSmartcardArchiveidentified by its ICCSN. -
getHbaCards
Get allHbaSmartcards which are configured in thisSmartcardArchive- Returns:
- a list of all
HbaSmartcards
-
getSmcB
Get aSmcBfrom thisSmartcardArchiveidentified by its index.- Parameters:
idx- of theSmcB- Returns:
- a
SmcBfrom thisSmartcardArchiveidentified by its index.
-
getSmcbByICCSN
Get aSmcBfrom thisSmartcardArchiveidentified by its ICCSN. -
getSmcbCards
Get allSmcBSmartcards which are configured in thisSmartcardArchive- Returns:
- a list of all
SmcBSmartcards
-
getEgk
Get aEgkfrom thisSmartcardArchiveidentified by its index.- Parameters:
idx- of theEgk- Returns:
- a
Egkfrom thisSmartcardArchiveidentified by its index.
-
getEgkByICCSN
Get aEgkfrom thisSmartcardArchiveidentified by its ICCSN. -
getEgkByKvnr
Get aEgkfrom thisSmartcardArchiveidentified by its KVNR. -
getEgkCards
Get allEgkSmartcards which are configured in thisSmartcardArchive- Returns:
- a list of all
EgkSmartcards
-