public abstract class BaseSession extends Object implements Session
| Constructor and Description |
|---|
BaseSession() |
| Modifier and Type | Method and Description |
|---|---|
static String |
computeMultiTenantDirectoryId(String tenantId,
String id)
Compute a multi tenant directory id based on the given
tenantId. |
static DocumentModel |
createEntryModel(String sessionId,
String schema,
String id,
Map<String,Object> values)
Returns a bare document model suitable for directory implementations.
|
static DocumentModel |
createEntryModel(String sessionId,
String schema,
String id,
Map<String,Object> values,
boolean readOnly)
Returns a bare document model suitable for directory implementations.
|
boolean |
isCurrentUserAllowed(String permissionTocheck)
Check the current user rights for the given permission against the permission descriptor
|
static boolean |
isReadOnlyEntry(DocumentModel entry)
Test whether entry comes from a read-only back-end directory.
|
DocumentModelList |
query(Map<String,Serializable> filter,
Set<String> fulltext,
Map<String,String> orderBy,
boolean fetchReferences,
int limit,
int offset)
Executes a query with the possibility to fetch a subset of the results.
|
static void |
setReadOnlyEntry(DocumentModel entry)
Set the read-only flag of a directory entry.
|
static void |
setReadWriteEntry(DocumentModel entry)
Unset the read-only flag of a directory entry.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitauthenticate, close, createEntry, createEntry, deleteEntry, deleteEntry, deleteEntry, getEntries, getEntry, getEntry, getIdField, getPasswordField, getProjection, getProjection, hasEntry, isAuthenticating, isReadOnly, query, query, query, query, updateEntrypublic boolean isCurrentUserAllowed(String permissionTocheck)
public static DocumentModel createEntryModel(String sessionId, String schema, String id, Map<String,Object> values) throws PropertyException
Can be used for creation screen.
PropertyExceptionpublic static DocumentModel createEntryModel(String sessionId, String schema, String id, Map<String,Object> values, boolean readOnly) throws PropertyException
Allow setting the readonly entry flag to Boolean.TRUE. See Session#isReadOnlyEntry(DocumentModel)
PropertyExceptionpublic static boolean isReadOnlyEntry(DocumentModel entry)
public static void setReadOnlyEntry(DocumentModel entry)
public static void setReadWriteEntry(DocumentModel entry)
public static String computeMultiTenantDirectoryId(String tenantId, String id)
tenantId.public DocumentModelList query(Map<String,Serializable> filter, Set<String> fulltext, Map<String,String> orderBy, boolean fetchReferences, int limit, int offset) throws ClientException, DirectoryException
Sessionquery in interface Sessionlimit - maximum number of results ignored if less than 1offset - number of rows skipped before starting, will be 0 if less than 0.ClientExceptionDirectoryExceptionSession.query(Map, Set, Map, boolean)Copyright © 2015 Nuxeo SA. All rights reserved.