Examples of GroupEntity


Examples of org.activiti.engine.impl.persistence.entity.GroupEntity

        List<Group> result = Collections.emptyList();
        SyncopeUser user = userDAO.find(userId);
        if (user != null) {
            result = new ArrayList<Group>();
            for (Long roleId : user.getRoleIds()) {
                result.add(new GroupEntity(roleId.toString()));
            }
        }

        return result;
    }
View Full Code Here

Examples of org.activiti.engine.impl.persistence.entity.GroupEntity

        List<Group> result = Collections.emptyList();
        SyncopeUser user = userDAO.find(userId);
        if (user != null) {
            result = new ArrayList<Group>();
            for (Long roleId : user.getRoleIds()) {
                result.add(new GroupEntity(roleId.toString()));
            }
        }

        return result;
    }
View Full Code Here

Examples of org.activiti.engine.impl.persistence.entity.GroupEntity

    public GroupQuery desc() {
        return this;
    }

    private Group fromSyncopeRole(SyncopeRole role) {
        return new GroupEntity(role.getId().toString());
    }
View Full Code Here

Examples of org.activiti.engine.impl.persistence.entity.GroupEntity

        logger.debug("findGroupsByUser : {}", userId);

        List<Group> groups = new ArrayList<Group>();

        for (OrgDTO orgDto : orgConnector.getOrgsByUserId(userId)) {
            GroupEntity groupEntity = new GroupEntity(orgDto.getId());
            groupEntity.setName(orgDto.getName());
            groupEntity.setType(orgDto.getTypeName());
            groups.add(groupEntity);
        }

        return groups;
    }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.persistence.entity.GroupEntity

      assertEquals(GROUP.resourceName(), e.getResourceType());
      assertEquals(null, e.getResourceId());
    }

    // circumvent auth check to get new transient userobject
    Group group = new GroupEntity("group1");

    try {
      identityService.saveGroup(group);
      fail("exception expected");
View Full Code Here

Examples of org.camunda.bpm.engine.impl.persistence.entity.GroupEntity

      List<Group> groupList = new ArrayList<Group>();
      while (enumeration.hasMoreElements() && groupList.size() < query.getMaxResults()) {
        SearchResult result = enumeration.nextElement();

        if(resultCount >= query.getFirstResult()) {
          GroupEntity group = transformGroup(result);
          if(isAuthorized(READ, GROUP, group.getId())) {
            groupList.add(group);
          }
        }

        resultCount ++;
View Full Code Here

Examples of org.camunda.bpm.engine.impl.persistence.entity.GroupEntity

  // groups ////////////////////////////////////////////////////////

  public GroupEntity createNewGroup(String groupId) {
    checkAuthorization(Permissions.CREATE, Resources.GROUP, null);
    return new GroupEntity(groupId);
  }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.persistence.entity.GroupEntity

    checkAuthorization(Permissions.CREATE, Resources.GROUP, null);
    return new GroupEntity(groupId);
  }

  public GroupEntity saveGroup(Group group) {
    GroupEntity groupEntity = (GroupEntity) group;
    if(groupEntity.getRevision() == 0) {
      checkAuthorization(Permissions.CREATE, Resources.GROUP, null);
      getDbEntityManager().insert(groupEntity);
      createDefaultAuthorizations(group);
    } else {
      checkAuthorization(Permissions.UPDATE, Resources.GROUP, group.getId());
View Full Code Here

Examples of org.camunda.bpm.engine.impl.persistence.entity.GroupEntity

    return groupEntity;
  }

  public void deleteGroup(String groupId) {
    checkAuthorization(Permissions.DELETE, Resources.GROUP, groupId);
    GroupEntity group = findGroupById(groupId);
    if(group != null) {
      deleteMembershipsByGroupId(groupId);
      deleteAuthorizations(Resources.GROUP, groupId);
      getDbEntityManager().delete(group);
    }
View Full Code Here

Examples of org.dspace.rest.entities.GroupEntity

        try {
            context = new Context();
            refreshParams(context);

            if (entityExists(ref.getId())) {
                return new GroupEntity(ref.getId(), context);
            }
        } catch (SQLException ex) {
            throw new EntityException("Internal server error", "SQL error", 500);
        } finally {
            removeConn(context);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.