use of org.springframework.extensions.jcr.SessionFactory in project pentaho-platform by pentaho.
the class UserRoleDaoIT method setApplicationContext.
public void setApplicationContext(final ApplicationContext applicationContext) throws BeansException {
manager = (IBackingRepositoryLifecycleManager) applicationContext.getBean("backingRepositoryLifecycleManager");
SessionFactory jcrSessionFactory = (SessionFactory) applicationContext.getBean("jcrSessionFactory");
testJcrTemplate = new JcrTemplate(jcrSessionFactory);
testJcrTemplate.setAllowCreate(true);
testJcrTemplate.setExposeNativeSession(true);
repositoryAdminUsername = (String) applicationContext.getBean("repositoryAdminUsername");
authenticatedRoleName = (String) applicationContext.getBean("singleTenantAuthenticatedAuthorityName");
adminRoleName = (String) applicationContext.getBean("singleTenantAdminAuthorityName");
roleBindingDaoTarget = (IRoleAuthorizationPolicyRoleBindingDao) applicationContext.getBean("roleAuthorizationPolicyRoleBindingDaoTarget");
sysAdminRoleName = (String) applicationContext.getBean("superAdminAuthorityName");
sysAdminUserName = (String) applicationContext.getBean("superAdminUserName");
authorizationPolicy = (IAuthorizationPolicy) applicationContext.getBean("authorizationPolicy");
tenantManager = (ITenantManager) applicationContext.getBean("tenantMgrProxy");
repositoryFileDao = (IRepositoryFileDao) applicationContext.getBean("repositoryFileDao");
userRoleDaoProxy = (IUserRoleDao) applicationContext.getBean("userRoleDaoTxn");
userRoleDaoTestProxy = (IUserRoleDao) applicationContext.getBean("userRoleDaoTxn");
tenantedUserNameUtils = (ITenantedPrincipleNameResolver) applicationContext.getBean("tenantedUserNameUtils");
tenantedRoleNameUtils = (ITenantedPrincipleNameResolver) applicationContext.getBean("tenantedRoleNameUtils");
TestPrincipalProvider.userRoleDao = (IUserRoleDao) applicationContext.getBean("userRoleDaoTxn");
TestPrincipalProvider.adminCredentialsStrategy = (CredentialsStrategy) applicationContext.getBean("jcrAdminCredentialsStrategy");
TestPrincipalProvider.repository = (Repository) applicationContext.getBean("jcrRepository");
jcrTemplate = (JcrTemplate) applicationContext.getBean("jcrTemplate");
}
Aggregations