public class LocalSession extends AbstractSession implements Synchronization
CoreSession
beyond AbstractSession
, dealing with low-level stuff.CoreSession.CopyOption
Modifier and Type | Field and Description |
---|---|
protected NuxeoPrincipal |
principal |
protected String |
repositoryName |
ANONYMOUS, BINARY_TEXT_SYS_PROP, createDocumentCount, DEFAULT_MAX_RESULTS, deleteDocumentCount, DISABLED_ISLATESTVERSION_PROPERTY, EMPTY_PATH, LIMIT_RESULTS_PROPERTY, MAX_RESULTS_PROPERTY, registry, TRASH_KEEP_CHECKED_IN_PROPERTY, updateDocumentCount
ALLOW_VERSION_WRITE, CHANGE_TOKEN, IMPORT_BASE_VERSION_ID, IMPORT_CHECKED_IN, IMPORT_IS_VERSION, IMPORT_LIFECYCLE_POLICY, IMPORT_LIFECYCLE_STATE, IMPORT_LOCK_CREATED, IMPORT_LOCK_OWNER, IMPORT_PROXY_TARGET_ID, IMPORT_PROXY_TYPE, IMPORT_PROXY_VERSIONABLE_ID, IMPORT_VERSION_CREATED, IMPORT_VERSION_DESCRIPTION, IMPORT_VERSION_IS_LATEST, IMPORT_VERSION_IS_LATEST_MAJOR, IMPORT_VERSION_LABEL, IMPORT_VERSION_MAJOR, IMPORT_VERSION_MINOR, IMPORT_VERSION_VERSIONABLE_ID, SKIP_DESTINATION_CHECK_ON_CREATE, SOURCE, USER_CHANGE
Constructor and Description |
---|
LocalSession(String repositoryName,
NuxeoPrincipal principal) |
Modifier and Type | Method and Description |
---|---|
void |
afterCompletion(int status) |
void |
beforeCompletion() |
void |
close()
Closes this session.
|
protected void |
closeInThisThread() |
protected SessionInfo |
createSession()
Creates the session.
|
void |
destroy()
Destroys any system resources held by this instance.
|
NuxeoPrincipal |
getPrincipal()
Gets the principal that created the client session.
|
String |
getRepositoryName()
Returns the repository name against which this core session is bound.
|
Session |
getSession()
Internal method: Gets the current session based on the client session id.
|
String |
getSessionId()
Gets the current session id.
|
boolean |
isLive(boolean onThread)
Returns true if the session is currently connected to the repository.
|
boolean |
isStateSharedByAllThreadSessions()
Returns
true if all sessions in the current thread share the same state. |
protected static String |
newSessionId(String repositoryName,
NuxeoPrincipal principal) |
adaptFirstMatchingDocumentWithFacet, applyDefaultPermissions, cancel, canRemoveDocument, canRemoveDocument, checkIn, checkOut, checkPermission, computeCountUpTo, copy, copy, copy, copy, copyProxyAsDocument, copyProxyAsDocument, copyProxyAsDocument, copyProxyAsDocument, createDocument, createDocument, createDocumentModel, createDocumentModel, createDocumentModel, createMetrics, createProxy, createProxyInternal, exists, fillCreateOptions, filterGrantedPermissions, followTransition, followTransition, getACP, getAllowedStateTransitions, getAvailableSecurityPermissions, getBaseVersion, getBinaryFulltext, getChangeToken, getChild, getChildren, getChildren, getChildren, getChildren, getChildren, getChildrenIterator, getChildrenIterator, getChildrenIterator, getChildrenRefs, getContextMapEventInfo, getCurrentLifeCycleState, getDataModel, getDataModelField, getDataModelsField, getDataModelsFieldUp, getDocument, getDocuments, getDocumentSystemProp, getDocumentType, getDocumentWithVersion, getFiles, getFiles, getFirstParentDocumentWithFacet, getFolders, getFolders, getLastDocumentVersion, getLastDocumentVersionRef, getLifeCyclePolicy, getLockInfo, getMaxResults, getParentDocument, getParentDocumentRef, getParentDocumentRefs, getParentDocuments, getPermissionsToCheck, getPoliciesQueryTransformers, getPrincipalsToCheck, getProxies, getRootDocument, getSecurityService, getSourceDocument, getSuperParentType, getSuperSpace, getValidationService, getVersion, getVersioningService, getVersionLabel, getVersionModel, getVersions, getVersionSeriesId, getVersionsForDocument, getVersionsRefs, getWorkingCopy, hasChild, hasChildren, hasPermission, hasPermission, hasPermission, hasPermission, importDocument, importDocuments, isAdministrator, isCheckedOut, isLimitedResults, isNegativeAclAllowed, loadDataModelsForFacet, move, move, newEventContext, notifyCheckedInVersion, notifyEvent, notifyVersionChange, orderBefore, publishDocument, publishDocument, query, query, query, query, query, query, query, query, queryAndFetch, queryAndFetch, queryProjection, queryProjection, queryProjection, readModel, readModel, refreshDocument, reinitLifeCycleState, removeChildren, removeDocument, removeDocument, removeDocuments, removeExistingProxies, removeLock, removeNotifyOneDoc, replaceACE, resolveReference, restoreToVersion, restoreToVersion, restoreToVersion, save, saveDocument, saveDocuments, scroll, scroll, setACP, setACP, setDocumentSystemProp, setLimitedResults, setLock, setMaxResults, updateExistingProxies, writeModel
protected String repositoryName
protected NuxeoPrincipal principal
public LocalSession(String repositoryName, NuxeoPrincipal principal)
public String getRepositoryName()
CoreSession
getRepositoryName
in interface CoreSession
protected static String newSessionId(String repositoryName, NuxeoPrincipal principal)
public String getSessionId()
CoreSession
If the client is not connected returns null.
getSessionId
in interface CoreSession
public Session getSession()
AbstractSession
getSession
in class AbstractSession
protected SessionInfo createSession()
destroy()
.public boolean isLive(boolean onThread)
CoreSession
isLive
in interface CoreSession
public void close()
CoreSession
close
in interface AutoCloseable
close
in interface CoreSession
public void beforeCompletion()
beforeCompletion
in interface Synchronization
public void afterCompletion(int status)
afterCompletion
in interface Synchronization
protected void closeInThisThread()
public void destroy()
CoreSession
Called when the instance is no more needed.
destroy
in interface CoreSession
public NuxeoPrincipal getPrincipal()
CoreSession
getPrincipal
in interface CoreSession
public boolean isStateSharedByAllThreadSessions()
CoreSession
true
if all sessions in the current thread share the same state.isStateSharedByAllThreadSessions
in interface CoreSession
Copyright © 2017 Nuxeo. All rights reserved.