// this map contains key-values pairs, key = box shortname and values =
// collection of metadata
Map<String, List<IContainable>> mapBoxToContainables = new HashMap<String, List<IContainable>>();
AnagraficaObjectAreaDTO anagraficaObjectDTO = (AnagraficaObjectAreaDTO) command;
// check admin authorization
boolean isAdmin = false;
Context context = UIUtil.obtainContext(request);
if (AuthorizeManager.isAdmin(context))
{
isAdmin = true;
}
DynamicAnagraficaObjectDTO object = (DynamicAnagraficaObjectDTO)command;
// collection of edit tabs (all edit tabs created on system associate to
// visibility)
DynamicObjectType typo = getApplicationService().get(DynamicObjectType.class, object.getTipologiaId());
List<EditTabDynamicObject> tabs = getApplicationService()
.<BoxDynamicObject, DynamicObjectType, DynamicPropertiesDefinition, TabDynamicObject, EditTabDynamicObject>getEditTabsByVisibilityAndType(EditTabDynamicObject.class, isAdmin, typo);
// check if request tab from view is active (check on collection before)
EditTabDynamicObject editT = getApplicationService().get(
EditTabDynamicObject.class, anagraficaObjectDTO.getTabId());
if (!tabs.contains(editT))
{
throw new AuthorizeException(
"You not have needed authorization level to display this tab");
}
// collection of boxs
List<BoxDynamicObject> propertyHolders = new LinkedList<BoxDynamicObject>();
// if edit tab got a display tab (edit tab is hookup to display tab)
// then edit box will be created from display box otherwise get all boxs
// in edit tab
if (editT.getDisplayTab() != null)
{
for (BoxDynamicObject box : editT.getDisplayTab().getMask())
{
propertyHolders.add(box);
}
}
else
{
propertyHolders = getApplicationService().findPropertyHolderInTab(
getClazzTab(), anagraficaObjectDTO.getTabId());
}
// clean boxs list with accesslevel
List<BoxDynamicObject> propertyHoldersCurrentAccessLevel = new LinkedList<BoxDynamicObject>();
for (BoxDynamicObject propertyHolder : propertyHolders)