pl.edu.icm.yadda.remoting.cli
Class CommonContextHelper
java.lang.Object
pl.edu.icm.yadda.remoting.cli.CommonContextHelper
public abstract class CommonContextHelper
- extends Object
Context helper class.
- Author:
- mhorst
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 |
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
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
CommonContextHelper
public CommonContextHelper()
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-2012 ICM, Warsaw University. All Rights Reserved.