<?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 Re: How to get a CoreSession within a SecurityPolicy SQLQuery.Transformer.transform()? in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-get-a-coresession-within-a-securitypolicy-sqlquery/m-p/325328#M12329</link>
    <description>&lt;P&gt;You can use for instance the following code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;LoginContext loginContext = Framework.login();
RepositoryManager mgr = Framework.getService(RepositoryManager.class);
Repository repository = mgr.getDefaultRepository();
CoreSession session = null;
if (repository != null) {
    session = repository.open();
}
if (session == null) {
    log.error("session is null, exit connect");
}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 12 Jun 2013 13:18:43 GMT</pubDate>
    <dc:creator>adam_bo_</dc:creator>
    <dc:date>2013-06-12T13:18:43Z</dc:date>
    <item>
      <title>How to get a CoreSession within a SecurityPolicy SQLQuery.Transformer.transform()?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-get-a-coresession-within-a-securitypolicy-sqlquery/m-p/325327#M12328</link>
      <description>&lt;P&gt;I need to access the CoreSession for the Principal passed as a parameter into SQLQuery.Transformer.transform(Principal, SQLQuery). I was hoping that ((NuxeoPrincipal) principal).getModel().getCoreSession() would provide it but it is almost always null. Is there another way besides creating a new CoreSession?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2013 19:07:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-get-a-coresession-within-a-securitypolicy-sqlquery/m-p/325327#M12328</guid>
      <dc:creator>rg1_</dc:creator>
      <dc:date>2013-06-11T19:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a CoreSession within a SecurityPolicy SQLQuery.Transformer.transform()?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-get-a-coresession-within-a-securitypolicy-sqlquery/m-p/325328#M12329</link>
      <description>&lt;P&gt;You can use for instance the following code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;LoginContext loginContext = Framework.login();
RepositoryManager mgr = Framework.getService(RepositoryManager.class);
Repository repository = mgr.getDefaultRepository();
CoreSession session = null;
if (repository != null) {
    session = repository.open();
}
if (session == null) {
    log.error("session is null, exit connect");
}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Jun 2013 13:18:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-get-a-coresession-within-a-securitypolicy-sqlquery/m-p/325328#M12329</guid>
      <dc:creator>adam_bo_</dc:creator>
      <dc:date>2013-06-12T13:18:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a CoreSession within a SecurityPolicy SQLQuery.Transformer.transform()?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-get-a-coresession-within-a-securitypolicy-sqlquery/m-p/325329#M12330</link>
      <description>&lt;P&gt;I believe your code is creating a new CoreSession which I was hoping to avoid. Instead I would like to access the existing CoreSession already associated with the Principal.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2013 19:01:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-get-a-coresession-within-a-securitypolicy-sqlquery/m-p/325329#M12330</guid>
      <dc:creator>rg1_</dc:creator>
      <dc:date>2013-06-12T19:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a CoreSession within a SecurityPolicy SQLQuery.Transformer.transform()?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-get-a-coresession-within-a-securitypolicy-sqlquery/m-p/325330#M12331</link>
      <description>&lt;P&gt;No &lt;CODE&gt;CoreSession&lt;/CODE&gt; is available at this level, because the query transformers are called at a lower-level API level than &lt;CODE&gt;CoreSession&lt;/CODE&gt; (from the &lt;CODE&gt;QueryMaker&lt;/CODE&gt;s inside VCS).&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2013 16:18:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-get-a-coresession-within-a-securitypolicy-sqlquery/m-p/325330#M12331</guid>
      <dc:creator>Florent_Guillau</dc:creator>
      <dc:date>2013-06-19T16:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a CoreSession within a SecurityPolicy SQLQuery.Transformer.transform()?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-get-a-coresession-within-a-securitypolicy-sqlquery/m-p/325331#M12332</link>
      <description>&lt;P&gt;I need to access specific properties from the principal's UserProfile document from within my query transformer. Do you have a recommendation for how this would best be done?&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2013 18:02:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-get-a-coresession-within-a-securitypolicy-sqlquery/m-p/325331#M12332</guid>
      <dc:creator>rg1_</dc:creator>
      <dc:date>2013-06-19T18:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a CoreSession within a SecurityPolicy SQLQuery.Transformer.transform()?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-get-a-coresession-within-a-securitypolicy-sqlquery/m-p/325332#M12333</link>
      <description>&lt;P&gt;What properties do you need to access?&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2013 13:21:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-get-a-coresession-within-a-securitypolicy-sqlquery/m-p/325332#M12333</guid>
      <dc:creator>bruce_Grant</dc:creator>
      <dc:date>2013-06-20T13:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a CoreSession within a SecurityPolicy SQLQuery.Transformer.transform()?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-get-a-coresession-within-a-securitypolicy-sqlquery/m-p/325333#M12334</link>
      <description>&lt;P&gt;My own custom properties.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2013 14:54:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-get-a-coresession-within-a-securitypolicy-sqlquery/m-p/325333#M12334</guid>
      <dc:creator>rg1_</dc:creator>
      <dc:date>2013-06-20T14:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a CoreSession within a SecurityPolicy SQLQuery.Transformer.transform()?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-get-a-coresession-within-a-securitypolicy-sqlquery/m-p/325334#M12335</link>
      <description>&lt;P&gt;The solution would be to update the Principal object directly with the properties you need at login, when the Principal is created. See how the &lt;CODE&gt;MultiTenantUserManager&lt;/CODE&gt; does it for instance, to use another class than &lt;CODE&gt;NuxeoPrincipalImpl&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2013 15:56:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-get-a-coresession-within-a-securitypolicy-sqlquery/m-p/325334#M12335</guid>
      <dc:creator>Florent_Guillau</dc:creator>
      <dc:date>2013-06-20T15:56:18Z</dc:date>
    </item>
  </channel>
</rss>

