public class JCRTemplate extends Object
JCRSessionFactory to provide access to a JCR repository.| Modifier and Type | Method and Description |
|---|---|
<X> X |
doExecute(boolean useSystemSession,
String username,
String workspace,
JCRCallback<X> callback)
Deprecated.
Use doExecuteWithSystemSession or doExecute with JahiaUser
|
<X> X |
doExecute(boolean useSystemSession,
String username,
String workspace,
Locale locale,
JCRCallback<X> callback)
Deprecated.
Use doExecuteWithSystemSession or doExecute with JahiaUser
|
<X> X |
doExecute(JahiaUser user,
String workspace,
Locale locale,
JCRCallback<X> callback)
Execute the action specified by the given callback object within a new user Session.
|
<X> X |
doExecute(String username,
String realm,
String workspace,
Locale locale,
JCRCallback<X> callback)
Execute the action specified by the given callback object within a new user Session.
|
<X> X |
doExecuteWithSystemSession(JCRCallback<X> callback)
Execute the action specified by the given callback object within a system Session.
|
<X> X |
doExecuteWithSystemSession(String username,
JCRCallback<X> callback)
Deprecated.
Use doExecuteWithSystemSession with JahiaUser
|
<X> X |
doExecuteWithSystemSession(String username,
String workspace,
JCRCallback<X> callback)
Deprecated.
Use doExecuteWithSystemSession with JahiaUser
|
<X> X |
doExecuteWithSystemSession(String username,
String workspace,
Locale locale,
JCRCallback<X> callback)
Deprecated.
Use doExecuteWithSystemSession with JahiaUser
|
<X> X |
doExecuteWithSystemSessionAsUser(JahiaUser user,
String workspace,
Locale locale,
JCRCallback<X> callback)
Execute the action specified by the given callback object within a system Session.
|
<X> X |
doExecuteWithSystemSessionInSameWorkspaceAndLocale(JCRCallback<X> callback)
Execute the action specified by the given callback object within a system Session.
|
<X> X |
doExecuteWithUserSession(String username,
String workspace,
JCRCallback<X> callback)
Deprecated.
Use doExecute with JahiaUser
|
<X> X |
doExecuteWithUserSession(String username,
String workspace,
Locale locale,
JCRCallback<X> callback)
Deprecated.
Use doExecute with JahiaUser
|
static JCRTemplate |
getInstance()
Obtain the JCRTemplate singleton
|
JCRStoreProvider |
getProvider(String path) |
JCRSessionFactory |
getSessionFactory() |
void |
setSessionFactory(JCRSessionFactory sessionFactory) |
public static JCRTemplate getInstance()
public void setSessionFactory(JCRSessionFactory sessionFactory)
sessionFactory - The sessionFactory to set.public JCRSessionFactory getSessionFactory()
public <X> X doExecuteWithSystemSessionInSameWorkspaceAndLocale(JCRCallback<X> callback) throws javax.jcr.RepositoryException
X - the resulting object to return from the callback.callback - callback the JCRCallback that executes the client
operationjavax.jcr.RepositoryException - if the method could not find a current user session, or if any other underlying
JCR error occurred.public <X> X doExecuteWithSystemSession(JCRCallback<X> callback) throws javax.jcr.RepositoryException
callback - the JCRCallback that executes the client
operationjavax.jcr.RepositoryException - in case of JCR errors@Deprecated public <X> X doExecuteWithSystemSession(String username, JCRCallback<X> callback) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException@Deprecated public <X> X doExecuteWithSystemSession(String username, String workspace, JCRCallback<X> callback) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException@Deprecated public <X> X doExecuteWithSystemSession(String username, String workspace, Locale locale, JCRCallback<X> callback) throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic <X> X doExecuteWithSystemSessionAsUser(JahiaUser user, String workspace, Locale locale, JCRCallback<X> callback) throws javax.jcr.RepositoryException
user - the user to open the session withworkspace - the workspace name to log intolocale - the locale of the session, null to use unlocalized sessioncallback - the JCRCallback that executes the client
operationjavax.jcr.RepositoryException - in case of JCR errors@Deprecated public <X> X doExecuteWithUserSession(String username, String workspace, JCRCallback<X> callback) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException@Deprecated public <X> X doExecuteWithUserSession(String username, String workspace, Locale locale, JCRCallback<X> callback) throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic <X> X doExecute(String username, String realm, String workspace, Locale locale, JCRCallback<X> callback) throws javax.jcr.RepositoryException
user - the user to open the session withworkspace - the workspace name to log intolocale - the locale of the session, null to use unlocalized sessioncallback - the JCRCallback that executes the client
operationjavax.jcr.RepositoryException - in case of JCR errorspublic <X> X doExecute(JahiaUser user, String workspace, Locale locale, JCRCallback<X> callback) throws javax.jcr.RepositoryException
user - the user to open the session withworkspace - the workspace name to log intolocale - the locale of the session, null to use unlocalized sessioncallback - the JCRCallback that executes the client
operationjavax.jcr.RepositoryException - in case of JCR errors@Deprecated public <X> X doExecute(boolean useSystemSession, String username, String workspace, Locale locale, JCRCallback<X> callback) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException@Deprecated public <X> X doExecute(boolean useSystemSession, String username, String workspace, JCRCallback<X> callback) throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic JCRStoreProvider getProvider(String path)
Copyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.