本文整理汇总了Java中org.oscm.provisioning.data.User.setUserFirstName方法的典型用法代码示例。如果您正苦于以下问题:Java User.setUserFirstName方法的具体用法?Java User.setUserFirstName怎么用?Java User.setUserFirstName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.oscm.provisioning.data.User
的用法示例。
在下文中一共展示了User.setUserFirstName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: toUserList
import org.oscm.provisioning.data.User; //导入方法依赖的package包/类
/**
* Maps the given list of UsageLicenses to a list of User instances. Sets
* user (name, id, ...) and subscription (admin, applicationUserId) specific
* data.
*
* @param usageLicenses
* the UsageLicenes to map
* @return a list of User instances
*/
private List<User> toUserList(List<UsageLicense> usageLicenses) {
List<User> users = new ArrayList<>();
if (usageLicenses != null) {
for (UsageLicense usageLicense : usageLicenses) {
User userWithRole = new User();
userWithRole.setApplicationUserId(
usageLicense.getApplicationUserId());
PlatformUser platformUser = usageLicense.getUser();
userWithRole.setUserId(platformUser.getUserId());
userWithRole.setUserFirstName(platformUser.getFirstName());
userWithRole.setUserLastName(platformUser.getLastName());
userWithRole.setEmail(platformUser.getEmail());
userWithRole.setLocale(platformUser.getLocale());
RoleDefinition userRoleDefinition = usageLicense
.getRoleDefinition();
if (userRoleDefinition != null) {
userWithRole
.setRoleIdentifier(userRoleDefinition.getRoleId());
}
users.add(userWithRole);
}
}
return users;
}
示例2: toProvisioningUser
import org.oscm.provisioning.data.User; //导入方法依赖的package包/类
/**
* Transforms a OSCM provisioning user entity into an APP service user
* entity.
*/
public static User toProvisioningUser(ServiceUser fromUser) {
if (fromUser == null) {
return null;
}
User toUser = new User();
toUser.setApplicationUserId(fromUser.getApplicationUserId());
toUser.setEmail(fromUser.getEmail());
toUser.setLocale(fromUser.getLocale());
toUser.setRoleIdentifier(fromUser.getRoleIdentifier());
toUser.setUserId(fromUser.getUserId());
toUser.setUserLastName(fromUser.getLastName());
toUser.setUserFirstName(fromUser.getFirstName());
return toUser;
}
示例3: getCurrentUser
import org.oscm.provisioning.data.User; //导入方法依赖的package包/类
private User getCurrentUser() {
PlatformUser pUser = ds.getCurrentUserIfPresent();
if (pUser == null) {
return null;
}
User user = new User();
user.setEmail(pUser.getEmail());
user.setLocale(pUser.getLocale());
user.setUserFirstName(pUser.getFirstName());
user.setUserLastName(pUser.getLastName());
user.setUserId(pUser.getUserId());
return user;
}
示例4: createUsers
import org.oscm.provisioning.data.User; //导入方法依赖的package包/类
@Override
public User[] createUsers(Subscription subscription,
List<UsageLicense> usageLicenses)
throws TechnicalServiceNotAliveException,
TechnicalServiceOperationException {
User[] users = new User[usageLicenses.size()];
List<User> userList = new ArrayList<>();
for (UsageLicense usageLicense : usageLicenses) {
PlatformUser platformUser = usageLicense.getUser();
addedUsers.put(platformUser.getUserId(), platformUser);
User user = new User();
user.setApplicationUserId(platformUser.getUserId());
user.setEmail(platformUser.getEmail());
user.setLocale(platformUser.getLocale());
user.setUserId(platformUser.getUserId());
user.setUserFirstName(platformUser.getFirstName());
user.setUserLastName(platformUser.getLastName());
RoleDefinition roleDefinition = usageLicense.getRoleDefinition();
if (roleDefinition != null) {
user.setRoleIdentifier(roleDefinition.getRoleId());
}
userList.add(user);
}
users = userList.toArray(new User[userList.size()]);
userModificationCallReceived = true;
return users;
}
示例5: createUsers
import org.oscm.provisioning.data.User; //导入方法依赖的package包/类
@Override
@TransactionAttribute(TransactionAttributeType.MANDATORY)
public User[] createUsers(Subscription subscription,
List<UsageLicense> usageLicenses)
throws TechnicalServiceNotAliveException,
TechnicalServiceOperationException {
User[] users = new User[usageLicenses.size()];
List<User> userList = new ArrayList<>();
for (UsageLicense usageLicense : usageLicenses) {
PlatformUser platformUser = usageLicense.getUser();
addedUsers.put(platformUser.getUserId(), platformUser);
User user = new User();
user.setApplicationUserId(platformUser.getUserId());
user.setEmail(platformUser.getEmail());
user.setLocale(platformUser.getLocale());
user.setUserId(platformUser.getUserId());
user.setUserFirstName(platformUser.getFirstName());
user.setUserLastName(platformUser.getLastName());
RoleDefinition roleDefinition = usageLicense.getRoleDefinition();
if (roleDefinition != null) {
user.setRoleIdentifier(roleDefinition.getRoleId());
}
userList.add(user);
}
users = userList.toArray(new User[userList.size()]);
userModificationCallReceived = true;
return users;
}