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