/* (non-Javadoc)
* @see org.jasig.portal.security.xslt.IXalanGroupMembershipHelper#isChannelDeepMemberOf(java.lang.String, java.lang.String)
*/
public boolean isChannelDeepMemberOf(String fname, String groupKey) {
final IEntityGroup distinguishedGroup = GroupService.findGroup(groupKey);
if (distinguishedGroup == null) {
if (this.logger.isDebugEnabled()) {
this.logger.debug("No group found for key '" + groupKey + "'");
}
return false;
}
final IChannelDefinition channelDefinition;
try {
channelDefinition = this.channelRegistryStore.getChannelDefinition(fname);
}
catch (Exception e) {
this.logger.warn("Caught exception while retrieving channel definition for fname '" + fname + "'", e);
return false;
}
if (channelDefinition == null) {
if (this.logger.isDebugEnabled()) {
this.logger.debug("No channel found for key '" + fname + "'");
}
return false;
}
final Integer channelId = channelDefinition.getId();
final IEntity entity = GroupService.getEntity(channelId.toString(), IChannelDefinition.class);
if (entity == null) {
if (this.logger.isDebugEnabled()) {
this.logger.debug("No channel found for id '" + channelId + "'");
}
return false;
}
return distinguishedGroup.deepContains(entity);
}