Search in sources :

Example 1 with GetWebModuleByNameDatabaseAction

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

the class PluginServiceImpl method getWebModuleByName.

@Override
public SWebModulePluginConfiguration getWebModuleByName(String name) throws ServerException, UserException {
    requireAuthentication();
    DatabaseSession session = getBimServer().getDatabase().createSession();
    try {
        return getBimServer().getSConverter().convertToSObject(session.executeAndCommitAction(new GetWebModuleByNameDatabaseAction(session, getInternalAccessMethod(), name)));
    } catch (Exception e) {
        handleException(e);
    } finally {
        session.close();
    }
    return null;
}
Also used : DatabaseSession(org.bimserver.database.DatabaseSession) GetWebModuleByNameDatabaseAction(org.bimserver.database.actions.GetWebModuleByNameDatabaseAction) 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 GetWebModuleByNameDatabaseAction (org.bimserver.database.actions.GetWebModuleByNameDatabaseAction)1 ServerException (org.bimserver.shared.exceptions.ServerException)1 UserException (org.bimserver.shared.exceptions.UserException)1