Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.core.api.local
Class LocalSession

java.lang.Object
  extended by org.nuxeo.ecm.core.api.AbstractSession
      extended by org.nuxeo.ecm.core.api.local.LocalSession
All Implemented Interfaces:
Serializable, CoreSession, OperationHandler

public class LocalSession
extends AbstractSession

Local Session: a CoreSession not tied to an EJB container.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.nuxeo.ecm.core.api.AbstractSession
ANONYMOUS
 
Fields inherited from interface org.nuxeo.ecm.core.api.CoreSession
IMPORT_BASE_VERSION_ID, IMPORT_CHECKED_IN, IMPORT_IS_VERSION, IMPORT_LIFECYCLE_POLICY, IMPORT_LIFECYCLE_STATE, IMPORT_LOCK, 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
 
Constructor Summary
LocalSession()
           
 
Method Summary
 void cancel()
          Cancels any pending change made through this session.
static CoreSession createInstance()
           
 Principal getPrincipal()
          Gets the principal that created the client session.
 Session getSession()
          Internal method: Gets the current session based on the client session id.
 boolean isSessionAlive()
           
 boolean isStateSharedByAllThreadSessions()
          Returns true if all sessions in the current thread share the same state.
 boolean isTestingContext()
          This method is for compatibility with < 1.5 core In older core this class were used only for testing - but now it is used by webengine and a security fix that break tests was done.
 boolean supportsTags()
          Indicates if the current repository implementation supports tags.
 boolean supportsTags(String repositoryName)
          Indicates if implementation of the given repositoryName supports Tags feature
 
Methods inherited from class org.nuxeo.ecm.core.api.AbstractSession
adaptFirstMatchingDocumentWithFacet, afterBegin, afterCompletion, applyDefaultPermissions, beforeCompletion, canRemoveDocument, checkIn, checkIn, checkOut, connect, copy, copy, copyProxyAsDocument, copyProxyAsDocument, createDocument, createDocument, createDocumentModel, createDocumentModel, createDocumentModel, createProxy, createProxy, destroy, disconnect, endOperation, exists, fireEvent, followTransition, generateDocumentName, generateVersionLabelFor, getACP, getAllowedStateTransitions, getAvailableSecurityPermissions, getBaseVersion, getChild, getChildren, getChildren, getChildren, getChildren, getChildren, getChildrenIterator, getChildrenIterator, getChildrenIterator, getChildrenRefs, getContentData, getCurrentLifeCycleState, getDataModel, getDataModel, getDataModelField, getDataModelFields, getDataModelsField, getDataModelsFieldUp, getDocsResultChunk, getDocument, getDocument, getDocuments, getDocumentSystemProp, getDocumentType, getDocumentWithVersion, getEventService, getFiles, getFiles, getFilesIterator, getFolders, getFolders, getFoldersIterator, getLastDocumentVersion, getLastDocumentVersionRef, getLastVersion, getLifeCyclePolicy, getLock, getLockInfo, getParentDocument, getParentDocumentRef, getParentDocumentRefs, getParentDocuments, getPermissionsToCheck, getProxies, getProxyVersions, getRepositoryName, getRootDocument, getSecuritySummary, getSessionId, getSourceDocument, getStreamURI, getSuperParentType, getSuperSpace, getVersion, getVersionLabel, getVersions, getVersionSeriesId, getVersionsForDocument, getVersionsRefs, getWorkingCopy, hasChildren, hasPermission, hasPermission, importDocuments, internalCheckOut, isCheckedOut, isDirty, move, move, newEventContext, orderBefore, publishDocument, publishDocument, query, query, query, query, query, query, queryAndFetch, queryIt, querySimpleFts, querySimpleFts, querySimpleFtsIt, querySimpleFtsIt, refreshDocument, reinitLifeCycleState, removeChildren, removeDocument, removeDocuments, removeLock, restoreToVersion, restoreToVersion, restoreToVersion, restoreToVersion, run, run, save, saveDocument, saveDocuments, setACP, setDocumentSystemProp, setLock, setLock, startOperation, unlock
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalSession

public LocalSession()
Method Detail

createInstance

public static CoreSession createInstance()

supportsTags

public boolean supportsTags(String repositoryName)
                     throws ClientException
Description copied from interface: CoreSession
Indicates if implementation of the given repositoryName supports Tags feature

Parameters:
repositoryName - the name of the repository to test
Returns:
Throws:
ClientException

supportsTags

public boolean supportsTags()
                     throws ClientException
Description copied from interface: CoreSession
Indicates if the current repository implementation supports tags.

Returns:
true if tags are supported
Throws:
ClientException

isTestingContext

public boolean isTestingContext()
This method is for compatibility with < 1.5 core In older core this class were used only for testing - but now it is used by webengine and a security fix that break tests was done. This method is checking if we are in a testing context


getPrincipal

public Principal getPrincipal()
Description copied from interface: CoreSession
Gets the principal that created the client session.

Specified by:
getPrincipal in interface CoreSession
Overrides:
getPrincipal in class AbstractSession
Returns:
the principal

getSession

public Session getSession()
                   throws ClientException
Description copied from class: AbstractSession
Internal method: Gets the current session based on the client session id.

Specified by:
getSession in class AbstractSession
Returns:
the repository session
Throws:
ClientException

cancel

public void cancel()
            throws ClientException
Description copied from interface: CoreSession
Cancels any pending change made through this session.

Specified by:
cancel in interface CoreSession
Overrides:
cancel in class AbstractSession
Throws:
ClientException

isStateSharedByAllThreadSessions

public boolean isStateSharedByAllThreadSessions()
Description copied from interface: CoreSession
Returns true if all sessions in the current thread share the same state.


isSessionAlive

public boolean isSessionAlive()
Specified by:
isSessionAlive in class AbstractSession

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.