Package fi.bitwards.service
Class BitwardsAdminService
java.lang.Object
fi.bitwards.service.BitwardsAdminService
BitwardsAdminService provides utility functions for accessing
dedicated admin services in the Bitwards backend server.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceThe BitwardsAdminCallback which is used to return then result when asynchronous method is used.static classThe CompanyNfcUrl instance, which contains the name, and base URLs for that company. -
Method Summary
Modifier and TypeMethodDescriptionGet list of CompanyNfcUrls list.voidGet list of CompanyNfcUrls list.static BitwardsAdminServicegetInstance(BitwardsService service) Get instance of BitwardsAdminService, which is a singleton.
-
Method Details
-
getInstance
Get instance of BitwardsAdminService, which is a singleton.- Parameters:
service- the BitwardsService instance- Returns:
- the BitwardsAdminService instance (singleton)
-
getCompanyNfcUrlsList
Get list of CompanyNfcUrls list. This is a synchronous call and it should not be called using main UI thread.- Returns:
- the list of CompanyNfcUrls that current admin has access to
- Throws:
BitwardsException- if an error occured
-
getCompanyNfcUrlsListAsync
Get list of CompanyNfcUrls list. This an asynchronous call, and the list is returned using BitwardsAdminCallback, where the onSuccess method returns the list. The Object needs to be cast to List<CompanyNfcUrls> instance.- Parameters:
callback- the BitwardsAdminCallback instance, where the list is returned by onSuccess method, and the Obje
-