com.dyuproject.openid
Class IdentifierSelectUserCache

java.lang.Object
  extended by com.dyuproject.openid.IdentifierSelectUserCache
All Implemented Interfaces:
Discovery.UserCache

public final class IdentifierSelectUserCache
extends Object
implements Discovery.UserCache

A cache for providers that have generic identifiers (not tied to a single user) E.g google and yahoo's openid_identifier parameters

Author:
David Yu
Date created:
Aug 18, 2009

Field Summary
static String DEFAULT_RESOURCE_LOCATION
          The default resource location (classpath).
 
Constructor Summary
IdentifierSelectUserCache()
           
IdentifierSelectUserCache(Map<String,String> mappings)
           
IdentifierSelectUserCache(String resourceLoc)
           
 
Method Summary
 OpenIdUser get(String key, boolean clone)
          Gets the user assoicated with the given key from the cache; The flag clone is whether to create a different instance containting the same properties (useful when the OpenIdUser is not deserialized but instead held in memory).
static void load(String resourceLoc, Map<String,String> mappings)
          Load the configured mappings from the properties file located at the given resourceLoc.
 void put(String key, OpenIdUser user)
          Puts the user associated with the key in the cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_RESOURCE_LOCATION

public static final String DEFAULT_RESOURCE_LOCATION
The default resource location (classpath).

See Also:
Constant Field Values
Constructor Detail

IdentifierSelectUserCache

public IdentifierSelectUserCache()

IdentifierSelectUserCache

public IdentifierSelectUserCache(String resourceLoc)

IdentifierSelectUserCache

public IdentifierSelectUserCache(Map<String,String> mappings)
Method Detail

load

public static void load(String resourceLoc,
                        Map<String,String> mappings)
Load the configured mappings from the properties file located at the given resourceLoc.


get

public OpenIdUser get(String key,
                      boolean clone)
Description copied from interface: Discovery.UserCache
Gets the user assoicated with the given key from the cache; The flag clone is whether to create a different instance containting the same properties (useful when the OpenIdUser is not deserialized but instead held in memory).

Specified by:
get in interface Discovery.UserCache

put

public void put(String key,
                OpenIdUser user)
Description copied from interface: Discovery.UserCache
Puts the user associated with the key in the cache.

Specified by:
put in interface Discovery.UserCache


Copyright © 2008-2013. All Rights Reserved.