本文整理汇总了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);
}
示例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;
}
示例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;
}
示例4: MutableAclService
import org.springframework.security.acls.model.MutableAclService; //导入依赖的package包/类
@Bean
public MutableAclService MutableAclService() {
return new JdbcMutableAclService(dataSource(), lookupStrategy(),
aclCache);
}
示例5: mutableAclService
import org.springframework.security.acls.model.MutableAclService; //导入依赖的package包/类
@Bean
public MutableAclService mutableAclService() {
return new Neo4jMutableAclService(graphDatabaseService(), aclCache,
lookupStrategy());
}
示例6: getMutableAclService
import org.springframework.security.acls.model.MutableAclService; //导入依赖的package包/类
public MutableAclService getMutableAclService() {
return mutableAclService;
}
示例7: setMutableAclService
import org.springframework.security.acls.model.MutableAclService; //导入依赖的package包/类
public void setMutableAclService(MutableAclService mutableAclService) {
this.mutableAclService = mutableAclService;
}
示例8: setMutableAclService
import org.springframework.security.acls.model.MutableAclService; //导入依赖的package包/类
public void setMutableAclService(MutableAclService mutableAclService) {
this.mutableAclService = mutableAclService;
}
示例9: setAclService
import org.springframework.security.acls.model.MutableAclService; //导入依赖的package包/类
public void setAclService(MutableAclService aclService) {
this.aclService = aclService;
}