本文整理汇总了Java中org.alfresco.repo.security.authentication.RepositoryAuthenticationDao类的典型用法代码示例。如果您正苦于以下问题:Java RepositoryAuthenticationDao类的具体用法?Java RepositoryAuthenticationDao怎么用?Java RepositoryAuthenticationDao使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RepositoryAuthenticationDao类属于org.alfresco.repo.security.authentication包,在下文中一共展示了RepositoryAuthenticationDao类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: afterPropertiesSet
import org.alfresco.repo.security.authentication.RepositoryAuthenticationDao; //导入依赖的package包/类
@Override
public void afterPropertiesSet() throws Exception {
ParameterCheck.mandatory("authenticationContextManager", authenticationContextManager);
//Attempt to get RepositoryAuthenticationDao from the subsystem
for(String contextName : authenticationContextManager.getInstanceIds())
{
ApplicationContext ctx = authenticationContextManager.getApplicationContext(contextName);
try
{
authenticationDao = (RepositoryAuthenticationDao)
ctx.getBean(RepositoryAuthenticationDao.class);
} catch(NoSuchBeanDefinitionException e) {}
}
}
示例2: getUserNodesInSiteGroup
import org.alfresco.repo.security.authentication.RepositoryAuthenticationDao; //导入依赖的package包/类
/**
* Returns the user nodes (authentication nodes) if the authenticationDao exists
* @param site
* @param authenticationDao
* @return
*/
private List<NodeRef> getUserNodesInSiteGroup(SiteInfo site, RepositoryAuthenticationDao authenticationDao) {
List<NodeRef> userNodes = new ArrayList<NodeRef>();
if(authenticationDao == null)
{
return userNodes;
}
// Identify all the users
String siteGroup = AbstractSiteWebScript.buildSiteGroup(site);
Set<String> siteUsers = authorityService.getContainedAuthorities(
AuthorityType.USER, siteGroup, false);
for (String user : siteUsers)
{
if (USERS_NOT_TO_EXPORT.contains(user))
{
// Don't export these core users like admin
}
else
{
NodeRef userNodeRef = authenticationDao.getUserOrNull(user);
if(userNodeRef != null)
{
userNodes.add(userNodeRef);
}
}
}
return userNodes;
}