net.netheos.pcsapi.credentials
Class AppInfoFileRepository

java.lang.Object
  extended by 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
 


Constructor Summary
AppInfoFileRepository(File file)
           
 
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()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AppInfoFileRepository

public AppInfoFileRepository(File file)
                      throws IOException
Throws:
IOException
Method Detail

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 name
appName - 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.