本文整理汇总了Java中org.oscm.vo.VOUser.setUserId方法的典型用法代码示例。如果您正苦于以下问题:Java VOUser.setUserId方法的具体用法?Java VOUser.setUserId怎么用?Java VOUser.setUserId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.oscm.vo.VOUser
的用法示例。
在下文中一共展示了VOUser.setUserId方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: run
import org.oscm.vo.VOUser; //导入方法依赖的package包/类
@Override
public void run() {
while (!interrupted()) {
if (userIds.size() > 0) {
String userId = pickRandomUser(userIds);
try {
IdentityService idSrv = ServiceFactory.getDefault()
.getIdentityService(organizationAdminKey,
WebserviceTestBase.DEFAULT_PASSWORD);
VOUser user = new VOUser();
user.setUserId(userId);
VOUserDetails userDetails = idSrv.getUserDetails(user);
System.out.println("DISTURBER (" + userId
+ "): read user information... ("
+ userDetails.getKey() + ")");
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
}
示例2: setup
import org.oscm.vo.VOUser; //导入方法依赖的package包/类
@Override
protected void setup(TestContainer container) throws Exception {
container.enableInterfaceMocking(true);
container.addBean(Mockito.mock(BesDAO.class));
container.addBean(instanceDAO = Mockito.mock(ServiceInstanceDAO.class));
container.addBean(
authSvc = Mockito.mock(APPAuthenticationServiceBean.class));
container.addBean(
concSvc = Mockito.mock(APPConcurrencyServiceBean.class));
container.addBean(
configSvc = Mockito.mock(APPConfigurationServiceBean.class));
container.addBean(
commSvc = Mockito.mock(APPCommunicationServiceBean.class));
container.addBean(platformSvc = spy(new APPlatformServiceBean()));
container.get(APPlatformService.class);
Answer<HashMap<String, String>> answer = new Answer<HashMap<String, String>>() {
@Override
public HashMap<String, String> answer(InvocationOnMock invocation)
throws Throwable {
HashMap<String, String> map = new HashMap<>();
map.put("key", "value");
return map;
}
};
Mockito.doAnswer(answer).when(configSvc)
.getControllerConfigurationSettings(Matchers.anyString());
defaultUser = new VOUser();
defaultUser.setUserId("user");
defaultAuth = new PasswordAuthentication("user", "password");
platformSvc.setAuthService(authSvc);
platformSvc.setConfigService(configSvc);
platformSvc.setConcurrencyService(concSvc);
platformSvc.setMailService(commSvc);
platformSvc.setInstanceDAO(instanceDAO);
}
示例3: getUserKeyById
import org.oscm.vo.VOUser; //导入方法依赖的package包/类
/**
* Retrieve user key by its id.
*/
private long getUserKeyById(IdentityService idSvc, String userId)
throws Exception {
VOUser votpUser = new VOUser();
votpUser.setUserId(userId);
votpUser = idSvc.getUser(votpUser);
return votpUser.getKey();
}
示例4: toDomUserConvert
import org.oscm.vo.VOUser; //导入方法依赖的package包/类
@Test
public void toDomUserConvert() {
// given
VOUser user = new VOUser();
user.setKey(VALID_KEY);
user.setUserId(VALID_ID);
// when
PlatformUser pUser = Converter.convert(user, VOUser.class,
PlatformUser.class);
Assert.assertEquals(user.getKey(), pUser.getKey());
Assert.assertEquals(user.getUserId(), pUser.getUserId());
}
示例5: convert
import org.oscm.vo.VOUser; //导入方法依赖的package包/类
@Override
public VOUser convert(PlatformUser platformUser) {
if (platformUser == null) {
return null;
}
VOUser user = new VOUser();
// Base user data
user.setKey(platformUser.getKey());
user.setVersion(platformUser.getVersion());
user.setUserId(platformUser.getUserId());
return user;
}
示例6: setup
import org.oscm.vo.VOUser; //导入方法依赖的package包/类
@Override
protected void setup(TestContainer container) throws Exception {
container.addBean(LoggerFactory.getLogger(APPTimerServiceBean.class));
container.addBean(instanceDAO = new ServiceInstanceDAO());
container.addBean(configService = Mockito
.mock(APPConfigurationServiceBean.class));
container.addBean(mock(APPConcurrencyServiceBean.class));
container.addBean(provFactoryBean = Mockito
.mock(ProductProvisioningServiceFactoryBean.class));
provService = mock(ProvisioningService.class);
doReturn(provService).when(provFactoryBean)
.getInstance(any(ServiceInstance.class));
container.addBean(
mailService = Mockito.mock(APPCommunicationServiceBean.class));
container.addBean(besDAOMock = mock(BesDAO.class));
doReturn(Arrays.asList(new VOUserDetails())).when(besDAOMock)
.getBESTechnologyManagers(any(ServiceInstance.class));
operationDAOMock = mock(OperationDAO.class);
container.addBean(operationDAOMock);
container.addBean(opBean = mock(OperationServiceBean.class));
container.addBean(mock(APPAuthenticationServiceBean.class));
container.addBean(new APPlatformServiceBean());
controller = mock(APPlatformController.class);
InitialContext context = new InitialContext();
context.bind("bss/app/controller/ess.vmware", controller);
container.addBean(controller);
timer = mock(Timer.class);
defaultUser = new VOUser();
defaultUser.setUserId("user");
em = instanceDAO.em;
container.addBean(timerService = spy(new APPTimerServiceBean()));
container.addBean(timerService1 = spy(new APPTimerServiceBean()));
timerService.em = em;
timerService1.em = em;
timerService.instanceDAO = instanceDAO;
timerService1.instanceDAO = instanceDAO;
timerService.configService = configService;
timerService1.configService = configService;
timerService.provServFact = provFactoryBean;
timerService1.provServFact = provFactoryBean;
timerService.besDAO = besDAOMock;
timerService1.besDAO = besDAOMock;
timerService.mailService = mailService;
timerService1.mailService = mailService;
timerService.operationDAO = operationDAOMock;
timerService1.operationDAO = operationDAOMock;
timerService.opBean = opBean;
timerService1.opBean = opBean;
timerService.appTimerServiceBean = timerService1;
}
示例7: createVOUser
import org.oscm.vo.VOUser; //导入方法依赖的package包/类
public static VOUser createVOUser(String userId) {
VOUser user = new VOUser();
user.setUserId(userId);
return user;
}
示例8: createUsageLicenceVO
import org.oscm.vo.VOUser; //导入方法依赖的package包/类
public VOUsageLicense createUsageLicenceVO(String userId) {
VOUser user = new VOUser();
user.setUserId(userId);
return createUsageLicenceVO(user);
}
示例9: toVOUser
import org.oscm.vo.VOUser; //导入方法依赖的package包/类
private VOUser toVOUser(PlatformUser pUser) {
VOUser voUser = new VOUser();
voUser.setUserId(pUser.getUserId());
return voUser;
}