public abstract class BaseSession extends Object implements Session
Modifier and Type | Field and Description |
---|---|
protected static String |
MULTI_TENANT_ID_FORMAT |
protected PermissionDescriptor[] |
permissions |
protected static String |
POWER_USERS_GROUP |
protected static String |
READONLY_ENTRY_FLAG |
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.
|
protected static Map<String,Object> |
mkObjectMap(Map<String,Serializable> map) |
protected static Map<String,Serializable> |
mkSerializableMap(Map<String,Object> map) |
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
authenticate, close, createEntry, createEntry, deleteEntry, deleteEntry, deleteEntry, getEntries, getEntry, getEntry, getIdField, getPasswordField, getProjection, getProjection, hasEntry, isAuthenticating, isReadOnly, query, query, query, query, updateEntry
protected static final String POWER_USERS_GROUP
protected static final String READONLY_ENTRY_FLAG
protected static final String MULTI_TENANT_ID_FORMAT
protected PermissionDescriptor[] permissions
public BaseSession()
public 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.
PropertyException
public 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)
PropertyException
protected static Map<String,Serializable> mkSerializableMap(Map<String,Object> map)
protected static Map<String,Object> mkObjectMap(Map<String,Serializable> map)
public 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 DirectoryException
Session
query
in interface Session
limit
- maximum number of results ignored if less than 1offset
- number of rows skipped before starting, will be 0 if less than 0.DirectoryException
Session.query(Map, Set, Map, boolean)
Copyright © 2015 Nuxeo SA. All rights reserved.