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


Java MutableAclService类代码示例

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


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

示例1: setUp

import org.springframework.security.acls.model.MutableAclService; //导入依赖的package包/类
@Before
public void setUp() {
    applicationContext = new ClassPathXmlApplicationContext("spring-context.xml");
    contactsDao = applicationContext.getBean(ContactsDao.class);
    authenticationManager = applicationContext.getBean(AuthenticationManager.class);
    aclService = applicationContext.getBean(MutableAclService.class);
    PlatformTransactionManager transactionManager = applicationContext.getBean(PlatformTransactionManager.class);
    EntityManagerFactory entityManagerFactory = applicationContext.getBean(EntityManagerFactory.class);
    EntityManager entityManager = entityManagerFactory.createEntityManager();
    entityManager.getTransaction().begin();
    entityManager.persist(new Principal("John"));
    entityManager.persist(new Principal("Mary"));
    entityManager.persist(new Role("ROLE_ADMIN"));
    entityManager.persist(new AccessControlledEntityType(User.class));
    entityManager.persist(new AccessControlledEntityType(Contact.class));
    entityManager.getTransaction().commit();
    entityManager.close();
    authenticate("admin");
    testData = new AclContactsTestData(authenticationManager, aclService, transactionManager);
    testData.createTestData(entityManagerFactory);
    SecurityContextHolder.getContext().setAuthentication(null);
}
 
开发者ID:ArneLimburg,项目名称:jpasecurity,代码行数:23,代码来源:SpringContactsTest.java

示例2: DefaultCalendarService

import org.springframework.security.acls.model.MutableAclService; //导入依赖的package包/类
@Autowired
public DefaultCalendarService(final EventDao eventDao,
                              final CalendarUserDao userDao,
                              final CalendarUserRepository userRepository,
                              final PasswordEncoder passwordEncoder,
                              final MutableAclService aclService,
                              final UserContext userContext) {
    if (eventDao == null) {
        throw new IllegalArgumentException("eventDao cannot be null");
    }
    if (userDao == null) {
        throw new IllegalArgumentException("userDao cannot be null");
    }
    if (userRepository == null) {
        throw new IllegalArgumentException("userRepository cannot be null");
    }
    if (passwordEncoder == null) {
        throw new IllegalArgumentException("passwordEncoder cannot be null");
    }
    this.eventDao = eventDao;
    this.userDao = userDao;
    this.passwordEncoder = passwordEncoder;

    this.aclService = aclService;
    this.userContext = userContext;

}
 
开发者ID:PacktPublishing,项目名称:Spring-Security-Third-Edition,代码行数:28,代码来源:DefaultCalendarService.java

示例3: AclContactsTestData

import org.springframework.security.acls.model.MutableAclService; //导入依赖的package包/类
public AclContactsTestData(AuthenticationManager authenticationManager,
                           MutableAclService aclService,
                           PlatformTransactionManager transactionManager) {
    notNull(AuthenticationManager.class, authenticationManager);
    notNull(AclService.class, aclService);
    notNull(PlatformTransactionManager.class, transactionManager);
    this.authenticationManager = authenticationManager;
    this.aclService = aclService;
    this.transactionManager = transactionManager;
}
 
开发者ID:ArneLimburg,项目名称:jpasecurity,代码行数:11,代码来源:AclContactsTestData.java

示例4: MutableAclService

import org.springframework.security.acls.model.MutableAclService; //导入依赖的package包/类
@Bean
public MutableAclService MutableAclService() {
	return new JdbcMutableAclService(dataSource(), lookupStrategy(),
			aclCache);
}
 
开发者ID:shazin,项目名称:spring-security-acl-neo4j,代码行数:6,代码来源:H2TestConfig.java

示例5: mutableAclService

import org.springframework.security.acls.model.MutableAclService; //导入依赖的package包/类
@Bean
public MutableAclService mutableAclService() {
	return new Neo4jMutableAclService(graphDatabaseService(), aclCache,
			lookupStrategy());
}
 
开发者ID:shazin,项目名称:spring-security-acl-neo4j,代码行数:6,代码来源:Neo4jTestConfig.java

示例6: getMutableAclService

import org.springframework.security.acls.model.MutableAclService; //导入依赖的package包/类
public MutableAclService getMutableAclService() {
	return mutableAclService;
}
 
开发者ID:charybr,项目名称:spring-data-rest-acl,代码行数:4,代码来源:SecurityACLDAO.java

示例7: setMutableAclService

import org.springframework.security.acls.model.MutableAclService; //导入依赖的package包/类
public void setMutableAclService(MutableAclService mutableAclService) {
	this.mutableAclService = mutableAclService;
}
 
开发者ID:charybr,项目名称:spring-data-rest-acl,代码行数:4,代码来源:SecurityACLDAO.java

示例8: setMutableAclService

import org.springframework.security.acls.model.MutableAclService; //导入依赖的package包/类
public void setMutableAclService(MutableAclService mutableAclService) {
    this.mutableAclService = mutableAclService;
}
 
开发者ID:AncientMariner,项目名称:SpringByExample,代码行数:4,代码来源:MessageBoardServiceImpl.java

示例9: setAclService

import org.springframework.security.acls.model.MutableAclService; //导入依赖的package包/类
public void setAclService(MutableAclService aclService) {
	this.aclService = aclService;
}
 
开发者ID:dana-i2cat,项目名称:opennaas-routing-nfv,代码行数:4,代码来源:ACLManager.java


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