@Override public InputStream getDownloadData(String baseAddress, String token, long topicId) throws IOException { try { SDownloadResult downloadData = get(ServiceInterface.class).getDownloadData(topicId); return downloadData.getFile().getInputStream(); } catch (ServerException e) { LOGGER.error("", e); } catch (UserException e) { LOGGER.error("", e); } catch (PublicInterfaceNotFoundException e) { LOGGER.error("", e); } return null; }
public Object sGet(SField sField) { if (sField.getName().equals("projectName")) { return getProjectName(); } if (sField.getName().equals("revisionNr")) { return getRevisionNr(); } if (sField.getName().equals("file")) { return getFile(); } if (sField.getName().equals("serializerOid")) { return getSerializerOid(); } if (sField.getName().equals("oid")) { return getOid(); } if (sField.getName().equals("rid")) { return getRid(); } throw new RuntimeException("Field " + sField.getName() + " not found"); }
LOGGER.error("Invalid topicId: " + topicId); } else { DataSource dataSource = checkoutResult.getFile().getDataSource(); PluginConfiguration pluginConfiguration = getBimServer().getPluginSettingsCache().getPluginSettings(checkoutResult.getSerializerOid());
public DownloadResult convertFromSObject(SDownloadResult input, DownloadResult result, DatabaseSession session) throws BimserverDatabaseException { if (input == null) { return null; } if (input instanceof SCheckoutResult) { return convertFromSObject((SCheckoutResult)input, session); } result.setProjectName(input.getProjectName()); result.setRevisionNr(input.getRevisionNr()); result.setFile(input.getFile()); result.setSerializerOid(input.getSerializerOid()); return result; }