grouper-dev - [grouper-dev] Grouper uPortal GroupStore
Subject: Grouper Developers Forum
List archive
- From: Arnaud Deman <>
- To: Grouper Dev <>
- Subject: [grouper-dev] Grouper uPortal GroupStore
- Date: Fri, 27 Jan 2012 10:07:43 +0100
Hello,
We are using Internet2 GroupStore and I noticed somme small problems in
the class GrouperEntityGroupStore.
In the method : EntityIdentifier[] searchForEntities(String query, int
method, Class type)
The method parameter is not used. This is a problem for a channel
which uses this method whith the parameter IGroupConstants.IS because several
results
can be returned while a single one is expected.
I changed the instruction :
WsGetSubjectsResults wsGetSubjectsResults = new
GcGetSubjects().assignSearchString(query).execute();
whith :
GcGetSubjects gcGetSubject = new GcGetSubjects();
if (IGroupConstants.IS == method) {
WsSubjectLookup subjectLookup = new WsSubjectLookup();
subjectLookup.setSubjectId(query);
gcGetSubject.addWsSubjectLookup(subjectLookup);
} else {
gcGetSubject.assignSearchString(query);
}
WsGetSubjectsResults wsGetSubjectsResults = gcGetSubject.execute();
I added this test to avoid null pointer exception (like it is in the method
searchForGroups) :
if (wsGetSubjectsResults != null && wsGetSubjectsResults.getWsSubjects() !=
null) {
for (WsSubject wsSubject : wsGetSubjectsResults.getWsSubjects()) {
I used the IPerson.class instead of EntityTypes.LEAF_ENTITY_TYPE in the
results :
EntityIdentifier entityIdentifier = new EntityIdentifier( wsSubject.getId(),
"g:gsa".equals(wsSubject.getSourceId()) ? EntityTypes.GROUP_ENTITY_TYPE :
IPerson.class);
I had to do that because this class determines in uPortal how the name
of the entity is retrieved, and nothing was displayed in the uPortal's
groups manager when searching for a person.
I hope this will help,
Best regards,
Arnaud Deman.
--
Arnaud Deman
04 91 28 85 25
DOSI - Aix Marseille Université
Avenue Escadrille Normandie-Niemen
13397 MARSEILLE CEDEX 20
- [grouper-dev] Grouper uPortal GroupStore, Arnaud Deman, 01/27/2012
Archive powered by MHonArc 2.6.16.