}
SessionContainer sessCont = getSessionContainer();
SessionContainer permCont = sessCont.getPermanentContainer();
IEngUserProfile profile = (IEngUserProfile)permCont.getAttribute(IEngUserProfile.ENG_USER_PROFILE);
LowFunctionality targetFunct = DAOFactory.getLowFunctionalityDAO().loadLowFunctionalityByID(new Integer(functID), false);
isHome = "USER_FUNCT".equalsIgnoreCase( targetFunct.getCodType() );
//getting children documents
//LowFunctionality lowFunct = DAOFactory.getLowFunctionalityDAO().loadLowFunctionalityByID(functID, true);
//objects = lowFunct.getBiObjects();
List tmpObjects = DAOFactory.getBIObjectDAO().loadBIObjects(Integer.valueOf(functID), profile,isHome);
objects = new ArrayList();
if(tmpObjects != null) {
for(Iterator it = tmpObjects.iterator(); it.hasNext();) {
BIObject obj = (BIObject)it.next();
if(ObjectsAccessVerifier.checkProfileVisibility(obj, profile))
objects.add(obj);
}
}
HttpServletRequest httpRequest = getHttpRequest();
MessageBuilder m = new MessageBuilder();
Locale locale = m.getLocale(httpRequest);
JSONArray documentsJSON = (JSONArray)SerializerFactory.getSerializer("application/json").serialize( objects ,locale);
Collection func = profile.getFunctionalities();
if(func.contains("SeeMetadataFunctionality")){
JSONObject showmetadataAction = new JSONObject();
showmetadataAction.put("name", "showmetadata");
showmetadataAction.put("description", "Show Metadata");