Jahia Dev Forum > Live & Default workspaces...

0 (0 Good)
0 (0 Bad)

Live & Default workspaces (Jahia 6.5)

by  robertito »  2011/06/30 12:27

Hi,

I'm using Jahia 6.5 Community DEMOPACK and trying to get some "content out of context" from the default (when in edit mode) and from the live (when in live mode) workspaces programmatically.

Are the workspaces mirrored? When I try to get from default with path /sites/MY_SITE/content, it works fine, but on live, I got a PathNotFound exception.

I am using something like:

 

Credentials credentials = JahiaLoginModule.getCredentials(" system ");
JCRSessionWrapper session = new JCRSessionWrapper(null, credentials, true, "live", null, JCRTemplate.getInstance().getSessionFactory(), null);
JCRNodeWrapper node = session.getNode("/" + nodePath);
 
and running this code as user system with the JCRTemplate.getInstance().doExecuteWithSystemSession(...) method.
 

Thank you very much in advance.
Kind Regards,
Robert

  • Live & Default workspaces (Jahia 6.5)
    2011/06/30 12:27

    robertito <p> Hi,</p> <p> I&#39;m using Jahia 6.5 Community DEMOPACK and trying to get some &quot;content out of context&quot; from the default (when in edit mode) and from the live (when in live mode) workspaces programmatically.</p> <p> Are the workspaces mirrored? When I try to get from default with path /sites/MY_SITE/content, it works fine, but on live, I got a PathNotFound exception.</p> <p> I am using something like:</p> <p> &nbsp;</p> <div> Credentials credentials = JahiaLoginModule.getCredentials(&quot; system &quot;);<br /> JCRSessionWrapper session = new JCRSessionWrapper(null, credentials, true,&nbsp;&quot;live&quot;, null, JCRTemplate.getInstance().getSessionFactory(),&nbsp;null);<br /> JCRNodeWrapper node = session.getNode(&quot;/&quot; + nodePath);</div> <div> &nbsp;</div> <div> and running this code as user system with the JCRTemplate.getInstance().doExecuteWithSystemSession(...) method.</div> <div> &nbsp;</div> <p> Thank you very much in advance.<br /> Kind Regards,<br /> Robert</p>

  • Number of messages  13
    Registration date Jun 30, 2011
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page