net.netheos.pcsapi.credentials
Class AppInfoFileRepository
java.lang.Object
net.netheos.pcsapi.credentials.AppInfoFileRepository
- All Implemented Interfaces:
- AppInfoRepository
public class AppInfoFileRepository
- extends Object
- implements AppInfoRepository
This class is a simple reader of applications information from a plain text file with format:
providerName1.appName1 = jsonobject1
providerName1.appName2 = jsonobject2
|
Method Summary |
AppInfo |
get(String providerName)
Retrieves application information for the specified provider. |
AppInfo |
get(String providerName,
String appName)
Retrieves application information for the specified provider and optional application. |
String |
toString()
|
AppInfoFileRepository
public AppInfoFileRepository(File file)
throws IOException
- Throws:
IOException
get
public AppInfo get(String providerName)
- Retrieves application information for the specified provider.
- Specified by:
get in interface AppInfoRepository
- Parameters:
providerName -
- Returns:
- appInfo
get
public AppInfo get(String providerName,
String appName)
- Description copied from interface:
AppInfoRepository
- Retrieves application information for the specified provider and optional application.
If repository contains only one application for the specified provider, appName may be left unspecified.
- Specified by:
get in interface AppInfoRepository
- Parameters:
providerName - The storage provider nameappName - The application name (if null, the default application found in repository will be used)
- Returns:
- appInfo The application informations
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2014. All Rights Reserved.