Search in sources :

Example 6 with GetAllPluginDescriptorsDatabaseAction

use of org.bimserver.database.actions.GetAllPluginDescriptorsDatabaseAction in project BIMserver by opensourceBIM.

the class PluginServiceImpl method getAllModelComparePluginDescriptors.

@Override
public List<SPluginDescriptor> getAllModelComparePluginDescriptors() throws ServerException, UserException {
    requireRealUserAuthentication();
    DatabaseSession session = getBimServer().getDatabase().createSession();
    try {
        return session.executeAndCommitAction(new GetAllPluginDescriptorsDatabaseAction(session, getInternalAccessMethod(), getBimServer(), ModelComparePlugin.class.getName()));
    } catch (Exception e) {
        return handleException(e);
    } finally {
        session.close();
    }
}
Also used : DatabaseSession(org.bimserver.database.DatabaseSession) GetAllPluginDescriptorsDatabaseAction(org.bimserver.database.actions.GetAllPluginDescriptorsDatabaseAction) IOException(java.io.IOException) ServerException(org.bimserver.shared.exceptions.ServerException) BimserverDatabaseException(org.bimserver.BimserverDatabaseException) UserException(org.bimserver.shared.exceptions.UserException)

Example 7 with GetAllPluginDescriptorsDatabaseAction

use of org.bimserver.database.actions.GetAllPluginDescriptorsDatabaseAction in project BIMserver by opensourceBIM.

the class PluginServiceImpl method getAllServicePluginDescriptors.

@Override
public List<SPluginDescriptor> getAllServicePluginDescriptors() throws ServerException, UserException {
    requireRealUserAuthentication();
    DatabaseSession session = getBimServer().getDatabase().createSession();
    try {
        return session.executeAndCommitAction(new GetAllPluginDescriptorsDatabaseAction(session, getInternalAccessMethod(), getBimServer(), ServicePlugin.class.getName()));
    } catch (Exception e) {
        return handleException(e);
    } finally {
        session.close();
    }
}
Also used : DatabaseSession(org.bimserver.database.DatabaseSession) GetAllPluginDescriptorsDatabaseAction(org.bimserver.database.actions.GetAllPluginDescriptorsDatabaseAction) IOException(java.io.IOException) ServerException(org.bimserver.shared.exceptions.ServerException) BimserverDatabaseException(org.bimserver.BimserverDatabaseException) UserException(org.bimserver.shared.exceptions.UserException)

Example 8 with GetAllPluginDescriptorsDatabaseAction

use of org.bimserver.database.actions.GetAllPluginDescriptorsDatabaseAction in project BIMserver by opensourceBIM.

the class PluginServiceImpl method getAllRenderEnginePluginDescriptors.

@Override
public List<SPluginDescriptor> getAllRenderEnginePluginDescriptors() throws ServerException, UserException {
    requireRealUserAuthentication();
    DatabaseSession session = getBimServer().getDatabase().createSession();
    try {
        return session.executeAndCommitAction(new GetAllPluginDescriptorsDatabaseAction(session, getInternalAccessMethod(), getBimServer(), RenderEnginePlugin.class.getName()));
    } catch (Exception e) {
        return handleException(e);
    } finally {
        session.close();
    }
}
Also used : DatabaseSession(org.bimserver.database.DatabaseSession) GetAllPluginDescriptorsDatabaseAction(org.bimserver.database.actions.GetAllPluginDescriptorsDatabaseAction) IOException(java.io.IOException) ServerException(org.bimserver.shared.exceptions.ServerException) BimserverDatabaseException(org.bimserver.BimserverDatabaseException) UserException(org.bimserver.shared.exceptions.UserException)

Example 9 with GetAllPluginDescriptorsDatabaseAction

use of org.bimserver.database.actions.GetAllPluginDescriptorsDatabaseAction in project BIMserver by opensourceBIM.

the class PluginServiceImpl method getAllDeserializerPluginDescriptors.

@Override
public List<SPluginDescriptor> getAllDeserializerPluginDescriptors() throws ServerException, UserException {
    requireRealUserAuthentication();
    DatabaseSession session = getBimServer().getDatabase().createSession();
    try {
        return session.executeAndCommitAction(new GetAllPluginDescriptorsDatabaseAction(session, getInternalAccessMethod(), getBimServer(), DeserializerPlugin.class.getName()));
    } catch (Exception e) {
        return handleException(e);
    } finally {
        session.close();
    }
}
Also used : DatabaseSession(org.bimserver.database.DatabaseSession) GetAllPluginDescriptorsDatabaseAction(org.bimserver.database.actions.GetAllPluginDescriptorsDatabaseAction) 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)9 BimserverDatabaseException (org.bimserver.BimserverDatabaseException)9 DatabaseSession (org.bimserver.database.DatabaseSession)9 GetAllPluginDescriptorsDatabaseAction (org.bimserver.database.actions.GetAllPluginDescriptorsDatabaseAction)9 ServerException (org.bimserver.shared.exceptions.ServerException)9 UserException (org.bimserver.shared.exceptions.UserException)9