本文整理汇总了Java中org.isisaddons.module.security.dom.user.ApplicationUserRepository类的典型用法代码示例。如果您正苦于以下问题:Java ApplicationUserRepository类的具体用法?Java ApplicationUserRepository怎么用?Java ApplicationUserRepository使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ApplicationUserRepository类属于org.isisaddons.module.security.dom.user包,在下文中一共展示了ApplicationUserRepository类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: lookupPrincipal
import org.isisaddons.module.security.dom.user.ApplicationUserRepository; //导入依赖的package包/类
/**
* @param username
* @param autoCreateUser
*/
private PrincipalForApplicationUser lookupPrincipal(final String username, final boolean autoCreateUser) {
return execute(new TransactionalClosureWithReturnAbstract<PrincipalForApplicationUser>() {
@Override
public PrincipalForApplicationUser execute() {
final ApplicationUser applicationUser = lookupUser();
return PrincipalForApplicationUser.from(applicationUser);
}
private ApplicationUser lookupUser() {
if (autoCreateUser) {
return applicationUserRepository.findOrCreateUserByUsername(username);
} else {
return applicationUserRepository.findByUsername(username);
}
}
@Inject
private ApplicationUserRepository applicationUserRepository;
});
}
示例2: TenantedAuthorizationFacetDefault
import org.isisaddons.module.security.dom.user.ApplicationUserRepository; //导入依赖的package包/类
public TenantedAuthorizationFacetDefault(
final List<ApplicationTenancyEvaluator> evaluators,
final ApplicationUserRepository applicationUserRepository,
final QueryResultsCache queryResultsCache,
final UserService userService,
final FacetHolder holder) {
super(type(), holder, Derivation.NOT_DERIVED);
this.evaluators = evaluators;
this.applicationUserRepository = applicationUserRepository;
this.queryResultsCache = queryResultsCache;
this.userService = userService;
}
开发者ID:isisaddons-legacy,项目名称:isis-module-security,代码行数:13,代码来源:TenantedAuthorizationFacetDefault.java