use of org.bimserver.webservices.SPluginConfigurationComparator in project BIMserver by opensourceBIM.
the class PluginServiceImpl method getAllQueryEngines.
@Override
public List<SQueryEnginePluginConfiguration> getAllQueryEngines(Boolean onlyEnabled) throws ServerException, UserException {
requireRealUserAuthentication();
DatabaseSession session = getBimServer().getDatabase().createSession();
try {
UserSettings userSettings = getUserSettings(session);
List<SQueryEnginePluginConfiguration> queryEngines = getBimServer().getSConverter().convertToSListQueryEnginePluginConfiguration(userSettings.getQueryEngines());
Collections.sort(queryEngines, new SPluginConfigurationComparator());
return queryEngines;
} catch (Exception e) {
return handleException(e);
} finally {
session.close();
}
}
use of org.bimserver.webservices.SPluginConfigurationComparator in project BIMserver by opensourceBIM.
the class PluginServiceImpl method getAllModelMergers.
@Override
public List<SModelMergerPluginConfiguration> getAllModelMergers(Boolean onlyEnabled) throws ServerException, UserException {
requireRealUserAuthentication();
DatabaseSession session = getBimServer().getDatabase().createSession();
try {
UserSettings userSettings = getUserSettings(session);
List<SModelMergerPluginConfiguration> modelMergers = getBimServer().getSConverter().convertToSListModelMergerPluginConfiguration(userSettings.getModelMergers());
Collections.sort(modelMergers, new SPluginConfigurationComparator());
return modelMergers;
} catch (Exception e) {
return handleException(e);
} finally {
session.close();
}
}
use of org.bimserver.webservices.SPluginConfigurationComparator in project BIMserver by opensourceBIM.
the class PluginServiceImpl method getAllWebModules.
@Override
public List<SWebModulePluginConfiguration> getAllWebModules(Boolean onlyEnabled) throws ServerException, UserException {
requireRealUserAuthentication();
DatabaseSession session = getBimServer().getDatabase().createSession();
try {
EList<WebModulePluginConfiguration> webModules = getBimServer().getServerSettingsCache().getServerSettings().getWebModules();
List<SWebModulePluginConfiguration> serializers = getBimServer().getSConverter().convertToSListWebModulePluginConfiguration(webModules);
Collections.sort(serializers, new SPluginConfigurationComparator());
return serializers;
} catch (Exception e) {
handleException(e);
} finally {
session.close();
}
return null;
}
use of org.bimserver.webservices.SPluginConfigurationComparator in project BIMserver by opensourceBIM.
the class PluginServiceImpl method getAllRenderEngines.
@Override
public List<SRenderEnginePluginConfiguration> getAllRenderEngines(Boolean onlyEnabled) throws ServerException, UserException {
requireRealUserAuthentication();
DatabaseSession session = getBimServer().getDatabase().createSession();
try {
UserSettings userSettings = getUserSettings(session);
List<SRenderEnginePluginConfiguration> renderEngines = getBimServer().getSConverter().convertToSListRenderEnginePluginConfiguration(userSettings.getRenderEngines());
Collections.sort(renderEngines, new SPluginConfigurationComparator());
return renderEngines;
} catch (Exception e) {
return handleException(e);
} finally {
session.close();
}
}
use of org.bimserver.webservices.SPluginConfigurationComparator in project BIMserver by opensourceBIM.
the class PluginServiceImpl method getAllDeserializers.
@Override
public List<SDeserializerPluginConfiguration> getAllDeserializers(Boolean onlyEnabled) throws ServerException, UserException {
requireRealUserAuthentication();
DatabaseSession session = getBimServer().getDatabase().createSession();
try {
UserSettings userSettings = getUserSettings(session);
EList<DeserializerPluginConfiguration> deserializers = userSettings.getDeserializers();
List<SDeserializerPluginConfiguration> sDeserializers = new ArrayList<SDeserializerPluginConfiguration>();
for (DeserializerPluginConfiguration deserializerPluginConfiguration : deserializers) {
if (!onlyEnabled || (deserializerPluginConfiguration.getEnabled() && deserializerPluginConfiguration.getPluginDescriptor().getEnabled())) {
sDeserializers.add(getBimServer().getSConverter().convertToSObject(deserializerPluginConfiguration));
}
}
Collections.sort(sDeserializers, new SPluginConfigurationComparator());
return sDeserializers;
} catch (Exception e) {
handleException(e);
} finally {
session.close();
}
return null;
}
Aggregations