|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nuxeo.ecm.core.api.AbstractSession
public abstract class AbstractSession
Abstract implementation of the client interface.
This handles all the aspects that are independent on the final implementation (like running inside a J2EE platform or not).
The only aspect not implemented is the session management that should be handled by subclasses.
| Field Summary | |
|---|---|
static NuxeoPrincipal |
ANONYMOUS
|
| Constructor Summary | |
|---|---|
AbstractSession()
|
|
| Method Summary | ||
|---|---|---|
|
adaptFirstMatchingDocumentWithFacet(DocumentRef docRef,
String facet,
Class<T> adapterClass)
Find the first parent with the given facet and adapt it on the
adapterClass. |
|
void |
afterBegin()
The container calls this when this session sees a transaction begin. |
|
void |
afterCompletion(boolean committed)
The container calls this when this session sees a transaction commit/rollback. |
|
void |
applyDefaultPermissions(String userOrGroupName)
Applies default Read permissions on root JCR Document for the given user or group name. |
|
void |
beforeCompletion()
The container calls this when this session is about to see a transaction completion. |
|
void |
cancel()
Cancels any pending change made through this session. |
|
boolean |
canRemoveDocument(DocumentRef docRef)
Check if a document can be removed. |
|
DocumentRef |
checkIn(DocumentRef docRef,
VersioningOption option,
String checkinComment)
Checks in a modified document, creating a new version. |
|
DocumentModel |
checkIn(DocumentRef docRef,
VersionModel ver)
Deprecated. |
|
void |
checkOut(DocumentRef docRef)
Checks out a versioned document. |
|
String |
connect(String repositoryName,
Map<String,Serializable> context)
Connects to the repository given its URI. |
|
DocumentModel |
copy(DocumentRef src,
DocumentRef dst,
String name)
Copies the source document to the destination folder under the given name. |
|
List<DocumentModel> |
copy(List<DocumentRef> src,
DocumentRef dst)
Bulk copy. |
|
DocumentModel |
copyProxyAsDocument(DocumentRef src,
DocumentRef dst,
String name)
Work like copy but in the case of a source proxy the destination will be a new document instead of a proxy. |
|
List<DocumentModel> |
copyProxyAsDocument(List<DocumentRef> src,
DocumentRef dst)
Bulk copyProxyAsDocument. |
|
DocumentModel |
createDocument(DocumentModel docModel)
Creates a document using given document model for initialization. |
|
DocumentModel[] |
createDocument(DocumentModel[] docModels)
Bulk creation of documents. |
|
DocumentModel |
createDocumentModel(String typeName)
Creates a document model using type name. |
|
DocumentModel |
createDocumentModel(String typeName,
Map<String,Object> options)
Creates a document model using required information. |
|
DocumentModel |
createDocumentModel(String parentPath,
String id,
String typeName)
Creates a document model using required information. |
|
DocumentModel |
createProxy(DocumentRef docRef,
DocumentRef folderRef)
Creates a generic proxy to the given document inside the given folder. |
|
DocumentModel |
createProxy(DocumentRef parentRef,
DocumentRef docRef,
VersionModel version,
boolean overwriteExistingProxy)
Deprecated. |
|
void |
destroy()
Destroys any system resources held by this instance. |
|
void |
disconnect()
Closes the current session and disconnects from the repository. |
|
void |
endOperation(Operation<?> operation)
This method is for compatibility reasons to notify an operation end. |
|
boolean |
exists(DocumentRef docRef)
Tests if the document pointed by the given reference exists and is accessible. |
|
void |
fireEvent(Event event)
|
|
boolean |
followTransition(DocumentRef docRef,
String transition)
Follows a given life cycle transition. |
|
String |
generateDocumentName(Document parent,
String name)
Generate a non-null unique name within given parent's children. |
|
String |
generateVersionLabelFor(DocumentRef docRef)
Utility method to generate VersionModel labels. |
|
ACP |
getACP(DocumentRef docRef)
Gets the document access control policy. |
|
Collection<String> |
getAllowedStateTransitions(DocumentRef docRef)
Gets the allowed state transitions for this document. |
|
List<String> |
getAvailableSecurityPermissions()
Retrieves the available security permissions existing in the system. |
|
DocumentRef |
getBaseVersion(DocumentRef docRef)
Gets the version to which a checked in document is linked. |
|
DocumentModel |
getChild(DocumentRef parent,
String name)
Gets a child document given its name and the parent reference. |
|
DocumentModelList |
getChildren(DocumentRef parent)
Gets the children of the given parent. |
|
DocumentModelList |
getChildren(DocumentRef parent,
String type)
Gets the children of the given parent filtered according to the given document type. |
|
DocumentModelList |
getChildren(DocumentRef parent,
String type,
Filter filter,
Sorter sorter)
Same as CoreSession.getChildren(DocumentRef, String, String, Filter, Sorter)
without specific permission filtering. |
|
DocumentModelList |
getChildren(DocumentRef parent,
String type,
String perm)
Gets the children of the given parent filtered according to the given document type and permission. |
|
DocumentModelList |
getChildren(DocumentRef parent,
String type,
String perm,
Filter filter,
Sorter sorter)
Same as CoreSession.getChildren(DocumentRef, String, String) but the result
is filtered and then sorted using the specified filter and sorter. |
|
DocumentModelIterator |
getChildrenIterator(DocumentRef parent)
Gets an iterator to the children of the given parent. |
|
DocumentModelIterator |
getChildrenIterator(DocumentRef parent,
String type)
Gets an iterator to the children of the given parent filtered according to the given document type. |
|
DocumentModelIterator |
getChildrenIterator(DocumentRef parent,
String type,
String perm,
Filter filter)
Gets the children of the given parent filtered according to the given document type and permission. |
|
List<DocumentRef> |
getChildrenRefs(DocumentRef parentRef,
String perm)
Gets the references of the children. |
|
SerializableInputStream |
getContentData(String key)
Gets the data input stream given its key. |
|
String |
getCurrentLifeCycleState(DocumentRef docRef)
Returns the life cycle of the document. |
|
DataModel |
getDataModel(DocumentRef docRef,
Schema schema)
Retrieves a data model given a document reference and a schema. |
|
DataModel |
getDataModel(DocumentRef docRef,
String schema)
Deprecated. |
|
Object |
getDataModelField(DocumentRef docRef,
String schema,
String field)
Deprecated. |
|
Object[] |
getDataModelFields(DocumentRef docRef,
String schema,
String[] fields)
Deprecated. |
|
Object[] |
getDataModelsField(DocumentRef[] docRefs,
String schema,
String field)
Retrieves the given field value from the given schema for all the given documents. |
|
Object[] |
getDataModelsFieldUp(DocumentRef docRef,
String schema,
String field)
Retrieves the given field value from the given schema for the given document along with all its parent documents. |
|
DocumentModelsChunk |
getDocsResultChunk(DocsQueryProviderDef def,
String type,
String perm,
Filter filter,
int start,
int max)
Method used internally to retrieve frames of a long result. |
|
DocumentModel |
getDocument(DocumentRef docRef)
Gets a document model given its reference. |
|
DocumentModel |
getDocument(DocumentRef docRef,
String[] schemas)
Deprecated. unused |
|
DocumentModelList |
getDocuments(DocumentRef[] docRefs)
Gets a list of documents given their references. |
|
|
getDocumentSystemProp(DocumentRef ref,
String systemProperty,
Class<T> type)
Gets system property of the specified type for the document ref. |
|
DocumentType |
getDocumentType(String type)
Gets the document type object given its type name. |
|
DocumentModel |
getDocumentWithVersion(DocumentRef docRef,
VersionModel version)
Returns a document that represents the specified version of the document. |
|
EventService |
getEventService()
|
|
DocumentModelList |
getFiles(DocumentRef parent)
Same as CoreSession.getChildren(DocumentRef) but returns only
non-folder documents. |
|
DocumentModelList |
getFiles(DocumentRef parent,
Filter filter,
Sorter sorter)
Same as CoreSession.getFiles(org.nuxeo.ecm.core.api.DocumentRef) but uses an optional filter and sorter on the
result. |
|
DocumentModelIterator |
getFilesIterator(DocumentRef parent)
Same as CoreSession.getFiles(DocumentRef) but returns an
iterator. |
|
DocumentModelList |
getFolders(DocumentRef parent)
Same as CoreSession.getChildren(DocumentRef) but returns only
folder documents. |
|
DocumentModelList |
getFolders(DocumentRef parent,
Filter filter,
Sorter sorter)
Same as CoreSession.getFolders(DocumentRef) but uses an optional
filter and sorter on the result. |
|
DocumentModelIterator |
getFoldersIterator(DocumentRef parent)
Same as CoreSession.getFolders(DocumentRef) but returns a lazy
loading iterator over the list of children. |
|
DocumentModel |
getLastDocumentVersion(DocumentRef docRef)
Gets the document corresponding to the last version for the given document. |
|
DocumentRef |
getLastDocumentVersionRef(DocumentRef docRef)
Gets the document reference corresponding to the last version for the given document. |
|
VersionModel |
getLastVersion(DocumentRef docRef)
Gets the last version of a document. |
|
String |
getLifeCyclePolicy(DocumentRef docRef)
Returns the life cycle policy of the document. |
|
String |
getLock(DocumentRef docRef)
Deprecated. |
|
Lock |
getLockInfo(DocumentRef docRef)
Gets the lock info on the given document. |
|
DocumentModel |
getParentDocument(DocumentRef docRef)
Gets the parent document or null if this is the root document. |
|
DocumentRef |
getParentDocumentRef(DocumentRef docRef)
Returns the parent ref of the document referenced by docRef or
null if this is the root document. |
|
DocumentRef[] |
getParentDocumentRefs(DocumentRef docRef)
Creates an array with all parent refs starting from the given document up to the root. |
|
List<DocumentModel> |
getParentDocuments(DocumentRef docRef)
Gets the parent documents in path from the root to the given document or empty list if this is the root document. |
|
String[] |
getPermissionsToCheck(String permission)
Provides the full list of all permissions or groups of permissions that contain the given one (inclusive). |
|
Principal |
getPrincipal()
Gets the principal that created the client session. |
|
DocumentModelList |
getProxies(DocumentRef docRef,
DocumentRef folderRef)
Finds the proxies for a document. |
|
String[] |
getProxyVersions(DocumentRef docRef,
DocumentRef folderRef)
Gets all proxy versions to document docRef inside folder folderRef. |
|
String |
getRepositoryName()
Returns the repository name against which this core session is bound. |
|
DocumentModel |
getRootDocument()
Gets the root document of this repository. |
|
List<SecuritySummaryEntry> |
getSecuritySummary(DocumentModel docModel,
Boolean includeParents)
Returns security descriptors of doc and all it's children that hold explicit security. |
|
abstract Session |
getSession()
Internal method: Gets the current session based on the client session id. |
|
String |
getSessionId()
Gets the current session id. |
|
DocumentModel |
getSourceDocument(DocumentRef docRef)
Gets the head (live) document for this document. |
|
String |
getStreamURI(String blobPropertyId)
Returns an URI identifying the stream given the blob property id. |
|
String |
getSuperParentType(DocumentModel doc)
Returns the type of his parent SuperSpace (workspace, section, etc.). |
|
DocumentModel |
getSuperSpace(DocumentModel doc)
Returns the parent SuperSpace (workspace, section, etc.). |
|
DocumentModel |
getVersion(String versionableId,
VersionModel versionModel)
Gets a document version, given the versionable id and label. |
|
String |
getVersionLabel(DocumentModel docModel)
Gets the version label for a document, according to the versioning service. |
|
List<DocumentModel> |
getVersions(DocumentRef docRef)
Retrieves all the versions for a specified document. |
|
String |
getVersionSeriesId(DocumentRef docRef)
Gets the version series id for a document. |
|
List<VersionModel> |
getVersionsForDocument(DocumentRef docRef)
Retrieves all the versions for a specified document. |
|
List<DocumentRef> |
getVersionsRefs(DocumentRef docRef)
Gets the references of the versions of the document. |
|
DocumentModel |
getWorkingCopy(DocumentRef docRef)
Gets the working copy (live document) for a proxy or a version. |
|
boolean |
hasChildren(DocumentRef docRef)
Tests if the document has any children. |
|
boolean |
hasPermission(DocumentRef docRef,
String permission)
Checks if the principal that created the client session has the given privilege on the referred document. |
|
boolean |
hasPermission(Principal principal,
DocumentRef docRef,
String permission)
Checks if a given principal has the given privilege on the referred document. |
|
void |
importDocuments(List<DocumentModel> docModels)
Low-level import of documents, reserved for the administrator. |
|
void |
internalCheckOut(DocumentRef docRef)
|
|
boolean |
isCheckedOut(DocumentRef docRef)
Returns whether the current document is checked-out or not. |
|
boolean |
isDirty(DocumentRef docRef)
Deprecated. |
|
abstract boolean |
isSessionAlive()
|
|
DocumentModel |
move(DocumentRef src,
DocumentRef dst,
String name)
Moves the source document to the destination folder under the given name. |
|
void |
move(List<DocumentRef> src,
DocumentRef dst)
Bulk move. |
|
DocumentEventContext |
newEventContext(DocumentModel source)
|
|
void |
orderBefore(DocumentRef parent,
String src,
String dest)
Given a parent document, order the source child before the destination child. |
|
DocumentModel |
publishDocument(DocumentModel docToPublish,
DocumentModel section)
Publishes the document in a section overwriting any existing proxy to the same document. |
|
DocumentModel |
publishDocument(DocumentModel docModel,
DocumentModel section,
boolean overwriteExistingProxy)
Publishes the document in a section. |
|
DocumentModelList |
query(String query)
Executes the given NXQL query an returns the result. |
|
DocumentModelList |
query(String query,
Filter filter)
Executes the given NXQL query and returns the result that matches the filter. |
|
DocumentModelList |
query(String query,
Filter filter,
int max)
Executes the given NXQL query and returns the result that matches the filter. |
|
DocumentModelList |
query(String query,
Filter filter,
long limit,
long offset,
boolean countTotal)
Executes the given NXQL query and returns the result that matches the filter. |
|
DocumentModelList |
query(String query,
int max)
Executes the given NXQL query an returns the result. |
|
DocumentModelList |
query(String query,
String queryType,
Filter filter,
long limit,
long offset,
boolean countTotal)
Executes the given query and returns the result that matches the filter. |
|
IterableQueryResult |
queryAndFetch(String query,
String queryType,
Object... params)
|
|
DocumentModelIterator |
queryIt(String query,
Filter filter,
int max)
Executes the given NXQL query and returns an iterators of results. |
|
DocumentModelList |
querySimpleFts(String keywords)
Deprecated. |
|
DocumentModelList |
querySimpleFts(String keywords,
Filter filter)
Deprecated. |
|
DocumentModelIterator |
querySimpleFtsIt(String query,
Filter filter,
int pageSize)
Deprecated. |
|
DocumentModelIterator |
querySimpleFtsIt(String query,
String startingPath,
Filter filter,
int pageSize)
Deprecated. |
|
DocumentModel.DocumentModelRefresh |
refreshDocument(DocumentRef ref,
int refreshFlags,
String[] schemas)
Internal method - it is used internally by DocumentModel.refresh() |
|
void |
reinitLifeCycleState(DocumentRef docRef)
Reinitializes the life cycle state of the document to its default state. |
|
void |
removeChildren(DocumentRef docRef)
Removes all children from the given document. |
|
void |
removeDocument(DocumentRef docRef)
Removes this document and all its children, if any. |
|
void |
removeDocuments(DocumentRef[] docRefs)
Implementation uses the fact that the lexicographic ordering of paths is a refinement of the "contains" partial ordering. |
|
Lock |
removeLock(DocumentRef docRef)
Removes the lock on the given document. |
|
DocumentModel |
restoreToVersion(DocumentRef docRef,
DocumentRef versionRef)
Restores the given document to the specified version. |
|
DocumentModel |
restoreToVersion(DocumentRef docRef,
DocumentRef versionRef,
boolean skipSnapshotCreation,
boolean skipCheckout)
Restores the given document to the specified version. |
|
DocumentModel |
restoreToVersion(DocumentRef docRef,
VersionModel version)
Deprecated. |
|
DocumentModel |
restoreToVersion(DocumentRef docRef,
VersionModel version,
boolean skipSnapshotCreation)
Deprecated. |
|
|
run(Operation<T> op)
Run a command |
|
|
run(Operation<T> op,
ProgressMonitor monitor)
Run a command and notify the given monitor about the execution progress |
|
void |
save()
Saves any pending changes done until now through this session. |
|
DocumentModel |
saveDocument(DocumentModel docModel)
Saves changes done on the given document model. |
|
void |
saveDocuments(DocumentModel[] docModels)
Bulk document saving. |
|
void |
setACP(DocumentRef docRef,
ACP newAcp,
boolean overwrite)
Sets the ACP for this document. |
|
|
setDocumentSystemProp(DocumentRef ref,
String systemProperty,
T value)
Sets given value as a system property. |
|
Lock |
setLock(DocumentRef docRef)
Sets a lock on the given document. |
|
void |
setLock(DocumentRef docRef,
String key)
Deprecated. |
|
void |
startOperation(Operation<?> operation)
This method is for compatibility reasons to notify an operation start. |
|
String |
unlock(DocumentRef docRef)
Deprecated. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.nuxeo.ecm.core.api.CoreSession |
|---|
isStateSharedByAllThreadSessions, supportsTags, supportsTags |
| Field Detail |
|---|
public static final NuxeoPrincipal ANONYMOUS
| Constructor Detail |
|---|
public AbstractSession()
| Method Detail |
|---|
public abstract Session getSession()
throws ClientException
ClientException
public String connect(String repositoryName,
Map<String,Serializable> context)
throws ClientException
CoreSession
This method must never be called by users. Is is indirectly called
from CoreInstance.open(String, Map) when creating the client.
connect in interface CoreSessionrepositoryName - the repository URI (unique in the platform)context - a map of properties used to initialize the session. Can be
null if no context properties are specified.
ClientExceptionpublic DocumentType getDocumentType(String type)
CoreSession
getDocumentType in interface CoreSessiontype - the document type name
public String generateVersionLabelFor(DocumentRef docRef)
throws ClientException
generateVersionLabelFor in interface CoreSessionClientExceptionpublic String getSessionId()
CoreSessionIf the client is not connected returns null.
getSessionId in interface CoreSessionpublic Principal getPrincipal()
CoreSession
getPrincipal in interface CoreSessionpublic DocumentEventContext newEventContext(DocumentModel source)
public EventService getEventService()
public void afterBegin()
CoreSession
afterBegin in interface CoreSessionpublic void beforeCompletion()
CoreSession
beforeCompletion in interface CoreSessionpublic void afterCompletion(boolean committed)
CoreSession
afterCompletion in interface CoreSession
public void fireEvent(Event event)
throws ClientException
ClientException
public boolean hasPermission(Principal principal,
DocumentRef docRef,
String permission)
throws ClientException
CoreSession
hasPermission in interface CoreSessionClientException
public boolean hasPermission(DocumentRef docRef,
String permission)
throws ClientException
CoreSession
hasPermission in interface CoreSessionClientException
public DocumentModel copy(DocumentRef src,
DocumentRef dst,
String name)
throws ClientException
CoreSessionIf the destination document is not a folder or it doesn't exists then throws an exception.
If the source is a proxy the destination will be a copy of the proxy.
copy in interface CoreSessionsrc - the source document referencedst - the destination folder referencename - the new name of the file or null if the original name must be
preserved
ClientException
public List<DocumentModel> copy(List<DocumentRef> src,
DocumentRef dst)
throws ClientException
CoreSession
copy in interface CoreSessionsrc - the documents to copydst - the destination folder
ClientException
public DocumentModel copyProxyAsDocument(DocumentRef src,
DocumentRef dst,
String name)
throws ClientException
CoreSession
copyProxyAsDocument in interface CoreSessionsrc - the source document referencedst - the destination folder referencename - the new name of the file or null if the original name must be
preserved
ClientExceptionCoreSession.copy(DocumentRef, DocumentRef, String)
public List<DocumentModel> copyProxyAsDocument(List<DocumentRef> src,
DocumentRef dst)
throws ClientException
CoreSession
copyProxyAsDocument in interface CoreSessionsrc - the documents to copydst - the destination folder
ClientException
public DocumentModel move(DocumentRef src,
DocumentRef dst,
String name)
throws ClientException
CoreSessionnull or if there is a collision, a suitable new
name is found.
If the destination document is not a folder or it doesn't exists then throws an exception.
move in interface CoreSessionsrc - the source document referencedst - the destination folder referencename - the new name of the file, or null
ClientException
public void move(List<DocumentRef> src,
DocumentRef dst)
throws ClientException
CoreSession
move in interface CoreSessionsrc - the documents to movedst - the destination folder
ClientException
public ACP getACP(DocumentRef docRef)
throws ClientException
CoreSessionThe returned ACP is the ACP defined on that document if any + the inherited ACL if any. If neither a local ACP nor inherited ACL exists null is returned.
Note that modifying the returned ACP will not affect in any way the
stored document ACP. To modify the ACP you must explicitely set it by
calling CoreSession.setACP(DocumentRef, ACP, boolean)
This method will always fetch a fresh ACP from the storage. The
recommended way to get the ACP is to use DocumentModel.getACP()
this way the ACP will be cached at the document model level and so you
can use it for multiple permission checks without fetching it each time.
getACP in interface CoreSessiondocRef - the doc ref to retrieve ACP or null if none
ClientException
public void setACP(DocumentRef docRef,
ACP newAcp,
boolean overwrite)
throws ClientException
CoreSession
If the ACP contains an INHERITED ACL it will be discarded.
Only ACLs relative to the current document may be changed.
If the overwrite argument is false, the ACP is merged with
the existing one if any. The merge is done as follow:
owners are specified then they will replace the
existing ones if any. Otherwise the old owners are preserved if any. As
for the ACL if you want to remove existing owners you need to specify an
empty owner array (and not a null one)
overwrite argument is true, the old ACP will be
replaced by the new one.
This way if you can remove the existing ACP by specifying a null ACP and
overwrite argument set to true.
Setting a null ACP when overwrite is false will do nothing.
setACP in interface CoreSessionClientException
public void cancel()
throws ClientException
CoreSession
cancel in interface CoreSessionClientException
public DocumentModel createDocumentModel(String typeName)
throws ClientException
CoreSessionUsed to fetch initial datamodels from the type definition.
DocumentModel creation notifies a
DocumentEventTypes.EMPTY_DOCUMENTMODEL_CREATED so that core event
listener can initialize its content with computed properties.
createDocumentModel in interface CoreSessionClientException
public DocumentModel createDocumentModel(String parentPath,
String id,
String typeName)
throws ClientException
CoreSessionUsed to fetch initial datamodels from the type definition.
DocumentModel creation notifies a
DocumentEventTypes.EMPTY_DOCUMENTMODEL_CREATED so that core event
listener can initialize its content with computed properties.
createDocumentModel in interface CoreSessionClientException
public DocumentModel createDocumentModel(String typeName,
Map<String,Object> options)
throws ClientException
CoreSessionUsed to fetch initial datamodels from the type definition.
DocumentModel creation notifies a
DocumentEventTypes.EMPTY_DOCUMENTMODEL_CREATED so that core event
listener can initialize its content with computed properties.
createDocumentModel in interface CoreSessionoptions - additional contextual data provided to core event
listeners
ClientException
public DocumentModel createDocument(DocumentModel docModel)
throws ClientException
CoreSessionThe model contains path of the new document, its type and optionally the initial data models of the document.
createDocument in interface CoreSessiondocModel - the document model to use for initialization
ClientException
public void importDocuments(List<DocumentModel> docModels)
throws ClientException
CoreSessionThis method is used to import documents with given ids, or directly import versions and proxies.
The id, parent, name and typeName must be present in each docModel.
The context data needs to be filled with values depending on the type of the document:
For a proxy (type = "ecm:proxyType"):
CoreSession.IMPORT_PROXY_TARGET_ID and CoreSession.IMPORT_PROXY_VERSIONABLE_ID.
For a version (no parent): CoreSession.IMPORT_VERSION_VERSIONABLE_ID,
CoreSession.IMPORT_VERSION_CREATED, CoreSession.IMPORT_VERSION_LABEL and
CoreSession.IMPORT_VERSION_DESCRIPTION.
For a live document: CoreSession.IMPORT_BASE_VERSION_ID and
CoreSession.IMPORT_CHECKED_IN (Boolean).
For a live document or a version: CoreSession.IMPORT_LIFECYCLE_POLICY ,
CoreSession.IMPORT_LIFECYCLE_STATE, CoreSession.IMPORT_VERSION_MAJOR (Long) and
CoreSession.IMPORT_VERSION_MINOR (Long).
importDocuments in interface CoreSessiondocModels - the documents to create
ClientException
public String generateDocumentName(Document parent,
String name)
throws DocumentException
If name is null, a name is generated. If name is already used, a random suffix is appended to it.
DocumentException
public DocumentModel[] createDocument(DocumentModel[] docModels)
throws ClientException
CoreSession
createDocument in interface CoreSessiondocModels - the document models to use for intialization
ClientExceptionpublic abstract boolean isSessionAlive()
public void disconnect()
throws ClientException
CoreSession
This method must never be called by users. Is is indirectly called
from CoreInstance.close(CoreSession) when closing the client
All pending change made on the repository through this session are saved.
disconnect in interface CoreSessionClientException
public boolean exists(DocumentRef docRef)
throws ClientException
CoreSessionThis operation makes no difference between non-existence and permission problems.
If the parent is null or its path is null, then root is considered.
exists in interface CoreSessiondocRef - the reference to the document to test for existence
ClientException
public DocumentModel getChild(DocumentRef parent,
String name)
throws ClientException
CoreSessionThrows an exception if the document could not be found.
If the supplied id is null, returns the default child of the document if any, otherwise raises an exception.
If the parent is null or its path is null, then root is considered.
getChild in interface CoreSessionparent - the reference to the parent documentname - the name of the child document to retrieve
ClientException - if there is no child with the given name
public DocumentModelList getChildren(DocumentRef parent)
throws ClientException
CoreSession
getChildren in interface CoreSessionparent - the parent reference
ClientException
public DocumentModelIterator getChildrenIterator(DocumentRef parent)
throws ClientException
CoreSession
getChildrenIterator in interface CoreSessionparent - the parent reference
ClientException
public DocumentModelList getChildren(DocumentRef parent,
String type)
throws ClientException
CoreSession
getChildren in interface CoreSessionparent - the parent referencetype - the wanted document type
ClientException
public DocumentModelIterator getChildrenIterator(DocumentRef parent,
String type)
throws ClientException
CoreSession
getChildrenIterator in interface CoreSessionClientException
public DocumentModelList getChildren(DocumentRef parent,
String type,
String perm)
throws ClientException
CoreSession
getChildren in interface CoreSessionparent - the parent referencetype - the wanted document type
ClientException
public DocumentModelList getChildren(DocumentRef parent,
String type,
Filter filter,
Sorter sorter)
throws ClientException
CoreSessionCoreSession.getChildren(DocumentRef, String, String, Filter, Sorter)
without specific permission filtering.
getChildren in interface CoreSessionparent - the parent referencetype - the wanted typefilter - the filter to use if any, null otherwisesorter - the sorter to use if any, null otherwise
ClientException
public DocumentModelList getChildren(DocumentRef parent,
String type,
String perm,
Filter filter,
Sorter sorter)
throws ClientException
CoreSessionCoreSession.getChildren(DocumentRef, String, String) but the result
is filtered and then sorted using the specified filter and sorter.
getChildren in interface CoreSessionparent - the parent referencetype - the wanted typeperm - permission to check for. If null, defaults to READfilter - the filter to use if any, null otherwisesorter - the sorter to use if any, null otherwise
ClientException
public List<DocumentRef> getChildrenRefs(DocumentRef parentRef,
String perm)
throws ClientException
CoreSession
getChildrenRefs in interface CoreSessionparentRef - the parent referenceperm - the permission to check on the children (usually READ); if
null, no permission is checked
ClientException
public DocumentModelsChunk getDocsResultChunk(DocsQueryProviderDef def,
String type,
String perm,
Filter filter,
int start,
int max)
throws ClientException
getDocsResultChunk in interface CoreSessionClientException
public DocumentModelIterator getChildrenIterator(DocumentRef parent,
String type,
String perm,
Filter filter)
throws ClientException
CoreSession
getChildrenIterator in interface CoreSessionClientException
public DocumentModel getDocument(DocumentRef docRef)
throws ClientException
CoreSessionThe default schemas are used to populate the returned document model. Default schemas are configured via the document type manager.
Any other data model not part of the default schemas will be lazily loaded as needed.
getDocument in interface CoreSessiondocRef - the document reference
ClientException
@Deprecated
public DocumentModel getDocument(DocumentRef docRef,
String[] schemas)
throws ClientException
getDocument in interface CoreSessionClientException
public DocumentModelList getDocuments(DocumentRef[] docRefs)
throws ClientException
CoreSessionDocuments that are not accessible are skipped.
getDocuments in interface CoreSessionClientException
public DocumentModelList getFiles(DocumentRef parent)
throws ClientException
CoreSessionCoreSession.getChildren(DocumentRef) but returns only
non-folder documents.
getFiles in interface CoreSessionparent - the parent reference
ClientException
public DocumentModelIterator getFilesIterator(DocumentRef parent)
throws ClientException
CoreSessionCoreSession.getFiles(DocumentRef) but returns an
iterator.
getFilesIterator in interface CoreSessionClientException
public DocumentModelList getFiles(DocumentRef parent,
Filter filter,
Sorter sorter)
throws ClientException
CoreSessionCoreSession.getFiles(org.nuxeo.ecm.core.api.DocumentRef) but uses an optional filter and sorter on the
result.
getFiles in interface CoreSessionparent - the parent referencefilter - the filter to use or null if nonesorter - the sorter to use or null if none
ClientException
public DocumentModelList getFolders(DocumentRef parent)
throws ClientException
CoreSessionCoreSession.getChildren(DocumentRef) but returns only
folder documents.
getFolders in interface CoreSessionparent - the parent ref
ClientException
public DocumentModelIterator getFoldersIterator(DocumentRef parent)
throws ClientException
CoreSessionCoreSession.getFolders(DocumentRef) but returns a lazy
loading iterator over the list of children.
getFoldersIterator in interface CoreSessionparent - the parent reference
ClientException
public DocumentModelList getFolders(DocumentRef parent,
Filter filter,
Sorter sorter)
throws ClientException
CoreSessionCoreSession.getFolders(DocumentRef) but uses an optional
filter and sorter on the result.
getFolders in interface CoreSessionparent - the parent referencefilter - the filter to use or null if nonesorter - the sorter to use or null if none
ClientException
public DocumentRef getParentDocumentRef(DocumentRef docRef)
throws ClientException
CoreSessiondocRef or
null if this is the root document.
This method does not check the permissions on the parent document of this
CoreSession's Principal.
getParentDocumentRef in interface CoreSessionClientException
public DocumentModel getParentDocument(DocumentRef docRef)
throws ClientException
CoreSession
getParentDocument in interface CoreSessionClientException
public List<DocumentModel> getParentDocuments(DocumentRef docRef)
throws ClientException
CoreSessionDocuments the principal is is not allowed to browse are filtered out the parents list.
getParentDocuments in interface CoreSessionClientException
public DocumentModel getRootDocument()
throws ClientException
CoreSession
getRootDocument in interface CoreSessionClientException
public boolean hasChildren(DocumentRef docRef)
throws ClientException
CoreSessionThis operation silently ignores non-folder documents: If the document is not a folder then returns false.
If the parent is null or its path is null, then root is considered.
hasChildren in interface CoreSessiondocRef - the reference to the document to test
ClientException
public DocumentModelList query(String query)
throws ClientException
CoreSession
query in interface CoreSessionquery - the query to execute
ClientException
public DocumentModelList query(String query,
int max)
throws ClientException
CoreSession
query in interface CoreSessionquery - the query to executemax - number of document to retrieve
ClientException
public DocumentModelList query(String query,
Filter filter)
throws ClientException
CoreSession
query in interface CoreSessionquery - the query to executefilter - the filter to apply to result
ClientException
public DocumentModelList query(String query,
Filter filter,
int max)
throws ClientException
CoreSession
query in interface CoreSessionquery - the query to executefilter - the filter to apply to resultmax - number of document to retrieve
ClientException
public DocumentModelList query(String query,
Filter filter,
long limit,
long offset,
boolean countTotal)
throws ClientException
CoreSession
query in interface CoreSessionquery - the query to executefilter - the filter to apply to resultlimit - the maximum number of documents to retrieve, or 0 for all of
themoffset - the offset (starting at 0) into the list of documentscountTotal - if true, return a DocumentModelList
that includes a total size of the underlying list (size if
there was no limit or offset)
ClientException
public DocumentModelList query(String query,
String queryType,
Filter filter,
long limit,
long offset,
boolean countTotal)
throws ClientException
CoreSession
query in interface CoreSessionquery - the query to executequeryType - the query type, like "NXQL"filter - the filter to apply to resultlimit - the maximum number of documents to retrieve, or 0 for all of
themoffset - the offset (starting at 0) into the list of documentscountTotal - if true, return a DocumentModelList
that includes a total size of the underlying list (size if
there was no limit or offset)
ClientException
public IterableQueryResult queryAndFetch(String query,
String queryType,
Object... params)
throws ClientException
queryAndFetch in interface CoreSessionClientException
public DocumentModelIterator queryIt(String query,
Filter filter,
int max)
throws ClientException
CoreSession
queryIt in interface CoreSessionquery - the query to executefilter - the filter to apply to resultmax - number of document to retrieve
ClientException
@Deprecated
public DocumentModelList querySimpleFts(String keywords)
throws ClientException
CoreSession
querySimpleFts in interface CoreSessionClientException
@Deprecated
public DocumentModelList querySimpleFts(String keywords,
Filter filter)
throws ClientException
CoreSession
querySimpleFts in interface CoreSessionClientException
@Deprecated
public DocumentModelIterator querySimpleFtsIt(String query,
Filter filter,
int pageSize)
throws ClientException
querySimpleFtsIt in interface CoreSessionClientException
@Deprecated
public DocumentModelIterator querySimpleFtsIt(String query,
String startingPath,
Filter filter,
int pageSize)
throws ClientException
querySimpleFtsIt in interface CoreSessionClientException
public void removeChildren(DocumentRef docRef)
throws ClientException
CoreSession
removeChildren in interface CoreSessiondocRef - the reference to the document to remove
ClientException
public boolean canRemoveDocument(DocumentRef docRef)
throws ClientException
CoreSessionFor an archived version to be removeable, it must not be referenced from any proxy or be the base of a working document, and the REMOVE permission must be available on the working document (or the user must be an administrator if no working document exists).
canRemoveDocument in interface CoreSessiondocRef - the document
ClientException
public void removeDocument(DocumentRef docRef)
throws ClientException
CoreSession
removeDocument in interface CoreSessiondocRef - the reference to the document to remove
ClientException
public void removeDocuments(DocumentRef[] docRefs)
throws ClientException
removeDocuments in interface CoreSessiondocRefs - the refs to the document to remove
ClientException
public void save()
throws ClientException
CoreSession
save in interface CoreSessionClientException
public DocumentModel saveDocument(DocumentModel docModel)
throws ClientException
CoreSession
saveDocument in interface CoreSessiondocModel - the document model that needs modified
ClientException
@Deprecated
public boolean isDirty(DocumentRef docRef)
throws ClientException
CoreSession
isDirty in interface CoreSessiondocRef - the doc reference
ClientException
public void saveDocuments(DocumentModel[] docModels)
throws ClientException
CoreSession
saveDocuments in interface CoreSessiondocModels - the document models that needs to be saved
ClientException
public DocumentModel getSourceDocument(DocumentRef docRef)
throws ClientException
CoreSession
getSourceDocument in interface CoreSessiondocRef - the reference to the document
ClientException - if any error occurs
public VersionModel getLastVersion(DocumentRef docRef)
throws ClientException
CoreSession
getLastVersion in interface CoreSessiondocRef - the reference to the document
ClientException - if any error occurs
public DocumentModel getLastDocumentVersion(DocumentRef docRef)
throws ClientException
CoreSession
getLastDocumentVersion in interface CoreSessiondocRef - the reference to the document
ClientException
public DocumentRef getLastDocumentVersionRef(DocumentRef docRef)
throws ClientException
CoreSession
getLastDocumentVersionRef in interface CoreSessiondocRef - the reference to the document
ClientException
public List<DocumentRef> getVersionsRefs(DocumentRef docRef)
throws ClientException
CoreSession
getVersionsRefs in interface CoreSessiondocRef - the reference to the document
ClientException
public List<DocumentModel> getVersions(DocumentRef docRef)
throws ClientException
CoreSession
getVersions in interface CoreSessiondocRef - the reference to the document
DocumentModel representing versions, empty
list if none is found.
ClientException
public List<VersionModel> getVersionsForDocument(DocumentRef docRef)
throws ClientException
CoreSession
getVersionsForDocument in interface CoreSessiondocRef - the reference to the document
VersionModel representing versions, empty
list if none is found.
ClientException
public DocumentModel restoreToVersion(DocumentRef docRef,
DocumentRef versionRef)
throws ClientException
CoreSession
restoreToVersion in interface CoreSessiondocRef - the reference to the documentversionRef - the reference to the version
ClientException
@Deprecated
public DocumentModel restoreToVersion(DocumentRef docRef,
VersionModel version)
throws ClientException
CoreSession
restoreToVersion in interface CoreSessiondocRef - the reference to the documentversion - the version to which the document should be restored to -
only the label is used for the moment
ClientException
@Deprecated
public DocumentModel restoreToVersion(DocumentRef docRef,
VersionModel version,
boolean skipSnapshotCreation)
throws ClientException
CoreSession
restoreToVersion in interface CoreSessiondocRef - the reference to the documentversion - the version to which the document should be restored to -
only the label is used for the momentskipSnapshotCreation - indicates if skipping snapshot creation
ClientException
public DocumentModel restoreToVersion(DocumentRef docRef,
DocumentRef versionRef,
boolean skipSnapshotCreation,
boolean skipCheckout)
throws ClientException
CoreSession
restoreToVersion in interface CoreSessiondocRef - the reference to the documentversionRef - the reference to the versionskipSnapshotCreation - true if the document should not be
snapshotted before being restoredskipCheckout - true if the restored document should be kept
in a checked-in state
ClientException
public DocumentRef getBaseVersion(DocumentRef docRef)
throws ClientException
CoreSession
Returns null for a checked out document or a version or a proxy.
getBaseVersion in interface CoreSessionnull
ClientException
@Deprecated
public DocumentModel checkIn(DocumentRef docRef,
VersionModel ver)
throws ClientException
CoreSession
checkIn in interface CoreSessiondocRef - the reference to the documentver - the version descriptor
ClientException
public DocumentRef checkIn(DocumentRef docRef,
VersioningOption option,
String checkinComment)
throws ClientException
CoreSession
checkIn in interface CoreSessiondocRef - the reference to the documentoption - whether to do create a new VersioningOption.MINOR
or VersioningOption.MAJOR version during check incheckinComment - the checkin comment
ClientException
public void checkOut(DocumentRef docRef)
throws ClientException
CoreSession
checkOut in interface CoreSessiondocRef - the reference to the document
ClientException
public void internalCheckOut(DocumentRef docRef)
throws ClientException
ClientException
public boolean isCheckedOut(DocumentRef docRef)
throws ClientException
CoreSession
isCheckedOut in interface CoreSessiondocRef - the reference to the document
ClientException
public String getVersionSeriesId(DocumentRef docRef)
throws ClientException
CoreSessionAll documents and versions derived by a check in or checkout from the same original document share the same version series id.
getVersionSeriesId in interface CoreSessiondocRef - the document reference
ClientException
public DocumentModel getWorkingCopy(DocumentRef docRef)
throws ClientException
CoreSession
getWorkingCopy in interface CoreSessiondocRef - the document reference
null if not found
ClientException
public DocumentModel getVersion(String versionableId,
VersionModel versionModel)
throws ClientException
CoreSessionThe version model contains the label of the version to look for. On return, it is filled with the version's description and creation date.
Restricted to administrators.
getVersion in interface CoreSessionversionableId - the versionable idversionModel - the version model holding the label
null if not found
ClientException
public String getVersionLabel(DocumentModel docModel)
throws ClientException
CoreSession
getVersionLabel in interface CoreSessiondocModel - the document
ClientException
public DocumentModel getDocumentWithVersion(DocumentRef docRef,
VersionModel version)
throws ClientException
CoreSession
getDocumentWithVersion in interface CoreSessiondocRef - the reference to the documentversion - the version for which we want the corresponding document
ClientException
public DocumentModel createProxy(DocumentRef docRef,
DocumentRef folderRef)
throws ClientException
CoreSessionThe document may be a version, or a working copy (live document) in which case the proxy will be a "shortcut".
createProxy in interface CoreSessionClientException
@Deprecated
public DocumentModel createProxy(DocumentRef parentRef,
DocumentRef docRef,
VersionModel version,
boolean overwriteExistingProxy)
throws ClientException
CoreSession
createProxy in interface CoreSessiondocRef - the reference to the documentversion - the version
ClientException - if any error occurs
public DocumentModelList getProxies(DocumentRef docRef,
DocumentRef folderRef)
throws ClientException
CoreSessionIf the document is a version, then only proxies to that version will be looked up.
If the document is a proxy, then all similar proxies (pointing to any version of the same versionable) are retrieved.
getProxies in interface CoreSessiondocRef - the target document for the proxiesfolderRef - the folder where proxies are located or null
ClientException - if any error occurs
public String[] getProxyVersions(DocumentRef docRef,
DocumentRef folderRef)
throws ClientException
CoreSessionIntended to be used by UI clients to display information about proxies in sections.
getProxyVersions in interface CoreSessiondocRef - the target document for the proxiesfolderRef - the folder where proxies are located
null is returned if no proxies are
found the specified folder
ClientException - if any error occurs
public List<String> getAvailableSecurityPermissions()
throws ClientException
CoreSession
getAvailableSecurityPermissions in interface CoreSessionClientException
@Deprecated
public DataModel getDataModel(DocumentRef docRef,
String schema)
throws ClientException
getDataModel in interface CoreSessionClientException
public DataModel getDataModel(DocumentRef docRef,
Schema schema)
throws ClientException
CoreSessionFor INTERNAL use by the core.
getDataModel in interface CoreSessionClientException
@Deprecated
public Object getDataModelField(DocumentRef docRef,
String schema,
String field)
throws ClientException
getDataModelField in interface CoreSessionClientException
@Deprecated
public Object[] getDataModelFields(DocumentRef docRef,
String schema,
String[] fields)
throws ClientException
getDataModelFields in interface CoreSessionClientException
public SerializableInputStream getContentData(String key)
throws ClientException
CoreSessionThe key is implementation-dependent - this can be a property path an ID, etc.
This method is used to lazily fetch blob streams.
getContentData in interface CoreSessionClientException
public String getStreamURI(String blobPropertyId)
throws ClientException
CoreSessionThe blob is fetched from the repository and the blob stream is registered against the streaming service so the stream will be available remotely through stream service API.
After the client has called this method, it will be able to download the stream using streaming server API.
getStreamURI in interface CoreSessionClientException
public String getCurrentLifeCycleState(DocumentRef docRef)
throws ClientException
CoreSession
getCurrentLifeCycleState in interface CoreSessiondocRef - the document reference
ClientExceptionorg.nuxeo.ecm.core.lifecycle
public String getLifeCyclePolicy(DocumentRef docRef)
throws ClientException
CoreSession
getLifeCyclePolicy in interface CoreSessiondocRef - the document reference
ClientExceptionorg.nuxeo.ecm.core.lifecycle
public boolean followTransition(DocumentRef docRef,
String transition)
throws ClientException
CoreSessionThis will update the current life cycle of the document.
followTransition in interface CoreSessiondocRef - the document referencetransition - the name of the transition to follow
ClientException
public Collection<String> getAllowedStateTransitions(DocumentRef docRef)
throws ClientException
CoreSession
getAllowedStateTransitions in interface CoreSessiondocRef - the document reference
ClientException
public void reinitLifeCycleState(DocumentRef docRef)
throws ClientException
CoreSession
reinitLifeCycleState in interface CoreSessiondocRef - the document
ClientException
public Object[] getDataModelsField(DocumentRef[] docRefs,
String schema,
String field)
throws ClientException
CoreSession
getDataModelsField in interface CoreSessiondocRefs - the document referencesschema - the schemafield - the field name
ClientException
public DocumentRef[] getParentDocumentRefs(DocumentRef docRef)
throws ClientException
CoreSession
getParentDocumentRefs in interface CoreSessionClientException
public Object[] getDataModelsFieldUp(DocumentRef docRef,
String schema,
String field)
throws ClientException
CoreSession
getDataModelsFieldUp in interface CoreSessiondocRef - the document referenceschema - the schemafield - the field name
ClientException
@Deprecated
public String getLock(DocumentRef docRef)
throws ClientException
CoreSession
A lock key has the form someuser:Nov 29, 2010.
getLock in interface CoreSessiondocRef - the document reference
ClientException
@Deprecated
public void setLock(DocumentRef docRef,
String key)
throws ClientException
CoreSession
A lock key must have the form someuser:Nov 29, 2010.
setLock in interface CoreSessiondocRef - the document referencekey - the lock key
ClientException - if a lock is already set or other exception
occurred
@Deprecated
public String unlock(DocumentRef docRef)
throws ClientException
CoreSessionThe caller principal should be the same as the one who set the lock or to belongs to the administrator group, otherwise an exception will be throw.
If the document was not locked, does nothing.
unlock in interface CoreSessiondocRef - the document to unlock
ClientException
public Lock setLock(DocumentRef docRef)
throws ClientException
CoreSession
setLock in interface CoreSessionClientException - if a lock was already set
public Lock getLockInfo(DocumentRef docRef)
throws ClientException
CoreSessionLock info is never cached, and needs to use a separate transaction in a separate thread, so care should be taken to not call this method needlessly.
getLockInfo in interface CoreSessionnull
otherwise
ClientException
public Lock removeLock(DocumentRef docRef)
throws ClientException
CoreSessionThe caller principal should be the same as the one who set the lock or to belongs to the administrator group, otherwise an exception will be throw.
If the document was not locked, does nothing.
Returns the previous lock info.
removeLock in interface CoreSessiondocRef - the document to unlock
null if there was no lock
ClientException
public void applyDefaultPermissions(String userOrGroupName)
throws ClientException
CoreSessionUsage: As an administrator, you may want to add new users or groups. This method needs to be called to grand default reading permissions on the root document of the repository for the newly created users/groups.
applyDefaultPermissions in interface CoreSessionClientExceptionpublic void destroy()
CoreSessionCalled when the instance is no more needed.
destroy in interface CoreSession
public DocumentModel publishDocument(DocumentModel docToPublish,
DocumentModel section)
throws ClientException
CoreSession
publishDocument in interface CoreSessionClientException
public DocumentModel publishDocument(DocumentModel docModel,
DocumentModel section,
boolean overwriteExistingProxy)
throws ClientException
CoreSession
publishDocument in interface CoreSessionClientException
public String getSuperParentType(DocumentModel doc)
throws ClientException
CoreSession
getSuperParentType in interface CoreSessionClientException
public DocumentModel getSuperSpace(DocumentModel doc)
throws ClientException
CoreSession
getSuperSpace in interface CoreSessionClientException
public List<SecuritySummaryEntry> getSecuritySummary(DocumentModel docModel,
Boolean includeParents)
throws ClientException
CoreSession
getSecuritySummary in interface CoreSessiondocModel - the document node from where the security export is doneincludeParents - flag is the parent nodes holding security
information should be added at the top of the returned list
ClientExceptionpublic String getRepositoryName()
CoreSession
getRepositoryName in interface CoreSession
public <T extends Serializable> T getDocumentSystemProp(DocumentRef ref,
String systemProperty,
Class<T> type)
throws ClientException,
DocumentException
CoreSession
getDocumentSystemProp in interface CoreSessionClientException
DocumentException
public <T extends Serializable> void setDocumentSystemProp(DocumentRef ref,
String systemProperty,
T value)
throws ClientException,
DocumentException
CoreSession
setDocumentSystemProp in interface CoreSessionClientException
DocumentException
public void orderBefore(DocumentRef parent,
String src,
String dest)
throws ClientException
CoreSessiondocModel.getName()) To place the source document at the end
of the children list use a null destination node.
orderBefore in interface CoreSessionparent - the parent documentsrc - the document to be moved (ordered)dest - the document before which the reordered document will be
placed If null the source document will be placed at the end
of the children list
ClientException - if the parent document is not an orderable folder
or other error occurs
public <T> T run(Operation<T> op)
throws ClientException
CoreSession
run in interface CoreSessionT - command result typeop - the command to run
ClientException - if any error occurs
public <T> T run(Operation<T> op,
ProgressMonitor monitor)
throws ClientException
CoreSession
run in interface CoreSessionClientExceptionpublic void startOperation(Operation<?> operation)
startOperation in interface OperationHandlerin
nuxeo-core-event-compatpublic void endOperation(Operation<?> operation)
endOperation in interface OperationHandlerin
nuxeo-core-event-compat
public DocumentModel.DocumentModelRefresh refreshDocument(DocumentRef ref,
int refreshFlags,
String[] schemas)
throws ClientException
CoreSessionDocumentModel.refresh()
Get fresh data from a document given a description of what kind of data should be refetched.
The refresh information is specified using a bit mask. See
DocumentModel for all accepted flags.
When the flag DocumentModel.REFRESH_CONTENT_IF_LOADED is
specified a third argument must be passed representing the schema names
for document parts to refresh. This argument is ignored if the flag is
not specified or no schema names are provided
refreshDocument in interface CoreSessionref - the document referencerefreshFlags - refresh flags as defined in DocumentModelschemas - the schema names if a partial content refresh is required
ClientExceptionpublic String[] getPermissionsToCheck(String permission)
CoreSessionSecurityService.getPermissionsToCheck(java.lang.String)
available remote.
getPermissionsToCheck in interface CoreSession
public <T extends DetachedAdapter> T adaptFirstMatchingDocumentWithFacet(DocumentRef docRef,
String facet,
Class<T> adapterClass)
throws ClientException
CoreSessionfacet and adapt it on the
adapterClass.
This method does not check the permissions on the document to be adapted of this
CoreSession's Principal, and so the adapter must not need
other schemas from the DocumentModel except the schemas related
to the given facet.
adaptFirstMatchingDocumentWithFacet in interface CoreSessionfacet adapted, or
null if no parent found or the document does not support
the given adapterClass.
ClientException
|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||