use of com.axelor.apps.base.db.App in project axelor-open-suite by axelor.
the class AppController method uninstallApp.
public void uninstallApp(ActionRequest request, ActionResponse response) throws AxelorException {
App app = request.getContext().asType(App.class);
app = Beans.get(AppRepository.class).find(app.getId());
Beans.get(AppService.class).unInstallApp(app);
response.setSignal("refresh-app", true);
}
use of com.axelor.apps.base.db.App in project axelor-open-suite by axelor.
the class AppBuilderService method build.
public AppBuilder build(AppBuilder appBuilder) throws AxelorException {
checkCode(appBuilder);
App app = appBuilder.getGeneratedApp();
if (app == null) {
app = new App(appBuilder.getName(), appBuilder.getCode());
} else {
app.setCode(appBuilder.getCode());
app.setName(appBuilder.getName());
}
app.setIsCustom(true);
app.setImage(appBuilder.getImage());
app.setDescription(appBuilder.getDescription());
Set<App> depends = new HashSet<App>();
if (appBuilder.getDependsOnSet() != null) {
depends.addAll(appBuilder.getDependsOnSet());
app.setDependsOnSet(depends);
}
app.setSequence(appBuilder.getSequence());
app.setModules(appBuilder.getModules());
appBuilder.setGeneratedApp(appRepo.save(app));
return appBuilder;
}
use of com.axelor.apps.base.db.App 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);
}
Aggregations