final String path = request.getOptionalProperty("file");
String id = request.getOptionalProperty(OBJECT);
final String fieldName = request.getOptionalProperty(FIELD);
ObjectAdapter object = request.getContext().getMappedObjectOrResult(id);
if (fieldName != null) {
final ObjectAssociation field = object.getSpecification().getAssociation(fieldName);
if (field.isVisible(IsisContext.getAuthenticationSession(), object, where).isVetoed()) {
throw new ForbiddenException(field, ForbiddenException.VISIBLE);
}
object = field.get(object);
id = request.getContext().mapObject(object, Scope.REQUEST);
}
if (object != null) {
IsisContext.getPersistenceSession().resolveImmediately(object);