public synchronized void removePosition(Position p) { if (isDataEditable(ResUnit.Position)) { disconnectResources(p); for (Position position : getPositions()) { Position boss = position.getReportsTo(); if ((boss != null) && boss.getID().equals(p.getID())) { position.setReportsTo((Position) null); getDataSource(ResUnit.Position).update(position); } } delPosition(p); getDataSource(ResUnit.Position).delete(p); } }
public Map<String, String> getPositionIdentifiers() { Map<String, String> idMap = new Hashtable<String, String>(); for (Position p : getPositions()) { idMap.put(p.getID(), p.getTitle()); } return idMap; }
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; }
public String getParticpantsWithPositionAsXML(String positionName) { String result = "<participants/>"; if (positionName != null) { Position p = getPositionByLabel(positionName); if (p != null) { result = getPositionParticipantsAsXML(p.getID()); } } return result; }
public Set<Participant> getParticipantsWithPosition(String positionName) { Set<Participant> result = null; if (positionName != null) { Position p = getPositionByLabel(positionName); if (p != null) { result = getPositionParticipants(p.getID()); } } return result; }
public void delPosition(Position p) { positionMap.remove(p.getID()); setChangeStamp(ResUnit.Position); }
public void putPosition(Position p) { positionMap.put(p.getID(), p); setChangeStamp(ResUnit.Position); }