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


Java ApplicationUser.getName方法代码示例

本文整理汇总了Java中org.isisaddons.module.security.dom.user.ApplicationUser.getName方法的典型用法代码示例。如果您正苦于以下问题:Java ApplicationUser.getName方法的具体用法?Java ApplicationUser.getName怎么用?Java ApplicationUser.getName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.isisaddons.module.security.dom.user.ApplicationUser的用法示例。


在下文中一共展示了ApplicationUser.getName方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: userProfileName

import org.isisaddons.module.security.dom.user.ApplicationUser; //导入方法依赖的package包/类
@Override
@Programmatic
public String userProfileName() {
    final ApplicationUser applicationUser = meService.me();

    final StringBuilder buf = new StringBuilder();
    final String username = applicationUser.getName();
    final ApplicationTenancy tenancy = applicationUser.getTenancy();

    buf.append("Hi ");
    buf.append(username);
    if (tenancy.getName() != null) {
        buf.append(" @").append(tenancy.getName());
    }

    return buf.toString();
}
 
开发者ID:bibryam,项目名称:rotabuilder,代码行数:18,代码来源:UserProfileServiceShowingTenancy.java

示例2: userProfileName

import org.isisaddons.module.security.dom.user.ApplicationUser; //导入方法依赖的package包/类
@Override
@Programmatic
public String userProfileName() {
    final ApplicationUser applicationUser = meService.me();

    final StringBuilder buf = new StringBuilder();
    final String username = applicationUser.getName();
    final String atPath = applicationUser.getAtPath();
    final ApplicationTenancy tenancy = applicationTenancyRepository.findByPath(atPath);

    buf.append("Hi ");
    buf.append(username);
    if (tenancy.getName() != null) {
        buf.append(" @").append(tenancy.getName());
    }

    return buf.toString();
}
 
开发者ID:bibryam,项目名称:semat,代码行数:19,代码来源:UserProfileServiceShowingTenancy.java

示例3: userProfileName

import org.isisaddons.module.security.dom.user.ApplicationUser; //导入方法依赖的package包/类
@Override
@Programmatic
public String userProfileName() {
    final ApplicationUser applicationUser = meService.me();

    final StringBuilder buf = new StringBuilder();
    final String username = applicationUser.getName();
    final ApplicationTenancy tenancy = applicationUser.getTenancy();

    buf.append("Hi ");
    buf.append(username);
    if (!tenancy.getPath().equals(UsersTenancy.TENANCY_PATH + username)) {
        buf.append(" @").append(tenancy.getName());
    }

    return buf.toString();
}
 
开发者ID:isisaddons-legacy,项目名称:isis-app-quickstart,代码行数:18,代码来源:UserProfileServiceShowingTenancy.java

示例4: userProfileName

import org.isisaddons.module.security.dom.user.ApplicationUser; //导入方法依赖的package包/类
@Override
@Programmatic
public String userProfileName() {
    final ApplicationUser applicationUser = meService.me();

    final StringBuilder buf = new StringBuilder();
    final String username = applicationUser.getName();
    final String tenancyPath = applicationUser.getAtPath();

    buf.append("Hi ");
    buf.append(username);
    buf.append(" @").append(tenancyPath);

    return buf.toString();
}
 
开发者ID:incodehq,项目名称:ecpcrm,代码行数:16,代码来源:UserProfileServiceShowingTenancy.java

示例5: createTenancyIfRequired

import org.isisaddons.module.security.dom.user.ApplicationUser; //导入方法依赖的package包/类
protected void createTenancyIfRequired(final ApplicationUser newUser) {
    final String username = newUser.getName();
    final String atPath = UsersTenancy.TENANCY_PATH + username;  // eg "/users/fred"
    ApplicationTenancy applicationTenancy = applicationTenancyRepository.findByName(atPath);
    if(applicationTenancy == null) {
        final ApplicationTenancy globalTenancy = applicationTenancyRepository.findByPath(                    UsersTenancy.TENANCY_PATH);
        applicationTenancy = applicationTenancyRepository.newTenancy(username, atPath, globalTenancy);
    }
    newUser.setTenancy(applicationTenancy);
}
 
开发者ID:isisaddons,项目名称:isis-app-todoapp,代码行数:11,代码来源:ApplicationUserAndTenancySubscriptions.java

示例6: deleteTenancyIfRequired

import org.isisaddons.module.security.dom.user.ApplicationUser; //导入方法依赖的package包/类
protected void deleteTenancyIfRequired(final ApplicationUser newUser) {
    final String username = newUser.getName();
    final String atPath = UsersTenancy.TENANCY_PATH + username;
    final ApplicationTenancy applicationTenancy = applicationTenancyRepository.findByPath(atPath);
    if(applicationTenancy != null) {
        applicationTenancy.delete(true);
    }
}
 
开发者ID:isisaddons,项目名称:isis-app-todoapp,代码行数:9,代码来源:ApplicationUserAndTenancySubscriptions.java

示例7: from

import org.isisaddons.module.security.dom.user.ApplicationUser; //导入方法依赖的package包/类
public static PrincipalForApplicationUser from(ApplicationUser applicationUser) {
    if(applicationUser == null) {
        return null;
    }
    final String username = applicationUser.getName();
    final String encryptedPassword = applicationUser.getEncryptedPassword();
    final AccountType accountType = applicationUser.getAccountType();
    final Set<String> roles = Sets.newTreeSet(Lists.newArrayList(Iterables.transform(applicationUser.getRoles(), ApplicationRole.Functions.GET_NAME)));
    final ApplicationPermissionValueSet permissionSet = applicationUser.getPermissionSet();
    return new PrincipalForApplicationUser(username, encryptedPassword, accountType, applicationUser.getStatus(), roles, permissionSet);
}
 
开发者ID:isisaddons-legacy,项目名称:isis-module-security,代码行数:12,代码来源:PrincipalForApplicationUser.java


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