当前位置: 首页>>代码示例>>Java>>正文


Java UserNameMatcherImpl类代码示例

本文整理汇总了Java中org.alfresco.repo.security.person.UserNameMatcherImpl的典型用法代码示例。如果您正苦于以下问题:Java UserNameMatcherImpl类的具体用法?Java UserNameMatcherImpl怎么用?Java UserNameMatcherImpl使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


UserNameMatcherImpl类属于org.alfresco.repo.security.person包,在下文中一共展示了UserNameMatcherImpl类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setUp

import org.alfresco.repo.security.person.UserNameMatcherImpl; //导入依赖的package包/类
@Override
protected void setUp() throws Exception
{
    super.setUp();
    
    this.authenticationService = (MutableAuthenticationService)getServer().getApplicationContext().getBean("AuthenticationService");
    this.authenticationComponent = (AuthenticationComponent)getServer().getApplicationContext().getBean("authenticationComponent");
    this.personService = (PersonService)getServer().getApplicationContext().getBean("PersonService");
    this.userNameMatcherImpl = (UserNameMatcherImpl)getServer().getApplicationContext().getBean("userNameMatcher");
    
    this.authenticationComponent.setSystemUserAsCurrentUser();
    
    // Create users
    createUser(USER_ONE);
    createUser(USER_TWO);
    createUser(USER_THREE);
    
    // Do tests as user one
    this.authenticationComponent.setCurrentUser(USER_ONE);
}
 
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:21,代码来源:PersonServiceTest.java

示例2: setUp

import org.alfresco.repo.security.person.UserNameMatcherImpl; //导入依赖的package包/类
@Override
protected void setUp() throws Exception
{
    super.setUp();
    MockitoAnnotations.initMocks(this);

    ApplicationContext ctx = getServer().getApplicationContext();
    this.authenticationService = (MutableAuthenticationService)ctx.getBean("AuthenticationService");
    this.authenticationComponent = (AuthenticationComponent)ctx.getBean("authenticationComponent");
    this.personService = (PersonService)ctx.getBean("PersonService");
    this.userNameMatcherImpl = (UserNameMatcherImpl)ctx.getBean("userNameMatcher");
    this.nodeService = (NodeService)ctx.getBean("NodeService");
    this.contentService = (ContentService)ctx.getBean("contentService");
    this.userUsageTrackingComponent = (UserUsageTrackingComponent)ctx.getBean("userUsageTrackingComponent");
    this.contentUsage = (ContentUsageImpl)ctx.getBean("contentUsageImpl");
    this.transactionService = (TransactionService) ctx.getBean("TransactionService");

	serviceRegistry = (ServiceDescriptorRegistry) ctx.getBean("ServiceRegistry");
	serviceRegistry.setMockSearchService(mockSearchService);
    when(mockSearchService.query(any())).thenReturn(mockSearchServiceQueryResultSet);
    when(mockSearchServiceQueryResultSet.getNodeRefs()).thenReturn(dummySearchServiceQueryNodeRefs);

    // enable usages
    contentUsage.setEnabled(true);
    contentUsage.init();
    userUsageTrackingComponent.setEnabled(true);
    userUsageTrackingComponent.init();
    userUsageTrackingComponent.bootstrapInternal();

    this.authenticationComponent.setSystemUserAsCurrentUser();

    // Create users
    createUser(USER_ONE);
    createUser(USER_TWO);
    createUser(USER_THREE);
    
    // Do tests as user one
    this.authenticationComponent.setCurrentUser(USER_ONE);
}
 
开发者ID:Alfresco,项目名称:alfresco-remote-api,代码行数:40,代码来源:PersonServiceTest.java


注:本文中的org.alfresco.repo.security.person.UserNameMatcherImpl类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。