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