|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Session
Field Summary | |
---|---|
static String |
USER_NAME
|
Method Summary | |
---|---|
void |
cancel()
Cancels changes done in this session. |
void |
close()
Closes this session and saves changes on the workspace, if any. |
Document |
copy(Document src,
Document dst,
String name)
Copies the source document to the given folder. |
Document |
createProxy(Document doc,
Document folder)
Creates a generic proxy to the given document inside the given folder. |
Document |
createProxyForVersion(Document parent,
Document doc,
String versionLabel)
Deprecated. |
Query |
createQuery(String query,
Query.Type qType,
String... params)
Creates a query object given a SQL like query string. |
Query |
createQuery(String query,
String queryType,
String... params)
Creates a query object given a SQL like query string. |
void |
dispose()
Closes the session and cancel changes on workspace, if any. |
InputStream |
getDataStream(String key)
Gets a blob stream using the given key. |
Document |
getDocumentByUUID(String uuid)
Gets a document given its ID. |
Document |
getNullDocument()
Gets the null document, to be used as a fake parent to add placeless children. |
Collection<Document> |
getProxies(Document doc,
Document folder)
Finds the proxies for a document. |
Repository |
getRepository()
Gets the repository that created this session. |
Document |
getRootDocument()
Gets the root document in this repository. |
SecurityManager |
getSecurityManager()
Gets the security manager used by the repository. |
Map<String,Serializable> |
getSessionContext()
Gets the session context used to create this session. |
long |
getSessionId()
Gets the session id. |
SchemaManager |
getTypeManager()
Gets the type manager used by the repository. |
String |
getUserSessionId()
The unique ID of the user session on this repository. |
Document |
getVersion(String versionableId,
VersionModel versionModel)
Gets a version of a document, given its versionable id and label. |
XAResource |
getXAResource()
The XAResource corresponding to this session. |
Document |
importDocument(String uuid,
Document parent,
String name,
String typeName,
Map<String,Serializable> properties)
Imports a document with a given id and parent. |
boolean |
isLive()
Checks whether the session is alive. |
Document |
move(Document src,
Document dst,
String name)
Moves the source document to the given folder. |
IterableQueryResult |
queryAndFetch(String query,
String queryType,
QueryFilter queryFilter,
Object... params)
|
Document |
resolvePath(String path)
Gets the document at the given path, if any. |
void |
save()
Saves this session. |
void |
setProxyTarget(Document proxy,
Document target)
Sets a proxies' target. |
Field Detail |
---|
static final String USER_NAME
Method Detail |
---|
long getSessionId()
This is an unique identifier of this session relative to the current JVM.
String getUserSessionId()
The ID is unique in the application (possible deployed on multiple machines).
This ID is normally passed by the session creator through the session context.
Repository getRepository()
Map<String,Serializable> getSessionContext()
Query createQuery(String query, String queryType, String... params) throws QueryException
query
- the SQL like query
QueryException
Query createQuery(String query, Query.Type qType, String... params) throws QueryException
query
- the SQL like query
QueryException
IterableQueryResult queryAndFetch(String query, String queryType, QueryFilter queryFilter, Object... params) throws QueryException
QueryException
SchemaManager getTypeManager()
SecurityManager getSecurityManager()
XAResource getXAResource()
void save() throws DocumentException
DocumentException
- if any error occursvoid cancel() throws DocumentException
DocumentException
- if any error occursboolean isLive()
void close() throws DocumentException
DocumentException
- if any error occursvoid dispose()
Document resolvePath(String path) throws DocumentException
path
-
DocumentException
- if any error occursDocument getDocumentByUUID(String uuid) throws DocumentException
uuid
- the document id
DocumentException
- if any error occursDocument getRootDocument() throws DocumentException
DocumentException
- if any error occursDocument getNullDocument() throws DocumentException
DocumentException
Document copy(Document src, Document dst, String name) throws DocumentException
If the destination document is not a folder, an exception is thrown.
src
- dst
- name
-
DocumentException
- if any error occursDocument move(Document src, Document dst, String name) throws DocumentException
If the destination document is not a folder an exception is thrown.
src
- the source document to movedst
- the destination foldername
- the new name of the document or null if the original name
should be preserved
DocumentException
- if any error occursInputStream getDataStream(String key) throws DocumentException
The implementation may use anything as the key. It may use the property path or a unique ID of the property.
This method can be used to lazily fetch blob content.
key
- the key of the blob data
DocumentException
- if any error occursDocument createProxy(Document doc, Document folder) throws DocumentException
doc
- the documentfolder
- the folder
DocumentException
- if any error occurs@Deprecated Document createProxyForVersion(Document parent, Document doc, String versionLabel) throws DocumentException
parent
- the parentdoc
- the documentversionLabel
- the version
DocumentException
- if any error occursCollection<Document> getProxies(Document doc, Document folder) throws DocumentException
If the document is a version, then only proxies to that version will be looked up.
doc
- the document or versionfolder
- the folder, or null
DocumentException
- if any error occursvoid setProxyTarget(Document proxy, Document target) throws DocumentException
The target must have the same version series as the proxy.
proxy
- the proxytarget
- the new target
DocumentException
Document importDocument(String uuid, Document parent, String name, String typeName, Map<String,Serializable> properties) throws DocumentException
The document can then be filled with the normal imported properties.
uuid
- the document uuidparent
- the document parent, or null
for a versionname
- the document name in its parenttypeName
- the document type, or ecm:proxy
for a proxyproperties
- system properties of the document, which will vary
depending whether it's a live document, a version or a proxy
(see the various IMPORT_*
constants of
CoreSession
)
Document
, even for proxies and versions
DocumentException
Document getVersion(String versionableId, VersionModel versionModel) throws DocumentException
The version model contains the label of the version to look for. On return, it is filled with the version's description and creation date.
versionableId
- the versionable idversionModel
- the version model
null
if not found
DocumentException
|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |