本文整理汇总了Java中org.activiti.engine.impl.identity.Account类的典型用法代码示例。如果您正苦于以下问题:Java Account类的具体用法?Java Account怎么用?Java Account使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Account类属于org.activiti.engine.impl.identity包,在下文中一共展示了Account类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: execute
import org.activiti.engine.impl.identity.Account; //导入依赖的package包/类
public MailScanCmd execute(CommandContext commandContext) {
MailScanCmd mailScanCmd = null;
Account account = new GetUserAccountCmd(userId, userPassword, "mailscan").execute(commandContext);
if (account!=null) {
Map<String, String> details = account.getDetails();
String imapUsername = account.getUsername();
String imapPassword = account.getPassword();
String toDoFolderName = details.get("toDoFolderName");
String toDoInActivitiFolderName = details.get("toDoInActivitiFolderName");
String imapHost = (String) details.get("imapHost");
String imapProtocol = (String) details.get("imapProtocol");
// fall back to the default imapHost and imapProtocol
if (imapHost==null) {
Map<Object, Object> beans = Context
.getProcessEngineConfiguration()
.getBeans();
imapHost = (String) beans.get("imapHost");
imapProtocol = (String) beans.get("imapProtocol");
}
mailScanCmd = new MailScanCmd();
mailScanCmd.setUserId(userId);
mailScanCmd.setImapUsername(imapUsername);
mailScanCmd.setImapPassword(imapPassword);
mailScanCmd.setImapHost(imapHost);
mailScanCmd.setImapProtocol(imapProtocol);
mailScanCmd.setToDoFolderName(toDoFolderName);
mailScanCmd.setToDoInActivitiFolderName(toDoInActivitiFolderName);
}
return mailScanCmd;
}
示例2: testUserAccount
import org.activiti.engine.impl.identity.Account; //导入依赖的package包/类
public void testUserAccount() {
User user = identityService.newUser("testuser");
identityService.saveUser(user);
identityService.setUserAccount("testuser", "123", "google", "mygoogleusername", "mygooglepwd", null);
Account googleAccount = identityService.getUserAccount("testuser", "123", "google");
assertEquals("google", googleAccount.getName());
assertEquals("mygoogleusername", googleAccount.getUsername());
assertEquals("mygooglepwd", googleAccount.getPassword());
identityService.setUserAccount("testuser", "123", "google", "mygoogleusername2", "mygooglepwd2", null);
googleAccount = identityService.getUserAccount("testuser", "123", "google");
assertEquals("google", googleAccount.getName());
assertEquals("mygoogleusername2", googleAccount.getUsername());
assertEquals("mygooglepwd2", googleAccount.getPassword());
identityService.setUserAccount("testuser", "123", "alfresco", "myalfrescousername", "myalfrescopwd", null);
identityService.setUserInfo("testuser", "myinfo", "myvalue");
identityService.setUserInfo("testuser", "myinfo2", "myvalue2");
List<String> expectedUserAccountNames = new ArrayList<String>();
expectedUserAccountNames.add("google");
expectedUserAccountNames.add("alfresco");
List<String> userAccountNames = identityService.getUserAccountNames("testuser");
assertListElementsMatch(expectedUserAccountNames, userAccountNames);
identityService.deleteUserAccount("testuser", "google");
expectedUserAccountNames.remove("google");
userAccountNames = identityService.getUserAccountNames("testuser");
assertListElementsMatch(expectedUserAccountNames, userAccountNames);
identityService.deleteUser(user.getId());
}
示例3: testUserAccountDetails
import org.activiti.engine.impl.identity.Account; //导入依赖的package包/类
public void testUserAccountDetails() {
User user = identityService.newUser("testuser");
identityService.saveUser(user);
Map<String, String> accountDetails = new HashMap<String, String>();
accountDetails.put("server", "localhost");
accountDetails.put("port", "35");
identityService.setUserAccount("testuser", "123", "google", "mygoogleusername", "mygooglepwd", accountDetails);
Account googleAccount = identityService.getUserAccount("testuser", "123", "google");
assertEquals(accountDetails, googleAccount.getDetails());
identityService.deleteUser(user.getId());
}
示例4: getUserAccount
import org.activiti.engine.impl.identity.Account; //导入依赖的package包/类
/** Get account information associated with a user */
Account getUserAccount(String userId, String userPassword, String accountName);
示例5: getUserAccount
import org.activiti.engine.impl.identity.Account; //导入依赖的package包/类
public Account getUserAccount(String userId, String userPassword, String accountName) {
return commandExecutor.execute(new GetUserAccountCmd(userId, userPassword, accountName));
}
示例6: execute
import org.activiti.engine.impl.identity.Account; //导入依赖的package包/类
public Account execute(CommandContext commandContext) {
return commandContext
.getIdentityInfoManager()
.findUserAccountByUserIdAndKey(userId, userPassword, accountName);
}
示例7: getUserAccount
import org.activiti.engine.impl.identity.Account; //导入依赖的package包/类
public Account getUserAccount(String userId, String userPassword,
String accountName) {
return identityService.getUserAccount(userId, userPassword, accountName);
}