Package org.nuxeo.ecm.core.api.local
Class LocalSession
- java.lang.Object
-
- org.nuxeo.ecm.core.api.AbstractSession
-
- org.nuxeo.ecm.core.api.local.LocalSession
-
- All Implemented Interfaces:
Serializable,AutoCloseable,CloseableCoreSession,CoreSession
public class LocalSession extends AbstractSession implements CloseableCoreSession
Local Session: implementation ofCoreSessionbeyondAbstractSession, dealing with low-level stuff.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.nuxeo.ecm.core.api.CoreSession
CoreSession.CopyOption
-
-
Field Summary
Fields Modifier and Type Field Description protected NuxeoPrincipalprincipalprotected StringrepositoryName-
Fields inherited from class org.nuxeo.ecm.core.api.AbstractSession
BINARY_TEXT_SYS_PROP, BLOCKED_PERMISSION_QUERY, CREATE_DOC_COUNT, createDocumentCount, DEFAULT_MAX_RESULTS, DELETE_DOC_COUNT, deleteDocumentCount, DISABLED_ISLATESTVERSION_PROPERTY, EMPTY_PATH, FIND_PROXIES_QUERY, FIND_VERSIONS_QUERY, LEGAL_HOLD_QUERY, LIMIT_RESULTS_PROPERTY, MAX_RESULTS_PROPERTY, registry, RESTRICT_PROXY_CREATION_PROPERTY, RETENTION_QUERY, TRASH_KEEP_CHECKED_IN_PROPERTY, UPDATE_DOC_COUNT, updateDocumentCount
-
Fields inherited from interface org.nuxeo.ecm.core.api.CoreSession
ALLOW_VERSION_WRITE, BINARY_FULLTEXT_MAIN_KEY, CHANGE_TOKEN, DISABLE_AUDIT_LOGGER, IMPORT_BASE_VERSION_ID, IMPORT_CHECKED_IN, IMPORT_HAS_LEGAL_HOLD, IMPORT_IS_RECORD, 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_RETAIN_UNTIL, 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, RETAIN_UNTIL_INDETERMINATE, RETAIN_UNTIL_INDETERMINATE_ISO, SKIP_DESTINATION_CHECK_ON_CREATE, SOURCE, USER_CHANGE
-
-
Constructor Summary
Constructors Constructor Description LocalSession(String repositoryName, NuxeoPrincipal principal)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Does nothing.voiddestroy()Does nothing.NuxeoPrincipalgetPrincipal()Gets the principal that created the client session.StringgetRepositoryName()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.StringgetSessionId()Returns the repository name and principal.booleanisStateSharedByAllThreadSessions()Returnstrueif all sessions in the current thread share the same state.StringtoString()-
Methods inherited from class org.nuxeo.ecm.core.api.AbstractSession
adaptFirstMatchingDocumentWithFacet, applyDefaultPermissions, cancel, canRemoveDocument, canRemoveDocument, checkBlockedDescendants, checkCanRemoveDocument, checkIn, checkOut, checkPermission, checkRetainedDescendants, computeCountUpTo, computeKeyForAtomicCreation, copy, copy, copy, copy, copyProxyAsDocument, copyProxyAsDocument, copyProxyAsDocument, copyProxyAsDocument, createDocument, createDocument, createDocumentCountInc, createDocumentModel, createDocumentModel, createDocumentModel, createProxy, createProxyInternal, deleteDocumentCountInc, 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, getRetainedProperties, getRetainUntil, getRootDocument, getSecurityService, getSourceDocument, getSuperParentType, getSuperSpace, getValidationService, getVersion, getVersioningService, getVersionLabel, getVersionModel, getVersions, getVersionSeriesId, getVersionsForDocument, getVersionsRefs, getWorkingCopy, hasChild, hasChildren, hasLegalHold, hasPermission, hasPermission, hasPermission, hasPermission, importDocument, importDocuments, isAdministrator, isCheckedOut, isEnforcedRecord, isFlexibleRecord, isLimitedResults, isNegativeAclAllowed, isRecord, isRetentionActive, isTrashed, isUnderRetentionOrLegalHold, loadDataModelsForFacet, makeFlexibleRecord, makeRecord, makeRecord, move, move, newDocumentModel, 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, removeOrphanVersions, replaceACE, replaceBlobDigest, resolveParentReference, resolveReference, restoreToVersion, restoreToVersion, restoreToVersion, save, saveDocument, saveDocuments, scroll, scroll, setACP, setACP, setDocumentSystemProp, setLegalHold, setLimitedResults, setLock, setMaxResults, setRetainUntil, setRetentionActive, tracedQuery, unsetRetainUntil, updateDocumentCountInc, updateExistingProxies, updateReadACLs, updateVersionsReadACLs, writeModel, writeModel
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.nuxeo.ecm.core.api.CoreSession
adaptFirstMatchingDocumentWithFacet, 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, getRetainedProperties, getRetainUntil, getRootDocument, getSourceDocument, getSuperParentType, getSuperSpace, getVersion, getVersionLabel, getVersions, getVersionSeriesId, getVersionsForDocument, getVersionsRefs, getWorkingCopy, hasChild, hasChildren, hasLegalHold, hasPermission, hasPermission, importDocuments, isCheckedOut, isEnforcedRecord, isFlexibleRecord, isNegativeAclAllowed, isRecord, isRetentionActive, isTrashed, isUnderRetentionOrLegalHold, makeFlexibleRecord, makeRecord, move, move, newDocumentModel, orderBefore, publishDocument, publishDocument, query, query, query, query, query, query, query, query, queryAndFetch, queryAndFetch, queryProjection, queryProjection, queryProjection, refreshDocument, reinitLifeCycleState, removeChildren, removeDocument, removeDocuments, removeLock, removeOrphanVersions, replaceACE, replaceBlobDigest, restoreToVersion, restoreToVersion, save, saveDocument, saveDocuments, scroll, scroll, setACP, setDocumentSystemProp, setLegalHold, setLock, setRetainUntil, setRetentionActive, unsetRetainUntil, updateReadACLs
-
-
-
-
Field Detail
-
repositoryName
protected String repositoryName
-
principal
protected NuxeoPrincipal principal
-
-
Constructor Detail
-
LocalSession
public LocalSession(String repositoryName, NuxeoPrincipal principal)
-
-
Method Detail
-
getRepositoryName
public String getRepositoryName()
Description copied from interface:CoreSessionReturns the repository name against which this core session is bound.- Specified by:
getRepositoryNamein interfaceCoreSession- Returns:
- the repository name used currently used as an identifier
-
getSessionId
public String getSessionId()
Description copied from interface:CoreSessionReturns the repository name and principal.- Specified by:
getSessionIdin interfaceCoreSession- Returns:
- the repository name and principal
-
getSession
public Session<?> getSession()
Description copied from class:AbstractSessionInternal method: Gets the current session based on the client session id.- Specified by:
getSessionin classAbstractSession- Returns:
- the repository session
-
close
public void close()
Description copied from interface:CloseableCoreSessionDoes nothing.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseableCoreSession- Specified by:
closein interfaceCoreSession
-
destroy
public void destroy()
Description copied from interface:CloseableCoreSessionDoes nothing.- Specified by:
destroyin interfaceCloseableCoreSession
-
getPrincipal
public NuxeoPrincipal getPrincipal()
Description copied from interface:CoreSessionGets the principal that created the client session.- Specified by:
getPrincipalin interfaceCoreSession- Returns:
- the principal
-
isStateSharedByAllThreadSessions
public boolean isStateSharedByAllThreadSessions()
Description copied from interface:CoreSessionReturnstrueif all sessions in the current thread share the same state.- Specified by:
isStateSharedByAllThreadSessionsin interfaceCoreSession
-
-