code: public Clob downloadLayout(final Object domainObject) {
  
          final ObjectAdapter adapterFor = adapterManager.adapterFor(domainObject);
          final ObjectSpecification objectSpec = adapterFor.getSpecification();
  
          final LayoutJsonExporter exporter = new LayoutJsonExporter();
          final String json = exporter.asJson(objectSpec);
  
          return new Clob(objectSpec.getShortIdentifier() +".layout.json", mimeTypeApplicationJson, json);
      }
docs: //////////////////////////////////////