Package org.jbpm.pvm.internal.identity.spi

Examples of org.jbpm.pvm.internal.identity.spi.IdentitySession


    this.groupType = groupType;
    this.parentGroupId = parentGroupId;
  }

  public String execute(Environment environment) throws Exception {
    IdentitySession identitySession = environment.get(IdentitySession.class);
    return identitySession.createGroup(groupName, groupType, parentGroupId);
  }
View Full Code Here


  public DeleteUserCmd(String userId) {
    this.userId = userId;
  }

  public Void execute(Environment environment) throws Exception {
    IdentitySession identitySession = environment.get(IdentitySession.class);
    identitySession.deleteUser(userId);
    return null;
  }
View Full Code Here

  public FindUserCmd(String userId) {
    this.userId = userId;
  }

  public User execute(Environment environment) {
    IdentitySession identitySession = environment.get(IdentitySession.class);
    return identitySession.findUserById(userId);
  }
View Full Code Here

        throw new JbpmException("failed to add " + addresses + " to senders", e);
      }
    }

    EnvironmentImpl environment = EnvironmentImpl.getCurrent();
    IdentitySession identitySession = environment.get(IdentitySession.class);
    AddressResolver addressResolver = environment.get(AddressResolver.class);

    // resolve and tokenize users
    String userList = fromTemplate.getUsers();
    if (userList != null) {
      String[] userIds = tokenizeActors(userList, execution);
      List<User> users = identitySession.findUsersById(userIds);
      addSenders(resolveAddresses(users, addressResolver), email);
    }

    // resolve and tokenize groups
    String groupList = fromTemplate.getGroups();
    if (groupList != null) {
      for (String groupId : tokenizeActors(groupList, execution)) {
        Group group = identitySession.findGroupById(groupId);
        addSenders(addressResolver.resolveAddresses(group), email);
      }
    }
  }
View Full Code Here

            + recipientType, e);
      }
    }

    EnvironmentImpl environment = EnvironmentImpl.getCurrent();
    IdentitySession identitySession = environment.get(IdentitySession.class);
    AddressResolver addressResolver = environment.get(AddressResolver.class);

    // resolve and tokenize users
    String userList = addressTemplate.getUsers();
    if (userList != null) {
      String[] userIds = tokenizeActors(userList, execution);
      List<User> users = identitySession.findUsersById(userIds);
      addRecipients(resolveAddresses(users, addressResolver), email, recipientType);
    }

    // resolve and tokenize groups
    String groupList = addressTemplate.getGroups();
    if (groupList != null) {
      for (String groupId : tokenizeActors(groupList, execution)) {
        Group group = identitySession.findGroupById(groupId);
        addRecipients(addressResolver.resolveAddresses(group), email, recipientType);
      }
    }
  }
View Full Code Here

      hql.append(" as participant ");

      appendWhereClause("participant.task = task ", hql);
      appendWhereClause("participant.type = 'candidate' ", hql);

      IdentitySession identitySession = EnvironmentImpl.getFromCurrent(IdentitySession.class);
      List<Group> groups = identitySession.findGroupsByUser(candidate);
      if (groups.isEmpty()) {
        groupIds = null;
        appendWhereClause("participant.userId = :candidateUserId ", hql);
       
      } else {
View Full Code Here

TOP

Related Classes of org.jbpm.pvm.internal.identity.spi.IdentitySession

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.