Search in sources :

Example 1 with GetAllPluginDescriptorsDatabaseAction

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

the class PluginServiceImpl method getAllWebModulePluginDescriptors.

@Override
public List<SPluginDescriptor> getAllWebModulePluginDescriptors() throws UserException, ServerException {
    requireRealUserAuthentication();
    requireRealUserAuthentication();
    DatabaseSession session = getBimServer().getDatabase().createSession();
    try {
        return session.executeAndCommitAction(new GetAllPluginDescriptorsDatabaseAction(session, getInternalAccessMethod(), getBimServer(), WebModulePlugin.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 2 with GetAllPluginDescriptorsDatabaseAction

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

the class PluginServiceImpl method getAllSerializerPluginDescriptors.

@Override
public List<SPluginDescriptor> getAllSerializerPluginDescriptors() throws UserException, ServerException {
    requireRealUserAuthentication();
    DatabaseSession session = getBimServer().getDatabase().createSession();
    try {
        return session.executeAndCommitAction(new GetAllPluginDescriptorsDatabaseAction(session, getInternalAccessMethod(), getBimServer(), SerializerPlugin.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 3 with GetAllPluginDescriptorsDatabaseAction

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

the class PluginServiceImpl method getAllModelMergerPluginDescriptors.

@Override
public List<SPluginDescriptor> getAllModelMergerPluginDescriptors() throws ServerException, UserException {
    requireRealUserAuthentication();
    requireRealUserAuthentication();
    DatabaseSession session = getBimServer().getDatabase().createSession();
    try {
        return session.executeAndCommitAction(new GetAllPluginDescriptorsDatabaseAction(session, getInternalAccessMethod(), getBimServer(), ModelMergerPlugin.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 4 with GetAllPluginDescriptorsDatabaseAction

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

the class PluginServiceImpl method getAllQueryEnginePluginDescriptors.

@Override
public List<SPluginDescriptor> getAllQueryEnginePluginDescriptors() throws ServerException, UserException {
    requireRealUserAuthentication();
    DatabaseSession session = getBimServer().getDatabase().createSession();
    try {
        return session.executeAndCommitAction(new GetAllPluginDescriptorsDatabaseAction(session, getInternalAccessMethod(), getBimServer(), QueryEnginePlugin.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 5 with GetAllPluginDescriptorsDatabaseAction

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

the class PluginServiceImpl method getAllModelCheckerPluginDescriptors.

@Override
public List<SPluginDescriptor> getAllModelCheckerPluginDescriptors() throws ServerException, UserException {
    requireRealUserAuthentication();
    DatabaseSession session = getBimServer().getDatabase().createSession();
    try {
        return session.executeAndCommitAction(new GetAllPluginDescriptorsDatabaseAction(session, getInternalAccessMethod(), getBimServer(), ModelCheckerPlugin.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