use of com.axelor.studio.db.AppBuilder in project axelor-open-suite by axelor.
the class ImportService method importAppBuilderImg.
public Object importAppBuilderImg(Object bean, Map<String, Object> values) {
assert bean instanceof AppBuilder;
AppBuilder appBuilder = (AppBuilder) bean;
String fileName = (String) values.get("fileName");
String imageData = (String) values.get("imageData");
if (fileName != null && imageData != null) {
appBuilder.setImage(importImg(fileName, imageData));
}
appBuilder = appBuilderRepo.save(appBuilder);
return appBuilder;
}
use of com.axelor.studio.db.AppBuilder in project axelor-open-suite by axelor.
the class AppBuilderController method installApp.
public void installApp(ActionRequest request, ActionResponse response) throws AxelorException, IOException {
AppBuilder appBuilder = request.getContext().asType(AppBuilder.class);
appBuilder = Beans.get(AppBuilderRepository.class).find(appBuilder.getId());
App app = appBuilder.getGeneratedApp();
Beans.get(AppService.class).installApp(app, null);
response.setSignal("refresh-app", true);
}
use of com.axelor.studio.db.AppBuilder in project axelor-open-suite by axelor.
the class AppBuilderController method uninstallApp.
public void uninstallApp(ActionRequest request, ActionResponse response) throws AxelorException {
AppBuilder appBuilder = request.getContext().asType(AppBuilder.class);
appBuilder = Beans.get(AppBuilderRepository.class).find(appBuilder.getId());
App app = appBuilder.getGeneratedApp();
Beans.get(AppService.class).unInstallApp(app);
response.setSignal("refresh-app", true);
}
use of com.axelor.studio.db.AppBuilder in project axelor-open-suite by axelor.
the class ImportService method importAppBuilder.
public Object importAppBuilder(Object bean, Map<String, Object> values) {
assert bean instanceof AppBuilder;
AppBuilder appBuilder = (AppBuilder) bean;
appBuilder = appBuilderRepo.save(appBuilder);
Long appLoaderId = (Long) values.get("appLoaderId");
if (appLoaderId != null) {
appLoaderRepository.find(appLoaderId).addImportedAppBuilderSetItem(appBuilder);
}
return appBuilder;
}
use of com.axelor.studio.db.AppBuilder in project axelor-open-suite by axelor.
the class MetaJsonFieldRepo method save.
@Override
public MetaJsonField save(MetaJsonField metaJsonField) {
AppBuilder appBuilder = metaJsonField.getAppBuilder();
if (appBuilder != null) {
metaJsonField.setIncludeIf("__config__.app.isApp('" + appBuilder.getCode() + "')");
}
Beans.get(JsonFieldService.class).updateSelection(metaJsonField);
return super.save(metaJsonField);
}
Aggregations