public void setServiceRegistry(ServiceRegistry serviceRegistry) { this.serviceRegistry = serviceRegistry; this.authorityService = serviceRegistry.getAuthorityService(); this.personService = serviceRegistry.getPersonService(); }
private PersonService getPersonService() { if (personService == null) { personService = getServiceRegistry().getPersonService(); } return personService; }
private PersonService getPersonService() { if (personService == null) { personService = getServiceRegistry().getPersonService(); } return personService; }
public void setServiceRegistry(ServiceRegistry serviceRegistry) { this.serviceRegistry = serviceRegistry; this.authorityService = serviceRegistry.getAuthorityService(); this.personService = serviceRegistry.getPersonService(); }
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; }
private Set<NodeRef> getUnsubscribedFolders(String userName) { Set<NodeRef> result = new HashSet<NodeRef>(); PersonService personService = serviceRegistry.getPersonService(); NodeRef userRef = personService.getPerson(userName); List<AssociationRef> unsubscribedFodlers = nodeService.getTargetAssocs(userRef, ImapModel.ASSOC_IMAP_UNSUBSCRIBED); for (AssociationRef asocRef : unsubscribedFodlers) { result.add(asocRef.getTargetRef()); } return result; }
/** * Constructor * * @param siteInfo site information */ /*package*/ Site(SiteInfo siteInfo, ServiceRegistry serviceRegistry, SiteService siteService, Scriptable scope) { this.serviceRegistry = serviceRegistry; this.siteService = siteService; this.siteInfo = siteInfo; this.scope = scope; this.invitationService = serviceRegistry.getInvitationService(); NodeService nodeService = serviceRegistry.getNodeService(); PersonService personService = serviceRegistry.getPersonService(); this.scriptInvitationFactory = new ScriptInvitationFactory(invitationService, nodeService, personService); }
public void subscribe(AlfrescoImapUser user, String mailbox) { if (logger.isDebugEnabled()) { logger.debug("Subscribing: " + user + ", " + mailbox); } AlfrescoImapFolder mailFolder = getOrCreateMailbox(user, mailbox, true, false); PersonService personService = serviceRegistry.getPersonService(); NodeRef userRef = personService.getPerson(user.getLogin()); nodeService.removeAssociation(userRef, mailFolder.getFolderInfo().getNodeRef(), ImapModel.ASSOC_IMAP_UNSUBSCRIBED); }
public void subscribe(AlfrescoImapUser user, String mailbox) { if (logger.isDebugEnabled()) { logger.debug("Subscribing: " + user + ", " + mailbox); } AlfrescoImapFolder mailFolder = getOrCreateMailbox(user, mailbox, true, false); PersonService personService = serviceRegistry.getPersonService(); NodeRef userRef = personService.getPerson(user.getLogin()); nodeService.removeAssociation(userRef, mailFolder.getFolderInfo().getNodeRef(), ImapModel.ASSOC_IMAP_UNSUBSCRIBED); }
@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"); }
@Override public FacetLabel getDisplayLabel(String value) { String name = null; final NodeRef personRef = serviceRegistry.getPersonService().getPersonOrNull(value); if (personRef != null) { NodeService nodeService = serviceRegistry.getNodeService(); final String firstName = (String) nodeService.getProperty(personRef, ContentModel.PROP_FIRSTNAME); final String lastName = (String) nodeService.getProperty(personRef, ContentModel.PROP_LASTNAME); name = (firstName != null ? firstName + " " : "") + (lastName != null ? lastName : ""); } return new FacetLabel(value, name == null ? value : name.trim(), -1); } }
public InviteSender(ServiceRegistry services, Repository repository, MessageService messageService) { this.actionService = services.getActionService(); this.nodeService = services.getNodeService(); this.personService = services.getPersonService(); this.searchService = services.getSearchService(); this.siteService = services.getSiteService(); this.fileFolderService = services.getFileFolderService(); this.repoAdminService = services.getRepoAdminService(); this.namespaceService = services.getNamespaceService(); this.repository = repository; this.messageService = messageService; }
public InviteSender(ServiceRegistry services, Repository repository, MessageService messageService) { this.actionService = services.getActionService(); this.nodeService = services.getNodeService(); this.personService = services.getPersonService(); this.searchService = services.getSearchService(); this.siteService = services.getSiteService(); this.fileFolderService = services.getFileFolderService(); this.repoAdminService = services.getRepoAdminService(); this.namespaceService = services.getNamespaceService(); this.repository = repository; this.messageService = messageService; }
@Before public void before() throws Exception { this.serviceRegistry = (ServiceRegistry) applicationContext.getBean(ServiceRegistry.SERVICE_REGISTRY); this.tenantService= (TenantService) applicationContext.getBean("tenantService"); this.tenantAdminService= (TenantAdminService) applicationContext.getBean("tenantAdminService"); this.workflowService = serviceRegistry.getWorkflowService(); this.personService = serviceRegistry.getPersonService(); WorkflowAdminServiceImpl workflowAdminService = (WorkflowAdminServiceImpl)applicationContext.getBean(WorkflowAdminServiceImpl.NAME); this.wfTestHelper = new WorkflowTestHelper(workflowAdminService, getEngine(), true); AuthenticationUtil.clearCurrentSecurityContext(); this.user1 = createTenant(tenant1); this.user2 = createTenant(tenant2); }
@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); }
public void init() { PropertyCheck.mandatory(this, "serviceRegistry", serviceRegistry); PropertyCheck.mandatory(this, "preferenceService", preferenceService); PropertyCheck.mandatory(this, "repositoryHelper", repositoryHelper); PropertyCheck.mandatory(this, "companyHomeChildName", companyHomeChildName); this.nodeService = serviceRegistry.getNodeService(); this.searchService = serviceRegistry.getSearchService(); this.namespaceService = serviceRegistry.getNamespaceService(); this.fileFolderService = serviceRegistry.getFileFolderService(); this.personService = serviceRegistry.getPersonService(); // set the template loader setTemplateLoader(new ClassPathRepoTemplateLoader(nodeService, serviceRegistry.getContentService(), "utf-8")); }
public void init() { PropertyCheck.mandatory(this, "serviceRegistry", serviceRegistry); PropertyCheck.mandatory(this, "preferenceService", preferenceService); PropertyCheck.mandatory(this, "repositoryHelper", repositoryHelper); PropertyCheck.mandatory(this, "companyHomeChildName", companyHomeChildName); this.nodeService = serviceRegistry.getNodeService(); this.searchService = serviceRegistry.getSearchService(); this.namespaceService = serviceRegistry.getNamespaceService(); this.fileFolderService = serviceRegistry.getFileFolderService(); this.personService = serviceRegistry.getPersonService(); // set the template loader setTemplateLoader(new ClassPathRepoTemplateLoader(nodeService, serviceRegistry.getContentService(), "utf-8")); }
@Test public void testNonAdminCannotDeployWorkflowBySwitchingNodeType() { // Test precondition assertNull(workflowService.getDefinitionByName("activiti$testProcess")); AuthenticationUtil.setFullyAuthenticatedUser(USER1); NodeRef person = serviceRegistry.getPersonService().getPerson(USER1); NodeRef home = (NodeRef) nodeService.getProperty(person, ContentModel.PROP_HOMEFOLDER); WorkflowDefinition workflowDef = createContentAndSwitchToWorkflow( "activiti$testProcess", "alfresco/workflow/test-security.bpmn20.xml", home); assertNull("Workflow should not be deployed", workflowDef); }