01-09-2008 06:49 AM
User user = (User) session.getAttribute(AuthenticationHelper.AUTHENTICATION_USER);
if (user == null) {
response.sendRedirect(request.getContextPath() + "/faces/jsp/login.jsp");
}
if (user != null) {
WebApplicationContext context = WebApplicationContextUtils.getRequiredWebApplicationContext(session.getServletContext());
final ServiceRegistry serviceRegistry = (ServiceRegistry) context.getBean(ServiceRegistry.SERVICE_REGISTRY);
SearchService searchService = serviceRegistry.getSearchService();
NodeService nodeService = serviceRegistry.getNodeService();
StoreRef storeRef = new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore");
ResultSet resultSet = searchService.query(storeRef, SearchService.LANGUAGE_LUCENE, "PATH:\"/*\" TEXT:\"/fm:discussion\"");
for (ResultSetRow row : resultSet) {
NodeRef nodeRef = row.getNodeRef();
if ( nodeService.exists(nodeRef) ) {
// todo: Node node = new Node(nodeRef);
// NodeIterator iterator = node.getNodes();
// scroll to child and print some data
}
}
resultSet.close();
}
01-10-2008 03:54 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.