Search in sources :

Example 1 with SObjectIDMPluginConfiguration

use of org.bimserver.interfaces.objects.SObjectIDMPluginConfiguration in project BIMserver by opensourceBIM.

the class PluginServiceImpl method getAllObjectIDMs.

@Override
public List<SObjectIDMPluginConfiguration> getAllObjectIDMs(Boolean onlyEnabled) throws ServerException, UserException {
    requireRealUserAuthentication();
    DatabaseSession session = getBimServer().getDatabase().createSession();
    try {
        UserSettings userSettings = getUserSettings(session);
        List<SObjectIDMPluginConfiguration> objectIdms = getBimServer().getSConverter().convertToSListObjectIDMPluginConfiguration(userSettings.getObjectIDMs());
        Collections.sort(objectIdms, new SPluginConfigurationComparator());
        return objectIdms;
    } catch (Exception e) {
        handleException(e);
    } finally {
        session.close();
    }
    return null;
}
Also used : SPluginConfigurationComparator(org.bimserver.webservices.SPluginConfigurationComparator) DatabaseSession(org.bimserver.database.DatabaseSession) UserSettings(org.bimserver.models.store.UserSettings) SObjectIDMPluginConfiguration(org.bimserver.interfaces.objects.SObjectIDMPluginConfiguration) IOException(java.io.IOException) ServerException(org.bimserver.shared.exceptions.ServerException) BimserverDatabaseException(org.bimserver.BimserverDatabaseException) UserException(org.bimserver.shared.exceptions.UserException)

Aggregations

IOException (java.io.IOException)1 BimserverDatabaseException (org.bimserver.BimserverDatabaseException)1 DatabaseSession (org.bimserver.database.DatabaseSession)1 SObjectIDMPluginConfiguration (org.bimserver.interfaces.objects.SObjectIDMPluginConfiguration)1 UserSettings (org.bimserver.models.store.UserSettings)1 ServerException (org.bimserver.shared.exceptions.ServerException)1 UserException (org.bimserver.shared.exceptions.UserException)1 SPluginConfigurationComparator (org.bimserver.webservices.SPluginConfigurationComparator)1