-
- // public static Node getUserProfile(Session session, String username) {
- // try {
- // QueryObjectModelFactory qomf = session.getWorkspace()
- // .getQueryManager().getQOMFactory();
- // Selector userHomeSel = qomf.selector(ArgeoTypes.ARGEO_USER_PROFILE,
- // "userProfile");
- // DynamicOperand userIdDop = qomf.propertyValue(
- // userHomeSel.getSelectorName(), ArgeoNames.ARGEO_USER_ID);
- // StaticOperand userIdSop = qomf.literal(session.getValueFactory()
- // .createValue(username));
- // Constraint constraint = qomf.comparison(userIdDop,
- // QueryObjectModelFactory.JCR_OPERATOR_EQUAL_TO, userIdSop);
- // Query query = qomf.createQuery(userHomeSel, constraint, null, null);
- // return querySingleNode(query);
- // } catch (RepositoryException e) {
- // throw new RuntimeException(
- // "Cannot find profile for user " + username, e);
- // }
- // }
- //