use of org.alfresco.repo.management.subsystems.ChildApplicationContextFactory in project alfresco-remote-api by Alfresco.
the class RemoteAuthenticatorFactoryTest method beforeClass.
@BeforeClass
public static void beforeClass() throws Exception {
ApplicationContext ctx = ApplicationContextHelper.getApplicationContext(contextLocations);
DefaultChildApplicationContextManager childApplicationContextManager = (DefaultChildApplicationContextManager) ctx.getBean("Authentication");
remoteUserAuthenticatorFactory = (RemoteUserAuthenticatorFactory) ctx.getBean("webscripts.authenticator.remoteuser");
personService = (PersonService) ctx.getBean("PersonService");
transactionService = (TransactionService) ctx.getBean("TransactionService");
authenticationDAO = (MutableAuthenticationDao) ctx.getBean("authenticationDao");
childApplicationContextManager.stop();
childApplicationContextManager.setProperty("chain", "external1:external");
ChildApplicationContextFactory childApplicationContextFactory = childApplicationContextManager.getChildApplicationContextFactory("external1");
childApplicationContextFactory.stop();
childApplicationContextFactory.setProperty("external.authentication.proxyUserName", "");
}
Aggregations