Search in sources :

Example 1 with SPluginDescriptorComparator

use of org.bimserver.webservices.SPluginDescriptorComparator in project BIMserver by opensourceBIM.

the class AdminServiceImpl method getAllPlugins.

@Override
public List<SPluginDescriptor> getAllPlugins() throws UserException, ServerException {
    requireRealUserAuthentication();
    DatabaseSession session = getBimServer().getDatabase().createSession();
    try {
        List<SPluginDescriptor> convertToSListPluginDescriptor = getBimServer().getSConverter().convertToSListPluginDescriptor(session.getAllOfType(StorePackage.eINSTANCE.getPluginDescriptor(), PluginDescriptor.class, OldQuery.getDefault()));
        Collections.sort(convertToSListPluginDescriptor, new SPluginDescriptorComparator());
        return convertToSListPluginDescriptor;
    } catch (Exception e) {
        return handleException(e);
    } finally {
        session.close();
    }
}
Also used : SPluginDescriptor(org.bimserver.interfaces.objects.SPluginDescriptor) PluginDescriptor(org.bimserver.models.store.PluginDescriptor) SPluginDescriptor(org.bimserver.interfaces.objects.SPluginDescriptor) DatabaseSession(org.bimserver.database.DatabaseSession) SPluginDescriptorComparator(org.bimserver.webservices.SPluginDescriptorComparator) UserException(org.bimserver.shared.exceptions.UserException) BimBotsException(org.bimserver.bimbots.BimBotsException) IOException(java.io.IOException) ServerException(org.bimserver.shared.exceptions.ServerException) BimserverDatabaseException(org.bimserver.BimserverDatabaseException)

Aggregations

IOException (java.io.IOException)1 BimserverDatabaseException (org.bimserver.BimserverDatabaseException)1 BimBotsException (org.bimserver.bimbots.BimBotsException)1 DatabaseSession (org.bimserver.database.DatabaseSession)1 SPluginDescriptor (org.bimserver.interfaces.objects.SPluginDescriptor)1 PluginDescriptor (org.bimserver.models.store.PluginDescriptor)1 ServerException (org.bimserver.shared.exceptions.ServerException)1 UserException (org.bimserver.shared.exceptions.UserException)1 SPluginDescriptorComparator (org.bimserver.webservices.SPluginDescriptorComparator)1