Soni Dobi wrote:

> I updated to magnolia 4.5 but i get some errors now in the java classes:
> 
> The class WorkspaceAccessUtil exists no longer in magnolia 4.5. In some 
> jira-magnolia ticket they mention replacing it with something called 
> CredentialsUtil. I am stuck though with this part of the code:
> 
> [code] WorkspaceAccessUtil util =WorkspaceAccessUtil.getInstance();
>                    jcrSession = util.createRepositorySession(
>                        util.getClass().getDefaultCredentials(),
>                        "magnolia",
>                        "website");[/code]
> 
> Anyone has any idea how to update this code? 

To get a Session to the website workspace you could get a reference to a 
Context or MgnlContext instance via dependency injection (or 
Components.getComponent if you're not in an environment managed by Guice) and 
then call getJCRSession(RepositoryConstants.WEBSITE). I'm not sure what you're 
trying to achieve, but there might be an easier way to achieve what you're 
after. This seems like pretty low-level stuff.

Nils.

----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to