Esempio n. 1
0
 public Map<String, String> getOrgGroupIdentifiers() {
   Map<String, String> idMap = new Hashtable<String, String>();
   for (OrgGroup o : getOrgGroups()) {
     idMap.put(o.getID(), o.getGroupName());
   }
   return idMap;
 }
Esempio n. 2
0
 public Set<Participant> resolveParticipantsFromResourceName(String anyName) {
   Set<Participant> pSet = new HashSet<Participant>();
   Participant p = getParticipantFromUserID(anyName);
   if (p != null) {
     pSet.add(p);
     return pSet;
   }
   Role r = getRoleByName(anyName);
   if (r != null) {
     pSet.addAll(getRoleParticipants(r.getID()));
     return pSet;
   }
   Position pos = getPositionByLabel(anyName);
   if (pos != null) {
     pSet.addAll(getPositionParticipants(pos.getID()));
     return pSet;
   }
   OrgGroup o = getOrgGroupByLabel(anyName);
   if (o != null) {
     pSet.addAll(getOrgGroupParticipants(o.getID()));
     return pSet;
   }
   Capability c = getCapabilityByLabel(anyName);
   if (c != null) {
     pSet.addAll(getCapabilityParticipants(c.getID()));
   }
   return pSet;
 }
Esempio n. 3
0
  public synchronized void removeOrgGroup(OrgGroup o) {
    if (isDataEditable(ResUnit.OrgGroup)) {
      for (Position position : getPositions()) {
        OrgGroup group = position.getOrgGroup();
        if ((group != null) && group.getID().equals(o.getID())) {
          position.setOrgGroup((OrgGroup) null);
          getDataSource(ResUnit.Position).update(position);
        }
      }

      for (OrgGroup group : getOrgGroups()) {
        OrgGroup owner = group.getBelongsTo();
        if ((owner != null) && owner.getID().equals(o.getID())) {
          group.setBelongsTo((OrgGroup) null);
          getDataSource(ResUnit.OrgGroup).update(group);
        }
      }
      delOrgGroup(o);
      getDataSource(ResUnit.OrgGroup).delete(o);
    }
  }
Esempio n. 4
0
 public void delOrgGroup(OrgGroup o) {
   orgGroupMap.remove(o.getID());
   setChangeStamp(ResUnit.OrgGroup);
 }
Esempio n. 5
0
 public void putOrgGroup(OrgGroup o) {
   orgGroupMap.put(o.getID(), o);
   setChangeStamp(ResUnit.OrgGroup);
 }