use of org.bimserver.database.actions.AddModelMergerDatabaseAction in project BIMserver by opensourceBIM.
the class PluginServiceImpl method addModelMerger.
@Override
public Long addModelMerger(SModelMergerPluginConfiguration modelMerger) throws ServerException, UserException {
requireRealUserAuthentication();
DatabaseSession session = getBimServer().getDatabase().createSession();
try {
ModelMergerPluginConfiguration convert = getBimServer().getSConverter().convertFromSObject(modelMerger, session);
return session.executeAndCommitAction(new AddModelMergerDatabaseAction(session, getInternalAccessMethod(), getAuthorization(), convert));
} catch (Exception e) {
return handleException(e);
} finally {
session.close();
}
}
Aggregations