use of org.bimserver.database.actions.GetProjectByUuidDatabaseAction in project BIMserver by opensourceBIM.
the class ServiceImpl method getProjectByUuid.
@Override
public SProject getProjectByUuid(String uuid) throws ServerException, UserException {
requireAuthenticationAndRunningServer();
DatabaseSession session = getBimServer().getDatabase().createSession(OperationType.READ_ONLY);
try {
GetProjectByUuidDatabaseAction action = new GetProjectByUuidDatabaseAction(session, getInternalAccessMethod(), uuid, getAuthorization());
SProject result = getBimServer().getSConverter().convertToSObject(session.executeAndCommitAction(action));
return result;
} catch (Exception e) {
return handleException(e);
} finally {
session.close();
}
}
Aggregations