<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic NodeRef to Node and Exception in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/noderef-to-node-and-exception/m-p/122411#M86222</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am adding a new feature to my version of Alfresco. I would like to see a list of all the discussions to which I was invited.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then you have to be authenticated by the session and services from the repository. I can run the query through lucene to extract all discussions (identified by fm: discussion).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now I need to point the child next to the node fm: discussion and find the information (see title of the discussion, creator and our link), but I can not convert a NodeRef in javax.jcr.Node.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the code that I am using that goes in with exception:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Net.sf.acegisecurity.AuthenticationCredentialsNotFoundException: A valid SecureContext was not provided in the RequestContext&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&lt;BR /&gt;User user = (User) session.getAttribute(AuthenticationHelper.AUTHENTICATION_USER);&lt;BR /&gt;&lt;BR /&gt;if (user == null) {&lt;BR /&gt;&amp;nbsp; response.sendRedirect(request.getContextPath() + "/faces/jsp/login.jsp");&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;if (user != null) {&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; WebApplicationContext context = WebApplicationContextUtils.getRequiredWebApplicationContext(session.getServletContext());&lt;BR /&gt;&amp;nbsp; final ServiceRegistry serviceRegistry = (ServiceRegistry) context.getBean(ServiceRegistry.SERVICE_REGISTRY);&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; SearchService searchService = serviceRegistry.getSearchService();&lt;BR /&gt;&amp;nbsp; NodeService nodeService = serviceRegistry.getNodeService();&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; StoreRef storeRef = new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore");&lt;BR /&gt;&amp;nbsp; ResultSet resultSet = searchService.query(storeRef, SearchService.LANGUAGE_LUCENE, "PATH:\"/*\" TEXT:\"/fm:discussion\"");&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; for (ResultSetRow row : resultSet) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;NodeRef nodeRef = row.getNodeRef();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ( nodeService.exists(nodeRef) ) {&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // todo: Node node = new Node(nodeRef);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // NodeIterator iterator = node.getNodes();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // scroll to child and print some data&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp; resultSet.close();&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;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:49:33 GMT</pubDate>
    <dc:creator>avware</dc:creator>
    <dc:date>2008-01-09T11:49:33Z</dc:date>
    <item>
      <title>NodeRef to Node and Exception</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/noderef-to-node-and-exception/m-p/122411#M86222</link>
      <description>Hello,I am adding a new feature to my version of Alfresco. I would like to see a list of all the discussions to which I was invited.Then you have to be authenticated by the session and services from the repository. I can run the query through lucene to extract all discussions (identified by fm: disc</description>
      <pubDate>Wed, 09 Jan 2008 11:49:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/noderef-to-node-and-exception/m-p/122411#M86222</guid>
      <dc:creator>avware</dc:creator>
      <dc:date>2008-01-09T11:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: NodeRef to Node and Exception</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/noderef-to-node-and-exception/m-p/122412#M86223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think I have to be more precise. I found a way to iterare nodes in the repository through JCR, or run a query through SearchService.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;JCR is too slow: To see the list of all the discussions (topic) on a set of a few nodes, took almost 3 minutes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;With SearchService run a query with Lucene result but I am ResultSet / ResultSetRow of nodes that are not compatible with JCR.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What relationship exists between nodes and nodes JCR Alfresco? More specifically, between NodeRef (returned by the ResultSet) and the Node interface of JCR? I can not make a cast from one to another, and vice versa.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also my page will be added as a feature inside Alfresco and I can not use authentication JCR (Repository.login (…)) because I can not extract username and password from the user session (jsp). I'm too confused … &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tnx!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jan 2008 08:54:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/noderef-to-node-and-exception/m-p/122412#M86223</guid>
      <dc:creator>avware</dc:creator>
      <dc:date>2008-01-10T08:54:49Z</dc:date>
    </item>
  </channel>
</rss>

