com.indexdata.serviceproxy.unstable.pazpar2.client
Class Pazpar2ClientManager

java.lang.Object
  extended by com.indexdata.serviceproxy.unstable.pazpar2.client.Pazpar2ClientManager

public class Pazpar2ClientManager
extends Object

Creates/stores/retrieves a pazpar2 proxy client instance (MODE 1, 2 or 3) based on

Author:
jakub

Constructor Summary
Pazpar2ClientManager()
           
 
Method Summary
static com.indexdata.masterkey.pazpar2.client.Pazpar2Client createProxy(com.indexdata.masterkey.pazpar2.client.Pazpar2ClientConfiguration proxyConfig, javax.servlet.http.HttpSession httpSession)
          Constructs a Pazpar2 proxy client based on the proxy configuration The authenticated 'realm' is retrieved from the http session to create a MODE 3 proxy.
static String getAuthenticatedRealm(javax.servlet.http.HttpSession httpSession)
          Get torus realm by user's identity
static com.indexdata.masterkey.pazpar2.client.Pazpar2Client getCachedProxy(javax.servlet.http.HttpSession session, String window)
          Returns a Pazpar2Client from the HTTP session cache
static void saveProxy(com.indexdata.masterkey.pazpar2.client.Pazpar2Client proxy, ServiceRequest request)
          Stores a Pazpar2Client on the HTTP session cache
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pazpar2ClientManager

public Pazpar2ClientManager()
Method Detail

createProxy

public static com.indexdata.masterkey.pazpar2.client.Pazpar2Client createProxy(com.indexdata.masterkey.pazpar2.client.Pazpar2ClientConfiguration proxyConfig,
                                                                               javax.servlet.http.HttpSession httpSession)
                                                                        throws com.indexdata.masterkey.pazpar2.client.exceptions.ProxyErrorException
Constructs a Pazpar2 proxy client based on the proxy configuration The authenticated 'realm' is retrieved from the http session to create a MODE 3 proxy.

Parameters:
httpSession - Contains session and target settings information
moduleConfiguration - Contains the plug-in configuration properties
Returns:
Pazpar2Client in mode "1", "2" or "3"
Throws:
com.indexdata.masterkey.pazpar2.client.exceptions.ProxyErrorException

getAuthenticatedRealm

public static String getAuthenticatedRealm(javax.servlet.http.HttpSession httpSession)
                                    throws com.indexdata.masterkey.pazpar2.client.exceptions.ProxyErrorException
Get torus realm by user's identity

Parameters:
httpSession -
Returns:
The user's realm
Throws:
com.indexdata.masterkey.pazpar2.client.exceptions.ProxyErrorException - If authentication fails

getCachedProxy

public static com.indexdata.masterkey.pazpar2.client.Pazpar2Client getCachedProxy(javax.servlet.http.HttpSession session,
                                                                                  String window)
Returns a Pazpar2Client from the HTTP session cache

Parameters:
session -
window -
Returns:

saveProxy

public static void saveProxy(com.indexdata.masterkey.pazpar2.client.Pazpar2Client proxy,
                             ServiceRequest request)
Stores a Pazpar2Client on the HTTP session cache

Parameters:
proxy -
request -


Copyright © 2008-2013 Index Data. All Rights Reserved.