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


Java Account类代码示例

本文整理汇总了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;
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:35,代码来源:CreateMailScanCmd.java

示例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());
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:36,代码来源:IdentityServiceTest.java

示例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());
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:14,代码来源:IdentityServiceTest.java

示例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);
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:3,代码来源:IdentityService.java

示例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));
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:4,代码来源:IdentityServiceImpl.java

示例6: execute

import org.activiti.engine.impl.identity.Account; //导入依赖的package包/类
public Account execute(CommandContext commandContext) {
  return commandContext
    .getIdentityInfoManager()
    .findUserAccountByUserIdAndKey(userId, userPassword, accountName);
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:6,代码来源:GetUserAccountCmd.java

示例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);
}
 
开发者ID:v5developer,项目名称:maven-framework-project,代码行数:5,代码来源:AccountServiceImpl.java


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