Package org.jbpm.identity

Examples of org.jbpm.identity.Membership


            final User user = (User) userExpression.getValue(elContext);
            final long membershipId = ((Long)membershipIdExpression.getValue(elContext)).longValue();
            final Set<Membership> membershipSet = (Set<Membership>) user.getMemberships();
            final Iterator<Membership> it = membershipSet.iterator();
            while (it.hasNext()) {
                Membership membership = it.next();
                if (membership.getId() == membershipId) {
                    it.remove();
                    context.getJbpmContext().getSession().delete(membership);
                    break;
                }
            }
View Full Code Here


            if (groupValue == null) {
                context.setError("Error adding membership", "Group value is null");
                return;
            }
            group = (Group) groupValue;
            final Membership membership = Membership.create(user, group);
            if (roleExpression != null) {
                final Object roleValue = roleExpression.getValue(elContext);
                if (roleValue != null) {
                    final String roleValueString = roleValue.toString();
                    if (roleValueString.length() > 0) {
                        membership.setRole(roleValueString);
                    }
                }
            }
            if (targetExpression != null) {
                targetExpression.setValue(elContext, membership);
View Full Code Here

      if (user==null) throw new RuntimeException("unexisting membership user '"+userName+"'");
      String groupName = membershipElement.attributeValue("group");
      Group group = (Group) groups.get(groupName);
      if (group==null) throw new RuntimeException("unexisting membership group '"+groupName+"'");
     
      Membership membership = new Membership();
      membership.setRole(role);
      group.addMembership(membership);
      user.addMembership(membership);
     
      entities.add(membership);
    }
View Full Code Here

      String groupName = membershipElement.attributeValue("group");
      Group group = groups.get(groupName);
      if (group == null)
        throw new JbpmException("unexisting membership group '" + groupName + "'");

      Membership membership = new Membership();
      membership.setRole(membershipElement.attributeValue("role"));
      group.addMembership(membership);
      user.addMembership(membership);

      entities.add(membership);
    }
View Full Code Here

TOP

Related Classes of org.jbpm.identity.Membership

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.