use of org.entando.entando.aps.system.services.dataobject.helper.PublicDataTypeAuthorizationInfo in project entando-core by entando.
the class DataObjectViewerHelper method getAuthorizationInfo.
@Override
public PublicDataTypeAuthorizationInfo getAuthorizationInfo(String dataobjectId, RequestContext reqCtx) throws ApsSystemException {
PublicDataTypeAuthorizationInfo authInfo = null;
try {
Widget widget = (Widget) reqCtx.getExtraParam(SystemConstants.EXTRAPAR_CURRENT_WIDGET);
dataobjectId = this.extractDataId(dataobjectId, widget.getConfig(), reqCtx);
if (null == dataobjectId) {
_logger.info("Null dataobjectId");
return null;
}
authInfo = this.getDataAuthorizationHelper().getAuthorizationInfo(dataobjectId, true);
if (null == authInfo) {
_logger.info("Null authorization info by dataobject '" + dataobjectId + "'");
}
} catch (Throwable t) {
_logger.error("Error extracting dataobject authorization info by dataobject {}", dataobjectId, t);
throw new ApsSystemException("Error extracting dataobject authorization info by dataobject '" + dataobjectId + "'", t);
}
return authInfo;
}
Aggregations