use of org.bimserver.interfaces.objects.SWebModulePluginConfiguration 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.interfaces.objects.SWebModulePluginConfiguration in project BIMserver by opensourceBIM.
the class PluginServiceImpl method getDefaultWebModule.
public SWebModulePluginConfiguration getDefaultWebModule() throws ServerException, UserException {
requireRealUserAuthentication();
WebModulePluginConfiguration defaultWebModule = getBimServer().getServerSettingsCache().getServerSettings().getWebModule();
return getBimServer().getSConverter().convertToSObject(defaultWebModule);
}
use of org.bimserver.interfaces.objects.SWebModulePluginConfiguration in project BIMserver by opensourceBIM.
the class PluginServiceImpl method listAllWebModules.
@Override
public List<SWebModulePluginConfiguration> listAllWebModules() throws ServerException, UserException {
requireAuthentication();
DatabaseSession session = getBimServer().getDatabase().createSession();
try {
List<SWebModulePluginConfiguration> list = getBimServer().getSConverter().convertToSListWebModulePluginConfiguration(session.executeAndCommitAction(new ListWebModulesDatabaseAction(session, getInternalAccessMethod())));
Collections.sort(list, new Comparator<SWebModulePluginConfiguration>() {
@Override
public int compare(SWebModulePluginConfiguration o1, SWebModulePluginConfiguration o2) {
return o1.getName().compareTo(o2.getName());
}
});
return list;
} catch (Exception e) {
return handleException(e);
} finally {
session.close();
}
}
Aggregations