public class LocalSession extends AbstractSession implements CloseableCoreSession, Synchronization
CoreSession beyond AbstractSession, dealing with low-level stuff.CoreSession.CopyOption| Modifier and Type | Field and Description | 
|---|---|
protected NuxeoPrincipal | 
principal  | 
protected String | 
repositoryName  | 
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, updateDocumentCountALLOW_VERSION_WRITE, CHANGE_TOKEN, IMPORT_BASE_VERSION_ID, IMPORT_CHECKED_IN, IMPORT_IS_RETENTION_ACTIVE, 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, computeKeyForAtomicCreation, 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, getOrCreateDocument, getOrCreateDocument, 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, isRetentionActive, isTrashed, 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, setRetentionActive, updateExistingProxies, updateReadACLs, writeModelclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitadaptFirstMatchingDocumentWithFacet, applyDefaultPermissions, cancel, canRemoveDocument, checkIn, checkOut, copy, copy, copy, copy, copyProxyAsDocument, copyProxyAsDocument, copyProxyAsDocument, copyProxyAsDocument, createDocument, createDocument, createDocumentModel, createDocumentModel, createDocumentModel, createProxy, exists, filterGrantedPermissions, followTransition, followTransition, getACP, getAllowedStateTransitions, getAvailableSecurityPermissions, getBaseVersion, getBinaryFulltext, getChangeToken, getChild, getChildren, getChildren, getChildren, getChildren, getChildren, getChildrenIterator, getChildrenIterator, getChildrenIterator, getChildrenRefs, getCurrentLifeCycleState, getDataModel, getDataModelsField, getDataModelsFieldUp, getDocument, getDocuments, getDocumentSystemProp, getDocumentType, getDocumentWithVersion, getFiles, getFiles, getFolders, getFolders, getLastDocumentVersion, getLastDocumentVersionRef, getLifeCyclePolicy, getLockInfo, getOrCreateDocument, getOrCreateDocument, getParentDocument, getParentDocumentRef, getParentDocumentRefs, getParentDocuments, getPermissionsToCheck, getProxies, getRootDocument, getSourceDocument, getSuperParentType, getSuperSpace, getVersion, getVersionLabel, getVersions, getVersionSeriesId, getVersionsForDocument, getVersionsRefs, getWorkingCopy, hasChild, hasChildren, hasPermission, hasPermission, importDocuments, isCheckedOut, isNegativeAclAllowed, isRetentionActive, isTrashed, move, move, orderBefore, publishDocument, publishDocument, query, query, query, query, query, query, query, query, queryAndFetch, queryAndFetch, queryProjection, queryProjection, queryProjection, refreshDocument, reinitLifeCycleState, removeChildren, removeDocument, removeDocuments, removeLock, replaceACE, restoreToVersion, restoreToVersion, save, saveDocument, saveDocuments, scroll, scroll, setACP, setDocumentSystemProp, setLock, setRetentionActive, updateReadACLsprotected String repositoryName
protected NuxeoPrincipal principal
public LocalSession(String repositoryName, NuxeoPrincipal principal)
public String getRepositoryName()
CoreSessiongetRepositoryName in interface CoreSessionprotected static String newSessionId(String repositoryName, NuxeoPrincipal principal)
public String getSessionId()
CoreSessionIf the client is not connected returns null.
getSessionId in interface CoreSessionpublic Session getSession()
AbstractSessiongetSession in class AbstractSessionprotected SessionInfo createSession()
destroy().public boolean isLive(boolean onThread)
CoreSessionisLive in interface CoreSessionpublic void close()
CloseableCoreSessionclose in interface AutoCloseableclose in interface CloseableCoreSessionclose in interface CoreSessionpublic void beforeCompletion()
beforeCompletion in interface Synchronizationpublic void afterCompletion(int status)
afterCompletion in interface Synchronizationprotected void closeInThisThread()
public void destroy()
CloseableCoreSessionCalled when the instance is no more needed.
destroy in interface CloseableCoreSessionpublic NuxeoPrincipal getPrincipal()
CoreSessiongetPrincipal in interface CoreSessionpublic boolean isStateSharedByAllThreadSessions()
CoreSessiontrue if all sessions in the current thread share the same state.isStateSharedByAllThreadSessions in interface CoreSessionCopyright © 2019 Nuxeo. All rights reserved.