pl.edu.icm.yadda.remoting.cli
Class CommonContextHelper
java.lang.Object
pl.edu.icm.yadda.remoting.cli.CommonContextHelper
public abstract class CommonContextHelper
- extends java.lang.Object
Context helper class.
- Author:
- mhorst
Method Summary |
static java.lang.String |
buildSessionId(java.lang.String opType,
java.lang.String userId,
java.lang.String domain)
|
static java.lang.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(java.lang.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 java.lang.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 java.lang.String BEAN_AUTHN_MANAGER
BEAN_SESSION_SERVICE
public static java.lang.String BEAN_SESSION_SERVICE
BEAN_IMPORTER_FACTORY
public static java.lang.String BEAN_IMPORTER_FACTORY
PROCESS_MANAGER_FACADE
public static java.lang.String PROCESS_MANAGER_FACADE
PROCESS_MANAGER_FACADE3
public static java.lang.String PROCESS_MANAGER_FACADE3
BEAN_DOMAIN
public static java.lang.String BEAN_DOMAIN
CommonContextHelper
public CommonContextHelper()
getDomain
public static java.lang.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 java.lang.String buildSessionId(java.lang.String opType,
java.lang.String userId,
java.lang.String domain)
pickContextPath
public static java.lang.String pickContextPath(org.apache.commons.cli.CommandLine cli)
- Picks suitable context path.
- Parameters:
cli
-
- Returns:
- suitable context path
maintainSession
public static boolean maintainSession(java.lang.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.