use of org.bimserver.database.actions.ListWebModulesDatabaseAction 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