Search in sources :

Example 1 with GetAvailableClassesInRevisionDatabaseAction

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

the class ServiceImpl method getAvailableClassesInRevision.

@Override
public List<String> getAvailableClassesInRevision(Long roid) throws ServerException, UserException {
    requireRealUserAuthentication();
    DatabaseSession session = getBimServer().getDatabase().createSession();
    try {
        BimDatabaseAction<List<String>> action = new GetAvailableClassesInRevisionDatabaseAction(getBimServer(), session, getInternalAccessMethod(), roid);
        return session.executeAndCommitAction(action);
    } catch (BimserverDatabaseException e) {
        handleException(e);
    } finally {
        session.close();
    }
    return null;
}
Also used : BimserverDatabaseException(org.bimserver.BimserverDatabaseException) DatabaseSession(org.bimserver.database.DatabaseSession) GetAvailableClassesInRevisionDatabaseAction(org.bimserver.database.actions.GetAvailableClassesInRevisionDatabaseAction) ArrayList(java.util.ArrayList) List(java.util.List) EList(org.eclipse.emf.common.util.EList)

Aggregations

ArrayList (java.util.ArrayList)1 List (java.util.List)1 BimserverDatabaseException (org.bimserver.BimserverDatabaseException)1 DatabaseSession (org.bimserver.database.DatabaseSession)1 GetAvailableClassesInRevisionDatabaseAction (org.bimserver.database.actions.GetAvailableClassesInRevisionDatabaseAction)1 EList (org.eclipse.emf.common.util.EList)1