Monitor monitor =MonitorFactory.start("spagobi.core.ObjectAccessVerifier.canSee(BIObject obj, IEngUserProfile profile)");
boolean canSee = false;
if (obj == null){
logger.warn("BIObject in input is null!!");
monitor.stop();
throw new EMFInternalError(EMFErrorSeverity.ERROR, "BIObject in input is null!!");
}
if (profile == null){
logger.warn("User profile in input is null!!");
monitor.stop();
throw new EMFInternalError(EMFErrorSeverity.ERROR, "User profile in input is null!!");
}
String state = obj.getStateCode();
if ("SUSP".equalsIgnoreCase(state)) {
monitor.stop();
return false;
}
List foldersId = obj.getFunctionalities();
if (foldersId == null || foldersId.size() == 0){
logger.warn("BIObject does not belong to any functionality!!");
monitor.stop();
throw new EMFInternalError(EMFErrorSeverity.ERROR, "BIObject does not belong to any functionality!!");
}
Iterator foldersIdIt = foldersId.iterator();
while (foldersIdIt.hasNext()) {
Integer folderId = (Integer) foldersIdIt.next();
boolean canDev = canDev(state, folderId, profile);