/** * New script group * @param fullName String * @param serviceRegistry ServiceRegistry * @param scope Scriptable */ public ScriptGroup(String fullName, ServiceRegistry serviceRegistry, Scriptable scope) { this(fullName, null, serviceRegistry, serviceRegistry.getAuthorityService(), scope); }
/** * New script group * @param fullName String * @param displayName String * @param serviceRegistry ServiceRegistry * @param scope Scriptable */ public ScriptGroup(String fullName, String displayName, ServiceRegistry serviceRegistry, Scriptable scope) { this(fullName, displayName, serviceRegistry, serviceRegistry.getAuthorityService(), scope); }
/** * New script group * @param fullName String * @param serviceRegistry ServiceRegistry * @param scope Scriptable */ public ScriptGroup(String fullName, ServiceRegistry serviceRegistry, Scriptable scope) { this(fullName, null, serviceRegistry, serviceRegistry.getAuthorityService(), scope); }
/** * New script group * @param fullName String * @param displayName String * @param serviceRegistry ServiceRegistry * @param scope Scriptable */ public ScriptGroup(String fullName, String displayName, ServiceRegistry serviceRegistry, Scriptable scope) { this(fullName, displayName, serviceRegistry, serviceRegistry.getAuthorityService(), scope); }
public void setServiceRegistry(ServiceRegistry serviceRegistry) { this.serviceRegistry = serviceRegistry; this.authorityService = serviceRegistry.getAuthorityService(); this.personService = serviceRegistry.getPersonService(); }
public void setServiceRegistry(ServiceRegistry serviceRegistry) { this.serviceRegistry = serviceRegistry; this.authorityService = serviceRegistry.getAuthorityService(); this.personService = serviceRegistry.getPersonService(); }
String actualName = services.getAuthorityService().getName(AuthorityType.GROUP, groupName); if (authorityService.authorityExists(actualName) == false)
String actualName = services.getAuthorityService().getName(AuthorityType.GROUP, groupName); if (authorityService.authorityExists(actualName) == false)
/** * Constructs a scriptable object representing a user. * * @param userName The username * @param personNodeRef The NodeRef * @param serviceRegistry A ServiceRegistry instance * @param scope Script scope * @since 4.0 */ public ScriptUser(String userName, NodeRef personNodeRef, ServiceRegistry serviceRegistry, Scriptable scope) { this.serviceRegistry = serviceRegistry; this.authorityService = serviceRegistry.getAuthorityService(); this.personService = serviceRegistry.getPersonService(); this.scope = scope; this.personNodeRef = personNodeRef == null ? personService.getPerson(userName) : personNodeRef; this.userName = userName; this.shortName = authorityService.getShortName(userName); NodeService nodeService = serviceRegistry.getNodeService(); String firstName = (String)nodeService.getProperty(this.personNodeRef, ContentModel.PROP_FIRSTNAME); String lastName = (String)nodeService.getProperty(this.personNodeRef, ContentModel.PROP_LASTNAME); this.displayName = this.fullName = (firstName != null ? firstName : "") + (lastName != null ? (' ' + lastName) : ""); }
/** * Constructs a scriptable object representing a user. * * @param userName The username * @param personNodeRef The NodeRef * @param serviceRegistry A ServiceRegistry instance * @param scope Script scope * @since 4.0 */ public ScriptUser(String userName, NodeRef personNodeRef, ServiceRegistry serviceRegistry, Scriptable scope) { this.serviceRegistry = serviceRegistry; this.authorityService = serviceRegistry.getAuthorityService(); this.personService = serviceRegistry.getPersonService(); this.scope = scope; this.personNodeRef = personNodeRef == null ? personService.getPerson(userName) : personNodeRef; this.userName = userName; this.shortName = authorityService.getShortName(userName); NodeService nodeService = serviceRegistry.getNodeService(); String firstName = (String)nodeService.getProperty(this.personNodeRef, ContentModel.PROP_FIRSTNAME); String lastName = (String)nodeService.getProperty(this.personNodeRef, ContentModel.PROP_LASTNAME); this.displayName = this.fullName = (firstName != null ? firstName : "") + (lastName != null ? (' ' + lastName) : ""); }
public void setUp() throws Exception { if (AlfrescoTransactionSupport.getTransactionReadState() != TxnReadState.TXN_NONE) { throw new AlfrescoRuntimeException( "A previous tests did not clean up transaction: " + AlfrescoTransactionSupport.getTransactionId()); } serviceRegistry = (ServiceRegistry)ctx.getBean("ServiceRegistry"); SimpleCache<String, RepositoryAuthenticationDao.CacheEntry> authenticationCache = (SimpleCache<String, RepositoryAuthenticationDao.CacheEntry>) ctx.getBean("authenticationCache"); SimpleCache<String, NodeRef> immutableSingletonCache = (SimpleCache<String, NodeRef>) ctx.getBean("immutableSingletonCache"); TenantService tenantService = (TenantService) ctx.getBean("tenantService"); compositePasswordEncoder = (CompositePasswordEncoder) ctx.getBean("compositePasswordEncoder"); PolicyComponent policyComponent = (PolicyComponent) ctx.getBean("policyComponent"); repositoryAuthenticationDao = new RepositoryAuthenticationDao(); repositoryAuthenticationDao.setTransactionService(serviceRegistry.getTransactionService()); repositoryAuthenticationDao.setAuthorityService(serviceRegistry.getAuthorityService()); repositoryAuthenticationDao.setTenantService(tenantService); repositoryAuthenticationDao.setNodeService(serviceRegistry.getNodeService()); repositoryAuthenticationDao.setNamespaceService(serviceRegistry.getNamespaceService()); repositoryAuthenticationDao.setCompositePasswordEncoder(compositePasswordEncoder); repositoryAuthenticationDao.setPolicyComponent(policyComponent); repositoryAuthenticationDao.setAuthenticationCache(authenticationCache); repositoryAuthenticationDao.setSingletonCache(immutableSingletonCache); upgradePasswordHashWorker = (UpgradePasswordHashWorker)ctx.getBean("upgradePasswordHashWorker"); nodeService = serviceRegistry.getNodeService(); AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getSystemUserName()); }
AuthorityService authorityService = serviceRegistry.getAuthorityService(); PersonService personService = serviceRegistry.getPersonService();