Package com.im.df.impl.db.sprovider
Class SproviderUtils
- java.lang.Object
-
- com.im.df.impl.db.sprovider.SproviderUtils
-
public final class SproviderUtils extends Object
Public static methods.- Author:
- Petr Hamernik
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisRoleLicensed(org.springframework.security.core.GrantedAuthority role)static booleanisTrue(Properties props, String p)static voidmakeAnonymousLogin(org.springframework.beans.factory.BeanFactory ctx)static org.springframework.context.ApplicationContextreadApplicationContext(Properties props, com.im.commons.progress.DFEnvironmentRO env, String[] additionalContexts)Creates an application context using the provided properties.
-
-
-
Method Detail
-
readApplicationContext
public static org.springframework.context.ApplicationContext readApplicationContext(Properties props, com.im.commons.progress.DFEnvironmentRO env, String[] additionalContexts)
Creates an application context using the provided properties. Note: this method is public as an implementation detail, so DBImplBackdoor can access it. The method will become inaccessible once the SchemaProvider implementation will be adapted to create new schemas. The method creates both local and remote context based on the connecting schema. For the remote and local schema there are some specific context configuration files and some shared configuration files. This method detect the operation mode and create the context using operation mode specific configuration files and shared configuration files- Parameters:
props- Properties initialized according to DBImplSchemaProvider.* constants.env- The feedback environment.additionalContexts- The extra springframework configs that will be added to the application context.- Returns:
- The
ApplicationContextinstance set up for the IJC schema determined fromprops.
-
makeAnonymousLogin
public static void makeAnonymousLogin(org.springframework.beans.factory.BeanFactory ctx)
-
isRoleLicensed
public static boolean isRoleLicensed(org.springframework.security.core.GrantedAuthority role)
- Parameters:
role- user role to check when IJC license is not found- Returns:
trueif exists valid license forLicenseManager.INSTANT_JCHEMor if givenroleis not an "executive" role. Otherwise returnsfalse. "Executive" roles areRoles.ADMIN,Roles.EDIT_SCHEMA.
-
isTrue
public static boolean isTrue(Properties props, String p)
-
-