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