Search in sources :

Example 11 with SPluginConfigurationComparator

use of org.bimserver.webservices.SPluginConfigurationComparator 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)11 BimserverDatabaseException (org.bimserver.BimserverDatabaseException)11 DatabaseSession (org.bimserver.database.DatabaseSession)11 ServerException (org.bimserver.shared.exceptions.ServerException)11 UserException (org.bimserver.shared.exceptions.UserException)11 SPluginConfigurationComparator (org.bimserver.webservices.SPluginConfigurationComparator)11 UserSettings (org.bimserver.models.store.UserSettings)10 ArrayList (java.util.ArrayList)4 SDeserializerPluginConfiguration (org.bimserver.interfaces.objects.SDeserializerPluginConfiguration)2 SSerializerPluginConfiguration (org.bimserver.interfaces.objects.SSerializerPluginConfiguration)2 DeserializerPluginConfiguration (org.bimserver.models.store.DeserializerPluginConfiguration)2 Project (org.bimserver.models.store.Project)2 SerializerPluginConfiguration (org.bimserver.models.store.SerializerPluginConfiguration)2 DeserializerPlugin (org.bimserver.plugins.deserializers.DeserializerPlugin)2 StreamingDeserializerPlugin (org.bimserver.plugins.deserializers.StreamingDeserializerPlugin)2 HashSet (java.util.HashSet)1 Schema (org.bimserver.emf.Schema)1 SInternalServicePluginConfiguration (org.bimserver.interfaces.objects.SInternalServicePluginConfiguration)1 SModelComparePluginConfiguration (org.bimserver.interfaces.objects.SModelComparePluginConfiguration)1 SModelMergerPluginConfiguration (org.bimserver.interfaces.objects.SModelMergerPluginConfiguration)1