try {
ObjectNode objectnode = structure.retrieve(this.slideToken,
subject);
if ( !(objectnode instanceof SubjectNode)) {
throw new SourceException("Principal '"+
((PrincipalSourcePermission) sourcepermission).getPrincipal()+
"' doesn't exists");
}
} catch (SlideException se) {
throw new SourceException("Could not retrieve object for principal '"+
((PrincipalSourcePermission) sourcepermission).getPrincipal()+
"'", se);
}
} else if (sourcepermission instanceof GroupSourcePermission) {
subject = config.getUsersPath()+"/"+
((GroupSourcePermission) sourcepermission).getGroup();
// Test if group exists
try {
ObjectNode objectnode = structure.retrieve(this.slideToken,
subject);
if ( !(objectnode instanceof GroupNode)) {
throw new SourceException("Group '"+
((GroupSourcePermission) sourcepermission).getGroup()+
"' doesn't exists");
}
} catch (SlideException se) {
throw new SourceException("Could not retrieve object for group '"+
((GroupSourcePermission) sourcepermission).getGroup()+
"'", se);
}
subject = "+"+subject; // Additional '+' to expand the group
} else {
throw new SourceException("Does't support category of permission");
}
boolean negative = sourcepermission.isNegative();
boolean inheritable = sourcepermission.isInheritable();