* Produces a group servant
* @return the group servant
*/
private synchronized IServant getGroupServant() throws PortalException {
if ( servants.size() > MAX_SERVANTS ) servants.clear();
IServant groupServant = (IServant) servants.get(getServantKey());
if ( groupServant == null ) {
try {
// create the appropriate servant
if ( servantFragmentId != null && CommonUtils.parseInt(servantFragmentId) > 0 ) {
groupServant = CGroupsManagerServantFactory.getGroupsServantforSelection(staticData,
"Please select groups or people who should have access to this fragment:",
GroupService.EVERYONE,true,true,getGroupMembers(servantFragmentId));
} else
groupServant = CGroupsManagerServantFactory.getGroupsServantforSelection(staticData,
"Please select groups or people who should have access to this fragment:",
GroupService.EVERYONE);
if ( groupServant != null )
servants.put(getServantKey(),groupServant);
} catch (Exception e) {
throw new PortalException(e);
}
}
groupServant.setRuntimeData((ChannelRuntimeData)runtimeData.clone());
return groupServant;
}