|
eXo JCR :: Component :: Extension Service 1.16.0-CR2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.services.jcr.ext.common.SessionProvider
public class SessionProvider
Created by The eXo Platform SAS
Provides JCR Session for client program. Usually it is per client thread object Session creates
with Repository.login(..) method and then can be stored in some cache if neccessary.
| Field Summary | |
|---|---|
static String |
SESSION_PROVIDER
Constant for handlers. |
| Constructor Summary | |
|---|---|
SessionProvider(org.exoplatform.services.security.ConversationState userState)
Creates SessionProvider for certain identity. |
|
| Method Summary | |
|---|---|
void |
close()
Calls logout() method for all cached sessions. |
static SessionProvider |
createAnonimProvider()
Helper for creating Anonymous session provider. |
static SessionProvider |
createProvider(List<AccessControlEntry> accessList)
Gives a SessionProvider for a given list of AccessControlEntry. |
static SessionProvider |
createSystemProvider()
Helper for creating System session provider. |
ManageableRepository |
getCurrentRepository()
|
String |
getCurrentWorkspace()
|
javax.jcr.Session |
getSession(String workspaceName,
ManageableRepository repository)
Gets the session from an internal cache if a similar session has already been used or creates a new session and puts it into the internal cache. |
void |
onCloseSession(ExtendedSession session)
|
void |
setCurrentRepository(ManageableRepository currentRepository)
Sets the current repository Repository. |
void |
setCurrentWorkspace(String currentWorkspace)
Sets the current Workspace |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String SESSION_PROVIDER
| Constructor Detail |
|---|
public SessionProvider(org.exoplatform.services.security.ConversationState userState)
userState - | Method Detail |
|---|
public static SessionProvider createSystemProvider()
public static SessionProvider createAnonimProvider()
public static SessionProvider createProvider(List<AccessControlEntry> accessList)
SessionProvider for a given list of AccessControlEntry.
accessList - list of AccessControlEntry
SessionProvider allowing to provide sessions with the
corresponding ACL.
public javax.jcr.Session getSession(String workspaceName,
ManageableRepository repository)
throws javax.jcr.LoginException,
javax.jcr.NoSuchWorkspaceException,
javax.jcr.RepositoryException
workspaceName - the workspace namerepository - the repository instance
javax.jcr.LoginException - if an error occurs while trying to login to the workspace
javax.jcr.NoSuchWorkspaceException - if the requested workspace doesn't exist
javax.jcr.RepositoryException - if any error occurspublic void close()
public void onCloseSession(ExtendedSession session)
onCloseSession in interface SessionLifecycleListenerpublic ManageableRepository getCurrentRepository()
public String getCurrentWorkspace()
public void setCurrentRepository(ManageableRepository currentRepository)
currentRepository - the current repositorypublic void setCurrentWorkspace(String currentWorkspace)
currentWorkspace - the current workspace
|
eXo JCR :: Component :: Extension Service 1.16.0-CR2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||