use of org.bimserver.database.actions.GetProjectsByNameDatabaseAction in project BIMserver by opensourceBIM.
the class ServiceImpl method getProjectsByName.
@Override
public List<SProject> getProjectsByName(String name) throws UserException, ServerException {
requireRealUserAuthentication();
DatabaseSession session = getBimServer().getDatabase().createSession();
try {
GetProjectsByNameDatabaseAction action = new GetProjectsByNameDatabaseAction(session, getInternalAccessMethod(), name, getAuthorization());
return getBimServer().getSConverter().convertToSListProject(session.executeAndCommitAction(action));
} catch (Exception e) {
return handleException(e);
} finally {
session.close();
}
}
Aggregations