Nester(String name, Thread waiter, ApplicationContext ctx, int batchSize, int batchCount) { super(name); this.setDaemon(true); this.waiter = waiter; this.ctx = ctx; serviceRegistry = (ServiceRegistry) ctx.getBean(ServiceRegistry.SERVICE_REGISTRY); personService = serviceRegistry.getPersonService(); transactionService = serviceRegistry.getTransactionService(); this.batchSize = batchSize; this.batchCount = batchCount; }
Nester(String name, Thread waiter, ApplicationContext ctx, int batchSize, int batchCount) { super(name); this.setDaemon(true); this.waiter = waiter; this.ctx = ctx; serviceRegistry = (ServiceRegistry) ctx.getBean(ServiceRegistry.SERVICE_REGISTRY); personService = serviceRegistry.getPersonService(); transactionService = serviceRegistry.getTransactionService(); this.batchSize = batchSize; this.batchCount = batchCount; }
@Override public void setUp() throws Exception { ServiceRegistry serviceRegistry = (ServiceRegistry) ctx.getBean(ServiceRegistry.SERVICE_REGISTRY); transactionService = serviceRegistry.getTransactionService(); txnHelper = transactionService.getRetryingTransactionHelper(); tenantAdminDAO = (TenantAdminDAO)ctx.getBean("tenantAdminDAO"); }
@Override public void setUp() throws Exception { ServiceRegistry serviceRegistry = (ServiceRegistry) ctx.getBean(ServiceRegistry.SERVICE_REGISTRY); transactionService = serviceRegistry.getTransactionService(); txnHelper = transactionService.getRetryingTransactionHelper(); localeDAO = (LocaleDAO) ctx.getBean("localeDAO"); }
@Override public void setUp() throws Exception { ServiceRegistry serviceRegistry = (ServiceRegistry) ctx.getBean(ServiceRegistry.SERVICE_REGISTRY); transactionService = serviceRegistry.getTransactionService(); txnHelper = transactionService.getRetryingTransactionHelper(); appliedPatchDAO = (AppliedPatchDAO) ctx.getBean("appliedPatchDAO"); }
@Override public void setUp() throws Exception { ServiceRegistry serviceRegistry = (ServiceRegistry) ctx.getBean(ServiceRegistry.SERVICE_REGISTRY); transactionService = serviceRegistry.getTransactionService(); txnHelper = transactionService.getRetryingTransactionHelper(); auditDAO = (AuditDAO) ctx.getBean("auditDAO"); propertyValueDAO = ctx.getBean(PropertyValueDAO.class); }
@Override public void setUp() throws Exception { ServiceRegistry serviceRegistry = (ServiceRegistry) ctx.getBean(ServiceRegistry.SERVICE_REGISTRY); transactionService = serviceRegistry.getTransactionService(); txnHelper = transactionService.getRetryingTransactionHelper(); qnameDAO = (QNameDAO) ctx.getBean("qnameDAO"); }
@Override public void setUp() throws Exception { ServiceRegistry serviceRegistry = (ServiceRegistry) ctx.getBean(ServiceRegistry.SERVICE_REGISTRY); transactionService = serviceRegistry.getTransactionService(); txnHelper = transactionService.getRetryingTransactionHelper(); mimetypeDAO = (MimetypeDAO) ctx.getBean("mimetypeDAO"); }
@Before public void setUp() throws Exception { serviceRegistry = (ServiceRegistry) applicationContext.getBean(ServiceRegistry.SERVICE_REGISTRY); transactionService = serviceRegistry.getTransactionService(); }
@Override public void setUp() throws Exception { ServiceRegistry serviceRegistry = (ServiceRegistry) ctx.getBean(ServiceRegistry.SERVICE_REGISTRY); transactionService = serviceRegistry.getTransactionService(); txnHelper = transactionService.getRetryingTransactionHelper(); aclCrudDAO = (AclCrudDAO)ctx.getBean("aclCrudDAO"); }
@Override public void setUp() throws Exception { ServiceRegistry serviceRegistry = (ServiceRegistry) ctx.getBean(ServiceRegistry.SERVICE_REGISTRY); transactionService = serviceRegistry.getTransactionService(); txnHelper = transactionService.getRetryingTransactionHelper(); encodingDAO = (EncodingDAO) ctx.getBean("encodingDAO"); }
@Override public void setUp() throws Exception { ServiceRegistry serviceRegistry = (ServiceRegistry) ctx.getBean(ServiceRegistry.SERVICE_REGISTRY); transactionService = serviceRegistry.getTransactionService(); txnHelper = transactionService.getRetryingTransactionHelper(); personService = serviceRegistry.getPersonService(); subscriptionsDAO = (SubscriptionsDAO) ctx.getBean("subscriptionsDAO"); }
public void setUp() throws Exception { ctx = ApplicationContextHelper.getApplicationContext(); serviceRegistry = (ServiceRegistry) ctx.getBean(ServiceRegistry.SERVICE_REGISTRY); transactionService = serviceRegistry.getTransactionService(); AuthenticationUtil.setRunAsUserSystem(); }
@Override public void setUp() throws Exception { auditModelRegistry = (AuditModelRegistryImpl) ctx.getBean("auditModel.modelRegistry"); auditComponent = (AuditComponent) ctx.getBean("auditComponent"); serviceRegistry = (ServiceRegistry) ctx.getBean(ServiceRegistry.SERVICE_REGISTRY); transactionService = serviceRegistry.getTransactionService(); // Register the test model URL testModelUrl = ResourceUtils.getURL("classpath:alfresco/testaudit/alfresco-audit-test.xml"); auditModelRegistry.registerModel(testModelUrl); auditModelRegistry.loadAuditModels(); }
@Override protected void setUp() throws Exception { serviceRegistry = (ServiceRegistry) ctx.getBean(ServiceRegistry.SERVICE_REGISTRY); authenticationComponent = (AuthenticationComponent) ctx.getBean("AuthenticationComponent"); transactionService = serviceRegistry.getTransactionService(); nodeService = serviceRegistry.getNodeService(); // Run as system user authenticationComponent.setSystemUserAsCurrentUser(); // Start a transaction txn = transactionService.getUserTransaction(); }
@Override public void setUp() throws Exception { ServiceRegistry serviceRegistry = (ServiceRegistry) ctx.getBean(ServiceRegistry.SERVICE_REGISTRY); transactionService = serviceRegistry.getTransactionService(); txnHelper = transactionService.getRetryingTransactionHelper(); contentDataDAO = (ContentDataDAO) ctx.getBean("contentDataDAO"); contentStore = new FileContentStore(ctx, TempFileProvider.getTempDir()); }
protected void createTestUsers(String encoding) throws Exception { userTransaction = serviceRegistry.getTransactionService().getUserTransaction(); userTransaction.begin(); testUsers = new ArrayList<NodeRef>(5); testUsers.add(createUser("king"+encoding, "king".toCharArray(), encoding)); testUsers.add(createUser("kin" +encoding, "Kong".toCharArray(), encoding)); testUsers.add(createUser("ding"+encoding, "dong".toCharArray(), encoding)); testUsers.add(createUser("ping"+encoding, "pong".toCharArray(),encoding)); testUsers.add(createUser("pin" +encoding, "pop".toCharArray(), encoding)); userTransaction.commit(); }
@Before public void setUp() throws Exception { serviceRegistry = (ServiceRegistry) applicationContext.getBean(ServiceRegistry.SERVICE_REGISTRY); transactionHelper = serviceRegistry.getTransactionService().getRetryingTransactionHelper(); authenticationService = serviceRegistry.getAuthenticationService(); personService = serviceRegistry.getPersonService(); oauth2CredentialsStoreService = (OAuth2CredentialsStoreService) applicationContext.getBean("oauth2CredentialsStoreService"); AuthenticationUtil.setFullyAuthenticatedUser(ADMIN_USER); createUser(TEST_USER_ONE); createUser(TEST_USER_TWO); }
@Before public void before() throws Exception { serviceRegistry = (ServiceRegistry) applicationContext.getBean(ServiceRegistry.SERVICE_REGISTRY); transactionHelper = serviceRegistry.getTransactionService().getRetryingTransactionHelper(); authenticationService = serviceRegistry.getAuthenticationService(); personService = serviceRegistry.getPersonService(); oauth1CredentialsStoreService = (OAuth1CredentialsStoreService) applicationContext.getBean("oauth1CredentialsStoreService"); AuthenticationUtil.setFullyAuthenticatedUser(ADMIN_USER); createUser(TEST_USER_ONE); createUser(TEST_USER_TWO); }
@Before @Override public void setUp() throws Exception { applicationContext = ApplicationContextHelper.getApplicationContext(); this.registry = (ServiceRegistry) applicationContext.getBean(ServiceRegistry.SERVICE_REGISTRY); initializeScheduler(); AuthenticationUtil.setAdminUserAsFullyAuthenticatedUser(); transaction = registry.getTransactionService().getUserTransaction(false); transaction.begin(); createTestContent(); }