use of org.bimserver.database.actions.GetSerializerByContentTypeDatabaseAction in project BIMserver by opensourceBIM.
the class ServiceImpl method getSerializerByContentType.
@Override
public SSerializerPluginConfiguration getSerializerByContentType(String contentType) throws ServerException, UserException {
// Not checking for real authentication here because a remote service should be able to use a serializer for download call
requireAuthenticationAndRunningServer();
DatabaseSession session = getBimServer().getDatabase().createSession();
try {
return getBimServer().getSConverter().convertToSObject(session.executeAndCommitAction(new GetSerializerByContentTypeDatabaseAction(session, getInternalAccessMethod(), contentType)));
} catch (Exception e) {
handleException(e);
} finally {
session.close();
}
return null;
}
Aggregations