...
The difference between these two is that a Demographic is a grouping based on an explicit Rule. The service architect tries simple first and works with Resource groups by hard-coding an implicit rule.
Gliffy | ||||||
---|---|---|---|---|---|---|
|
Code Block |
---|
// ResourceGroupSession - gets the list of "people" in a "organization of people who can create holds" public getResourcesByGroup(org.osid.id.Id groupResourceId) { // assumption: groupResourceId is an org Id java.util.Collection<org.osid.resource.Resource> ret = new java.util.ArrayList<>(); try (org.osid.personnel.PositionList positions = positionLookupSession.getPositionsForOrganization(groupResourceId)) { while (positions.hasNext()) { org.osid.personnel.Position position = positions.getNextPosition(); // can filter on a type of position try (org.osid.personnel.AppointmentList appointments = appointmentLookupSession.getAppointmentsForPosition(position.getNextId()) { if (appointments.hasNext()) { ret.add(convertPerson2Resource(position.getPerson())); } } } } return (new net.okapia.osid.jamocha.resource.resource.ArrayResourceList(ret)); } |
The above method can be used as an assist for evaluating the list of Agents associated with a Resource. There are many valid permutations here, but they all boil down to the question of how to determine the relationship among Resources. All that is needed is to refine the filtering rule so it knows what job positions to look at in order to determine if any of them can create Holds.
Wait a minute...
What Was The Question?
...