use of org.bimserver.database.actions.UpdateSerializerDatabaseAction in project BIMserver by opensourceBIM.
the class PluginServiceImpl method updateSerializer.
@Override
public void updateSerializer(SSerializerPluginConfiguration serializer) throws ServerException, UserException {
requireRealUserAuthentication();
DatabaseSession session = getBimServer().getDatabase().createSession();
try {
SerializerPluginConfiguration convert = session.get(serializer.getOid(), OldQuery.getDefault());
getBimServer().getSConverter().convertFromSObject(serializer, convert, session);
session.executeAndCommitAction(new UpdateSerializerDatabaseAction(session, getInternalAccessMethod(), convert));
} catch (Exception e) {
handleException(e);
} finally {
session.close();
}
}
Aggregations