Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.directory
Class BaseSession

java.lang.Object
  extended by org.nuxeo.ecm.directory.BaseSession
All Implemented Interfaces:
Session
Direct Known Subclasses:
DirectoryClientImpl, LDAPSession, MemoryDirectorySession, MultiDirectorySession, SQLSession

public abstract class BaseSession
extends Object
implements Session

Base session class with helper methods common to all kinds of directory sessions.

Since:
5.2M4
Author:
Anahide Tchertchian

Constructor Summary
BaseSession()
           
 
Method Summary
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.
static boolean isReadOnlyEntry(DocumentModel entry)
          Test whether entry comes from a read-only back-end directory.
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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.nuxeo.ecm.directory.Session
authenticate, close, commit, createEntry, createEntry, deleteEntry, deleteEntry, deleteEntry, getEntries, getEntry, getEntry, getIdField, getPasswordField, getProjection, getProjection, hasEntry, isAuthenticating, isReadOnly, query, query, query, query, rollback, updateEntry
 

Constructor Detail

BaseSession

public BaseSession()
Method Detail

createEntryModel

public static DocumentModel createEntryModel(String sessionId,
                                             String schema,
                                             String id,
                                             Map<String,Object> values)
                                      throws PropertyException
Returns a bare document model suitable for directory implementations.

Can be used for creation screen.

Throws:
PropertyException
Since:
5.2M4

createEntryModel

public static DocumentModel createEntryModel(String sessionId,
                                             String schema,
                                             String id,
                                             Map<String,Object> values,
                                             boolean readOnly)
                                      throws PropertyException
Returns a bare document model suitable for directory implementations.

Allow setting the readonly entry flag to Boolean.TRUE. See Session#isReadOnlyEntry(DocumentModel)

Throws:
PropertyException
Since:
5.3.1

isReadOnlyEntry

public static boolean isReadOnlyEntry(DocumentModel entry)
Test whether entry comes from a read-only back-end directory.

Since:
5.3.1

setReadOnlyEntry

public static void setReadOnlyEntry(DocumentModel entry)
Set the read-only flag of a directory entry. To be used by EntryAdaptor implementations for instance.

Since:
5.3.2

setReadWriteEntry

public static void setReadWriteEntry(DocumentModel entry)
Unset the read-only flag of a directory entry. To be used by EntryAdaptor implementations for instance.

Since:
5.3.2

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.