pl.edu.icm.yadda.remoting.cli
Class CommonContextHelper

java.lang.Object
  extended by pl.edu.icm.yadda.remoting.cli.CommonContextHelper

public abstract class CommonContextHelper
extends Object

Context helper class.

Author:
mhorst

Field Summary
static String BEAN_AUTHN_MANAGER
           
static String BEAN_CATALOG_FACADE
           
static String BEAN_DOMAIN
           
static String BEAN_EDITOR_FACADE
           
static String BEAN_IMPORTER_FACTORY
           
static String BEAN_SESSION_SERVICE
           
static String INDEX_MANAGER_FACADE
           
static String PROCESS_MANAGER_FACADE
           
static String PROCESS_MANAGER_FACADE3
           
 
Constructor Summary
CommonContextHelper()
           
 
Method Summary
static String buildSessionId(String opType, String userId, String domain)
           
static String getDomain(org.apache.commons.cli.CommandLine cli, org.springframework.context.ConfigurableApplicationContext context)
          Provides domain by checking among commandline attributes of extracting from repository descriptor when available.
static boolean maintainSession(String sessionIdPrefix, org.apache.commons.cli.CommandLine cli, org.springframework.context.ConfigurableApplicationContext context, boolean allowAnonymousIpAuthn)
          Handles security session by either logging in user when details provided or initializing anonymous session.
static String pickContextPath(org.apache.commons.cli.CommandLine cli)
          Picks suitable context path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BEAN_AUTHN_MANAGER

public static String BEAN_AUTHN_MANAGER

BEAN_SESSION_SERVICE

public static String BEAN_SESSION_SERVICE

BEAN_IMPORTER_FACTORY

public static String BEAN_IMPORTER_FACTORY

PROCESS_MANAGER_FACADE

public static String PROCESS_MANAGER_FACADE

PROCESS_MANAGER_FACADE3

public static String PROCESS_MANAGER_FACADE3

INDEX_MANAGER_FACADE

public static String INDEX_MANAGER_FACADE

BEAN_CATALOG_FACADE

public static String BEAN_CATALOG_FACADE

BEAN_EDITOR_FACADE

public static String BEAN_EDITOR_FACADE

BEAN_DOMAIN

public static String BEAN_DOMAIN
Constructor Detail

CommonContextHelper

public CommonContextHelper()
Method Detail

getDomain

public static String getDomain(org.apache.commons.cli.CommandLine cli,
                               org.springframework.context.ConfigurableApplicationContext context)
Provides domain by checking among commandline attributes of extracting from repository descriptor when available. Returns null when domain not specified in either place.

Parameters:
cli -
context -
Returns:

buildSessionId

public static String buildSessionId(String opType,
                                    String userId,
                                    String domain)

pickContextPath

public static String pickContextPath(org.apache.commons.cli.CommandLine cli)
Picks suitable context path.

Parameters:
cli -
Returns:
suitable context path

maintainSession

public static boolean maintainSession(String sessionIdPrefix,
                                      org.apache.commons.cli.CommandLine cli,
                                      org.springframework.context.ConfigurableApplicationContext context,
                                      boolean allowAnonymousIpAuthn)
Handles security session by either logging in user when details provided or initializing anonymous session.

Parameters:
sessionIdPrefix -
cli -
context -
allowAnonymousIpAuthn -
Returns:
true when session maintained successfully, false otherwise


Copyright © 2002-2013 ICM, Warsaw University. All Rights Reserved.